View Full Version : city building up


nelsig
08 August 2007, 07:19 AM
hello

I'm seraching a way to animate a house or city building up from nothing ... emerging from the ground...

maybe is there a way to help animating a lot of objects with mel script ... what I would like to do is to create a surface, the divide the object in any number of polys, separate the polygons, moving the pivot to the base of each poly and the animate like rolling out the polygons from bottom to the top by putting in and out keys.

maybe the scheme could help

http://www.nelsig.ch/cgtalk/melHouse.jpg

is it a complex script to write ? any idea how to do it ?

thank a lot

nelsig
08 August 2007, 04:08 PM
ok to be more explicit of what I'm searching to do

here's a test I just did with some keyframes

all objects have the same keyframes and I then offset the curves in the graph editor... the final shot would have a lot of bricks more...

http://www.nelsig.ch/cgtalk/testBuilding.jpg

and here's a small quicktime (http://www.nelsig.ch/cgtalk/testBuilding264.mov)

thanks a lot for your precious help

Nico

pixlix2
08 August 2007, 10:47 AM
hey, I think it's a nice effect. I've seen something similiar once in a car tv-spot where the hull of the car materialised in this manner.
Have you made any progress yet?
I have thought about a few way to do it and also did some small tests.
First approach was with expressions - one expression per "board", but I realiezd this would be way to slow.
Another way would be to look at the problem on a "per-row-column" This means all the boards in one collumn reside in one hierarchy and are parented under each other.
Next step would be to create a custom attribute on the main group node - something like "unfold" which ranges between 0 and 1. Then you would have to create set-driven-keys for each board by scripting to make them rotate at the right value of the unfold-attribute.

Sphere♥
08 August 2007, 06:56 PM
[...]is it a complex script to write ? any idea how to do it ?[...]You know the steps you want to accomplish, so it should be fairly straightforward. Just figure out the steps required in Maya to do it by hand for a few pieces, then write a script to automate many.

Hmmm, I guess that's not so helpful... Ok... I've put together a quick and dirty proof of concept MEL based entirely on your hand drawn diagram. The only complication I had was that Maya doesn't divide and separate in an orderly column/row sequence so I had to do some math and it's a bit messy. Sorry, it's quick and dirty, probably not be the best way, but it works and it's a starting point. The MEL is attached, unzip, Source the Script in a New Scene, set the number of frames to 300, then play.

EDIT: BTW if you want solid pieces (bricks), a simple line addition to the attached script will make that happen:
...
for ($i = 0; $i < $panels; $i++) {
polyExtrudeFacet -ltz -0.5 ($panel[$i]+".f[0]"); // <- insert this line
move -r -y $pp 0 0 ($panel[$i]+".scalePivot") ($panel[$i]+".rotatePivot");
...

nelsig
08 August 2007, 12:08 PM
thanks for you replies

I will try your different solutions and post the results as soon as possible

I thought about a possibility to animate the separated surfaces with a locator position on Y
so I don't need to sequence orderly the pieces (it would be something to test)

so I will give you a feedback as soon as I have something new !

thanks again

nelsig
08 August 2007, 11:24 PM
A friend of mine developed this wonderfull little script I thought about for the creation of an effect for an advertising. It simply split the mesh and extrude each piece and then animate it one by one.

Here is a small test I have done. Quicktime file (http://www.nelsig.ch/clients/videos/testAnimeToit1.mov)

http://www.nelsig.ch/clients/images/testAnimeToit1.jpg

Nicolas

coolguy
08 August 2007, 11:07 AM
Hi Nicolas,

Can you please post the script its very interesting.
Thanks in advance.

nelsig
08 August 2007, 03:09 PM
thank you

sorry coolguy but as I didn't develop it I can't publish the source code. My friend will soon release a most powerfull version soon... by developping a C++ plugin

I will post the evolution of this plug-in in this tread as soon as possible.

coolguy
08 August 2007, 11:56 AM
No problem, Will wait for the script as a plugin. Thanks.

thehive
08 August 2007, 05:41 PM
i did something like that in max with some scripts i found an Pflow


http://www.mantamediagroup.com/3dpic/house.mov

jbradley
09 September 2007, 02:17 PM
I'm trying to do the exact same thing ... like, to the T exact.

Here's the gist of what I'm trying to do. Not having any luck.

1. Select a set of polygons
2. Create locator at the bottom of the polygons (in Y direction)
3. Locator Y position drives rotation and scale of all the polygons.

I assume this would be a single expression node connected to the location of the locator and the rotation and scale of the polygons. It would use the distance between the locator and the polygons to determine that scale and rotation.

I'm not that good at MEL scripting, so this is a bit tough to figure out. I'll check out that script posted and if I can modify it for any specific use, I'll post it back up.

cheers!

CGTalk Moderation
09 September 2007, 02:17 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.


1