Skip to content

Instantly share code, notes, and snippets.

@keijiro
Last active August 6, 2025 16:01
Show Gist options
  • Select an option

  • Save keijiro/4aa156ac21779dcdc85849062785db2f to your computer and use it in GitHub Desktop.

Select an option

Save keijiro/4aa156ac21779dcdc85849062785db2f to your computer and use it in GitHub Desktop.

Revisions

  1. keijiro renamed this gist Nov 1, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions generate_point_cloud_from_mesh.md → mesh_to_pointcloud.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    ![screenshot](https://i.imgur.com/HyaC0rJl.png)

    1. Import the source geometry file.
    2. Insert a point wrangle and set the following snippet.
    1. Import the source geometry.
    2. Append a Point Wrangle SOP and set the following snippet.
    ```
    int vlist[] = pointvertices(0, @ptnum);
    vector uv = vertex(0, "uv", vlist[0]);
    @Cd = colormap("$HIP/guanyinyy01.jpg", uv);
    @Cd = colormap("$HIP/TEXTURE_FILENAME.jpg", uv);
    ```
    3. Insert a Delete SOP. Change the pattern to "\*". Enable "Keep Points".
  2. keijiro revised this gist Nov 1, 2017. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions generate_point_cloud_from_mesh.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,9 @@

    1. Import the source geometry file.
    2. Insert a point wrangle and set the following snippet.
    ```int vlist[] = pointvertices(0, @ptnum);
    ```
    int vlist[] = pointvertices(0, @ptnum);
    vector uv = vertex(0, "uv", vlist[0]);
    @Cd = colormap("$HIP/guanyinyy01.jpg", uv);```
    @Cd = colormap("$HIP/guanyinyy01.jpg", uv);
    ```
    3. Insert a Delete SOP. Change the pattern to "\*". Enable "Keep Points".
  3. keijiro created this gist Nov 1, 2017.
    8 changes: 8 additions & 0 deletions generate_point_cloud_from_mesh.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    ![screenshot](https://i.imgur.com/HyaC0rJl.png)

    1. Import the source geometry file.
    2. Insert a point wrangle and set the following snippet.
    ```int vlist[] = pointvertices(0, @ptnum);
    vector uv = vertex(0, "uv", vlist[0]);
    @Cd = colormap("$HIP/guanyinyy01.jpg", uv);```
    3. Insert a Delete SOP. Change the pattern to "\*". Enable "Keep Points".