Jason Posted September 17, 2003 Share Posted September 17, 2003 Did you know that you can script mantra? Did you know that its a command structure thats a subset of hscript? You can make for/next loops and define strange and interesting things inside of the ifd and mantra will render them. # Define some geometry named "geo". It is smooth shaded. ray_detail -s geo $HH/geo/defcam.bgeo # Define the camera and output image ray_picture ip# Set the output image name ray_resolution 256 256# Set the output resolution ray_zoom 1# Set the field of view ray_clip .01 100# Set near/far clipping planes # Now, instance the geometry 5 times. We can use the standard # hscript expression evaluation and variable expansion to position # the objects. for i = 0 to 4 ray_object object$i geo# Define an instance # Transform the instance set x = `.2 * ($i - 2)` ray_transform 1 0 0 0 0 1 0 0 0 0 1 0 $x $x 2.5 1 # Apply a surface shader to the instance ray_shader constant clr `rand($i)` `rand($i+.1)` `rand($i+.2)` end # Tell mantra to render the scene ray_raytrace ray_quit Do you want to know more?? Quote Link to comment Share on other sites More sharing options...
Guest Guest Posted September 17, 2003 Share Posted September 17, 2003 Thanks Jason. Do post more. Curious, are there any updated docs for this? The version I have is dated back to v4. Not sure if there's any changes to the structure. Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 20, 2004 Share Posted January 20, 2004 Jason. Can you explane to me what is going on in this block, please? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted January 21, 2004 Share Posted January 21, 2004 Did you know that you can script mantra?Do you want to know more?? LOL! Nice one Jason!! wooohooo!! Should I even ask where you got that from? --- doesn't matter, it has now been Wikified, Baby! If it weren't for the fact that i'm in a mad push to finish a job, I'd give it a whirl right now! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.