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, ...)
I think screen objects should be exempt. I never finished my
implementation
of screen objects in the RenderMan module, because the RenderMan
interface
just doesn't support the concept well.
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?).
I make heavy use of Options.
In my RMan module implementation, I chose to make four different
attributes "global" ... that is .. I passed them down as my draw routine
descended the object hierarchy and they could be overridden or set at
any level on down using Options modules:
atmosphere (fog/depth-cue)
surface (texturing, surface & displacement shaders etc)
fuzz (a DX-like attempt to resolve overlap order in some
cases ... not often used)
shadows (only works for BMRT ray tracing)
I don't think there is a way to pass attributes down automatically (is
there?).
I had to implement this myself in the recursive DXRIDraw() call of my
module.
Lights were treated as "local" attributes. They were set once for the
whole scene
at the top of the hierarchy via a collect. Admittedly, the local vs.
global terms are a
bit confusing here ... probably should be reversed.
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