Skip to content

Generate resolution variants for FBX & USD with Python directly. #70

@gregzaal

Description

@gregzaal

All our assets are available to download in multiple resolution variants, where the image textures are resized (_8k.jpg, _4k.jpg, 16k.jpg...) to give users options for memory savings.

Right now we have compatibility issues with FBX and USD due to the way we export them automatically from the master .blend file: The exports are done entirely automatically from within Blender - we create the resolution variants of the .blend files first, and then programmatically open each of these and run Blender's export operators.

This works for basic assets, but for anything complex the asset sometimes breaks (e.g. complex rigs, geometry nodes or particle systems causing missing geometry - or broken shaders due to missing features in Blender's exporter).

The right way to create these resolution variants of FBX and USD files is to use their native Python libraries to edit a master file directly. This way we can craft a master FBX/USD file ourselves, ensuring good integrity and compatibility, and then simply run a script to modify the image paths (replacing textures/diffuse.jpg with textures/diffuse_4k.jpg for example).

I am not familiar with either of these libraries, so I would appreciate some help in setting up a small script like this :)

To test with, here are some example "master" files for a rock model you can play with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions