Game Development Community

changeing the LOD distance of an object

by Simon Sejer Nielsen · in Torque 3D Professional · 11/25/2009 (5:29 pm) · 9 replies

I finally got my tree's to be displayed correctly with the Forest Tool, what I would like to know, is how would I be able to change the LOD change distance on the tree's since I am going to be in need of a LOT of tree's it would be really nice to having the tree's change into a lower poly count Lod of the tree somewhat closer then of what it is right now.

#1
11/25/2009 (6:26 pm)
You can use the TSShapeConstructor to do that via its scripting functions. I've used these functions to change detail sizes, as you're asking about, as well as adding LOD meshes to objects, change mesh names, add/remove nodes, rename and create new animations. It's a boatload of awesome...

Hope that helps.
#2
11/25/2009 (8:22 pm)
A lot of the TSShapeConstructor functionality is also available in the Shape Editor. With the new Details window, you can view and edit detail sizes.
#3
11/26/2009 (11:10 am)
@Chris: by Editing the detail size you mean, that I can alter the distance that the detail size is vieweed from ? I had a look at the shape editor but were unable to figure out how exactly I could change it, if at all.
#4
11/26/2009 (2:32 pm)
Maybe a small tutorial or example which TSShapeConstructor functions should be used.

I have several models here I bought with dts - lod's.


Don't I need these lod's any longer?

Thanks for help!
#5
11/26/2009 (2:57 pm)
In the shape editor if you alrady have the lods set up and just want to tweak the details, you would click on the checkbox so that you can slide to switch between LODs. Slide it to the LOD that you want to adjust and then enter the new pixelsize value into the box and hit enter. That will update it.

It does seem to only allow you to do one step at a time right now unless you save it. And if you edit the same LOD multiple times you may get multiple steps in your constructor for example if the lod was originally at size 50 and you changed it to size 70, then decided you wanted to boost it up to size 100 the saved shapeconstructor would modify the 50 to 70 and then the 70 to 100. You could manually edit the file and just have it change the 50 to 100 if you liked though.

All in all the shape editor and TSSHapeConstructor changes in 1.1 are fantastic. One of the first things I did after porting to 1.1 was go through all of our models and tweak the LODs.
#6
11/26/2009 (7:21 pm)
Quote:It does seem to only allow you to do one step at a time right now unless you save it.

@JC - I noticed this as soon as the 1.1 alpha build went out. Typical! Fix is here. After applying that you should be able to do as many size changes as you like, and they will all compress into a single command!
#7
11/27/2009 (10:36 am)
@J.C. Thanks for the help.

But first I need to know how to bring all the LOD dts's into the shape editor.

I don't see any documentation about that.
#8
11/27/2009 (5:02 pm)
@Holger: Right now the Shape Editor cannot combine separate DTS files into a single shape. You can do it with TSShapeConstructor, but you'll have to write the script manually. The docs for that are here.

If your DTS file already contains multiple LODs, then the Shape Editor can change when Torque switches between them.
#9
11/27/2009 (6:02 pm)
Thanks Chris,

no my LOD's all separate.

Will read the doc's