From: Angus Dorbie (dorbie++at++sgi.com)
Date: 11/06/2000 01:58:23
I'll look into it, but I can't reply instantly.
Cheers,ANgus.
ihawkes2++at++csc.com.au wrote:
>
> I'm afraid I'm still embroiled in wobble problems! I have focussed on
> trying to apply the tex coord offset solution to a single cliptexture tile
> (ie to small region of cliptextured geometry which has an associated
> pre-cull callback used to set its virtual cliptexture parameters). I
> pre-processed the tex coords for this tile by subtracting an offset from
> each tex coord. The offset I chose was the value of the tex coord at the
> lower left corner of the tile. I then subtracted the same offset from the
> clip centre in the pre-cull callback and applied the new clip centre using
> "applyCenter". The result is an image that is initially sort of correct,
> but as soon as I move the eyepoint (ie the clipcentre), the cliptexture
> updates in a weird disjointed fashion (a much worse effect than the
> original wobble!). It looks like different levels might be being offset in
> different ways.
>
> In order to demonstrate the problem on some common ground, I have updated
> the sample program virtcliptex.c so that it produces the same effect when
> run with the moffett virtual cliptexture. The original version of the
> program displays a cliptexture on a tessellated grid. I have changed it so
> that you can specify that only a subset of grid cells be loaded, and you
> can specify that the tex coord offset be applied. The additions to the
> command line options are:
> * -s <size> : size of the grid (default 1000)
> * -t <tess> : make a <tess>x<tess> grid (default 2x2)
> * -l <tess> : only load a <tess>x<tess> subgrid (default -t value)
> * -i <cell index> : start load at cell with given index in grid X direction (default 0)
> * -j <cell index> : start load at cell with given index in grid Y direction (default 0)
> * -o : use the tex coord offset precision fix
> * -e <num> : set num effective levels to num
>
> Note I have updated the pre-cull callback routine (virtCallback) to use my
> algorithm for setting cliptexture parameters, but I get the same effect
> using the original virtCallback when it is adjusted to do the tex coord
> offset.
>
> To demonstrate the effect, compile newVirtcliptex.c and execute using:
> newVirtcliptex -s1000 -t10 -l1 -i9 -j2 -o mof_virtual.ct
> (which loads up a single tile at position (9,2) on a 10x10 grid)
>
> To turn the tex coord offset off, run
> newVirtcliptex -s1000 -t10 -l1 -i9 -j2 mof_virtual.ct
>
> Pressing "v" at runtime will toggle per-frame logging of cliptexture tile
> parameters; pressing "g" toggles gridification.
>
> Lines of code of interest are 708 - 738, where the tex coords are
> established; and
> 316 - 388 in the pre-cull callback routine.
>
> Any guidance as to where I have gone astray would be much appreciated!
>
> Thanks,
> Ian Hawkes
>
> (See attached file: newVirtcliptex.c)
>
> ------------------------------------------------------------------------
> Name: newVirtcliptex.c
> newVirtcliptex.c Type: unspecified type (application/octet-stream)
> Encoding: base64
-- For Performer+OpenGL tutorials http://www.dorbie.com/"In the middle of difficulty lies opportunity." --Albert Einstein
This archive was generated by hypermail 2b29 : Mon Nov 06 2000 - 01:58:45 PST