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

[Feature Request] Point Sampling on Mesh - From UV Coords #1

Open
AndrewHazelden opened this issue Jan 10, 2019 · 0 comments
Open

[Feature Request] Point Sampling on Mesh - From UV Coords #1

AndrewHazelden opened this issue Jan 10, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@AndrewHazelden
Copy link
Owner

CloudCompare has a Points Sampling on mesh feature that allows a polygon model to be converted into a point cloud. You can access this feature from the Edit > Mesh > Sample Points menu.

2019-01-10 standard obj mesh with cloudcompare sample points menu

The Points Sampling on mesh tool supports the conversion of RGB texture maps assigned to the polygon model into RGB color values stored on each of the point samples in the point cloud output.

2019-01-10 cloudcompare points sampling on mesh dialogue

An interesting new feature to have in the Points Sampling on mesh dialog would be the addition of a [x] From UV Coords checkbox.

The idea behind a From UV Coords option would be that the polygon model's UV Layout coordinates could be baked into a "UV Pass" gradient map that would be assigned to the point cloud RGB colors instead of using the [x] or from material/texture if available option in the dialog.

A UV Pass gradient map is an red/green colored image that corresponds to a polygon model' UV Layout 0-1 texture coordinates. A UV pass map is often used to re-texture an object in the visual efffects industry as part of 2D image based compositing stage done with EXR based multi-channel imagery.

uv coordindates as a uv pass gradient

Inside of an entertainment industry focused volumetric point cloud workflow, there are useful applications for this same idea of storing the models' original UV coordinates on each point sample.

I think it would be handy if the Points Sampling on mesh tool could snapshot a polygon model's underlying UV layout coordinates and then push those values as 0-1 range floating point RGB versions of the UV coordinates that would be stored on each point sample in the final point cloud.

This data would make it possible to do point cloud RGB color re-texturing effects, VJ (video jockey) like video projection mapping approaches, and simulated environment mapping on a point cloud sequence/static point cloud model when it is played back later in a game engine, or when the point cloud is loaded in tools like Houdini, TouchDesigner, Notch, Nuke, or Fusion.

Right now the rough workaround for doing this UV coordinate to point cloud RGB conversion concept is to manually edit the polygon OBJ .mtl texture by hand to replace the standard file based texture map on the polygon model with an externally created UV pass map image.

newmtl uvmapSG
Ka 1 1 1
Kd 1 1 1
d 1
Ns 0
illum 1
map_Kd uv_pass.1.png

This newly updated OBJ model with an assigned UV pass texture map can then be run through the existing Points Sampling on mesh tool using the [x] or from material/texture if available option in the dialog.

uv coordinates baked onto a polygon model s uv layout

The final result in CloudCompare would be an .e57 point cloud file that looks visually like the following image:

2019-01-10 uv pass retexturing on point clouds 1
2019-01-10 uv pass retexturing on point clouds 2
2019-01-10 uv pass retexturing on point clouds 3
2019-01-10 uv pass retexturing on point clouds 4

@AndrewHazelden AndrewHazelden added the enhancement New feature or request label Jan 10, 2019
@AndrewHazelden AndrewHazelden self-assigned this Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant