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

Improvements to uvpointcloud #1069

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Improvements to uvpointcloud #1069

wants to merge 5 commits into from

Conversation

josephsil
Copy link

@josephsil josephsil commented Jun 20, 2020

I made two edits to the uvpointcloud sop that i believe are bug fixes --

  1. Changing how the grid is created so that the points are centered in each pixel
  2. Adding a divide sop to triangulate the mesh before raycasting which prevents the points from being offset along the normals when transformed with @_rest (not sure why.)

Before and after of the grid change below, pictured with 128x128, with a tiling texture showing one square per pixel. Note that in the before, points start in one corner at 0.0, 0.0 in uv space, and gradually drift as they approach the center. In the after, points are always at the center of each pixel.

I didn't capture a screenshot of the divide change, but the issue it fixes is clearly visible in the screenshots around the center left (5, f, g, 6, 7, g) where that quad's points all were offset slightly behind the mesh.

before

before

after

after

(ps: qlib is super useful to me, thanks a ton for creating and maintaining it)

…responding uv pixel, rather than a different position per pixel
…is helps generated points better match the surface of the geometry -- without they might appear slightly above or slightly below the surface.
@johnnyquest
Copy link
Contributor

johnnyquest commented Jun 23, 2020

Thanks @JosephSilvermanArt this is great, I'll check it out soon! One question -- I see on your screenshots that you're using a non-commercial edition, did you save over the otls in non-commercial? That might affect things

@josephsil
Copy link
Author

@johnnyquest Ah, yep, that totally slipped my mind. I'll make a new commit from my work computer later today.

@josephsil
Copy link
Author

Should be all set now!

@johnnyquest
Copy link
Contributor

Cool thanks, I'll check it out soon

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.

3 participants