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

Started by
4 comments, last by Do00d 22 years, 3 months ago
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?
Advertisement
MD2''s use a look up table of precalculated normals.

My md2 code is available here if you want a look.

Cheers

Matt

kool thanx
just one thing
how do u kno which normal it is that u have to use?
and what do u do for interpolated frames?
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.
hmm
didnt think of the skeltal hting just yet
thanx ppl

This topic is closed to new replies.

Advertisement