Jump to content

Decal text


photo

Recommended Posts

Does Unigine provide a way of creating dynamic decal texts? So basically an ObjectText that can be projected onto a surface instead of rendering the text in 3D. Use case for example is a number on top of a police car which is different for each car and can be edited in runtime by the user. Since the roof isn't flat we need to project the text, an ObjectText would look incorrect from certain angles.

Link to comment

Bemined

There is no option to project ObjectText as decal. You can draw number texture and project it as normal decal right now.

We have a minor priority task for such ObjectText extension, but right now there will be no research done, so it's not completely clear how big this task is and if it even possible to implement such functionality.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Thanks,

So what would be the best approach for rendering text to a texture? Rendering a Widget to a RenderTarget? Since some use-cases involve variable length texts, for this we need to know the width of the rendered text in order to correctly scale and align the decal. Since this length depends on the font (for non-monospace fonts) we need to query this from the engine somehow. Looking at the API I could only find WidgetExternBase::get_text_size, but that would require us to inherit and create our own widget. Or is it possible to get the length some other way as well?

Link to comment

Unfortunately the decals are not limited to just a few numbers, the user can freely type whatever he wants to show as name or number on the vehicle. So it's not possible to prepare all possible combinations in a texture.

Link to comment
×
×
  • Create New...