Misc. Changes
Home Up UV Mapping Patterns Meshes Radiosity Photons Misc. Changes Media

 

Colored Attenuation

Thanks to Edward Coffey, there now exists colored attenuation for the interior of objects.

Just use the fade_color keyword to colorize the attenuation caused by fade_distance and fade_power in the interior of your objects.

Spherical Camera

Thanks to Mike (last name unknown), the author of the minipatch, we now have a better spherical camera in UVPov.

There was a spherical camera here before (one that I wrote, which was undocumented), but it didn't work as well as Mike's does.  Mike also added the 'h_angle' and 'v_angle' to allow you to specify the horizontal and vertical fields of view in degrees.   Use the keyword 'sphere' or 'spherical_camera' to turn your camera into a spherical camera (I kept sphere because it is shorter, but added spherical_camera for compatibility with the minipatch).

Shortcuts for #declare and #local

Instead of using #declare, use $.  Instead of using #local, use %.  So if your code used to look like:

#declare a=100;
#declare b=a*sqrt(2);
#local c=object{my_object rotate 20}      

it could now look like:

$a=100;
$b=a*sqrt(2);
%c=object{my_object rotate 20}      

You can still use #declare and #local if you so choose.

Layered Textures

Update July 10, 1999  Changing woods.inc is no longer necessary.   Instead use "#version 3.1;" as shown:

#include "woods.inc"

object{
  my_object
  #version 3.1;
  texture { T_Wood35 }
  #version 3.14159;  // go back to using filtered layers
}      

Normally, POV treates 'filter' just like it treats 'transmit' in layered textures (well, to a point). This means that layers that use rgbf look just like layers that use rgbt. I personally consider this a bug, so I 'fixed' it, so now putting rgbf in a layer will act more like the normal filter instead of like transmit. Unfortunately, this is not good for backwards compatibility.

Double_Illuminate

Some people have noticed that bicubic_patch objects and smooth triangles are lit on both sides by a light source.  This allows them to be used as a shadow-screen.   Also, sometimes you do not want this effect.  Because of this, I modified POV so that double-sided illumination is optional for all objects.  To make an object double-illuminated, use the "double_illuminate" keyword just as you would "hollow" or "no_shadow."  Note that double_illuminate only illuminates both sides of the same surface, so on a sphere, for example, you will not see the effect unless the sphere is either partially transparent, or if the the camera is inside and the light source outside of the sphere (or vise versa).

Important:  bicubic_patch and smooth_triange are no longer double_illuminated by default.  Objects that use averaged normals still are, but I'll probably change that, since someone on povray.programming suggested a real fix for the normal average bug, which I have implemented but not tested.

Bug fixes

I've recently been doing some work fixing various bugs in POV, and also keeping UVPov updated with the fixes that others have suggested on news.povray.org.  So, I decided it'd be a good idea to document which bugs have been fixed in UVPov.

  1. EPSILON too big.  This bug only effects Windows 95 and DOS compiles.  In the file config.h, EPSILON was defined as 10e-5, which is much larger than on other platforms.   My compile of UVPov has EPSILON set to 10e-12.
  2. Normal average bug.  The most prominent manifestation of this bug is incorrect surface normals when normals are combined using an 'average' pattern.  This has been fixed in UVPov
  3. Normal reflection bug.  When reflection is used on a surface with a perturbed surface normal, the reflected rays sometimes go through the object instead of bouncing off of it.  This has been fixed.
  4. 2-d vector bug.  2-d vectors are treated as floats and not vectors.  To fix this, all 2-d vectors are automatically promoted to 3-d vectors.

Redefine allowed

One of my pet peeves with POV is the inability to redefine an identifier as another type of identifier.  This causes problems with #local variables, too, since they must be of the same type of any perviously-declared variables of the same name.  UVPov currently has been changed to allow users to redefine identifiers any time.  #local variables can be of another type but still do not destroy the variable with the larger scope.

Parallel Rays

Some people have requested the ability to have light sources use parallel rays. Instead of adding a new type of light source, which would require new code in the parser and all kinds of stuff like that, I decided to try to implement parallel beams for cylinder lights, since this would be an obvious application. Also, if you wanted an almost-infinite light with parallel beams, you could simply make a cylinder light with a really big radius.

About backwards compatibility: I do not think that we need to keep the old cylinder lights. They are not realistic. Because people would normally think that the rays are parallel, the POV-Ray documentation currently needs to explicitly say that they cylindrical lights are still just point sources with constraints.

Here is a scene which demonstrates the parallel rays.  A cylinder light is placed very close to a sphere (visualized by the white dot), and is aimed mostly towards the sphere (visualized by the white line).  Notice that the light source is basically a flat disc at the cap of the cylinder, as opposed to a point at the center of that cap.  This area-ish light does not create soft shadows, since all of the rays are perfectly parallel.

This image shows what POV usually produces:
CYL1.jpg (5904 bytes)

This image shows what happens if the rays are parallel:
CYL1.jpg (5904 bytes)

Here is the source code for the scene:
#include "colors.inc"
#include "woods.inc"

camera {  location <6,5,0>  look_at <-1,0,0> }

/* ground plane */                                                             
plane { y, 0 texture{ T_Wood23 scale .5 }}

/* visualize light source & point_at */
sphere { <0,3.5,0>, .1 pigment {White} finish{ambient 1 diffuse 0} no_shadow}
cylinder { <0,3.5,0>, <0,0,3>, .02 pigment {White} finish{ambient 1 diffuse 0} no_shadow} 

/* red sphere to cast shadow */
sphere { <0,2,0>, 1 pigment { Red } }

/* bright cylinder light */
light_source {
  <0,3.5,0> color 2
  cylinder
  point_at <0,0,3>
  radius 24
  falloff 25
  tightness 10
}  

/* fill light */
light_source { <100,100,100> color 0.5 shadowless }                         

This page was last updated October 24, 1999.

If you have any comments, please email me. My email address is Nathan at Kopp dot Com.