Jump to content

Leadwerks Units


SlipperyBrick
 Share

Recommended Posts

Just a suggestion that isn't really that important but it would really help in regards to modelling. Can the units in Leadwerks be changed to something more real world?

 

1 game unit = 1cm.

 

This would make it so easy to model or even use CSG to make game levels. Even adding the ability to change Leadwerks units would be awesome.

Link to comment
Share on other sites

Textures often contain details that should be lined up with actual geometry like windows, doors, etc. Textures are always power-of-two sized. Thus, the grid uses major lines every 8th line and doubles/halves in size every time you hit the [ ] keys/

 

By default, a 1024x1024 texture should fill up a wall. A wall, in broad terms, is roughly 2.5 meters tall. If I used a meter grid and a texture mapping scale that mapped 1024 texels / 2.5 meters there would be two issues:

  • You would have to know to create your walls at one of the minor grid lines (0.5 meters), which is unintuitive.
  • It would be impossible to line up features in the texture with real world geometry. The grid lines would fall at measurements like 0.25, 0.5, 0.75, 1.0, 1.25, and since the mapping scale is 1024 texels per 2.5 units, you would not be able to line things up. For example, let's say there is a texel at position 128 on the texture. This is 1/8 the width. 1/8 * 2.5 = 0.3125. This does not correspond at all to the measurements the grid falls on, so it is impossible to line up.

 

On the other hand, if we simply display a centimeters grid without changing any actual sizes, things work out really nicely. 256 centimeters is a power-of-two number that is roughly the height of a wall, so our texture mapping scale can be 1024 texels per 256 cm. Now it is easy to line details in the texture up with geometry, because the grid falls along measurements like 8,16,32,64,96,128 etc. Without this it would be impossible to create details like this:

 

post-1-0-90782600-1474550616.jpg

 

When you can just sketch out your map geometry like that and have things magically line up, it makes mapping fun. This is what the template textures are provided for.

  • Upvote 1

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

I do remember you saying this a while back when introducing the mapping standards post.

 

This is awesome for CSG and clearly works really well when mapping with CSG, thats where Leadwerks really shines is it's mapping tools. The speed and ease of use you have with Leadwerks when making a map I've not seen it anywhere in any other engine.

 

If you are modelling things though the measurements just seem a little strange. It would be easier to have a setup like 1 unit = 1cm but now knowing the reason behind the current measurements I think the original suggestion is redundant haha.

 

The only reason I brought it up was because I seemed to struggle to get a good set of measurements for my level a couple of days ago. I just couldn't get my map to look right from the players perspective, either thing's felt/looked to small or they seemed to big.

 

I've not really added other elements to my level, this was really just a simple map that had walls and a floor and ceiling so it was a bit to early to judge that kind of thing anyway.

 

Thanks for the info Josh. It all makes perfect sense now :D

Link to comment
Share on other sites

The only reason I brought it up was because I seemed to struggle to get a good set of measurements for my level a couple of days ago. I just couldn't get my map to look right from the players perspective, either thing's felt/looked to small or they seemed to big.
Suggest playing around with the camera's FOV. The default is 90 degrees. It's 70 degrees if using fpsplayer script which sometimes seems restrictive in some scenes depending on your screen's aspect ratio or your window's resolution.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

  • 2 weeks later...

I mostly refer as scale based on a character size. Since you can export a brush from the editor. Create a brush to cover a single character, and export that brush.

 

I use that box as a reference in your modeling application. Most of the time the character size I assume is 6 feet. This always worked great when I was making models for a game.

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