lib3ds animation
hi guys
i have a problem with loading animations from a .3ds-file using lib3ds. i load a file with animation with the lib3ds_open() function, but when i look at the returned structure i cant see any animation data! somewhere i have read that it is possible to load animations with lib3ds... someone who can tell me how? is there a special function for that? and how do i use the animation data?
my second question:
how does lighting in computergames work? i have used the d3d-lighting in a spaceshooter, but there are only 8 light sources allowed?! in some games there are more lights used i think...
8 lights arent enough for many laserbeams and explosions!
thanks for any help!
no-one in real life has every object illuminated by every light source.... in general you have all the static lights precalculated with a light map... then you add to that the dynamic lights in the scene. And in general, you only illuminate objects with light sources, that are near enough to have a large impact on that object... so 8 light sources, means 8 dynamic light sources, calculated per polygon... so they don''t have to be the same eight as are used to illuminate another polygon, or object. ie you can pick the 8 nearest light sources to each object, or choose a fixed radius, and only consider light sources, within that radius of the object you with to illuminate.... in reality, you may find that many games use far less that 8 light sources per object, as this could be slow, as it requires a dot product, per vertex, per light source.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement