alexoy
Members-
Posts
52 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
alexoy's Achievements
Newbie (1/14)
6
Reputation
-
alexoy reacted to a post in a topic: Hide a sprite
-
alexoy reacted to a post in a topic: Hide a sprite
-
alexoy reacted to a post in a topic: Occlusion Queries bug
-
@Deltakosh, thanks, it helped and 2 new questions.. 1. Of course about performance differences - will there be? Static list of meshes vs dynamic. Will it be reordered on every frame? (noticeable with a big enough list?); 2. For modelling I use Blender. When I set a texture on a mesh - there is a texture's setting whether to use "Alpha" or not. If I set "Use", even if my image is not transparent at all - occlusion queries say the label is still visible. If I uncheck "Use" - everything is fine and the label becomes invisible when behind this mesh. Is this an expected behavior?
-
Hi, Probably there is a bug in occlusion queries - http://www.babylonjs-playground.com/#QDAZ80#15 Here a label is a thing that appears/disappears depending on the visibility of a sphere. I've noticed Occlusion Query takes into account only meshes that were created before it was enabled. If I add a box later - BJS doesn't understand that a sphere is behind the new box and my label stays visible. In my demo - in the beginning the label is not visible because the sphere is not visible, it's good. However, if you go to the right behind the box - label will always be visible. Is it normal and can be configured somehow or it's a bug?
-
@trevordev, @Deltakosh, unfortunately it doesn't work for 100%. For some reason, later in the scene I can't hide a sprite - http://playground.babylonjs.com/#RHRF2N#1 - wait for 5 secs, everything should disappear, but only label disappears. For some reason it's only possible to init a sprite as not visible, but not possible to hide it later.
-
The Leftover reacted to a post in a topic: Material for SPS
-
alexoy reacted to a post in a topic: Hide a sprite
-
@trevordev, lightning fast How often do you build babylon.js? Already wanted to try EDIT: oh.. "The Travis CI build is in progress"- lets wait for Travis
-
Hi, Could you tell more what is wrong here - https://www.babylonjs-playground.com/#YI6D05#3 ? Which prism should be rotated, but is not?
-
Hi, Looks like there is no option to hide a sprite, like sprite.isVisible = false; - could you add it please? But please don't mention setting the size to 0 or removing/recreation the sprite it's an ugly hack, we do not do that with meshes and other things, right?!
-
GUI label net rendered when parent mesh is not visible
alexoy replied to alexoy's topic in Questions & Answers
@dbawel, and what can you say about http://www.babylonjs-playground.com/#QDAZ80#14 ? With "Occlusion Queries" I mean official docs with this topic. In this demo check also happens on every frame, but could be done once every 60 frames too, like in your example. In your opinion this way is much slower or why you don't like it? -
GUI label net rendered when parent mesh is not visible
alexoy replied to alexoy's topic in Questions & Answers
Hi @dbawel, I remember this post. Actually some answers are mine. What method do you suggest as a base? Because rays calculations could be even more expensive - you need to cast them on every frame for every label/enemy, then find whether there is another mesh in between. Also going through all frustum meshes and finding the closest or comparing the distances doesn't make any sense in my case. But why you would avoid a "Occlusion Queries" method? -
GUI label net rendered when parent mesh is not visible
alexoy replied to alexoy's topic in Questions & Answers
I've found out you have a thing named "Occlusion Queries" - is it good for my task or too expensive (there could be many players around)? Demo - http://www.babylonjs-playground.com/#QDAZ80#14 (2'nd sphere is always on top to make it easier to see what's happening) -
GUI label net rendered when parent mesh is not visible
alexoy replied to alexoy's topic in Questions & Answers
@Deltakosh, you mean even if in front of camera there is a small mesh behind the second bigger mesh, so not visible to the viewer, frustum calculations will state that both meshes are in the same visibility state just because mathematically they are in front of camera? If Yes, what can I do then? I hope you agree that seeing the nickname of not visible enemy is bad -
GUI label net rendered when parent mesh is not visible
alexoy replied to alexoy's topic in Questions & Answers
@Deltakosh, I mean whether I'm able to see the enemy directly, whether he is literally visible in front of my camera. While moving sometimes he is in front of me - then the label should be visible. If he goes behind the wall/house/etc - the label should disappear. Testing shows, that being behind the second mesh doesn't make the first one "isVisible = false", so probably the answer to you question is using frustum. -
alexoy reacted to a post in a topic: GUI element's visibility/existence
-
Hi all, Is there a flag in a BJS GUI system to automatically disable rendering of the GUI labels when the mesh they are attached to is not visible? Simple use case: you use labels to show user's names, and you shouldn't see the labels of the enemies which are not visible at the moment. Well.. because you shouldn't know where they are (behind the wall)
-
Hello! This is an old topic, but at this moment I'got the same question. In the repo I see that babylon.worker.js is regularly being updated, but docs say that the only thing we need to do to enable web workers is to set scene.workerCollisions = true (babylon.worker.js is mentioned nowhere). For example here: https://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity#web-worker-based-collision-system-since-21 As this topic is without answer - the question is the same - do we need babylon.worker.js and when if Yes?
-
Babylon.js vs Unity - What makes BJS better?
alexoy replied to hit2501's topic in Questions & Answers
Just curious.. why in such topics (HTML5+JS vs Something) almost nobody mentions that JavaScript is a single-threaded thing? Your code have to be very efficient to make your game enjoyable, because performance is very important. I haven't used Unity, but fast searching shows there is multithreading in it, so potentially it should work faster with heavier applications, especially on normal multicore PCs. 4-8 cores are better than 1, aren't they? What do you think about that? -
notRenderable is ignored if label is linked with a mesh, should it be like that? isVisible still works. @Deltakosh, by children you mean cases like when there is a GUI rectangle and a GUI label attached to it, so label is a child of the rect.?