I have GLTF 3d Ring model and I have one requirement to add inside engraving on specific mesh and second requirement to do it on runtime, it’s mean I will have some input that every time it change it reflect the input value on specific position ring
I add small research and I think of two options
Use 3d Text and somehow link it to specific mesh, but the 3d text wont be really connected to the
parent mesh.
Create dynamic texture on runtime and use bumpMapTexture or something like that.
It all depends on the ultimate purpose of the visualization The bump map approach will be faster, but if examined up close, the result will likely be less convincing. And since it doesn’t modify the geometry, it couldn’t be used for manufacturing, for example. Using 3D text + CSG takes a lot longer, but the result is more “realistic” and the model could be exported for something like 3D printing.
i wont address the material aspect going black (but you obviously can just asign your texture to albedo , replacing your current one , babylon supports decals i believe ) but other than that , It looks like your UV’s are stretched , this is something you have to fix within the 3d model itself , not a fault of the babylon engine.\
You might have to create diffferent seams and do very specific per island unwrapping to get rid of the stretch.
Depending on the surface complexity or even just for ease of use , this is also sometimes handled by a section of geometry just above the first , using a transparent material in the style of a decal.
also for an engraving effect , this is a bit more complex that just doing a diffuse update. To get a proper look to it, you need to create a grey scale image that you can convert to a normal map if you want it to actually look engraved. Aso consider using more channels like occlusion maps but it needs to be subtle.
Can you try to narrow the issue in a babylon playground ? it would be much easier for the rest of the community to help
It is really hard to jump on each questions project and we usually only do it when it is a project level issue. For code only the babylon playground should be fine.
Note that you must enable support for decal maps (material.decalMap.isEnabled = true ) before rendering with the material! This is because a material plugin must be added to a material before the first rendering, and decal map is implemented by the material plugin mechanism. However, you can disable/enable the decal map rendering at any time by updating decalMap.isEnabled . You can even start in a disabled state and enable it later, but the important thing is to set a value to material.decalMap.isEnabled (or even just access material.decalMap ) before the first rendering. If you don’t do this, material.decalMap will always return null .