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/05/2002 15:37:36


Hi Kevin,

cliptexture emulation uses a single mipmapped texture for all non-clipped
levels (up to clipsize), and one non-mipmapped texture for each clipped
level.
If cliptexture emulation is not active, gset will still display base
texture with
all LODs up to (and including) size clipsize.

So the fact that you are only seeing levels from the single base-texture
does not
mean cliptex emulation is working.

I am still inclined to think that perhaps your geosets are not recognized as
being cliptextured (see my previous email).

Please try running/modifying the clipdemo sample program in
 /usr/share/Performer/src/sample/C++/clipdemo

This does everything we talked about:
 . creates a regular grid of geosets, each one mapping a small portion
of the cliptexture
 . creates pfClipTexture and pfMPClipTexture objects
 . creates geostate and associates it with cliptexture
 . assignes geostate to gsets

It will also include other necessary functions, such as:
pfuAddMPClipTextureToPipes(),
and will demonstrate how to update clipcenter position (in function
UpdateClipCenter,
in file dbase.C).

HINT: I find it very hard to navigate when running the clipdemo
application. The problem
is that the cliptextured terrain is not visible initially, and you may
think things are not
working even though they are. So, make sure you are able to navigate to
a position where
the terrain is visible. I have added a print statement (to my copy of
clipdemo.C) that will
display current xyzhpr on each frame, and then place the mouse at the
center-top of my
window, until pitch falls to around -90.0, at which point I can see the
terrain.

Let me know if clipdemo compiles and runs properly on your system(s)..
once you get
clipdemo to run, you should look for what you are doing differently in
your own code..

Hope this helps.
ciao,
Paolo

K. Chugh wrote:

>hi paolo. i'm doing this exactly with no luck. i set up a .01 texture
>space grid and same problem. just to clarify, it's not that i'm only
>seeing one LOD, i'm only seeing the non-tiled LODs, that is, the LODs
>that are smaller than the clipsize. i fly around and the texture
>changes, but only among these LODs. i substituted a simple texture for
>the cliptexture and am getting about the same performance, but i'll
>implement statistics to be sure. but, the fact that i'm seeing
>multiple LODs implies that cliptexturing is working but just not the
>tiled levels right?
>
>one more question- the clipcenter is automatically updated for you, or
>you can write your own updateclipcenter function- do you have to tell
>performer that you'll be updating the clipcenter manually? i'd like to
>avoid wasting the time for performer doing it, then me overriding it.
>
>thanks again for your help.
>
>kevin
>
>>If you divide your geometry into 100 x 100 tiles, you'll have 10,000
>>
>>geosets,
>>and each one will occupy a 0.01 x 0.01 in texture space. This should
>>
>>guarantee
>>that as you move your clipcenter around, different resolutions will
>>be
>>used to
>>render different gset
>>
>
>...
>
>>You should be calling gset->setGState(gstate) AFTER having created
>>and
>>configured the emulated cliptexture (pfdLoadClipTexture, new
>>pfMPClipTexture,
>>mpcliptex->setClipTex(),.. ), and AFTER having assigned the emulated
>>
>>cliptexture
>>to the geostate through gstate->setAttr(PFSTATE_TEXTURE,cliptex),
>>and
>>gstate->setMode(PFSTATE_ENTEXTURE, PF_ON);
>>
>>If you link gstate to gsets before cliptexture is associated with
>>gstate, the cte
>>implementation will not mark gsets as 'cliptextured' and cliptex
>>emulation
>>will not work.
>>

-- 
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 : Tue Nov 05 2002 - 15:37:41 PST

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