PDA

View Full Version : Sketch & Toon :transparency and refraction


JoelOtron
06-02-2006, 03:42 PM
Using sketch and toon to generate storyboards from my prebuilt 3d scenes. Except for a few workarounds, (like having to redo SPD as straight displacement :( )--its going great and a lot of fun.

I have some shots that include transparent objects that contain objects within and are warped via refraction of the parent object.

I havent figured out a way for S&T to pick up the outlines of the inner objects--I just get my parent objects stroked. To account for this I tried rendering the inner objects separately---but realised this wouldnt work since the warped form casued by refraction is lost. Going back to the documentation/examples on the disk--but in the meantime--if anyone could offer a suggestion that would be much appreciated.

wesware
06-02-2006, 03:50 PM
Hi there.
Sorry not really sure how to do that in Cinema. My guess... you can't.
Kai will probably chime in on it.

Would there be a way capture the refraction as a greyscale gradient and then use that as displacement in AE or PS? Probably a dumb thing to say :)

wesware
06-02-2006, 03:52 PM
Oh wait... are you saying that ST does warp the lines as long as you have the container or refracter ST'ed as well? Didn't know ST could do lines that are refracted.
Veeeeery intereeeesting.

JoelOtron
06-02-2006, 04:02 PM
Ahh--sorry wesware ---maybe I didnt explain the whole precess well.

I am actually rendering out each scene straight first (with lighting materials etc). So I start with a regular 3d snapshot.
Then I rerender the scene via S&T. So when I line up my s&t render on top of my full render--there are discrepancies---since I have refraction in my full render and no refraction in my "line" layer. I may just have to pull out the old pen and do the refracted line by hand.

I get the feeling too that this cant be done in S&T. I can render hidden objects by assigning them their own sketch material--but dont think refraction can work---probably for the same reasons SPD wont work.

neonghost
06-02-2006, 04:39 PM
Ahh--sorry wesware ---maybe I didnt explain the whole precess well.

I am actually rendering out each scene straight first (with lighting materials etc). So I start with a regular 3d snapshot.
Then I rerender the scene via S&T. So when I line up my s&t render on top of my full render--there are discrepancies---since I have refraction in my full render and no refraction in my "line" layer. I may just have to pull out the old pen and do the refracted line by hand.

I get the feeling too that this cant be done in S&T. I can render hidden objects by assigning them their own sketch material--but dont think refraction can work---probably for the same reasons SPD wont work.

Maybe I'm not understanding what you need, but sketch appears to work fine with refraction (surprise to me) - but this will not work when sketch is used as a post effect because, well, then it'll just be a post effect.

Here's a scenefile (http://www.realityforge.net/files/refracted_sketch.c4d) with working refraction/transparency.

http://www.realityforge.net/files/refract.gif

JoelOtron
06-02-2006, 06:19 PM
Thanks neonghost--I'll have a look at the file.

JoelOtron
06-02-2006, 06:24 PM
Hmm---not sure yet why your file is working and mine wasnt...

But Thanks! (thumbsup emoticon here)

LucentDreams
06-02-2006, 07:21 PM
yes sketch and toon works with refraction, reflection would be the only limitation, so if your using a reflective refracting material you may stillget discrepencies

JoelOtron
06-02-2006, 07:55 PM
ok thanks--Still cant get refraction to show up---or anything under the surface of the parent object either for this particular file. I'll have to dissect it later. Thank you all for your help .

LucentDreams
06-03-2006, 08:56 AM
hey joel sorry for the late response, cgtalk isn't behaving well.

I had a play around to see what the problem might be and I think I figured it out.

when sketch a sketch material is made it creates a sketch setting int he post effects tab or the redner settings, in there is a shading tab. this has otpions for background and obejct shading, to indicate a flat color or stepped shading etc. When an object is "sketched" or rather, has any sort of sketch line effect. It recieves this shading setting unless you use a tag to overide it. The shading by default cause stepping, I believe 6 steps. this is whats ruining your refraction I bet, try turning setting it to none, and should render fine.

JoelOtron
06-03-2006, 09:05 PM
Thanks Kai---played with the different sahding settings. My goal is just to use sketch to create pen and ink outlines (and hatching, stippling, etc) with solid white fill & background--so havent been using the quantised shading settings at all---just "custom" set to white on object and b.g.

I think I found the cause of my problem--and I think neonghost touched on it in his post.
In his example, only the spline and cube objects are assigned the sketch shader---they are the background objects. The front object (sphere) isnt assigned a sketch material--it is rendering normally--with no post effect. This allows the rays to pass through and create the refraction distortion which are then translated onto the sketched objects.

