• Content count

  • Joined

  • Last visited

About pichou

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

786 profile views
  1. pichou

    Bump height standard material

    Thanks @Deltakosh! This is not exactly what I am looking for. In fact I would like to have a level superior than 1 so that we can really see the bump effet on the sphere. But it doesn't seem possible with the level as you can see in this playground : https://www.babylonjs-playground.com/#RK0W5S#11
  2. Is it possible to set the bump height of a standard material like on the water material? Thanks, Pichou
  3. pichou

    Shadow on PNG image

    Ha, I know why I haven't used the hasAlpha property before. It is because I also play with the visibility of the mesh. And with hasAlpha, when you change the visibility different to 1, the transparent background becomes black. But with the useAlphaFromDiffuseTexture property, the visibility is change correctly and the background stays transparent. So I am stuck with using the useAlphaFromDiffuseTexture to have the correct visibility and transparent background or with using hasAlpha to have the correct shadow. Is there a way to have both? Thanks
  4. pichou

    Shadow on PNG image

    Oh yes @Deltakosh hasAlpha is working perfectly! The result is awesome! Thanks!
  5. pichou

    Shadow on PNG image

    Hi everybody, I have a plane with material and diffuseTexture. The image used for the texture is a png with transparent background. In order to keep the transparent background in babylon, I set useAlphaFromDiffuseTexture = true; on the material. But now I want to see the shadow of the image. But I cant because of the useAlphaFromDiffuseTexture parameter. So my question is : Is there a way to have the shadow of my png image following the transparent and not transparent part? Thanks for your help! Pichou
  6. pichou

    Engine resizing method

    The thing I use right now is the camera . I simple set the camera position depending on canvas height : window.onresize = () => { camera.position.z = -10 - (canvas.height - 500)/50; }; And it works, with that simple equation I manage to have the expected behavior. But I don't know, I feel like this is not reliable and that the size could still change depending on screens (I have test it only on mine for now). I have made a playground so that you can see the result : http://playground.babylonjs.com/#ZR8GLF#1
  7. pichou

    Engine resizing method

    Hum not really, With your "fitToView" function you can see in the playground that the skull size is still changing when you change the window height. Then the last suggestion of Ericky14 is actually to update the camera position/radius which I would prefer to avoid because I am not sure I will always have the exact same result depending on screen size with that method. Thanks for the topic though, the questions are similar indeed!
  8. Hello everybody! I have an issue with the resizing method which depends on screen size. When you resize the height of your window, all the elements in the scene are zoom-in or out when the screen height is bigger or smaller. I understand the logic because the bigger your screen is and the more you want to show. First I wonder why the camera position is unchange when the screen size change because the effect really looks like the camera is going up and down? Then in my specific case I don't want this effect to happen and need all the elements to keep the same size in the screen whether this is a big one or not. But didn't find a solution yet. I could set the camera position depending on the height of the screen but it doesn't seem really reliable. Thanks for your help! PICHOU
  9. pichou

    Blurred text

    Hey @Deltakosh, I know this library fabricjs which seems to have no issue to have good text rendering with webGL : http://fabricjs.com/ Plus I have made some research and found this article very interesting with a working example : http://wdobbie.com/post/gpu-text-rendering-with-vector-textures/ Then I also found this stackoverflow which list several techniques with its pros and cons : https://stackoverflow.com/questions/25956272/better-quality-text-in-webgl Maybe you already know all of that but I hope that can help! Cheerz, Pichou
  10. pichou

    Blurred text

    Thanks guys a lot for all your answers! Just by curiosity, how do other game engine manage to have good text quality? Plus for me this is not only text but also images, but I guess the problem is link.
  11. pichou

    Blurred text

    I have notice that the text created with babylon gui is blur. So I tried to put a classic html div and a gui text next to each other and the result is really obvious. I have made a playground to see it : https://www.babylonjs-playground.com/#2ARI2W#3 And attached you will find a screenshot of what I see. Plus I get the same thing with images, they are really blurred! First I wondered if this is only on my computer/screen that it is blurred like that. Some of you also have this problem? I have looked for a solution and the best I have found is to use the setSize function of the engine : https://github.com/BabylonJS/Babylon.js/blob/master/src/Engine/babylon.engine.ts#L2250 And it works I have better texts icons and images, but then a lot of other stuff were broken like the scene.pick function because the canvas size doesn't match with the screen size anymore I guess. So I just wonder why canvas can't have a better resolution and if there is a fix maybe? Bye bye, Pichou
  12. pichou

    Youtube video as a Source for Video Texture

    Still no way to do that? I saw threejs can handle youtube video : https://threejs.org/examples/#css3d_youtube Do not misunderstand me, I am not saying threejs is better than babylonjs, I am saying if threejs can do that, it sure has to be a way to do it in babylonjs? Cheerz, Pichou
  13. pichou

    inputText dynamic resize

    Hi @Deltakosh, Do you know a way to have one textarea? I saw you can have one with castorGUI library, but my input need to be on a plane or mesh. Plus I think the inputText is kind of poor in term of user interaction, no shortcut, can't copy/paste, no text selection. Do you think I could maybe have access to the code in order to improve it? I have looked at the code here and I think some things are doable : https://github.com/BabylonJS/Babylon.js/blob/master/gui/src/controls/inputText.ts Cheerz, Pichou
  14. pichou

    inputText dynamic resize

    To go further do you know a way to have a textWrapping on InputText like on TextBlock? I am looking for a textarea input but can't find a way to do that with the current InputText of Babylon. Here is a repo : https://www.babylonjs-playground.com/#UWS0TS#17 Thanks! Pichou
  15. pichou

    .babylon Model Library

    Hey @Raggar and @Deltakosh, I looked further and I found out that when I import the mesh there is actually a lot of meshes in the claraio's babylon file (between 10 to 30) when I expected just one. This is why when I tried to change the mesh properties it didn't work because I was moving or scaling only a part of the object. There is one mesh for each part of the object, for instance for this iphone 5S (https://clara.io/view/862d84a1-7dd3-4c69-a053-c0a90b7f994d) I get 24 different meshes with names like "button_volumedown", "light sensor", "powerswitch", etc. I guess when claraio uses the blender exporter they don't merge all of the object parts to end up with only one mesh. With some hope, I tried to use the function BABYLON.Mesh.MergeMeshes but didn't work héhé! Is it normal to have all that separate meshes? @Raggar do you have the same thing in the model you use from claraio? If it is the case how do you deal with that issue? Thanks guys!