Open dniku opened 4 years ago
I will need to investigate more. Certainly the ideal would be to use the alpha blend. But for the moment I think your clipping should be enough for now. At the moment we don't have guidelines for blender, other than it should be similar to the preprocessing we are doing for Unity. Let me know if you want to contribute some specifics on that. send me an email and we can talk about how we can support you. I will leave this issue open in case someone can give more info.
I also wrote a script to recursively search the cloned repository for models and missing textures, for the opacity textures I utilized the same blend mode setting
import os
import bpy
rocketbox_root = '/path/to/cloned/Microsoft-Rocketbox'
filename = 'Female_Adult_01.fbx'
# recursively iterate through the repository and find specific avatar to import, with automatic_bone_orientation checked
for root, dirs, files in os.walk(rocketbox_root):
for name in files:
if name.endswith(filename):
path_to_file = os.path.join(root, name)
bpy.ops.import_scene.fbx( filepath = path_to_file, automatic_bone_orientation=True )
# find missing textures in the repository
bpy.ops.file.find_missing_files(directory = rocketbox_root)
# make opacity texture fully transparent
for material in bpy.data.materials:
if material.name.endswith('opacity'):
bpy.data.materials[material.name].blend_method = 'CLIP'
bpy.data.materials[material.name].alpha_threshold = 1
I'm having trouble importing models in Blender. I know this dataset is meant for Unity, but I still hope for some help with Blender specifically.
Here is the script that I eventually came up with to import a single FBX file:
In order to use it, launch Blender, switch to the "Scripting" tab, create a new script via the "+ New" button, paste this code and change the
rocketbox_root
variable to the path of the cloned repository.In this script, I replace paths to textures which are hardcoded in the FBX file. In addition, I disable the opacity texture by making all polygons associated with it fully transparent. Here is what the imported model looks like without that step:
If I set blend method to "alpha blend", I get this:
The result with my workaround (mode = alpha clip, clip threshold = 1) is as follows:
All of these images are rendered with the Eevee renderer, on white background. I am using Blender 2.83.
I am also not sure what the purpose is for the eyelash opacity textures. The eyelashes are already baked into the color map for the head texture, why duplicate them in the opacity texture?
Are there any guidelines for importing the models in Blender? Ideally, I would prefer a Python script that does everything, not instructions on what things need to be changed in the GUI.