Skip to content

Replacing textures and models

ocealot edited this page Nov 24, 2023 · 11 revisions

Textures

Navigate to the "Textures" tab, select your desired texture, then click "Import". The following image types are currently supported:

  • PNG (not recommended)
  • DXT1 DDS
  • DXT3 DDS
  • DXT5 DDS
  • A8 DDS

NOTE: THE DIMENSIONS OF IMPORTED IMAGES MUST BE POWERS OF 2!

Models

VFXEditor uses the GLTF format, which you can import and export using your preferred program (Blender, Maya, etc.). The "Import" and "Export" options can be found in the "Models" tab.

If you are making a model to import into a VFX, make sure that it is comprised of only 1 mesh, and that it has 2 UV maps

You also need to make sure the model has a color attribute. Click on the mesh you want to export, navigate to the mesh settings (the green icon), and press the plus icon next to "Color Attributes" if it doesn't have one already. Create a new one named COLOR_0 (this exact name is important) with the settings Face Corner and Byte Color. The color itself isn't important, and you can change it to whatever you like, or use the vertex paint tool on it.

image

Exporting

When exporting from your 3D Editor (once again using Blender as an example), make sure to do so as a gLTF Embedded with the .gltf extension. Also make sure the UVs, Normals, Tangents, and Vertex Colors are all being exported.

If you are using Blender 4.0, use "gLTF Separate" instead. The only difference is that for animations, you need to make sure to keep the .gltf and .bin files together when moving or renaming them

Troubleshooting

Depending on your mesh, the gLTF addon can have trouble exporting it with tangents. This issue can usually be solved by using the triangulate modifier on the mesh or using the triangulate tool, as mentioned in this issue

If you are still having issues with exported models, try the following:

  • Make sure the Blender file has only 1 Object (the mesh you are trying to export), and delete any empties
    • If you have multiple meshes, select them and press Ctrl+J to merge them
  • Select all of the vertices (press A when in vertex mode), then go to Mesh > Clean up
    • Select "Merge by Distance" and "Delete Loose"
  • Assign all of the vertices to a new vertex group:
    • Select all of the vertices
    • Open the vertex group panel (the green inverted triangle)
    • Press the + button, then Assign

image

  • Create a new "Decimate" modifier, and select the vertex group you just created
    • Make sure to select "Triangulate"

image

  • When exporting using this method, make sure to have "Apply Modifiers" checked

image

Known Issues with old gLTF Addon Versions

There are some issues and regressions with the Blender gLTF add-on, especially relating to vertex colors, and you might need to take the following steps to resolve them. This is using Blender version 3.2.2.

First, make sure your version of the gLTF add-on is up-to-date. You can find the menu in Edit > Preferences > Add-ons. If it is 3.3.17 or above, you can skip updating the add-on.

image

Otherwise, download a dev build of the addon from here.

image

Extract the .zip file, then replace Blender's version of the addon with the dev build. This should be done while Blender is closed.

image