• Content Count

  • Joined

  • Last visited

About Ericky14

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. By the way, I forgot to mention, the scene is draggable on the x-z plane of course. Do you guys think its feasible at all to delete meshes outside viewport and make them appear when they come in the viewport? Or is that something already implemented in BABYLON?
  2. Hello Wingnut, thanks for replying. First of all, nice speculation haha. They are drillable, I've already got that going. What did you mean by using JS to "generate" the labels? I just instantiate them using the GUI and then create instances of that mesh. Also, if I didn't use this label system and only used BABYLON's GUI to generate each word/text, initialization time for this scene would take over 20 seconds... So, not sure imageButtons will do much for me as they will be individual textures and take longer to generate. I was able to get ~30 fps by removing all labels. That still seems low to me, is there no other way to improve the scene? Vertice count still high. I will try to improve the label system.
  3. Hello, I have a pretty complex scene built and I am having very heavy lag issues. Even though I have a lot of meshes, they are all instances of default ones... so I don't think there's any reason I should be getting only ~10 FPS. Could anyone provide me with any sort of clue as to why my performance is so low? By the way, each of those cylinders are composed of many layers of cylinders. There's usually 3 cylinders (the middle one, the border, and the outline) and under them could be at least 3 others stacked (the ones that look like shadows). Aside from that, each little "group" that you see in the screenshot has a "mapMesh" object which the cylinders are parented to. All those mapMeshes are parented to a worldMesh. For the GUI text and images, each letter/image is an instance of a previously generated text/image. Each letter is parented to a wordMesh, which is then parented to a labelMesh, which is then parented to the mapMesh or the cylinder in the case of the ones on top of it. The background with a gridMaterial has size 300 x 300 and gridRatio of 4. There's also a linear fog which starts at the end of the camera (usually 50 units apart from cylinders in the y axis) and ends at 50 units after that and has a density of 0.01. After this scene is fully generated, there isn't much coding running at all... no animations or anything, it's pretty static. However, I cannot freeze world matrices because I might need to move the cylinders. I appreciate any help, really stuck on how to improve performance here and not degrade the quality of my scene.
  4. I solved this problem by looking at the "window.devicePixelRatio" variable which is either 2 or 1. And I have "adaptToDeviceRatio" turned on. So, for an orthographic camera, I just change the radius(orthoTop, orthoBottom...) which should be doubled at devicePixelRatio 1. And for perspective camera, I also change the radius, but I set custom values for both 2 and 1 so they would match nicely since doubling didn't work too well. Thanks for the help.
  5. I am. But that is not the behavior I want. You can test it with the default playground environment. I am expecting the camera radius to increase rather than the whole scene to scale up just like in game engines such as Unity. (I tested it with my laptop and my tv, the whole scene scales up and the html stuff looks really tiny next to the scene)
  6. Hello, I have my canvas stretching 100% width and height of the page. When running it in a small resolution screen and in a big resolution screen, the whole thing is scaled up. Is there any simple way to simple increase the radius of the camera based on the device resolution instead of having everything scale up? (Everything stays the same size just like regular html elements)
  7. Here, this is the kind of solution I proposed. Maybe we could have something similar on the babylonjs side... just a suggestion. This is just a simple example of the system I built.
  8. Managed to fix it setting the background image's alphaIndex to 0.
  9. I was not able to reproduce this in the playground. Does anyone have any idea what could be causing this darkening effect on the GUI text? The GUI text is drawn on planes and the GUI image below it is about 5 units away. Also, the image is a svg, but I also tried with png and the same thing happens. The scene also has fog... and a clear color of that blue on the background. If I rotate the camera, the text will randomly lightup/darken on certain parts of the GUI image below it even though they are far apart on the Y plane. Could this be a bug?
  10. Sorry, I posted the wrong one... I guess the one I did didn't save. Here's the right one.
  11. Here, This is a basic example, you can see how it takes a few seconds to instantiate everything.. in my use case, I have 3 different types of fonts and about the same amount of texts.
  12. It's pretty simple to repro. What I mean is that I am trying to generate 100+ dynamic texts with a few different fonts and depending on the amount, it can take up to 30+ seconds. Even if I offset the generation of each by a few milliseconds, it still drops the fps quite a bit. The dynamic resolution is 256x256 btw.
  13. Is your canvas full screen or does it have an offset? pointerX and pointerY might not be having the right coordinates.
  14. Hello, I am making this post to discuss possible improvements to the GUI text system. Right now, when generating new text, it can be very slow if you have a lot of it in the screen. One clear improvement would be to pre-generate (or cache) each letter as an object and just generate instances of that object, which turns out to be very very very fast. However, that is not very easy to do as letter spacing can be a hard thing to manage when positioning each letter next to each other. Is there any easy way this could be improved in the babylonjs side to increase GUI text creation speed? Or is there any other solutions for this problem?