Critical Mass :: 3D Action Puzzle Game

Don't Like Ad's?
Click Here


Forum Index - 3Dimensional - MaxScript - Rising City

There are 4 replies to this topic ShareIt! Text-To-Speech





+VarnishedOtter
Admin
VarnishedOtter

2 years ago
This sequence is 100% coded in maxscript. All geometry and animation is created on the fly.

I was going to post the script up but I left it at home. Will update with it tomorrow.

10,000 boxes with keyframed animation.




Please support us and post a [Link to www.digitalartsfront.com] on your website.

--Matt

+Steve Martin
Moderator
Steve Martin

2 years ago
That's pretty damn cool. Was it difficult?
[Link to www.3dprevis.com]

+VarnishedOtter
Admin
VarnishedOtter

2 years ago
A couple of things teased my brain a bit, like how to get the matrix to grow from the middle out and getting the kayframe positioning correct so that the growth layers overlapped. But mostly it was fairly standard.
Please support us and post a [Link to www.digitalartsfront.com] on your website.

--Matt

-Tyson
Senior Member
Tyson

2 years ago
Thats awesome. I wish I had the brain for scripting. could this script be altered to have more offset and randomness in the buildings growth?

+VarnishedOtter
Admin
VarnishedOtter

2 years ago
Heres the script:

maxcols = 100
maxrows = 100
boxsize = 20
spacing = 7.5
maxheight = 100
minheight = 50
maxframes = 900
rows=#()
usedrows=#()
framestep = maxframes / maxcols

for j=1 to maxrows do (
cols=#()
cols2=#()
for k=1 to maxcols do (
cols[k] = box length:boxsize width:boxsize height:boxsize
cols[k].pos = [0-(maxcols*(boxsize+spacing)/2) + (boxsize+spacing)*(k-1) + boxsize/2 + spacing/2,0-(maxcols*(boxsize+spacing)/2) + (boxsize+spacing)*(j-1) + boxsize/2 + spacing/2,-25]
cols[k].material = meditMaterials[1]
cols2[k] = false
)
rows[j] = cols
usedrows[j] = cols2
)

animButtonState = true
for x=1 to maxcols do (
posindex = ceil (maxcols/2 + x/2)
negindex = ceil (maxcols/2 - x/2)
for j=1 to maxrows do (
for k=1 to maxcols do (
if j < posindex and j > negindex and k < posindex and k > negindex and usedrows[j][k] == false then (
sliderTime = (x-5)*(framestep+1)
rows[j][k].height = boxsize
sliderTime = x*(framestep+1)
rows[j][k].height = random minheight maxheight
usedrows[j][k] = true
)
)
)
)
animButtonState = false


More randomness could be made by randomly setting a negative starting height for each building, thereby looking like they come out of the ground at different times. And if I recall the x-5 part is the overlap, so by setting it to x-10 you would double the spread of the growth section.
Please support us and post a [Link to www.digitalartsfront.com] on your website.

--Matt

Top

Critical Mass :: 3D Action Puzzle Game

Don't Like Ad's?
Click Here