Inverted Voronoi Trouble

Started by Mohawk20, March 13, 2007, 01:44:49 pm

Previous topic - Next topic


March 13, 2007, 01:44:49 pm Last Edit: March 13, 2007, 01:47:34 pm by Mohawk20
While working on my vulcanic scene, I thought it'd be nice to have a layer of red in a voronoi pattern.

I had a voronoi clipfile, from another scene someone helped we with here.
So I plugged the output from that into the colour input from the surface node. Problem was that the inside of the cells was white and the borders black. I wanted it inverted, so I put an 'inverse scalar' function in.
The colour in the surface layer was dark red. And thus the max colour should be dark red, the min colour black. The min colour is black allright, but with the invers scalar in place the max colour is white, no matter how dark you set the colour.

Here is a screenshot:
And I have attached the tgd...

Hope someone can help me, this should become a new age for UrU Live perhaps an official one in the futur, who knows...


I'm a little unclear on exactly what result you're looking for - your example image looks good (and "right") to me. But if you just want to "invert" colors, try Complement Color function, or a Color Adjust shader with the Black and White points reversed. The Color Adjust shader approach is probably best as a straight invert probably won't get you what you want.

- Oshyan


Hmmm, as I read back, I think indeed I was not very clear on the problem.

The problem is most visible when plugging the resil after the inverse scalar into a displacement. All these very thin but high spikes are shooting up from the sky.

The problem is visible in the example as the white and bright red spots. The colour I set in the surface layer was allmost black, and still the white spots stay. I wonder why...

Allthough the render is in HDRI and so white has a value way over 1 in most cases, in these nodes outputs white should be at a value of 1, and so the max brightness for these lines should be very dark red, but they aren't.

I will try those sugestions and you'll hear from me after that.


Yep that colour adjust did the trick. Actually, I had tried that before, but not fully rendered it. I only used the small texture preview, and that didn't get to a high enough detail that time, so it seemed as though the voronoi pattern had disappeared. That is why I hadn't used that solution before.

Now that it's fixed, I still have one question..: What does the inverse scalar do that causes the over bright effect? Is it supposed to do that, or is it a bug?


Scalar is a number rather than a color - you're looking for the inverted color result of the node's output rather than the inverted numerical output. Most nodes in TG2 will convert between data types so the color data is first converted to scalar, then inverted, then converted back to color by the Surface Layer. I presume that's where the problem comes in.

- Oshyan


very nice image (don't understand all the extra nodes or the voronoi node, but whatever) I download the tgd, and I'm wondering where the color adjust gets plugged into


It links between the Voronoi Diff Scalar and the Surface layer Colour input.
Like the screenshot I attached.

And then you get the result I attached as well.

Have fun with it, I'm eager to see what use for it you come up with....


March 14, 2007, 01:40:35 pm #7 Last Edit: March 14, 2007, 01:43:02 pm by Ogre
Great topic.  Thanks for helping me work out an issue I have been struggling with.  ???  I was working on a similar picture but also wanted displacement.  I used your tgd as a working file.  Here is what I came up with.  Have to go back and start using this in my shelfed project.  Thanks again!
"If you find me feeding daisies
please turn my face up to the sky and leave me be watching the moon roll by.
What ever I was it was all because I've been on the town washing the BS down."

-Gordon Lightfoot


wow! great image, the displacement adds a lot. I think you should limit to the foreground, though. It jsut doesn't look right for the background (the volcano and stuff)