Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any suggestion about rendering transparent part? #790

Open
XiongFenghhh opened this issue Apr 3, 2024 · 3 comments
Open

Any suggestion about rendering transparent part? #790

XiongFenghhh opened this issue Apr 3, 2024 · 3 comments

Comments

@XiongFenghhh
Copy link

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?

@Caenorst
Copy link
Collaborator

Caenorst commented Apr 4, 2024

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

@XiongFenghhh
Copy link
Author

@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
Copy link
Author

@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.

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

No branches or pull requests

2 participants