Sito Italiano English Site
Cerca nel sito di Now3D
powered by
Now3D
Formato del file delle Scene di Now3D

Author : Giuliano Cornacchiola

Date (dd/mm/yyyy) Now3D Version Description

02/03/2001

1.16.30

Created


Qui riporto le informazioni necessarie :

- Questo formato � completamente in formato Ascii e come tale ogni valore dev'essere interpretato in maniera corretta :
    I tipi di valori che uso sono convertiti in stringa in questa maniera :

Tipo

Descrizione

Long E' un numero senza decimali a 4bit
Single E' un numero decimale a 4bit, uso il carattere "." per dividere la parte intera da quella decimale
Boolean E' un numero booleano. 0 = False -1 = True
String E' una stringa. Non pu� contere spazi! Quindi bisogna sostituire ogni carattere spazio con "%20"
Gradient Vedere CN3DPattern.

- Il File � organizzato in maniera gerarchica. Abbiamo gruppi sotto gruppi e propriet� dei gruppi.
    - I Gruppi si definiscono da uno Start-Header e da un End-Header
            START + <carattere spazio> + Nome del Gruppo
            END + <carattere spazio> + Nome del Gruppo
    - Le Propriet� sono definite all'interno di una sola linea.
            - Ogni propriet� contierne l'Header della propriet� seguito da una o pi� propriet�
                    HeaderRiga + <carattere spazio> + valore della Propriet�
    - Le Propriet� o i sotto Gruppi del Gruppo attuale devono essere definiti al suo interno.

START GROUP1
START SUBGROUP1
HEADER1 VALORE1
HEADER2 VALORE2
HEADER3 VALORE3
END SUBGROUP1
HEADER4 VALORE4
HEADER5 VALORE5
END GROUP1

            Dove l'header di ogni propriet� serve a identificare la propriet� stessa.
    - L'ordine dei parametri all'interno di ogni gruppo pu� essere diverso.
            Per esempio : Se all'interno di un Gruppo inserisco

HEADER1 VALORE1
HEADER2 VALORE2
HEADER3 VALORE3

        oppure

HEADER2 VALORE2
HEADER1 VALORE1
HEADER3 VALORE3

        � la stessa cosa.

- Righe con pi� di una propriet� :
        - Generalmente ogni riga propriet� contiene un Header (1 o pi� caratteri) + uno spazio + valore della Propriet�
                 Ma vi sono dei casi in cui i valori della propriet� sono pi� di uno
        Es. Posizione dell'Oggetto
        Schema :

Object Position
Header Value Type Description
OP Single Position X
  Single Position Y
  Single Position Z


    Example File Row :

OP -12335.4 -9545.34 -65722.23

    Nota : tra ogni propriet� c'� sempre un carattere spazio.

- Il List(1...N), nella descrizione di ogni Gruppo, identifica la ripetizione dello stesso gruppo N volte.
    Es. Normali al Poligono
    Schema :

Poligon Normal List(1...N)
Header Value Type Description
N Single X
  Single Y
  Single Z


    Example File Rows :

N 15.64345 0 98.76883
N -14.02629 -44.27924 88.55853
N -40.70588 -44.27924 79.88979

  In questo caso N era uguale a 3.

- il Gruppo Environment ha nell'Header <Environment Name>
    Ci� significa che a seconda del tipo di Environment che dev'essere esportato si utilizzera
    il corrispettivo nome :

ENVIRONMENT Usata come mappa Ambientale di tutta la scena
REFLECTENVIRONMENT Usata come mappa di riflessi di un materiale
DIFFUSEENVIRONMENT Usata come mappa della luce diffusa dall'ambiente per un materiale

- Nella schematizzazione del File che vedete pi� in basso ho definito gruppi "logici" di propriet� all'interno
    di un rettangolo suddiviso in due parti :

Logical Group Name
Header Value Type Description
HeaderName1 Type1 Des1
HeaderName2 Type2 Des2
HeaderName3 Type3 Des3

        La parte in alto contiene la descrizione del gruppo logico, e i nomi delle tre colonne che
            descrivono al meglio una propriet� :    Header, Value Type, Description
        La parte in basso contiene le propriet�.

Schema del File Scene :

Start Group Header = START SCENE
    
Start Group Header = START SCENEVARIOUS
    
Version
Header Value Type Description
VERSION Long Major
     Long Minor
     Long Revision
