Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • Anyone have a smart/easy way to track a 3d object in cam/screen space?

    I'm wanting to basically do this..

    http://zachberry.com/blog/tracking-3d-o ... -three-js/

    With a standard C2 Sprite, tracking a moving Q3D Object.

    edit --

    ah I see this has been discussed a little..

    Page 167 - QuaziGNRLnose said--

    [quote:13x18o6c]for the 2D/3D projection thing, there's no built-in method to get the view-space coordinates or projection matrix. Generally that's supposed to be what you use Q3D sprite for.

    If you know javascript/sdk you can modify Q3D easily enough to give you what you need, just look at the tick2 function for Q3D bone where the debug text is displayed and you can add some new expressions that use a similar process. I'll look into adding it for the final update i'll do, but no word on how long that'll be.

    If anyone has done this already, please pm me. Otherwise I'll be having a go at it myself..

    Incidentally, the specific reason I want this, rather than just using the Q3DSprite, is that my Q3DRendering is being done at a lower resolution than my C2 Layouts. I want my HUD overlay to be super crisp, while my Q3DMaster is fine at a lower resolution.

    I am curious about mapping Q3D objects to the 2D screen space as well. I am submitting a game to AirConsole, and one of their requirements is to show the nicknames of the players onscreen as text, rather than pre-rendered images. Right now I am using a Q3D sprite with pre-rendered text, but I need to be able change the text at runtime. The players are rendered in 3D, but there is no Q3D text, so I would like to use a standard Construct 2 Text object overlaid on the screen.

    Does anyone have a quick and easy way to map 3D space to the 2D screen so that I can label the players?

    Here's what I am looking to do:

  • Thanks for making something like this possible!

  • ...Does anyone have a quick and easy way to map 3D space to the 2D screen so that I can label the players?

    Here's what I am looking to do:

    cjbruce Q3D has a V-2.2 example called "Position & Rotation actions.capx" which should serve your needs.

    https://dl.dropboxusercontent.com/u/82947809/Q3D_Release_Examples/Q3D_V_2_2_Examples.zip

  • My very first Q3D test scene

    https://www.scirra.com/arcade/other-games/q3d-the-baked-room-scene-13979

    QuaziGNRLnose dear sir, would there be any way of accessing a mesh from the 3D scene?

    It would be nice if I could simply reference the walls that are already in a scene (not necessarily from another individual model) to add box colliders. Like maybe...

    ...so the "Model Meshname", if not empty (nor misspelled) *and* exists in the scene, would get used. Would be nice not having to recreate/re-position separate box colliders (for the floor and walls). Maybe a new "Q3D MeshBinder" plugin perhaps?

    Speaking of colliders, "Collider Fit: Model" doesn't seem to work.

    The boxes and the first platform (left) are primitives made by Q3D, the second platform (right) is from Blender whose (Q3D Model) collider fit property is set to "Model". The collider debug shows the correct size, but the box still falls through.

    Here is the .capx file (with the blender file in the Files Folder).

    http://crxmedia.com/test/ss/BoxColliderFitModelTest.capx

    EDIT: Changing the values here...

    ... to larger XYZ values would increase the BBox and solve the collision issue, at the cost of changing the size of the model and negating the intention for "Collider Fit: Model". Sadly this would mean that I have to key-in the dimensions for every wall (and endure the tedium of object placements).

    Here's hoping it's an easy fix.

  • QuaziGNRLnose

    Is there a simple demo on how to get a 3D character model (w/ walking animations) to work in a 2D environment?

    I couldn't find anything like this in the tutorials.

    So in a 2D environment the camera angle on the 3D character model would be locked to a diagonal view, the actual Player object will be a 2D invisible sprite that moves, and the 3D model will just position itself on top of this invisible sprite at all times - so 3D character model would be for appearance only.

  • My issues is that apply physics force to Z axis. the movement grid is X and Z and Y is Height. i can Move on X Axis. i can use local positioning but then is ignores Collision boxes. Pic of what i tried

    Pic of The Game

  • My very first Q3D test scene

    https://www.scirra.com/arcade/other-games/q3d-the-baked-room-scene-13979

    QuaziGNRLnose dear sir, would there be any way of accessing a mesh from the 3D scene?

    It would be nice if I could simply reference the walls that are already in a scene (not necessarily from another individual model) to add box colliders. Like maybe...

    ...so the "Model Meshname", if not empty (nor misspelled) *and* exists in the scene, would get used. Would be nice not having to recreate/re-position separate box colliders (for the floor and walls). Maybe a new "Q3D MeshBinder" plugin perhaps?

    Speaking of colliders, "Collider Fit: Model" doesn't seem to work.

    The boxes and the first platform (left) are primitives made by Q3D, the second platform (right) is from Blender whose (Q3D Model) collider fit property is set to "Model". The collider debug shows the correct size, but the box still falls through.

    Here is the .capx file (with the blender file in the Files Folder).

    http://crxmedia.com:9180/test/ss/BoxColliderFitModelTest.capx

    EDIT: Changing the values here...

    ... to larger XYZ values would increase the BBox and solve the collision issue, at the cost of changing the size of the model and negating the intention for "Collider Fit: Model". Sadly this would mean that I have to key-in the dimensions for every wall (and endure the tedium of object placements).

    Here's hoping it's an easy fix.

    Collider Fit is independent of physics, it sets up the collider for the "collision" actions that you can visualize with collider debug on the objects properties. Oimo Physics bodies have their own independent collider, which can be viewed with the appropriate debug option in the oimo physics behaviour.

  • My issues is that apply physics force to Z axis. the movement grid is X and Z and Y is Height. i can Move on X Axis. i can use local positioning but then is ignores Collision boxes. Pic of what i tried

    Pic of The Game

    Not sure what you're asking to be honest. It's best to avoid using the normal construct behaviors with Q3D objects as they aren't meant to work together (how are the 2D behaviours supposed to understand the 3D colliders they've never seen before). I see you have 2D physics and 8 Directions on some object, you should remove both of these and use "Q3D Oimo Physics", then implement the control logic with events. This is the only way Q3D supports any kind of understanding of 3D forces.

  • ...Collider Fit is independent of physics... ...Oimo Physics bodies have their own independent collider...

    QuaziGNRLnose

    Ah, indeed they ought to be different. Was fooled and couldn't immediately see the difference between the two, sorry.

    I can understand that the Oimo Physics collider shape is initially bound to DefaultShape0 and that one could simply create a separately-sized box (collider) shape for Oimo Physics, but shouldn't the physics behavior initially have its own separate box collider adhering to the size calculated by "Collider Fit: Model"? It only seems natural.

    QUESTION: Is there a Q3D Model expression so I could query the Collider Fit calculated width, depth and height -- so i could then automate the resizing of DefaultShape0 ?

    It's about automatically creating (physics-based) multi-level grounds and walls that have been sized and pre-positioned in Blender. Personally, it's hard for me to pretend that it's better to scale/position them in C2 when clearly, external 3D editors are purpose-built for these things -- depending on the game type of course

    Many thanks for the previous response, and nice work on the manual -- helps a lot!

  • I see you have 2D physics and 8 Directions on some object, you should remove both of these and use "Q3D Oimo Physics", then implement the control logic with events. This is the only way Q3D supports any kind of understanding of 3D forces.

    Thanks that fix my issue.

  • If you're wondering why your Q3D app isn't displaying properly on your smartphone (LG V10 in my case), try setting "Use high-DPI display" to "No".

    Also, don't use Chrome Beta for Android, touch controls are buggy for some strange reason.

    Now I can check Q3D performance on my smartphone (actual screenshot here).

    Feel free to post your phone's make/model and how many FPS you had.

    https://www.scirra.com/arcade/other-games/q3d-the-baked-room-scene-with-mobile-controls-13979

    LG V10

    Fullscreen = 43-46fps

    Non fullscreen = 53-60fps

    (lowest-highest fps)

    EDIT: Hmm... performance seem to vary according to the device's power management, such as when you drive around for 5 minutes and the smartphone start to heat up, thereby reducing thermal margin and the PM throttle's down the CPU/GPU. It's better when deployed as an Android (.apk) app.

    On the first try with Android OS 4+ (Lolliepop) (Webview), the app ran at 60fps like the Chrome browser app but running entirely in fullscreen with very little heat dissipation for more than 10 minutes. About 30 minutes later and it got only fairly-hot but not as extreme as when it was running in the actual Chrome browser app, however the FPS remained at 60FPS. After quitting and re-launching a few more test builds, it never went back to 60FPS (just around 39-45FPS). Strange.

    EDIT2: Found the main culprit that downgraded the speed. Now the .apk works PERFECTLY like I initially experienced. And the culprit in Intel XDK was this setting.

    Just uncheck it. The app will still run in fullscreen anyway -- but way faster (screenshot below).

    Feasibility test complete.

  • Has anyone been able to successfully texture a Q3DModel with the Paster plugin? I'm looking to dynamically write text on a model (loading the player's nickname at runtime, then pasting their nickname onto a model). I've tried the following so far, none of which work:

    Q3DModel -> Set Diffuse Map texture to Paster.imageURL (does not load the texture)

    and

    Q3DMaster -> *** TEXTURES / CREATE Create texture "nickname" using image file Paster.imageURL

    Q3DModel -> Set Diffuse Map texture to "nickname" (gives an error stating that the image file has not been loaded yet or does not exist at all)

    I've been able to successfully texture a Q3DSprite this way:

    Q3DSprite -> Load image from Paster.imageUrl (Resize to image size).

  • > ...Does anyone have a quick and easy way to map 3D space to the 2D screen so that I can label the players?

    >

    > Here's what I am looking to do:

    >

    >

    >

    cjbruce Q3D has a V-2.2 example called "Position & Rotation actions.capx" which should serve your needs.

    https://dl.dropboxusercontent.com/u/82947809/Q3D_Release_Examples/Q3D_V_2_2_Examples.zip

    Thanks for the link! I've been through the examples, and don't see how this helps. I've tried all of the expressions and haven't been able to find any expressions that map 3D screen space (x,y,z, with a perspective camera) to the 2D screen (x,y in flat screen space).

    I suspect that there is a linear algebra transformation that I'm not thinking of that will do the trick, but I can't seem to get anything to work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the link! I've been through the examples, and don't see how this helps. I've tried all of the expressions and haven't been able to find any expressions that map 3D screen space (x,y,z, with a perspective camera) to the 2D screen (x,y in flat screen space)....

    cjbruce Ah... I just realized that the example didn't actually return any screen space coordinates. It uses "container" to "pin" the text to the Q3D Model. Sorry, but you're right. Getting the screen coordinates for a Q3D object would be pretty useful indeed. Will let you know if i find anything as well.

    EDIT: Correction, the example does return screen space coordinates. Try adding an extra action to the existing example as shown here.

    Shows the screen space per Q3DModel by the .xw and .yw properties

    The only problem is that, it works if your Q3DMaster camera position is static. You'll have to account/calculate the new screen space manually when the camera moves, which I guess you're probably already aware of

  • QuaziGNRLnose

    Is there a simple demo on how to get a 3D character model (w/ walking animations) to work in a 2D environment?

    I couldn't find anything like this in the tutorials.

    So in a 2D environment the camera angle on the 3D character model would be locked to a diagonal view, the actual Player object will be a 2D invisible sprite that moves, and the 3D model will just position itself on top of this invisible sprite at all times - so 3D character model would be for appearance only.

    There's no tutorial, you'll have to create a Q3Dmodel, bones/animations etc. and position it in a location with a transparent Q3D master using "inside mode", then move a camera to the proper location to line up all the views. This is also limited in that you'll have to have all 3D elements on the same "layer" in the 2D environment. It'd be better to build the game using Q3D models/sprites etc and make Q3D handle the rendering, if you wanted more control and simpler set up. If it's too late to do this, you can only go for the "single 3D layer".

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