The NVF format was created to make the utmost use of the NIFF 2.0 functions, so numerous functions were added, as shown below. But because of this, the nd structure is in binary format, which is significantly different from the C source file format used with NIFF 1.0.
--- Main functions added with niff2nvf & NVF ---
( NIFF 2.0 data )
niff2nvf [options] < input_niff_file > < output_nvf_file >
For example, to set the scale at 5.0 and convert the file input.niff into the file output.nvf, you would input the following line.
niff2nvf -scale 5.0 input.niff output.nvf
In N64, the vertex values are described as signed 16 bit integers in the Vtx table. The numerics that make up the original model data are rounded off, so the original shape is sometimes destroyed. If this happens, specify this option. The default setting is 20x scale.
In gspF3DEX, the vertex cache is 32, but this can be increased to 64 for gspF3DLX.Rej and to 80 for gspF3DLP. If you are going to use these microcodes, then increase the vertex cache with this option for conversion. The default is 32.
If you are using colors attached to palettes and you exceed the number of palettes for which bit map color is specified, then similar colors will be selected by default by the color reduction process. You can stop this process by using this option. However, if there are more bit map colors than palettes, then a message will be output and the conversion will stop. Thus, if you are going to use this option, confirm that you have reduced colors as much as possible for textures on your own.
If your data includes a FOG node, the FOG settings will be used. If those settings have not been set appropriately, you will not be able to preview images as expected. When the FOG settings are not correct and you cannot preview, use this option to eliminate the FOG so previewing becomes possible.
MRKR Chunk is output in order to preview the Effector's ICON. This is not needed for game-use model data, so you can use this option when you want to remove an unnecessary MRKR Chunk.
"group" is used in NVF to control the rendering order, and it has various important roles, such as toggling CAMERA drawing ON/OFF. With NIFF data, the order for drawing is specified by the 7-step rendering priority of obj_render_pri. By default, these 7 steps are set as 0-6 in group. (So an opaque OBJECT is rendered first, for example.)
With NVF, group can support 32 steps (0-31) for finer settings. If you want to set group with detailed specifications, then raise this flag and you can directly specify the NVF group with the NIFF data obj_group.
Red | Green | Blue | Alpha | ||||
Ambient Color | = | ( | 0xff, | 0xff, | 0xff, | 0xff | ) |
Emission Color | = | ( | 0x00, | 0x00, | 0x00, | 0x00 | ) |
Diffuse Color | = | ( | 0xff, | 0xff, | 0xff, | 0xff | ) |
Cycle Type for fog | : | 2 cycle |
Render Mode for fog | : | < cycle1 > Specifies G_RM_FOG_SHADE_A |
: | < cycle2 > Uses the NIFF 1.0 data's Render Mode | |
CC Mode for fog | : | < cycle1 > Uses the NIFF 1.0 data's CC settings |
(However, SHADE_ALPHA is replaced by 1) | ||
: | < cycle2 > [ 0, 0, 0, combined ] | |
(cycle 1 results are used) | ||
PrimColor for fog | : | Uses the NIFF 1.0 data's PrimColor |
Furthermore, although niff2nvf was made to support all NIFF texture formats, at the present time YUV format textures cannot be previewed correctly. When a YUV format texture is met, conversion stops as if the format is not supported.
(4) Textures that are larger than TMEM
With niff2gfx, when a texture is larger in size than TMEM, tiles are created from triangle units, and gDPLoadMultiTile is used to load part of the large texture. But NVF, in order to operate faster, loads the texture after it has been converted into the format for TMEM. Accordingly, textures that are larger in size than TMEM cannot be used as they are. To handle this, the niff2nvf converter divides the texture into triangle units and then converts them. Take care at this time, since the location of the triangles can make for inefficient texture division.
(5) Converting Global Light
Sometimes when NIFF data is created with the CG tool the light is output with 0 Color. When an OBJECT is rendered using light with zero color, the image will be completely black and you will not see anything. For this reason, niff2nvf will not convert GlobalLight into NVF data format if GlobalLight is comprised solely of Ambient Light with 0 Color. In these cases, the previewer's default light is used.
5. Presently unsupported items and limitations
Currently, texture animation is not compatible with the CI format (palettes cannot be switched).
Two textures can be used at the same time for the NIFF material mode, but the second texture cannot currently be converted.
The following texture formats are currently compatible:
Note: The RGB format is converted as RGBA and is not compatible with the YUV format.