PDA

View Full Version : 9 topology animation


arowana
01-06-2007, 08:19 PM
http://i25.photobucket.com/albums/c88/arowana777/901.jpg

http://i25.photobucket.com/albums/c88/arowana777/9.jpg

Above are some screenshot from my company countdown sequence, its like a needle toy .. I am not sure about the name of this stuff. but I just give u some pictures to described it..

The animation starts with smooth surface. then there is an illusion of water droping, the surface react forming number to countdown.
I noticed same stuff of effects in X men the 1st.. in one meeting they set up position using a fancy and advanced new york map that looks like this stuff. from plain surface then the small bricks are extending and creates a 3d topology map of newyork city..
well I hope you get what I've just described :D


well the artist who did the countdown told me that he link every singgle bricks to a bone. then he insert an animated sequence depth map into the graph editor.. then it automaticly extends based on the level of the depth map.. (he is using lightwave)

I am using max.. and I really want to create some fx like this.. maybe forming a city.. or may be characters that forming from little bricks like this.
I've tried using reactor rigid body. and creates some animated deforming object.. and put it below the surface of the bricks as a deflector. it maybe works but if the bricks are multiplied dozens time.. I am not sure the calculation of the reactor will survive it.. :(

can any body tell me how to do this in max using animated depth map.. any plugins??
thanks alot....

HAPPY NEW YEAR!!!

Nichod
01-23-2007, 04:43 AM
A really good displacement map.

uiron
01-23-2007, 05:49 PM
while it's quite easy to do this thing with scripting, performance would be terrible. you'd have to create that depth map (grayscale, where white represents highest point, black - lowest) as animated sequence in any 2d compositing software, load sequence as animated map, then access that sequence through maxscript and keyframe each cube, basing it's height on color of corresponding pixel in corresponding frame.

arowana
01-24-2007, 09:46 PM
while it's quite easy to do this thing with scripting, performance would be terrible. you'd have to create that depth map (grayscale, where white represents highest point, black - lowest) as animated sequence in any 2d compositing software, load sequence as animated map, then access that sequence through maxscript and keyframe each cube, basing it's height on color of corresponding pixel in corresponding frame.

ahh at last someone giving me a clue on how doing this.. about the max script..err. what's the name of it. try to look for it in scriptspot.
well If u have time maybe u can upload it or give us some example on this, maybe?? :)

regards!!

uiron
01-25-2007, 01:39 PM
this is a script that should do the work for you. you'll have to:
* create a box in a scene, you can edit that to chamfer edges or whatever you want with that, just keep it "a box", as script will space them in a grid according to the bounding box of the object; name this object "Box_Prototype"

* in a 2d software of your choice create your height map sequence. keep it small, say, 100x100 pixels would be more than enough.

* for .bmp or .tga sequences, you'll need *.ifl file that max creates when you open a sequence of bitmaps as animation. you can also save your height map as video format.

* before running the script, adjust some properties there, i commented them. most important is number of boxes to be created, "numRows" and "numCols", on my system 50x50 is quite a lot, so first try with lower numbers, like 10x10.

* in the images you posted before, it looks like it keyframes every second row, so you can get similar behavior by setting "skipRows" or "skipCols" to "true".

* you can run the script now:]



-- setup part

-- path to height image sequence
bitmapPath = "C:\\Doc\\max\\_scripts\\height map boxes\\height01.ifl"

boxPrototype = $Box_Prototype; --box object from the scene to be duplicated
maxHeight = 50; --height of white in max units
minHeight = -50; -- height of black in max units

keyFrameScale = 3; -- "3" means "if image sequence has 3 frames, animation will be 9 frames long"
skipRows = false; --when true, will not keyframe odd rows;
skipCols = false; --when true, will not keyframe odd columns;

-- number of boxes to project your image into
numRows = 10;
numCols = 10;



-- "do not touch" part :]

heightScale = (maxHeight-minHeight)/441.673; -- this number is a length of white color vector, [255,255,255]


-- getting that bitmap sequence from diffuse slot
hmap = openBitmap bitmapPath;


-- box width and height, will be used in spacing box copies
hSpacing = boxPrototype.max[1]-boxPrototype.min[1];
vSpacing = boxPrototype.max[2]-boxPrototype.min[2];


function setHeightByColor boxNode colorValue = (
local p = boxNode.position;
p[3] = (length (colorValue as point3))*heightScale-minHeight;
boxNode.position = p;
)



-- creating as much boxes as there are pixels in bitmap
boxArray = #(); -- this will be 2-dimensional array that will hold all boxes to be animated later
for i=0 to numRows-1 do (
boxRow = #()

for j=0 to numCols-1 do (
boxCopy = copy boxPrototype;
append boxRow boxCopy;

coordsys parent boxCopy.position = [i*hSpacing,j*vSpacing,0];
)

append boxArray boxRow;
)

-- now we animate
for f=0 to hmap.numframes-1 do (
hmap.frame = f;
with animate on (
at time ((f*keyFrameScale) as time) (
for i=1 to numRows do (

if skipRows and ((mod i 2)==1) then
continue;

-- get row colors as one array
imageRowNumber = hmap.height*(i-1)/numRows;

rowColors = getPixels hmap [0,imageRowNumber] hmap.width;
for j=1 to numCols do (
if skipCols and ((mod j 2)==1) then
continue;
setHeightByColor (boxArray[i][j]) (rowColors[hmap.width*j/numRows]);
)
)
)
)
)

CGTalk Moderation
01-25-2007, 01:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.