Really soft triangle

Started by Dune, May 05, 2012, 04:32:48 AM

Previous topic - Next topic

Dune

Is it possible to procedurally make a soft triangle that has soft S-curves along all sides, no matter how wide or pointed? The SimpleSS has its smooth step, but in the corners this makes sharp edges. I can use a painted mask, but prefer something procedural.
Also, the Smooth Step makes the area between the soft steps 'straight'. Is there a way to make a continuous S-curve, if you get my point?

mhaze

beyond me I'm afraid thought it might be possible to merge two SSS but it doesn't work.

mogn

How can you bound 3 sides of a triangle with soft s curves ?
If you look for a (negative V formed) displacement with a zero slope at the bottom
and zero slopes at both sides of the V its not too difficult with blue nodes.

Dune

I thought you'd be the one to know that, but I'm afraid I can't get it together. Would you mind making a setup? I now use a gray scale tiff map (can't upload, so made into jpg) with a soft triangle, which works fine, but blue nodes are better as there's nothing to load.

mogn

Here you are.
If you want more softnes, increase the constant scalar in the internal network (make it greater than 0.3)

Dune

#5
Hey thanks, Mogn!

Just did some initial trials...  can it be stretched in one direction?

mogn

Just multiply the "get postion in geometry"  in the internal network by a vector e.g [1, 0, 2].
By the way if you stick to a triangle there must be a much simpler way.

Dune

Beautiful. Thanks very much, mogn. I've learned a lot again. There's a great deal of possibilities with your setup, I've already found out.

Matt

Hi Dune,

What was the problem with the Simple Shape Shader with smooth step? In my test it seems to give similar results to Mogn's function. I set Edge profile to "Smooth step", Edge width 50, Edge units "Percentage", and plugged it into a Displacement Shader.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Hi Matt,

It has a sharp edge in the corners, like here. No matter if you set it to meters or percentage. I needed a soft cornered triangle.

jo

Hi,

Yes it will have a sharp edge. I'll looking at adding an option for soft corners.

Regards,

Jo

Dune

I think that would be very useful, thanks Jo.

Matt

I see what you mean. Mogn's function does that too though.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Aha, did I not see that? Mmm. Sorry about the confusion. So maybe my tiff mask is best after all, for the time being. Perhaps a simple gray scale mask is faster to read/compute for TG2 than a set of functions as well? After all, in a function, all points in space have to be calculated, in a mask they're already laid out. Or do I interpret that too simply?

Matt

It depends how many nodes (and which nodes) are in the function network, but image maps will be faster than "complex" function networks. Images use more RAM of course. In this particular case I think the image map will be faster, but with simpler networks that might not be true.
Just because milk is white doesn't mean that clouds are made of milk.