Re: Inventor loader messes up indexed linesets

New Message Reply Date view Thread view Subject view Author view

From: Guillaume Smietanski (gsmietan++at++fmr.tu-darmstadt.de)
Date: 02/02/2001 03:12:22


Hello,

We are working a lot with an internal Inventor Database for a terrain in
a flight simulator.
I had at the begining a big problem with the Inventor files because they
was not at the good state and we
re-write a part of the inventor loader.

One of our old problem was maybe the same as your:
in the loader (Performer/src/lib/libpfdb/libpfiv/pfiv.C) a rotation is
made which has for me NO SENSE.
This is in the
pfGroup * pfdConvertFrom_iv(SoSeparator *ivRoot)
function with the following lines:
// Transform from GL/Inventor's Y-up coordinate system to Performer's
Z-up
mat.makeRot(90.0f, 1, 0, 0);
pfRoot = new pfSCS(mat);

So maybe you only need to have a "new" loader without this rotation.
To see if this is the same problem you can also generate a new inventor
files which as the opposite rotation, if you have in perfly or in your
application the picture you wanted then you have no other problem and
you only need to re-write the inventor loader.

I hope that it is an answers to your problem. In all case please inform
me.
Regards,
Guillaume Smietanski.

>
> From: Bram Stolk <bram++at++sara.nl>
> Date: Thu, 01 Feb 2001 17:53:13 +0100
> Subject: Inventor loader messes up indexed linesets
>
> 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"
> ------------------------------------------------------------------------------
>
> ******************************************************************************



New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Feb 02 2001 - 03:16:32 PST

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