shader array displaceable

Started by otakar, March 02, 2013, 02:37:59 PM

Previous topic - Next topic

otakar

Quick question, is a shader array displaceable? I have had no luck with this so far.

Tangled-Universe

Yes you can hook up a simple shape shader to it to create an array of the simple shape shader's shape and displacement.
I wouldn't recommend it though. I once made a reasonably sized grid of sss's with displacements and got TG on its knees.
Where do you need it for?

otakar

Well I was hoping to create a line of identical shapes (think pillars) and then displace that line so it becomes a curve. Of course you can displace a single simple shape, but once you put it into a array, can you displace that array (horizontally)?

jo

Hi Otakar,

The shader array takes all its displacement from the connected nodes. However you might able to do something by distorting the coordinates before they get to the shader array, perhaps by using a transform shader or warper. I haven't tried it myself though.

Regards,

Jo

Dune

You could try blue nodes, like this... but they're not exactly rounded pillars. For distance it would perhaps work.

Tangled-Universe

Quote from: otakar on March 02, 2013, 07:17:58 PM
Well I was hoping to create a line of identical shapes (think pillars) and then displace that line so it becomes a curve. Of course you can displace a single simple shape, but once you put it into a array, can you displace that array (horizontally)?

You can also make a mask for the shape, load that in an image map shader, set it to repeat x or z and then warp that.
The disadvantage, however, is that the warp may affect the roundness of the shape.

otakar

Jo, thanks. No luck with distorting the coordinates so far.

Dune, that's intriguing. Will see if I can build something similar (I did want a round shape).

TU, I could go the warped image mask route, but then I'd have to use an object for the underlying shape. I love the feature of the simple shape shader in that it's built within TG and is easy to modify and of course for the fact that it becomes part of your terrain and can be displaced (with objects it's either all raytraced or all rasterized). Unless someone has managed to make a nice round cylinder out of a rock or sphere object? :)


Dune

You can use an image map (soft circle repeated Y here) for procedural displacements, just use the mask to displace your column up. But the problem will indeed be the distortion. That would be a nice feature, a warper that doesn't distort the underlying mask, but only its line of occurrence.

j meyer

Just in case,you can get a round shape with Ulcos set up too.Push the first slider
of the colour adjust shader to something like 0.5 and the second to 0.6 or so to get
a more flat top.If you disable the simpleshapeshader you can see that the original
checkerboard pattern turns to an array of dots.So play with the sliders and have fun.

otakar

Yeah, sure you can get nice round pillars in a straight line that way (I can do the same with the array shader). However, once you start warping that 'line' you end up warping the procedural pillar masks as well, even with high feature scale values. Fun to play with that though...