OpengGL color / material properties


Re: OpengGL color / material properties
#24
Hi Travis,

Right! The motivation for the enumerated "well-known" surfaces is exactly illustrated by procedural bump maps - some programs might want to use procedural bump maps and program the grit pattern in-shader or pass a shader function to POV-Ray; other programs might simply want to create a bump map texture with a pre-generated pattern and use it.

The lego logo on stud tops would be well-handled via an explicit bump-map texture; I would recommend tangent-space normal maps, e.g.

http://www.blender.org/development/relea...rmal-maps/

Put the red and green (X and Y in tangent-space) vectors into the red and green channels of an RGB png; leave the blue channel defined as reserved for future expansion. The shader can reconstruct the blue channel from the red and green using the pythagorean theorem.

(Saving channels can be useful later for displacement information, etc. Or the program can use a 2-channel texture and save VRAM. There are also dedicated compressed texture formats for normal maps that compress two channels instead of 3 or 4.)

cheers
Ben
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: OpengGL color / material properties - by Ben Supnik - 2013-09-08, 0:16

Forum Jump:


Users browsing this thread: 4 Guest(s)