ewan_s
02-11-2004, 04:20 AM
Hi, I'm working on a large scale visualisation tool, the visualisation aspect is a city with roads/traffic/buildings etc. There could be 100's of 3d models active in the scene at any one time.
Currently I'm planning on having three levels of detail for the 3d models, flat shaded, pre rendered static lighting (ambient/emissive/diffuse), typical OpenGl lighting with ambient/emissive/diffuse and specular highlights.
the pre rendered stuff is like taking snapshot of the model with some lights defined, you get the shading created by the lights, then you can work out what the colour is at each vertex (math at the back of the red book) and save this. Put the drawing process, with the per vertex colours, in a display list and you get reasonable quality 3d definition without having to go through the standard OpenGl lighting routines each time the scene is redrawn which is obviously faster... for me that's good.
Problem is you cant do this with the specular highlight as this depends on the position of the lights *and* the position of the view. In my case I'm not that bothered about achieving the level of specular detail that OpenGl gives me, i.e. I don't care if the highlights move as the viewpoint does, I only want to highlight the sharp edges of the model using the specular colour/shininess.
Like the pre rendered stuff I want to set up the lighting and take a snapshot of how the model looks with shading and highlights, a one time static thing so I don't need to use OpenGl lighting and get faster performance all be it less detail/realism in the specular component.
Any ideas on how to do this and *fake* the specular highlight.
One restriction i have is that i cant use any extensions, basic opengl 1.2(ish) only.
thanks in advance
ewan
Currently I'm planning on having three levels of detail for the 3d models, flat shaded, pre rendered static lighting (ambient/emissive/diffuse), typical OpenGl lighting with ambient/emissive/diffuse and specular highlights.
the pre rendered stuff is like taking snapshot of the model with some lights defined, you get the shading created by the lights, then you can work out what the colour is at each vertex (math at the back of the red book) and save this. Put the drawing process, with the per vertex colours, in a display list and you get reasonable quality 3d definition without having to go through the standard OpenGl lighting routines each time the scene is redrawn which is obviously faster... for me that's good.
Problem is you cant do this with the specular highlight as this depends on the position of the lights *and* the position of the view. In my case I'm not that bothered about achieving the level of specular detail that OpenGl gives me, i.e. I don't care if the highlights move as the viewpoint does, I only want to highlight the sharp edges of the model using the specular colour/shininess.
Like the pre rendered stuff I want to set up the lighting and take a snapshot of how the model looks with shading and highlights, a one time static thing so I don't need to use OpenGl lighting and get faster performance all be it less detail/realism in the specular component.
Any ideas on how to do this and *fake* the specular highlight.
One restriction i have is that i cant use any extensions, basic opengl 1.2(ish) only.
thanks in advance
ewan