gkjohnson / three-gpu-pathtracer

Path tracing renderer and utilities for three.js built on top of three-mesh-bvh.
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/index.html
MIT License
1.27k stars 125 forks source link

Mesh standard Material alpha map not working #551

Closed nightfury07x closed 3 months ago

nightfury07x commented 3 months ago

I have some mesh's with MeshStandardMaterial is applied with alpha map with

alpha.wrapS = THREE.RepeatWrapping; alpha.wrapT = THREE.RepeatWrapping;

and some repeating
Material.alphaMap?.repeat.set(1 / scale, 1 / scale);

alpha map is used to make transparency of the windows of a building but when I try to render it using path-tracer I can see the alpha map is not correctly applied to the mesh while rendering (with correct scale)

Expected behavior

It should be correctly map with the mesh to show window transparency when rendering

image before render with correct alpha map placement 309722080-ddc2c145-05f7-4715-82b3-9f1b6e7823f5

image with rendering with wrong alpha map placement 309722381-593ad7d8-e135-481d-810f-bb8df4af94c8

Platform:

gkjohnson commented 3 months ago

Why have you deleted the issue template for reporting a bug? It specifically states to include an example or model to reproduce the issue.

nightfury07x commented 3 months ago

Why have you deleted the issue template for reporting a bug? It specifically states to include an example or model to reproduce the issue.

sorry I have updated it now

gkjohnson commented 3 months ago

From the template:

Screenshots and Repro Model

Add screenshots and a gltf model to help explain your problem (drag and drop).

Please include all information