Planetside Software Forums

General => Terragen Discussion => Topic started by: bobbystahr on June 22, 2011, 11:24:05 AM

Title: Crater Shader Rim texturing
Post by: bobbystahr on June 22, 2011, 11:24:05 AM
Having a Brain Cramp...I know I did this before my break-in in which I lost all my previous TG2 stuff in the computers and back ups they stole, so I'm begging assistance in getting a Surface layer to be restricted to the Rim of the Crater shader...Tried everything I may have done before and no results at all...heeeelp.. ...
Title: Re: Crater Shader Rim texturing
Post by: Dune on June 22, 2011, 11:55:13 AM
You could make a simple shape circle, at the location and size of the crater, or two mixed in such a way to get a soft ring, and use that as a blender.
Title: Re: Crater Shader Rim texturing
Post by: Tangled-Universe on June 22, 2011, 12:04:52 PM
That's awful news Bobby :( Basterds!  :-\

The crater shader doesn't output colour so therefore it won't work as a blendshader.

Dune's option is the easiest way to go.

A bit harder way could be to position a camera in the exact middle of your crater shader and attach a distance shader to that camera.
You can then create a white sphere which fills the crater to the rim and use that as an inverted blendshader.
Title: Re: Crater Shader Rim texturing
Post by: bobbystahr on June 22, 2011, 12:22:37 PM
Quote from: Tangled-Universe on June 22, 2011, 12:04:52 PM
That's awful news Bobby :( Basterds!  :-\

The crater shader doesn't output colour so therefore it won't work as a blendshader.

Dune's option is the easiest way to go.

A bit harder way could be to position a camera in the exact middle of your crater shader and attach a distance shader to that camera.
You can then create a white sphere which fills the crater to the rim and use that as an inverted blendshader.

Yeah it's been a bit weird since then...didn't go out at night till well into the new year after that...still missing the 13 years worth of contacts and art resources I built up when I came over from my Amiga....they didn't touch those tho, heh heh heh. I'll give Dune's method a try if I can figure out how the soft edge thing works with 2 sss circles...then yours If I don't mak headway. The odd thing is I did it before we had the SSS...dunno how tho.. ...
Title: Re: Crater Shader Rim texturing
Post by: Matt on June 22, 2011, 01:15:49 PM
You should be able to just assign the shader to the 'rim shader' input of the Crater Shader. I suppose that means you need to use the Crater Shader after your other shaders that you don't want on the rim.

If that doesn't work, you can use another copy of your Crater Shader to create a black and white mask. To do this, attach a white shader as the 'rim shader' (anything generating white will do, e.g a Default Shader or Lambert Shader). Then that crater with white at the rim can be used as a mask for your other shaders. To have more control over the mask, you could use a Colour Adjust Shader on the mask.
Title: Re: Crater Shader Rim texturing
Post by: bobbystahr on June 22, 2011, 04:47:23 PM
"I suppose that means you need to use the Crater Shader after your other shaders that you don't want on the rim."
There's my problem, my crater originates in the terrain editor...can it be textured from there he wonders...
thanks all..will try your suggestions Matt as they seem good techniques to have in any case.
I have it working and when I figure out what I did I'll post that work around as well.. ...
Title: Re: Crater Shader Rim texturing
Post by: Dune on June 23, 2011, 03:42:23 AM
Interesting that you come up with your suggestion, Matt. This morning I had the same thought and was about to post it. My idea was to add the copy of the crater shader (heights all set to 0) as a child of a surface layer and add color PF's to the rim shader input. Theoretically speaking, didn't try it.

Bobby, here's a circle, but you'd have to play with the settings to get what you need.
Title: Re: Crater Shader Rim texturing
Post by: mogn on June 23, 2011, 05:46:01 AM
Simple:
Title: Re: Crater Shader Rim texturing
Post by: bobbystahr on June 23, 2011, 07:58:08 AM
Thanks Dune and mogn....I may pass on yours mogn as I have a really hard time getting networks set up and then
how does one integrate that {any} group into the shader list...that's always mystified me....but it does look really efficient...thanks for posting...It'll probably answer a query or 2 for others as well
Title: Re: Crater Shader Rim texturing
Post by: Dune on June 23, 2011, 08:04:56 AM
That's an interesting circle, Mogn, but to act as a mask I suppose one needs soft edges. Perhaps a smooth step would do that?
Title: Re: Crater Shader Rim texturing
Post by: Tangled-Universe on June 23, 2011, 10:50:27 AM
You can also subtract a distance shader from another to create a soft ring.