Apply Text Element to Model mesh


#1

Hi everyone, i would like to simulate an engraving effect over a model.

I’ve already tried to load the text in a 2d canvas and apply it directly to the model mesh but the result is very poor.

So i was wondering if was possible to apply a PC Text Element directly to the model mesh…
Is someone able to help with this?

Here’s the link to the actual scene:
https://playcanvas.com/editor/project/619946

Many thanks in advance


#2

The logo texture you have is low resolution so it will look blocky when used and scaled up.

If you want to engraving, it sounds like you want to use a normal map instead which can get your the effects as shown on here (the scratches on the surface)

Getting it from a text element is going to be tough to be honest. You can do an overlay but generating a normal map could be tricky.


#3

Thanks for your quick reply, the logo was just for example purpose :slight_smile:

I honestly don’t need to have the surface scratched as you’re showing,
just the text to be overlayed in the “logo position” would be great to me


#4

In which case, you should be able to use the render to texture method

https://playcanvas.com/project/560797/overview/tutorial-render-to-texture

You may need to write your own shader to have two textures over the top of each other :thinking: but this should get you going in the right direction.


#5

Thanks for the input, i’ve tried forking the project and to replicate the behavior but it seems i’m missing something…

The text is the only thing it’s showing

https://playcanvas.com/editor/scene/760887