Jump to content

Kesshi

Members
  • Content Count

    249
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Kesshi

  1. I would vote but i don't have a twitter account ... and i don't want one 😁 In general prefer to use the stable releases in our production builds but in case of BabylonJs from my experience even the preview releases of BabylonJs are very stable. So if i need a certain feature or a bug fix which is only available in the preview release, i also use preview releases in production builds (after some testing of course)
  2. In my application i'm doing something like this: renderTarget.renderList = []; for (var mesh of myMeshes) { if(...) { renderTarget.renderList.push(mesh); } } After updateing to BJS version 3.3 i noticed a big performance issue if i do this because i have many meshes in my scene. It seems that this commit is the problem: https://github.com/BabylonJS/Babylon.js/commit/d40a5d75b461d13b5cee893a59e1a13a85b34829#diff-88a5439ab0e1c1dad3feb18bdfbc0b8c Currently everytime you call push, all meshes of the scene will be iterated. Is this intended? It takes about 250ms to
  3. Cloning a CubeTexture (or a material using one) does not clone the rotation of the cube textue. This can be reproduced in this playground: https://playground.babylonjs.com/#WX93JP The two spheres should look identical.
  4. Earcut is no longer included in the babylon.js build. Its optional. You have to include it manually in your project. Just download the "earcut.min.js" from here https://github.com/BabylonJS/Babylon.js/tree/master/dist and add it to your project.
  5. If you have a sphere with a diameter of 10 units, you have to use an ortho value of 5 to make it exactly fit to the view. camera.orthoTop = 5; //5 units to the top camera.orthoBottom = -5; //5 units to the bottom camera.orthoLeft = -5; //5 units to the left camera.orthoRight = 5; //5 units to the right
  6. To enable correct alpha blending you should enable "useAlphaFromDiffuseTexture" at your material. See line 25: http://www.babylonjs-playground.com/#YDO1F#28
  7. When you create the BABYLON.Engine the option "preserveDrawingBuffer" has to be enabled. Maybe that helps.
  8. It works after calling "SG.recreateShadowMap()" https://www.babylonjs-playground.com/#HLE3IP#1
  9. 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.
  10. just use "scene.meshes". Its an array of all mesehs in the scene.
  11. 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.
  12. 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
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. 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-mu
  18. 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.
  19. 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 o
  20. @Temechon I also have this issue. I posted an example some time ago already. See issue number 1 here:
  21. ok i put in on my todo list for the next days.
  22. @Deltakosh Did you had time to look at this? I could also try to create a PR if you think its ok.
  23. No. I need to be able to use different materials for each mesh.
  24. 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 wa
×
×
  • Create New...