![]() |
||||||||||||||
|
|
||||||||||||||
|
|||||||
| Notices |
| Scripts Post and discuss architectural scripts or maxscripts here. This forum is for all software applications. |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
|
This is the first script I ever wrote in max script after seeing an arch viz animation featuring a building "being built" by lots of rotating slabs.
I wanted to do something similar for some pathing I was doing at the time and decided to learn max script. Feel free to have a play with it. I'm spending today writing it as an object modifier. Any suggestions for interaction would be welcome. The script requires one camera named camera01 and rotates every object in the selection 180 degrees one after the other, within a given number of frames, ordered based on their distance from camera01 Code:
oA=for i in $selection collect i fn cF v1 v2 = ( local d = (distance v1.pos $camera01.pos)-(distance v2.pos $camera01.pos) case of ( (d < .0): 1 (d > .0): -1 default: 0 ) ) qsort oA cF for p in oA do print p global nF = 200; global nO = oA.count; global inc = nF/nO; global sT = 0; global eT = inc; global iR = eulerangles 0 0 0; global rB = eulerangles 0 180 0; animationrange = interval 0 nF; rotate selection rB; for i in oA do ( animate on ( at time sT (rotate i iR) at time eT (rotate i rB) ) sT = sT + inc; eT = eT + inc; ) Last edited by batteryoperatedlettuce; April 12th, 2007 at 12:08 AM. |
|
|
|
|
|
#3 (permalink) |
|
Senior Member
|
Thanks, feel free to play. I have plans to pack a few of my scripts into something more user friendly. At the moment they are just a bunch of glorified keyboard shortcuts designed to speed modeling and extend my coffee breaks.
It's quite addictive, I'm hooked at the moment on a script for automating the animation of characters playing instruments based on midi and tab data from tab music files. Not sure how useful that will be to the cg/arch viz community but I'll post it if I ever get it finished Last edited by batteryoperatedlettuce; April 12th, 2007 at 09:18 PM. |
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script: Camera Animator | quizzy | Scripts | 9 | November 7th, 2007 03:08 AM |
| Max Script..... | hmahesha | Scripts | 3 | March 9th, 2007 06:11 AM |
| Rendering large images - what's the script? | Rick Eloy | 3ds Max | 13 | May 31st, 2006 12:46 AM |
| script: Random material ID | quizzy | Scripts | 2 | April 22nd, 2006 03:04 AM |
| script: Auto Calc Areas | nuno | Scripts | 1 | August 21st, 2002 07:07 PM |