Rob Jenkins (robj++at++sgi.com)
Wed, 02 Dec 1998 00:42:23 -0800
Two sided lighting does cost you something in the transform stage of the
pipe ( as do multiple lights and local lights ). Benchmarks can give you
a measure of this cost but as always, they don't tell the whole story.
If you look at the OPC List Triangle Strip numbers for Octane an example
is:
Triangle Strip (CallList, RGB, Z, 3D, smooth, 1 inf light, no specular)
2090000 Triangles per second in a Triangle Strip
Triangle Strip (Immediate, RGB, Z, 3D, smooth, 1 inf light, 2 sided
lighting) 1550000 Triangles per second in a Triangle Strip
so something of the order of 25% overhead for an ideal strip of
triangles, real world numbers might be different of course but it gives
you a feel for the cost. There's no reason you can't organise your scene
to just have 2 sided lighting on for objects that need it though, so
change the lightmodel around those objects in a geostate just for them,
then go back to a 1 sided model. If you minimise the light model changes
then the cost will be OK ( doing many light model changes per frame
would be bad ).
> 2. Duplicate and reverse all those polygons and leave the
> lighting/culling defaults as they are. This increases the total polygon
> count but leaves drawing modes alone.
>
> Does anyone know which is the most efficient method? Or is it more one
> of those "it depends.." type questions? It appears that the graphics
> pipes are optimized for method #2 although at first sight method #1
> should be faster.
>
You could run into zbuffer fighting problems which would blow that
method. Also, the cost for 2 sided lighting is in the transform stage,
as it the cost for having more polygons, my guess is that the overhead
for doing 2 sided lighting on N polygons is likely to be less than the
cost of doing 1 sided lighting on 2*N polygons. By having more polygons
you're also increasing the likelyhood that your bottleneck could be in
the CPU->transform stage of the pipe, ie pumping the vertices into the
gfx.
Bear in mind that all the above could be a little irrelevant if it turns
out you're fill limited anyway :-)
pfStats are you're friend here, you should be able to set up you're
model with a geostate that has 2 sided lighting for the bits that need
it, then measure performance with 2 sided on/off and see what the effect
is.
Cheers
Rob
> I'm modelling with Multigen II Pro with Performer 2.2 on Onyx RE2 and
> Octane.
>
> Any suggestions?
> Simon
> ________________________________________________________________________
>
> Simon C. Mills
> Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
> European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
> Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
> The Netherlands http://www.estec.esa.nl/wmwww/EMM
> ________________________________________________________________________
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- ________________________________________________________________ Rob Jenkins Silicon Graphics mailto:robj++at++sgi.com
This archive was generated by hypermail 2.0b2 on Wed Dec 02 1998 - 00:47:26 PST