Page 2 of 2

Posted: Thu Apr 06, 2006 11:43 pm
by JensAyton
Both normal¹ and parallax² mapping are on my secret long-term to-do list. ;-) Parallax mapping will require pixel shaders, which are a bit down the pipeline. Decaling the normal and parallax maps would make a reasonable amount of sense once decaling is implemented. Note, however, that a parallax map does not in fact change the shape of an object, it only creates the illusion of doing so, so you can’t use it to blow off large chunks. Arbitrarily frangible asteroids would be better implemented by dynamic mesh modification.

I seem to have outthought myself with the sample object and texture-replacement I posted. Since texture instances are cached by name, the mip-map attribute will be set the first time the texture is loaded and ignored on subsequent loads. Using the first plist snippet above, you’d end up with either two mip-mapped squares or two non-mip-mapped squares. The intended appearance can be easily achieved using two copies of the texture; this will just add a few steps to using the mipmap-test.oxp for testing the effects of mipmapping on arbitrary textures.

¹ Normal mapping: changing the apparent direction each part of a surface faces (for lighting purposes) using a special texture. This is a more precise (and faster) version of bump mapping, but harder to work with.
² Parallax mapping is a technique for simulating depth in textures by warping them, using a separate texture (essentially a bump map) to determine which parts should appear further away.