Questions about collisions and LOD
by Ronald J Nelson · in Torque Game Engine · 06/15/2006 (10:19 pm) · 7 replies
First question, because it causes my game to crash. How can you keep a weapon model from sinking into a wall when you walk up to it? If you fire when this happens the game crashes.
Second. How can I set my LOD? where is the variables for it?
Second. How can I set my LOD? where is the variables for it?
#2
Basically the LOD distance is set way too close. Not sure how to adjust that since I haven't run into it as of yet.
06/16/2006 (3:14 am)
Well thank you but with the LOD I am experiencing something that I know isn't correct. The original buggy's wheels look terrible unless you are right next to the vehicle itself. Therefore there must be someway to adjust the LOD in code to some extent because it must have gotten messed up somehow.Basically the LOD distance is set way too close. Not sure how to adjust that since I haven't run into it as of yet.
#3
Try setting these prefs to the following values:
You can change how aggressive the DTS lod is through the prefs and there is a difference between the 'starter.fps' and 'starter.racing' demos.
06/16/2006 (5:36 am)
Hi Ron,Try setting these prefs to the following values:
$pref::TS::detailAdjust = "1"; $pref::TS::screenError = "10";
You can change how aggressive the DTS lod is through the prefs and there is a difference between the 'starter.fps' and 'starter.racing' demos.
#4
06/16/2006 (4:24 pm)
Thanks Tim but that didn't do it. I can improve the distance a bit from my options menu to it changing to a lower LOD at about 10 feet away instead of 1. It is my guess something major in the code got messed up. I think it is important to note that I have installed the CG water, TLK 1.4, and DRL 2.0. Not sure if it was something with the changes done with these but it is a pretty big issue.
#5
06/16/2006 (5:26 pm)
Could someone tell me where the process for this takes place so I can see if I screwwed it up somehow?
#6
06/16/2006 (8:51 pm)
This seems to be a TLK bug. Others have reported the exact same problem with the buggy and the lighting kit. I suggest jumping on the TLK forums and speaking to John. I believe he has the solution.
#7
06/16/2006 (11:50 pm)
Cool that makes me feel much better that it is likely not something I screwwed up. Thanks Tim.
Torque Owner Tank Dork
2. Your LOD is handled automatically by torque if set up correctly in your modelling program.. if using MIlkshape you simply make your LOD meshes as groups with a # at end of name..
(very simple example)
ie.. 1. you make a crate complete with modelled boards around edges.. 100 polys.. and save it out to nearbox.ms3d
2. you then go to tools menu and using directx tool you scale down nearbox (or simply make a square yourself.. directx tool is good for comlplicated models).. 12 polys.. and save it as farbox.ms3d..
3. close out farbox and reopen nearbox.ms3d go to groups and regroup it as crate50 and hide, then select merge option in file menu and bring in farbox.ms3d, regroup it as crate02 and hide, then unhide crate50.
4. set up your collision mesh (I would just duplicate crate02 and regroup new shape as collision-1).
5. set up your materials as needed.. then using torque2dtsPLUS export it out for use.
The TGE will automatically use the crate50 unless the pixel count is reduced to 2 then it will call crate02 (which is a long ways off) you can have any number of LOD so there is a more gradual change.. ie.. crate100, crate50, crate25, crate02, etc. best to put one in game and check how it looks yourself.
If using Max, Maya or Gamespace.. go to TDN (Torque Developers Network) and look for their exporters.. they will explain setting up LOD in them.
edited spelling