Jump to content

Editing/combining caustic photon maps?


Recommended Posts

Does anyone happen to know about the anatomy of Houdini's caustic photon maps?

 

I'm using a bunch of subframe renders to combine into multi-segment motion blur for some fast moving fluid, and as I'm generating a caustic map for each subframe already, I was wondering if there's a way to pre-generate them, combine them into a single map, and then pipe that to each subframe render within the same frame.

 

I imagine that might either add more detail (4x5-million photons giving a correspondingly crisper 20-million photon map), or possibly just reducing aliasing.

 

...or of course I might be barking up entirely the wrong tree, and two photon maps combined would just conflict or be meaningless.

 

 

If it *is* possible... is there also a way to separately run the photon-map-prefilter operation after I'd combined them?

Link to comment
Share on other sites

Also, on a more simple note - is there any way to randomize/seed the caustic photon map's sampling pattern?  I know at some point it was tweaked to maintain a fixed sampling pattern to reduce photon jitter between frames, but I'd like to experiment with random patterns if the ability still exists.

Link to comment
Share on other sites

Well, in case anyone else wonders at the answer to this - it turned out it was actually slightly simpler than I'd hoped.

 

You can open and edit .pmap files in SOPs just the same as bgeo files... and it seems combining them is as simple as a straight merge and ROP out as a .pmap file.  The only caveat is that it will proportionally increase the brightness of the map - so two similar maps combined will be double brightness.  You can compensate for that by setting an exposure of -1 stop on the caustic light... -2 stops if you combine four maps together, -3 for eight maps, etc...  (Or, you can set that exposure compensation on the caustic light before generating each component map, and the combined results will then add up to the correct brightness without adjustment)

 

I figured there'd be a way to multiply the brightness levels directly on the point cloud's attributes, but as far as I can tell, none of the per-point attributes actually increase/decrease with photon count... somehow the map just seems to implicity *know* the brightness :-P   Perhaps some kind of meta-data get stored somewhere?  (But then I'd assume it'd lose whatever that metadata was when you bake out the combined photon map, but it doesn't)

No matter anyway, the way I'm doing it seems like a perfectly stable workaround.

 

 

For the photon map seed stuff, it seems Mantra's primary "seed" under the sampling tab affects photon generation sample patterns as well, so that was thankfully straightforward too :-)

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...