Jump to content

GI in VOPs?


stu

Recommended Posts

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

well.. just as suspected....the light does not bounce enough times...

some cool stuff happening under the first step, but that's about it...hmmm...the model really needs an upgrade to do more bounces and fill the environment....once that happens, this scene is a perfect testbed ;)

thanks, stu...

Link to comment
Share on other sites

  • 1 month later...

Wow, I have no more to say really.

I have something to ask though... How do you guys know this? Yes, it's a very basic, and yet stupid, question. But I'm quite interested in science and photography.

Did you study this? (In order to achieve these effects)

Link to comment
Share on other sites

I can only speak for myself, but I just read the code for the radiant shader that was posted in the codex a while ago....once you get what the intention is, you can start elaborating on it.....

some amount of high-school math and physics never hurts of course.... :)

Link to comment
Share on other sites

Oh, I thought you came up with the whole idea. For a second I thought you've been really studying this.

So it's basically implementing things that are stated in these Siggraph papers and such?

Still though, it's impressive.

Link to comment
Share on other sites

Oh and Jason, you said "Nice pictures!" In my opinion, these are one of the best Global Illumination effects I've ever seen, if not the best. I mean, the Rubix (sp?) cube is amazing!

Houdini is so powerful.

Link to comment
Share on other sites

Hi all,

Thanks for the comments, and I'm sorry for the delay - I've been away from my desk for awhile.

Render time on the original cube image at 512x512 was around 5 minutes. I'm in the process of making a cleaned up file to post here, so I look forward to any improvements that anyone can make to the process.

In regards to my background, it's pretty much what sirogi mentioned above. I just keep my eyes open and pay attention to people smarter than me! Lot's of SIGGRAPH papers and a natural curiousity doesn't hurt either.

Here are two images representing all of the indirect and direct light contributing to the scene.

stu

post-9-1040175079.jpg

Link to comment
Share on other sites

uhhh...I tried! :)

I'm not telling the result :none:

must have done something wrong with the otherwise simple deep raster tab, and didn't investigate it much...tell you what...you can grab the latest file and check out in VOPS which are the variables that give you the different passes (real easy to see...they all pipe in a big switch VOP) then try to grab them from a deep raster render....good luck!

The latest iteration does make the compositing in the shader, but I found you do get nicer results if you render the 2 separate passes stu was talking about and composite manually....

And I've been playing with mentalray, judging by the controls, I guess what we're doing is very very similar to MR's finla gather!!! of course they have a much more optimized sampling algorthm! nevertheles it's cool! :)

cheers, everyone and merry Xmas!

Link to comment
Share on other sites

Where's the latest file? Isn't it the radiant_bis link available in the shaders section? I just downloaded it today.

I tried today too with somewhat better results than none. :) For some reason, when I export the different layers, I somehow ruined the Cf layer. If I delete my 5 Parameter VOPs that do the exporting, then it works again. Then I thought that I must have named my layers somehow to conflict with VEX. So I prefixed r_ on all of them and still no dice. Anyhow, so then I ignored that I just took the deep raster into the compositor. Then I gave up trying to composite it trying to figure out how to do the equivalent of what the softlight_inline VOP was doing. I supposed I was being a bit stupid trying to do it all with simply Composite COPs. I didn't try using the Pixel COP because that seemed a bit too much like cheating.

Anyhow, for anyone who's interested here's what I did. Create 5 parameter VOPs and name each of them appropriately. I prefixed all the parm names with r_ for fear of collision with VEX. After you do that, toggle on the Export Parameter option and change the type to 3 Floats (Vector). Now wire each of the Parameter VOPs appropriately. So that takes care of it in VOPs. Now in the Deep Raster tab of the Mantra ROP, put in your exported VOP parameter name twice in the first two parameters of each layer. That's it. Now you can render and it will give you a deep raster.

I probably screwed this last step. I managed to get correct looking r_diff_tint and r_specular layers but my r_diff_shade layer was all yellow. I didn't try to understand the VOPnet enough to make it do what Stu did though. Probably a lot simpler if I made it output less layers.

Oh yeah, the other thing I did when making my COP network was I created a custom COP optype that did the simply operation of take a layer, deleting everything else, and rename it to C. That was simply so I could split it out all the layers for me to easily use Composite operations.

Merry Xmas to everyone too!

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I finally got around to making a demo file (hopefully it works!)

1. Render the radiant shaded objects using the first step mantra output driver. 2. Render the phong shaded objects using the second step mantra output driver. 3. Add these two images together in the compositor using a plus COP, save the resulting image, and apply it to a constant shaded VEX shader as the diffuse texture map.

4. Render the radiant shaded objects as well as the constant shaded objects (which are set to render phantom) using the third step mantra output driver.

5. Take the result of step 4 (which represents all of the indirect light in the scene) and add it to the result of the phong shaded render in step two (which represents the direct light in the scene) in the compositor using a plus COP.

6. Complain to me because it takes too long.

All of the output drivers respond to the appropriate groups so you shouldn't have to turn any objects on or off - just point and shoot. Let me know how it goes!!!

stu

radiant_demo.zip

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...