ThreeJS DecalGeometry Alternative

probably because in a situation like this you would go through the more distant vertex first? Idk, it seems like it would amplify the distortion

image

Yeah. I think it’s approximation to geodesic distance and path connection is not kept into account when running the dijkstras algorithm so it’s distorted.

Thanks for sharing the expMap codes.

But I didn’t see the value of distance playing a role in calculating UVs besides a stopDist check. what I saw is dist is calculated by dijstra method, then sorted, then only the index is used in estimateUv function? and what does the stopDist come from and what is the proper value?

And the uvs returned by expMap function is actually coordinates of tangent plane at source vertex, right?

But I didn’t see the value of distance playing a role in calculating UVs besides a stopDist check.

Yes, need to sort the distance only, no need to use the approximate geodesic distance.
The algorithm is depending on which mesh point gets processed first and use the values in subsequent processes.

what does the stopDist come from and what is the proper value?

stopdist is the the maximum distance to process from the original vertex. So bigger the decal, bigger the stopdist. How much farther to cover when running expmap. The proper value depends upon the target mesh.

And the uvs returned by expMap function is actually coordinates of tangent plane at source vertex, right?

Yes I think so. They offset the current uv with the values calculated from the tangent plane.
Also, for proper scaling the values are also divided by \sqrt{2} as they mention in the paper as well. Looks like not added in the code. :slight_smile:

The uv of seed point seems is [0,0]? Shouldn’t it be [0.5, 0.5]?

The uv of seed point seems is [0,0]? Shouldn’t it be [0.5, 0.5]?

Umm…
I am not sure.
But to change decal center to points other than mesh points (vertices) I transform calculated uv values to the actual points in the shader program.

1 Like

HI
I have the same problem
Can you solve it?

the heat method works well for the bunny model, but I have tried many other models, some of them return isolated faces error, some of them the computation of distance returns all NaN. It looks this algorithm has high requirements for model structure, which make it not that practicable per my test for lots of existing models.

Yes, The project i was working on had static models and I had some controls to make mesh the way I wanted from blender which most of the projects don’t have and might be extremely hard process for some meshes. Heat map method might not be that useful.

This might also be worth looking into as an alternative to HeatMap but I think problem with isolated faces will be there as well :thinking:.

https://nmwsharp.com/research/flip-geodesics/