Jump to content

From Blender to Leadwerks With Same Sized Geometry


Monkey Frog Studio
 Share

Recommended Posts

Hello!

I've been slowly moving from my old 3D modeling app to using Blender, so I am in a learning state. I've been testing exporting base models from Blender into Leadwerks to get my art pipeline nailed down. After learning how to get FBX files from Blender into Leadwerks textured, the next step was to get objects from Blender into Leadwerks at the correct size! This took me a little bit to figure out, but was actually pretty simple to setup and understand once I got there. So, I thought I would share my current Blender setup with all of you just in case it might be helpful to someone.

What I wanted to achieve was a grid and scale in Blender that matched the default grid in Leadworks. My goal was to create a "unit" cube, exported from Blender, that would match a cube of the same size created in Leadwerks. In Leadwerks I created a cube that was 256cm x 256cm x 256cm. This would perfectly fill one default grid square (with 8x8 smaller grid divisions per default grid). I wanted a 256cm x 256cm x 256 cm cube, created in Blender, to be the exact same size in Leadwerks. It took some fiddling, but here is what I set in Blender to make it all work:

Press N to open the right-side panel, go to Display and change the following settings for Grid Floor:

- Lines: 16
- Scale: 0.64
- Subdivisions: 8

Go to the Scene tab and go down to Unit Presets:

- Length: Metric
- Angle: Degrees
- Unit Scale: 1.0

When exporting to FBX, the only change you'll need to make is to set SCALE to 0.50, otherwise the model will come in twice as large. Remember, the goal here is to have the geometry the same size in Blender as in Leadwerks.

The Grid Floor settings create a grid like the one in Leadwerks. Since game engines typically like things in a power of two (2, 4, 6, 8, 16, etc.), most game editor grids have only 8 subdivisions. 16 lines gave me four complete "main" grids to guide me. You can increase this to make them larger, but I would do so by a power of two. So, since it's at 16 right now, the next step would be 32, etc. A scale of 0.64 allows a cube, for example, to be created at exactly 256cm (2.56m), matching the size of the one in Leadwerks and exactly filling one main grid square. With this done, the base cube imports into Leadwerks at exactly the correct size and snaps perfectly to the grid. 

Now, I am sure there are other ways to do this. My main goal was to get a same sized object out of Blender and into Leadwerks. This way I can work in Blender, creating level pieces, and knowing that they will work correctly in Leadwerks with it's grid system and with any pieces I create using Leadwerks CSG shapes. 

I hope this helps someone. I know I had a heck of a time trying to find help with this via a Google search, so I had to experiment and come up with my own way. Perhaps this will help someone and keep them from having to pull out their hair. ;)

Creating professional 2D and 3D content is my passion!
Monkey Frog Studio

Link to comment
Share on other sites

  • 4 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...