Q3D Tips&Tricks

0 favourites
  • terransage

    To reduce the json file size, you can remove the whitespace. this can considerably shrink the filesize.

    Morph Animations use a lot of memory but their performance is better since the GPU animates them very efficiently through shaders. Because they use a lot of memory however they tend to work better for models with fewer vertices. There is no simple way to make something like a carried weapon through hierarchies using morph targets because they don't have any bones (and this is in fact why they are faster, if they had bones they'd be much slower) Some old games that use morph targets work around this by saving extra information about the position/orientation of a hand for every frame of every animaton, and then placing the object there. This is basically something like image points in C2. You could attempt something like this but it would have to be coded in events in C2 as a custom solution.

    The frame naming doesn't matter if it starts at 0000 or not, Q3D just reads the frames in the order they're placed in the file, sequentially, and trims any numeric characters off to find the "animation name". I tried my best to make it simple but the current exporters for three.js are still in development.

  • Thanks, I'm glad to hear that the animation frames don't have to be re-numbered. My copy-and-paste way of adding new animations to a .json file works, but it takes a lot of patience. I guess putting all of the animations in a single timeline is the way to go,

    As for the characters carrying things, I considered the idea of animating an object to follow the character's hand, but I wasn't sure how to pull that off, especially with the 2D editor.

    I also thought about creating cloned versions of the same character with objects "modeled" into their hands, and somehow switch the characters at the moment the original character reaches for and touches something. The pose, position and angle that the original character is in at the end of the reaching animation would have to exactly match the starting pose, position and angle of the "spawned," object-carrying character. Or that character could already be there, but invisible. I've done something like that in Unity, instantiating model clones and destroying or hiding the original. Of course, the object-carrying model would have to be re-rigged and re-morphed, with the model and the object it's carrying joined as one. (Sorry, I'm kind of thinking out loud....)

    Edit: I think I've got the "character-carrying-things" that I mentioned in the last paragraph figured out. I discovered that it's easy to "model" an object into an already morph-animated model, export and import that model into Q3D without having to redo the animations, and then use the Construct 2 Event Sheets to seamlessly replace the original model reaching for an object. Once I've got it worked out 100%, I'll add it to the tutorial above.

  • Edit: I think I've got the "character-carrying-things" that I mentioned in the last paragraph figured out. I discovered that it's easy to "model" an object into an already morph-animated model, export and import that model into Q3D without having to redo the animations, and then use the Construct 2 Event Sheets to seamlessly replace the original model reaching for an object. Once I've got it worked out 100%, I'll add it to the tutorial above.

    wait so we can use the monster morph animation tutorial, characters that is already from q3d, just swap the model ? and keep the same animation of movement!? i mean bones or what contains?! just change the shape of model basically?! that will be so awesome, cause it solves most of problems, just wold need to have a same size character, and then bam new characters every time!

  • [quote:ih0cwitz]@gamecorpstudio wrote:

    wait so we can use the monster morph animation tutorial, characters that is already from q3d, just swap the model ? and keep the same animation of movement!? i mean bones or what contains?! just change the shape of model basically?! that will be so awesome, cause it solves most of problems, just wold need to have a same size character, and then bam new characters every time!

    Well, sort of. I think you could do what you're thinking, as long as you use the same rigged model as the base for all of the morph-animated characters. But you would have to use the same number of vertices--just shift them around while still having them attached to the same bones containing the same rigged animations that you would share between different versions of that model. I've never altered a model after rigging it, so I'm not even sure how that would be done (although I have added objects to the model after it has been morph-animated; and that's information that I'm going to put in the tutorial above). For re-shaping a rigged character, I think you would either have to use Shape Keys to shift the vertices around, or you could detach the bones from the vertices, shift the vertices around to create the new character, add a new material/texture, then re-parent the model to the bones, creating vertex groups, etc. That way the character would look different, but it would be animated the same.

    The process I was talking about in my "edit" above is a way to resolve the problem of the morph-animated character carrying things in his hands, since an object can't be parented to a hand bone (because there aren't any bones). To test whether or not that could be done, I went back to my morph-animated character in Blender, added a cylinder to the scene, re-sized, rotated and positioned it in the character's hand, selected first the object and then the character, shifted to Edit Mode, selected three adjacent vertices in the character's hand--close to the cylinder--and pressed Control+P to parent the object to the vertices. Then I played the walk cycle and, sure enough, the cylinder moved (and rotated correctly) with the hand, as if he was really carrying it. At first I made the mistake of parenting the cylinder to a single vertex. It followed the hand when the character walked, but it refused to rotate. Parenting to three vertices "locks" the object into place, correcting the rotation problem.

    The only thing I haven't tested, yet, is whether or not I can now join the object to the model, to make them one model--and still have the morph animation work the same way for the whole model. I just realized that (*gulp*). It seems that hierarchies that aren't armatures can't be exported in .json files. I forgot about that.

    After I'm done writing this, I'll have to experiment with that. And I might have to put the tutorial on hold....

    As for "swapping" out the two versions of the character model, I haven't yet tested it with the model carrying the cylinder. But I did swap between the original model and a duplicate, triggering it with a key press. I was pretty surprised by how seamless it was! I had to use a few conditions/actions in the Event Sheet, juggle a few Euler angles to get the new model to face in exactly the same direction as the first. All of that, I'll mention in my edit to the tutorial--exactly what actions I used.

    You mentioned a character that is already in Q3D. Are you talking about the monsters created by QuaziGNRLnose? If you wanted to swap bodies with one of those creatures, you'd have to match one of their start or end poses as closely as possible, have one character end its animation cycle in a pose that begins the animation cycle of the second character, in order to make it look as natural as possible. In Unity, when a character dies, you can swap it out for a "ragdoll" version of the same character, matching each of its bones--position and rotation--with the bones of the destroyed character. Are you thinking of taking one of those Q3D monsters into Blender and altering its shape/texture? Because they're morph-animated (I think), you would have to capture their alterations with Shape Keys in every pose of the animation. Or maybe I'm not understanding your question?

    Anyway, I realized I have a lot more experimenting to do before I can add to the tutorial....

  • You mentioned a character that is already in Q3D. Are you talking about the monsters created by QuaziGNRLnose? If you wanted to swap bodies with one of those creatures, you'd have to match one of their start or end poses as closely as possible, have one character end its animation cycle in a pose that begins the animation cycle of the second character, in order to make it look as natural as possible. In Unity, when a character dies, you can swap it out for a "ragdoll" version of the same character, matching each of its bones--position and rotation--with the bones of the destroyed character. Are you thinking of taking one of those Q3D monsters into Blender and altering its shape/texture? Because they're morph-animated (I think), you would have to capture their alterations with Shape Keys in every pose of the animation. Or maybe I'm not understanding your question?

    Anyway, I realized I have a lot more experimenting to do before I can add to the tutorial....

    yes i was thinking of the monsters from the animation morphing tutorial example, they have already the animation morphing and all the bones working, they kinda move slow but that's not the problem, the thing is i want to change the model itself to make it look like a human/or something else but keep the bones, and animation! i think its possible and easy to be done il try with blender tonight, after i manage to load the json in blender

    the other solution i was thinking to export an character and load the animation from the monster json to the new obj ! not sure how that will work ! but il give it a shot and see what happens!

    i tried placing one time a new obj into the same q3dmodel but then, the new obj dident had the animation on it, so i want to keep old model, add new model and on start of layout just load animation and bones from existing model i guess if there is an option to it! this way i wont sit there for hours picking bones and vertices xaxa but im not sure if is possible! il test it and post here!

  • , I did some experimenting with my object-carrying character and swapping that character with the original character--and it worked. But now I'm writing a mini-tutorial for that process, including the Event Sheet steps for swapping between characters. And that may take a little while. It's not exactly what you're looking to do (altering the appearance of the Q3D monsters while preserving their animations), but it might give you some clues about how to do it. Unfortunately, it's approaching my bedtime, so I'll have to continue the tutorial tomorrow.

    I will say this for now: I was wrong about parenting an object to the vertices of the morph-animated model in Blender and exporting that to Q3D. That's because such hierarchies can't be exported to a .json file. Instead, I went through a little more involved process of joining the character and the carried object as one model, manually rotating and positioning the object into the character's hand in each and every pose of the timeline, and then recording the keyframes. It's a little more work than originally intended, but it works! Anyway, I'll try to finish the mini-tutorial as soon as possible.

    I have to learn not to announce things before I'm 100% sure how to really do it....

  • Anyone having issues with trying to mirror/flip a q3dsprite? It's not working for me, and I'm not sure why.

    Setting the x or y scales to -1 doesn't do anything either.

  • I had to add code to the q3dsprite runtime to fix the issue.

    It now works with that code I've added.

  • is there any proper site or tutorials on youtube for this plugin ?

  • miketolsa at the moment no, there is no youtube tutorials as you'd expect , not yet, this topic is for tricks and tips, as in why should you use some effects, parameters, renders, and tips as how to make them, but we also the posters still learn them, in our free time. there was an official announcement upon release of 2.4 that next will come the manual and a few more tutorials, but we have to wait since the developers, are between exams and have their own life in first line then comes this plugin as a hobby mostly

  • You can also check out the three.js docs to get a feel for how things work in the background, since q3d uses the three.js library. http://threejs.org/

  • You can also check out the three.js docs to get a feel for how things work in the background, since q3d uses the three.js library. threejs.org

    atleast there should a list to relate those events or behaviours to three.js commands or classes or anything like that ? or how can someone compare both of them ?

  • You can also check out the three.js docs to get a feel for how things work in the background, since q3d uses the three.js library. http://threejs.org/

    im afraid the three.js examples from the website are not even close to what the plugin parameters are, for the developer might get easy, or people who already knows what three.js is but for normal people that are using construct2 without any knowledge of coding or just they are used to drag drop and publish that link wont work <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> but is always good as an eye opener and see what q3d can do based on the three.js examples

  • I recently bought this plugin and after read all the features and examples i saw, this plugin needs more Video-Tutorials than other thing <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Will be great if the developer get a break to release a good video-tutorials from the most basic until create mini games. Most of us can create some tutorials but as the first post we can do errors and confuse people form the start.

    I only found two video-tutorials from the same guy on youtube:

    First Q3D scene:

    Subscribe to Construct videos now

    Import Object to Construct 2:

    Subscribe to Construct videos now

    So will be a great idea start/open a thread, or this one to update the first post adding all the links to tutorials/video-tutorials and links to the tips/tricks inside the post to find inmediately.

    What you think?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I recently bought this plugin and after read all the features and examples i saw, this plugin needs more Video-Tutorials than other thing <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Will be great if the developer get a break to release a good video-tutorials from the most basic until create mini games. Most of us can create some tutorials but as the first post we can do errors and confuse people form the start.

    I only found two video-tutorials from the same guy on youtube:

    First Q3D scene:

    Subscribe to Construct videos now

    Import Object to Construct 2:

    Subscribe to Construct videos now

    So will be a great idea start/open a thread, or this one to update the first post adding all the links to tutorials/video-tutorials and links to the tips/tricks inside the post to find immediately.

    What you think?

    added thanks for sharing dident had time to look into it lately, since i was preoccupied with some other 2.5D projects <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> hopefully il start working on the projects i had in mind with Q3D and make a few tutorials on how to achieve some neat effects and games. Q3D is just simple to use, after u played a bit with the tutorial examples, but its tedious setting and arranging objects in the world <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)