We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With kaolin==0.16.0, when I use easy_render with the camera above the center of my mesh, and the camera looking straight down, I get a black image.
from kaolin.render.easy_render import render_mesh, default_lighting from kaolin.io.usd import import_mesh from kaolin.render.camera import Camera import torch from torchvision.transforms import ToPILImage mesh = import_mesh("my_mesh.usd", triangulate=True, with_materials=True).to("cuda") mesh.vertices.min(axis=0), mesh.vertices.max(axis=0) center = (mesh.vertices.min(axis=0)[0] + mesh.vertices.max(axis=0)[0]) / 2 offset = 0.0 camera_y_position = 3.0 eye = torch.tensor([center[0], camera_y_position , center[2]], dtype=torch.float32) at = torch.tensor([center[0] + offset, 0, center[2]], dtype=torch.float32) lighting = default_lighting().to("cuda") camera = Camera.from_args( eye=eye, at=at, up=torch.tensor([0.0, 1.0, 0.0]), fov=45, width=512, height=512, device='cuda' ) with torch.jit.optimized_execution(False): with torch.no_grad(): render = render_mesh( camera, mesh, lighting, ) ToPILImage()(render["render"][0].transpose(0, 2))
But if I add a slight offset, e.g. offset = 0.01 to either the X or Z coordinate, then I get a proper rendering.
offset = 0.01
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With kaolin==0.16.0, when I use easy_render with the camera above the center of my mesh, and the camera looking straight down, I get a black image.
But if I add a slight offset, e.g.
offset = 0.01
to either the X or Z coordinate, then I get a proper rendering.The text was updated successfully, but these errors were encountered: