Now3D scene file format

Author : Giuliano Cornacchiola

Date (dd/mm/yyyy) Now3D Version Description

06/07/2001

1.16.30

Created


Here I report the information you need :

- This file format is completely in Ascii and like such each value must be interpret in correct manner:
    The values types that I use are converted in string in this manner:

Type

Description

Long Is a number without decimals at 4bit
Single Is a float number at 4bit, I use the "." char to divide the entire part from that decimal
Boolean Is a boolean number. 0 = False -1 = True
String Is a string. It can't contain the space character! Then you must to replace each character Space with "%20"
Gradient See CN3DPattern.

- The File is organized in a hierarchy manner. We have groups sub-groups and groups properties.
    - The Groups are characterized from a Start-Header and from an End-Header
            START + <character space> + Group name
            END + <character space> + Group name
    - The Properties are defined in a one only line.
            - Each property contain the Header of the property followed by one or more properties
                HeaderRow + <character space> + Property value
    - The properties or the sub-Groups of the actual Group must be defined inside.

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

            Where the property header is the property identify.
    - The property order inside each group is indifferent.
            For example : If inside a Group I insert

HEADER1 VALORE1
HEADER2 VALORE2
HEADER3 VALORE3

        Or

HEADER2 VALORE2
HEADER1 VALORE1
HEADER3 VALORE3

        is the same.

- Row with much properties :
        -  Generally each line-property contains a Header (1 or more characters) + one space + Property value
                 But in some cases the property value are more of one
        Ex. Object Position
        Diagram :

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

    Note : between each property there is always a space character.

- The List(1...N), in the Group description identifies the N time you can find the same group.
    Ex. Poligon Normals
    Diagram :

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 this case N is equal to 3.

- The Environment Group have in the Header <Environment Name>
    That means that according to the type of Environment that exported you must to use
    the correspondent name :

ENVIRONMENT Used how Environment map of the scene
REFLECTENVIRONMENT Used how Reflect map of a material
DIFFUSEENVIRONMENT Used how Diffuse map of a material

- In the File diagram below, I have defined logical groups of property inside
    a rectangle subdivise in two parts :

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

        The Top part contains the logical group description, and the names of the three columns that
            they describe one property :    Header, Value Type, Description
        The Low part contains the property.

File Scene Diagram :

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