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

Reply
 
Thread Tools Display Modes
Old 11th October 2003, 04:43 PM   #1
-WOODY-
Senior Member
Professional user
 
Join Date: Sep 2003
Location: Homje of the Indy 500
Posts: 176
Default Using Pov-Ray 3.5 with AC3D ( A newbies guide ) updated

This will be a guide on how to use Pov-Ray with AC3D. Since I'm a newb at this, this will be an ever-growing article. If there's anyone else who has experience with using AC3D with Pov-Ray, please feel free to correct me or add your own tips and tricks.

First, get yourself a freeware copy of Pov-Ray http://www.povray.org/download/

Setting up:
The first thing you want to do is create a "header" file. I got this info from the resources page on this site. It says to put this file in "/usr/local/lib/povray31/include" directory, but there isn't a directory like this with Pov-Ray 3.5. Instead, just put it in "C:\Program Files\POV-Ray for Windows v3.5\include" directory.

Create file:
Open up a new word or note pad document and copy and paste this in it exactly as you see it

global_settings { assumed_gamma 2.2}

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "golds.inc"
#include "skies.inc"
#include "stones.inc"
#include "glass.inc"

Now save this file as "header.inc" ( without quotes ) and put it in your include directory.

AC3D settings:
Now open AC3D and go to "file" then "settings". On the settings menu, select the "files" tab. At the top you'll see a list and box that says " POV header". Type this in the box next to it #include "header.inc." ( include quotes ).
Below that you'll see a radio button that says "Use object data for POV files", put a check in that box and you're good to go.
__________________________________________________ _______________

The following settings are what you are to enter in the properties box whenever you select an object in AC3D. While in AC3D, select an object that you want to apply a finish, effect, or texture to then click on "tools" then "Object property editor". The open box at the bottom of the menu is where you type your descriptions.

Note:
Be aware that many of these effects are highly dependant apon surrounding light and objects. In other words, if you create a sphere with a chrome texture on it then render with Pov-Ray, the sphere will appear black with next no surface at all. Textures like these require atmosphere to give it something to reflect.

Keep in mind that there are "types" of effects that are categorically different. "Textures" can petty much be summed up as being "what" it is, as is a "finish" is an applied effect. To define, if you make a sphere and give it a blue color then give it a chrome texture, you wont see the blue in your object, just the chrome texture. Whereas, if you apply a shiny "finish" to the sphere, you will see the effect and still retain the blue color you gave it.

Test:
Before we begin ( and just for fun ), open a scene that you already created in AC3D. Pick an object then open your properties menu. In the box below, type this in "texture { Polished_Chrome }" ( without quotes ) which is my favorite texture if you haven't noticed by now. Now click on "tools" then "render" and prepare to drool.
__________________________________________________ ____________________

Below ( and will be growing ) are a series of different effects, finishes, and textures that you can enter in the properties box to get the desired effect.
There are differing ranges of the same effect which defines color and level of reflectivity. These can be found by looking in your Pov-Ray include directory and looking at the "include" files such as color.inc, skies.inc, finish.inc etc. The way you enter in textures is "texture { Desired_Texture }" without quotes then type out the desired texture between the brackets. Remember that these descriptions are case sensitive.

textures: Metals. Code to enter "texture { Desred_Texture }" without quotes

Polished_Chrome
Polished_Brass
New_Brass ( Kind of a military type of brass. Very smooth )
Spun_Brass
Brushed_Aluminum
SilverFinish ( Good soft metal texture )

Brass textures. NOTE: the numbers 1 through 5 are varying colors, the letters A through E are levels of reflectivity. E being the shiniest.

T_Brass_1A, T_Brass_2A, T_Brass_3A, T_Brass_4A
T_Brass_1B, T_Brass_2A, T_Brass_3B, T_Brass_4B
T_Brass_1C, T_Brass_2C, T_Brass_3C, T_Brass_4C
T_Brass_1D, T_Brass_2D, T_Brass_3D, T_Brass_4D
T_Brass_1E, T_Brass_2E, T_Brass_3E, T_Brass_4E


