AB95

Members
  • Content Count

    32
  • Joined

  • Last visited


Reputation Activity

  1. Like
    AB95 got a reaction from Wingnut in Is it possible to enable collision to mesh that attach to animating bones?   
    @Wingnut @Deltakosh @Raggar It works! thank you guys so much for the help!
  2. Like
    AB95 reacted to Raggar in Is it possible to enable collision to mesh that attach to animating bones?   
    http://www.babylonjs-playground.com/#SRR6Y2#7
    You can use impostor.syncImpostorWithBone instead of attaching the mesh to the bone. Seems to work.
     
  3. Like
    AB95 reacted to Deltakosh in Is it possible to enable collision to mesh that attach to animating bones?   
    For the console error, you may need to unregister your interval on scene.dispose:
    https://www.babylonjs-playground.com/#SRR6Y2#5
  4. Like
    AB95 reacted to Wingnut in Is it possible to enable collision to mesh that attach to animating bones?   
    Hi AB95!  I like your project! 
    https://www.babylonjs-playground.com/#SRR6Y2#4
    It is not "fixed" yet... but this PG is "different". 
    Changes: 
    -  Lines 5/6 - changed to OimoJS physics (default is CannonJS).  Oimo seems to be running much faster, in this project.  Also increased world-step speeds... making physics engine update faster.
    -  Lines 8/9 - changed some camera orientations
    -  Lines 25+  - changed a variable name to proxyMesh.  'proxy' ~=  something doing a task for another something.
    -  Lines 29 & 48  -  .checkCollisions = true... is NOT USED on physics-engine colliding.  That is for a different collision system, built-into BJS core, used for colliding freeCams with mesh, in FPS shooter games.
    -  Line 32  -  I added some mass to each proxyMesh box.  Not sure if needed, but added anyway.
    -  Lines  32 & 49  - proxyMesh.physicsImpostor  & ball.physicsImpostor - keep these lower-case.
    We have SOME physics active, now.  But, the proxyMesh boxes are still not colliding with the falling balls.  Balls ARE colliding with floor and with each other.
    I am going to ping physics expert @RaananW and see if he wishes to comment.  He might know things about bone-animated physics impostors.  I also invite @Raggar to comment, who has done some fine physics work, including some rag-doll skeleton stuff.  @Samuel Girardin is invited, too... another rag-doll and physics pro.  All other commenters are welcome, too, of course. 
    I have done some physics, too, but I have never tried to use moving impostors whose positions/orientations are controlled by bones.  We might need some kind of forceUpdate() of each impostor... each frame of the animation.  Not sure. 
    We MIGHT have an issue with SO MANY impostors... overlapping each other.  We might need to ONLY add proxyMesh/impostors on CERTAIN bones...  far less mesh than current numbers... to avoid that impostor overlap.  In some cases, overlapped physics mesh... automatically try to de-overlap... and it can be violent.  :)   Mesh are sometimes sent flying in all directions.  :)
    Stay tuned for more comments.
    Core/PG Team:  On-console, I am seeing BJS - [08:04:52]: Physics not enabled. Please use scene.enablePhysics(...) before creating impostors.  ...AFTER a playground SAVE and attempted re-RUN.  Anyone else seeing that?  FF 52 ESR.
  5. Like
    AB95 reacted to aWeirdo in Change GUI button image   
    Hi @AB95, 

    That button is made of an GUI image and a GUI textblock.
    https://github.com/BabylonJS/Babylon.js/blob/b215e22829e182a4fd6cdce8b81a9a6bf44f07cb/dist/preview release/gui/babylon.gui.js#L3823 ( image being child no. 0 )
    GUI.Image has a "source" property.
    https://github.com/BabylonJS/Babylon.js/blob/b215e22829e182a4fd6cdce8b81a9a6bf44f07cb/dist/preview release/gui/babylon.gui.js#L3545 TL;DR:
    button.children[0].source = newImageUrlOrBase64String;  
     
  6. Like
    AB95 got a reaction from JackFalcon in Fullscreen looks wrong on android browser   
    Hello @aWeirdo 
    Thank you for the suggestion of reading the Presentation differences part, I have solved my problem!
    The "Presentation differences" section points out some part that sounds similar with the behaviour of my fullscreen issue:
    something slightly different would be my canvas is not centered (looks like it is shifted 50% below the top of the screen) while remaining area black, the solution recommended by the fullscreen API website is as shown below:
    #myvideo:-webkit-full-screen { width: 100%; height: 100%; } #myvideo is known to refer to the id we set for the canvas element.
    This solution doesn't work for me, BUT! this solution may work for <div> element but not <canvas> element (as we know babylon makes use of explicitly defined HTML canvas element to hold 3D graphics).
    So instead, we could explicitly center the canvas and make it fullscreen using css:
    #my-canvas:-webkit-full-screen { position: absolute; width: 100%; height: 100%; left:0; right:0; top:0; bottom:0; margin:auto; } and that solves my issue. 
  7. Like
    AB95 reacted to gryff in Where can we in blender define if mesh is isVisible is true of false   
    @ian : Well for a scene in Blender clicking on the "eye" along side the mesh name in the Outliner will make a mesh invisible in the 3D window. Clicking on the "camera" icon along side the mesh name will stop that mesh being included in a Blender Render.
    However, to make it invisible in an export to a .babylon file - click on the "camera".
    I have a vague recollection that at one time in the .babylon export process that clicking on the "eye" made it invisible and clicking on the "camera" disabled the mesh.
    cheers, gryff

  8. Like
    AB95 reacted to davrous in Sound does not play when the page is added to home screen IOSphone   
    I'm not sure to really understand what's going on. And if you can't share your code, please at least try to isolate a reproduction case to let us review it.
    I'm sorry to ask, but on your iPhone, are you sure it's not muted with the physical button on the left? Indeed, even after unlocking the web audio stack (which need at least a single user touch), you'll have no sound if the switch is set to off (even if native apps can play sounds). 
    I don't get the problem with web app vs safari browser. What do you call the webapp mode?
    David
  9. Like
    AB95 reacted to Deltakosh in Animation not pause when pause() function is triggered using $(window).blur();   
    Hello!
    this is because the tab is completely stopped by the browser when you switch to another tab and thus, babylon.js has no time to run the required code.
    Here is a fix for you:http://babylonjs-playground.com/#1MZCTQ#1
  10. Like
    AB95 got a reaction from Deltakosh in Is it possible to use WebVRFreeCamera for Samsung GearVR   
    @Wingnut hi, I understand the growing BJS community and it is reasonable for questions being missed sometimes. And as the GearVR is currently not with me, I will test it on tomorrow morning(I currently stay in Singapore, it is now 12.01am). But based on my previous trial and error, there is something I am certain about while testing BJS WebVRFreeCamera with Samsung Internet using GearVR:
    1. the device is certain in webvr mode during the testing
    ( I have seen the "WebVR is not enabled on your browser" error before when I first tried on GearVR,but that is because I have to manually type in internet://webvr-enable in Samsung internet url bar to enable webvr feature, after that the error's gone)
    2. I had a button for switching between VRDeviceOrientation Camera and WebVRFreeCamera, if I pressed it to switch camera, it will do scene.activeCamera = new BABYLON.WebVRFreeCamera(...); and log window would return the current scene.activeCamera name. But everytime I pressed, there is no log result which I suspect the failure of WebVRFreeCamera initialisation.
    @davrous hi, I've seen this video which leads me to the Sponza demo, and I had tested the Sponza scene in GearVR. I can't remember the exact result of pressing the VR button already, it is either
    1. switch to deviceOrientation camera(which i should see the two vr viewport display on the flat Samsung internet screen in front of me in GearVR( which is weird, because for what I remember, navigator.getVRDisplays return true during the beginning of each of my testing in GearVR),
    2. or the scene shows no changes upon the button press, i will check again tomorrow, and it could be Samsung Internet is using webvr 1.1 too, so I am looking forward for Raanan's new WebVRFreeCamera!
    Finally, thank you all for the helps, BJS is very easy to learn and it helps me to build 3D scene on web page in a convenient way, I really appreciate all the active responses I got every times I ask a question here.
  11. Like
    AB95 got a reaction from Wingnut in Is it possible to use WebVRFreeCamera for Samsung GearVR   
    @Wingnut hi, I understand the growing BJS community and it is reasonable for questions being missed sometimes. And as the GearVR is currently not with me, I will test it on tomorrow morning(I currently stay in Singapore, it is now 12.01am). But based on my previous trial and error, there is something I am certain about while testing BJS WebVRFreeCamera with Samsung Internet using GearVR:
    1. the device is certain in webvr mode during the testing
    ( I have seen the "WebVR is not enabled on your browser" error before when I first tried on GearVR,but that is because I have to manually type in internet://webvr-enable in Samsung internet url bar to enable webvr feature, after that the error's gone)
    2. I had a button for switching between VRDeviceOrientation Camera and WebVRFreeCamera, if I pressed it to switch camera, it will do scene.activeCamera = new BABYLON.WebVRFreeCamera(...); and log window would return the current scene.activeCamera name. But everytime I pressed, there is no log result which I suspect the failure of WebVRFreeCamera initialisation.
    @davrous hi, I've seen this video which leads me to the Sponza demo, and I had tested the Sponza scene in GearVR. I can't remember the exact result of pressing the VR button already, it is either
    1. switch to deviceOrientation camera(which i should see the two vr viewport display on the flat Samsung internet screen in front of me in GearVR( which is weird, because for what I remember, navigator.getVRDisplays return true during the beginning of each of my testing in GearVR),
    2. or the scene shows no changes upon the button press, i will check again tomorrow, and it could be Samsung Internet is using webvr 1.1 too, so I am looking forward for Raanan's new WebVRFreeCamera!
    Finally, thank you all for the helps, BJS is very easy to learn and it helps me to build 3D scene on web page in a convenient way, I really appreciate all the active responses I got every times I ask a question here.
  12. Like
    AB95 got a reaction from davrous in Is it possible to use WebVRFreeCamera for Samsung GearVR   
    @Wingnut hi, I understand the growing BJS community and it is reasonable for questions being missed sometimes. And as the GearVR is currently not with me, I will test it on tomorrow morning(I currently stay in Singapore, it is now 12.01am). But based on my previous trial and error, there is something I am certain about while testing BJS WebVRFreeCamera with Samsung Internet using GearVR:
    1. the device is certain in webvr mode during the testing
    ( I have seen the "WebVR is not enabled on your browser" error before when I first tried on GearVR,but that is because I have to manually type in internet://webvr-enable in Samsung internet url bar to enable webvr feature, after that the error's gone)
    2. I had a button for switching between VRDeviceOrientation Camera and WebVRFreeCamera, if I pressed it to switch camera, it will do scene.activeCamera = new BABYLON.WebVRFreeCamera(...); and log window would return the current scene.activeCamera name. But everytime I pressed, there is no log result which I suspect the failure of WebVRFreeCamera initialisation.
    @davrous hi, I've seen this video which leads me to the Sponza demo, and I had tested the Sponza scene in GearVR. I can't remember the exact result of pressing the VR button already, it is either
    1. switch to deviceOrientation camera(which i should see the two vr viewport display on the flat Samsung internet screen in front of me in GearVR( which is weird, because for what I remember, navigator.getVRDisplays return true during the beginning of each of my testing in GearVR),
    2. or the scene shows no changes upon the button press, i will check again tomorrow, and it could be Samsung Internet is using webvr 1.1 too, so I am looking forward for Raanan's new WebVRFreeCamera!
    Finally, thank you all for the helps, BJS is very easy to learn and it helps me to build 3D scene on web page in a convenient way, I really appreciate all the active responses I got every times I ask a question here.
  13. Like
    AB95 got a reaction from Deltakosh in Restart a finishing animation   
    ok, I think I solved the problem, to prevent the callback being called, I just set the first animatable's callback to null every times I want to restart the entire scene animation, reset the second animatables back to frame zero as well.
    http://www.babylonjs-playground.com/#OQENJ#7
  14. Like
    AB95 reacted to JohnK in Restart a finishing animation   
    You can begin the animation again
    http://www.babylonjs-playground.com/#OQENJ#1
  15. Like
    AB95 reacted to NasimiAsl in Significant delay on device orientation camera   
    i think about that before and make some parameter for that in my project
    1.  you most define 3 mode quality ( sd mobile ,hd mobile & sd PC  , PC  ) (manage by resolution + (on or off effect like pps , god ray, rain ,clouds effect , shadows , ...  ) )
    2.  2 mode Textures some tile and large unnecessary texture can be painted by color in mode 1 and render fully texture
    3.  if you can detect ram overflow stuff  you can have stable fps in your scene
    and something important behind the face (when you have big mesh in there take big time for that ) i don't know (yet) promise i find that soon
    that is not happen  in native version
     
    and define this  parameters like  flag for default shader + custom shaders and manage that when you need more Cpu 
    and you can manage render time  by make delay function ( you need manage render loop in worker processor and render per worker event for that)
    and about check collision and update camera method :  please stop control  this stuff on render loop that kill your fps 
     
  16. Like
    AB95 reacted to RaananW in Significant delay on device orientation camera   
    That's the million dolalr question, isn't it?
    First, the only way to actually render the scene is run scene.render in the render loop. no other component will do it for you, you are in control. So, taking it out will make everything run very smooth, except for the fact that you won't see a thing.
    The first thing you can do is to disable the lens correction (which, if I am not mistaken, is on per default). This is done in the camera's constructor.
    The second thing you can do is lower the resolution of your scene. Play with the hardware scaling facor (engine.setHardwareScalingLevel) and see if it helps.
    Other than that - use a better device / browser!  Sadly, not all devices and mobile browsers are prepared for VR using WebGL. The second render every frame is an overkill for most devices I have tested on. On the nexus 5x for example, the simplest scene renders at ca. 25-30 fps, and that's a best case scenario. 
  17. Like
    AB95 got a reaction from MrVR in Significant delay on device orientation camera   
    Hi everyone,
    I am currently working on a 3D scene that using VRDeviceOrientationFreeCamera and DeviceOrientationCamera, I experienced serious delay on both cameras. Based on what I have seen so far, it takes at least half a second for the camera to start rotate after I rotate my device. I try on other demo scenes with vr features enabled on babylonjs.com, there are also significant delay on the camera. Is this issue solvable by tweaking around the camera input or is it something we need to bear with if using the babylon default vr camera?
     
     
  18. Like
    AB95 reacted to aWeirdo in Fullscreen looks wrong on android browser   
    Hi @AB95 

    it really just depends on the manufacturer, some new phones still use the default browser.

    Looking deeper into it, it seems the official fullscreen API support for the android browser is unknown, 
    https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API 
    scroll down to "Browser compatibility" and click mobile and you'll see question marks at android,

    My best guess would be that the browser simply haven't been kept up-to-date by the developers of it, or perhaps they simply didn't care to spend time & money fully supporting it, since it's rather rare a mobile would need to go fullscreen in a browser
    it could ofcourse also be something else, it can be hard to tell without console errors^^
     
    Edit;
    Actually, in the linked page above, try reading the "Presentation differences" section, it could be that the browser doesn't set 100% width & height while in fullscreen.
  19. Like
    AB95 reacted to Théo Sabattié in Skybox not shown in a scene loaded from a babylon file(exported from Blender)   
    Hi'
    I tested your code,
    Your have to reduce the size of the skybox:
    var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, newScene); to
    var skybox = BABYLON.Mesh.CreateBox("skyBox", 50.0, newScene); and that work.
  20. Like
    AB95 got a reaction from Théo Sabattié in Skybox not shown in a scene loaded from a babylon file(exported from Blender)   
    Yeah I set the skybox way too big compare with the camera maxZ setting, I figure out the problem of the skybox after I tweak around the renderingGroupId of the skybox as well as remaining meshes in the scene, thank you for helping me test my code