• Content count

  • Joined

  • Last visited

  1. Hi, I want to take screenshot with some of the meshes disabled (disabled only in this screenshot). If I do this as in playground https://www.babylonjs-playground.com/#HLE3IP the shadow still exists. How can I remove the shadow? Thank you very much! And a belated happy new year!
  2. Weird shadow of imported mesh

    Thank you! Setting backFaceCulling to false does fix the problem. At the same time I found it's actually because the light's position is too low to cover the whole mesh... my bad. This works without changing backFaceCulling: https://www.babylonjs-playground.com/#DCU3PP#9 Thank you all!
  3. Hi, I get weird shadow for my imported mesh: https://www.babylonjs-playground.com/#DCU3PP#3 Here is a stl version: https://www.babylonjs-playground.com/#DCU3PP#2 Any ideas how to fix it? Thank you very much!
  4. Hi, ArcRotateCamera is a really greate camera. I'm wondering if it can be made around some other axes instead of world X and Y. Because I mainly work in a Z-up coordinate system, and sometimes, I need to align the viewport to an arbitrary rectangle in 3D and do some panning. Using a parent for the camera can make rotation work but seems not panning: http://www.babylonjs-playground.com/#12WBC#139 What I did was hacking the rebuildAnglesAndRadius and _getViewMatrix methods code, changing the computation of alpha, beta and target. This works for me but is too hacky. What's your suggestion? It's appreciated if there's a convenient way. Thanks @Deltakosh for responding here https://github.com/BabylonJS/Babylon.js/issues/3392#issuecomment-351732710 . Yes I did try to set the upVector to `new BABYLON.Vector3(0, 0, 1);` but it did not work. http://www.babylonjs-playground.com/#12WBC#140 To what value should I set upVector? Thank you very much!
  5. Sorry to bing this up again.. I've tried with vec3 uniform but failed: Playground: https://www.babylonjs-playground.com/#3WN9C6#3 Thank you!
  6. Hi, Playground: https://www.babylonjs-playground.com/#Y5IZCF#16 In the playground, if I use a uniform vec3, toggling scene.shadowsEnabled causes the ground to turn black. Not using uniform works. Is it a bug? Thank you very much!
  7. Thank you! So I need to set alpha < 1 to enable alpha blending. I compute final alpha according to alpha and another value, so I thought it's better to have an additional value to affect needAlphaBlending. But anyway I can indeed achieve what I want I think setting precision will be useful
  8. Hi, CreateScreenshotUsingRenderTarget gives different result from the canvas and CreateScreenshot. Playground: https://www.babylonjs-playground.com/#L2RPV8 The wireframe clone is hidden by setting layerMask, but still appears in the image created by CreateScreenshotUsingRenderTarget. CreateScreenshot works. Also, CreateScreenshotUsingRenderTarget of Babylon.js 2.5 works.
  9. Hi, I find CustomMaterial a very powerful way to write my own materials I have three questions reguarding it: 1. Is there a way to update custom uniform values after AddUniform? 2. I use Fragment_Custom_Alpha, and compute alpha according to some uniform values. Can I tell the material to enable alpha blending? 3. Can I specify "precision highp float;" for it? I notice that Fragment_Begin is defined after #include<__decl__defaultFragment> , so it's late for precision. Thank you very much!
  10. Thank you very much. I'll go with the approach and re-create the material for now. But is it a bug or by design? The doc here https://doc.babylonjs.com/tutorials/how_to_use_fresnelparameters says isEnabled can be used to activate or deactivate fresnel effect. And it works with Babylon.js 2.5.
  11. Hi, I'm trying to enable/disable fresnel when user clicks, but seems not successful. Playground: http://www.babylonjs-playground.com/#RYPRCZ Thank you very much for your help!
  12. Shadow cast by moving light

    I see.. I'll go with the radiansFromCameraForShadows solution Thank you very much!
  13. Hi, I'm trying to make a light: has fixed position relative to the viewer (camera); casts shadows. I set camera as the light's parent to achieve (1). But the shadow seems not updated as camera orbits. Playground: https://playground.babylonjs.com/#GWK0TQ Can I tell the shadow map to refresh? Thank you very much!
  14. Yes:) I'm honored. I'll do it today. Thank you, @Wingnut ! I feel very encouraged. Thank you all