kaolin icon indicating copy to clipboard operation
kaolin copied to clipboard

Any suggestion about rendering transparent part?

Open XiongFenghhh opened this issue 4 months ago • 3 comments

Hello, I have a model with pbr mat which has transparent part ,but I don't know how to render it correctly. I got the basecolor of the transparent part instead of the color behind it. Is there a way to render it correctly?

XiongFenghhh avatar Apr 03 '24 03:04 XiongFenghhh

@XiongFenghhh , If you are using nvdiffrast, you could use nvdiffrast.torch.DepthPeeler

Caenorst avatar Apr 04 '24 21:04 Caenorst

@XiongFenghhh , If you are using nvdiffrast, you could use nvdiffrast.torch.DepthPeeler

Thank you for your suggestion, I got the desired render result based on the nvdiffrast document. However, according to the doc, the hyperparameter "num_layers" need to be set. Is there a way to automatically set it? or does it currently only support manual settings?

with nvdiffrast.torch.DepthPeeler(glctx, pos, tri, resolution) as peeler:
  for i in range(num_layers):
    rast, rast_db = peeler.rasterize_next_layer()
    (process or store the results)

XiongFenghhh avatar Apr 08 '24 03:04 XiongFenghhh

@XiongFenghhh , If you are using nvdiffrast, you could use nvdiffrast.torch.DepthPeeler

Thank you for your suggestion, I got the desired render result based on the nvdiffrast document. However, according to the doc, the hyperparameter "num_layers" need to be set. Is there a way to automatically set it? or does it currently only support manual settings?

with nvdiffrast.torch.DepthPeeler(glctx, pos, tri, resolution) as peeler:
  for i in range(num_layers):
    rast, rast_db = peeler.rasterize_next_layer()
    (process or store the results)

I set num_layers to a safe value.

XiongFenghhh avatar Apr 11 '24 09:04 XiongFenghhh