Page 1 of 1

Bake support UV from a point cloud

Unread postPosted: Mon Mar 18, 2019 12:21 pm
by rim
Is there anyway to bake the UV coordinates from underlying geometry on a live pointcloud so I can still access and change the support colour textures?

I've had some success with baking the colour values themselves down to points but it would be helpful to have the UV coordinates still available so we can easily still change the support colour without re-baking.

I've had a look through the SDK documentation and can only see primitive_uv or support_primitive_uv being available for when creating a pointcloud and can't workout how to access on an existing pointcloud it as there's no .get for it?

Re: Bake support UV from a point cloud

Unread postPosted: Mon Mar 18, 2019 7:25 pm
by mdkai
Hmm
I'm not sure if you can transfer float data into the bake process for points, this would require to also work with udims ?

For now the best option is again Houdini and an attribute transfer
... but I'm also curious if clarisse could bake out data into points ...

Re: Bake support UV from a point cloud

Unread postPosted: Mon Mar 25, 2019 7:17 pm
by anemoff
Hi,

We'll see if this is feasible and keep you posted.

Cheers,

Re: Bake support UV from a point cloud

Unread postPosted: Tue Mar 26, 2019 11:00 am
by rim
Thank you - I'm currently baking each map we need into the point cloud themselves which is making them considerably heavier.

Re: Bake support UV from a point cloud

Unread postPosted: Wed Mar 27, 2019 2:29 pm
by anemoff
Hi again!

You can get the UVs of Point Cloud points like this:

python code

obj = ix.get_item("project://scene/point_cloud")
geometry_point_cloud = obj.get_module().get_geometry().get_point_cloud()

pt_count = geometry_point_cloud.get_point_count()
print 'point count = {}'.format(pt_count)
for pt_index in range(pt_count):
# get the point sample (GeometryPointSample)
pt_sample = ix.api.GeometryPointSample()
geometry_point_cloud.get_sample(pt_index, pt_sample)

# get the sample descriptor (GeometryPrimitiveSampleDescriptor)
sample_desc = pt_sample.primitive
pt_id = sample_desc.id
u = sample_desc.u
v = sample_desc.v
print 'pt {}: id = {}, uv = ({}, {})'.format(pt_index, pt_id, u, v,)

You can then bake the UV values in a Particle Container, in a property of type float and size 2.

For more details check the following links:
- GeometryPointSample: https://www.clarissewiki.com/4.0/sdk/st ... ample.html
- GeometryPrimitiveSampleDescriptor: https://www.clarissewiki.com/4.0/sdk/st ... ample.html

I hope this helps.

Re: Bake support UV from a point cloud

Unread postPosted: Wed Mar 27, 2019 6:45 pm
by rim
That's brilliant, thanks! I'll give it a go and let you know how I get on :)

Re: Bake support UV from a point cloud

Unread postPosted: Thu Apr 11, 2019 11:35 am
by rim
Sorry for the slow reply - finally manged to get around to some testing today, am I right in thinking what we've baked down is the parametric UV of the object?

Re: Bake support UV from a point cloud

Unread postPosted: Thu Apr 11, 2019 3:11 pm
by anemoff
Yes indeed, those are the parametric uv coordinates on the object.

Re: Bake support UV from a point cloud

Unread postPosted: Thu Apr 11, 2019 3:26 pm
by rim
Ah got it, sorry we needed the object UV coordinates along with UDIM's. I managed to make it work by using the point colour baking workflow in the sdk help with a blended u and v gradient, think I was just over-complicating what we needed.

Re: Bake support UV from a point cloud

Unread postPosted: Thu Apr 11, 2019 3:33 pm
by anemoff
Glad to know that you found a workaround.