Wed, Nov 27, 7:56 AM CST

Renderosity Forums / Carrara



Welcome to the Carrara Forum

Forum Coordinators: Kalypso

Carrara F.A.Q (Last Updated: 2024 Nov 21 9:55 pm)

 

Visit the Carrara Gallery here.

Carrara Free Stuff here.

 
Visit the Renderosity MarketPlace - Your source for digital art content!
 

 



Subject: Falloff blender for shaders?


pauljs75 ( ) posted Mon, 11 February 2008 at 7:52 AM · edited Tue, 26 November 2024 at 10:48 PM

file_399703.jpg

Is there such a thing?

Say I have a sphere, and I'm viewing it straight on. I want to be able to blend two different colors based on viewed surface angle. So that way the edges of the sphere are a different color than the middle. (Could be anything, but I think a sphere is the quickest example.)

I have some neat idea for a paint shader, and I think being able to do that would help a lot.

I also see this being useful for transparancy, so stuff gets fuzzier as it nears the edges, or even the opposite way around. Figure something like this might be hidden in there...


Barbequed Pixels?

Your friendly neighborhood Wings3D nut.
Also feel free to browse my freebies at ShareCG.
There might be something worth downloading.


TOXE ( ) posted Mon, 11 February 2008 at 8:08 AM

file_399705.jpg

If i have understood right, you can use the slope function...

-TOXE


 


