Jump to content

Tree LOD's


element11

Recommended Posts

Hey map makers. I just have a bit of a question about trees with GR map modding. Im planning on making fairly large forests for one of my maps, and I really need to incorporate some LOD's. I have built my tree, tagged it and everything, and its ready to go. I am trying to make it switch to a blank file (no polys) when the player is around 60m away. So in the map editor, i left the switch distance of LOD1 at 0, and the LOD2 to 60. Im wondering how i would insert the LOD model? Ive never done this before and im really stumped. Are the trees inserted as geometry in the map? Or are they exported and inserted some other way?

Could someone quickly walk me through this situation?

Link to comment
Share on other sites

Like yourself I haven't done low LOD trees either

However a good starting point is the demo map (which features lowLOD versions of 5 various trees and shrubs)#

The low LOD has to be present in the scene once and is basically a copy of the high LOD but without the various tags or the collision object and with a simplified structure.

The helper point must be in the same place as the original

I really am unsure whether to use low LODS that you need to use the export first option (but I hope I've given you a place to look)

Best I can do (sorry)

Edited by Phlookian
Link to comment
Share on other sites

Ahh those LODs can be tricky...

Let's say for example you want to make a coconut tree. I would advise you to name everything as coconut so you won't get confused.

1) Make a high-poly coconut tree geometry and group with a O helper point. Just in case, you can name the O helper point as "O coconut". Name this group 1_<lodn><tree>coconut.

2) Make a low-poly coconut tree geometry, group with another O helper, and name ++1_coconut. If you want no geometry at all, I think you just group a O helper with nothing else and name as ++1_coconut. Should work... :hmm:

3) Tagging the high-poly tree:

In the Map Editor, fill in these values:

a) LOD1: coconut

b) LOD1 switch distace: put a value in centimeters, not meters. So to switch at 60 meters, type in the value of 6000 (because 1 meter = 100 centimeters).

c) LOD2: ++1_coconut

d) LOD2 switch distace: leave this blank

4) Tagging the low-poly tree:

In the Map Editor, fill in these values:

a) LOD1: ++1_coconut

b) LOD1 switch: blank

c) LOD2 and LOD2-switch: blank

5) Placing on the map:

a) Use the Scatter tool (use RSE's Scatter plugin found in the IT disc) to Scatter your high-poly coconut trees all over the map. You'll tear your hair out learning to use the Scatter Tool, but it's worth it! Do not Group with any Room.

b) Place your low-poly ++1_coconut somewhere on the map where players cannot see it e.g. behind a cliff. One copy is enough. Do not Group with any Room.

6) ExportFirst model:

If you plant 300 trees on your map, then in-game you discover a serious bug (eg No collision), you may need to replace every tree or edit them one by one.

To make life easier, we make an ExportFirst model.

a) Select one high-poly tree and rename it <exportfirst>coconut. Make sure it is an exact copy of the other high-poly trees, including tagging.

b) Place it on the map where players cannot see it. Do not Group with any Room.

c) Now, if in-game you find some bug in your trees, go back to Max and edit only the ExportFirst model. When exported, every coconut tree on the Map will inherit these changes. :thumbsup:

7) Testing:

a) LOD: Just walk backwards and see if the switch takes place.

b) Bad Tree: In-game, if trees are too close together, the AI will try and run between them and get stuck. They won't know how to un-stuck themselves. To test, enable the cheat console and type in badtree. These problem trees will catch fire!

BadTree.jpg

In this case, the tree is too near a cliff, so the AI's can get jammed in there.

It so happens I have an example... Grab it here. (Oh the textures don't match but the tagging is OK).

Hope this helps.

Link to comment
Share on other sites

  • 3 weeks later...

Im having some massive problems with my map, and i cant for the life of me figure out what it is. Any time I try to load the map into igor or in game it crashes. I know its the trees, because when i delete them the map loads fine and runs fine in game. Anyone know whats up?

Link to comment
Share on other sites

No .sht file was generated. I dont use igor for the buioldbinary command I stopped using igor for that a long time ago because I found it to crash too much. I use ghost recon.exe to build the sht file, and no file has been generated before it crashes.

The ike log just sayts loading map and thats the last line.

I do get this message upon export though saying that [1_<lodn><tree>oldtree] has 8 meshes. Optimal count is 2 or less for High LOD models. This happens with all my trees. I have no idea whats going on, ive checked theres no sht file and Ive checked and rechecked worms tutorial and im conifdent i didnt miss anything. :wall:

Link to comment
Share on other sites

I've only seen this warning on the Low LOD models. It even happens if you use the trees from the castle map file. I've never had a problem loading the map into GR or IGOR with this error.

How many meshes do your low LOD models have?

The best way that I've found to make these is with two planes, one rotated 90 of the other. Then group it with a helper and your set.

If you're using your own original trees to make a texture is real easy. Just take the High LOD mode and clone it, then rotate it 90 degrees and move it over slightly. Then take a render from the side or front viewport so both models are in view. Make sure you have a power of two setting in the render dialog (256x128 or something similar)

Save it as a targa file with an alpha channel and then use photoshop or the rsb editor to convert it to a rsb file. The re-apply this image to the planes above, group it and tag it as per this thread or the level building pdf.

Link to comment
Share on other sites

What I did was group the collison and no other polys to get the low LOD model. I was hoping for the low LOD to be just collision, to avoid any problems with AI, and so they can still hide in the forest when the trees are gone, and to save even more polys. Would the fact that I grouped the helper with an untextured, and unrendered modelbe one of the problems? I think ill give that a try later, because its the only other thing i can think of to try at the moment. Thanks for all your help guys.

Link to comment
Share on other sites

Don't know if this helps, but the builder pdf (page 24) says that the collision and staticfoliage objects are not required in the low Lod model because they are already copied from the reference model

I think you've got a conflict here ;)

Link to comment
Share on other sites

I can't really say what you did right or wrong.

You'll have to explain what you did precisely and with care. A small mistyped name or unchecked box can get it broken.

So instead, I'll upload the tree LODs I've used for WSV, when I get home from work.

You can compare your tree setup with mine and maybe find your problem.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...