Hersir

Members
  • Content Count

    324
  • Joined

  • Last visited

  • Days Won

    1

Hersir last won the day on July 21 2017

Hersir had the most liked content!

About Hersir

  • Rank
    Advanced Member
  • Birthday 08/26/1986

Contact Methods

  • Website URL
    http://hersir88.github.io
  • Twitter
    hansagames

Profile Information

  • Gender
    Male
  • Location
    Riga

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I use TransformNode as parent for my meshes and would like to add all children to ShadowGenerator, like this `addShadowCaster(node, true)` but it accepts just AbstractMesh as input there, what about changing type to TransformNode ? Like this: public addShadowCaster(mesh: TransformNode, includeDescendants = true): ShadowGenerator { if (!this._shadowMap) { return this; } if (!this._shadowMap.renderList) { this._shadowMap.renderList = []; } // Need to check if is real mesh if (mesh instanceof AbstractMesh) { this._shadowMap.renderList.push(mesh); } if (includeDescendants) { this._shadowMap.renderList.push(...mesh.getChildMeshes()); } return this; } for `removeShadowCaster` similar public removeShadowCaster(mesh: TransformNode, includeDescendants = true): ShadowGenerator { if (!this._shadowMap || !this._shadowMap.renderList) { return this; } // check if real mesh if (mesh instanceof AbstractMesh) { var index = this._shadowMap.renderList.indexOf(mesh); if (index !== -1) { this._shadowMap.renderList.splice(index, 1); } } if (includeDescendants) { // use getChildMeshes instead of getChildren to support nested TransformNodes for (var child of mesh.getChildMeshes(true)) { this.removeShadowCaster(<any>child); } } return this; } Any objections on this ? I haven't tested / profiled change impact so its just an idea now Would like to hear feedback, as maybe I am missing something here
  2. Hersir

    mesh rendered black on android models

    @waverider Would be nice to get GPU, OS, browser versions, but this is android gpu `features` Try this: force webgl 1 if webgl 2 is used remove shadows if used change light types, try to use just 1 type and 1 light to see if that cuases it try different materials remove env map if used I have worked with such issues a lot, and most of time found comp that causes this, but at the end its usually weak, bugy gpu driver or OS, as sometimes same device works well with minor os downgrade / upgrade. I usually try to reproduce bug in playground with min setup to have better understanding what causes it.
  3. Hersir

    Debug layer is not opening

    @RaananW sorry wrong wording from my side, I meant that import "babylonjs-gui"; import "babylonjs-loaders"; import "babylonjs-serializers"; dont have any errors if included, but import "babylonjs-inspector"; still have bind error as before I also tried rc4 but have same issue, and `babylonjs-serializers` is still missing if inspector is installed from npm. I would bet on webpack version differences ,as cold be that dependency bundling was changed from wp3 to wp4.
  4. Hersir

    Debug layer is not opening

    @RaananW You mean like this ? import "babylonjs-gui"; import "babylonjs-loaders"; import "babylonjs-serializers"; if yes than worked fine, launched without error
  5. Hersir

    Debug layer is not opening

    Hi @RaananW so all in order System: macOS High Sierra 10.13.6 Browser: Chrome 69.0.3497.100, Safari 12.0, Firefox 62.0 Webpack: 3.12.0 Babylonjs: 3.3.0.-rc.1 Inspector: 3.3.0.-rc.1 Tried: import { Inspector } from "babylonjs-inspector"; new Inspector´╗┐(this._scene, false, 0, null´╗┐);´╗┐ and import "babylonjs-inspector"; scene.debugLayer.show(); both produce same bind error at start of load, dont even get to new Inspector or show: Uncaught TypeError: Cannot read property 'bind' of undefined at universalModuleDefinition:1 at universalModuleDefinition:1 at webpackJsonp.2525 (universalModuleDefinition:1) at Object.2525 (universalModuleDefinition:1) at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54) at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54) at __webpack_require__ (bootstrap 5313bedd0a39528998e1:54) Without import, just using show: File https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js is loaded successfully, but global INSPECTOR is still undefined when it tries to show, because of bind error before. Can give more info if needed
  6. Hersir

    Debug layer is not opening

    Tried to use npm version of inspector but there is same error about bind. Off topic npm inspector package is missing dependencies, (babylonjs-gui, babylonjs-loaders, babylonjs-serializers), would be nice to add it in package.json of inspector so they are auto installed, as it doesn't work without them.
  7. Hersir

    Debug layer is not opening

    Looks like inspector script is loaded, but global INSPECTOR is still undefined, could be related to fact that I use, webpack 3, but inspector is bundled with webpack 4
  8. Hersir

    Debug layer is not opening

    Hi, tried to open inspector by: this.getScene().debugLayer.show(); but that produces following errors: bootstrap:129 Uncaught TypeError: Cannot read property 'bind' of undefined at bootstrap:129 at bootstrap:137 at universalModuleDefinition:9 at universalModuleDefinition:1 Uncaught TypeError: Cannot read property 'Inspector' of undefined at t.webpackJsonp.1921.t._createInspector (babylon.js:1) at HTMLScriptElement.n.onload (babylon.js:1) I am using babylonjs rc-1, and webpack for packing. I am missing some new configs ?, as it used to work 2-3 versions ago could be related to this ? Thank you
  9. Hersir

    removeShadowCaster null exception

    this is introduced in beta 6 version, also if mesh.getChildren() can return undefined from now would be nice to show that in the return type
  10. Hi, found case that can trigger null pointer for removeShadowCaster, (possibly addShadowCaster as well). As includeDescendants is true by default it tries to remove shadow from children as well, but _children array can be null. if (includeDescendants) { // mesh.getChildren() can be null for (var child of mesh.getChildren()) { this.removeShadowCaster(<any>child); } } So one version is to make check before: var children = mesh.getChildren(); if (includeDescendants && children) { for (var child of children) { this.removeShadowCaster(<any>child); } } Same issue is on addShadowCaster as it tries to push children in the list
  11. @Deltakosh Ok, managed to narrow down, issue in not with light directly but only if shadow generator with usePoissonSampling = true is used. const light = new SpotLight( "light", new Vector3(-110, 200, 30), new Vector3(0.2, -1, -0.2), Math.PI / 4, 2, scene, ); const shadowGenerator = new ShadowGenerator(1024, light); // this line causes issue with extreme specularity shadowGenerator.usePoissonSampling = true; shadowGenerator.setDarkness(0); shadowGenerator.blurScale = 0.4; will check what happens with it on shader
  12. @Deltakosh no just in mali card on this android
  13. Hi, have issue on Samsung Galaxy 6s phone chrome browser with android 7.0 and webgl 2.0 (works good on webgl 1.0). I have spotlight above mesh and looks like intensity of it is too high, as mesh is almost white (especially if camera is looking on it down from top). Mesh have PBRMetal material, trying to debug shader code, so maybe anyone have any clues what to check first ? Thanks for any input