From: Paolo Farinelli (paolo++at++sgi.com)
Date: 11/04/2002 18:55:48
Hi Kevin,
you seem to be doing the right thing...
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 gsets.
Note that if your cliptextured geosets are set up properly, with 10,000
geosets
you should expect a severe hit in the CULL process, due to the computation
necessary to select an appropriate cliplevel for each one.
Take a look at your frame statistics to see whether CULL is much slower
than if you rendered the same number of gsets with a regular texture.
If it isn't, it probably means that the gsets were not recognized as being
associated with an emulated cliptexture, and this is the reason why you
only see the low res base texture ever being mapped.
The most likely cause for this is that you may be calling functions in the
wrong order (note that this order limitation only applies to emulated
cliptextures
and not to regular hw cliptextures).
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.
Hope this helps.
Best Regards,
Paolo
K. Chugh wrote:
>hi paolo- thanks for your reply:
>
>>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.
>>
>
>
>i thought i was doing this, but let me run the numbers by you. i've got
>a relatively small cliptexture-
>
>level 0 - 4096, tile size is 128
>level 1 - 2048, tile size is 128
>level 2 - 1024, tile size is 128
>level 3 - 512, same as clipsize , so no levels
>...
>level n ... same
>
>i've divided a big square into 10 x 10, and 100 x 100 tiles (each a
>geoset) and i can still only see the 512 non-tiled texture level and
>coarser.
>
>so, are you saying the entire geoset must be able to fit into one
>texture level? suppose i've taken a 1000 x 1000 square and divided it
>up into 100 x 100 tiles, each of which is in a geoset,and are using the
>entire texture from s=0 to s=1 (so each tile uses .1 of the texture). if
>you look at the square (geometry, not texture) at 1,1 (starting with 0)
>shouldn't that geoset that goes from s=.1 to s=.2 (same for t) in
>texture be able to fit into the 1024 level, since each texture tile is
>128 which is 128/1024 =.125 in normalized texels in width? this doesn't
>work, but i suspect i'm misunderstanding the geoset size requirements
>w.r.t. the geoset size. can you clarify using this example (if it's
>clear enough)? thanks again for your help.
>
>kevin
>
>-----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-----------------------------------------------------------------------
>
>
-- 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
This archive was generated by hypermail 2b29 : Mon Nov 04 2002 - 18:55:52 PST