COPPERS & BRONZES

T_Copper_1A, T_Copper_2A, T_Copper_3A, T_Copper_4A, T_Copper_5A
T_Copper_1B, T_Copper_2B, T_Copper_3B, T_Copper_4B, T_Copper_5B
T_Copper_1C, T_Copper_2C, T_Copper_3C, T_Copper_4C, T_Copper_5C
T_Copper_1D, T_Copper_2D, T_Copper_3D, T_Copper_4D, T_Copper_5D
T_Copper_1E, T_Copper_2E, T_Copper_3E, T_Copper_4E, T_Copper_5E

CHROMES & STEELS

T_Chrome_1A, T_Chrome_2A, T_Chrome_3A, T_Chrome_4A, T_Chrome_5A
T_Chrome_1B, T_Chrome_2B, T_Chrome_3B, T_Chrome_4B, T_Chrome_5B
T_Chrome_1C, T_Chrome_2C, T_Chrome_3C, T_Chrome_4C, T_Chrome_5C
T_Chrome_1D, T_Chrome_2D, T_Chrome_3D, T_Chrome_4D, T_Chrome_5D
T_Chrome_1E, T_Chrome_2E, T_Chrome_3E, T_Chrome_4E, T_Chrome_5E

SILVERS

T_Silver_1A, T_Silver_2A, T_Silver_3A, T_Silver_4A, T_Silver_5A
T_Silver_1B, T_Silver_2B, T_Silver_3B, T_Silver_4B, T_Silver_5B
T_Silver_1C, T_Silver_2C, T_Silver_3C, T_Silver_4C, T_Silver_5C
T_Silver_1D, T_Silver_2D, T_Silver_3D, T_Silver_4D, T_Silver_5D
T_Silver_1E, T_Silver_2E, T_Silver_3E, T_Silver_4E, T_Silver_5E


Glass Textures: sample code texture { Glass2 }

Crystal, Dark_GReen_Glass, Glass Glass_1, Glass_Colored_Blue
Glass1, Glass2, Glass3, Glass4, Glass5
Green_Glass, Green_Glass1, NBBeerbottle, NBglass NBoldglass
NBwinebottle, Orange_Glass, Plexiglass, Ruby_Glass, S_Glass
T_Beerbottle_Glass, T_Dark_Green_Glass, T_Glass1, T_Glass2
T_Glass3, T_Glass4, T_Green_Glass, T_Old_Glass, T_Orange_Glass
T_Ruby_Glass, T_Vicksbottle_Glass, T_Winebottle_Glass, T_Yellow_Glass
Thin_Glass, Truck_Glass, Vicks_Bottle_Glass, Yellow_Glass

Note: To make your own cutom glass effect, just select your object and make the color transparent or semi-transparent. Open your object's property box and imput an interior statement. This is to give the inside of your glass object a refractive property. Sample code to enter for basic glass:

interior { ior 1.5 }

The level of your ior setting determines how much internal refraction will take place. Below you will see some basic settings for different types of clear material.

water is 1.33
glass is 1.5
diamond is 2.4
__________________________________________________ _____________

Other textures

Cork ( Really looks like cork. Scalling is important )
Lightning1 ( Probably best for a backdrop )
Lithtning2 ( Greater detail )
Starfield ( Best for sky dome etc. )
Brass_Valley ( Gives kind of a reflective splotchy look. Interesting )
Y_Gradient ( Poduces vertical Red, Blue, Green fade )
X_Gradient ( Poduces same, but horizontally )
Rust ( A little blotchy, but interesting )
Rusty_Iron ( A little better but greenish in appearance. Rust is evil anyway.)
New_Penny
Tinny_Brass
Gold_Nugget
Aluminum
Bright_Bronze
Candy_Cane ( Freaky, just freaky )

__________________________________________________ ____________________

Finishes: Metal
code to enter: "finish { Desired_Finish }" example: finish { F_MetalA }

F_MetalA : Very soft and dull.
F_MetalB : Fairly soft and dull.
F_MetalC : Medium reflectivity. Holds color well.
F_MetalD : Highly hard and polished. High reflectivity. <---My favorite!!
F_MetalE : Very highly polished & reflective. Where's my sunglasses when I need em'.

To get a mirror finish, enter the info below
finish {ambient 0 diffuse 0 reflection 1} ( Enter the info exactly as you see it. Best if you just want to make a mirror. )

Finish effects:
There are other variables that can be entered that can also change the finish's appearance. I'll enter more variables as I come across them.

example: finish { crand 0.5 } gives a rough, sandy-like to gravel appearance. adjust as neccessary.

finish { crand 0.5 }

__________________________________________________ __________________

Normal Effects

This technique can be used to give the appearance of wrinkles, bumps, etc. to surface normals. The info is entered the same way as textures or finishes, except in that a different term is used.
Select object to modify and enter the info below.

normal { bumps 0.4 scale 0.2 }
The first number value gives the depth of the bump, the second gives the scale. Just play around to get the right appearance you want.

other effects:
normal { dents .75 scale .25 }

normal { wrinkles .04 scale .04 }

normal { ripples 1.2 scale 0.2 }

normal { waves 2 scale 0.3 }

normal { bumps 0.5 }


Custom Bump_map effects
If you're not happy with the above normal bump effects, you can create your own custom effects by creating your own image map ( bump_map ) and apply that to your object. Below you will find out the basic way of accomplishing this effect. First select your object and copy and paste this code into the object's property box. The file name and directory are used as an example. You'll have to change the file type and directory to where the file is stored. As you can see, you'll first have to indicate what the file type is then the directory to where the image is stored. Personally I use the .gif file format because it gives me the least amount of problems. It can be in color ( because Pov will convert it ), or a grey scale image.


normal {
bump_map {
gif "c:\woody's stuff\custom models\various textures\carpet\greencarpet.gif" interpolate 2
map_type 0
bump_size 4.0
} scale 1
}

Bump size ranges from 0.1 to as high as 4.0 or 5.0. You will also notice the "map_type" entry. This number tells Pov how to map the image to your object. Below you will see the different mapping types.


A map_type 0 gives the default planar mapping.

A map_type 1 gives a spherical mapping.

With map_type 2 you get a cylindrical mapping.

Finally map_type 5 is a torus or donut shaped mapping.


If you use the default planar mapping ( "0" ) and you don't see the proper results after rendering, you may have to rotate the mapping along an axis to get it to project properly. Example below.


normal {
bump_map {
gif "c:\woody's stuff\custom models\various textures\carpet\greencarpet.gif" interpolate 2
map_type 0
bump_size 4.0
} scale 1 rotate <90, 0, 0>
}


If you want your texture to only be projected once instead of tilling multiples of times, then you'll have to use the "once" keyword. Example below.

normal {
bump_map {
gif "c:\woody's stuff\custom models\various textures\carpet\greencarpet.gif" interpolate 2
map_type 0
bump_size 4.0
once
} scale 1 rotate <90, 0, 0>
}

Keep in mind that depending on how large you created your model, you'll have to tinker with the scale setting to get the image the right size on your object.


__________________________________________________ _____________


Sky dome creation:

Normally you can create your own sky dome to place over your scenes then apply a sky texture to them. There is also another way to do this by entering in "pigment" information to make the dome look like a sky. To do this, first create a sphere to encompass your entire scene. Make sure to flip your normals so they face inward, then bring up the properties box of the sphere and enter the following settings. Note: You may have to adjust the scale factor depending on how large your sphere is. I've entered a basic setting of "25" so if you need it scalled smaller, just enter a smaller number and visa, versa. You can copy and paste the info that is between the lines. Also be sure that in whatever color you decide to give your dome that you set all of your specular colors to 0 in the AC3D color edit menu. If you don't it'll glow and you wont be able to see the other colors.

Good sky with horizon
=============================================

pigment {
gradient y
pigment_map {
[0.01 rgb <0.847, 0.749, 0.847> ] // horizon
[0.25 P_Cloud2 scale 0.25 rotate z*5]
[0.60 P_Cloud3 scale <0.25, 0.15, 0.25> rotate

z*10]
} scale 25
}

=============================================



brighter and more cloudier
=============================================

pigment {
gradient y
pigment_map {
[0.00 rgb <0.847, 0.749, 0.847> ] // horizon
[0.10 SkyBlue ] // horizon
[0.20 P_Cloud4 ]
} scale 25
}

=============================================



Darker sky, not quite as cloudy. No horizon
============================================

pigment {
gradient y
pigment_map {
[0.10 rgb <0.258, 0.258, 0.435> ]
[0.25 P_Cloud2 scale 0.15 ]
} scale 25
}

============================================

__________________________________________________ ____________

Custom effects:

Smoke effect
I've been playing around and was finally able to come up with a basic smoke effect. You can play around with the scale and color settings depending on how big or dense you want it, but if you need to do further custom adjustments, you'll have to look up the different terms and learn what they mean and adjust them.

First create your smoke object mesh to the general shape you want it and give it a standard white color. Now in your AC3D color settings menu, set all of your diffuse sliders to the right, give it a 100% transparent setting, and set all of the other color and effect settings to 0.

Now bring up the properties box of your smoke object and copy and paste this in the window. Keep in mind that this will increase your render time.
========================================

hollow on
interior {
media {
method 3 // also try 1, 2, or 4 for differnt effects
absorption <1,1,1>
confidence 0.7
emission <0.2,0.2,0.2> // amount of light that is given off
scattering {3, 1}
density { bozo // pattern you can also use agate as pattern
color_map {
[0.0 rgb <0,0,0,>] // color pattern begins with black
[0.5 rgb <.5,.5,.5,>] // med gray for next stage
[1.0 rgb <8,8,8>] // final lighter grey
}
} scale 0.8 //adjust to size depending on how big your smoke is
}
}

=============================================







I'll add more info as I learn Pov-Ray and as I find out what works right with AC3D.
-WOODY- is offline   Reply With Quote
Old 22nd March 2004, 12:04 PM   #2
allen
Junior Member
Member
 
Join Date: Mar 2004
Location: USA, Oklahoma
Posts: 16
Default Sky Sphere And Sun

I really had no idea what site to place this on so here it is. These codes are used in povray after you export a model. Enjoy!

This will create a sky sphere to encompass your entire scene.

// Light
light_source {<600.0, 800.0, 600.0> White } // White light at the coordinates.

sky_sphere { S_Cloud3 } // This creates the sphere with the controls above.


To create a light source that ‘looks like’ the sun try this code out.
Tweak me
light_source {
<0, 0, 0> colour red 1.0 green 0.7

looks_like { // Give the light a ‘look’
sphere { <0.0, 0.0, 0.0>, 190.0
pigment { colour red 1.0 green 0.6 filter 0.35 }
finish { ambient 1.0 diffuse 0.0 } // Makes Object visible
}
}

translate <-1300.0, 380.0, 2500.0> // Location of light
}

Visit My Site http://allen.emailnuts.com

edit:9.22.04

Allen
allen is offline   Reply With Quote
Old 28th November 2005, 12:05 AM   #3
cyris69
Member
Advanced member
 
cyris69's Avatar
 
Join Date: Apr 2005
Posts: 46
Default header.inc

In an updated version of Pov-Ray which is now verion 3.6 doesn't accept the "header.inc" file.
Parse Error: Expected 'object or directive', string string literal found instead

