View Full Version : is this possible? unorthodox area shadows decay
alright i've been thinking, is it possible for raytraced shadows or mr area shadows to decay based purely on distance from the casting surface to the receiving surface? and NOT by the distance from the light in relationship to the casting/receiving objects.
here is an example:
http://www.galroiter.com/decays.jpg
first one has no decay.
2nd one has a quadratic light decay, the shadows decay gradually accross the image as the distance from the light grows.
3rd one was photoshoped and is my goal, notice how each shadow is individually decayed regardless of the position of the casting cylinder to the area light.
i've tried capturing the same attribute that raytracer returns in the area light which determines the blurriness intensity and use that to control the shadow color but i couldnt find it with the relationship editor.
does anyone have any ideas? (an additive AO pass on top is bad cheat and doesnt work well at all for most objects that are not primitives so that's not a solution)
|
|
Jozvex
07-25-2006, 05:29 AM
Yes! You can do this in Maya. There are probably a few ways (maybe using the RayType shader etc) but the simplest way I can think of is to use a Ramp texture plugged into the light's Shadow Color attribute. When you create the ramp, choose "as projection" as the placement type and then you can position the ramp in space. Using the different Ramp types you can tailor it to different light types (ie, directional light = U or V ramp, point light = circular ramp).
My attachment shows the result of doing just that.
EDIT: Wait a minute I misunderstood you! I was getting you shadows that matched the quadratic light's behavior without any decay on the light. Let me think about that for a sec, hehe.
Jozvex
07-25-2006, 06:11 AM
Hmm, you might just have to render out a shadow pass using a 'caying' (non decaying hehe) light.
I played around for a while but got nowhere, maybe a custom light/shadow shader could also do this but I don't know of any currently existing ones.
:sad:
it might be possible with the Area light, but anyway, you could use light-driven occlusion to fake that.
either multiply the occlusion with the surface luminance node to acieve that (and play with the "decay" distance attr of the occlusion) and then multiply/add that again with/to the base material or use ctrl_occlusion in a similar manner :)
though i think the ctrl_occ way is better, the surf luminance might give sharp shadows, didn't test it.
hey thanks for the replies but both ideas wont work and here's why.
jozvex:
your idea is fine for a plane with cylinders but i want this on complex scenes, i need this totally mathematical not based on ramps and distances because think of a complex object that casts all kind of shadows on it self, impossible to put 1 milion ramps on the object. and yes i want only the shadows to decay not the light's intensity over the scene.
yashu:
what i did was put an AO into the shadow color but the reason this isnt a good solution is imagin a very long shadow.. you need an insane number of samples(too much of a render time) to get rid of the noise and not to mention at big sizes all the detail of the form casting the shadow blends into a blob. so AO isnt a solution either.
what i need is a way to grab the value of distance the raytracer does in the shadow calculation for the blurring/sampling of the area light and plug that into shadow color..that way the same math for the "blurring" will be used for shadow color intensity without any extra calculations.. but i cant mel/code this...can anyone?
Osaires
07-25-2006, 07:50 AM
you chould check out the p_shadow_transparency shader frome puppet.
i think that may be what you need.
I dont have the link here right now but just do a search here at cgtalk for a user named puppet
hm i'll have a look at it
Puppet|
07-25-2006, 09:13 AM
http://www.puppet.cgtalk.ru/download/images/shadow_transp.jpg
You may find description of p_shadow_transparency shader here:
http://www.puppet.cgtalk.ru/download/shadow_transp_e.shtml
I recommend you download last version here:
http://www.puppet.cgtalk.ru/download/shaders_p_3.0b5.zip
victor
07-25-2006, 10:46 AM
is this possible? unorthodox area shadows decayNot that it helps here, but Animation Master actually has a feature that does exactly this.
i may just be stupid but plugging p's shadow transparency shader into a shadow shader slot under mr custom shadow shader in the shading group wont render for me..or just ignore his shadow shader. the light was linked to a dgs i connected this to.
do i need to use p's light shaders instead of the default maya lights for this to work?
Puppet|
07-25-2006, 11:33 AM
i may just be stupid but plugging p's shadow transparency shader into a shadow shader slot under mr custom shadow shader in the shading group wont render for me..or just ignore his shadow shader. the light was linked to a dgs i connected this to.
Just try it with simple scene before with sphere without any light connect.
do i need to use p's light shaders instead of the default maya lights for this to work?
No
the second i try to adjust something in the shadow shader it wont render anymore, just ignores it.
just tried on a new simple scene, plane, sphere... mib_illum_phong and the p transparent shadow in the shadow slot of the SG. ... am i missing something? the mib shadow shader works fine though in the same setup.
Puppet|
07-25-2006, 11:58 AM
This shader works some way like mib_shadow_transparency shader.
Create Sphere, Plane and Point Light
Enable Shadow
Create New Maya Lambert shader assign it to sphere
Create p_shadow_transparency shader and connect it SG of new Lambert
Set Shadow color in p_shadow_transparency to red
Render.
P.S. If you still have problem view Maya or Mental ray log.
i'm sorry i'm such a boob, i forgot this is a fresh os install and your specific shaders are not in the rayrc file. ofcourse once there it works fine, sorry for that.
CGTalk Moderation
07-25-2006, 12:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.