PDA

View Full Version : how to project object color information to particles? (krakatoa camera projection?)



piotrek255
April 19th, 2009, 02:12 AM
I work in 3dmax. here's more info on this awesome effect

"Krakatoa supports depth and motion blur, alpha, matte and UV coordinates (projected from the camera)."
link - http://www2.nextlimit.com/rflabs/?p=18 (http://www.anonym.to/?http://www2.nextlimit.com/rflabs/?p=18) (just scrool down till you see a blue car)


here you can see the explanation of the effect http://www.studiodaily.com/main/richmedia/Click-thru-tutorial-Frantic-Films-Krakatoa_8500.html (http://www.anonym.to/?http://www.studiodaily.com/main/richmedia/Click-thru-tutorial-Frantic-Films-Krakatoa_8500.html)

(the middle flash video "Watch an example of the what Krakatoa can do...")


but they dont say in detail how they projected color to particles by rendering from different camera angles http://forums.cgsociety.org/images/smilies/shrug.gif anyone knows how to do that? i searched tons of forums and sites. The plus is that i understand krakatoa a lot better now, but this effect is still a mystery to me.

PS: i didnt really know where to post this, but i found this tutorial section later on

nomiakasu
April 21st, 2009, 11:44 PM
The technique is described here:

http://www.franticfilms.com/software/support/krakatoa/camera_mapping_particles_using_dataflow.php

I haven't had any success personally as I don't have the required Orbaz Box #3 plug-in for Max and my maxscript skills are virtually nill.

Good luck. It was hard getting my head around the technique involved but worth it I think for the understanding of the ingenuity at Frantic Films.

Bobo
April 28th, 2009, 12:16 AM
Hi!

Here is some more information about this effect.

There are several ways to achieve it, but the basic idea is the same.
1. We store the original position of each particle in a Mapping Channel when the particle is born
2. We move the particle in space using forces, but derive the color based on the position stored in that Mapping Channel (see below)
3. The Camera Mapping uses the Mapping Channel data to find out what color is in the pixel where the particle would have been if it had not been moved by a force.

The result is a "sticky" color effect.

As you can see in the original video which was btw recorded back in 2007 a day before Siggraph, the projection goes through the whole cloud of particles, so it is a rather "fake" effect, but cool nevertheless.

When we did this for the Mini demo back in 2006, we used our own inhouse Camera Mapping plugin which already had a checkbox to enable position data from a Mapping Channel (due to the amazing brain of our RnD lead Mark Wiebe who had thought of eveything ;)) Obviously, nobody outside of Frantic has access to that plug-in, so once we released Krakatoa, we had to find workarounds to achieve the same so people can recreate the effect.

The tutorials you can find on the Krakatoa site use Box #3 or alternatively the same code in a Script Operator to emulate the same camera projection our plugin was performing more or less automatically.

Two months ago I wrote a fourth approach which was published by Studiomonthly, but some people experienced problems with some of its steps on 32 bit systems (in fact I could repro the problem on my old 32 bit machine at home), but until today we still cannot figure out what is causing that, as 32 bit systems in our office don't show this error.
This alternative approach goes like this:

*You render an animation of the object using Scanline, mr, VRay, whatever.
*You take a PFlow and distribute particles on an object using Position Object operator.
*You assign the color of the above rendering to the particles using a Dynamic Material operator containing a Standard material with a Per Pixel Camera Map and a Bitmap Texture underneath it.
*You save these particles (without any motion, but potentially with an animated camera) to a PRT sequence. The result is a sequence that contains the Camera Mapping in the color channel already.
*Then you create a second PFlow and use Krakatoa File Birth and Krakatoa File Update to load that PRT sequence including its Color channel back into PFlow.
*You uncheck the "Position Channel" option in the Channels setup dialog so that particles are loading only ID and color.
*Now you can apply any Force to the particles to move them around, but their color in Krakatoa will be the original projected image initially saved with the PRT file.

So far, I mentioned 4 different ways to do the effect.
Last month we added a fifth method, but you will have to wait for Krakatoa 1.5 to ship to see it. It will blow your minds :) :D


Cheers,
Bobo