In the RenderMan module I wrote (if I recall correctly), I handled this
by attaching an "RiAtmosphere"
attribute (to an object) that was a group: near, far and color. These
attributes were inherited
down the object hierarchy. The end result was that individual objects
could be depth-cued differently
in the scene. Once in a while this was actually quite useful (for
example, you might want to create a nice
depth-shaded molecular surface, but keep the small bound ligand fully
bright so it can easily be seen).
On the other hand, this is added complexity we probably don't need or
want in the hardware rendering
parts. Physically, when you create fog, everything in the scene gets it.
It also needs to be something that
can be easily changed on the fly. I also would vote for a scene/Camera
attribute.
A number of graphics packages have a very nifty and useful subwindow that
pops up giving a simplified side view of the whole scene complete with
perspective cone, front and back clipping
(depth cuing) planes that you can click on and drag.
color should default to the background color
default algorithm should be linear
default near/far planes should be set by the bounding box of the
input object
Richard
On Tuesday, February 12, 2002, at 03:01 PM, Gregory D Abram wrote:
I agree; this seems like a scene attribute, so I'd put it on the
camera -
like the background color. I'd suggest that you look for an attribute
attached to the camera.
GregI
Randall Hopper <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 02/12/2002
02:36:00 PM
Please respond to [email protected]
Sent by: [EMAIL PROTECTED]
To: [email protected]
cc:
Subject: [opendx-dev] Fog (was Re: Translucent Texturing)
Richard Gillilan:
|Hi Randall. It's fantastic to see someone working on the OpenGl
|parts. Every thought of enabling glFog? I've wanted this function for
|years because linear black fog (depth cuing) is a pretty essential
|feature for any molecular modeling program. I've looked at some of the
|source code, and will make a serious attempt at it soon, but you may
have
|already thought about it. It would seem like a natural for enviro-viz
|uses.
The pure OpenGL bits should be pretty simple. The questions in my mind
relate to how this would map to the data model (which objects are
affected
by it, are the fog bits object attributes or global Render settings, are
screen objects exempt, ...)
Conceptually it's a scene attribute, so it'd be a shame to have to set
it
identically on all the fields in a scene (can Options even do this?).
Maybe something like Transform that affects a tree of objects, like fog
attributes on a Group node? I think that's a departure from the current
model however.
Hopefully Greg will have some insight on this.
In terms of what attributes, I "think" this covers OpenGL:
fog = { on/off }
fog_mode = { linear, exp, exp2 }
fog_color = { r,g,b,a }
fog_density = density
fog_distance = { min, max }
fog_hint = { dont_care, nicest, fastest }
Which begs the question what would be good defaults in case none of
these
except fog on/off are specified.
Randy
--
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA N127-01; RTP, NC 27711