Go Back   AC3D Forums > Resources > AC3D Tutorials and How-To's
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 18th October 2003, 10:53 PM   #1
Senior Member
Professional user
Join Date: Sep 2003
Location: Homje of the Indy 500
Posts: 176
Default Adding additional Povray commands

I finally figured out how to add and save additional Pov-Ray info along with your AC3D scene file without having to re-enter the information every time you render at the bottom.

What I did: Creating a spot light

First figure out where you want to create the spotlight itself. Create a simple sphere and place it above the area where you want it. Now select the object and go to your menu to "object properties" and in the open box below, type this in. ( my example )

} <-------start with closing bracket
light_source {
color rgb <1,1,1>
translate <-8.4824, 11.1029, -1.71098> <------where sphere is currently
point_at <-8.4824, 0.697842, -1.71098> <---direction of light
radius 30
tightness 10
falloff 34
<---- do not put a closing bracket here, but leave open

Now copy the current location of the sphere to the "translate" entry.
Now move the sphere to where you want the light to focus on then go back into your object properties menu, then copy the new location into the "point_at" entry.
this is key, DO NOT DELETE your sphere, but put it out of the way somewhere or underneath your scene to where it wont show up when you render.
By starting out your entry with a closing bracket, then not ending your entry with a closing bracket tricks Pov-Ray into thinking that this is a new entry.
All you're doing is piggy-backing the information on the sphere so you can save the entry along with your scene file. No more copying and pasting every time you render.
I'll experiment some more, but I thing that this technique could be used to enter all kinds of information, not just light information.
I'll play around and see if I can do fog effects, camera effects, etc..
Keep in mind that AC3D is at a larger scale than Pov-Ray so you'll have to play around with the settings and location. I'm not sure, but I think that AC3D's scale is about 18 to 20 %. Correct me if I'm wrong.

If anyone else likes to piddle around, try this yourself and see if it works for you too. If you come up with a better way of doing it, just post below.

Edit: So far I've only been able to do this with light sources. Effects like fog or media don't seem to work so far.

Edit: Update. How to increase the placement accuracy of your lights.
There still seems to be a difference of unit size between AC3D and Pov.
First place a sphere or box where you want the light source and name it "light source". Now create another box or sphere and place it where you want the light to shine and name it "point at".
Now go ahead and render Pov-Ray ( you can then hit "Alt+G" to cancel the render. Now hit "Control+F" to search for your shapes, "light source" and "point at". Write down the first X, Y,Z vector you see for your shapes.
Now cancel Pov and go back to AC3D. Delete the "point at" shape and select your "light source" shape and enter your new coordinance for translate. In your "point_at" entry, enter the X,Y,Z coordinates of the "point at" shape. Now do as before and hide the "light source" shape so it wont show up.
-WOODY- is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:37 PM.

AC3D Forum
(C) Inivis Limited 2020