Archived

This topic is now archived and is closed to further replies.

Do00d

Working with models(md2/md3/etc) + lighting

Recommended Posts

Do00d    122
is there any other way to work out the models normals then calculating em every frame? also any good tutorials on interpolation/tweening i ahv my own ideas but im looking for others view on this but mainly i would appreciate any help on how to do lighting on animating models such as md2''s without having to calculte normals every frame any ideas?

Share this post


Link to post
Share on other sites
Chris Hargrove    256
If you want decent dynamic lighting, you have one of three choices.

A) Use vertex animation and recompute the normals on the fly every frame based on the current vertex positions and triangle geometry. This is very slow and not recommended.

B) Use vertex animation but store precomputed quantized normals for each frame alongside the vertex positions, and interpolate them at runtime similarly. Much faster than the first option, but potentially very costly in disk/memory size considering that vertex animation already takes up a lot of space on its own, and even quantized normals add up after a while.

C) Use skeletal animation and transform the base pose vertex normals just like the positions (without the translation component), using the same weights as the positions use. This adds a small amount of runtime processing overhead to the skeletal computations, but it''s much cheaper than actual normal recomputation from the triangles, it''s completely dynamic, and it''s virtually free in terms of disk/memory space.

Share this post


Link to post
Share on other sites