Overview:
One of the preview model methods modders can release with their car mods are the Direct X Carviewer files. These are the mod commonly shared preview model files which is usually included with a car mod release so users have a way to preview their paint schemes.
Like many NR2003 tools as time goes on some have been increasing harder to use or required 3ds Max 8 which thankfully can now be nearly ignored for most mod processes. Instead of needing 3ds max and a direct x plugin for it we can do this in Blender which will work on any modern machine using the free and open source Blender.
Setup:
In order to create carviewer files in Blender you need a specific version range and the direct X exporter plugin, download both, install Blender and install the zip file addon in Blender: Preferences > Addons > Install Addon.
Blender 2.83 LTS
https://www.blender.org/download/lts/2-83/
Direct X Blender Exporter Addon
github.com
If you have done this correctly when you go to file you should see in your export options the direct X export option.
Prepping your models to export as X file (Direct X file):
You don't have to use Blender 2.83 LTS for your development of your mod or make your models in 2.83 LTS, you just need to import the finished product to 2.83 LTS to make carviewer files. Just make sure you export from any 3D model program where your source files are located your 3d meshes as OBJ or FBX and import them into Blender 2.83 LTS.
For this demo I will use two meshes from my 2020 ICR Mod, the body and window pieces, I have already imported them into 2.82 LTS as shown below:

In order to prep your meshes you need to do 3 things for the direct X file to export properly and work in NR2003's Carviewer program:
1) Ensure all mesh names do not have any periods or spaces in the name, check the mesh's object data properties:

In this example you see while my mesh is named fine the data property still has a .001, change this to match the mesh name
2) Triangulate all meshes in your scene, carviewer may crash or just not render the mesh's correctly if its in quads:

You can see here the mesh has been triangulated already. If your mesh is not yet selected all faces, go to the top menu and choose Faces > Triangulate quads:

3) Apply your textures to the mesh. Simply create a basic blender mesh to apply your textures to each mesh, they MUST use TGA or BMP
Now your model is ready to export for Carviewer! This would be a good time to save your project if you need to make tweaks.

Exporting your Direct X compatible NR2003 Carviewer file:
With your mod meshes all prepared now its time to export our direct x file. Go to File > export > direct x file:

Now we have everything we need. Create a folder and put your newly made X file and the TGA's/BMP's that you used as textures in the same folder:

Depending on your operating system you might see a preview of the direct X file already so thats a good sign its working before we've even opened carviewer
Before you open your file you can rename the direct X file to whatever you want, in this example I named it ICR_Demo. Now open carviewer and open your direct X file you should see it working properly in carviewer like any other mod's X files do!


If you happen to notice any issues with your meshes you cna simply adjust them in blender and export a new direct X file.
While this concludes the process you may have a few more tweaks or things to troubleshoot which the last section will cover
Troubleshooting/final cleanup of your Direct X compatible NR2003 Carviewer file:
Direct X file won't open:
In some cases you may run into an issue where your direct X file won't open even though you are sure you did everything correct. Open your X file in a text editor, located the top where the header reads 'xof 0302txt' and change the 0302 to a 0303 version: 'xof 0303txt 0032', Some versions of direct X carview may nee the newer header version:

Also you can try removing all the template lines:

Enabling working transparency to textures:
In most cases the transparency for your meshes won't appear working in carviewer, you need to simply open your X file in a text editor to resolve this.
In this example my windows are not transparent:

So I open the X file and search for the name of that TGA texture 'windows' and go to the material section:

the 4th value iin the line is the apha channel value. Adjust this to 0.999 or 0.500

Now save your X file in the text editor and open your file back in carviewer, look at that working transparency!