the text "header.inc" is highlighted in line 1 of pov-ray

Not sure if I'm doing something wrong or not it worked in the older version.
Is there a way around this or do I need to do something new?
Help would be greatly appreciated.
__________________
A new user based art site, ProtoKillers.com
cyris69 is offline   Reply With Quote
Old 1st December 2005, 06:19 PM   #4
Scotty_Boi
Junior Member
Member
 
Join Date: Nov 2005
Posts: 17
Default

ya. im haveing a problem with the 'header.inc' file as well. is there another way, or a site to download the previews version? :?
Scotty_Boi is offline   Reply With Quote
Old 1st December 2005, 07:05 PM   #5
Scotty_Boi
Junior Member
Member
 
Join Date: Nov 2005
Posts: 17
Default

i think i found the problem, it may not have been clear before, but you had to include '#inclue' in the file. dont just put "header.inc", you have to put:
#include "header.inc."
all of it (quotes and all). hope it helped, it did for me

but i now have another problem, i cant save any of my renderings, even if i export it from Ac3d, then re-open it with pov-ray. i just cant figure it out. :?
Scotty_Boi is offline   Reply With Quote
Old 12th December 2005, 10:56 PM   #6
cyris69
Member
Advanced member
 
cyris69's Avatar
 
Join Date: Apr 2005
Posts: 46
Default hmmmm

Well everytime I press render it starts then pov-ray opens the skies.inc file and tried to render it and gives an error im so angry

Edit:
Fixed it I just remover the skies.inc from the header file, now it works, thanks
__________________
A new user based art site, ProtoKillers.com
cyris69 is offline   Reply With Quote
Old 12th December 2005, 11:22 PM   #7
cyris69
Member
Advanced member
 
cyris69's Avatar
 
Join Date: Apr 2005
Posts: 46
Default Hmm again

Well it's been awhile since i've use ac3d or pov-ray but i remember it use to work. I can't get photon mapping to work textures finishes ect... what cann I do? Anyone have something I can test to see if it's my fault or technical.
__________________
A new user based art site, ProtoKillers.com
cyris69 is offline   Reply With Quote
Old 14th December 2005, 05:04 PM   #8
cyris69
Member
Advanced member
 
cyris69's Avatar
 
Join Date: Apr 2005
Posts: 46
Default He we go

Well I downloaded and tested pov v 3.5 and it works.
Wierd huh? Guess 3.6 doesn't like the code for photon mapping and such from AC3d.
__________________
A new user based art site, ProtoKillers.com
cyris69 is offline   Reply With Quote
Old 10th February 2006, 09:16 PM   #9
palom
Junior Member
Junior member
 
Join Date: Feb 2006
Posts: 1
Default

Does anyone want to post the same tutorial for a mac user? it would be quite helpfull.
palom is offline   Reply With Quote
Old 22nd March 2006, 09:06 AM   #10
chrisdn
Junior Member
Junior member
 
Join Date: Mar 2006
Posts: 2
Default Povray

I'd just like to add that this is a stupid program. I love to use AC3D but povray just ruins the whole thing for me. Add a texture? comes all black even with objects and lighting to relflect thats when it actually recognices the bloody textures or finishes. I add the texture exactly as it is written in *.inc file and then nothing. I was better off using it without no input commands and just using AC3D's own material models.
If I'm wrong and this seems to be wrong then let me know but as it stands I'm going to take AC3D off my system because it's total lack of support for a rendering engine. I find it ridiculous that a modelling program like this dopesn't have at least some form of internal renderer or at the minimum a material editor that actually works with the renderer it was designed for.
For crying out loud! Look at the rendering options in Blender!!! And that software is totally free.
COme on people...help me out on this as I might be doing something completely wrong but the instructions on this board were followed step by step and i still get nothing.
chrisdn is offline   Reply With Quote
Reply

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 06:13 AM.


AC3D Forum
(C) Inivis Limited 2020