2D Filter
Header Value Type Description
B Boolean Bifilter Enable
A Boolean Antialiasing Enable
BackGround
Header Value Type Description
BC Long Back Ground Color
Fog
Header Value Type Description
F Boolean Fog Enable
FC Long Fog Color
FD Single Fog Start
FI Single Fog Intensity
RayTracing
Header Value Type Description
RD Long RT Max Depth
RC Long Index Render Camera
RT Antialiasing
Header Value Type Description
RT Boolean RT Antialiasing Enable
RAM Long RT Antialiasing Mode
RAT Single RT Antialiasing Threshold
RAD Long RT Antialiasing Max Depth
Shadow
Header Value Type Description
S Boolean Shadow Enable
ST Long Shadow Type
SN Long Area Shadow Samples
Global Illumination
Header Value Type Description
AC Long Ambient Color
DD Boolean Diffusion Distribuction Enable
DF Boolean Diffusion Filter Enable
DN Long RT Diffuse Samples
Reflection
Header Value Type Description
RRD Boolean Reflection Distribuction Enable
RN Long RT Reflect Samples
Refraction
Header Value Type Description
TD Boolean RT Refract Distribuction Enable
TN Long RT Refract Distribuction Samples
TIR Boolean Total Internal Reflection Enable
Editor
Header Value Type Description
VF Single Front View Spam X
     Single Front View Spam Y
     Single Front View Spam Z
VR Single Right View Spam X
     Single Right View Spam Y
     Single Right View Spam Z
VT Single Top View Spam X
     Single Top View Spam Y
     Single Top View Spam Z
BV Boolean Bounding Box View Enable
Export ENVIRONMENT (see below)
Camera List(1..N)
Light List(1..N)
Material List(1..N)
Object List(1..N)
End Group Header = END SCENEVARIOUS
End Group Header = END SCENE

 

Start Group Header = START MATERIAL
    
Start Group Header = START VARIOUS
    
Version
Header Value Type Description
VERSION Long Major
     Long Minor
       Long Revision
General
Header Value Type Description
N String Material Name
MT Long Material Type
MS Single Metalness
RS Single Roughness
PT Long TextureProjection
MR Single Map Rotation X
     Single Map Rotation Y
     Single Map Rotation Z
Color
Header Value Type Description
C Long Color
DC Single Diffuse Coefficient
TT Long Color Map Type
TP String Map Color File Name
TPA Long Pattern X
     Long Pattern Y
Specular
Header Value Type Description
SCO Long Specular Color
SC Single Specular Coefficient
ST Long Specular Map Type
SP String Map Specular File Name
SPA Long Pattern X
     Long Pattern Y
SPI Boolean Invert Specular Map
SPV Single Specular Map Value
Glossy
Header Value Type Description
SM Single Smoothness
GT Long Glossy Map Type
GP String Map Glossy File Name
GPA Long Pattern X
     Long Pattern Y
GI Boolean Invert Glossy Map
GV Single Glossy Map Value
Reflect
Header Value Type Description
RC Long Reflect Color
Ambient
Header Value Type Description
AC Long Ambient Color
Bump
Header Value Type Description
BT Long Bump Map Type
BP String Map Bump File Name
BPA Long Pattern X
     Long Pattern Y
BI Boolean Invert Bump Map
BV Single Bump Map Value
Opacity
Header Value Type Description
OP Long Opacity Color
OV Single Opacity Value
OPS Single Opacity Silhouette
D Single Density
RI Single Refraction Index
OT Long Opacity Map Type
OPP String Map Opacity File Name
OPA Long Pattern X
     Long Pattern Y
OPI Boolean Invert Opacity Map
Light
Header Value Type Description
LT Long Light Map Type
LF String Map Light File Name
LPA Long Pattern X
     Long Pattern Y
LPI Boolean Invert Light Map
LV Single Light Map Value
HyperTexture
Header Value Type Description
HT Boolean HyperTexture Enable
HTTH Single HyperTexture Threshold
HTD Single HyperTexture Detail
HTTY Long HyperTexture Type
HTVT Long HT Volumetric Type
HTVS Boolean HT Volumetric Shadow
HTP String Map HyperTexture File Name
HTPA Long Pattern X
     Long Pattern Y
