ERIC GUBIAN Posted June 14, 2016 Share Posted June 14, 2016 Hello, I am learning to use Babylon.js recently and i would like to put (in a scene) an opaque text on a face of a transparent mesh (a box i.e.). I don't find a solution... Is it possible ? Tanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 14, 2016 Share Posted June 14, 2016 Hello and welcome Eric you can use a DynamicTexture ( @Nockawa can probably provide even simpler solution with Canvas2D): http://www.babylonjs-playground.com/#1023O#7 Then you can map this texture onto your box Quote Link to comment Share on other sites More sharing options...
Nockawa Posted June 14, 2016 Share Posted June 14, 2016 Hi Eric, I will give you a sample playground in few hours, stay tuned. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted June 14, 2016 Share Posted June 14, 2016 @ERIC GUBIAN you can find here a sample of a text drawn on a face of a cube: http://babylonjs-playground.com/#EPFQG#1 To make something quick I put the same content on the 6 faces of the Cube, but it's up to you, I guess that you would have to rely on multi material if you want one part of the mesh with a given texture and another part with the content of the Canvas2D. To learn more about the Canvas2D feature, here's the doc entry point: http://doc.babylonjs.com/overviews/Canvas2D_Home Quote Link to comment Share on other sites More sharing options...
ERIC GUBIAN Posted June 15, 2016 Author Share Posted June 15, 2016 Thank you very much Deltakosh for this prompt response perfectly relevant! that functions exactly as I wished it ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.