godotengine / godotengine/godot

Embed as Universal Basis sets cull mode to backface disabled

Open
#116,290 0 comments 0 reactions 0 assignees View on GitHub
bug topic:3d topic:import
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:

Image

Image

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:

Image

Image

Image

### Steps to reproduce

Export a glb in blender
Set the textures to keep internal, basis universal

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.