Sun, Oct 6, 5:38 AM CDT

Renderosity Forums / Carrara



Welcome to the Carrara Forum

Forum Coordinators: Kalypso

Carrara F.A.Q (Last Updated: 2024 Sep 29 9:32 am)

 

Visit the Carrara Gallery here.

Carrara Free Stuff here.

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

 



Subject: Another Shader Question


ThrommArcadia ( ) posted Thu, 29 March 2012 at 2:16 AM · edited Sun, 06 October 2024 at 5:08 AM

Hello my fine fellow Carrara friends!

 

Okay, so I'm wondering if there is a way to set shaders to react to lights.

For example.  Let's say I'm making an animation with a planet and I want to have city lights on the dark side, but then for the lights (which would be provided by a proper texture map) to be off when they face the sun.

Of course, I have figured out how to do this with After Effects and two render passes, but the thought has occured to me that there might be a way to do it with shader math that I don't completely understand.

Any thoughts?


jt411 ( ) posted Thu, 29 March 2012 at 10:05 AM

I don't think that's something that Carrara can do out of the box; however there are a few plugins that will (more or less) help you get the effect.

"Shaders Plus" from Digital Carvers Guild allows you to control how each light in your scene affects each shading domain of an object. For example, you can add a light that only casts specular light on a characters eye surface while completely ignoring the rest of the character.

"Carrara ERC" available at DAZ allows you to use attributes of nearly anything in your scene to control attributes of pretty much any other thing in your scene; if that makes any sense...

I'm almost positive that there's a plugin out there that does exactly what you're asking; maybe "Shader Ops" from DCG or one of Inagoni's add-ons.

Mark will probably know!


Antaran ( ) posted Thu, 29 March 2012 at 12:18 PM

JT,

Could you elaborate alittle more about using Carrara ERC? This is an interesting shading/lighting problem, I would love to know how to somethings like this up.

In theory, this effect could be achieved if the glow channel could be controlled by the invertef highlight appearance, correct? Or am I thinking about it in completely wrong terms?

Another option,perhaps, would be to have a sphere of lights hooked to the sun (parented to it) with negative ones around the sun and positive ones directly opposite the sun (2 half-sphere replicators with thicker distribution in dome centers). Then have lights in both spheres only affect the highlight of the light-on-earth shader (with shininess set to zero and highlight to something bright and light)... Would that work?

I am in a middle of a project and can't test my theory :(.


jt411 ( ) posted Thu, 29 March 2012 at 1:14 PM

Antaran,

I actually don't own Carrara ERC; I just read up on it over at the DAZ forums. It was 1/2 off the other day, but I missed the dang sale!

Another really easy solution is to use Carrara's Multichannel Mixer.

If you're using a texture map in the Glow channel for the planet's city lights, simply use that shader tree as the first source in the mixer. (The whole tree) Copy the first source into the second source and get rid of the lights. For the blender, choose "Value 1-100"

Once everything's set up, you'll be able to animate the blender's slider to transition between the two different shaders. (One with the lights on and one with 'em off)

After that, it's just a matter of playing around with the keyframes to make the transition coincide with whatever lights you're using. 

The most important thing to remember is that there's NO CHEATING in 3D!!!

JT


Xerxes0002 ( ) posted Thu, 29 March 2012 at 11:26 PM

just to let you know everything is back on sale for a couple of days


MarkBremmer ( ) posted Fri, 30 March 2012 at 12:24 AM

file_479980.jpg

Hi ThromArcadia, 

JT is right, there is a plug-in for this by Digital Carvers Guild called Shaders Plus. That little plug has a ton of different uses of which the glow is only a part. My favorite, the Bevel option which you can use to make hard edges look beveled without having to model them – it's a great time saver. 






Antaran ( ) posted Fri, 30 March 2012 at 12:43 AM

Mark, this is wonderful!

Please share how you've done it :). I have Shaders Plus and I'd love to be able to replicate this effect. (And maybe learn a bit or 2 about using the plug-in more).

I love SCG plug-ins, but one of the problems I often have with them is lack of good illustrations with examples of how each function works and what it could be used for.


MarkBremmer ( ) posted Fri, 30 March 2012 at 9:41 AM · edited Sat, 31 March 2012 at 5:32 PM

file_479991.txt

Hi Antaran,

The file is attached to this post. Just change the .txt suffix to .car so the file name becomes Glow.car

Shaders Plus is used at the very top level of the shader so instead of the usual Multichannel. The effect is the Shadow Glow option from the Shaders Plus lighting models. 

There are a couple of other little shader tricks in there you will see too.

Mark






jt411 ( ) posted Fri, 30 March 2012 at 11:33 AM

This is gonna drive me crazy; I could've swore that there's some plug-in that alters shaders based on light and object proximity.

Mark-

Didn't you make a Carrara video of one sphere "burning" its way through another sphere? (I could just be losing my mind)

And Shaders Plus is worth its weight in gold. Selective Lighting and Lighting Control are 2 things I can't live without!

JT


Antaran ( ) posted Fri, 30 March 2012 at 11:55 AM

Mark,

Thnak you!

It's even much simpler than I thought it would be. Amazing. Thank you!

I miss your Carrara Dark Arts :). I think your plug-in expertise would make great material for that section.

Thank you again for the scene!

Antara.

 


ThrommArcadia ( ) posted Fri, 30 March 2012 at 12:01 PM

Thanks everyone!

Mark, that's exactly what I was thinking.

Yeah, I think it's time I picked up Shaders Plus.  I have their Starbright plug-in and love it.

I have ERC, and I never really thought to try that with textures... still have to get used to using it.

And yeah, Mark, I swear I remember seeing the video jt411 mentions.  Where was that?


MarkBremmer ( ) posted Fri, 30 March 2012 at 12:22 PM

I did - that was a while ago! You can see it here though: **http://www.youtube.com/user/Sparetime3x/videos **

I love, love, love doing tutorials. Just been pleasantly busy actually doing 3d jobs!






ThrommArcadia ( ) posted Sat, 31 March 2012 at 4:34 PM

I went crazy and bought the Shaders Plus, Shader Ops, Shader Ops 2, Enhance:C and Anything Goos from DCG.

What fun!!

Just playing, but I've uploaded an image to my gallery doing a quick little replicate of this space station plus I couldn't resist, I used anything goos on a starship model from Daz to give the edges that worn paint look.

http://www.renderosity.com/mod/gallery/index.php?image_id=2315332&np

Yep, lots of fun has just been added to my shader tab!

(I too would love if you ever get the time to do some more tuts with an eye to plugins, Mark.  I learned a ton from your complete tutorial set for C7Pro from VTC, you're a good teacher.)


MarkBremmer ( ) posted Sat, 31 March 2012 at 5:29 PM · edited Sat, 31 March 2012 at 5:31 PM

Sweet image.

DCG's plug-ins are fantastic, no question about it. Personal opinion, Enhance:C is to die for!

I'll see what I can do for some more tutorials – you know, for education to everybody and personal, mental therapy therapy!






Kixum ( ) posted Sun, 01 April 2012 at 6:32 AM

My death star image used the DCG plug in you're talking about here.

 

There are a few other things you can do with translucency but it has limitations.

-Kix


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.