KevinBLT

Members
  • Content Count

    77
  • Joined

  • Last visited

About KevinBLT

  • Rank
    Advanced Member
  • Birthday 05/06/1994

Profile Information

  • Gender
    Male
  • Location
    Germany / Kassel

Recent Profile Visitors

1104 profile views
  1. Hello, I don't know if this is something that could be merged into github but we had some projects (and therefore customers) that were highly loaded with objects, thus a bit slow in rendering. The camera inertia was then to long lasting to control the camera if you know what I mean. This is what I've changed to handle this: // Inertia var engineDelta = Math.min(this.getEngine().deltaTime,100), inertiaFactor = Math.min(1,16.66666 / engineDelta); if (this.inertialAlphaOffset !== 0 || this.inertialBetaOffset !== 0 || this.inertialRadiusOffset !== 0) { this.alpha += (this.beta <= 0 ? -this.inertialAlphaOffset : this.inertialAlphaOffset) / inertiaFactor; this.beta += this.inertialBetaOffset / inertiaFactor; this.radius -= this.inertialRadiusOffset / inertiaFactor; this.inertialAlphaOffset *= this.inertia * inertiaFactor; this.inertialBetaOffset *= this.inertia * inertiaFactor; this.inertialRadiusOffset *= this.inertia * inertiaFactor; if (Math.abs(this.inertialAlphaOffset) < BABYLON.Engine.Epsilon) this.inertialAlphaOffset = 0; if (Math.abs(this.inertialBetaOffset) < BABYLON.Engine.Epsilon) this.inertialBetaOffset = 0; if (Math.abs(this.inertialRadiusOffset) < BABYLON.Engine.Epsilon) this.inertialRadiusOffset = 0; } // Panning inertia if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) { if (!this._localDirection) { this._localDirection = BABYLON.Vector3.Zero(); this._transformedDirection = BABYLON.Vector3.Zero(); } this.inertialPanningX *= this.inertia * inertiaFactor; this.inertialPanningY *= this.inertia * inertiaFactor; if (Math.abs(this.inertialPanningX) < BABYLON.Engine.Epsilon) this.inertialPanningX = 0; if (Math.abs(this.inertialPanningY) < BABYLON.Engine.Epsilon) this.inertialPanningY = 0; this._localDirection.copyFromFloats(this.inertialPanningX / inertiaFactor, this.inertialPanningY / inertiaFactor, 0); this._viewMatrix.invertToRef(this._cameraTransformMatrix); BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection); this.target.addInPlace(this._transformedDirection); } It rotates by the given inertia amount depending on the time that proceeded during the renderings. The var engineDelta = Math.min(this.getEngine().deltaTime,100) is to avoid big camera jumps on frames that last longer than 100ms. In our project the render loop doesn't run continuesly. If someone likes to test this and/or push it into babylon I would be glad to have contributed a small thing :-) If not it's also completely okay as it's only needed in our project(s)! ;-) Best regards Kevin
  2. Has this been fixed? :-) I didn't find it in the change log.
  3. Ah that's why the ghost shadows will stay in my case. Becaue the shadow map doesn't get updated very often. So, good to know. For now I will have to remove them manually. Thanks and keep us on track.
  4. Hello, is it the correct behaviour that instances that are being disposed doesn't get removed from ShadowGenerator.getShadowMap().renderList ? I have the refreshrate set to 0 and only render with shadow on demand. if (_renderShadow && this._manuallyShadowRender) { this._shadowGenerator.getShadowMap().refreshRate = 1; this._scene.render(); this._shadowGenerator.getShadowMap().refreshRate = 0; } else { this._scene.render(); } Is this a problem i this case? I just want to know (maybe it's a bug). Shouldn't ShadowGenerator check the Mesh.isDisposed attribute? Have a nice day Kevin
  5. Thank you. I didn't find this in the documentation
  6. Hey, just a small question. What am I doing wrong, that text is not filled in my case? var text2D_X = new BABYLON.WorldSpaceCanvas2D(scene, new BABYLON.Size(sizeTX, 12), { id: "Measure - " + sizeX, worldPosition: new BABYLON.Vector3(0, 0, BB.minimumWorld.z - 6), worldRotation: BABYLON.Quaternion.RotationYawPitchRoll(0,Math.PI/2,0), enableInteraction: true, children: [ new BABYLON.Text2D(checkRound(sizeX).toString() + "cm", { fontName : "6pt Arial", marginAlignment : "h: center, v: bottom", fontSuperSample : true, }), ] }); Thanks
  7. This is fantastic! Can I use this with the current Babylon version? I don't understand these exactly: renderTarget.onBeforeRender = function () { for (var index = 0; index < renderTarget.renderList.length; index++) { renderTarget.renderList[index]._savedMaterial = renderTarget.renderList[index].material; renderTarget.renderList[index].material = renderTarget.renderList[index].helperMaterial; } } renderTarget.onAfterRender = function () { for (var index = 0; index < renderTarget.renderList.length; index++) { renderTarget.renderList[index].material = renderTarget.renderList[index]._savedMaterial; } } Why do you have to do something with private members ? Or is this just a temporary workaround? Also, would it be possible to keep the lines the same thickness independet from the camera distance? You're really a shader god!
  8. I know. However, how would I start an implementation? Do I absolutely need TypeScript? To do a contribution? And also another question: Wouldn't the edgedetection be possible via shader?
  9. Hello everyone, I would like to know if it was possible to do the work of "Edges Renderer" in a worker thread? It's working really well for our projects but for some objects it can take really a lot of time in which the scene is completely stopping to respond. Any suggests?
  10. So someony already had this pain in his ass? And this "openjscad csg" is more like an updated version of the current one used in BabylonJS?
  11. You saved me from a lot of pain, thanks!
  12. Ah... this doc was exactly what I needed. I love you all! And Babylon of course!
  13. Has this problem been solved? I also need dynamic texture with transparent background.
  14. Hello, after using csg there are two edge lines that shouldn't be there I think. http://www.babylonjs-playground.com/#1MH4BF Can this be corrected somehow? Thanks!
  15. This works for me! I think I will have to do a csg union for all meshes at first to get every correct edge. Thanks. With this parameter it's working