Closed jfeick closed 3 years ago
Hello, yes it is possible, check out the video example, I am applying the projection only on a child of the model:
The thing to keep in mind is: you have to pass to the project()
function the same object which you assigned the ProjectedMaterial to, so make sure you do that, groups don't work.
Closing for inactivity
Hi there! Thank you very much for this very useful material implementation.
I would like to know, if it's possible to use ProjectedMaterial on GLTF models. I already successfully applied the material on an OBJ with multiple materials for the following hierarchy:
rootNode->children[0]
. The child consists of a BufferGeometry with 4 groups, which I "cloned" and for each I added the ProjectedMaterial. This works perfectly. If I now convert the model using obj2gltf I end up with a differently structured mesh:rootNode(Group)->children
. Each of the 4 children now has a single indexed geometry. For each geometry I added 2 groups and converted the singular material to an array of[originalMaterial, projectedMaterial]
. Sadly, a call toproject(mesh)
now does not work and I end up with the base color of the ProjectedMaterial (where I would assume, that the color would change to complete transparency) and no projection at all. Do you have any idea what's going wrong or how I could further debug this issue?