HTI Boolean Invert HyperTexture Map
Noise
Header Value Type Description
NT Long Noise Type
NC Gradient Noise Gradient
NPA Single Noise Pattern
NB Single Noise Bias
NUV Single Up Noise Limit
NLV Single Low Noise Limit
NF Single Noise Fractal Value
NP1 Single Noise Param1
NP2 Single Noise Param2
FBMO Single fBm Octaves
FBML Single fBm Lacunarity
FBMI Single fBm Fractal Increment
End Group Header = END VARIOUS
Export REFLECTENVIRONMENT (see below)
Export DIFFUSEENVIRONMENT (see below)
Start Group Header = START NOISEPERMUTATION (It's present only if Noise is used)
 
Noise Permutation List(1...N)
Header Value Type Description
NP Single Noise Permutation
End Group Header = END NOISEPERMUTATION
Start Group Header = START NOISEWAVELET (It's present only if Noise is used)
 
Noise Wavelet List(1...N)
Header Value Type Description
NW Single Noise Wavelet X
     Single Noise Wavelet Y
     Single Noise Wavelet Z
End Group Header = END NOISEWAVELET
End Group Header = END MATERIAL

 

Start Group Header = START CAMERA
    
Camera Properties
Header Value Type Description
CA Single Rotation X
     Single Rotation Y
     Single Rotation Z
CP Single Position X
     Single Position Y
     Single Position Z
ZO Single Zoom
Camera Viewport
Header Value Type Description
RW Long Render window Width
RH Long Render window Height
Exposure
Header Value Type Description
EX Boolean Camera Exposure Enable
EXV Single Camera Exposure Value
End Group Header = END CAMERA

 

Start Group Header = START LIGHT
    
Light Properties
Header Value Type Description
LA Single Rotation X
     Single Rotation Y
LP Single Position X
     Single Position Y
     Single Position Z
LC Long Light Color
LV Single Light Value
LT Long Light Type
LS Boolean Light Can Shadow
LVI Boolean Visible
Spot Cone Properties
Header Value Type Description
LSE Single Light Spot Exponent
LSA Single Light Spot Cone Angle
Attenuation
Header Value Type Description
A Boolean Light Attenuation Enable
AD Single Light Attenuation Distance
End Group Header = END LIGHT

 

Start Group Header = START <Environment Name>
    
Environment Properties
Header Value Type Description
T Long Environment Type
MT Long Environment Map Type
Map Properties
Header Value Type Description
R Single Map Rotation X
     Single Map Rotation Y
     Single Map Rotation Z
MX Boolean Mirror X
V Single Map Value
Environment Files
Header Value Type Description
F String Environment File Name
EPF String Environment Cubic Front File Name
EPR String Environment Cubic Right File Name
EPU String Environment Cubic Up File Name
EPB String Environment Cubic Back File Name
EPL String Environment Cubic Left File Name
EPD String Environment Cubic Down File Name
HDR String Environment HDR File Name
HDR Properties
Header Value Type Description
HDRE Single HDR Exposure
HDRG Single HDR Gamma
End Group Header = END <Environment Name>

 

Start Group Header = START OBJECT
 

    

Start Group Header = START VARIOUS
    
Version
Header Value Type Description
VERSION Long Major
     Long Minor
     Long Revision
General
Header Value Type Description
ON String Object Name
OP Single Position X
     Single Position Y
     Single Position Z
BP Boolean Block Position X
     Boolean Block Position Y
     Boolean Block Position Z
OR Single Rotation X
     Single Rotation Y
     Single Rotation Z
BR Boolean Block Rotation X
     Boolean Block Rotation Y
     Boolean Block Rotation Z
OS Single Scale
     Single Scale X
     Single Scale Y
     Single Scale Z
OC Long Default Color
MN String Material Name associated
FA String Object Father Name associated
PT Long Primitive Type
L Boolean Object Light
V Boolean Visible
TC Boolean Affect to Children
End Group Header = END VARIOUS
Start Group Header = START LIGHTTYPE (It's present only if the Object is Light type)
    
Light Properties
Header Value Type Description
LA Single Rotation X
     Single Rotation Y
LV Single Light Value
LT Long Light Type
Spot Cone Properties
Header Value Type Description
LSE Single Light Spot Exponent
LSA Single Light Spot Cone Angle
Attenuation
Header Value Type Description
A Boolean Light Attenuation Enable
AD Single Light Attenuation Distance
End Group Header = END LIGHTTYPE
Start Group Header = START VERTEX (If the Object is a Mesh)
    
Vertex List(1...N)
Header Value Type Description
V Single X
     Single Y
     Single Z
End Group Header = END VERTEX (If the Object is a Mesh)
Start Group Header = START POLIGON (If the Object is a Mesh)
    
Poligon 3 Edge List(1...N)
Header Value Type Description
P3 Long Index Vertex A
     Long Index Vertex B
     Long Index Vertex C
Poligon 4 Edge List(1...N)
Header Value Type Description
P4 Long Index Vertex A
     Long Index Vertex B
     Long Index Vertex C
     Long Index Vertex D
End Group Header = END POLIGON (If the Object is a Mesh)
Start Group Header = START NORMALSMOOTH (If the Object is a Mesh)
    
Vertex Normal List(1...N)
Header Value Type Description
NS Single X for Vertex A
     Single Y for Vertex A
     Single Z for Vertex A
     Single X for Vertex B
     Single Y for Vertex B
     Single Z for Vertex B
     Single X for Vertex C
     Single Y for Vertex C
     Single Z for Vertex C
End Group Header = END NORMALSMOOTH (If the Object is a Mesh)
End Group Header = END OBJECT


Migliorie Possibili :
    - Per un futuro prossimo ho in mente di fare una versione binaria dello stesso file sulla falsariga del formato dei file 3DStudio (.3ds)