godotengine / godotengine/godot
Embed as Universal Basis sets cull mode to backface disabled
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.5.stable
### System information
Windows 10, 4.5.stable
### Issue description
Setting the importer to use basis universal doesn't import materials with backface culling on if they are set to it in Blender:
I wrote an ImportScript to force backface culling on:
```swift
@tool
extends EditorScenePostImport
var scene_name: StringName
# Import script for rig to set up everything so little editing is needed once the character is
# instantiated.
func _post_import(scene):
scene_name = scene.name + " Rig"
iterate(scene)
return scene
func iterate(node):
if node is MeshInstance3D:
var surf_mat = node.mesh.get("surface_0/material")
surf_mat.set_cull_mode(0)
for child in node.get_children():
iterate(child)
```
If I use this script and change the cull mode, the choices are frontfaces only, or backface culling disabled:
### Steps to reproduce
Export a glb in blender
Set the textures to keep internal, basis universal
### Minimal reproduction project (MRP)
N/A
Contributor guide
Assessment
This issue has not been assessed yet.