fuego96's Forum Posts

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

  • X3M Issue report.

    I am getting zero values for Mesh.MeshPosX, Y and Z -- again.

    You've made fixes to this before in v0.4 but were somehow not applied to v0.5. Here's a hint.

    (The screenshot above are the runtime.js for the plugins MeshArray and Mesh respectively)

    Please do have this in v0.6

  • X3M Issue report.

    The behavior of Mesh.MeshSetRotation() is the same as Mesh.RotateMeshBy().

    I need a mesh to follow the exact orientation of another mesh with every tick. But MeshSetRotation() adds to the previous angular values, just like RotateMeshBy().

    Is this normal?

    (Or is there a way that I have yet to pick up on?)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...@twg You attached the camera to controls? In this case if you move around with the keys and rotate the camera with mouse can you see anything?

    twg Ditto what matriax said. It's likely just behind the camera (if you didn't get any errors). Also just in case it's a lack of lighting or lack of texturing issue, set the Scene object's debug enabled property to True. During your preview, the debug options will appear and allow you to set the rendering mode to wireframe. And to see if your mesh exists in the scene at all, checkmark the "Mesh Tree" option.

  • X3M Just FYI, I've created an anim via NewScene and OBJJS-Mesh as per your previous instructions and here's the error.

    I've double-checked my model and bones many times. Even tested it in pure BJS without problems.

    http://crxmedia.com:9180/test/anim

    (The skeleton is indeed driving the worm mesh)

    It is understood that by B3D version 0.6 it would be working better, but just know that the (OBJJS-Mesh, Babylon Skeleton) "Create animation range named..." action currently doesn't work. Looking forward to version 0.6 (really need skeletal animation).

  • Whats the name you have given to the worm mesh ?

    X3M The mesh names are from the green tip with the eyes to the blue tail:

    cy0, cy1, cy2, cy3, cy4, cy5

    All of them are children of "Armature".

  • 1- Create a mesh instance for the worm

    2- Apply a skeleton behavior to the mesh

    3- Create animation range

    4- Play it

    I saw that the Skeleton behavior belonged to a mesh category (which is why i said that it kinda' didn't make sense during my tests).

    The reason for saying this is that the SkeletonCreateAnimRange function needed to access the mesh.skeleton data. A null value was being returned, thus throwing the JS error, meaning that the mesh object (of mesh.skeleton) needed to refer to the root level of the model file as the "skeletons" property resided there.

    Strange that the Scene object, which already has the full model data to begin with, couldn't simply be re-used (note that I prefer loading an entire scene with models, anims etc.). The above solution only loads an instance of the worm.js file into a separate OBJ-JS Mesh so as to circumvent the JS error.

    Anyway, I'll take that solution (maybe). Many thanks!

    Testing...

  • ...It's simple, you create an animation range (ex: "Walk" from 0 to 20) And then you play it using Begin animation range...

    So, am i right in adding the Skeleton behavior to the Scene object?

    It doesn't seem right to add it to Mesh objects (the browser gives a "could not find the skeleton property of null" sort of error).

    As with your explanation, the "Create animation range" bit was easy to figure out, but I get:

    I am also not confident if my babylon data is sane. Would you mind taking a look?

    http://crxmedia.com/test/ss/worm.babylon

    Basically, the file does have a "skeletons" property which is an array of objects. Each object does indeed have bones and each bone has 30 frames (so, range from 0 to 30). And at the end of the "skeletons" property, there is a "ranges" property (defined in Blender) named "MoveForward".

    So I also assumed that the "Create animation range" can also refer to "MoveForward" that was defined in Blender. Is that right?

    Btw, worm.babylon look like this.

    If that's the babylon file is sane and my process was right, then perhaps I just need an updated version of B3D

  • X3M I'm testing out skeletal animations. Currently, it's a lot of trial and error because I have no idea what the setup procedure in C2 is:

    1. Camera --> (Babylon Animation) Begin animation?

    2. Mesh --> (Babylon Animation) Begin animation?

    3. Mesh + (Behavior) Skeleton --> (Babylon Skeleton) Begin animation range?

    4. Scene + (Behavior) Skeleton --> (Babylon Skeleton) Begin animation range?

    For now I get JS errors and assume my procedure is totally wrong. I think the armature and animation names I had defined in the .babylon file is probably right as I had checked the animation range, name entries etc. in Notepad ++ and they do exist.

    Question: Do you have a quick and dirty .capx to show how animated-meshes are setup for playback?

    Meanwhile, I'll go and read up how it's done using pure BabylonJS to get an idea, but it must be quicker if you just summarized the procedure.

  • ...with their texture UVmap for all the faces, some kit for fast prototyping. I started with the Box, but i can't get the blender create me the UVmap like this:

    https://stinkyipod.files.wordpress.com/ ... /crate.jpg

    Why is all too complicated in 3D? XD

    The crate is easy, it's just a matter of knowing how to get around the software (any software for that matter) <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":-)" title="Smile">

    I agree that it's not everyone's cup of tea.

  • fuego96 Hey great demo! The baked lights looks great.

    Thx!

    Is there anyway to bake all the shadows of the scene in a single texture, 2048x2048 or whatever, and add some filter blur in photoshop and apply this texture in the scene in some way?

    Yes there is. But it would mean having all meshes share the same 2048x2048 texture space, effectively reducing texture (or in this case, shadow) resolution for each mesh. In the baked2k room case, I decided not to share and so each mesh (ceiling, floor, walls x 4) gets its own 2K texture (that includes the shadow).

    Most 3D software would be able to render just the shadow map which in turn can be used as an "on/off" dynamic shadow (non moving). A transparency map would be one way to apply the shadow. Ideally, you would want the 3D software to render even the shadows as they are of higher fidelity (if photo-realism is your thing).

  • fuego96 If you leave the tab and return, the locking will slightly go loose

    Oh, okay. Refresh browser until you see extra green text.

  • fuego96 You are actually rotating the camera on the WORLD axis,

    LOCAL axis is only used when you set a parent for your object, since the child inherits the parent rotation, you can rotate it around its LOCAL axis. Example : A door and its hinge.

    I see. Well, at least it didn't explode...

    I'm a actually hitting the roof with my head or are you locking the vertical tilt ?

    Yes, i'm locking the "vertical tilt" (what is commonly referred to as the "pitch", from the pitch, roll and yaw standard). But wait, you're hitting the ceiling? You mean it's not behaving like this (short video capture)? Are you sure the Spacebar isn't stuck? (it still allows strafe up).

  • As for the camera.rotate issue, the lastest version of the library has made some changes, they basically dropped some functions including .rotate( , so I'll need to rewrite those functions.

    X3M Don't mind me, i'm here to post issues in a more "hey X3M, i found this..." manner Not really expecting an immediate fix. I have ways to work around (or sacrifice game features).

    But you might be interested to know that BJS'es .rotate method still works for meshes. Just not for cameras. And since .cameraRotation already implies BABYLON.Space.LOCAL, the only part you'd need to figure out is WORLD.

    Already did this as a workaround for LOCAL an hour ago (for bablylonCamera\runtime.js).

    And it works just fine. Here I'm restricting the Camera's pitch as i only want yaw (left and right).

    http://crxmedia.com:9180/test/baked2k

    BTW, the above is just a baked texture test. The ceiling, floor and all the walls are each 2K textures (2048x2048). Will try 4K just for the heck of it to see if it breaks. Yes, I'm aware that it's not good for mobile (but my target deployment is for a single high-end desktop PC and projected to a very large outdoor display).

    Anyway, the usual WASD movement keys apply.

  • fuego96 I already reported this issues weeks ago, also happens with the light and other plugins, at least when was reported. I guess he is focusing in other plugins an get all works like have to be or i hope for the 0.6 after the last news.

    matriax From the surface, the names of those Babylon Matrix operations sounds basic enough that anyone who paid for the B3D plugin would likely use them. Surprising they don't work. Maybe they worked once before? I don't know. I can see from the plugins\babylonCamera\runtime.js that it's implemented. However babylon.js (the library) just doesn't accept it (thus the error).

    Removing C2 and the B3D plugin from the equation and learning the basics of creating a BabylonJS scene (from http://www.babylonjs-playground.com) purely from JS and rotating a mesh (ie. box.rotate in line 13), i later added a camera.rotate at line 17 and sure enough, it didn't work (Compilation error... camera.rotate is not a function).

    Therefore, I'm just going to assume that it's not a B3D issue and that the list of actions (I encircled in red previously) simply be omitted from the "Babylon Matrix" section. Just like how it is with Mesh and NewMesh (they don't have those actions either).

    Although strangely enough, the babylon.js library does recognize mesh.rotate (as I tried earlier in line 13).

    No biggie. There are workarounds.