Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
POV-Ray
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Examples of the scene description language=== The following is an example of the scene description language used by POV-Ray to describe a scene to render. It demonstrates the use of a background colour, camera, lights, a simple box shape having a surface normal and finish, and the transforming effects of rotation. [[Image:I example povray scene rendering.png|thumb|right|POV-Ray image output based on the script]] <syntaxhighlight lang="pov"> #version 3.6; // Includes a separate file defining a number of common colours #include "colors.inc" global_settings { assumed_gamma 1.0 } // Sets a background colour for the image (dark grey) background { color rgb <0.25, 0.25, 0.25> } // Places a camera // direction: Sets, among other things, the field of view of the camera // right: Sets the aspect ratio of the image // look_at: Tells the camera where to look camera { location <0.0, 0.5, -4.0> direction 1.5*z right x*image_width/image_height look_at <0.0, 0.0, 0.0> } // Places a light source // color: Sets the color of the light source (white) // translate: Moves the light source to a desired location light_source { <0, 0, 0> color rgb <1, 1, 1> translate <-5, 5, -5> } // Places another light source // color: Sets the color of the light source (dark grey) // translate: Moves the light source to a desired location light_source { <0, 0, 0> color rgb <0.25, 0.25, 0.25> translate <6, -6, -6> } // Sets a box // pigment: Sets a color for the box ("Red" as defined in "colors.inc") // finish: Sets how the surface of the box reflects light // normal: Sets a bumpiness for the box using the "agate" in-built model // rotate: Rotates the box box { <-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5> texture { pigment { color Red } finish { specular 0.6 } normal { agate 0.25 scale 1/2 } } rotate <45,46,47> } </syntaxhighlight> The following script fragment shows the use of variable declaration, assignment, comparison and the while loop construct: [[Image:I example povray scene rendering2.png|thumb|right|POV-Ray image output based on the script]] <syntaxhighlight lang="pov"> #declare the_angle = 0; #while (the_angle < 360) box { <-0.5, -0.5, -0.5> <0.5, 0.5, 0.5> texture { pigment { color Red } finish { specular 0.6 } normal { agate 0.25 scale 1/2 } } rotate the_angle } #declare the_angle = the_angle + 45; #end </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
POV-Ray
(section)
Add topic