View Full Version : MaxScript : BulletTime
Gelero 04-26-2003, 06:36 PM hi guys..
im trying to write a new MAX script here but im getting some problems!
I build a array of cameras and set their location on the scene. Until here,
everything is ok..
but i have a RENDER button. I want to loop though the cameras, render
one by one, and of course saving the vfb.
BUUUUUT, on the 2nd step of for(loop), in the render() calling i got
an error...why ?? cuz i change the render's camera???
for LoopCam in 1 to QuantCams - 1 by 1 do
(
render camera:cam[LoopCam] vfb:on outputwidth:altura outputheight:largura outputfile:("cam" + ((LoopCam as Integer) as String) + ".bmp")
)
|
|
Originally posted by Gelero
hi guys..
im trying to write a new MAX script here but im getting some problems!
I build a array of cameras and set their location on the scene. Until here,
everything is ok..
but i have a RENDER button. I want to loop though the cameras, render
one by one, and of course saving the vfb.
BUUUUUT, on the 2nd step of for(loop), in the render() calling i got
an error...why ?? cuz i change the render's camera???
for LoopCam in 1 to QuantCams - 1 by 1 do
(
render camera:cam[LoopCam] vfb:on outputwidth:altura outputheight:largura outputfile:("cam" + ((LoopCam as Integer) as String) + ".bmp")
)
On first look I cannot see a problem with your code. Could you post the exact error you are getting?
Gelero
04-26-2003, 09:00 PM
oK...
http://www.resolucao3d.com.br/guilherme/error.gif
Originally posted by Gelero
oK...
Looks like the cam array is not properly initialized. I assume one or more entries in the array contain undefined, most probably caused by the line
for i in 1 to 360 by (360/QuantCams) do
(
cam[i] = targetCamera...
For example, if QuantCams is 180, you will get a step of 2, which means that every second camera entry in the cam array will be undefined.
You should use append instead:
for i in 1 to 360 by (360/QuantCams) do
(
append cam (targetCamera... )
This will ensure that all elements of the array sit tight together without "bubbles" of undefined values inbetween.
I would count from 1 to QuantCams instead, unless you need the i = 1 to 360 for something else in the code outside of the sceenshot.
Hope this helps.
Cheers,
Bobo
This makes me laugh, I mean it is cool that you are using maxscript and learning - but why do bullet time like it is done in reality? Why not freeze your animation and just keyframe the camera around the object(s)?
Do you know how much clean up is done on bullet time exposures? I could be way out of line here (and I'm sorry if I am)but it seems to me that you are creating a headache for yourself.
-Shea
www.Ls3D.com
:cool:
Originally posted by Ls3D
This makes me laugh, I mean it is cool that you are using maxscript and learning - but why do bullet time like it is done in reality? Why not freeze your animation and just keyframe the camera around the object(s)?
Do you know how much clean up is done on bullet time exposures? I could be way out of line here (and I'm sorry if I am)but it seems to me that you are creating a headache for yourself.
-Shea
www.Ls3D.com
:cool:
That was the first thing that came to my mind, too. Bullet Time was done with multiple cameras just because it had to be done in the Real World. A fully CGI scene is a different world with its own laws - and I think someone said that some can be broken! ;)
If you want to slow down the animation to a crawl and not just freeze it, some sort of script like (shameless plug ahead!) the MAxTRIX script could be useful.
Still, I am going to handle this thread as a MAXscript programming problem and not as a workflow question. A script with bugs is like a planet with bugs... they have to be killed!
Gelero
04-27-2003, 12:26 AM
ehehe first i really want to thanks. Bobo just solved my problem.
Works realy fine. :buttrock:
ok.. My target here is learn MAXSCRIPT at first place.. When I opened M.S. editor for the first time, i dont have anything to do.
:surprised
i guess make a bullet time, via script will be a nice INITIAL challenge. isn't ?? At this point, right now, just using alt+tab and watching max rendering the cameras, for me was a unforgetable
challenge! :wavey:
in worflow's point of view, I really dont know! I dont care!
:cool:
but LS3d, how can i freeze a explosion for example???
that one made by shere gizmo e fire effect??
there is no way, i guess...
Using my script, you can create the camera's ring, change one or another e render everybody e you will have a nice freeze frame captured by various point of view?
copy ???
anyway, thank you guys!!
:bounce: :bounce: :bounce:
Originally posted by Gelero
ok.. My target here is learn MAXSCRIPT at first place...
i guess make a bullet time, via script will be a nice INITIAL challenge. isn't ?? At this point, right now, just using alt+tab and watching max rendering the cameras, for me was a unforgetable
challenge! :wavey:
Well, I am happy it worked!
Creating a Bullet Time effect is surely not the first thing I would suggest for something like a beginners MAXScript course (the MAxTRIX script idea was developed during a rather advanced MAXScript course at the German Movie Accademy),
but aiming high is a good thing.
As for the joy of seeing your code work for the first time - I have been writing MAXScripts for almost 6 years and I still get the same jumpy feeling!... :bounce:
Keep on scripting!
It is not better than sex, but close second :thumbsup:
secretasianman
04-27-2003, 02:48 AM
what type of explode?
if the explosion is just a deformable like a mesh bomb then on the time line set keys a different points.
when you get to each point decrease the strenth so it looks like it has never moved.
if you are useing a spray or any other particle sys with it, it's a little trickyer.
for both you can go into the timeline and adjust keys like your position and rotation and stuff to get you outcome.
i was thinking of writing a tutorial about this becasue i did a particle demo for my teachers and they wanted to know exactly what i did.
Katie
04-27-2003, 03:03 AM
Bobo, I just found this script CONSOLUS-MAXIMUS and I wanted to thank you,, it is EXACTLEY what I wanted to see for a long time for MAX....
Chamfer and Fillet to Close a 2 splines??
Thank You!!!
Gelero
04-27-2003, 04:57 AM
Bobo: yes! i got the jumpy feeling! :thumbsup:
but i dont think thats even close 2nd! heheh
;) :p scream: scream:
And can you show yours scripts links??
i mean, i ll raise my skills if I take a little look on those works! ohhh you can be sure! and i will love it!!!
:beer:
secretasianman: i guess you wasn't clear enough to me...
im using a meshbomb, and fire effect... (its rendering right now, btw) and i really dont know to freeze THEN... just to let me move around through the frame, through the animation, while they stand steel there....
:shrug: :
secretasianman
04-27-2003, 05:57 AM
i'm looking for an example i did. give me a little bit i have to break it down into pics from a clip i did.
secretasianman
04-27-2003, 08:17 AM
here is something i did with a mesh bomb.
it might take a sec to download, what it is is a spere that has a meshbomb on it with a few deformers, no scripts or plugs.
it explodes out then i reverse it at a certain point to either stop it from going out or i reverse it come back together in another shape.
i'm trying to put a mov file on the net but it keeps comeing up too big.
here is first link.
http://www.geocities.com/fairchild2226/disco1.html
the second one is a gif of different shots i took of the main one from a camera angle. the first was from a top perspective.
the second one i couldn't paste yet as a mov file because it is to big an i am having a prob getting the size down.
http://www.geocities.com/fairchild2226/done.html
when i find the max file, i'll come back with screen shots of what i mean. if you want.
Originally posted by Gelero
And can you show yours scripts links??
i mean, i ll raise my skills if I take a little look on those works! ohhh you can be sure! and i will love it!!!
:beer:
http://www.scriptspot.com/bobo/
Some old links might be dead, but the newer ones usually work.
You can also go to http://www.scriptspot.com and
do a search for "Borislav". Currently returns 161 hits.
The cool stuff is mainly under
http://www.scriptspot.com/bobo/darkmoon
and
http://www.scriptspot.com/bobo/mxs4/
Older stuff under
http://www.scriptspot.com/bobo/mxs3/
To see how I started back in Max R2.x, visit
http://www.scriptspot.com/bobo/mxs2/MAXSCRIPT.HTM
There are old tutorials for Max 2.5 under
http://www.scriptspot.com/bobo/mxs2/mxs_tut/lesson01.html
and a newer one under
http://www.scriptspot.com/bobo/mxs4/tuts/
I am working on more tutorials to appear in the coming weeks.
Also, take a look at the "How To" examples in the MAX 5.1 MAXScript Online Help.
CGTalk Moderation
01-14-2006, 11:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.