[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS additions that I promised...
From: |
Kevin Harris |
Subject: |
CVS additions that I promised... |
Date: |
Thu, 5 Oct 2000 23:01:12 -0600 (MDT) |
I have added my collection of changes into the CVS tree. And yes, I have
included example scenes to show how things may be done.
The support for area lights is not complete (meaning finished enough to be
accurate), but what I have checked in does work, and there is no added
penalty for 'pure' light sources (even those included in an aggregate or
CSG).
Sorry to anyone working on the raytracer, or writing some other renderer,
as I did change the interface required to be a renderer. :(
If anyone has any problems with my additions, let me know.
As always, comments, questions, and complaints are welcome.
-Kevin-
Here's the list of my changes/additions (brief):
hlapi/aggregate.h,hlapi/aggregate.h --
Added functions to be able to determine (via attributes) if an
object is an aggregate (this includes CSG), and if the aggregate
contains any objects. The added attribute is 'containsobjects' and
will be set to true if the object contains other objects.
Also added a function to be able to determine if an aggregate
contains a given object (via function call, not attributes).
hlapi/box.h,hlapi/box.cpp --
Added a function to find a random point on the surface. This is a
uniform random (if the frand is uniform).
hlapi/circle.h,hlapi/circle.cpp --
Added a function to find a random point on the surface. This is a
uniform random (if the frand is uniform).
hlapi/sphere.h,hlapi/sphere.cpp --
Added a function to find a random point on the surface. This is a
uniform random (if the frand is uniform).
hlapi/torus.h,hlapi/torus.cpp --
Added a function to find a random point on the surface. This is NOT
a uniform random.
hlapi/triangle.h,hlapi/triangle.h.cpp --
Added a function to find a random point on the surface. This is NOT
a uniform random.
llapi/atmosphereic_object.cpp --
Changed the evaluateScattering function to have a constant TLight
pointer (it is not, and should not be changed).
llapi/entity.h --
Added a function to explicitly set the location.
llapi/light.h,llapi/light.cpp --
Changed the parent class of TLight from TEntity to TObject. This is
to allow pure lights to be stored in aggregates, csg, etc. (although
putting them in an intersection or difference doesn't make much
sense).
Added an attribute called 'lightonly' which will be set to true if
the object is a 'pure' light source (ie. has no shape).
llapi/material.h,llapi/material.cpp --
Removed the 'tSelfEmission' scalar (never used), and replaced it
with a pattern called 'ptEmission'. Materials default to having no
emission (the ptEmission pointer set to NULL).
Added an 'emission' function, which will return the emission of the
material for the given surface data.
llapi/object.h --
Added a virtual function to return a random point on the surface.
The base function is completely stupid (for right now--it will be
replaced with something decent in the future), and returns
the point <0,0,0>. Note that the point is in LOCAL space, and
should be transformed by the object's transform matrix.
llapi/renderer.h --
Added a pure virtual function to calcualte the direct light from an
area light.
llapi/scene.h,llapi/scene.cpp --
Added a vector of area lights (TObject*), and a function to add
them.
Also, added a function to recursively locate lights from inside any
object, and add them automatically.
plugins/image_filter/lens_flare/if_lens_flare.cpp --
Changed the ptLight variable in 'flaresByLightsources' to be const.
plugins/renderer/raytracer/raytracer.h,
plugins/renderer/raytracer/raytracer.cpp --
Added functions to trace shadow rays to area lights, and to get the
direct light from an area light.
Made a few temporary changes (labeled with FIXME) to allow objects
to emit light when an object is hit with a ray.
plugins/renderer/zbuffer/zbuffer.h,
plugins/renderer/zbuffer/zbuffer.cpp --
Added the required function to be a renderer (direct light with an
area light).
plugins/scene_io/rt/parser.y --
Changed this to allow adding lights from outside the scene portion,
or within any object that can hold other objects.
plugins/scene_io/rt/parser_defs.h --
A change to allow something in the parser to be able to print out an
error with a string instead of just a char*.
Additions:
scenes/light/night2.rt --
A scene similar to that in night.rt, except the stars are grouped
together in an aggregate, and the light for each pole is added to
the top of it (defining the lamp post as an aggregate). Note that
the lights are NOT identical to those in night.rt, as those all have
different halo parameters, and these are all identical (even the
ones in the distance).
scenes/lights/area_light1.rt,scenes/lights/area_light2.rt --
Some example scenes using area lights.
scenes/misc/lamp.rt --
An example scene using area lights... A model of the lamp by my
computer.
scenes/misc/lamp_point.rt --
The same scene as lamp.rt, but using point lights. This is to show
the differences in point lights and area lights.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- CVS additions that I promised...,
Kevin Harris <=