Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on May 05, 2012, 04:32:48 AM

Title: Really soft triangle
Post by: Dune on May 05, 2012, 04:32:48 AM
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?
Title: Re: Really soft triangle
Post by: mhaze on May 05, 2012, 05:49:19 AM
beyond me I'm afraid thought it might be possible to merge two SSS but it doesn't work.
Title: Re: Really soft triangle
Post by: mogn on May 06, 2012, 07:10:55 AM
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.
Title: Re: Really soft triangle
Post by: Dune on May 06, 2012, 12:02:31 PM
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.
Title: Re: Really soft triangle
Post by: mogn on May 08, 2012, 03:38:00 AM
Here you are.
If you want more softnes, increase the constant scalar in the internal network (make it greater than 0.3)
Title: Re: Really soft triangle
Post by: Dune on May 08, 2012, 03:52:48 AM
Hey thanks, Mogn!

Just did some initial trials...  can it be stretched in one direction?
Title: Re: Really soft triangle
Post by: mogn on May 08, 2012, 02:05:49 PM
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.
Title: Re: Really soft triangle
Post by: Dune on May 09, 2012, 02:38:25 AM
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.
Title: Re: Really soft triangle
Post by: Matt on May 16, 2012, 10:15:46 PM
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
Title: Re: Really soft triangle
Post by: Dune on May 17, 2012, 03:32:03 AM
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.
Title: Re: Really soft triangle
Post by: jo on May 17, 2012, 04:32:33 AM
Hi,

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

Regards,

Jo
Title: Re: Really soft triangle
Post by: Dune on May 17, 2012, 09:04:14 AM
I think that would be very useful, thanks Jo.
Title: Re: Really soft triangle
Post by: Matt on May 17, 2012, 06:05:47 PM
I see what you mean. Mogn's function does that too though.
Title: Re: Really soft triangle
Post by: Dune on May 18, 2012, 02:29:40 AM
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?
Title: Re: Really soft triangle
Post by: Matt on May 19, 2012, 04:37:16 PM
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.
Title: Re: Really soft triangle
Post by: mogn on June 16, 2012, 03:26:22 AM
Quote from: mogn on May 08, 2012, 02:05:49 PM
By the way if you stick to a triangle there must be a much simpler way.

This time I think its really soft.
Title: Re: Really soft triangle
Post by: Dune on June 16, 2012, 03:40:32 AM
Hey thanks, Mogn! I'll check that out.