Babylon3D: Standard Edition

From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • matriax No you just need to import the .OBJ file and its .MTL along with the pictures.

  • matriax No you just need to import the .OBJ file and its .MTL along with the pictures.

    Yep, i imported the cube.obj, the cube.mtl and the cubewrap.png for de diffuse texture but not seems to work. The OBJ is loaded but not the texture.

    I wonder if there is any way to add all the .OBJ info in the C2 layout object without import any file, since the textures can be added in the object as diffuse,bump,specular animations like we already do for NewMesh... and the .obj and .mtl are plain text and maybe copy and paste in to some field in the left tab property. So with that we can copy that object and paste in any project and will work.

    I don't know if there will be any other solution to do that more easy.

  • matriax Then your .mtl file is faulty, when you export an .obj model, Blender sets the directory url in which your pictures reside inside the .mtl file, so check your mtl file with notepad and make sure that the path link to the picture is absolut, like this : Rock-Texture-Surface.jpg

    There should be no C:\User\Documtents... inside the file.

    Read this : https://developer.blender.org/T28621

  • X3M Ops! You're right sorry! :S now works correctly.

    Any chances to get the .OBJ file working only with the object in the C2 layout like i said? Adding the textures as in NewMesh objects and the .OBJ .MTL as text in some field or whatever?

  • matriax Nah thats not practical

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • matriax Nah thats not practical

    Mmm... what about some options on NewMesh.Object?

    New mesh properties

    Type: Box, Torus... and add another called "Custom" on the list.

    And at the end of the "New mesh properties":

    [Custom] .Obj

    [Custom] .Mtl

    To add the text content of the .obj and the .mtl.

    That's it!, because for NewMesh we already have the textures of diffuse,bump,etc.. on the object.

    So, we can have a totally custom 3d model in a single object on the C2 layout, without import any file and easy to share or copy/paste between our projects or share with other people. I mean, if somebody shares their own models, if i want one simply copy and paste the object into my 3dlibrary.capx to use in the future.

  • matriax Thats not how things work, its not as simple as you think.

  • X3M I guess, first C2 need to have the tools to give you the way to get the .obj/.mtl correctly from the field and after that find some way to get the code and build the files or a way to create the mesh using that information.

    I know this is not simple, in fact maybe is impossible but with the things i saw how all works is the unique way i found to do that, but in my opinion can give us a more flexible way to work and do things.

    1

    Imagine i share my own library, if somebody like all the models i have on it, for example 50, they only have to select all, copy and paste in their own project and they will be ready to use.

    2

    Now we have to import the files: Obj+Mat+Texture maps. That can be 5 or more files for each model that we will have to organize in the imported files tab. After that we will have to create 50 OBJ.objects in the C2 layout and one by one set the correct name of the .OBJ or .JS model imported.

    Also with the different libraries of the people they can have repeated the model/material/texture names so in that case we will have to rename it to Stairs1.obj, Stairs2.obj, stairs2.mtl, stairs2.png etc... a thing we avoid in the other way because there is no .obj/.mtl/ textures names.

    And for manage add/remove models. We have to remove the object in the C2 layout and search in the imported files the ones associated.

  • Hey, hi X3M... i was thinking to some new features you could add int the next releases (if you think can be feasible and useful)

    1) Billboard 2/3D sprites, that can be used for 2.5 games or other effects

    2) Customizable pivot points in c2 image editor for meshes and other objects

    3) XYZ axis debug helper and grid

    What do you think?

  • matriax It would've been possible if C2 had a text editor property. I really like the idea of a pasting text instead of loading external files, it would be awesome for people to share 3D models just by copying pasting stuff. But unfortunatly, for now, its not possible.

    vurzu 1) Sprites are already in my todo list.

    2) I'll see if I can manage to do it. There must be someway to get the pivot XY from image editor.

    3) Do you mean an axis helper on the C2 editor or while running the game ?

  • 1)/2) Great!

    3) I mean an axis helper on running the game as in Q3D plugin

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

  • fuego96 I can't share anything right now because we don't have the same version.

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

    If you have multiple ranges (ex: "Walk" from 0 to 20 and "Run" from 21 to 40) , then you should activate blending before playing the animations.

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

  • fuego96 The Skeleton Behavior should be applied to a Mesh , look at the picture :

    Every behavior belongs to a category.

    1- Create a mesh instance for the worm

    2- Apply a skeleton behavior to the mesh

    3- Create animation range

    4- Play it

    Whats the name you have given to the worm mesh ?

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