Digital Art Zone

 
     
Help with a Shader
Posted: 08 October 2012 10:28 PM   [ Ignore ]
New Member
Avatar
Total Posts:  6
Joined  2005-04-08

A quick (or not so quick) question: Is there any way to access the level of illumination using a shader? I realize that Shadow Glow (in the DCG’s Shaders Plus collection) turns the Glow channel on or off depending on the lighting, but it only works on the glow channel of its subshader. Is there a more general way to produce a grey scale indicating how much light is falling on a given point? For example, to use in a mixer or color gradient?

Hopefully there will be an easy/obvious answer… *crosses fingers*

Wok

Profile
 
 
Posted: 09 October 2012 06:24 AM   [ Ignore ]   [ # 1 ]
New Member
Total Posts:  14
Joined  0

My Lit shader does something like this.

http://www.des-web.net/html/lit.html

There are a couple of samples here- http://www.des-web.net/html/samples.html

There are some limits as to what it can do, but maybe it will do the job for you.

Markd

Profile
 
 
Posted: 09 October 2012 12:07 PM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Total Posts:  6
Joined  2005-04-08

Thanks Mark! I looked at the Lit shader when I was doing my own research for this question, but it didn’t seem to be quite what I wanted. It’s a lot closer than anything else I’ve seen however. (I’ve been looking for an excuse to pick up your Shoestring Shader pack; perhaps the image I have in mind will be the final impetus to do so!) I do have a few questions for you about both the Lit shader and the Shoestring Shader pack:

1.) How hard would it be to let the shader return a grayscale value, indicating the degree of illumination?
2.) How does the shader respond to negative lighting? Does it simply throw away the sign?
3.) As far as I can tell the shaders are currently in alpha for Carrara 8. Do you have an idea of when they might be into beta or (preferably) finished?

Thank you very much for your help with this!

Wok

Profile
 
 
Posted: 11 October 2012 06:25 AM   [ Ignore ]   [ # 3 ]
New Member
Total Posts:  14
Joined  0

Hi Wok-

1 Have to check, but I think it does this already.
2 Have to try this too- not sure that negative lights existed when I wrote it.
3 They are finished, I’ve just been too lazy to promote them. There is one slightly newer build that includes a more detailed install message for when people don’t have privs on, but that’s it.

BTW, you can try them out before buying, and see if it does what you want.. . .

Markd

Profile
 
 
Posted: 13 October 2012 04:26 PM   [ Ignore ]   [ # 4 ]
New Member
Total Posts:  14
Joined  0

1) Ok, it does this, but not in response to the BRIGHTNESS, just the range and cone falloffs. Looks like I started to add the brightness into the eqn, but never did… not sure why.
2) Does not currently react. How would you expect it to react?

Profile
 
 
Posted: 15 October 2012 11:48 AM   [ Ignore ]   [ # 5 ]
New Member
Avatar
Total Posts:  6
Joined  2005-04-08

Sorry for my tardiness in replying; I finally got to go on vacation on the condition that computers stayed home. Thanks for checking into this for me; I think I should just install the trial, and see how it works for the image I have in mind. The only issue I was anticipating would possibly come from soft shadows; I was hoping for a soft transition from the lit effect to the dark effect. (I may be able to fake that using glow, however.)

As for negative lights, honestly I had no idea how they should react. (I may have had some thought about how it might be a suitable workaround, but I have no idea what I was thinking now… vacation time has wiped my brain!) I haven’t quite figured out how to best use negative lighting yet, anyway. Anyway, let me try out the Lit shader as currently written, and if it’s not quite what I had in mind I’ll (hopefully) have a clearer idea of what I want!

Thanks again,

Wok

Profile
 
 
Posted: 15 October 2012 12:14 PM   [ Ignore ]   [ # 6 ]
Member
Rank
Total Posts:  199
Joined  2008-02-26

You could try faking it, putting glow in the glow channel, then a lightbulb inside what is supposed to be glowing, and putting it to the intensity and color you need. You will have to add the glowing figure to the exclude list in the light bulb. That’s all I could come up with for now.

Profile
 
 
Posted: 15 October 2012 01:09 PM   [ Ignore ]   [ # 7 ]
New Member
Avatar
Total Posts:  6
Joined  2005-04-08

Ok, now I remember why I wasn’t sure if Lit would work for what I had in mind. Lit works very well with respect to the light itself, but it does not take into account any shadows except those cast by the object itself. That may have been where I’d been going mentally with the negative lights—If I could set up some combination of lighting and negative lighting that would give the shadows I wanted, then using Lit to produce the shading effect…

Hmm, I’m thinking now that my best bet may be to render it in multiple passes, and just go with post work…

Thanks for helping me think through all of that! wink

Wok

Profile
 
 
Posted: 16 October 2012 09:55 AM   [ Ignore ]   [ # 8 ]
New Member
Total Posts:  14
Joined  0

Yeah, it isn’t a ray tracer! wink

Good luck

markd

Profile