TwoCatsYelling Posted May 10, 2020 Share Posted May 10, 2020 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 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 10, 2020 Share Posted May 10, 2020 This may not help but I've had issues with scaling in Max where Leadwerks applied a scale to it in the editor, even though I didn't want it to. I ended up editing the vertices themselves and scaling the model that way. Maybe give that a shot. Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted May 10, 2020 Share Posted May 10, 2020 Another option is to make a box in the Leadwerks editor to the size you intend your dungeon room to be. Now go to the File menu and select "Export". Export your box in an obj file and save it. Now import this box into Blender. You now have a box the size you need as a reference for your dungeon room. 1 Quote Link to comment Share on other sites More sharing options...
TwoCatsYelling Posted May 10, 2020 Author Share Posted May 10, 2020 @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! 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 10, 2020 Share Posted May 10, 2020 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). Quote Link to comment Share on other sites More sharing options...
reepblue Posted May 10, 2020 Share Posted May 10, 2020 This was my output settings with Blender 2.79b Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
TwoCatsYelling Posted May 11, 2020 Author Share Posted May 11, 2020 @reepblue Same settings I'm using in Blender. So weird. Quote Link to comment Share on other sites More sharing options...
Daemoc Posted May 11, 2020 Share Posted May 11, 2020 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. Quote Link to comment Share on other sites More sharing options...
reepblue Posted May 11, 2020 Share Posted May 11, 2020 Make sure you apply your scale under the Object tab in blender. Refer to my blog post about custom shapes for more information. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Daemoc Posted May 11, 2020 Share Posted May 11, 2020 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. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 11, 2020 Share Posted May 11, 2020 Again, as I said above, have you made sure your unit scale is set to meters? The default in 3DS Max is centimeters. 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. 1 Quote Link to comment Share on other sites More sharing options...
reepblue Posted May 12, 2020 Share Posted May 12, 2020 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. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
TwoCatsYelling Posted May 14, 2020 Author Share Posted May 14, 2020 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 20, 2020 Share Posted August 20, 2020 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. Quote 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 More sharing options...
Recommended Posts
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.