Re: [info-performer] Limitations on SW cliptextures?

New Message Reply Date view Thread view Subject view Author view

From: Paolo Farinelli (paolo++at++sgi.com)
Date: 11/01/2002 15:20:22


Hello Kevin,

the cliptexture emulation implementation will render each gset with a
single texture (either mipmapped base-texture, or a single, non-mipmapped
roaming clipped level).

A requirement is that the texture used for rendering a gset must provide
coverage for the entire gset geometry (in texture space).
Depending on clipcenter positioning and on the texture space bounds,
an appropriate texture level is automatically selected on each frame
for each gset.

In your case it sounds as if you have a single gset mapping the whole
cliptexture; thus no matter where you place your clipcenter, no clipped
level texture will ever provide full coverage for the whole gset, and
the base texture will end up being selected on each frame.

The solution is to split your geometry across multiple geosets. On each
frame, each gset will be rendered with the highest available level that
provides full coverage for it, and you should see some higher resolution
levels being used.

Please take a look at the sample program in
 /usr/share/Performer/src/sample/C++/clipdemo
This maps a cliptexture onto a terrain made up of a regular grid of tiles.
The minimum number of tiles you will need depends on the number of
clipped levels in the cliptexture:
min num rows = min num cols = 1<<(numClippedLevels)

This means that in order to render a very high-res emulated cliptexture
you need to divide your geometry into a great number of tiles, and this
can be too costly to be practical (note that selecting cliplevel for each
gset also represents an added cost in CULL process).
The .ct loader achieves the best results by dynamically retessellating
geometry on each frame so that gset boundaries aleways match cliplevel
boundaries. This is easy to do for flat geometry, but is certainly more
of a challange otherwise.
You can look at the source for the .ct loader in
/usr/share/Performer/src/lib/libpfdb/libpfct

I hope this helps.
Please let me know if you have any other problems or questions.

Best Regards,
Paolo

K. Chugh wrote:

>hi paolo- i read your posting in the mailing list archives:
>
>
>>There are a few differences in setting up geometry to be used with an
>>emulated cliptexture. In particular, you should follow the following
>>order:
>>
>>1. create your cliptexture using pfdLoadClipTexture()
>>2. set up pfGeoState, including gstate->setAttr(PFSTATE_TEXTURE,
>>cliptex);
>>3. set up pfGeoSets, including valid texture coordinates
>>4. you can now assign pfGeoState to pfGeoSets through gset->setGState > Re: ?
>>
>
>i'm having this exact problem with software emulation of cliptexturing
>and this doesn't solve the problem. i can still only see the non-tiled
>lods. clipfly works fine, i see all lods. is there anything else that
>could be causing this? i'm simply creating a geoset, geoset, and
>loading the cliptexture. the geoset is a simple large square. any
>ideas?
>
>thanks,
>kevin
>

-- 
Paolo Farinelli                                           paolo++at++sgi.com
Member of Technical Staff, OpenGL Performer              1-650-933-1808
Silicon Graphics        1600 Amphitheatre Pkwy, Mountain View, CA 94043


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Nov 01 2002 - 15:20:27 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.