Hoofdcommissaris ( ) posted Mon, 11 February 2008 at 2:04 PM

 Mmm, I think this is actually about the fresnel effect. And maybe even about absorbtion, but you can only manipulate transparency with that (in the shader tree, choose 'Transparancy' in the transparency channel, so you get the advanced options. And do set Refraction, to get the fresnel effect going.

But when you want this to make, for instance, 'flip flop' paint, that looks different in different directions, you want the 'fake fresnel' from Shader Ops by Digital Carvers Guild , which you can use as a blender in all kinds of shader constructions.

Hope this helps!


Sparrowhawke ( ) posted Mon, 11 February 2008 at 3:41 PM

I have an EdgeFalloff shader that should be what Paul is after.   Its good for cheap special effects like soft edges on clouds, smoke and for transparency on glass.

I cut and paste a few lines of code from my MipMapper plugin into a new project quite a while back that gives this 'EdgeFalloff' effect.  ( It takes the dot product of the surface normal and the vector from the camera - simple, once you get hold of the camera ! )

Most other applications have it and it really should have been included with Carrara in the functions list many versions ago...

I was going to bundle this up with a few other basic shaders but if anyone wants to try it now...sorry, still only  Windows versions though.

http://sparrowhawke3d.com/Downloads/EdgeFalloff/EdgeFalloffC4.zip
http://sparrowhawke3d.com/Downloads/EdgeFalloff/EdgeFalloffC5.zip
http://sparrowhawke3d.com/Downloads/EdgeFalloff/EdgeFalloffC6.zip


pauljs75 ( ) posted Mon, 11 February 2008 at 10:27 PM

Alright., cool!  I asked you about that in an email, just to cover the bases. Didn't know you had it whipped up already. :D

downloads

Windows is fine for me at least. I'm sure if you asked around, some Mac programmer out there with Carrara would compile it. Those plugins of yours are well worth it.


Barbequed Pixels?

Your friendly neighborhood Wings3D nut.
Also feel free to browse my freebies at ShareCG.
There might be something worth downloading.


bwtr ( ) posted Mon, 11 February 2008 at 11:42 PM

Thanks Jeremy.
But the inevitable, ----I am not sure on how to use it?
Any help welcome.
Brian

bwtr


Sparrowhawke ( ) posted Tue, 12 February 2008 at 12:02 AM

Brian,

Once installed you will find the shader under the Sparrowhawke3D submenu.

Use it with the alpha channel on something like a classic wine glass spline object rather than transparency and see what happens.  Adjusting the Acuteness Falloff will exaggerate the effect.

Make a cloud shape or something like that in the vertex modeler and hit it with a wave deformer.  For clouds and smoke stuff use it in the alpha channel and check the EdgeFalloff Inverse option so the edges fade away.


pauljs75 ( ) posted Tue, 12 February 2008 at 12:15 AM

file_399747.jpg

Hmm...  Has a few strange bugs. :/  Might need a little more tweaking when used - or some explanation for other settings that affect it. (Could also be some other stuff in the shader combining with it, will have to do some more tests.)

Apparently two things affect it - light through transparancy, and reflections of reflective material.

Top one has light through transparancy checked on both the basic render and the indirect lighting settings. Bottom one has both light through transparancy settings unchecked, but the strange artifact still occurs where there's a reflection of a reflective material.


Barbequed Pixels?

Your friendly neighborhood Wings3D nut.
Also feel free to browse my freebies at ShareCG.
There might be something worth downloading.


pauljs75 ( ) posted Tue, 12 February 2008 at 1:03 AM

The strangeness seems particular to the car paint shader I was working on. (The artifacting doesn't happen in simpler shaders using falloff.) The idea was to have the paint shift color near the edges to achieve a pearlescent effect. Does work to some degree, but the reflection weirdness limits it.

Other than that, the falloff channel thingy is powerful stuff.  👍 Made a Hal 9000 effect with it and some fuzzy cloudlike shaders. I'm sure there's even some more inventive uses.


Barbequed Pixels?

Your friendly neighborhood Wings3D nut.
Also feel free to browse my freebies at ShareCG.
There might be something worth downloading.


bwtr ( ) posted Tue, 12 February 2008 at 1:23 AM

Thanks Jeremy. Will put my nose to the grindstone with those ideas.
I had got to use it, one way, by applying it as with that screen shot  by Mox.
However, I can not seem to see value in the workings of the Transform Tag? Am I missing on something?

bwtr


bwtr ( ) posted Tue, 12 February 2008 at 1:52 AM

Aaahhhhaaaa!
Just tooooo clever and brilliant.
Thanks Jeremy.

bwtr


TOXE ( ) posted Tue, 12 February 2008 at 2:59 AM

Oops, "viewed surface angle"...:-P

-TOXE


 


bwtr ( ) posted Tue, 12 February 2008 at 9:04 AM

file_399779.jpg

Edge Fall Off tests.

bwtr


pauljs75 ( ) posted Tue, 12 February 2008 at 11:03 AM · edited Tue, 12 February 2008 at 11:03 AM

file_399782.jpg

Some simple and quick experiments...
  1. Particle emitter(s) snow.
  2. Alpha channel - fuzzy edges. (Similar effect can happen in regular transparancy too.)
  3. SSS "wax" with edge falloff added to translucency channel.
  4. My "Hal 9000" shader, no extra light.
  5. My "Hal 9000" shader, but with bulb light inside or behind.

Tried to see if there was a way to do something else neat with this, but Carrara didn't like it when I tried to mess with leaves on some tree and quit. (No fault of the shader though, didn't get that far.)


Barbequed Pixels?

Your friendly neighborhood Wings3D nut.
Also feel free to browse my freebies at ShareCG.
There might be something worth downloading.


Sparrowhawke ( ) posted Tue, 12 February 2008 at 3:57 PM

Pretty cool effects guys !

The EdgeFalloff plugin clearly has a problem with ray traced renders and it will happen with the mipmappers as well.  I used these for larger architectural scenes and landscapes with texture maps so the problem hasnt shown up till now.  The algorithm in the shader uses the distance of the surface from the camera and the angle of the surface to the camera.  The EdgeFalloff shader only uses the angle.  If the object using these shaders is seen in a reflection then its not going to work ! 

I'll have to see if there is a way to get the angle from the incoming light ray instead.  The total distance of a ray as it bounces around the scene isnt passed to a basic shader.  I havent done any custom lighting model plugins and that is probably what this needs to be perfected.

This is probably why the shader function was never included with Carrara then.  I used to like using the edge falloff in Poser for 'cheap' special effects and tricks with the depth buffered renders.  One of the features I want to have is to use reflection maps in Carrara rather than ray traced reflections for even faster renders where that detail doesnt matter.  I couldnt figure out how to do that function with Carrara so I was going to do a plugin sooner or later.

Jeremy,
www.Sparrowhawke3D.com


Patrick_210 ( ) posted Sat, 16 February 2008 at 8:11 AM · edited Sat, 16 February 2008 at 8:11 AM

Attached Link: http://www.renderosity.com/mod/gallery/index.php?image_id=580742

The "Fake Fresnel" component of  "Shader Ops" by DCG is exactly what the original post is asking for. The beauty of Fake Fresnel is that you have complete control over both shader components and their intensity and falloff. This allows you to enhance the effect of true Fresnel to your liking. It also works in many different channels, transparency, reflectivity, etc.

Here's a link to an image I did way back in Carrara 3. The water uses Fake Fresnel in the reflection and transparency components of the shader. The water gets more reflective as it gets further away and more transparent as it gets closer, because of the angle to the camera.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.