Search the Community
Showing results for tags 'decals'.
-
Hello ! I need some help, after looking through many threads relating to rotation/orientation/translation, I still couldn't manage to find a solution... I made a playground : There is a Ground with a height map, when you click on the ground, a flat Plane appears where you click. With pickingInfo, I could modify the position of the plane, but I'd like also the plane to change its orientation to match the orientation of the ground. https://www.babylonjs-playground.com/#95PXRY#28 Any help with this script would be greatly appreciated ?
- 10 replies
-
- decals
- footprints
-
(and 2 more)
Tagged with:
-
Hi, If I create a decal near the edges I get last pixels stretched on other sides. Looks like a barcode. Playground: https://playground.babylonjs.com/#2PBY8W . Is it fixable?
-
Hey everbody, first of all: Thank you very much for the documentation and great forums. I achieved a lot with Babylon JS without the need of posting anywhere, because you get all the information you need just by one simple google search. But now is the time, since I just don't know where to look for a solution to this problem: I'm using BABYLON.Mesh.CreateDecal to place text and pictures onto a sphere-shape (it is a soccer ball to be more specific, so not just a perfect sphere). Everything works great so far, I made controls to reposition, scale, rotate, change color etc. to decals and they can be placed simply by clicking on the desired position. The problem is with bigger sizes: As I understand, decals not getting mapped onto the UV but projected onto the mesh. If I want to place a big picture and scale it up or place a long line of text, there a limitations: The picture can't run all way around the ball, because it get's cut off at a certain point. The second problem is, that it get's stretched at the outer parts (the more it is away from the clicked center, the more it is stretched, since it get's projected onto a sphere). TL;DR: Is there any way to place decals so they don't get stretched but use the UV (which is there since I dynamically load textures for the ball) to place them "pixel-perfect" all around the ball, if necessary (or at least half the ball)? Thank you guys and a happy New Year
-
I noticed that decals can be transparent in places but they are either 100% transparent in a pixel or 0%. I would like to have "soft" edges on my decals and also be able to only slightly color the underlying object. So a 50% transparency decal for example, or a decal with different values for the alpha channel. Is there any way to accomplish this? I tried setting visibility to 0.5 on the decal, but this breaks it (it's rendered transparent.. but as a square instead of the texture). Example here (line 38 breaks it): http://www.babylonjs-playground.com/#1BAPRM#82
- 3 replies
-
- alpha
- transparency
-
(and 1 more)
Tagged with:
-
Hey all! So I noticed some behavior where a decal was "bleeding through" (or duplicating itself) through the thinner parts of models. The behavior is witnessed in the standard decal playground if you try to put a decal on the feet of the cat: http://www.babylonjs-playground.com/#1BAPRM (See the attached images for an example) I've already read pretty extensively through the Decal's thread: From that thread I gleamed that I can mitigate this slightly by limiting the Z scale on the decal size. However this is far from ideal as I'm painting decals on arbitrary meshes, many of which have several bends and/or are very thin, so it very much seems like I have the trade off of not letting my decal bleed through to the other side of a mesh with unnecessarily clipping it around corners < 90. I can appreciate that there is some difficulty getting the decal's to behave appropriately when wrapped past 90 degrees, but does anyone with some knowledge of the behemoth that is the decal implementation have insight to how we can at least correct this duplication / bleed through issue? Thanks! Zack