Hi,
I’m trying to apply a texture to a diamond in one direction. I have a diamond in 3D and I would like to project an image in the mesh following a plane. Do you think it make sense?
If I understand your question correctly and you have a 3d model you load I guess my approach would be to simply uv map it in Blender.
Just looking down on the diamond and project the uv map from view.
(Reference: Mapping Types — Blender Manual)
I guess this would be way easier as altering the shader for that one case
I have it running in babylonjs, but I need to apply a transformation matrix, because now it is always in the 0,0,0. Do you know where I can find help with that? I have 0 experience in shaders. Do you know if there is a forum I can ask for that?
Just note that I was not able to get the dynamic refraction rendering the top part of the skybox correctly. Maybe someone can help?
If you do not have other objects in the scene you could just use the reflection texture for the refraction i guess. That would save processing power and solve the problem with the skybox.
The clearcoat is not necessary and maybe some parameters are not set coorectly (IOR for the diamond). It just adds a more visible reflection.