Skip to content

Conversation

@bearprin
Copy link

@bearprin bearprin commented May 3, 2025

Avoiding the normal normalization when initializing the material from the torch tensor
(Normal should always be [-1, 1] for normal when rendering)

This is already processed for the 'as_tensor' function, but the 'from_tensor' function does not handle that

@giuvecchio
Copy link
Owner

Hi @bearprin, thanks for pointing this out. This fix would not work when the input normal is 2 channels (x, y) and z needs to be recomputed or when the input normal is not normalized. A better fix is to force the z recomputation by changing line 482 from if map_name == "normal" and num_channels == 2: to if map_name == "normal":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants