ASE information/help!

ASE information/help!

Post by rust » Thu, 24 Aug 2000 04:00:00



Hi,

To be able to use vertex lighting from Max 3.1, we decided to use the .ASE
format for exporting from Max and importing into our own tools.

The problem Ive encountered lies with Texture Vertices, Color Vertices and
Vertex Normals.

Ive noticed that the geometry vertices always consist of the proper amount
which build up all the faces for the mesh.  For instance, a cube has 8
geometry vertices and 12 faces.  At the same time there are 36 texture/color
vertices and vertex normals, and 12 texture/color faces and face normals.

I obtain this from the relevant tags (i.e. *MESH_NUMTVERTEX,
*MESH_NUMTVFACES and so on).

The format I need to convert them too is a polygon (triangle), which has
three geometry vertices, three vertex normals, three texture coords and
three vertex colors.  Ive no idea how to obtain the 8 vertices I need for
the texture, color and vertex normals from the 36 that are being supplied.

Any help would be greatly appreciated

Russell Murray

Here is a snippet from a test file I am using:

// begin snippet

*GEOMOBJECT {
 *NODE_NAME "Box10"
 *MESH {
  *TIMEVALUE 0
  *MESH_NUMVERTEX 8
  *MESH_NUMFACES 12
  *MESH_VERTEX_LIST {
   *MESH_VERTEX    0 136.1485 -28.7123 7.9178
   *MESH_VERTEX    1 168.0304 -28.7123 7.9178
   *MESH_VERTEX    2 136.1485 -12.3438 7.9178
   *MESH_VERTEX    3 168.0304 -12.3438 7.9178
   *MESH_VERTEX    4 136.1485 -28.7123 32.1033
   *MESH_VERTEX    5 168.0304 -28.7123 32.1033
   *MESH_VERTEX    6 136.1485 -12.3438 32.1033
   *MESH_VERTEX    7 168.0304 -12.3438 32.1033
  }
   *MESH_FACE    3:    A:    7 B:    6 C:    4 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 3  *MESH_MTLID 0
   *MESH_FACE    4:    A:    0 B:    1 C:    5 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 4  *MESH_MTLID 4
   *MESH_FACE    5:    A:    5 B:    4 C:    0 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 4  *MESH_MTLID 4
   *MESH_FACE    6:    A:    1 B:    3 C:    7 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 5  *MESH_MTLID 3
   *MESH_FACE    7:    A:    7 B:    5 C:    1 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 5  *MESH_MTLID 3
   *MESH_FACE    8:    A:    3 B:    2 C:    6 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 6  *MESH_MTLID 5
   *MESH_FACE    9:    A:    6 B:    7 C:    3 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 6  *MESH_MTLID 5
   *MESH_FACE   10:    A:    2 B:    0 C:    4 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 7  *MESH_MTLID 2
   *MESH_FACE   11:    A:    4 B:    6 C:    2 AB:    1 BC:    1 CA:    0
*MESH_SMOOTHING 7  *MESH_MTLID 2
  }
  *MESH_NUMTVERTEX 36
  *MESH_TVERTLIST {
   *MESH_TVERT 0 0.5264 0.4675 0.0544
   *MESH_TVERT 1 0.4736 0.4675 0.2487
   *MESH_TVERT 2 0.4312 0.4675 0.0544
   *MESH_TVERT 3 0.7513 0.4675 0.5688
   *MESH_TVERT 4 0.5264 0.9995 0.0544
   *MESH_TVERT 5 0.4736 0.9995 0.2487
   *MESH_TVERT 6 0.4312 0.9995 0.0544
   *MESH_TVERT 7 0.7513 0.9995 0.5688
   *MESH_TVERT 8 0.9456 0.4736 0.4675
   *MESH_TVERT 9 0.9456 0.5688 0.4675
   *MESH_TVERT 10 0.7513 0.5688 0.4675
   *MESH_TVERT 11 0.7513 0.5688 0.4675
   *MESH_TVERT 12 0.7513 0.4736 0.4675
   *MESH_TVERT 13 0.9456 0.4736 0.4675
   *MESH_TVERT 14 0.0544 0.4736 0.9995
   *MESH_TVERT 15 0.2487 0.4736 0.9995
   *MESH_TVERT 16 0.2487 0.5688 0.9995
   *MESH_TVERT 17 0.2487 0.5688 0.9995
   *MESH_TVERT 18 0.0544 0.5688 0.9995
   *MESH_TVERT 19 0.0544 0.4736 0.9995
   *MESH_TVERT 20 0.0544 0.4675 0.4736
   *MESH_TVERT 21 0.2487 0.4675 0.4736
   *MESH_TVERT 22 0.2487 0.9995 0.4736
   *MESH_TVERT 23 0.2487 0.9995 0.4736
   *MESH_TVERT 24 0.0544 0.9995 0.4736
   *MESH_TVERT 25 0.0544 0.4675 0.4736
   *MESH_TVERT 26 0.4736 0.4675 0.2487
   *MESH_TVERT 27 0.5688 0.4675 0.2487
   *MESH_TVERT 28 0.5688 0.9995 0.2487
   *MESH_TVERT 29 0.5688 0.9995 0.2487
   *MESH_TVERT 30 0.7513 0.4675 0.5688
   *MESH_TVERT 31 0.9456 0.4675 0.5688
   *MESH_TVERT 32 0.9456 0.9995 0.5688
   *MESH_TVERT 33 0.9456 0.9995 0.5688
   *MESH_TVERT 34 0.4312 0.4675 0.0544
   *MESH_TVERT 35 0.5264 0.9995 0.0544
  }
  *MESH_NUMTVFACES 12
  *MESH_TFACELIST {
   *MESH_TFACE 0 8 9 10
   *MESH_TFACE 1 11 12 13
   *MESH_TFACE 2 14 15 16
   *MESH_TFACE 3 17 18 19
   *MESH_TFACE 4 20 21 22
   *MESH_TFACE 5 23 24 25
   *MESH_TFACE 6 26 27 28
   *MESH_TFACE 7 29 5 1
   *MESH_TFACE 8 30 31 32
   *MESH_TFACE 9 33 7 3
   *MESH_TFACE 10 34 0 35
   *MESH_TFACE 11 4 6 2
  }
  *MESH_NUMCVERTEX 36
  *MESH_CVERTLIST {
   *MESH_VERTCOL 0 0.0029 0.0080 0.0025
   *MESH_VERTCOL 1 0.0029 0.0080 0.0025
   *MESH_VERTCOL 2 0.0029 0.0080 0.0025
   *MESH_VERTCOL 3 0.0029 0.0080 0.0025
   *MESH_VERTCOL 4 0.0029 0.0080 0.0025
   *MESH_VERTCOL 5 0.0029 0.0080 0.0025
   *MESH_VERTCOL 6 0.3153 0.3204 0.3150
   *MESH_VERTCOL 7 0.2560 0.2610 0.2556
   *MESH_VERTCOL 8 0.2549 0.2599 0.2545
   *MESH_VERTCOL 9 0.2549 0.2599 0.2545
   *MESH_VERTCOL 10 0.3099 0.3150 0.3095
   *MESH_VERTCOL 11 0.3153 0.3204 0.3150
   *MESH_VERTCOL 12 0.4382 0.4433 0.4379
   *MESH_VERTCOL 13 0.3476 0.3527 0.3473
   *MESH_VERTCOL 14 0.3716 0.3767 0.3713
   *MESH_VERTCOL 15 0.3716 0.3767 0.3713
   *MESH_VERTCOL 16 0.4830 0.4881 0.4827
   *MESH_VERTCOL 17 0.4382 0.4433 0.4379
   *MESH_VERTCOL 18 0.0029 0.0080 0.0025
   *MESH_VERTCOL 19 0.0029 0.0080 0.0025
   *MESH_VERTCOL 20 0.0029 0.0080 0.0025
   *MESH_VERTCOL 21 0.0029 0.0080 0.0025
   *MESH_VERTCOL 22 0.0029 0.0080 0.0025
   *MESH_VERTCOL 23 0.0029 0.0080 0.0025
   *MESH_VERTCOL 24 0.5522 0.5572 0.5518
   *MESH_VERTCOL 25 0.6458 0.6509 0.6455
   *MESH_VERTCOL 26 0.6859 0.6909 0.6855
   *MESH_VERTCOL 27 0.6859 0.6909 0.6855
   *MESH_VERTCOL 28 0.5788 0.5839 0.5785
   *MESH_VERTCOL 29 0.5522 0.5572 0.5518
   *MESH_VERTCOL 30 1.0000 1.0000 1.0000
   *MESH_VERTCOL 31 1.0000 1.0000 1.0000
   *MESH_VERTCOL 32 1.0000 1.0000 1.0000
   *MESH_VERTCOL 33 1.0000 1.0000 1.0000
   *MESH_VERTCOL 34 1.0000 1.0000 1.0000
   *MESH_VERTCOL 35 1.0000 1.0000 1.0000
  }
  *MESH_NUMCVFACES 12
  *MESH_CFACELIST {
   *MESH_CFACE 0 0 1 2
   *MESH_CFACE 1 3 4 5
   *MESH_CFACE 2 6 7 8
   *MESH_CFACE 3 9 10 11
   *MESH_CFACE 4 12 13 14
   *MESH_CFACE 5 15 16 17
   *MESH_CFACE 6 18 19 20
   *MESH_CFACE 7 21 22 23
   *MESH_CFACE 8 24 25 26
   *MESH_CFACE 9 27 28 29
   *MESH_CFACE 10 30 31 32
   *MESH_CFACE 11 33 34 35
  }
  *MESH_NORMALS {
   *MESH_FACENORMAL 0 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 0 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 2 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 3 0.0000 0.0000 -1.0000
   *MESH_FACENORMAL 1 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 3 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 1 0.0000 0.0000 -1.0000
    *MESH_VERTEXNORMAL 0 0.0000 0.0000 -1.0000
   *MESH_FACENORMAL 2 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 4 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 5 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 7 0.0000 0.0000 1.0000
   *MESH_FACENORMAL 3 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 7 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 6 0.0000 0.0000 1.0000
    *MESH_VERTEXNORMAL 4 0.0000 0.0000 1.0000
   *MESH_FACENORMAL 4 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 0 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 1 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 5 0.0000 -1.0000 0.0000
   *MESH_FACENORMAL 5 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 5 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 4 0.0000 -1.0000 0.0000
    *MESH_VERTEXNORMAL 0 0.0000 -1.0000 0.0000
   *MESH_FACENORMAL 6 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 1 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 3 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 7 1.0000 0.0000 0.0000
   *MESH_FACENORMAL 7 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 7 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 5 1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 1 1.0000 0.0000 0.0000
   *MESH_FACENORMAL 8 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 3 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 2 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 6 0.0000 1.0000 0.0000
   *MESH_FACENORMAL 9 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 6 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 7 0.0000 1.0000 0.0000
    *MESH_VERTEXNORMAL 3 0.0000 1.0000 0.0000
   *MESH_FACENORMAL 10 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 2 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 0 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 4 -1.0000 0.0000 0.0000
   *MESH_FACENORMAL 11 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 4 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 6 -1.0000 0.0000 0.0000
    *MESH_VERTEXNORMAL 2 -1.0000 0.0000 0.0000
  }
 }

}

