Painting on a skull

I found this great example: https://www.babylonjs-playground.com/#9MPPSY#5
It shows how to ‘paint’ on a BABYLON.Mesh.CreateGroundFromHeightMap.

I am having difficulties transforming this example to paint on a model, which is gonna be an imported 3D model. Perhaps a blender model.

Here’s my adaptation so far, using the default skull for now: https://www.babylonjs-playground.com/#UGRI6K#6

I’d like to paint on that skull just as I can paint on the ground area

Any tips/help is appreciated!

first approach : draw circles on a sphere

2 Likes

Interesting. And thank you for fiddling!
I’ve tinkered a bit with your code, trying to get an understanding of your sticker-approach.
Skull-import works, but I am unable to assign the decal…
https://playground.babylonjs.com/#UIVCZ3#9

dynamic texture does not work either on loaded mesh! :frowning:

there are obvious limits to the use of materials…

Hi. There is no limits. Sky is the limit :rofl:
It is not working on skull for 2 reasons.
It has color attribute and it doesn’t have uv defined
If you set the color attribute to white and add some ‘fake’ uvs, you’ll see that the texture show up, but looks messy
https://playground.babylonjs.com/#1W8W1W#2
So I recomand you to try on other mesh, with UVs already defined, as example here
https://playground.babylonjs.com/#1W8W1W#3
https://www.babylonjs-playground.com/#UGRI6K#8

2 Likes

can you stamp some kisses on the skull?

i didn’t get/make it.

What stands ‘UV’ for?

2 Likes

There are also decals