Understanding "Blend by Shader"

Started by cyphyr, August 31, 2007, 07:14:15 AM

Previous topic - Next topic

cyphyr

Hi Gang
I'm trying to understand the "Blend by Shader" system. I cant see what it actually dose. At the moment I'm trying to blend a strata and outcrop shader so it don't show up right across all equal heights but breaks up. The "Blend by Shader" doesn't seem to be doing anything at all. Am I missing something here or will it not work for all nodes? I dose bnot seem to work quite in the same way as a standard alpha map, ie. white allows the effect, black blocks it and the grays in between allow and block according to their intensity. Could someone post a explanation of Terragens blend methodology?
Thanks
Richard

ps Is the "Blend by Shader" effectively the same as "Fractal Breakup", ie allowing and blocking the nodes effect according to how black or white it is?
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Volker Harun

You explained it just the way it works for me.
First you activate the checkbox, then you assign a shader for the 'Blend'-input and make sure that colour information is running through (Powerfractals should have at least one colour active that is brighter than black).
Then it is just a matter of this Blenshader, its scale is important and the contrast and the colour-roughness ... ... ...

cyphyr

Hi,
I think I worked out where I was going wrong now. In order to get an "ON/OFF" masking I had to set the contrast value to 5, (maybe something less would have worked but 1, 2, 3 were insufficient). I've also noticed that when using extreme contrast in masking colours, not displacements, you can get some very strange effects. Its similar to the divide layering in photoshop. I'm thinking whats going on is that black and white are not necessarily the extremities of the range in 16bit "HDR" apps. Usually 100% black should 100% mask (or allow) something to show but not in this case.

below are the results of my experiments:

Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Matt

The strata and outcrops shader uses the blend shader in a slightly different way to other shaders. Instead of blending the final stratified result with the unstratified result, the blend shader actually changes the steepness of the strata (almost like changing the hardness of the strata). To do otherwise would change the altitude of the strata which is not the way I wanted it to work.

Because the original blend shader does not contain any black values it is very difficult to see the change in steepness of the strata.

BTW, when adjusting the contrast of a blend shader, you should be very careful not to introduce negative values. You should always clip the blend shader at black, and in most cases also clip at white. In your last render the surface colour is taking on negative values (these then become deep blue when atmosphere is applied), which is not photorealistic and should only be reserved for special effects.

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

cyphyr

Hi Matt
Ah I see now, I thought it was working differently on the strata than on colour shaders. In that case how would you recommend masking a strata layer so it is broken about its contour? Also do you not think it would be useful to be able to modify the height of the strata via a blend shader. That way one could make strata that has be subject to geological "bending", or dose this create other problems that make it unworkable? By the way I only included the last image by way of illustration. It seems that using the blend shader as an alpha mask is "wrong footed", I can only get it to work as a mask with contrast values above 1 and this is prone to produce the "special effects" err unwanted mostly even when the black and white values are clamped. What would be the best way of making a mask then?
Thanks
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Matt

I think you can use the Merge Shader to achieve a more direct blend between the terrain without strata and the terrain with. You should feed the original terrain into the main input of the Merge Shader, then simply attach a Strata and Outcrops Shader to the "Shader A" input. Make sure "Mix to A" is set to 0.5, then plug your masking shader into the "Mix Controller" input. This will allow you directly blend between the two surfaces, without the Strata and Outcrops Shader trying to do its own blending.

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