We have posted a new tutorial showing how to recreate the camera projection map effect seen on the Mini Cooper image we use so much to promote Krakatoa ;o)
http://www.franticfilms.com/software/support/krakatoa/camera_mapping_particles_using_dataflow.php
The original animation was created using an in-house Camera Mapping shader which is not available publicly, so we needed an alternative…
The new tutorial recreates the same look using only Particle Flow operators - either Box #3 Data Operators or a Script Operator (which is about 7 times slower to evaluate, but still usable).
Hey there,
I am having a little trouble with the demo scene file… whenever I render the scene through the
Krakatoa GUI the teapot comes out Purple… I haven’t changed any of the settings
just opened and straight render through Krakatoa. any Ideas on this?
I have the demo of box3 installed as instructed in the tutorial but I have no joy getting the camera
mapping to work.
any help whatsoever would be greatly appreciated.
thanks
AFAIK, there two versions of the Box #3 demo - one that can be used interactively but cannot render, and one that can render but cannot be used interactively.
You might have installed the former. You might need the full version of Box #3 to get it to work, but I cannot tell for sure. Try using the MAXScript approach instead.
Thanks for the quick reply…
I’ll give it a whirl the MAXscript way.
Thanks again
Hey Bobo,
I have been giving the MAXscript version a go… but am having a little trouble running the script,
I launched the KrakatoaCameraMapping_Dataflow.max file and tried to run the script that’s on the tutorials page,
But I get an error…
–Type error: Call needs function or class, got: true
I’m sorry if there is a Fundamental thing that I am missing, I was hoping to get this demo version working
and then replace it with the project image and geometry I was wanting to use.
It would be really great to get this working,
Thanks in advance
on ChannelsUsed pCont do
(
pCont.useTM = true
pCont.useVector = true
pCont.useMatrix = true
pCont.useAge = true
)
on Init pCont do ( )
on Proceed pCont do
(
local count = pCont.NumParticles()
local theTM = inverse $Camera01.transform
local theTan = tan ($Camera01.fov/2)
local theBmp = $Plane01.material.diffusemap.bitmap
for i in 1 to count do
(
pCont.particleIndex = i
if pCont.particleAge == 0 do pCont.particleMatrix = pCont.particleTM
local thePos = (pCont.particleMatrix.row4 * theTM)
local theIPos = [1.0 + thePos.x / -thePos.z / theTan ,
1.0 + thePos.y / -thePos.z / theTan * 1.3333 , 0] / 2
pCont.particleVector = ((getPixels theBmp [theIPos.x*(theBmp.width-1),
(1.0-theIPos.y) * (theBmp.height-1)] 1)[1] as point3)/255.0
)
theBmp = undefined
)
on Release pCont do ( )
The script must be copied into a Script Operator in Particle Flow in place of the Data Operator. It cannot be “run” as a regular script, it is the code for the operator.
Thank you for your help… I got it to work in the end.
Cheers
Hey there,
i use max 2011 and krakatoa v1.6
I have been giving the MAXscript version a go…
whenever I render the scene through the
Krakatoa GUI the teapot comes out Purple… I haven’t changed any of the settings
just opened and straight render through Krakatoa. any Ideas on this?
Is my usage wrong?
From the page:
thinkboxsoftware.com/krak-ca … particles/
hey,Bobo
i just try the Animated Bitmap Sequences with the code
on ChannelsUsed pCont do ( pCont.useTM = true pCont.useVector = true pCont.useMatrix = true pCont.useAge = true ) on Init pCont do ( ) on Proceed pCont do ( local theTime = pCont.getTimeEnd() --get the current time in PFlow at time theTime --set the time context so camera transform is taken from the right frame ( local count = pCont.NumParticles() local theTM = inverse $Camera01.transform local theTan = tan ($Camera01.fov/2) local theBmp = openBitmap $Plane01.material.diffusemap.filename --open bitmap by filename theBmp.frame = theTime.frame as integer --set the frame of the bitmap to the current frame --you can add or subtract an integer from the above time value to get an offset --if first frame does not play on frame 0 for i in 1 to count do ( pCont.particleIndex = i if pCont.particleAge == 0 do pCont.particleMatrix = pCont.particleTM local thePos = (pCont.particleMatrix.row4 * theTM) local theIPos = [1.0 + thePos.x / -thePos.z / theTan , \ 1.0 + thePos.y / -thePos.z / theTan * 1.3333 , 0] / 2 pCont.particleVector = ((getPixels theBmp [theIPos.x*(theBmp.width-1), \ (1.0-theIPos.y) * (theBmp.height-1)] 1)[1] as point3)/255.0 )–end i loop theBmp = undefined )–end time ) on Release pCont do ( )
but it does not work,everytime i just got the alpha,so how to do it?