royibernthal

Members
  • Content Count

    714
  • Joined

  • Last visited

  • Days Won

    1

royibernthal last won the day on September 17 2016

royibernthal had the most liked content!

About royibernthal

  • Rank
    Advanced Member
  • Birthday 11/28/1991

Profile Information

  • Gender
    Male

Recent Profile Visitors

2,524 profile views
  1. royibernthal

    Do animatables take into account current frame rate?

    Longest TL;DR I've seen in my life Thanks for the explanation, I think I get the picture.
  2. royibernthal

    Do animatables take into account current frame rate?

    Can you help me understand why this line doesn't take care of exactly that issue? It takes into account the difference in time between now and the previous time things were animated, doesn't it? https://github.com/BabylonJS/Babylon.js/blob/6a359893cba45ba93de744027370c54910fac5aa/src/babylon.scene.ts#L2602 How'd you best approach compensating for low FPS in animation while still using Babylon's animations? (without creating my own animations solution from scratch)
  3. royibernthal

    Do animatables take into account current frame rate?

    Okay so I understand the animation fps is not dependent on scene rendering fps. But when there is lag in scene rendering, it means the device is having a hard time to calculate stuff, therefore doesn't it indirectly affect the animation fps as well? (due to device lag rather than being directly tied to scene fps) The most important question is - would I need to compensate in animation speed for lag on device? Or would it really be synced perfectly with time regardless of lag on device? i.e. would time become subjective to the device's lag or does it always remain objectively accurate? (in the case of animations of course)
  4. Do Animatables take into account the current frame rate? Specifically when used for animating skeletons via Scene/beginAnimation(). Let's assume: bjs renders at 60 fps The current fps on a weak machine is 30 fps I started an animation with a speedRatio of 1 Given that frame rate (executing at 50% of ideal fps), is the speedRatio compensated in any way under the hood to 2 instead of 1? Or do I need to compensate for it manually? If I need to compensate for it manually, is there a dynamic way to base the speedRatio on the current fps? For instance: Let's say I started an animation in an infinite loop while the fps was 60. After a while it became 30 - would I have to stop the animatable and create a new one at speedRatio * 2? In other words, would I have to recreate an animatable in order to have an updated speedRatio that takes into account the current fps?
  5. royibernthal

    Clicking on mesh is not detected at some points

    Got it, thanks
  6. royibernthal

    Clicking on mesh is not detected at some points

    Yeah it has a skeleton. So the current hit area is of the mesh before transformations were done on GPU, is that correct?
  7. Mesh is not recognized when I try to "pick" it at some points. I created this PG where each click adds to the counter, so it's easy to notice when a click is not detected. http://www.babylonjs-playground.com/#NEPU6C#8 Here's also a video demonstrating the issue - notice the counter as I click at different points on the mesh. On most points it works as expected, on some it doesn't. mesh clicks.webm
  8. royibernthal

    GUI - isVisible re-render

    DK I suppose I could send a PR myself if you agree with the solution I suggested
  9. royibernthal

    GUI - isVisible re-render

    Each click should toggle isVisible of image: https://www.babylonjs-playground.com/#XCPP9Y#637 I believe it's related to the new functionality at control level which makes sure controls can't be marked as dirty when invisible. I suggest to return at the beginning of _markAsDirty only if it wasn't called by the isVisible setter, that should fix the issue while keeping in mind the previous issue as well. public _markAsDirty(): void { if (!this._isVisible) { return; }
  10. royibernthal

    SpectorJS - Detect heavy computation in shader

    In the actual project, textures on mobile are already optimized to 256 instead of 1024, it didn't seem to help.
  11. royibernthal

    SpectorJS - Detect heavy computation in shader

    Of course Here's a repro in a PG: http://www.babylonjs-playground.com/#3B5YN6#3 It should be laggy on mobile - if it's not, you can easily add more models in assetsManager.onFinish. Any ideas for how to improve performance?
  12. royibernthal

    SpectorJS - Detect heavy computation in shader

    Oh, so I meant profiling Anything for that?
  13. I have a shader which is really slow on mobile - is it possible to use SpectorJS or another tool (let's say even on desktop) to find the problematic part of the shader code that is heavy on performance?
  14. royibernthal

    Is Babylonjs recommended for 2D projects?

    I agree with jerome, but I think that in your case PIXI might be an even better choice than Phaser. I suggest you do a thorough comparison between the two.
  15. royibernthal

    GUI feature request - Mask

    I suppose it has similarities, but I'm not sure if it's the right direction given the bigger scope of the feature I'm talking about. If I recall correctly we need to use stencil buffer in order to achieve the mask. Here's how PIXI handles graphics & shapes: https://github.com/pixijs/pixi.js/tree/dev/src/core/graphics It would be a nice addition to GUI as well, but it is a big feature in itself. Otherwise I suppose we could have very basic and less flexible data structures for common shapes such as rectangle, circle and triangle, and use their data in the masking process. Maybe even just use the existing Rectangle and Ellipse containers for now if it'd make sense. Needless to say, nested scale, position and rotation will need to be taken into account - GUI already knows how to handle these, need to see how it can be integrated into the masking process.