• Content count

  • Joined

  • Last visited

About thrice

  • Rank
    Advanced Member

Contact Methods

  • Twitter
  1. Nice! I think I need to familiarize myself with stack panel,, thought it was only part of the full screen api - that could simplify some of my code I think. however: the original objective I was trying to accomplish remains - Basically, in your example, it would be the equivalent of being able to click through to the plane, in the small portion of the stack panels that overlaps the plane behind it, that does not have a stack panel button in that space. But ya, I have it working the slightly more complicated way so not the end of the world, and design wise probably not the best UI doing it that way, but would have worked in this instance just because the buttons themselves aren't very tall so it's easy to click the plane behind it while hovered. P.S. Overflow handling/scrollbar would be amazing btw! Just throwing that out there @Deltakosh
  2. freezeWorldMatrix / children

    Word, good to know, thanks
  3. freezeWorldMatrix / children

    Appears to be affecting FPS quite a bit, much smoother after freezing children so assuming children need to be frozen individually
  4. Quick question: Does freezeWorldMatrix need to be called on children meshes to gain full performance benefit, or is freezing a parent mesh enough (I see that the children have different values for isWorldMatrixFrozen, so guessing I need to freeze each child individually, but figured I'd make sure before making a bunch of changes that didn't need to be made) Also: Is there a way to measure how many meshes world matrices are being evaluated in the scene, i.e. something like engine.drawCalls for matrices calculations count?
  5. @Wingnut Thanks for the reply. I actually don't disagree that in this case, it's a bit of a poor ui decision. Reason I did it that way was mainly simplicity. The better way would probably be to make the menu appear to the right or left of the mesh, however that brings a number of complications, i.e.: 1. I am showing a list of keywords to the left of the card, which leaves me showing it to the right of the card.If the board gets too full, the menu will be stretching beyond the bounds of the window (which I haven't solved yet) 2. I have to now offset the actions plane to be slightly within the parent plane, then when mouse enters the actions plane, store a variable on the actions plane to indicate that mouse is over the actual actions plane (otherwise hovering out of the main card plane would cause the actions plane to close) With all that said: I still think the behavior is surprising.
  6. @magigAhhh! Thanks a ton! This shader stuff is intense, still trying to wrap my brain around it.
  7. So, I'm trying to convert a shader from shadertoy, I'm close but still can't get it working. Also in my actual scene it doesn't seem to be working at all, but it's hard to tell if it's related to the issue I am having w conversion, since I need to rotate the sphere to get it to show up to begin with. Shader is here: (it appears blank at first, but if you rotate it youll start to see the fire. The actual effect I am going for you will see only if you rotate it just right so that you see the fire starting with the white in the middle, and it filling up the sphere). The source shader is here: So the one place I was not sure how to proceed, was mapping over the iResolution variable (which shadertoy states is the viewport resolution). I played around with a bunch of different things and ended up trying the camera input, which works, but requires rotating the mesh to see it at all. Anyone know what input would map over to viewport resolution (or how to get it), and or what I am doing wrong/missing here?
  8. So, I am having an issue with GUI controls / click through events when attaching to mesh. I'm not sure if this is technically a bug, or if there is a built in way to accomplish what I am trying to do which I am missing, so figured I'd ask here first before going to GH. Use case is: I have a card plane. When you hover the card plane, I have an actions plane (with advancedDynamicTexture) which appears above the card plane slightly, which contains multiple action buttons (which do not fill the plane, parts of the card are still visible) - Basically trying to make it so when the actions buttons are visible, you can click the button, without triggering the card planes action manager click actions, but if you click inbetween the actions, you are able to trigger the cards action manager. Example is here: Basically, if I set the actions plane to isPickable, can't click the plane behind it. If I set it to false, can't click the buttons. Is there an easy way to achieve this and or is this a bug? I am thinking maybe it would make sense to have a property on the dynamic texture itself which would default to the parent mesh, but then could be overwritten, to allow us to have: mesh.isPickable = false texture.isPickable = true and that distinction could allow click through on areas which are empty, while still allowing the buttons to be clicked? (unless there is some easy property setting I am missing or whatever).
  9. Using mesh instances with Babylon GUI

    Ya I will when I have a chance: separately, I've been tracing down a pretty big bug in my local project with drawCalls multiplying on dispose for the past few nights. I think I figured out the cause, but can't reproduce on a PG, going to open bug on GH though.
  10. I am trying to make my scene (card game) as performant as possible. I've made it quite a bit faster by using mesh instances and sharing them with cards and what not, but it seems like I am unable to use instances with a mesh which has a AdvancedDynamicTexture material/texture on it. Primary use case is each card has it's own separate attribute set, however the attributes appear all in the same location on the mesh. (i.e., card name, type, attack, health, cost, etc) I think it's actually just one draw call for the plane and an additional one for the texture, but still would be nice if it were possible. Am I missing something or is this currently not supported?
  11. Thanks for the tips. I think the initial not seeing FPS improvement was also due to electron, which behaves really strange w babylon sometimes (like sometimes when scene is loading, fps will just tank to like 30 and never recover, until I minimize window and bring it back to the foreground). Anyways I'm down to 150ish draw calls now and seeing 50+ FPS for the first time in quite awhile!
  12. So I've been trying to improve performance in my scene. Been stuck at around 40fps consistently. I am making a card game, so there are a lot of planes, with a lot of materials (the images for the cards), as well as each card in hand / on board having its own set of attributes. Anyways, I was under the impression that scene.engine.drawCalls, was the number of things babylon would redraw, or check to see if it was dirty or whatever, everytime the render loop runs. Now I'm not so sure, because after reducing my draw calls from a minimum 350 when I load my scene, to 200, I haven't really seen a FPS boost. Before I continue to refactor to reduce the number of draw calls, I figured I would ask, am I missing something here? Or is that still a large number of draw calls, which could be causing or contributing to the low FPS?
  13. Looks like upgrading to babylonjs@3.0.4-beta fixed it
  14. Oh also, at the end of the error which throws the huge WebGL code block there is another error, not sure if this is helps identify or not client.js:111264 BJS - [16:34:06]: Error: WARNING: 0:81: ' ' : extension directive should occur before any non-preprocessor tokens ERROR: 0:743: 'NORMALXYSCALE' : unexpected token after conditional expression t._ErrorEnabled @ client.js:111264Effect._prepareEffect @ client.js:111274(anonymous function) @ client.js:111274Effect._processShaderConversion @ client.js:111274(anonymous function) @ client.js:111274Effect._processIncludes @ client.js:111274(anonymous function) @ client.js:111274Effect._loadFragmentShader @ client.js:111274(anonymous function) @ client.js:111274Effect._processShaderConversion @ client.js:111274(anonymous function) @ client.js:111274Effect._processIncludes @ client.js:111274(anonymous function) @ client.js:111274Effect._loadVertexShader @ client.js:111274Effect @ client.js:111274n.createEffect @ client.js:111266r.isReadyForSubMesh @ client.js:111277r.render @ client.js:111273t.render @ client.js:111274t.renderUnsorted @ client.js:111270t.render @ client.js:111269t.render @ client.js:111269r._renderForCamera @ client.js:111271r._processSubCameras @ client.js:111271r.render @ client.js:111271(anonymous function) @ client.js:134915n._renderLoop @ client.js:111265 client.js:111264 BJS - [16:34:06]: Trying next fallback.
  15. I can't reproduce it in a playground, so I am wondering if there is another setting, i.e. on the material itself that I am setting which could be contributing to the problem, or some other scene configuration that I am missing or whatever, anyways: Trying to set a bumpTexture on a material throws an error, with a huge chunk of WebGL code. Screenshot is easiest to see 2017-06-30 15.48.15.png?dl=0 Full error message: Babylon version in my project (a couple of weeks agoish, maybe a few weeks ago?) babylonjs@^3.0.2-beta: version "3.0.2-beta" resolved "" diffuseTexture with the same asset works fine, bumpTexture blows up, i.e. this.plane.babylon.material.bumpTexture = BABYLON.Texture.CreateFromBase64String(this.backgroundNormalMap(), this.background_normal_map_image_key); ^throws error this.plane.babylon.material.diffuseTexture = BABYLON.Texture.CreateFromBase64String(this.backgroundNormalMap(), this.background_normal_map_image_key); ^no error -- any ideas as to what could be happening here?