One of the preview model methods modders can release with their car mods are the Direct X Carviewer files. These are the mod commonly shared preview model files which is usually included with a car mod release so users have a way to preview their paint schemes.
Like many NR2003 tools as time goes on some have been increasing harder to use or required 3ds Max 8 which thankfully can now be nearly ignored for most mod processes. Instead of needing 3ds max and a direct x plugin for it we can do this in Blender which will work on any modern machine using the free and open source Blender.
Setup:
In order to create carviewer files in Blender you need a specific version range and the direct X exporter plugin, download both, install Blender and install the zip file addon in Blender: Preferences > Addons > Install Addon.
Blender 2.83 LTS
https://www.blender.org/download/lts/2-83/
Note: While you do not need Blender 2.83 LTS this has been tested and works with the plugin. Generally it is not recommended to user a version higher than 3.0 as changes in 4.0+ are not supported with the addon (yet)Direct X Blender Exporter Addon
GitHub - DodgeeSoftware/io_scene_directx: A DirectX Model Exporter for Blender 2.8+
A DirectX Model Exporter for Blender 2.8+. Contribute to DodgeeSoftware/io_scene_directx development by creating an account on GitHub.
Note: To download click the green 'Code' button and download the zip, the zip is the addon and does not need to be unzippedIf you have done this correctly when you go to file you should see in your export options the direct X export option.
Prepping your models to export as X file (Direct X file):
You don't have to use Blender 2.83 LTS for your development of your mod or make your models in 2.83 LTS, you just need to import the finished product to 2.83 LTS to make carviewer files. Just make sure you export from any 3D model program where your source files are located your 3d meshes as OBJ or FBX and import them into Blender 2.83 LTS.
For this demo I will use two meshes from my 2020 ICR Mod, the body and window pieces, I have already imported them into 2.82 LTS as shown below:

In order to prep your meshes you need to do 3 things for the direct X file to export properly and work in NR2003's Carviewer program:
1) Ensure all mesh names do not have any periods or spaces in the name, check the mesh's object data properties:

In this example you see while my mesh is named fine the data property still has a .001, change this to match the mesh name
Note: If you try to remove the suffix period and numbers but the mesh keep renaming you might have duplicates of a mesh that was previous removed or still existing in the scene, go to File > Cleanup ? Purge all and choose yes, you should now be able to rename the mesh2) Triangulate all meshes in your scene, carviewer may crash or just not render the mesh's correctly if its in quads:

You can see here the mesh has been triangulated already. If your mesh is not yet selected all faces, go to the top menu and choose Faces > Triangulate quads:

3) Apply your textures to the mesh. Simply create a basic blender mesh to apply your textures to each mesh, they MUST use TGA or BMP
Note: If your texture, such as window netting or windows has transparency your TGA must have embedded alpha 32 bit channel for Carviewer to have proper transparencyNote: 2: Similar to meshes make sure your material names or the textures do not have '.001' in themNote 3: Make sure the paintscheme texture name is 'card', while it does not have to be generally this is best pracitce as other carviewer files follow a similar naming convention sometimes.Now your model is ready to export for Carviewer! This would be a good time to save your project if you need to make tweaks.

Exporting your Direct X compatible NR2003 Carviewer file:
With your mod meshes all prepared now its time to export our direct x file. Go to File > export > direct x file:

Note: The export addon is very basic and has no export options such as 'selected meshes export only' so make sure your scene ONLY has the meshes you want to be in your carviewer file, hiding the meshes in the outliner does not prevent them from being exported.Now we have everything we need. Create a folder and put your newly made X file and the TGA's/BMP's that you used as textures in the same folder:

Depending on your operating system you might see a preview of the direct X file already so thats a good sign its working before we've even opened carviewer
Before you open your file you can rename the direct X file to whatever you want, in this example I named it ICR_Demo. Now open carviewer and open your direct X file you should see it working properly in carviewer like any other mod's X files do!


If you happen to notice any issues with your meshes you cna simply adjust them in blender and export a new direct X file.
While this concludes the process you may have a few more tweaks or things to troubleshoot which the last section will cover
Troubleshooting/final cleanup of your Direct X compatible NR2003 Carviewer file:
Direct X file won't open:
In some cases you may run into an issue where your direct X file won't open even though you are sure you did everything correct. Open your X file in a text editor, located the top where the header reads 'xof 0302txt' and change the 0302 to a 0303 version: 'xof 0303txt 0032', Some versions of direct X carview may nee the newer header version:

Also you can try removing all the template lines:

Enabling working transparency to textures:
In most cases the transparency for your meshes won't appear working in carviewer, you need to simply open your X file in a text editor to resolve this.
In this example my windows are not transparent:

So I open the X file and search for the name of that TGA texture 'windows' and go to the material section:

the 4th value iin the line is the apha channel value. Adjust this to 0.999 or 0.500
Note: 0.500 has always worked for me for any type of transparent mesh (window nettings, glass windows, etc)
Now save your X file in the text editor and open your file back in carviewer, look at that working transparency!


Last edited: