Jump to content

Putting text on a box


Hillardo
 Share

Recommended Posts

Hello,

I am searching a way to display text on every side of a box, that is laid over a texture.

The user should be able to edit the text.

This is what I got by now: https://www.babylonjs-playground.com/#EEINMU#1

The flipped over text can be corrected with the faceUV, but I don't find a way to change the text which is turned by 90 degrees.

Is there a way, to assign an individual ambientTexture to every face of the mesh? 

Or is my idea not suitable from the beginning?

Other ideas:

- I am using a second box that is a little bit bigger then the first and put the text on this box.
  I want to find another way to improve the performance.

- Putting a plane on every side and displaying the text on them. I haven't tried this on jet, but I am a little bit concerned about the performance.
  If you have some information on the performance impact of this way, please let me know.

-Using a box with shaders. http://www.babylonjs-playground.com/#TRNYD#13
 I found this box in the forum, but couldn’t put a diffuseTexture and an ambientTexture on it.
 The solution that came across my mind was to draw the texture on the canvas, then put the text on it, then turn it back into a picture and put it onto the box.
 But I don't get the image on the canvas. 
http://www.babylonjs-playground.com/#TRNYD#22

-Using decals.
 I also thought about using decals for the text, but I don't know, if this is practical. 
 How do I remove a decal, when the text is updated? How does it affect the performance? How hard is it to place them?

 

I hope, I have provided all the information you need and hopefully you can help me to solve my problem.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...