Kesshi

Members
  • Content count

    239
  • 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,415 profile views
  1. just use "scene.meshes". Its an array of all mesehs in the scene.
  2. 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.
  3. 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
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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); }
  9. 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.
  10. 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
  11. inspector debug layer

    @Temechon I also have this issue. I posted an example some time ago already. See issue number 1 here:
  12. ok i put in on my todo list for the next days.
  13. @Deltakosh Did you had time to look at this? I could also try to create a PR if you think its ok.
  14. No. I need to be able to use different materials for each mesh.
  15. Hi, currently i have a memory issue in my app. I have a scene with many clones of some high poly meshes. So far its running fine on mobile devices but as soon as i start picking arround in the scene the memory keeps increasing until the app crashes. The reason seems to be the position array cache of the meshes. (here: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.mesh.ts#L1399 ) Each mesh holds its own instance of the position array. Even if all meshes share the same geometry. @Deltakosh I think this cache should be moved to the geometry class. This way the array could be shared between meshes. What do you think?