Notifications
Clear all

[Closed] Grow a structure from metal plates

Working on a project that requires a mechanical assembly animation that I think will work best scripted. Just not sure where to start.

Basically you have plates of metal that duplicate or “grow” into larger structures. Initial I just want it to be somewhat random. I think I have a handle on that, issue is I need connector plates and bolts to connect each plate. I would like the connector plates and bolts to move into place rather than just appear. Would It be better to create the connector plate animation as an xref file of just the plates and bolts doing there thing? Any thoughts on an approach would help me get off on the right foot. Thanks!

10 Replies

Maybe post some diagrams; it’s a bit difficult to get a handle on what your describing from your description

Ok, this isn’t exactly what I am doing but it will help to illustrate. In the image below there is a simple structure that is made up of these “Plates” and connectors. Now image that this shot is only early in the “Growth” of the structure. We start with one of these panels and the script generates panels randomly (on 90 degrees angles only) in all directions. The script would key frame the action or whatevery so that it “Grows” over time, not just pops up a finished structure. While it is “Growing” connetors are appear where needed. Where edges meet basically. It more like one plate spawns all these other plates at a fixed rate generating a random structure as it goes. Hope that’s clear.

Other way you could do that is by building the whole structure from sepparate pieces and make them not visible to camera. Then, through script to turn their visibility back on based on distance to some helpers or some other geometry that you animate the way you want.

I would build the struture with some scriptloops at once and keyframe the visibility over time.

I think it depends what kind of animation you want, and the scale of the scene.

It could be really fun to define some behaviours and let the script do it’s thing, tweaking this and that to get the desired effect.

Obviously you should work with planes first! Then swap out the geometry later.

Attached is something I was playing with in 2005.

Dave

I would experiment with using Particle Flow to do this. And the easiest thing to do would be to start with the particles (each particle would be a plate or a connecter piece) in their final positions, create some effect that moves them away in an interesting way, and then cache the whole thing and play it backwards.

All good suggestions. I was starting to think about a particle based approach as well. If they were particles I could also use collision detection with a dummy to change the visibility. Though the client is really looking for what dave is talking about, a more natural and automated method. Dave, I’ll take a look at you attachement tonight. Thanks!

Post back what you come up with Samuel, I really like this kind of project!
Cheers,
Dave

Ok. so I have something. Not exactly what I originally set out to do, but it’s a start. Basically it’s a script that creates x number of instances positioned randomly while removing duplicate objects along the way.

gap = -1
–objWidth = $.radius2
objWidth = $.width
rollout formBuilder “form Builder” width:160 height:124
(
button btn17 “Create Form” pos:[21,15] width:115 height:33
edittext NumObjects “Number of Objects” pos:[3,56] width:152 height:16 enabled:true
progressBar pb1 “ProgressBar” pos:[8,80] width:144 height:16 enabled:true value:0
on btn17 pressed do
createForm()
)
fn createForm = (
totalObjects = formBuilder.NumObjects.text as integer
for i=1 to totalObjects do (
formBuilder.pb1.value = 100
i/totalObjects
randomNumber = random 1 6
newObject = randomInstance randomNumber
)
)
fn randomInstance r = (
if r == 1 then (duplicateUp())
if r == 2 then (duplicateDown())
if r == 3 then (duplicateLeft())
if r == 4 then (duplicateRight())
if r == 5 then (duplicateVerticalUp())
if r == 6 then (duplicateVerticalDown())
)
fn checkPosition oldPos newPos = (
currentObjects = $* as array
endArray = currentObjects.count-1
for i=1 to endArray do (
if ( isValidNode currentObjects[i] ) then (
if currentObjects[i].pos == newPos.pos then (
print newPos
delete newPos
select currentObjects[random 1 endArray]
exit()
) else if ( i == endArray ) then (
select newPos
exit()
)
)
)
)
fn duplicateUp = (
oldObj = $
newObj = instance oldObj
newObj.pos.y = oldObj.pos.y-objWidth+gap
checkPosition oldObj newObj
)
fn duplicateDown = (
oldObj = $
newObj = instance oldObj
newObj.pos.y = oldObj.pos.y+objWidth-gap
checkPosition oldObj newObj
)
fn duplicateLeft= (
oldObj = $
newObj = instance oldObj
newObj.pos.x = oldObj.pos.x-objWidth+gap
checkPosition oldObj newObj
)
fn duplicateRight = (
oldObj = $
newObj = instance oldObj
newObj.pos.x = oldObj.pos.x+objWidth-gap
checkPosition oldObj newObj
)
fn duplicateVerticalUp = (
oldObj = $
newObj = instance oldObj
newObj.pos.z = oldObj.pos.z+objWidth-gap
checkPosition oldObj newObj
)
fn duplicateVerticalDown = (
oldObj = $
newObj = instance oldObj
newObj.pos.z = oldObj.pos.z-objWidth+gap
checkPosition oldObj newObj
)
createDialog formBuilder

Here’s some results I got playing around with it. Also since they are instances I can modify the objects after the fact.

Page 1 / 2