So I guess this is the limitation (unless Im still missing something). If I wanted ALL objects in my scene to be stroked and filled with solid white (in Neonghosts exxample--the Sphere as well)--I will have to do 2 passes--one with the "refractive" object stroked via s&t, and one pass with the "refracted" objects rendered with s&t. Correct? Or am I not getting it?

JoelOtron
06-03-2006, 09:13 PM
Actually --a workaround for this issue would be (unless Im severely retarded and totally missed the practical solution) to render my frontal objects normally with transparency and refraction---but use the old Pedersen "Shades of cell" aproach and use fresnel in the diffusion channel to create my faux s&T ink lines. Been using diffusion fresnel anyway as a workaround for objects that use spd.

EDIT--below is a ROUGH test showing this workaround and a "somwhat" desired effect.
The reasin I dont like using diffusion channel for my line work is that its harder to control the clumping of dark patches.

Spheres= S&T strokes.
Cubes = fresnel diffusion , fresnel transparency.

I can now layer this pass over my full surfaced/lit scene and know that all will line up perfectly.

LucentDreams
06-03-2006, 09:44 PM
ack never thought that'd come up again ;)

actually the front object can have a sketch material but needs to have no sketch shading on it. I'll make an example when I have some time, busy cinebenching my systems right now.

JoelOtron
06-03-2006, 10:06 PM
I'll make an example when I have some time, busy cinebenching my systems right now.

No Need--Got it! thanks!

Seemed a bit of a convolulted way to set up--but it worked.
I set my forward object to "off" for display color, but then set my "inner" objects to custom = white.

Newstream
06-04-2006, 12:22 AM
Well since we're on the subject of S&T.... Despite experimenting with various AA settings, I often find S&T lines to be jagged and less crisp (and a heck of a lot slower to render!) than the quick and seemingly effortless way clean lines are produced with C4D's inbuilt Cell render. Kinda makes one wish that there was an extra "Cell pass" available in the MultiPass options. That would save one from having to render out two versions of an image for compositing in PhotoShop when producing Illustrations.

Overall, S&T's a brilliant module which offers tremendous control.
As a workaround when rendering other styles and line types than the limited offerings of cell render, one can sketch-render out an image at twice the desired size, downscale it and then apply an unsharp mask to it in PS. This usually yields good results and makes the overall look of the lines better.

BTW, Does anyone know the best AA settings (or combination) for getting crisp "cell render looking" lines in S&T? Is a bad idea to combine S&T's own AA settings with C4D's regular AA settings...?

Cheers / Alex

http://static.flickr.com/52/159623235_0128557b45_o.jpg

neonghost
06-04-2006, 02:30 AM
No Need--Got it! thanks!

Seemed a bit of a convolulted way to set up--but it worked.
I set my forward object to "off" for display color, but then set my "inner" objects to custom = white.

another to do this is to add a Sketch render tag to your foreground objects and turn off allow shading. Then you can assign a sketch material and the foreground lines will still render with the objects inside showing through. Any time you add a fill material (and this is always defaulted to your shading property in the render settings) it will ignore transparency.

neonghost
06-04-2006, 02:31 AM
Well since we're on the subject of S&T.... Despite experimenting with various AA settings, I often find S&T lines to be jagged and less crisp (and a heck of a lot slower to render!) than the quick and seemingly effortless way clean lines are produced with C4D's inbuilt Cell render. Kinda makes one wish that there was an extra "Cell pass" available in the MultiPass options. That would save one from having to render out two versions of an image for compositing in PhotoShop when producing Illustrations.

Overall, S&T's a brilliant module which offers tremendous control.
As a workaround when rendering other styles and line types than the limited offerings of cell render, one can sketch-render out an image at twice the desired size, downscale it and then apply an unsharp mask to it in PS. This usually yields good results and makes the overall look of the lines better.

BTW, Does anyone know the best AA settings (or combination) for getting crisp "cell render looking" lines in S&T? Is a bad idea to combine S&T's own AA settings with C4D's regular AA settings...?

Cheers / Alex

http://static.flickr.com/52/159623235_0128557b45_o.jpg

I find pumping quality to Best and antialiasing to Best 2x2 will render very smooth lines. Cinema's AA does interact with S&T when it is not a post effect.

Newstream
06-04-2006, 12:52 PM
I find pumping quality to Best and antialiasing to Best 2x2 will render very smooth lines. Cinema's AA does interact with S&T when it is not a post effect.

Thanks for that tip.
Cheers / Alex

JoelOtron
06-04-2006, 07:00 PM
another to do this is to add a Sketch render tag to your foreground objects and turn off allow shading. Then you can assign a sketch material and the foreground lines will still render with the objects inside showing through. Any time you add a fill material (and this is always defaulted to your shading property in the render settings) it will ignore transparency.

Thanks neonghost


@badtastic--nice samples--and xtra nice presentation.

CGTalk Moderation
06-04-2006, 07: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.