RetouchPRO

Go Back   RetouchPRO > Technique > Photo-Based Art
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo-Based Art Emulating natural-media painting techniques

Tutorial: POV-Ray (and great discussion)

Reply
 
Thread Tools
  #11  
Old 11-10-2002, 09:22 AM
Marlene DeGrood's Avatar
Marlene DeGrood Marlene DeGrood is offline
Junior Member
 
Join Date: Oct 2002
Location: Arizona
Posts: 28
I might be missing something here, not uncommon for me, especially after a late Sat. night, but.....isn't this just a less user friendly type of Bryce program?

Marlene
www.thedigitalspectrum.com
Reply With Quote top
  #12  
Old 11-12-2002, 01:53 PM
VisualEyes's Avatar
VisualEyes VisualEyes is offline
Member
 
Join Date: Sep 2002
Location: Pasadena, CA
Posts: 47
I shudder to make comparisons between Bryce and POV-Ray, mainly because they are two very different programs aimed at two very different audiences. But Iím gonna anyway:

Bryce
Bryce was designed from the beginning to be a commercial, albeit unconventional 3D product marketed to the low-end, non-professional graphic market with a few hundred bucks of discretionary income. Alone, Eric Wenger spent seven years developing Bryce which would later be licensed to a company called MetaCreations. Eric brought in his associate Kai Krause to design the user interface. Eric and Kaiís European backgrounds strongly influenced the interface, crossing over into other MetaCreation products such as Kaiís PowerTools, Carrara, etc. The key words to note in the previous sentence are ďEric and Kaiís.Ē Two people. Count em. Two.

POV-Ray
POV-Ray began life in 1986 as a port of a simple Amiga program that rendered an untextured sphere on a plane. The guy who executed the port, college student David K. Buck, was so impressed by the possibilities that he decided to create his own program to do something similar. With a solid mathematical/calculus background, David began his programís feature-set with quadric surfaces such as spheres, cylinders, and planes and went on to add other cool stuff such as constructive solid geometry and extensive texturing options. The end product was a free, mid-1980ís DOS-based program written in C called DKBTrace. Because it was written in C and designed for portability, the program was easily distributed to other platforms including UNIX, the Mac, and the original Amiga.

To make a long story short, in 1991 David decided to give the program over to a group of enthusiastic Compuserve users who were eager to take the program further than any one man could alone. That group eventually renamed the program the Persistence of Vision Raytracer, and went on to became a world-wide association of contributing programmers, testers, artists and designers. I personally had much fun being one of the early testers/artists.

