Geometry and Texture radius match

Hello everyone,

I am currently working on an object that is a 3D card with text on it.
Everything works great thanks to the help of @Evgeni_Popov in this other thread

And now I want to add a border to my card. But depending on thickness and radius, this is not simple to make the geometry match with the texture as you can see in this playground:

Is there a better way to have a border matching perfectly the geometry?
Thanks for your help !

Just bake it in the geometry ? either a submesh or playing with uvs ?

I continued to dig in and it seems to be only a question of math. I made the cornerRadius dependent on card radius, card width, and thickness and it works:

I must also play with different card sizes to make sure it works all the time.

With a few adjustments, it does work whatever the size !!

2 Likes