Re: Inventor loader messes up indexed linesets

New Message Reply Date view Thread view Subject view Author view

From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 02/01/2001 11:36:19


On Thu, 1 Feb 2001, Bram Stolk wrote:

Hi Bram,

 The Inventor loader uses the SoCallback stuff to determine what kind
geometry needs to be shoved into a given geoset. For whatever reason this
is not working correctly for your case.

 Spend some time in a debugger checking out
/usr/share/Performer/src/lib/libpfdb/libpfiv/main.C and I'm fairly sure
you will find the solution to your problem.

 Once this piece of geometry gets put into a pfGeoSet all information
about indexing disappears. For the exmaple Inventor file you showed below
the following coordinates make up the linestrip that you're complaining
about:

        -5, 0, 5
        -5, 0, -5
        -5, 0, -5 // gets duplicated!
        5, 0, -5,
        5, 0, 5

 check out lineSegmentCB() in main.C. It looks ok to me but you never know
... it could also be a problem in one of the pfdBuilder routines.

A+,

Alex.

> pfHello(),
>
>
> When using performer 2.2 on SGI, and loading inventor files I get
> invalid geometry.
>
> After some experimenting, I came to the following conclusion:
> It seems that the indices for indexed linesets must be either
> ordered as increasing, or decreasing, but never mixed.
>
> ivview does not have this problem, however, perfly does.
>
> For instance, line indices like:
> 0,1,-1,
> 1,2,-1,
> 2,3,-1,
> 0,3,-1
> are OK.
> But the indices
> 0,1,-1,
> 1,2,-1,
> 2,3,-1,
> 3,0,-1
> are not.
>
> To my surprise:
> 1,0,-1,
> 2,1,-1,
> 3,2,-1,
> 3,0,-1
> is OK again,
>
> but:
> 1,0,-1,
> 2,1,-1,
> 3,2,-1,
> 0,3,-1
> is not OK.
>
> All index sequences are ok with ivview. Perfly shows missing lines.
>
> Here is an example of an .iv file that is rendered correctly by ivview as
> a rectangle. Perfly, however, renders too few lines (although pfStat lists
> all lines... really weird!)
>
>
> #Inventor V2.0 ascii
>
> Separator
> {
> Material
> {
> emissiveColor 1 1 0
> }
>
> Coordinate3
> {
> point
> [
> -5 -5 0,
> 5 -5 0,
> 5 5 0,
> -5 5 0,
> ]
> }
>
> IndexedLineSet
> {
> coordIndex
> [
> 0,1,-1,
> 1,2,-1,
> 2,3,-1,
> 3,0,-1,
> ]
> }
> }
>
> Finaly, this problem also occurs on longer primitives,
> like lineset indices as '0,1,2,3,0'.
>
> Is this fixed in 2.4, or is there a patch available for 2.2?
>
> Regards,
>
> Bram Stolk
>
>
>
> --
> ------------------------------------------------------------------------------
> Bram Stolk, VR Specialist.
> SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
> email: bram++at++sara.nl Phone +31-20-5923059 Fax +31-20-6683167
>
> "I heard if you play the NT-4.0-CD backwards, you get a satanic message."
> "Thats nothing, if you play it forward, it installs NT-4.0"
> ------------------------------------------------------------------------------
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: 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
>

A+,

Alexandre.

--
Alexandre Naaman - naaman++at++sgi.com - La conformite est la mort de l'ame. 


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Feb 01 2001 - 11:36:23 PST

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