⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3dsinfo.txt

📁 这是书上的代码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
corrected color. The values range from 0 to 255 (full intensity).

-----------------------------------------------------------------------------
Chunk #    : 0x0013
Name       : Rgb color gamma corrected (float format)
Level      : global chunk
Size       : 12
Format     :

  float    red
  float    green
  float    blue

This chunk contains 3 floats : the red, green and blue components of a
gamma corrected color. The values range from 0.0 to 1.0 (full intensity).

-----------------------------------------------------------------------------

                              Percent chunks
                              --------------

-----------------------------------------------------------------------------
Chunk #    : 0x0030
Name       : percent (int format)
Level      : global chunk
Size       : 2
Format     :

  word     percent

This chunk contains a word. The values range from 0 to 100.

-----------------------------------------------------------------------------
Chunk #    : 0x0031
Name       : percent (float format)
Level      : global chunk
Size       : 4
Format     :

  float    percent

This chunk contains a float. The values range from 0 to 100.

=============================================================================

                            M A I N  C H U N K
                            ==================

=============================================================================
Chunk #    : 0x4D4D
Name       : Main chunk
Level      : 0
Size       : 0 + sub-chunks
Father     : none
Format     :

-----------------------------------------------------------------------------
Chunk #    : 0x0002
Name       : 3DS-Version
Level      : 1
Size       : 4
Father     : 0x4D4D (Main chunk)
Format     :

  dword    Version

This dword specifies the number of your 3DS-Version.

=============================================================================

                        3 D  E D I T O R  C H U N K
                        ===========================

=============================================================================
Chunk #    : 0x3D3D
Name       : 3D Editor chunk
Level      : 1
Size       : 0 + sub-chunks
Father     : 0x4D4D (Main chunk)
Format     :

-----------------------------------------------------------------------------
Chunk #    : 0x0100
Name       : One unit
Level      : 2
Size       : 4
Father     : 3D Editor chunk
Format     :

  float    One unit

-----------------------------------------------------------------------------
Chunk #    : 0x1100
Name       : Background bitmap
Level      : 2
Size       : varying
Father     : 3D Editor chunk
Format     :

  strz     Name

This chunk contains the name of the background bitmap choosen in 3DS even
if not used (i.e. you have selected a bitmap but you choose another thing).

-----------------------------------------------------------------------------
Chunk #    : 0x1101
Name       : Use background bitmap
Level      : 2
Size       : 0
Father     : 3D Editor chunk
Format     : BOOLEAN

This chunk is a flag indicating that the background bitmap (see chunk
0x1100) is used. When this chunk is not present, the background bitmap is
not used.

-----------------------------------------------------------------------------
Chunk #    : 0x1200
Name       : Background color
Level      : 2
Size       : 0 + sub-chunks
Father     : 3D Editor chunk
Format     :

This chunk contains the color of the background even if not used. You must
read the color sub-chunks. Generaly, the format is :
 - Background color chunk (0x1200)
 - RGB float color chunk (0x0010)
 - RGB float gamma corected color chunk (0x0013)

-----------------------------------------------------------------------------
Chunk #    : 0x1201
Name       : Use background color
Level      : 2
Size       : 0
Father     : 3D Editor chunk
Format     : BOOLEAN

This chunk is a flag indicating that the background color (see chunk
0x1200) is used. When this chunk is not present, the background color is
not used.

-----------------------------------------------------------------------------
Chunk #    : 0x1300
Name       : Background gradient colors
Level      : 2
Size       : 4 + sub-chunks
Father     : 3D Editor chunk
Format     :

  float        Gradient position
  color chunk  RGBF1
  color chunk  RGBFG1
  color chunk  RGBF2
  color chunk  RGBFG2
  color chunk  RGBF3
  color chunk  RGBFG3

RGBF = RGB float color CHUNK
RGBFG = RGB gamma corrected float color CHUNK

  So, if hexa you have something like that

  00 13 76 00 00 00 21 CE 4A 3F 10 00 12 00 00 00 .....

* 00 13 is the chunk ID (0x1300) and 76 00 00 00 is the length of this chunk.

* 21 CE 4A 3F are values which contain the "position" of the three gradient
  colors. It's a float (from 0.0 to 1.0) indicating the position of the
  middle color.

* 10 00 is the chunk ID (0x0010) of a rgb float color and 12 00 00 00 is the
  length of this sub-chunk.
-----------------------------------------------------------------------------

Chunk #    : 0x1301
Name       : Use background gradient colors
Level      : 2
Size       : 0
Father     : 3D Editor chunk
Format     : BOOLEAN

This chunk is a flag indicating that the background gradient colors (see
chunk 0x1300) are used. When this chunk is not present, the gradient
colors are not used.