True to itís roots, POV-Ray has always remained free, with open source code and a strong support base. While it never developed a graphic user interface itself, there are several third-party graphic modellers that fill that void (i.e., Moray: http://www.stmuc.com/moray/ ).

Back to comparing Bryce & POV-Ray
OK, what differences have we noted? (1) Cost: Bryce is a commercial program with an appropriate commercial price tag. POV-Ray is a non-commerical program with an extremely reasonable non-existent price tag. (2) Design input: Bryce, until Corel bought it, was the brain-child of one man, and itís interface was the brain-child of another man. POV-Ray on the other hand has had hundreds of contributors over the years. Apparently, it is approachable to some large segment of the cyberworld. And while it has stuck to itís text-based roots, that hasnít stopped others from designing 3rd-party graphic modelers for POV-Ray.

Techy stuff
Finally, and most importantly to me at least, under the hood there is a very basic fundamental difference between POV-Ray and Bryce, 3D Studio, Lightwave, TrueSpace, and all the other popular 3D graphic rendering engines: polygons. Let me quote from the Bryce User Guide: ďAll 3D objects in Bryce 3D are built from multiple-sided (in Bryce, we use 4 sides) geometric surfaces, and are therefore inherently polygonal in nature.Ē POV-Ray, on the other hand, is a mathematical rendering engine and as such renders true primitives rather than polygons. What does this mean in English? It means that when you tell Bryce to render a sphere, you are actually telling it to render a collection of 4-sided polygons that connect to look something like a sphere. The more polygons you use, the smoother and more realistic the sphere looks. This is true of most 3D modelers, and they can get away with it because it often doesnít take a whole of polygons to fool the human eye, and rendering tricks such as normalizing polygon faces make creased surfaces appear smoothly connected. POV-Ray however, as I said, renders true primitives. A sphere is a perfect sphere. This goes hand-in-hand with the mathematical versatility of POV-Ray. Because it is programmatically text-based, and because it renders mathematically perfect primitives, it naturally lends itself to the accurate modeling of everything from architecture to molecules.

Oh well
I could go on and on and probably meander even further beyond anyoneís real interest, but I wonít. I wonít deny that the initial learning curve of POV-Ray is high, but so is Photoshopís. You didnít just jump right in and understand histograms, levels, layers, contrast-masking, alpha channels, and the anisotropic diffuse filter right off the bat did you? No, you started out slow, learned how to do a few simple things and then proceeded to learn everything you needed to become the great Photoshop/retouching wizard that you are today. The same holds true for POV-Ray Ė you have to start slow and give it a chance, ugly interface and all. For what itís worth, Iíve owned several commercial 3D modelers over the years, including Bryce, Carrara, and Hash AnimationMaster, and I continue to come back to POV-Ray because of its text-based interface. Once you get into the programmatic possibilities of the POV script language, you might find yourself actually having some incredible fun.
Reply With Quote top
  #13  
Old 11-12-2002, 01:56 PM
VisualEyes's Avatar
VisualEyes VisualEyes is offline
Member
 
Join Date: Sep 2002
Location: Pasadena, CA
Posts: 47
POV-Ray Basics continued

POV-Ray Tutorial (continued)

Recap
Last time, if you recall, you learned how to make a very simple raytraced scene composed of a camera, a single light source, and a sphere. Some of you might have been really thrilled to render your first raytraced scene. Others of you probably found it pretty boring. I know I did. A single purple sphere? Geeez.

OK, so whatís missing? This time weíre going to take a closer look at textures. Textures are what make everything come to life, both on your monitor and in real life. When light is emitted from a light source, it travels in a straight line, hits a surface, and then bounces into our eyeballs. As it strikes a surface, the light reflects the qualities of that surface into our eyes, transmitting information such as color, opacity, and shading. Without light, we see nothing. Without textures, we see nothing different.

In our last discussion, we created a very simple texture statement specifying the color of the sphere:
pigment { color rgb <.5, .2, .34> }

You recall that this meant that the color is composed of RGB values amounting to .5 red, .2 green, and .34 blue where these RGB values range from 0 to 1. A color description of <0, 0, 0> would be black while a description of <1,1,1> would be white.

So why didnít this sphere look very interesting? Because it was only textured by a color. For all you Photoshop experts, think about the Color blending mode. Have you ever painted on a Color layer and then looked at it by itself? Pretty worthless as an image, huh?

Texture statement components
To bring our sphere to life, we need to look at the basic components of the texture statement. Just like every scene needs a camera, a light source, and an object, almost every objectís texture needs at least two components: a pigment and a finish. The pigment statement defines a the coloration of the object, while the finish statement defines the look and feel of the object. Is it shiny? Is it matte? Is it transparent? Is it opaque? We structure the basic texture block like this:

texture {
pigment { color rgb <.5, .2, .34> }
finish {
Ö
}
}

Finish, ambient, and diffuse
Letís take a look at what goes into a finish. In real life, light not only radiates from a light source, it also radiates from all objects such as walls, sidewalks, people, whatever. We call this sort of lighting, ambient lighting. Open your drapes and light probably floods into your home as it bounces off of your neighborsí houses, the trees, the clouds, and the dog running across the street. Some direct rays of sunlight may streak into your window, but unless youíre outside, the vast majority of the light will probably be ambient.

POV tries to accomplish this type of natural lighting by providing the ambient statement. This statement specifies the minimum brightness of this object, regardless of a light source. Like the RGB values, this value ranges from 0 to 1. Zero means that there is absolutely no ambient lighting, while 1 means complete ambient lighting. Usually, a value of .1 to .3 is appropriate.

OK, so how do we specify the amount of lighting provided by a direct light source? Thatís our diffuse statement. Diffuse specifies the amount of diffuse reflection. A simple rule of thumb (though not necessarily 100% of the time) is that ambient + diffuse should equal 1. Therefore our texture statement may look like this now:

texture {
pigment { color rgb <.5, .2, .34> }
finish {
ambient 0.3
diffuse 0.7
}
}

If you plug this into our previously defined sphere and render it, youíll see a much more realistic sphere drawn.

What else can you define with the finish statement? Want to make the sphere shiny? Add some specular highlights:

finish {
ambient 0.3
diffuse 0.7
specular 0.6
roughness 0.001
}

Specularity is defined by an overall amount (0-1) and a surface roughness. Rough surfaces (values closer to 1) will create rough specular highlights, while smooth surfaces (values closer to 0) will create smaller, tighter specular highlights.

Want to make the sphere reflective? Add some reflection:

finish {
ambient 0.3
diffuse 0.7
specular 0.6
roughness 0.001
reflection 0.4
}

Reflection also ranges from 0 to 1. You wonít see the impact of this until you have something to reflect, so letís change our camera angle and add another object to our scene:

camera {
location <10, 15, -120>
direction <0, 0, 2>
up <0,1,0>
right <1.3333, 0, 0>
look_at <10, 0, 0>
}
light_source {
<100, 400, -1000>
color rgb <1, 1, 1>
}
sphere {
<0,0,0> 10
texture {
pigment {
color rgb <.5, .2, .34>
}
finish {
ambient 0.3
diffuse 0.7
specular 0.6
roughness 0.001
reflection 0.6
}
}
}
box {
<10, -10, -10>, <30, 10, 10>
texture {
pigment {
color rgb <.3, .4, .1>
}
finish {
ambient 0.3
diffuse 0.7
}
}
}


The box definition specifies two points in space representing the diagonal ends of two of the box corners. In this case we position the box to the right of the sphere. Now when we press alt-G, we should see our purplish sphere reflecting a bit of the green box next to it.

Pigment
OK, weíve talked a lot about the finish statement, now what about the pigment statement? Trust me, thereís tons of cool stuff you can do with it.

Want to make your object semi-transparent? Add a filter value to the RGB color statement like this: color rgb <r, g, b, f>. An f-value of 0 means no light filters through it, while an f-value of 1 means the object is totally transparent. The following is 50% transparent:
pigment { color rgbf <.3, .4, .1, .5> }

How about checkerboards:
pigment { checker color rgb <0,0,0>, color rgb <1,1,1> }

Thatís just a light scratch on the surface. Pigments can be overlaid, mapped, transformed, and made to look like everything from wood to gaseous explosions. I donít think Iíll go into any detail on that sort of stuff though.

My fingers are tired
Oh well, thatís probably more than enough for now. Have fun playing around with the texture statement, and please donít be afraid to look at the POV-Ray documentation and experiment with other options!
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo-Based Art


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved