Jump to content

Guest Mauler

Recommended Posts

Guest Mauler

Level Of Detail Model tutorial

Explanation of what LOD is!! - 

 

LOD means that the game uses a lower poly (read: less complex) version of a mesh for displaying an object at distance. That means that as objects get further away from the camera, the game switches out the high-detail mesh that it uses for close-up rendering out with a low-detail mesh that it uses for far-away rendering. It is a way to save the video card having to render extra polygons when they may not be necessary, and a way to save video memory by using lower resolution textures on those low-detail meshes.

 

Here is an example of the HLOD model of the GDI Hummvee, The image shows us the amount of polys and what distance the model will render at... The HLOD system is also used when the settings are set lower to provide better performance.. the engine will choose an appropriate level of detail depending on what the slider is set to in the configuration menu...

HLOD_EXAMPLE.jpg

 

 

To create a new HLOD model, we will need 4 models.. You can add addition models but 4 is a good number to start with

 

For this tutorial I will be using a tiberium crystal model that was orginally created for TCW and is in use across different maps on UltraAOW, You can get the example file used here

 

Let's begin!

 

LOD1.jpg

 

First thing you notice I have 4 different models spread across the y-axis... and for mesh models "mcryXX" etc.. at the end of each mesh name is followed by a .00 .01 .02 etc.. The highest poly model you wish to display must be centered at 0,0,0, on the XYZ axis.. the remainder can be spread across the y-axis like mine is... the only one that matters is that .00 model.. It must be centered in the world axis.. the other files will be originated at the highest poly model on export anyway..

 

When done creating your model you will need to create " Origin " bones for level. As you can see above the small box centered to each level is a Origin box, and then each of the different level Origin box is linked to the proper 00, 01, 02, 03 level meshes

 

LOD2.jpg

 

When I create LOD models, I tend to create the highest poly mesh and simply clone it and move it aside to create and edit lower poly meshes... you can edit the material, vertexs, faces, or anything to create a lower polygon model of the highest mesh

 

Here are the settings I used for the Origin bones and the actual mesh of the crystals, you can also take a look at the file provided for reference, I did not apply collisions to the actual crystal as I did not want the model to interfere with bullets,characters,vehicles... You can however change it to your preferences..

 

LOD3.jpg

 

Once all the Origins, Meshes are completed, you can now export the model to W3D..

 

LOD4.jpg

 

once exported the W3D is not complete.. we still need to configure the render distances and export the HLOD info..

 

Ok so open up the model in W3DViewer

 

LOD5.jpg

 

As you can see the model is loaded, and rendering the highest polygon model ( .00 ) Currently the HLOD is not setup to switch to lower poly models...

and we will set them up and export to a model that will automatically switch depending on the player camera distance.

 

 

Since we have 4 models we will need 4 spots to where each level will render ingame...

 

Keyboard Keys to switch between levels of detail are [ key and ] key and spacebar to set the render distance

 

First I want to get the viewer camera set to about 25 units away.. you can see this at the bottom of the viewer under Camera

 

Now at about 30 units is want the model to switch the the .01 model, set the camera to 30 and press [ to render the next level ( .01 ) press spacebar to set the distance..

 

Now move back to about 40 to render the next level ( .02 ) press [ again and spacebar to set distance 

 

Now move again back to about 50 to render the last model ( .03 ) press [ and spacebar

 

Now that we have set the distances we can check our results of the switching, go to LOD>Auto Switching then move you camera back and forth and you should see the model switch from the high poly model to the lower poly models...and after 50 units the crystals won't render at all

 

hlod_camera.gif

 

We've completed another step in the process but we need to export this new LOD model.. Go to file>export>LOD and make sure to save the file in a different directory as the other model we exported from max.. so you'll end up with 2 W3D files that share the same name...

 

Now w3dviewer doesn't export the LOD information.. so you will need to use TT 4.0 tools to get it working, we will need to use mergelod.exe to export a correct W3D model with the proper distance settings, so we can use it ingame

 

LOD6.jpg

 

Now drag and drop both files into mergelod.exe

 

once dropped the file is now ready to use.. notice the 1kb file... that is the information file, the larger 2,023kb file is now the proper file to use... open your larger W3D file and check Autoswitch option.. it will now properly switch the models when you import into Renegade..

 

You can delete the 1kb model and simply rename the 2,023kb model back to the original file name without the (2) 

 

Thanks for reading and goodluck!

 

You can get the TT 4.0 Editor/Game tools here

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

If you're going to rip off other peoples tutorials you could at least give credit to the original author.

 

Posted in 2009. Pretty sure some of your other "original" tutorials are ripped from our site too. We don't mind you sharing this information but please credit the original author and link back to the original topic. If you do subsequently make some modifications of your own (which you seem to have done, to your credit) we'd appreciate a linkback in the original topic too so others can benefit from the improvements.

 

No need for linkbacks. Also the tutorial has been rewritten and nothing was claimed as ours.. We simply posted the tutorial to spread the knowledge.. 

Link to comment
Share on other sites

If you're going to rip off other peoples tutorials you could at least give credit to the original author.

 

Posted in 2009. Pretty sure some of your other "original" tutorials are ripped from our site too. We don't mind you sharing this information but please credit the original author and link back to the original topic. If you do subsequently make some modifications of your own (which you seem to have done, to your credit) we'd appreciate a linkback in the original topic too so others can benefit from the improvements.

 

Was eventually going to rewrite the tutorial... And have done so... There is nothing else "ripped" other than the tutorials I was allowed to copy from Laubi Renhelp..

 

And no need for any link backs now.. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.