RobynsVeil opened this issue on Jan 24, 2009 · 490 posts
bagginsbill posted Thu, 28 May 2009 at 6:30 PM
Next is the a class definition I made up to help organize things.
For almost every opaque dialectric material, we only care about 3 things. We care about diffuse color, shininess, and bumpiness. Pretty much anything from skin, to paint, to lipstick can be made with only these three parameters.
So I define a class, called CSB to represent anb hold information about color, shine, and bump.
The init function is the constructor. In addition to the new CSB item being built, it takes 3 arguments; color, shine, and bump.
You can create one with anything you want for the color - just make sure it is a linear color, not an sRGB color. That means you can make one with an explicit color, or a node with a pattern in it, or an anti-gamma corrected image map. Doesn't matter what it is - everything will work.
I have invented this shine parameter - it does not correspond with any particular node parameter you've ever seen exactly. But you have seen it (in a somewhat different flavor) in the VSS skin template. There are many ways to interpret the shine, but we can generally say this: when shine is 0, you should have a completely flat matte surface. When shine is 1, you should have something that is super shiny like glass or beautifully waxed car paint. When something is very shiny, it should also include a reflection effect, not just a specular effect. We'll see how to implement these things later.
The last argument, bump, is quite straightforward. It's simply a bump pattern suitably scaled. It could be 0 for no bump, or it could be a Noise or Turbulence node with the scale already built in, or it could be an image map.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)