Kesshi

Members
  • Content count

    243
  • Joined

  • Last visited

  • Days Won

    1

Kesshi last won the day on April 20 2016

Kesshi had the most liked content!

About Kesshi

  • Rank
    Advanced Member

Recent Profile Visitors

1,533 profile views
  1. Multiple Textures on same Geom

    To enable correct alpha blending you should enable "useAlphaFromDiffuseTexture" at your material. See line 25: http://www.babylonjs-playground.com/#YDO1F#28
  2. Empty screenshot

    When you create the BABYLON.Engine the option "preserveDrawingBuffer" has to be enabled. Maybe that helps.
  3. It works after calling "SG.recreateShadowMap()" https://www.babylonjs-playground.com/#HLE3IP#1
  4. Problems with debugLayer in Firefox

    I also see a small difference. (Firefox 57.0.2) With debug layer = 53 fps Without = 60 fps I get the same numbers with IE 11. In Chrome and Edge i always have 60 fps.
  5. just use "scene.meshes". Its an array of all mesehs in the scene.
  6. Uses of CreateScreenshot

    The way CreateScreenshot is working has changed internally. I think this tutorial was not updated. If you want the old behaviour, you have to use CreateScreenshotUsingRenderTarget.
  7. Please welcome the TransformNode

    I found another issue. If i don't use TransformNodes i'm able to clone a mesh with all its children but if i have a TransformNode somewhere in my hierarchy this does not work. It would be nice if i could clone everything at once. See this playground: https://playground.babylonjs.com/#JXS29U#1
  8. Please welcome the TransformNode

    I have some ideas to improve it a bit. - (this more like a bug) dispose() does not remove the TransformNode from the Scene. transformNodes array - dispose() should also dispose all the children (meshes and other transform nodes) of the current node, just like the dispose function of AbstractMesh currently its a bit complicated to dispose a whole hierarchie if Meshes and TransformNodes are mixed - there should be a getChildTransformNodes() helper just like getChildMeshes() I could work on a PR if you want.
  9. Lines with a custom width are not possible with WebGL (at least not on windows plattforms). You have to simulate it with triangles. You can have a look here: https://mattdesl.svbtle.com/drawing-lines-is-hard In my project i created a basic implementation of that technique by creating a custom BabylonJS mesh and a shader.
  10. Babylonjs 3.1 - beta phase

    I just noticed that the following types are declared in global scope inside the babylon.d.ts declare type Nullable<T> = T | null; declare type float = number; declare type double = number; declare type int = number; declare type FloatArray = number[] | Float32Array; declare type IndicesArray = number[] | Int32Array | Uint32Array | Uint16Array; Is this on purpose? I don't think that this is a good idea. Atleast the IndicesArray was declared inside the BABYLON namespace before.
  11. You did not devine the number of samples in your PG. I fixed it in line 64 here: https://www.babylonjs-playground.com/#HJI09Z#2 I used 16 samples.
  12. Multiply a Vector3 times a Quaternion

    Here are two versions of my "rotateVector3ToRef" function. basic version: export function rotateVector3ToRef(pV: BABYLON.Vector3, pRot: BABYLON.Quaternion, pResult: BABYLON.Vector3): void { //pResult = pRot * pV * conjugate(pRot) let tQuat = pRot.multiply(new BABYLON.Quaternion(pV.x, pV.y, pV.z, 0)); tQuat.multiplyInPlace(pRot.conjugate()); pResult.x = tQuat.x; pResult.y = tQuat.y; pResult.z = tQuat.z; } And a faster version based on this: http://blog.molecular-matters.com/2013/05/24/a-faster-quaternion-vector-multiplication/ This is the one i'm using in production. export function rotateVector3ToRef(pV: BABYLON.Vector3, pRot: BABYLON.Quaternion, pResult: BABYLON.Vector3): void { //t = 2 * cross(pRotation.xyz, pVector) //pResult = pVector + pRotation.w * t * cross(pRotation.xyz, t) let tx = 2 * (pRot.y * pV.z - pRot.z * pV.y); let ty = 2 * (pRot.z * pV.x - pRot.x * pV.z); let tz = 2 * (pRot.x * pV.y - pRot.y * pV.x); pResult.x = pV.x + pRot.w * tx + (pRot.y * tz - pRot.z * ty); pResult.y = pV.y + pRot.w * ty + (pRot.z * tx - pRot.x * tz); pResult.z = pV.z + pRot.w * tz + (pRot.x * ty - pRot.y * tx); }
  13. WebGL2 occlusion queries

    I can also reproduce it everytime in ff55. Background is always green and the sphere is invisible. WebGL 2 is available. It is working in Chrome on the same machine.
  14. Anti-aliasing problem

    I know that problem. Anti-aliasing is not working nicely for models with small rounded corners (depending on the lighting). The only way i know to solve this is super sampling (render with a higher resolution and then down sample the image). In this playground i added some post processes which realize 4x super sampling: https://www.babylonjs-playground.com/#2L35ZN#3 The only problem is that this may kill the perfomance on slow devices. The other option would be that you render multiple frames of your scene with slightly modified camera position (jittering) and combine the images. This only works if your scene is static and the camera is not moving. This is the solution i used in our product: https://box.pcon-solutions.com/ Here is also a ThreeJs example: https://threejs.org/examples/#webgl_postprocessing_taa
  15. inspector debug layer

    @Temechon I also have this issue. I posted an example some time ago already. See issue number 1 here: