Transfer one mesh normals to another (need help)

I want to transfer IcosahedronGeometry normal to planes, like Blender DataTransfer, but got some very strange result. All the plane have the same result. So why that happens?

Here is the live demo.
https://codepen.io/chenminglei/pen/azvOoxz?editors=0110
And the video use DataTransfer https://www.youtube.com/watch?v=52sTppv7Y-E

You have a single geometry shared between all planes, so the normals of the last plane are used as normals of all planes. In line 99 added clone():

const mesh = new THREE.Mesh(targetGeo.clone(), targetMat);

also made smaller planes and increased their number. This is what I got. Is it what you need?

(BTW I think you use too complex way. If the core is a sphere, you could do things much faster)

2 Likes

Yes! That is exactly what i need.Thanks!

Does this meaning just use sphere will much faster or some else?

I mean if the source of the normals is a sphere (the icosahedron is an approximation of a sphere), there is no need to search for closest normals. If you want to transfer the red arrows into the blue arrows, you can use the black dashes arrows - they have the same direction, only their lengths need normalization. The black arrows are the vertices world coordinates, if the sphere center is at (0,0,0).

3 Likes

The diagram is clear and easy to understand. Thanks, i will try it.

1 Like