RobynsVeil opened this issue on Jan 24, 2009 · 490 posts
bagginsbill posted Mon, 01 June 2009 at 1:48 AM
Any place you use a number in combination wtih a color, the number gets promoted to a color by repeating that value in all three color components. Any place you use a number, such as .5, and a color is needed, it just turns that into Color(.5, .5, .5).
Well after studying how Poser works, I discovered that it accepts hypercolors for color parameters. What this means is, instead of building a separate math node, putting 1.75 in it, and plugging that into a white input, I just put Color(1.75, 1.75, 1.75). It turns into the same thing, without having an additional do-nothing node just to hold a number.
We cannot enter or even correctly edit numbers like this in the material room. They display incorrectly in the parameter value. But they are really there.
If it bothers you to have numbers as hyper-colors in the material that are impossible to enter by hand, or you would like to be able to manipulate these numbers while in the material room, just wrap them in a call to Add, as in
return combineCorrect(x <= Add(.5), Add(-.25) * x, x * Add(1.75))
Calling Add is asking matmatic to explicitly create a Math:Add node, with Value_1 being what you pass. You can pass Value_2 as well, but we don't need a Value_2 and it defaults to 0. In fact we don't need a Math:Add at all, but Poser does not have a SimpleNumber node.
But this isn't buying you anything really, unless you plan to change the numbers in the material room.
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)