-----------------------------------------------------------------------------
Chunk #    : 0x1400
Name       : Shadow map bias
Level      : 2
Size       : 4
Father     : 3D Editor chunk
Format     :

  float    Shadow map bias

-----------------------------------------------------------------------------
Chunk #    : 0x1420
Name       : Shadow map size
Level      : 2
Size       : 2
Father     : 3D Editor chunk
Format     :

  word     Shadow map size

-----------------------------------------------------------------------------
Chunk #    : 0x1450
Name       : Shadow map sample range
Level      : 2
Size       : 4
Father     : 3D Editor chunk
Format     :

  float    Shadow map sample range
-----------------------------------------------------------------------------

Chunk #    : 0x1460
Name       : Raytrace bias
Level      : 2
Size       : 4
Father     : 3D Editor chunk
Format     :

  float    Raytrace bias

-----------------------------------------------------------------------------
Chunk #    : 0x1470
Name       : Use raytrace
Level      : 2
Size       : 0
Father     : 3D Editor chunk
Format     : BOOLEAN

This chunk is a flag indicating that raytrace (see chunk 0x1460) is used.
When this chunk is not present, the raytrace is not used.

-----------------------------------------------------------------------------
Chunk #    : 0x2100
Name       : Ambient color
Level      : 2
Size       : 0 + sub-chunk
Father     : 3D Editor chunk
Format     :

This chunk contains a color chunk (in general RGB float)

-----------------------------------------------------------------------------

                           0x4000 : OBJECT BLOCK
                           ---------------------

-----------------------------------------------------------------------------
Chunk #    : 0x4000
Name       : OBJECT BLOCK
Level      : 2
Size       : varying + sub-chunks
Father     : 0x3D3D (3D Editor chunk)
Format     :

  strz     Object name

-----------------------------------------------------------------------------
Chunk #    : 0x4010
Name       : Object hidden
Level      : 3
Size       : 0
Father     : 0x4000 (Object block)
Format     : BOOLEAN

-----------------------------------------------------------------------------
Chunk #    : 0x4012
Name       : Object doesn't cast
Level      : 3
Size       : 0
Father     : 0x4000 (Object block)
Format     : BOOLEAN

-----------------------------------------------------------------------------
Chunk #    : 0x4013
Name       : Matte object
Level      : 3
Size       : 0
Father     : 0x4000 (Object block)
Format     : BOOLEAN

-----------------------------------------------------------------------------
Chunk #    : 0x4015
Name       : External process on
Level      : 3
Size       : 0
Father     : 0x4000 (Object block)
Format     : BOOLEAN

-----------------------------------------------------------------------------
Chunk #    : 0x4017
Name       : Object doesn't receive shadows
Level      : 3
Size       : 0
Father     : 0x4000 (Object block)
Format     : BOOLEAN

-----------------------------------------------------------------------------

                         0x4100 : Triangular mesh
                         ------------------------

-----------------------------------------------------------------------------
Chunk #    : 0x4100
Name       : Triangular Mesh
Level      : 3
Size       : 0 + sub-chunks
Father     : 0x4000 (Object block)
Format     :

-----------------------------------------------------------------------------
Chunk #    : 0x4110
Name       : Vertices list
Level      : 4
Size       : varying
Father     : 0x4100 (Triangular mesh)
Format     :

  word     Number of vertices

           Then, for each vertex
  vector   Position

-----------------------------------------------------------------------------
Chunk #    : 0x4120
Name       : Faces description
Level      : 4
Size       : varying + sub-chunks
Father     : 0x4100 (Triangular mesh)
Format     :

  word     Number of faces

           Then, for each face:
  word     Vertex for corner A (number reference)
  word     Vertex for corner B (number reference)
  word     Vertex for corner C (number reference)
  word     Face flag
            * bit 0 : CA visible
            * bit 1 : BC visible
            * bit 2 : AB visible

After datas, parse sub-chunks (0x4130, 0x4150).

-----------------------------------------------------------------------------
Chunk #    : 0x4130
Name       : Faces material list
Level      : 5
Size       : varying
Father     : 0x4120 (Faces description)
Format     :

  strz     Material name
  word     Number of entries

           Then, for each entry:
  word     Face assigned to this material (number reference)

I think the faces of one object can have different materials. Therefore,
this chunk can be present more than once.

-----------------------------------------------------------------------------
Chunk #    : 0x4140
Name       : Mapping coordinates list for each vertex
Level      : 4
Size       : varying
Father     : 0x4100 (Triangular mesh)
Format     :

  word     Number of vertices

           Then, for each vertex
  float    U coordinate
  float    V coordinate

-----------------------------------------------------------------------------
Chunk #    : 0x4150
Name       : Smoothing groups list
Level      : 5
Size       :
Father     : 0x4120 (Faces description)
Format     :

-----------------------------------------------------------------------------
Chunk #    : 0x4160
Name       : Local coordinate system
Level      : 4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -