PDA

View Full Version : animating a building constructing


anthonymcgrath
07-08-2002, 01:04 PM
got a job on where the client wants us to do animate a structure building up in a brick by brick fashion. does anyone have any good tips on starting points here? here's what I've got.

-obviously, animated textures to start with would help out in the roof construction. I'd animated the internal supports building with fast extrusions and use animated txtrs (or just simply masking) to bring the roof surface over the internal support.

-another method I need to research is using particles and instances. If I can instance them so each particle is a brick, perhaps I can use a texture to control the visibility of each instance? if anyone has done something similar, can they get in touch or reply? I guess the advantage with this is its procedural approach and would help greatly on areas of large duplication with little differences.

-animated booleans are a third option.

-a recent programme called 'civilisation' was broadcast (uk). apparently it featured animated building construction heavily.
this is the kind of thing we want to do.

Jhonus
07-08-2002, 01:13 PM
Do you need cranes and the like?

Sounds like a big job.

The easiest thing i can think of is to do a screen capture or render every couple of minutes as you build it in 3D. But that depends heavily on the style they want.

How realistic do they want it?

The other thing you could do is use animated masks for external surfaces, like floor boards or gib board. just render out the entire surface on a layer and animate the mask to reveal it bit by bit.

anthonymcgrath
07-08-2002, 01:30 PM
rendering every coupla mins as you build!? Can you imagine this with the client factor involved?!!!

"can you go back and rebuild the model. can you change this bit and that bit up there? can you have it done in an hour?"

my my, that would be funny.


masks will def work with as you mentioned but I'd love to try n suss out some nice procedural method for large areas of repetitive construction. have to talk to the coder on this method tho.

I think its gonna take a plethora of methods but thanks anyway. keep the posts coming ppl. :airguitar

svenip
07-08-2002, 06:20 PM
you could use the naming of your bricks. if you do it right and name them something like this

brick_01...brick_100

then you could use mel to animate the visibility for the bricks in a frame and then just render out as an animation.

anthonymcgrath
07-15-2002, 02:56 PM
hey svenip, you couldn't show me how to write the scripting to animate the display of consecutive bricks could you? I'm really a newcomer to the mel side.

svenip
07-15-2002, 03:48 PM
so one aesy one might be this one

float $i;
float $brick_count,$brick,$how_often,$maxFrame;
$brick = 0;
$often = 5; // variable to control at which frames the next appears (5 = every 5th frame)
$brick_count = 20; // how many bricks you have !?

$maxFrame = $brick_count * $often;

for($i=0;$i<=$maxFrame;$i+=$often)
{
currentTime $i-1 ;
setAttr "brick_"+$brick+".visibility" 0;
setKeyframe "brick_"+$brick+".v";
currentTime $i ;
setAttr "brick_"+$brick+".visibility" 1;
setKeyframe "brick_"+$brick.v";
$brick+=1;
}

should work :hmm:

sorry right at the moment i'm a bit lack of time and cannot test everything right out. tonight i will do this.

svenip
07-15-2002, 03:59 PM
sorry just saw that i've forgot something

string $command;
float $i;
float $brick_count,$brick,$how_often,$maxFrame;
$brick = 0;
$often = 5; // variable to control at which frames the next appears (5 = every 5th frame)
$brick_count = 20; // how many bricks you have !?

$maxFrame = $brick_count * $often;

for($i=0;$i<=$maxFrame;$i+=$often)
{
currentTime $i-1 ;
$command = "setAttr \"brick_\"+$brick+\".visibility\" 0;";
eval $command
$command = "setKeyframe \"brick_\"+$brick+\".v\";";
eval command;
currentTime $i ;
$command = "setAttr \"brick_\"+$brick+\".visibility\" 1;";
eval $command
$command = "setKeyframe \"brick_\"+$brick+\".v\";";
eval command;
$brick+=1;
}
:hmm: :hmm:

anthonymcgrath
07-16-2002, 12:52 PM
wondered why it weren't working!

:bowdown:

svenip
07-16-2002, 12:55 PM
can you send me your file, then i can look and fit the script.

:bounce: :bounce: :bounce:

anthonymcgrath
07-17-2002, 02:47 PM
our coder guru managed to sit down and get something running using what you (svenip) wrote and tweaked it a bit. it were quite enlightening actually as its pretty much my first foray into mel. gonna take books home and swot up!

I dont actually have a scene yet. (well, polycube scaled 2units in x, and duped another 9times 2units in xtranslation for test purposes!)

I'm just doing some research on the effect first. I'm probably gonna use masks for walls and architecture in the distance, but I thought it would be nice if I could get the foreground walls that will be in shot to build in sequence using actual brick visibility.

would be even cooler if I can get the same script to control the shader transparency so I could get them to fade up as opposed to pop up.

anyway svenip, thanks for your help on this matter. if you think up any other ways then they'd be most appreciated.

thanks again
ant
uk

CGTalk Moderation
01-13-2006, 10:00 AM
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.