QuaziGNRLnose's Recent Forum Activity

  • andreyin

    Here's an example of some various camera controllers set up in one capx using events:

    Camera Controllers

    You'll really need to look around online and learn some math about 3D vectors, trig, and rotation matrices to get a good idea of how to work in 3D and come up with these kinds of things. the plugin has helper functions like "look at" which are difficult to implement for beginners, but orbiting cameras require some knowledge of how vectors work.

  • Everything ralph wrote is correct. Obj format doesnt support animation data. Youll have to install one of the exporters and pass it through blender. Blender can import a variety of formats. Im investigating new exporter options too.

  • The performance complaints are overblown, most users would be hard pressed to get better performance coding directly in javascript. C2 works well if your reasonable and understand the performance on desktops is good but mobiles are still pretty terrible with javascript and youll have to make much simpler/lower resolution games on mobile.

  • If you have debug boxes/collider enabled the performance will be much lower, make sure you turn these off. also, turning on "shared material" can improve performance if all models look the same and don't need individual control over textures/colors/ etc.

    Q3D models will also be slower BECAUSE they support behaviours/collisions/animation/animated textures etc. and need to handle these things. Really theres nothing i can do, you need to work within the performance of the plugins, there isnt anything i can do to make the performance way better without usability sacrifices. Plain and simple you cant create too many objects because this is javascript / a browser, you've got to make the most of the performance you can get like you would in any other case. Q3D is already designed to perform very well, the rest is up to your design choices, and proper application of reasonable practices.

  • Ralph

    You dont need to do anything with shaders for this to work. Also you fuse the geometry in your modeling software. Itd be pretty slow to do it at runtime for a large number of objects. I could try to implement something for static objects but the issue is then that materials and things would cease to be modifiable.

    Its still extra overhead, and the string manipulation would be even slower than an if. Whats the issue with separate actions? Its essentially the same.

  • learningthreejs.com/blog/2011/10/05/performance-merging-geometry

    does this above works same if we add object as child ? will this save some performance if it is positioned as child "for example "3d healthbar" instead of using using set positions every tick ?

    No its not the same, children actually have worse performance than seperate objects in some cases. That article is referring to the practice of lets say making blades of grass all part of the same model instead of seperate objects to make the cpu do less work in calculating only a single transform vs 1000s. This is good practice to delegate work to the gpu.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • gorgonzola

    You can build/set up object hierarchies in Q3D and animate the transforms with actions. There is no supported boneless file format that can do that though, (although you can convert it to one with bones for Q3D if you can track down importer/exporters). If you really want this type of effect (for something like a robot / car whatever which doesn't have skin weighting), you can use bones to handle the objects/animations (making each "objects" vertices on a single mesh controlled/weighted to only a single bone in the hierarcy will do what you want). This technique can also be mixed with skinning to for example animate a sword being swung by someone. You can also at run-time add objects to the hierarchy of a bone, to put a different gun model in someones hand, a helmet on their head, etc. Alternatively you can assemble/animate entirely with actions if your work needs to be proceduraly animated. If you need fast performance you can even do some things entirely with morph targets when performance needs to be really good (for example in an rts, were having lots of units is more important than super high quality animation, you can make morph targets for a tank+turret as a single model and run/mix 4 multiple targets at any one time entirely on the gpu). Theres a multitude of options depending on your use case.

    I'm not really sure if im being clear about the "bones for discrete objects" so what I meant for example:

    make a model of a car with wheels.

    Make a "bone" at the desired local origin of each wheel, and make these children of a bone for the body. make the wheel vertices linked only to their bone, the body's vertices linked only to its bone , animate the bones then export. The bones will be the "object" in the hierarchy. Bones don't really limit you to organic forms, they're just a way of recognizing the animation information for scale/translation/rotation in the hierarchy.

    The other way is to use seperate Q3DModels like you would sprites, and do everything from within construct (this is how the tank in the Tiny Tank demo is animated).

    What workflow are you thinking of that necessitates this?

  • The switch statement for the dropdown would make the set position action very slightly slower per call, but the fact set position is so common made me do it that way, because it becomes a waste if you start having thousands of set positions per frame (which is pretty expected in larger projects). Either option had it's caveats but i figured multiple actions was better than a drop down.

    that Q3D Master action is just accidentally named different (it's been there a lot longer than the other plugs), thanks for the heads up <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I'm not really sure what you mean. you can't run things "locally" in a browser on a desktop because of browser settings unrelated to Q3D: https://github.com/mrdoob/three.js/wiki ... gs-locally

    The cordova/crosswalk issue is similar, but i don't know the settings to change because I haven't used XDK very much. I'm going to investigate when I've got more time. I'm not very familiar with a lot of wrappers so it's difficult for me to find whats going wrong. Right now my hypothesis is that Q3D is not using the right URL for loading files and i'll need to investigate more to verify.

  • kmsravindra

    Should be soon but im still busy with personal matters

    Q3d should work on mobile browsers already. Cordova breaks model loading, but the plugin otherwise works (oddly enough) and ive been unable to find out a way to fix it, but ill try to take another look.

  • Yea i can see duplicating being annoying but i sadly can't make the sharing work quickly because of the way C2 and my plugin use different canvas contexts, doubly prevented by the fact the sdk doesn't make these types of things too easy (theres no convenient way to share it). I'll look into ways to hack around it if possible but i don't have too much time to make big changes atm.

    Even if you have duplicate textures, i think (you'd have to ask Ashley to make sure) that on export C2 detects duplicates and doesn't make copies, so file size would be the same, the only disadvantage is the annoyance of importing twice while working.

    you don't need to do anything extra for q3d model to have animated textures as i explained, it just animates it if there are multiple frames / animation speed etc.. you can even change animation for the map types like you would sprites.

    I could add a Q3D sprite option for a plane, but the issue is it becomes kind of redundant since it can be done with Q3D Model already, and it can interact with lights and have normal maps on top of that so it's just all around better to use, if you dont want lighting you could just select "basic" as the material type.

    If you don't want to create a plane model (although you could just do this once anyway), theres a "advanced" feature i talk about in the recent changelog that you can use to create a plane geometry internally to use. Just make an action for q3d master that creates a plane using the "plane" action in the 'geometry' section, choose a name like "MyPlane" for the geometry, then on a q3d model using it's property for "model filename", the same way you'd load a model write "MyPlane.geom" and it'll load a plane (or whatever type of geometry you have) the ".geom" tells it the name is an internally created geometry. you can use this to load any of the stuff you can create using the actions in the section, which can come in handy for mocking stuff up quickly without opening > exporting etc.

    If im not clear enough please let me know! i'll do my best to help.

    A lot of these features aren't obvious but im trying to work on documentation that covers everything

  • I knew that'd be convenient so the Q3D object already supports an almost exact clone of the C2 animation system for all map types, so there's no reason for a workaround to do that (it would be really slow to have to pass the data like that so it's not doable any easy other way than being integrated really)!

    it's a bit tricky in one little way to get initialization to work properly, but it's not hard:

    Just name an animation "DiffuseMap" and have that as your "default" (it can be empty and 1x1 if you REALLY hate the name "DiffuseMap", but it needs it for a workaround a construct limitation with properties). This will give your object diffusemaps and you can use it like a sprites animation (add more frames, set the speed/looping/etc.)

    If you want additional "diffuse maps" for animations afterwards you can name them anything basically, and then theres a "set map animation" action (it's called something like that i'm not in a place i can check for sure now). You choose "Diffuse" for the "Map type" you ant to affect and then you can change the anim to any name from there. There's a lot of actions like that which are the "same" as what sprite has with the addition of a drop down that has an option for the map type to change the animation of (since you can have animated diffuse/light/spec/env/bump/normal maps, so you need to specify which you want to refer to). There's even all the conditions etc.

    I hope that's good enough!

    So basically:

    create an animation called "DiffuseMap" to say "hey my model has diffusemaps!"

    then create additional animations like you would for a sprite "Run", "Jump" etc. whatever you want

    then proceed like you would with a sprite, except always choose "Diffuse" for the "Map" so you can tell Q3D "the animation is for this specific map" since the different maps can all be animated.

  • Using q3d is relatively simple for small things like showing a model with a material but also has many features for things like collisions/raycasting/splitscreen/morph+skeletal animation/3d physics/lighting/textures/billboards etc. so its possible to make feature complete 3d webgl applications/games. Documentation is being written this month. Its more than 2 years of work so you can expect it to work quite well and many users actively use it and make requests / ask questions on usage in that very long thread.

QuaziGNRLnose's avatar

QuaziGNRLnose

Member since 2 Aug, 2008

Twitter
QuaziGNRLnose has 5 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies