Record the real PBR attribute layout (6 channels)
base_color 0:3, metallic 3:4, roughness 4:5, alpha 5:6 - the pipeline's own pbr_attr_layout. o_voxel's baker indexes this dict BY NAME and raises KeyError deep inside to_glb on any missing slot rather than at the call, so a partial layout looks like a baker bug. Needed by the texture stage; recorded now while it is in hand. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
516e3e4457
commit
26ae88dea8
@ -28,6 +28,16 @@ import numpy as np
|
|||||||
# Upstream fixes both: the model always works in a unit cube centred on the origin.
|
# Upstream fixes both: the model always works in a unit cube centred on the origin.
|
||||||
AABB = [[-0.5, -0.5, -0.5], [0.5, 0.5, 0.5]]
|
AABB = [[-0.5, -0.5, -0.5], [0.5, 0.5, 0.5]]
|
||||||
|
|
||||||
|
# How the texture decoder's 6 channels map to PBR slots (pipeline's pbr_attr_layout).
|
||||||
|
# o_voxel indexes this dict by name and raises KeyError on any missing slot, so a
|
||||||
|
# partial layout fails deep inside the baker rather than at the call.
|
||||||
|
PBR_ATTR_LAYOUT = {
|
||||||
|
"base_color": slice(0, 3),
|
||||||
|
"metallic": slice(3, 4),
|
||||||
|
"roughness": slice(4, 5),
|
||||||
|
"alpha": slice(5, 6),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def _torch(a):
|
def _torch(a):
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user