Babylon Coordinate Unit

Recommended Posts

What is the unit of measure for the coordinate system in Babylon? I'm trying to convert and scale from unreal engine, and I know that 16uu = 1ft.

Share on other sites

There is no unit of measure per se. Once you created a mesh (let's say a box), you determine your own unit because every mesh is relative to others

Do you see what I mean?

Share on other sites

I do, but I'm not sure how I can properly convert a scene from one engine to another without being able to convert between the units because scale and location will be altered.

1ft,1ft,1ft is much different from 1m,1m,1m

Overall, my goal is to combine several unreal scenes into a single Babylon scene. I want to be able to define a local coordinate systems within the bounding boxes of the terrain surfaces so I'm not working with huge global positions, and I can more easily compartmentalize the huge scene. I doubt there's a current way to do this, but it doesn't hurt to ask. Either way, my first step is to be able to convert from unreal to Babylon. We're currently exporting to an OBJ file for the raw models, but then cloning everything as needed to save memory since some objects are repeated 20~30 times.

Share on other sites

you can for instance consider that your reference is 1unit=1m for babylon. With this reference, you can scale all the imported scene

Share on other sites

I'll give this a try tonight. Pulling my hair out trying to get this scene to behave without duplicating all the map objects as "unique" items and wasting resources.

Share on other sites

Why do you need to duplicate objects?

Share on other sites

the same tree for example is used 5~6 times on the map, and some training dummies are used about 10 times. Those are just a couple examples. These are pretty big scenes with around 1000 items per map.

Share on other sites

You could use the mesh.clone() function to avoid duplicating resources

Share on other sites

That's what I'm using, and that's why i'm having a hard time because I have to make sure the coordinates all line up. I could obviously bake all the items and their duplicates into the OBJ files to make things easier, but I don't want to waste the resources.

Agree

Share on other sites

• 7 months later...

Hello,

If we consider that 1 unit = 1 meter, is it coherent with the physic engine and the light calculation?

Thanks

Share on other sites

For instance in Blender we can set the modeling unit to meters, if we export the scene to Babylon, will the calculations be ok?

Share on other sites

Babylon has no unit of measure. The unit are what you want

Share on other sites

• 7 months later...

Hello,

If we consider that 1 unit = 1 meter, is it coherent with the physic engine and the light calculation?

Thanks

For physics engine you may want to be careful with gravity value since it must be coherent with your unit. 9.81 is correct if your unit is meter otherwise you have to convert 9.81 to the right value. If 1 unit = 1 cm then gravity should be set to 981.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.