• Content count

  • Joined

  • Last visited

  • Days Won


Hersir last won the day on July 21

Hersir had the most liked content!

About Hersir

  • Rank
    Advanced Member
  • Birthday 08/26/1986

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
  1. Get camera view

    for now did this const leftTop = this.getScene().pick(0, 0, undefined, false, cam).pickedPoint; const leftBottom = this.getScene().pick(0, viewport.height, undefined, false, cam).pickedPoint; const rightTop = this.getScene().pick(viewport.width, 0, undefined, false, cam).pickedPoint; const rightBottom = this.getScene().pick(viewport.width, 0, undefined, false, cam).pickedPoint;
  2. Get camera view

    @Wingnut Thanks will check that, tried to go a bit different way but also stuck there const v = Vector3.Unproject( new Vector3(0 ,0 , 0), viewport.width, viewport.height, Matrix.Identity(), cam.getViewMatrix(true), cam.getProjectionMatrix(true), ); Tried to convert 2d 0,0 point to 3d in camera to get left corner but it didn't worked out well, just got centre point
  3. Get camera view

    Hi, have a question, is it possible to get coordinates in 3d space of arcRotatinCamera (width, height and leftTop corner vector) of visible area ? I need to zoom on area and than move out all not needed objects out of camera view and align mesh to topRight corner of visible area
  4. Hi, PBRMetallicRoughnessMaterial is extending PBRBaseSimpleMaterial that is extending PBRBaseMaterial. Inside PBRBaseMaterial there is protected property for lightmapTexture but its not exposed inside PBRBaseSimpleMaterial so lightmapTexture can not be used with PBRMetallicRoughnessMaterial. Is that by the design that metallic pbr doesn't have lightmapTexture ? as it is exposed only for PBRMaterial right now. Thanks
  5. Any GLSL shader in Babylonjs?

    I got error on your playground [Warning] [blocked] The page at https://www.babylonjs-playground.com/#NCY1Q#1 was not allowed to run insecure content from http://cdn.rawgit.com/RNasimiAsl/Extensions/master/ShaderBuilder/Babylonx.ShaderBuilder.js.
  6. Picking is broken on master branch ?

    @RaananW no mesh was picked in wrong place, rendered in top left corner but scene.pick found it in bottom left corner, so somehow it founds meshes in mirrored positions. (if mesh posiiton.x is lets say 50 it was picked at posiiton.x -50 ) Still trying to pinpoint the issue
  7. Hi, downloaded news dist folder from master branch and now scene.pick is broken for me: // prefix is RegEx const predicate = (currentMesh) => prefix.test(currentMesh.name) && currentMesh.isPickable; const pick = scene.pick(scene.pointerX, scene.pointerY, predicate); It finds objects but in mirror so to pick object that is lets say in top of screen are clickable in same position but bottom of screen. Works fine with newest beta version on npm. Any ideas ? I will try to dig into code as I saw that pick was changed recently.
  8. Ok will make local version till next release , thx
  9. Can it be released on npm?
  10. 3D to 2D cords

  11. 3D to 2D cords

    Hi, I use such method to convert 3d position to 2d position on the screen: return Vector3.Project( position, // my position Matrix.Identity(), scene.getTransformMatrix(), scene.activeCamera.viewport.toGlobal( scene.getEngine(), scene.getEngine().getRenderHeight(), ), ); Works fine until I set scaling for example to: this.engine.setHardwareScalingLevel(0.7); I am doing something wrong?
  12. Hi, why is getBoundingInfo() returning Nullable<BoundingInfo> as from code looks like it always returns bounding info.
  13. PBR and Light Maps

    I get it in PBRMetallicRoughnessMaterial because its exported from 3d max in this form, but I can try to make it manual with just plain PBR to compare if that helps
  14. PBR and Light Maps

    Ok weird, looks the same setup, but somehow for me it doesn't show up for objects that have PBRMetallicRoughnessMaterial, will investigate further.