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

  • 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".

  • 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

    fuego96, thanks for looking into this! I do have a camera that pans around, changes direction, and moves in and out to follow the characters, so I was having a tough time determining what the .xw and .yw expressions were actually giving me. Maybe when I'm done with this project I'll take another crack at the math.

  • 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.

    Badmiracle,

    Since you are just using the 3D model for appearance only, could you pre-render your 3D animations, then import them into a 2D sprite strip in Construct 2? There are a number of good tutorials on this, and you will save a lot of CPU time (at the expense of download time and memory).

  • Hi,

    has anyone figured out the following yet:

    Objects involved:

    Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

    Render outcome instead:

    Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.

    Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

    Thanks & cheers!

  • Hi,

    has anyone figured out the following yet:

    Objects involved:

    Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

    Render outcome instead:

    Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.

    Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

    Thanks & cheers!

    This is a standard problem with alpha in 3D rendering. you can get around it by playing with the depth settings (depthTest and depthWrite).

  • > Hi,

    >

    > has anyone figured out the following yet:

    >

    > Objects involved:

    >

    >

    >

    > Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

    >

    >

    >

    > Render outcome instead:

    >

    >

    >

    > Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.

    > Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

    >

    > Thanks & cheers!

    >

    This is a standard problem with alpha in 3D rendering. you can get around it by playing with the depth settings (depthTest and depthWrite).

    Thanks. I was hoping that there was an out-of-the box approach. Disabling depth writing helps, but still renders the sprites on top of the geometry. I probably will have to render 2 passes, first sprites, then geometry.

    Talking geometry, is there a quick way to access ExtrudeGeometry? I'd like to use this to draw a 2D polygon, then feed the vertices to the function and create a 3D shape. Right now there's only primitive shapes for creation in Q3DMaster.

    Cheers!

  • Just thought I'd post this thing here since it uses Q3D.

    https://www.scirra.com/arcade/other-gam ... gain-15356

    Long story short, I found a rather simple way to mod the Scirra audio plugin to play MP3's from another site. For folks who are interested, the long story is in this forum thread.

    https://www.scirra.com/forum/viewtopic.php?f=146&t=80373&start=10

    Enojy.

  • QuaziGNRLnose One question,

    Q3D imports .JS and the textures are added in the C2 object as animations like diffuse, normal,etc... working also the frames for texture animations, but they also will works for .OBJ/.Mtl? Played the OGRE and the FPS thing and they use .js.

    And if an OBJ-JS use multiples textures for the diffuse, etc... , How i can set it to the model? I not found any .doc or example that how do it.

  • Try Construct 3

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

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

    Loading materials regardless of model filetype is done the same way: using specially named animations.

    You can find a list of the animation naming that is supported in the (incomplete) documentation : https://www.dropbox.com/s/vpn0mbh4m7lo9 ... .docx?dl=0

    .mtl files aren't really supported, and material info in .js files is poorly supported as well. This is because of poor standardization, there's no "useful" way to support them since material properties generally don't operate under some standard shader model across all platforms, so they're not very useful in Q3D / three.js.

  • matriax

    Loading materials regardless of model filetype is done the same way: using specially named animations.

    You can find a list of the animation naming that is supported in the (incomplete) documentation : https://www.dropbox.com/s/vpn0mbh4m7lo9 ... .docx?dl=0

    .mtl files aren't really supported, and material info in .js files is poorly supported as well. This is because of poor standardization, there's no "useful" way to support them since material properties generally don't operate under some standard shader model across all platforms, so they're not very useful in Q3D / three.js.

    QuaziGNRLnose,

    This documentation is fantastic! Yes, it has sections that are not finished, but everything is extremely clear and well-written! I recommend including it on the first post of the thread.

  • So, just a question, does this engine support any kind of NPR shading? Cell-shading?

  • QuaziGNRLnose,

    Have you given any thought to porting Q3D over to Construct 3?

  • tunepunk, I took the liberty of shifting your question from a different thread over to here, where it makes more sense.

    [quote:60t88i9p]@tunepunk

    Good job. I bought Q3D as well to try out, but the lack of documentation, and tutorials made me give up, especially since editing levels and such was really painful in the Construct 2 environment. How did you overcome that?

    I started the project thinking that I would make a simulator for our school's robotics team for its "Robot Rumble" competition. After playing around with Q3D and the AirConsole plugin for about a week, I realized that by working with students, we would have enough manpower to create an actual game.

    Initially, I used a a combination of brute force (looking at all the examples and trying things), but then I asked for help from QuaziGNRLnose, who was awesome and super-knowledgeable. I wasn't trying to make a first person shooter (they aren't a good fit for smartphones anyway). Instead, we were making a "BattleBots"-style game where you don't need a lot of buttons or analog sticks. This meant that we could use a simplified version of the "Tiny Tanks" demo mechanics. We didn't even need a suspension system for the robots, just a box with four wheels. From there, it was just a matter of building out a simple platform and weapon.

    All in all, it involved a lot of trial and error and learning, but I did the event sheets myself in my spare time (approximately 2 hours/day = 100 hours total) and had a working version of the game in 2 months.

    The new documentation is technically incomplete (it doesn't cover physics), but is still extremely helpful. I wish it had been available when I started back in October, but I have learned a ton from it even after finishing the game. I knew nothing about 3D games at the start of the project, and I'm now confident that I could make pretty much anything I want in Construct 2.

  • QuaziGNRLnose

    I just completed a new Q3D tutorial:

    https://www.scirra.com/tutorials/9456/building-your-first-3d-game-with-the-q3d-plugin

    Would you mind taking a look for errors?

  • tunepunk,

    I realized I never really answered your question above -- sorry!

    Trying to make a 3D game with a 2D layout editor is a pain in the neck. For Robot Rumble I made the mistake of laying everything out in a side view rather than a top-down view. This meant that I had to do a lot of trial and error to figure out how everything would look when my camera was top-down.

    In the tutorial I intentionally did a top-down layout for the top-down camera. This way it is a lot easier to manually place items. I recommend setting the (x,y) position and the (x width,y width) size in the editor, then creating an in-game camera that you can move around, and tweaking the z-size and z-position of the objects according to what looks right.

    TL:DR

    For a top-down game, use a top-down layout in the C2 editor.

    For a side-scrolling game, use a side view layout in the C2 editor.

    For a 1st-person or 3rd-person game, use a top-down layout in the C2 editor.

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