Jump to content

Blender > LW scaling issue


TwoCatsYelling
 Share

Recommended Posts

Hello,
So, working on creating a test "modular dungeon set" for Leadwerks and, upon importing my first piece, have hit a roadblock.

In short, the scaling is off in LW. I've tried using the exporter for leadwerks linked on these forums, but Blender 2.8 doesn't seem to recognize it. I've also checked the scaling per forum threads, but couldn't find anything explaining this issue (also I'm pretty sure Josh said somewhere that LW should automatically address things like that now?)

Anyway... pictures a worth a thousand words and all that, so here's a couple screencaps, one of the model in Blender, and another of the same model in LW. You'll see in the Blender shot that the dimensions are even numbers. But for some reason, in the LW shot, you see that the object is off-grid at one end. Scale and location are all applied in Blender, export scale for FBX is 1.0 so it's not happening there, either.

Thanks :)

 

AlignIssue-2.JPG

AlignIssue-1.JPG

Link to comment
Share on other sites

@gamecreator - I considered just doing that, but then the thought occurred to me "is this going to be necessary for every single asset I bring over?" I couldn't believe the answer could be yes lol. That's why I asked here.

@Thirsty Panther I'll give that a shot. It's not ideal, but a scale reference would be helpful in any case. I'm not able to get the player or monster models to import into Blender as .obj's. Hopefully the blocks will work.

Will update either way :)

Thanks!

  • Like 1
Link to comment
Share on other sites

28 minutes ago, TwoCatsYelling said:

@gamecreator - I considered just doing that, but then the thought occurred to me "is this going to be necessary for every single asset I bring over?" I couldn't believe the answer could be yes lol. That's why I asked here.

Usually you can just use the Resize option in the Model Editor.  Also, check to make sure you have the right unit settings in Blender (I use Max but I'm guessing Blender has it too).

Link to comment
Share on other sites

You might want to check and make sure the editor is not auto-scaling the model after import. I had this same issue, and if I remember correctly, it was the game editor itself re-scaling the model. It has been so long since I have messed with this I can not remember where the setting was, but the fix was in the editor.

Somewhere in the model properties if I recall.

Link to comment
Share on other sites

I remember now. It was in the model editor. Under the tools section.

For some reason it was auto selecting "fit" rather than "scale". Just select "scale" and set it to 100%.

Another odd thing I found was the import process was expecting centimeters and auto-scaling to meters. As a result I had to export everything at 10% for the scale to be correct at 100% in the model editor.

I was using .FBX but I was not using blender though, so the last part might not apply to you.

Link to comment
Share on other sites

Again, as I said above, have you made sure your unit scale is set to meters?  The default in 3DS Max is centimeters.
scale.jpg.45b9475f9c1fcf7dc37c576424618cdc.jpg

You also probably know that for some bizarre reason Leadwerks divides grids into multiples of 32, not 10 (yes, I know this is texture-related but it's dumb).  And I couldn't find an option to change it to a normal 1m grid.  So that first picture of TwoCatsYelling will never snap properly anyway.

  • Thanks 1
Link to comment
Share on other sites

12 hours ago, gamecreator said:

You also probably know that for some bizarre reason Leadwerks divides grids into multiples of 32, not 10 (yes, I know this is texture-related but it's dumb).  And I couldn't find an option to change it to a normal 1m grid.  So that first picture of TwoCatsYelling will never snap properly anyway.

That actually makes more sense if you're coming from something quake based.  

But yeah, the models have to be dividable by 2 inorder for it to snap correctly. 2.56m is the height of a wall.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

On 5/12/2020 at 8:15 AM, reepblue said:

That actually makes more sense if you're coming from something quake based.  

But yeah, the models have to be dividable by 2 inorder for it to snap correctly. 2.56m is the height of a wall.

This has turned out to be very helpful to me.

I basically "rounded" the dimensions to the nearest "even number" based on increments of 2.56m.

So, instead of 10 meters long, it's now 10.24. Instead of 4 meters tall, it's 5.12, and so forth. It's lining up perfectly in LW.

Now I'm just contending with the issue of the material not wanting to map properly to the revised version lol.. Always something. I'll figure it out though.

Link to comment
Share on other sites

  • 3 months later...
On 5/12/2020 at 3:15 PM, reepblue said:

That actually makes more sense if you're coming from something quake based.  

But yeah, the models have to be dividable by 2 inorder for it to snap correctly. 2.56m is the height of a wall.

The reason for this is because textures are powers of two and they need to line up precisely to scene geometry made with CSG brushes.

There is a setting in the viewport options that lets you change this to a 10-based grid, or any other number.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

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