Jump to content
Sign in to follow this  
ruger392

Vehicle LODs and animations

Recommended Posts

So I've recently gotten my hands on a fully animated model of a plane in the form of a 3ds max scene. I've successfully gotten it working in-game, with all the materials and textures I want, but the model doesn't produce shadows and doesn't have collision. I've read that the way to implement those is with shadow and geometry LODs.

 

When I make those LODs, what will I have to do to make sure they are aligned with the plane's animations? (If the landing gear go up, how can I make sure the game won't still render landing gear shadows or register a collision when it shouldn't?)

Share this post


Link to post
Share on other sites

Hi!
So basically, you have to name all the shadow model components the same as the corresponding visual model. Do this in the Named Selections pane. Actually, this goes for all LODs. Your skeletal input in the model.cfg determines how things are linked and makes it so for all LODs. If you look at a sample model's .cfg file, you'll notice a long list called "SkeletonBones," which often repeats items. That's because the string is read in sets of two, despite their intended order, child then parent. So you might have six components that goes: child, parent, child, parent, child, parent. The root or main parent is an empty pair of quotes. Only list children once, but a child can be a parent of multiple other "bones." That's where the redundancy sets in (in addition to all the "", you'll see). To prevent confusion, it's good practice to line-break after each set, and no comma after the last child-parent pair. I hope that's not too confusing, but looking at an established file should clarify (reading this back to myself I can see I might have made the confusion worse, but let me know if I can clarify it for you).

These are a few essential LODs:

SHADOW LOD
It's best to keep it as simple as possible. You don't want to shadow every little antenna and bump. The models must be closed, or else you'll get stray shadows going off in undesirable directions. Also, remove all smoothing groups from shadow models. To prevent dark spots, you can reduce your shadow models using the "Push" modifier in MAX. In some cases, you can flip the polygons, but this tends to leave the shadows not connecting where components intersect. For example, if you have a flipped wing shadow perpendicular to the fuselage, there will be a visible gap where the wing is supposed to cast its shadow on the fuselage. The optical illusion makes the viewer think the wing is detached. **

MEMORY LOD
This consists entirely of isolated vertices which represent component axes, entry positions, and effects locations like exhaust or air vortex streamers. For a component named myBone, you simply add "_axis" to the end of its bone name in the Named Selections, so it would be: myBone_axis. There's usually no need to include the myBone_axis in the SkeletonBones list; typically the engine recognizes them as the bone itself. I have seen exceptions to this, especially in airplane landing gears, most notably on the Wipeout.

GEOMETRY LOD, GEOMETRY PHYS LOD
You'll need these to determine collision and to rule how the vehicle operates in the environment, or something like that. Any rate, you'll want to make this a rudimentary representation of your model, making all components convex. If you have a big concave area in your model, like the back of a pickup, for example, then you'll need to make the walls, tailgate, and bed bottom into separate objects. They can overlap, clip, intersect, or whatever you want to call it, but they must be separate for convexity. Geometry LOD needs to have mass assigned. You can do this for each component for authenticity, or you can create mass cubes for an easy way to distribute the weight evenly. Mass cubes make it easy for developing the performance and handling of a vehicle, because you might be doing a lot of adjustments between the configs and the model. The Geometry PHYS LOD doesn't need mass, but it can use the geometry you used for the Geometry LOD. Just copy and paste it in. The important thing you need to remember to do for Geometry LODs is "component convex hull." This checks for and sometimes corrects concave errors. Sometimes if you have very slight concave areas it will just delete that polygon group, so you'll need to repair those first. It's best to make sure it leaves MAX fully convex and triangulated.

There are tutorials on all this that attempt to go into further detail, though they are in need of some clarifications, typo corrections, and updated information. Usually people on here will lend a hand, but you just have to do a little digging for yourself sometimes.

 

I hope all this helps!

** It's a shame they have to rely on separate model LODs for the shadow. In my limited understanding, it seems more logical to cast the shadow from the visible mesh from each visible LOD. It would just require all LODs to consist of all closed meshes. The shadows could be more accurate and not have to align to the least common denominator - saving on artist headache. The current shadowing method ARMA uses has been widely abandoned by the game industry for nearly a decade...but there's probably some reason.

Share this post


Link to post
Share on other sites

Thanks! I had no idea you could use separate objects and mass cubes for the geometry LOD, that'll be very helpful.

 

I actually just figured most of this out myself (spent yesterday agonizing over animations and model.cfg, just ten minutes ago discovered that the animation classname must be the same as the selection name), and I should be moving forward well from here.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×