Introduction to NVF
Whereas NIFF is designed as an intermediate format, created by converting the CG tool data, NVF is designed as a format closer to the target, meant for displaying NIFF on the N64. NIFF is converted to NVF and then stored in the N64 ROM area. The previewer (nvfview etc..) loads NVF from the N64 ROM area into main memory and then displays the data.
CHUNK MAGIC 4 bytes |
CHUNK DATA SIZE 4 bytes |
DATA The length is the byte size specified by CHUNK DATA SIZE. |
The length is the byte size specified by CHUNK DATA SIZE.
However, the Chunks are not enumerated as they are in the file. There is a special Chunk called 'FORM' which comprises a number of Chunks, and all the Chunks are contained in this. At the present time, one file can contain only one FORM.
CHUNK MAGIC 4 bytes('FORM') | |
CHUNK DATA SIZE 4 bytes | |
DATA | FORM MAGIC 4 bytes'NVFB' |
CHUNK 1 | |
CHUNK 2 | |
.... |
In NVF, 1 Chunk expresses 1 node. There are various types of nodes, and each of them has its own Chunk Magic. However, there are three kinds of Chunks which are used for purposes other than nodes, as described below.
This is the header. It holds information relating to the entire NVF. Naturally, it appears only once in the form. The format is shown below.
Header 'NHDR' { long num_of_nodes long num_of_root_nodes long root_node_index[num_of_root_nodes] long symbol_table_size char symbol_table[symbol_table_size] long comment_size char comment[comment_size] }
This Chunk describes the relationship between nodes. It appears only once in the form. The format is shown below.
ReferenceList 'REFR' { long num_of_references { short type( 0: FtoF, 1: FtoL, 2: LtoF, 3: LtoL ) short size node target short target_field short target_index node reference short reference_field short reference_index } reference[num_of_references] }
This Chunk describes external nodes. It appears only once in the form. The format is shown below.
ExternalSymbolList 'XTRN' { long num_of_symbols { long module_id long node_name_entry } symbol[num_of_symbols] }
|
|
|
AnimatedGeometry
Defines geometry with attached animation.
Animation
Defines floating point vector animation. num_of_elements indicates the size of vector.
BackgroundColor
Designate background color. Depth is fixed as 0xFFFC.
ClassicScale
ClassicScale specifies the scaling rate, or degree of enlargement. All children are influenced by this coordinate transformation.
ConstantFunction
Defines the animation keyframe function. ConstantFunction switches constants over time, so you could call it a zero-order interpolation function. The function node is not functional on its own. It starts functioning after being referenced from the animation node.
DepthFog
Sets the Fog. The behavior when effective Fog appears in the scene graph numerous times is undefined.
DirectionConstraint
Points x axis to global directions. Also, corrects y axis to make a right angle with x axis. All children are affected by this coordinate transformation.
DirUpConstraint
Points X axis to global direction and
y axis to the direction of the global up_vector. Also corrects y axis to make a right angle with x axis. All children are affected by this coordinate transformation.
DirectionalLight
Defines the directional light source. The light source node does not function on its own. It starts functioning after being referenced from the light source set node
EnvelopeGeometry
Defines the geometry of the Flexible envelope. The vertex type must be either EnvelopeVertexC or EnvelopeVertexN.
EnvelopeVertexC
Defines the vertices of the Flexible Envelope.
However, normals are not calculated. (Therefore, lighting is impossible.) The vertices of the Flexible Envelope are classified into three types:
rigid vertex, morph vertex and combine vertex.
The method for calculating each type of vertex is explained below.
EnvelopeVertexN
Defines the vertices of the Flexible Envelope.
Unlike EnvelopeVertexC normal lines are also calculated.
(In other words, Lighting is possible.)
The data contents are almost the same as for EnvelopeVertexC.
Float
This does nothing except hold floating point values. It is convenient for collectively managing the values set in the time field of Animation, etc..
Geometry
Defines the geometry. In Geometry, triangles are classified according to their modification_group. A number of modification_groups are then gathered together forming a vertex_group. The Geometry drawing process is illustrated below.
HermiteFunction
Defines a key frame function of animation. HermiteFunction is a trilinear interpolation function. A function node does not function alone. It will function only after it is referenced from an
animation node. The interpolation formula is as follows:
LightSet
Defines a set of light sources. This node is related to the material node and performs lighting.
LinearFunction
Defines the animation keyframe function. LinearFunction is a first-order interpolation function. The function node is not functional on its own. It starts functioning after being referenced
from the animation node.
Lod
The LOD node selects the appropriate node from the nodes enumerated in "level" corresponding to the present distance between the global_translation and the camera. The LOD node is
not evaluated until evaluation of the active camera is finished.
Marker
This node is used for displaying the coordinate icons. The red coordinate icon corresponds to the X axis, the green to the Y axis, and the blue to the Z axis.
Material
Defines the material. The material mechanism has been changed significantly since NIFF1.0. In NIFF1.0, shade was monochrome, but in NIFF2.0, colors were added in consideration of ambient, emission, and diffuse. Because of this change, the method for setting the color combiner is also different. Shade is calculated using the following expression.
Here, d[I] is the "diffuse" coefficient determined from the direction of light source "I" and the normal line of the vertex.
Module
Defines Module. The Module behaves as if the whole Module has become a child of this node.
Nop
Does nothing
Orientation
Orientation specifies the direction of the X axis and the direction of the Y axis to create a rotation matrix. The Y axis is corrected so that it is orthogonal to the X axis. All children are influenced by this coordinate transformation. In addition, ex and ey are assured to be stored in a contiguous area, and ex[3] is handled in the same manner as ey[0]. By utilizing this, it becomes possible to attach 6-element animation. If you use 6-element animation the keyframe compression rate will probably be lower than with 3-element animation, but the tradeoff is a boost in processing speed.
OrientationConstraint
OriConstraint specifies the rotation matrix as a global matrix. All children are influenced by this coordinate transformation.
PerspectiveCamera
Defines the camera perspective. field_of_view_y is specified in degrees.
DirectionalLight
Defines pseudo light source. A light source node does not function alone. It will function only after it is referenced from an light source set node.
PositionConstraint
PositionConstraint specifies the translation with global vectors. All children are influenced by this coordinate transformation.
RotationX
RotationX rotates in order around the X axex.
All children are influenced by this coordinate transformation.
RotationXYZ
RotationXYZ rotates in order around the X, Y and Z axes. All children are influenced by this coordinate transformation.
RotationY
RotationY rotates around the Y axis. All children are influenced by this coordinate transformation.
RotationZ
RotationY rotates around the Z axis. All children are influenced by this coordinate transformation.
RotationZXY
RotationZXY rotates in order around the Z, X and Y axes. All children are influenced by this coordinate transformation.
Scale
Scale specifies the SOFTIMAGE format scale of enlargement. This method of enlargement is particularly effective with character animation. All children are influenced by this coordinate
transformation.
Shape
Integrates geometry, material and texture, and creates the drawing object.
Skeleton2d2
Defines Skeleton. Skeleton is the node used for processing inverse kinematics. "axis" is a vector indicating the extent to which the Z axis differs from its original direction. The inverse kinematics algorithm is omitted here.
SkeletonPx2
Defines Skeleton. Skeleton is the node used for processing inverse kinematics. "axis" is a vector indicating the extent to which the Z axis differs from its original direction. The difference between SkeletonPx2 and Skeleton2d2 is that SkeletonPx2 can specify the Z axis direction by using z_pos. The inverse kinematics algorithm is omitted here.
SkeletonUv2
Defines Skeleton. Skeleton is the node used for processing inverse kinematics. "axis" is a vector indicating the extent to which the Z axis differs from its original direction. The difference between SkeletonUv2 and Skeleton2d2 is that SkeletonUv2 can specify the Y axis direction by using resplane_pos. The inverse kinematics algorithm is omitted here.
Switch
Switch selects the node specified by which_choice. When which_choice is 0xFFFFFFFF, no "choice" is selected.
Texture
Defines the Texture. The image and the color table are not defined in the Texture node. What mainly is defined is tile-related information. It is assured that the order of fields of Animation s0, t0, s1, t1 is as follows: s0[0], t0[0], s1[0], t1[0], s0[1], t0[1], s1[1], and t1[1].
TextureImage
Defines the texture image.
TextureLut
Defines the texture color table.
TransformInfo
This does nothing, but it is used when referencing the coordinate transformation inforamtion.
Translation
Translation specifies the translation. All children are influenced by this coordinate transformation.
VertexInterpolator
Defines the interpolation vertices. These are used in AnimatedGeometry.
Problems / Limitations
Material Compatibility
AnimatedGeometry 'AGEO' {
long name_entry
node vertex
float time :0
}
Animation 'ANMF' {
long name_entry
long function_index :0
float time :1
long num_of_elements
float value[num_of_elements] :2
float diffential[num_of_elements] :3
long num_of_functions
node function[num_of_functions]
}
BackgroundColor 'BGCL' {
long name_entry
float4 color :0
short depth :1
}
ClassicalScale 'CSCL' {
long name_entry
float3 scale :0
long num_of_children
node child[num_of_children]
}
ConstantFunction 'FNCC' {
long name_entry
char num_of_elements
char continuity
# 0: Noncontinuous
# 1: C0 Continuous
# 2: C1 Continuous
float junction
# The junction point time for continuous animation.
# It is ignored for noncontinuous animation.
long num_of_keys
{
float time
float value[num_of_elements]
} key[num_of_keys]
}
Fog 'DFOG' {
long name_entry
float fog_near :0
float fog_far :1
float4 fog_color :2
}
DirConstraint 'DIRC' {
long name_entry
float3 direction :0
long num_of_children
node child[num_of_children]
}
DirUpConstraint 'DRUC' {
long name_entry
float3 direction :0
float3 up_vector :1
long num_of_children
node child[num_of_children]
}
DirectionalLight 'LGTD' {
long name_entry
float3 direction :0
float3 color :1
# Values from 0 ~ 1
}
EnvelopeGeometry 'ENVG' {
long name_entry
node vertex
long num_of_joints
{
float9 orientation :0 (index = joint_index * 9)
float9 scaled_orientation :1 (index = joint_index * 9)
float3 translation :2 (index = joint_index * 3)
float3 scale :3 (index = joint_index * 3)
} joint[num_of_joints]
}
EnvelopeVertexC 'EVVC' {
long name_entry
long segment
short num_of_joints
# The following is the description for all rigid groups:
short num_of_rigid_groups
{
short joint_index
short num_of_vertices
{
short3 coord
char4 normal/color
short2 tex_coord
} vtx[num_of_vertices]
} rigid_group[num_of_rigid_groups]
# The following is the description for all morph group:
short num_of_morph_groups
{
short primary_joint_index
short secondary_joint_index
short num_of_vertices
short num_of_coords
short table_size
#Plan to support 9,17,33,65
{
float3 coord[num_of_coords]
} table[table_size]
{
short coord_index
char4 color
short2 tex_coord
} vtx[num_of_vertices]
} morph_group[num_of_morph_groups]
# The following is the description for all combine group:
short num_of_combine_groups
{
short num_of_vertices
short num_of_coords
short num_of_joint_groups
{
short joint_index
short num_of_joint_vertices
{
short vtx_index
float3 coord
# The result of multiplying the actual "coord" by "weight"
float weight
} joint_vertex[num_of_joint_vertices]
} joint_group[num_of_joint_groups]
{
short coord_index
char4 color
short2 tex_coord
} vtx[num_of_vertices]
} combine_group[num_of_combine_groups]
# The following is information for triangle setup:
long num_of_vertex_groups
{
short rigid_group_index
short rigid_vtx_offset
char rigid_vtx_cache_offset
char rigid_vtx_load_count
short morph_group_index
short morph_vtx_offset
char morph_vtx_cache_offset
char morph_vtx_load_count
short combine_group_index
short combine_vtx_offset
char combine_vtx_cache_offset
char combine_vtx_load_count
char num_of_rgba_modification
{
char vertex_index
char4 rgba
} rgba_modification[num_of_rgba_modification]
char num_of_st_modification
{
char vertex_index
short2 st
} st_modification[num_of_st_modification]
char num_of_xy_modification
{
char vertex_index
short2 xy
} xy_modification[num_of_xy_modification]
char num_of_z_modification
{
char vertex_index
long z
} z_modification[num_of_z_modification]
char modify_primitive_color( 0:No Modification, 1:Modification )
long primitive_color[modify_primitive_color]
long num_of_triangles
char3 triangle[num_of_triangles]
} vertex_group[num_of_vertex_groups]
}
The transformation matrix of the joint is used for the coordinate transformation, just like in a conventional coordinate transformation.
The angles of the two joints are used as parameters for morphing. A table is created in degree units of 180/(the number of tables - 1).
The basic implementation for weighted vertices.
EnvelopeVertexN 'EVVN' {
long name_entry
long segment
short num_of_joints
# The following is the description for all rigid group:
short num_of_rigid_groups
{
short joint_index
short num_of_vertices
{
short3 coord
char4 normal/color
short2 tex_coord
} vtx[num_of_vertices]
} rigid_group[num_of_rigid_groups]
# The following is the description for all morph group:
short num_of_morph_groups
{
short primary_joint_index
short secondary_joint_index
short num_of_vertices
short num_of_coords
short num_of_normals
short table_size
# Plan to sussport 9,17,33,65
{
float3 coord[num_of_coords]
float3 normal[num_of_normals]
} table[table_size]
{
short coord_index
short normal_index
short2 tex_coord
} vtx[num_of_vertices]
} morph_group[num_of_morph_groups]
# The following is the description for all combine group:
short num_of_combine_groups
{
short num_of_vertices
short num_of_coords
short num_of_normals
short num_of_joint_groups
{
short joint_index
short num_of_joint_coords
short num_of_joint_normals
{
short coord_index
float3 coord
# The result of multiplying the actual "coord" by "weight"
float weight
} joint_vertex[num_of_joint_coords]
{
short normal_index
float3 normal
# The result of multiplying the actual "normal" by "weight"
} joint_vertex[num_of_joint_normals]
} joint_group[num_of_joint_groups]
{
short coord_index
short normal_index
short2 tex_coord
} vtx[num_of_vertices]
} combine_group[num_of_combine_groups]
# The following is the information for triangle setup:
long num_of_vertex_groups
{
short rigid_group_index
short rigid_vtx_offset
char rigid_vtx_cache_offset
char rigid_vtx_load_count
short morph_group_index
short morph_vtx_offset
char morph_vtx_cache_offset
char morph_vtx_load_count
short combine_group_index
short combine_vtx_offset
char combine_vtx_cache_offset
char combine_vtx_load_count
char num_of_rgba_modification
{
char vertex_index
char4 rgba
} rgba_modification[num_of_rgba_modification]
char num_of_st_modification
{
char vertex_index
short2 st
} st_modification[num_of_st_modification]
char num_of_xy_modification
{
char vertex_index
short2 xy
} xy_modification[num_of_xy_modification]
char num_of_z_modification
{
char vertex_index
long z
} z_modification[num_of_z_modification]
char modify_primitive_color( 0:No Modification, 1:Modification )
long primitive_color[modify_primitive_color]
long num_of_triangles
char3 triangle[num_of_triangles]
} vertex_group[num_of_vertex_groups]
}
Float 'FLOT' {
long name_entry
long num_of_elements
float value[ num_of_elements ] :0
}
Geometry 'GEOM' {
long name_entry
long segment
long num_of_vertices
{
short3 coord
char4 normal/color
short2 tex_coord
} vtx[num_of_vertices]
long num_of_vertex_groups
{
short vertex_offset
char vertex_cache_offset
char vertex_load_count
# The above three parameters are for vertex loading.
char num_of_rgba_modification
{
char vertex_index
char4 rgba
} rgba_modification[num_of_rgba_modification]
char num_of_st_modification
{
char vertex_index
short2 st
} st_modification[num_of_st_modification]
char num_of_xy_modification
{
char vertex_index
short2 xy
} xy_modification[num_of_xy_modification]
char num_of_z_modification
{
char vertex_index
long z
} z_modification[num_of_z_modification]
char modify_primitive_color( 0:No Modification, 1:Modification )
long primitive_color[modify_primitive_color]
long num_of_triangles
# The above parameters are the vertex-change parameters.
char3 triangle[num_of_triangles]
} vertex_group[num_of_vertex_groups]
}
for each vertex_group do
Read vertices into vertex cache.
Changes the vertices in accordance with the vertex-change parameters.
Changes Primitive_color
Draw triangles.
done
HermiteFunction 'FNCH' {
long name_entry
char num_of_elements
char continuity
# 0: Discontinuous
# 1: C0 Continuous
# 2: C1 Continuous
float junction
long num_of_keys
{
float time
float value[num_of_elements]
float differential[num_of_elements]
} key[num_of_keys]
}
LightSet 'LTST' {
long name_entry
float3 ambient :0
#Value from 0-1.
long num_of_lights
node lights[num_of_lights]
}
LinearFunction 'FNCL' {
long name_entry
char num_of_elements
char continuity
# 0: Disontinuous
# 1: C0 Continuous
# 2: C1 Continuous
float junction
long num_of_keys
{
float time
float value[num_of_elements]
} key[num_of_keys]
}
LOD 'LODD' {
long name_entry
char group( 0~31 )
char num_of_levels
float range[num_of_levels-1]
node level[num_of_levels]
}
Marker 'MRKR' {
long name_entry
short type
short group_index
}
Material 'MTRL' {
long name_entry
node light_set
float4 ambient :0
# Value from 0 ~ 255
float4 emission :1
# Value from 0 ~ 255
float4 diffuse :2
# Value from 0 ~ 255
float4 primitive_color :3
# Value from 0 ~ 255
char lighting
# 0: No lighting
# 1: With lighting
char shade_model
# 0: flat
# 1: smooth
char effect
# 0: none
# 1: specular
# 2: reflection
char env_color_mode
# &1: emission
# &2: ambient
# Specifies which components to add to env_color. The components added to
# env_color are not added to shade_color.
{
char4 CC0color
# In order of A, B, C, D
# 0: CombColor
# 1: Tex0Color
# 2: Tex1Color
# 3: PrimColor
# 4: ShadeColor
# 5: EnvColor
# 6: KeyCenter(B only),KeyScale(C only),1.0(A,D only)
# 7: CombAlpha(C only),Noise(A only),K4(B only),0.0(D only)
# 8: Tex0Alpha(C only)
# 9: Tex1Alpha(C only)
# 10: PrimAlpha(C only)
# 11: ShadeAlpha(C only)
# 12: EnvAlpha(C only)
# 13: LODFrac(C only)
# 14: PrimLODFrac(C only)
# 15: K5(C only)
# 31: 0.0
char4 CC0alpha
# In order to A, B, C, D
# 0: CombAlpha(A,B,D only),LODFrac(C only)
# 1: Tex0Alpha
# 2: Tex1Alpha
# 3: PrimAlpha
# 4: ShadeAlpha
# 5: EnvAlpha
# 6: PrimLODFrac(C only),1.0(A,B,D only)
# 7: 0.0
char4 CC1color
# The same as CC0color
char4 CC1alpha
# The same as CC0alpha
} cc_mode[2]
}
shade = mat_emission + light_ambient*mat_ambient + light[0]*mat_diffuse[0]*d[0] + ....
Module 'MDUL' {
long name_entry
long module_id
}
Nop 'NOPR' {
long name_entry
long num_of_children
node child[num_of_children]
}
Orientation 'ORNT' {
long name_entry
float3 ex :0
float3 ey :1
long num_of_children
node child[num_of_children]
}
OriConstraint 'ORIC' {
long name_entry
float9 orientation :0
long num_of_children
node child[num_of_children]
}
PerspectiveCamera 'PCAM' {
long name_entry
float field_of_view_y :0
float aspect_ratio :1
float clip_near :2
float clip_far :3
float tan_clip_left :4
float tan_clip_right :5
float tan_clip_top :6
float tan_clip_bottom :7
long group_mask
}
PointLight 'LGTP' {
long name_entry
float3 position :0
float3 color :1
# Value from 0 ~ 1
float constant_attenuation :2
float linear_attenuation :3
float quadratic_attenuation :4
}
PositionConstraint 'POSC' {
long name_entry
float3 translation :0
long num_of_children
node child[num_of_children]
}
RotationX 'ROTX' {
long name_entry
float rotation :0
# radian value
long num_of_children
node child[num_of_children]
}
RotationXYZ 'RXYZ' {
long name_entry
float3 rotation :0
# radian value
long num_of_children
node child[num_of_children]
}
RotationY 'ROTY' {
long name_entry
float rotation :0
# radian value
long num_of_children
node child[num_of_children]
}
RotationZ 'ROTZ' {
long name_entry
float rotation :0
# radian value
long num_of_children
node child[num_of_children]
}
RotationZXY 'RZXY' {
long name_entry
float3 rotation :0
# radian value
long num_of_children
node child[num_of_children]
}
Scale 'SCAL' {
long name_entry
float3 scale :0
long num_of_children
node child[num_of_children]
}
Shape 'SHAP' {
long name_entry
char group( 0~31 )
char flags
# &1: front face culling
# &2: back face culling
# &4: z buffer enable
# &8: use vertex alpha
# &16: use vertex color
short priority
# Interprited by group.
{
long blend_color
char alpha_compare( 0:none, 1:threashold, 2:dither )
char alpha_dither( 0:disable, 1:pattern, 2:not_pattern, 3:noise )
} alpha[2]
char cycle[2]( 0:fill, 1:1 cyc., 2:2 cyc. 3:copy )
{
char4 BL0
# Order of P, A, M, B
# About P and M
# 0: InColor
# 1: MemColor
# 2: BlendColor
# 3: FogColor
# About A
# 0: InAlpha
# 1: FogAlpha
# 2: ShadeAlpha
# 3: 0.0
# About B
# 0: 1-A
# 1: MemAlpha
# 2: 1.0
# 3: 0.0
char4 BL1
# Same as BL0.
short render_mode
# &8: AA_EN
# &0x10: Z_CMP
# &0x20: Z_UPD
# &0x40: IM_RD
# &0x80: CLR_ON_CVG
# &0x300 = 0x000: CVG_DST_CLAMP
# &0x300 = 0x100: CVG_DST_WRAP
# &0x300 = 0x200: CVG_DST_FULL
# &0x300 = 0x300: CVG_DST_SAVE
# &0xC00 = 0x000: ZMODE_OPA
# &0xC00 = 0x400: ZMODE_INTER
# &0xC00 = 0x800: ZMODE_XLU
# &0xC00 = 0xC00: ZMODE_DEC
# &0x1000: CVG_X_ALPHA
# &0x2000: ALPHA_CVG_SEL
# &0x4000: FORCE_BL
} render_mode[2]
node geometry
node material
node texture
}
Skeleton2D2 'SK22' {
long name_entry
long flip
float bone_length[2] :0
float3 joint1_scale :1
float3 joint2_scale :2
float3 effector_pos :3
float3 axis :4
long num_of_children1
node children1[num_of_children1]
long num_of_children2
node children2[num_of_children2]
long num_of_children_e
node children_e[num_of_children_e]
}
SkeletonPX2 'SKP2' {
long name_entry
float3 z_pos :5
long flip
float bone_length[2] :0
float3 joint1_scale :1
float3 joint2_scale :2
float3 effector_pos :3
float3 axis :4
long num_of_children1
node children1[num_of_children1]
long num_of_children2
node children2[num_of_children2]
long num_of_children_e
node children_e[num_of_children_e]
}
SkeletonUV2 'SKU2' {
long name_entry
float3 resplane_pos :5
long flip
float bone_length[2] :0
float3 joint1_scale :1
float3 joint2_scale :2
float3 effector_pos :3
float3 axis :4
long num_of_children1
node children1[num_of_children1]
long num_of_children2
node children2[num_of_children2]
long num_of_children_e
node children_e[num_of_children_e]
}
Switch 'SWCH' {
long name_entry
long which_choice :0
long num_of_choice
node choice[num_of_choice]
}
Texture 'TXTR' {
long name_entry
node image
node lut
short scaling_s
short scaling_t
char mipmap
# 0: Do not use MipMap
# 1: Use MipMap
char texture_detail
# 0: clamp
# 1: sharp
# 2: detail
char filter
# 0: nearest
# 1: bilinear
# 2: average
char perspective_correction
# 0: No perspective correction
# 1: Do perspective correction
char yuv_color_convert
# 0: Do not use YUV color conversion
# 1: Use YUV color conversion
char num_of_tiles
# The maximum is 7 tiles.(For the sake of "run time" optimization)
{
long texel_offset
char format
# 0: I4
# 1: I8
# 2: IA31
# 3: IA44
# 4: IA88
# 5: RGBA5551
# 6: RGBA8888
# 7: YUV
# 8: CI4
# 9: CI8
char lut_offset
# The actual LUT offset is the sum of the Texture's lut_offset
# and the tile's lut_offset.
short stride
# The width of the title in "word" units
long s0 :0 ( index = tile number)
long t0 :1 ( index = tile number)
long s1 :2 ( index = tile number)
long t1 :3 ( index = tile number)
char clamp_mode_s
# &1: mirror
# &2: clamp
char clamp_mode_t
# The same as clamp_mode_s
char shift_s
char shift_t
char mask_s
char mask_t
} tile[num_of_tiles]
}
TextureImage 'TXIM' {
long name_entry
long segment
short offset0
short size0
char8 texel0[size0]
short offset1
short size1
char8 texel1[size1]
}
TextureLUT 'TLUT' {
long name_entry
char segment
char format
# 0:RGBA5551
# 1:IA88
short lut_size
short lut[lut_size]
}
TransformInfo 'XFMI' {
long name_entry
output:
float3 global_scale :0
float3 global_cls_scale :1
float3 global_position :2
float9 global_orientation :3
float9 scaled_orientation :4
}
Translation 'XLAT' {
long name_entry
float3 translation :0
long num_of_children
node child[num_of_children]
}
VertexInterpolator 'VTXI' {
long name_entry
long segment
# The segment number of the vertex storage buffer.
# The following is the coordinate information
short coord_interpolation_type;
# 0: constant
# 1: linear
short num_of_coord_tables
# When num_of_coord_tables is set to 1, the coord component is not interpolated.
short num_of_coords
{
float key
short3 coord[num_of_coords]
} coord_table[num_of_coord_tables]
# The following is the normal line information
short normal_interpolation_type;
# 0: constant
# 1: linear
short num_of_normal_tables
# When num_of_normal_tables is set to 1,
# the normal component is not interpolated.
short num_of_normals
{
float key
char4 normal[num_of_normals]
} normal_table[num_of_normal_tables]
# The following is the texture coordinate informtion
short tex_coord_interpolation_type;
# 0: constant
# 1: linear
short num_of_tex_coord_tables
# When num_of_tex_coord_tables is set to 1,
# the tex_coord component is not interpolated.
short num_of_tex_coords
{
float key
short2 tex_coord[num_of_tex_coords]
} tex_coord_table[num_of_tex_coord_tables]
# The following information is for vertex setup.
short num_of_vertices
{
short coord_index
short normal_index
short tex_coord_index
} index[num_of_vertices]
# The following information is for triangle setup.
long num_of_vertex_groups
{
short vertex_offset
char vertex_cache_offset
char vertex_load_count
char num_of_rgba_modification
{
char vertex_index
char4 rgba
} rgba_modification[num_of_rgba_modification]
char num_of_st_modification
{
char vertex_index
short2 st
} st_modification[num_of_st_modification]
char num_of_xy_modification
{
char vertex_index
short2 xy
} xy_modification[num_of_xy_modification]
char num_of_z_modification
{
char vertex_index
long z
} z_modification[num_of_z_modification]
char modify_primitive_color( 0:No Modificarion, 1:Modification)
long primitive_color[modify_primitive_color]
long num_of_triangles
char3 triangle[num_of_triangle]
} vertex_group[num_of_vertex_groups]
}
. In nvfview, ambient and emission may be used for EnvColor, and TriColor is not used. In addition, NVF has parameters that cannot be specified by NIFF1.0, but they are interpreted as follow by niff2nvf.
EnvColor and TriColor are handled differently in nvfview than they are in a href="../n64prev/seg1.htm">n64prev
ambient | 255 | 255 | 255 | 255 |
diffuse | 255 | 255 | 255 | 255 |
emission | 255 | 255 | 255 | 255 |
env_color_mode | emission is output to env_color |
In other words, TriColor is always white.
Large textures
In NVF, textures which exceed 4KB cannot be used. Such large textures are split by converters like niff2nvf.
Increased number of nodes
NVF displays a scene by taking nodes with very small functions and combining them together. Therefore, a scene which is simply converted from NIFF to NVF has many meaningless nodes. This increase in the number of nodes leads to an increase in processing time by the viewer's CPU and lowers the viewer's frame rate.
The applicable range of ClassicScale
Most Skeletons and Constraints are not influenced by ClassicScale. Rather, these nodes are influenced by Scale.