PDA

View Full Version : Is this possible to do in C4D?


tjnyc
08-26-2003, 05:16 PM
Hey,

I'm looking to implement realistic 'soft shadows' using a shadow map, not using area shadows.

A setup exist in Maya to create this fake using 2 nulls that define distance between the object and the distance to blur the shadow from the object, as well as to adjust the shadow's density as the distance from the object increase or decreases. I was thinking about accomplishing this with Expresso, but don't know quite how to go about it. If anyone has implemented this could you point me in the right direction.


These are two example of this solution in Maya

http://www.3dluvr.com/pixho/tutorials/dmap/dmap_driven.jpg

http://www.3dluvr.com/pixho/tutorials/dmap/15_depthmapSoftShadow.JPG

Thanks,

Per-Anders
08-26-2003, 05:44 PM
unfortunately we can't drive a lights parameters with textures (aside from volumetrics) so it's going to be pretty much impossible to do just that in cinema... haveing said that is you simply lower the quality and samples of an area light you should be able to get good quality results as fast if not faster than in maya.

tjnyc
08-26-2003, 05:59 PM
I can see the gradient tool being very handy to hookup to the transparency setting and density for shadows which might be what you are referring too when you meant textures(Good idea mdmd_sadie).

I already tried the multi-spot rig to create soft shadows, faster than an area light shadows, but a bit tricky to get it looking right. A faster and easier solution would be a single light solution, but I'll try your solution to see what kind of quality and speed I can get out of it.

Thanks for the response.

Maybe I will suggest this texture option to Maxon.

Brent Turbo
08-26-2003, 06:15 PM
I've used this very technique in Maya before (last week, to be exact) and I found it to be too slow for production, and not good-looking enough for when render time isn't an issue.

I found that a more traditional rig of 9 spots with dmap shadows worked about 4 times faster, and looked just as good. Also, keep in mind that the fake on that website starts to fall apart once animation comes into play.

That being said, I do think it's vital that Cinema eventually gives users more control, a la the node-based Maya, to connect anything to anything else as long as you've got the ingenuity to get it to work. With Maya, it's truly a case of "if you can think it, you can do it." With Cinema, it's more "wait for the plugin or write Maxon!"

tjnyc
08-26-2003, 06:26 PM
Did you use Pixho's or Tom's solution? I also didn't feel Pixho's solution was that fast or looked good in animation, but Tom's solution worked very well for animation.

A light rig is where I would most likely go for animation in C4D to get "realistic" soft shadows, but I would still prefer a one light solution.

I agree on the Maya node issue. Maxon has the right idea with expresso, so lets hope it will extend to other avenues in C4D. A hypershade in C4D like in Maya would really be a show stopper. Also having a script solution would also be great, but no new language to learn, javascript, perl, python or whatever would be the way I would like it to be.

JIII
08-26-2003, 07:33 PM
3Dluver wouldn't let me open those links you posted.

does anyone have a link to the traditional 9 spot method you mentioned brent?

thanks guys

LucentDreams
08-26-2003, 08:02 PM
why not use a hard shadow and the xshadow plugin?

tjnyc
08-26-2003, 08:07 PM
kai,

Do you have a link to that plugin?

thanks,

tjnyc
08-26-2003, 08:33 PM
JIII,

I don't know of a link, but here is a quick and dirty light rig using 5 spot lights. Create 1 spot light, 1 circle, 1 null. Parent the light to the circle in the middle of the circle. Duplicate 4 more of the spot light and place them 12,3,6,9 O'clock. Adjust the brightness to like 30% or whatever you like. Translate and rotate the circle to set your lights in your scene. Now aim constraint all the spot light to the null. The null will act as your aim locator, similiar like in Maya when you hit the "t" hotkey for lights in Maya. Turn on soft shadows and adjust your sampling and resolution the lights to get a nice blur and distance fade. Here are some quick setup I did to illustrate, but it took me like 5 min to set it up so it isn't perfect.

http://www.telescript.com/images/tony/spot_rig3.gif

http://www.telescript.com/images/tony/spot_rig2.gif

Notice the distance fade in the shadow
http://www.telescript.com/images/tony/spot_rig1.gif

tjnyc
08-26-2003, 09:09 PM
Oh, I forgot to mention the render time difference. This setup took 35 sec, and an area shadow with this same setup but with only one spot light active took 56 sec. I am running this test on a dual P2 400Mhz, so it is not that fast, so your times probably will be alot better. Also, adjusting the resolution and sampling could greatly increase or decrease your render time. The trick is to get good quality and good speed.

LucentDreams
08-26-2003, 10:40 PM
pretty nice result, might want to adjust bias and such abit to prevent the soft shadow showing up to much on the bottom of the object

tjnyc
08-26-2003, 11:59 PM
Thanks kai,

Yeah, I forgot to fix the bias, it doesn't stick to the ground the way it should.

CGTalk Moderation
01-15-2006, 11:00 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.