// end snippet
 
 
 

ASE information/help!

Post by Boris Baue » Thu, 24 Aug 2000 04:00:00


Hi,

it is quite easy. The numbers of geometric vertices doesn't have to be related to the number
of color and texture vertices, because you are more flexible this way. If you use only black and
white color vertices for example you could simply store only two different color vertices (one
black,
one white) and refer to them in the color face array by indexing them (starting from 0). Same with
the texture vertices.

As you can see the ACE format uses 3 color and texture vertices per geometric vertice. That's
actualy a waste of space and you could compress the data, but this way it is just the kind of
explicit data format you want.

The number of faces for geometry, color and texture is always the same, because they are related to
each other, i.e. they represent the same face.

To read the data you just have to iterate over the faces. You start by reading the first
geometric, color and texture face. Then simply use the three faces' indices each refering to its
three geometric, color and texture vertices, respectively. Then continue with the next three
faces.

So let's try to read face #3 from your example file:

  Geometric info:

   *MESH_FACE    3:    A:    7 B:    6 C:    4 AB:    1 BC:    1 CA:    0

   - 3 is the face number. A,B,C refer to vertices 7,6 and 4. The AB,BC,CA edge information is
     not relevant here. So you pick these three vertices in the correct order:

   *MESH_TVERT 7 0.7513 0.9995 0.5688
   *MESH_TVERT 6 0.4312 0.9995 0.0544
   *MESH_TVERT 4 0.5264 0.9995 0.0544

  The corresponding Texture info:

   *MESH_TFACE 3 17 18 19

   - So the texture coordinates are:

   *MESH_TVERT 17 0.2487 0.5688 0.9995
   *MESH_TVERT 18 0.0544 0.5688 0.9995
   *MESH_TVERT 19 0.0544 0.4736 0.9995

  Last but not least the color info:

   *MESH_CFACE 3 9 10 11

   - ...pointing to

   *MESH_VERTCOL 9 0.2549 0.2599 0.2545
   *MESH_VERTCOL 10 0.3099 0.3150 0.3095
   *MESH_VERTCOL 11 0.3153 0.3204 0.3150

Got it ? Hope there's no typo.

Boris

 
 
 

1. animation information ASE file?

Hi
I want to get information about animation from ASE file.
The problem is that I cannot extract key frame information.
Only CONTROL_ROT_SAMPLE appears however I change the ASE export options.
Any comment will be appreciated.

Park

2. Demo links on gnuplot manual

3. HELP - NEED HELP WITH ASE files

4. zbuffer problem?

5. need help on ASE format

6. HELP 3d studio slave dies

7. Help Me : ASCII Scene Export (*.ASE)

8. OpenGL lock-ups (w/ TNT2)

9. Help...Any information would help

10. i made appz information ftp as web information center

11. How to Read/Write Information Interchange Model (IIM) information from JPEG Image

12. .ase format, anyone?