Strange things happen when i load a simple obj-file?

New Message Reply Date view Thread view Subject view Author view

Andre Hinkenjann (anh++at++calvin.ergo.iao.fhg.de)
Wed, 15 Mar 1995 10:05:23 +0100 (MEZ)


Hello,

I have got a problem when loading 'obj'-files:

* I load 'test.obj'

        v -10 0 -10
        v 10 0 -10
        v 10 0 10
        v 0 0 15
        v -10 0 10

        f 1 2 3 4 5

  via

         // add modells scaled by world scale
          for (i=0; i<app->numModells; i++)
          {
              dcs=pfNewDCS();
              pfNodeName(dcs,"modell dcs");
              pfDCSScale(dcs, app->worldScale);
              pfAddChild(globals->scene,dcs);
---> loade=LoadFile(app->modells[i],NULL);
              if (!loade)
              {
                  fprintf(stderr,"\nCouldn't find modell %s\n\n",app->modells[i]);
                  exit(EXIT_FAILURE);
              }
              pfNodeName(loade,app->modells[i]);
              pfAddChild(dcs, loade);
          }

* when I print the scene using

        sprintf(fname,"lightning.tree.%d",fcount++);
        f=fopen(fname, "w");
---> pfPrint(globals->scene, PFTRAV_DESCEND, PFPRINT_VB_DEBUG, f);
        fclose(f);

  I get:

      .
      .
      .
     
    [2:0]pfGroup pfId=7 0x721ac0 {
        path: /scene/modell dcs/test.obj
        trav masks: cull=0xffffffff draw=0xffffffff isect=0xffffffff
        bsphere: ctr(0.000000, 0.000000, 2.500000) rad=16.007811
        Num Children: 1
      [3:0]pfGeode pfId=8 0x721ef0 {
          trav masks: cull=0xffffffff draw=0xffffffff isect=0xffffffff
          bsphere: ctr(0.000000, 0.000000, 2.500000) rad=16.007811
          Num Children: 1
        [4:0] - pfGeoSet{
            GeoSet: 0x721d20 {
              Primitive: PFGS_FLAT_TRISTRIPS, NON-INDEXED, FLAT
, pfPrims=2, glPrims=3, verts=7
                Attribute Bindings:
                    PFGS_COLOR4=PFGS_PER_VERTEX PFGS_NORMAL3=PFGS_PER_VERTEX PFGS_TEXCOORD2=PFGS_OFF
              Attribute List Pointers:
                PFGS_COORD3: 0x721dc0
                PFGS_COLOR4: 0x721e40
                PFGS_NORMAL3: 0x721bf0
                PFGS_TEXCOORD2: 0x0
              Attribute Index List Pointers:
            (null) PFGS_COLOR4: 0x0
            (null) PFGS_NORMAL3: 0x0
            (null) PFGS_TEXCOORD2: 0x0
            (null) PFGS_COORD3: 0x0
              Strip Lengths: 3 4

----> Coord 0: X: -10.000000 Y: 0.000000 Z: -10.000000
              Color 0: R: 0.605441 G: 0.503157 B: 0.251896 A: 0.800000
              Normal 0: NX: 0.000000 NY: -1.000000 NZ: 0.000000
----> Coord 1: X: 10.000000 Y: 0.000000 Z: -10.000000
              Color 1: R: 0.499202 G: 0.204678 B: 0.210367 A: 0.800000
              Normal 1: NX: 0.000000 NY: -1.000000 NZ: 0.000000
----> Coord 2: X: -10.000000 Y: 0.000000 Z: 10.000000
              Color 2: R: 0.624002 G: 0.255848 B: 0.262959 A: 1.000000
              Normal 2: NX: 0.000000 NY: -1.000000 NZ: 0.000000

----> Coord 0: X: -10.000000 Y: 0.000000 Z: -10.000000
              Color 0: R: 0.605441 G: 0.503157 B: 0.251896 A: 0.800000
              Normal 0: NX: 0.000000 NY: -1.000000 NZ: 0.000000
----> Coord 1: X: 10.000000 Y: 0.000000 Z: -10.000000
              Color 1: R: 0.499202 G: 0.204678 B: 0.210367 A: 0.800000
              Normal 1: NX: 0.000000 NY: -1.000000 NZ: 0.000000
----> Coord 2: X: -10.000000 Y: 0.000000 Z: 10.000000
              Color 2: R: 0.624002 G: 0.255848 B: 0.262959 A: 1.000000
              Normal 2: NX: 0.000000 NY: -1.000000 NZ: 0.000000
----> Coord 3: X: 10.000000 Y: 0.000000 Z: -10.000000
              Color 3: R: 0.000000 G: 0.000000 B: 0.000000 A: 0.000000
              Normal 3: NX: -10.000000 NY: 0.000000 NZ: 10.000000

            } GeoSet: 0x721d20
        [4:0]} pfGeoSet
      [3:0]} pfGeode 8 0x721ef0
    [2:0]} pfGroup 7 0x721ac0
        .
        .

This is not what is in 'test.obj'. Any hints?

Andre

*****************************************************************************
Andre Hinkenjann Email: Andre.Hinkenjann++at++iao.fhg.de
Fraunhofer-IAO Tel: (+49)711/970-2136
Nobelstr. 12c, 70569 Stuttgart, GERMANY Fax: (+49)711/970-2299
*****************************************************************************


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:04 PDT

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