ziguri

Members
  • Content count

    25
  • Joined

  • Last visited

  1. Please find my webpack.production.config.js and my package.json attached. webpack.production.config.js package.json
  2. Hi @RaananW I do have the following packages installed "dependencies": { "babylonjs": "^3.2.0-rc.1", "babylonjs-gui": "^3.2.0-rc.1", "babylonjs-loaders": "^3.2.0-rc.1", "handjs": "^1.3.11" }, If i try to show the debugLayer with scene.debugLayer.show() i do get several errors: (this is just an excerpt of my errors) As described above - adding the following lines solved my issue: declare var window: { [key:string]: any; prototype: Window; new(): Window; } window['BABYLON'] = BABYLON; Tell me if you need further information.
  3. Is this issue probably back in the current version babylonjs 3.2.0-rc.1?
  4. Hey wingnut, it's true i was not able to find the Billboard function. That's why i tried to implement it by myself. A tutorial would be great - a small official Playground Example even better. I was looking for: - React on camera rotation / movement - Mesh facing camera - mesh rotation matrix camera.onViewMatrixChangedObservable did help me. A hint from this observale to billboard would be great too. Thanks for your work and effort!
  5. @Gijs, you are totally right. This completely solves my issue. I didn't know that the billboard mode exists at all. Thank you. Appreciated. Issue solved!
  6. Hi there, i do react on a camera change using camera.onViewMatrixChangedObservable Then i watch camera.alpha and camera.beta values and calculate their difference (considering modulo 2*PI) to the previous invocation of camera.onViewMatrixChangedObservable. Lets call it cam_alpha_diff. Using this alpha and beta values I am able to rotate a submesh (a BABYLON.Mesh.CreatePlane mesh located in the WorldMatrix origin) of my scene with mesh.rotate(AXIS, cam_alpha_diff) This works fine as long as i just wanna rotate the submesh around one axis. For instance only around the BABYLON.Axis.Y with the negative cam_alpha_diff. If i wanna rotate the submesh in both alpha and beta direction i can not use the BABYLON.Axis.Y and BABYLON.Axis.X as rotating axis anymore. (except for the first camera movement). I kind of need to re-calcutate the rotation axis after each change of the camera. My approach: Initialize a vector3 as BABYLON.Axis.Y Rotate the vector3 with the negative cam_alpha_diff using BABYLON.Matrix.RotationAxis and BABYLON.Vector3.TransformCoordinates Use the resulting vector3 as new rotation axis Do the same with another vector3 for BABYLON.Axis.X But if i do it for both alpha and beta is kind of "going round in circles". Whats the best way to apply both alpha and beta camera rotations to a submesh? Any hints? My final goal is that the submesh always faces the camera no matter how i rotate the camera (an ArcRotateCamera). Thanks.
  7. Hey @Deltakosh Thanks for implementing the camera.onViewMatrixChangedObservable. That's exactly what i was looking for. Issue solved.
  8. Hi, 1) Is there a way to react on a position/rotation change of the camera? 2) How do i get the position and or the rotation of the camera? What i wanna do: I wanna change the position and/or rotation of another mesh in the scene every time the camera is changed. The rotation of the other mesh is depended of the camera rotation. Thx in advance
  9. Hi there, I do have a bunch of data measurements loaded as mesh. The following example represents one measurement: https://www.babylonjs-playground.com/#XG8RH3#7 What I wanna do now is perform a kind of morphing between one measurement mesh and its consecutive measurement mesh. I wanna create a kind of timeline from the first to the last measurement with morphing transitions. I found: https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh Do you guys think it is possible to apply it to my meshes? I think I face a few issues here: - The amount of vertices is not exactly the same in every measurement. - Is there a maximum amount of vertices (e.g. 60.000) morphing can deal with? Do you think morphing is still possible or do you have any other ideas how I could smoothly create a transition between the meshes? Looking forward to your answer.
  10. I do have only ONE big mesh imported to BabylonJS. I need to visually highlight a small part (let us call it HotSpot) of the big mesh. What I did so far: Extracted all the positions via getVerticesData Collected the vertices Filtered only vertices of interest (HotSpot) So I ended up in an array vertexMapHS comprising all the HotSpot vertices. Now I need to either highlight using a HighlightLayer or apply a different color all the vertices in vertexMapHS. Does anybody have a hint how to do that? Here is the playground of what I have got so far: https://www.babylonjs-playground.com/#XG8RH3#7 Thx in advance
  11. I just want to send you a brief thx for all the hints. We are on the right track and think BabylonJS will be the right framework to work within our environment. I will keep you updated how we solve this issue. Thx to all!
  12. Thx again. Ok - I think I got the main problem. Does babylonJS provide a function to efficiently reduce the vertices by merging? We receive the data from a laser scanner in a real environment in a resolution we cant change. Our task is to automatically process the data and present it on a pc and and mobile. Zooming in to specific areas of the mesh is important for our customer - so there should be details available on mobile too (at least in interesting areas). Since we need to automatically (without human interaction) process the data the "workaround" using Blender (i already tried it) is not the best solution for our specific problem. Does someone have a hint for an automatic / code based vertex reduction? Otherwise we have to write it by ourself...
  13. @Deltakosh thx for the fast reply. Ok - how does babylonJS subdivide the mesh? Horizontally, vertically, ...? So you think - subdividing does not improve the FPS on mobile since we see all the vertices at once? Did I understand you right? We tried the same STL using Unity on a mobile with FPS up to 60. So they probably have another trick. Do you think any of the optimization techniques explained on the BabylonJS HowTo (http://doc.babylonjs.com/how_to) would help? Or is reducing the vertices the only thing that helps on mobile? Whats the amount of vertices/triangles per scene usually lead to a FPS > 50 on mobile based on your experience? One important side note - interaction (zoom, rotate) is important to include. Thx in advance
  14. Hi, I do have a mesh with a huge amount of vertices (Meshlab say 1800000 vertices, after unifying duplicates still 304000 vertices). Its stored in an STL File. I import it as a mesh as shown in the example below It's doing well on a PC with FPS of almost 60fps. But using mobile devices I end up with 10-20 FPS. So, I am looking for an optimization solution. I read all the HowTo on your Web page. Since its only one model - instancing or cloning does not help. I thought about using LOD or Auto LOD. But trying that the framerate totally drops. See here (lines 43-45) https://www.babylonjs-playground.com/#XG8RH3#1 From Unity I know that they split or slice models with lots of vertices in slices of max 16k vertices. Is there a way in BabylonJS to split huge meshes into slices of sub-meshes to improve FPS performance? Another idea is to keep the amount of vertices/triangles for the main areas of the model and decrease it for others. Do you support such a feature? What would you suggest to improve the performance while keeping the information? I know its a trade-off. Thx for your hints. See you
  15. @RaananW Thx for your 2 cents. I just tried to use ImportMesh. It's much faster in terms of FPS on mobile devices - but it does not look as accurate as the STL File. Is there a way to let the imported mesh look like the imported STL? Is there a way to increase the number of triangles in the mesh to increase accuracy