stu Posted October 23, 2002 Author Share Posted October 23, 2002 Here's a hack I used to get inter-object colour bleed using sirogi's shader: 1. Render the scene as is with sirogi's radiant shader, and then save the image. 2. Make a dummy object that channel references every object in the scene and set it's UV coordinates to project from camera (the one you rendered the previous image) 3. Set up a shader that can take a texture map and is constant shaded - for the map, use the previously rendered image. 4. Apply this constant shaded shader to the object referenced object and in it's render tab, turn phantom to 1. 5. Render everything again, and you're done. It's a hack, but it's relatively painless, and it works (mostly). stu Quote Link to comment Share on other sites More sharing options...
stu Posted October 23, 2002 Author Share Posted October 23, 2002 As an addendum to the previous post, the original objects must have the new object referenced object in their reflection mask field if there isn't an "*" there already. stu Quote Link to comment Share on other sites More sharing options...
stu Posted October 23, 2002 Author Share Posted October 23, 2002 Here's an example: The top image is the initial radiant render without the colour bleed, and the bottom image is the additional radiant render with the colour bleed. Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 cool trick stu!...in-camera "compositing" could come in handy for a lot of stuff.... I'm still kinda puzzled: by intre-object bleed you mean the stuff I highlighted in the image, right? with the latest file I posted (the hippfile, not the optype) you have the option of rendering the bounce light only! (it's the "indirect only" toggle, the spill toggle switches the whole radiant thing on and off...to get the lambertian pass) just type in reset() in a textport (to reassign shaders to objects and cleanup stuff) then use the "mantra_bounce" ROP to render...check out the shader settings after that pass...it sets the toggle on for "indirect only"... oh and forgot to mention....that image is the bounce light only layer...you'll need to composite it on top of another pass....kinda like what you did (cool images)... tell me if that does it for ya! Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 bounce only pass, with a blue environment dome, white radiant on all objects (just posted it caus I like the colors ) Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 -bounce only pass ("indirect only" turned on) -blue env dome -different colors of radiant for every obj... (green cube, wht shpere, red cone) composite this pass over a pass with ("indirect only" turned off) notice how non-radiant shaders still cast a dark shadow on the ground... notice the bright area under the big sphere, it gives the same effect when composited over the other pass in stu's example: brighten and tint the dark areas... try inverting the last 2 images for some trippy results... ok...have to stop posting now... Quote Link to comment Share on other sites More sharing options...
stu Posted October 23, 2002 Author Share Posted October 23, 2002 Ow - my eyes, they burn!!! Cool pictures! Yeah, that colour bleed is exactly what I was talking about - I was just looking for a way to get it "in camera" and out of just 3D (I'm lazy ). After generating that image of just the bounced colour, with what compositing operation would you apply that to the basic image? I'd be inclined to do it additively but the rest of the image is white, prohibiting that approach. I'm having altogether too much fun with this. stu Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 I'd be inclined to do it additively but the rest of the image is white, prohibiting that approach. yup...I know exactly what you're saying...I had other examples where I only generated the inter-object spill simply by hiding the environment dome! you get black wherever there was blue...then you can "add" it to the other layer... in this specific case I chose to multiply it, because I only wanted it to tint the other pass...agreed, that wouldn't "brighten" the underlying layer, sooo...I also looked in alternatives in shake and photoshop (Hard/Soft ligt maybe..overlay was harsh...) that would let you do both at the same time... if we take out the bounce contributionfrom the underlying ...then going the additive way would be ok! (and more intuitive for lights too!) guess I did try that in my initial test frenzy....don't remember....try adding it to a straight lambertian pass... oh yeah.... I tried that....looked "correct"...but not "cool" that's the reason I didn't include it in the shader yet...still have to figure out the compositing bit!... oh...and lazyness rules! ...the productive kind Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 here's what I was talking about: -indirect only...same setup, same shader as above... but with the sky turned off...adding this to a direct lighting pass (lambertian..) would give you cool spill effects... but you lose the dark "contact shadow" bit (technical terms, eh?) PS: the green cube needs some more bias...self-reflection happening there... Quote Link to comment Share on other sites More sharing options...
stu Posted October 23, 2002 Author Share Posted October 23, 2002 Yeah, that contact shadow business is exactly why I chose to do it this way; the areas that shouldn't be receiving light continue not to receive light, and vice versa. I'm trying a render now that has direct light, specular highlights, and direct shadows that also conrtibute to the bounced light. stu Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 hmmm...are you using the newest hipfile or the old optype? I tried rendering straight out of the radiant shader and...it gave me the same look you got with your composite... maybe you're still using the old optype.... that's the image I got straight out of the sahder: Quote Link to comment Share on other sites More sharing options...
stu Posted October 23, 2002 Author Share Posted October 23, 2002 That looks great! I'll check to see which version I'm using. You're refering to the VOPnet version as being the latest, right? stu Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 23, 2002 Share Posted October 23, 2002 yes...and I think I'm onto something else too...inside the innermost loop, we're always multiplying the cumulated color of the rays with Cf...that's why you do see some spill but it's overshadowed by the fact that the area is dimly lit...maybe by changing the core behaviour of the shader, it can brightne and tint the spilled are... ok...I ...really...have...to ...eat! I"ll try not to check back that thread anymore today! CHEERS! Quote Link to comment Share on other sites More sharing options...
stu Posted October 24, 2002 Author Share Posted October 24, 2002 Here's that image I was talking about with the direct lighting and shadows contributing to the spill. stu Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 24, 2002 Share Posted October 24, 2002 NI-CE! I trust you'll post the soluion soon eh? Quote Link to comment Share on other sites More sharing options...
Jason Posted October 24, 2002 Share Posted October 24, 2002 Here's that image I was talking about with the direct lighting and shadows contributing to the spill.stu Very nice! These images are just beautiful! Show us the TECH! Quote Link to comment Share on other sites More sharing options...
stevenong Posted October 24, 2002 Share Posted October 24, 2002 I'll ask the question for everyone. How long did that take to render? Quote Link to comment Share on other sites More sharing options...
stu Posted October 24, 2002 Author Share Posted October 24, 2002 Hey. Same process as described above, except that now I rendered a spec pass and a shadow pass, combined them with the original radiant render, and then used that comination image as the projection from camera onto the dummy phantom objects for the final radiant render, thus tricking it into taking into account the direct illumination for the colour bleed. After this render is done, I add the spec pass (minus the shadow pass), and that's it. Total render time on this image was about 5 minutes (hey - nothing's free) at about twice the resolution I've posted here.. Here's a sequence of images (checkerboards are cool!), from top to bottom: 1. Initial radiant render (skylight). 2. Spec pass minus shadow pass. This image represents all of the dierct illumination in the scene. 3. Second radiant render using the original render plus the spec pass as a texture map projected from camera onto duplicate dummy phantom objects reflected by the real objects. This image represents all of the indirect illumination in the scene. 4. Final image (third image + second image) More to come. Quote Link to comment Share on other sites More sharing options...
stu Posted October 24, 2002 Author Share Posted October 24, 2002 Hey sirogi, Have you tried adding cumulative colour in the shader instead of multiplying it? stu Quote Link to comment Share on other sites More sharing options...
sirogi Posted October 24, 2002 Share Posted October 24, 2002 mmm....spoke too soon....actually the light IS cumulative (otherwise no nice disffuse lighting and color spill...) it just gets multiplied (as per the VEX code of "anonymous" - thanks again man!) at the end with the diffuse color of the object to tint it (which is also correct light behaviour...more or less, the tinting would happen inside the cumulative loop, but since it's a multiplication you can save it to the end)... so that's not the problem.... I guess I figured it out last night (yes, in my sleep...) and I'll work on it today....with a bit of luck, it's all gonna look good straight out of the shader...no multiple passes required...keep those fingers crossed! and did I tell you those are some sweet pics? cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.