max123

Members
  • Content Count

    251
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by max123

  1. Try adding this to your code: canvas.setAttribute("touch-action", "none");
  2. Hey blokes, Any tips on running Babylon smoothly in fullscreen (desktop)? The scene I'm working on isn't too heavy ~30K vertices. The framerate is generally acceptable (45-60). Yet as soon as the window is resized to fullscreen the scene crashes! The crash happens on retina displays only (I've set engine.setHardwareScalingLevel(1);). On non-retina, there's no crash but performance drops dramatically.
  3. yep, bias seemed to solve the issue!
  4. Hi folks, I'm having trouble with shadows - they seem to be 'floating', as you can see from the screenshots. The problem is much worse when I don't use usePercentageCloserFiltering. As you can see, the meshes do intersect! Unfortunately, I can't do a PG as it's a complex scene and is heavily copyrighted The settings for shadows are: let shadowGenerator = new BABYLON.ShadowGenerator(2048, shadowLight); shadowGenerator.usePercentageCloserFiltering = true; Any ideas?
  5. This is Blender 2.79b, Babylon exporter v 5.6.3. I'm using Blender Render, but this is what I've found so far: 1. I import a model (bfx / obj) into blender, then export to Babylon => everything works fine. 2. I strip all materials from ONE of the models, export to Babylon => BAM! Error!. I've attached the file. Thanks! stairs.blend.zip
  6. Hi guys, Does anyone have any idea what can cause this?
  7. Hi, Is it possible to use your own vertex shader and use the default fragment shader, leke so: shaderMat = new BABYLON.ShaderMaterial("shader-123", scene, { vertexElement: "vertexShaderX", fragmentElement: ???, // Need to use the default shader! }, { attributes: ["position", "normal", "uv", "vUV"], uniforms: ["world", "worldView", "worldViewProjection", "view", "projection"] }); Cheers!
  8. Has anyone come up with a solution for our old friend Ocean yet? This and this look interesting, I've just got no clue how to implement in Babylon!
  9. @Arte, thanks for the input. Changing kernel size doesn't do anything to the shadow's blur though..
  10. Hi @Deltakosh, I've updated the scene to use a spotlight: https://www.babylonjs-playground.com/#T70UQK#5 Now the shadow is just gone.
  11. Thanks @Deltakosh! No self-shadows - got it. However, shadowGenerator.blurKernel doesn't do anything in this example: I've tried values ranging from 2 to 32,768 - the shadow remains unchanged.
  12. Hey @Deltakosh, here's the PG: https://www.babylonjs-playground.com/#T70UQK#1
  13. Hi, I'm having trouble with applying BlurExponentialShadowMap to a scene created in Blender. I've tried a bunch of settings and lights, yet no matter what I do, the whole bloody scene remains grey! I've tried all lights in Blender that can work with shadows in Babylon, I've set some extreme settings (kernel 4 - 512)... The blender file is attached. The settings I tried are below: shadowGenerator.useBlurExponentialShadowMap = true; shadowGenerator.useKernelBlur = true; shadowGenerator.blurKernel = Any ideas guys? test.blend.zip
  14. Who knows? With summer heat like this? People tend to do crazy things. Bad things. Horrible things... Where's my hammer?
  15. Looks like applying the following shadowGenerator.getShadowMap().refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONCE; light.autoUpdateExtends = false; in combination with shadowGenerator.useContactHardeningShadow = true; doesn't really do anything: the frame rate drop is massive and remains low. I can't vouch for other properties (e.i. shadowGenerator.usePercentageCloserFiltering) as the frame rate doesn't seem to get affected.
  16. Hi @RaananW, thanks for the heads up. I've managed to load 3.2. Here's the requirejs definition (I did keep the shim as to make sure PEP is loaded and available to Babylon first): requirejs.config({ shim: { babylonjs: { exports: "BABYLON" }, pep: { deps: ["babylonjs"] } }, paths: { babylonjs: "libs/3d/babylon/babylon", pep: "libs/3d/babylon/pep", } }); Hop this helps to whoever has problems with BJS 3.2 and AMD (requirejs). Note: I've changed babylon to babylonjs.
  17. @RaananW, it's defined in the main.js file like following: requirejs.config({ shim: { easeljs: { exports: 'createjs' }, tweenjs: { deps: ['easeljs'], exports: 'Tween' }, movieclip: { deps: ['easeljs', 'tweenjs'] }, babylon: { exports: "BABYLON" }, pep: { deps: ["babylon"] } }, paths: { createjs: 'libs/createjs-2015.11.26.min', "pdfjs-dist": "libs/pdf/pdfjs-dist", babylon: "libs/3d/babylon/babylon", pep: "libs/3d/babylon/pep", } });
  18. I raised an issue about ocean/water shader ages ago. Apparently, it's a tough bitch to crack - still no solution that I know of..
  19. requirejs(["pep", "babylon", this.settingsFile]... Worked great... until now. Babylon is a small part of the project I'm working on and is loaded via requirejs at runtime when needed.
  20. Had this problem. The solution is to play with scene.clearColor and/or scene.ambientColor. I think it's the former.
  21. Hi, I've just updated v3.0 to 3.2 and am getting this error: Uncaught ReferenceError: BABYLON is not defined. I'm using requirejs to load BJS, PEP and some other libs. Has something changed in 3.2 definitions?
  22. I presume @syed samoon is talking about game loop delta timing. Generally speaking, game loops, in their simplest form, work similar to: const _fps = 60.0; const _interval = 1000.0 / _fps; const _lastTick = performance.now(); private tick() { let now = performance.now(); requestAnimationFrame(tick); let frameTime = now - _lastTick; _lastTick = now; update(frameTime); } Where frametime/deltatime is the time spent within one tick. You can go all fancy and and split update/render methods and run update() inside a while loop : _delta += frameTime; while (_delta >= _interval) { _delta -= _interval; update(1); } Which will give you constant update (could be important for game state/physics) and render-whenever-you-can setup. But as other users have pointed out, you can use Babylon's engine.getDeltaTime()
  23. Same thing happens with VRDeviceOrientationFreeCamera, when compensateDistortion is set to true: antialiasing is just gone.
  24. Tweaked smoked a bit so it looks more like kids shouldn't play with matches: https://www.babylonjs-playground.com/#1DZUBR#31