HoloLite

Members
  • Content Count

    221
  • Joined

  • Last visited

Everything posted by HoloLite

  1. This issue exists on steamvr/winmr environment. (Steamvr running over winmr). To create the env: - Use windows mixed reality - Install SteamVR and WinMR for Steamvr - On the chrome browser, enable the following via chrome://flags - WebVR - Gamepad Extension - OpenVR hardware Support To repro the issue, you can use any babylonjs webvr page that enables the controllers. WinMR controllers are just not showing up. I guess this could be an issue with my configs, or chrome itself or remote possibility: babylonjs. Let me know if you have a workaround or solution to this. Chrome has so far the best performing webvr browser, easily reaches 90 fps for my test webvr apps, while Edge is only about half of the perf. Just too bad I can't have the winmr controllers showing up.
  2. A few updates on the perf issue: - I optimized the texture such that texture collision is down to 0. But much to my surprise, the draw call# does not change, thus the fps stays the same too. This looks unexpected to me as I thought texture collision would lead to draw calls, right ?? But it is what it is, at least in my app. - After profiling the perf, it turned out the calls to intersectsTriangle spent most of the time. First suspect was the teleport, and disabling it actually improved the fps by almost twice! (what a surprise) Whew! did not know teleport can take that much processing. The scene does have lots of vertices though (over 1.2 millions). Now I have to think about how to enable teleport only when the user intends to and disable it automatically after every use. Not sure if this is possible but will investigate.
  3. In a test scene that I am working on, it has high draw calls (some 300's) and it seems like every mesh contributes to one draw call. As a quick test, if I set n # of meshes to be unvisible, then this will pretty much reduce the draw calls by n. Are there any tips to tell bjs to batch the draw calls ? Perhaps rearranging certain attributes inside the mesh might help ? Thanks
  4. Agreed 110% This package was last updated 2 years ago, but is still being downloaded and used, I am sure many people had the same issue like mine. And it also does not have ts definition. So all the more reason to support it.
  5. Just found this: https://www.npmjs.com/package/babylon-atlas @fenomas this one looks like the answer to my prayer, right ?
  6. I read the doc. As far as I understand it, the use of texture atlas is available only when the mesh is created via the MeshBuilder method. The uv mapping info are passed to the options param of the CreateBox (or other CreateXxx) methods. Does this mean once a mesh has been created, it's too late to reassign its material to use texture atlas ? Are there other methods to use texture atlas in bjs ? thanks
  7. Doh, this is what happens when you don't search properly before posting. Now reading https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors
  8. For reducing the # of draw calls due to high # of textures in the scene, texture atlas (combining several textures into a single file) seems like a good solution. (https://en.wikipedia.org/wiki/Texture_atlas) It does come with an index file which tells you the position of each texture in the master file. I haven't done this myself, but wonder how this thing is supported in babylonjs. I checked the bjs docs around texture but can't find anything related to texture atlas or packing. Also if a 3dsMax project uses texture atlas, will the max->Babylon exporter work too ? Thanks.
  9. The last question on texture atlas is kinda buried deep in this thread. I will post new thread on this.
  10. You need to git clone this project https://github.com/BabylonJS/Exporters.git Or you can just pull the unity package: https://github.com/BabylonJS/Exporters/blob/master/Unity 5/EditorToolkit/Redist/Asset Store-5.x/BabylonJS/BabylonJS Editor Toolkit.unitypackage Just install the unity package from Unity. It's pretty straight forward. Let me know if you still have problems.
  11. @Deltakosh There are lots of dup materials in the scene which share the same textures. I did optimize the number of dup material and texture objects in the scene by around 100 each, and got no improvement in the draw calls and fps. (This is exactly as you said). The scene does have lots of materials. Some people recommend combining the materials/textures into a single file, a technique called Texture Atlas. This is supposed to reduce the # of draw calls. Texture atlas has an xml/index file which tells you where each texture is located in the master texture file. That said, would babylonjs be able to work with texture atlas file ? Will the max exporter be able to export it?
  12. Confirmed everything worked in beta.4. Thanks for the fix! Seems like my apps run at a noticeably higher fps in this build. Any perf improvement in this build ? Are there changes/release notes for each build ? Btw, I don't use earcut. Is this something bjs uses ?
  13. So I redid the steps again and apparently copying the .d.ts are not sufficient to test the runtime. I guess this is obvious. So after copying the needed .js and .ts files for babylonjs, loader and the gltf2interface npm packages, the app runs fine, no error. I still got the warning messages when building, I guess I can ignore this. If you are curious here are the warning: > vk-template@1.0.0 build D:\dev\projects\webapps\hololite.github.io\src\VkTemplate > ng build --prod --base-href "/VkTemplate/" Date: 2018-03-29T20:55:52.738Z Hash: 6f566eeaa016171e2154 Time: 96063ms chunk {0} polyfills.a160e45de3d43a03f025.bundle.js (polyfills) 59.4 kB [initial] [rendered] chunk {1} main.88dffbbcedaf9281f96c.bundle.js (main) 2.86 MB [initial] [rendered] chunk {2} styles.9c0ad738f18adc3d19ed.bundle.css (styles) 79 bytes [initial] [rendered] chunk {3} inline.9d99a65b48a46253e07d.bundle.js (inline) 1.45 kB [entry] [rendered] WARNING in ./node_modules/babylonjs/babylon.js Module not found: Error: Can't resolve 'earcut' in 'D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs' resolve 'earcut' in 'D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs' Parsed request is a module using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs\package.json (relative path: .) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs\package.json (relative path: .) resolve as module D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs\node_modules doesn't exist or is not a directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\node_modules doesn't exist or is not a directory D:\dev\projects\webapps\hololite.github.io\src\node_modules doesn't exist or is not a directory D:\dev\projects\webapps\hololite.github.io\node_modules doesn't exist or is not a directory D:\dev\projects\webapps\node_modules doesn't exist or is not a directory D:\dev\projects\node_modules doesn't exist or is not a directory D:\dev\node_modules doesn't exist or is not a directory D:\node_modules doesn't exist or is not a directory looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut doesn't exist looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./node_modules/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut doesn't exist looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist looking for modules in D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) Field 'browser' doesn't contain a valid alias configuration after using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp) using description file: D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\package.json (relative path: ./ClientApp/earcut) no extension Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js doesn't exist as directory D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut doesn't exist [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\babylonjs\node_modules] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\node_modules] [D:\dev\projects\webapps\hololite.github.io\src\node_modules] [D:\dev\projects\webapps\hololite.github.io\node_modules] [D:\dev\projects\webapps\node_modules] [D:\dev\projects\node_modules] [D:\dev\node_modules] [D:\node_modules] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\node_modules\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.ts] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut.js] [D:\dev\projects\webapps\hololite.github.io\src\VkTemplate\ClientApp\earcut] @ ./node_modules/babylonjs/babylon.js 17:17-34 @ ./ClientApp/app/Basic/BasicMaterials.ts @ ./ClientApp/app/PlaygroundDirector.ts @ ./ClientApp/app/PlaygroundApp.ts @ ./ClientApp/app/app.component.ts @ ./ClientApp/app/app.module.ngfactory.js @ ./ClientApp/main.ts @ multi ./ClientApp/main.ts
  14. Ok so here is what I do: 1. npm install the beta.3 2. copied over some of the latest .d.ts files onto my local node_modules folder. Initially I got more errors than before, then I decided to copy only the babylonjs.loaders.module.d.ts, and this builds fine with some warning though. During runtime, I do got lots of errors. I guess this is due to my out-of-sync package state. I guess I did not copy the right set of def files ? But as far as proving that the build break has been fixed, is this sufficient ?
  15. Sorry too much stuff to take care yesterday. Just got up this morning. Will be on my way to the office to work on this. If you don't mind, go ahead push the fix you made. I trust your fix is good as always in the past. It will take me about 2 or 3 hrs from now to test the changes if you have to wait.
  16. @Deltakosh what I was thinking was that the exporter actually keeps track the hash of each texture file content. Thus it knows whether the a texture is a dup or not, based on the hash. It then can simply ignore the dup texture and share the one it already has in its catalog. The user does not need to worry if he is applying dup textures all of the place, the exporter eliminates the dup for you. Isn't this possible ?
  17. Yes I was thinking the same thing. The textures optimization can be done in the exporter. Since I am not too familiar with the exporter codes, this is currently not the path I am thinking to take.
  18. Thanks @V!nc3r and @Deltakosh for the replies! Those are really good suggestions which I will look into. A few questions I have: The scene was actually built by the max exporter, I had little control over it. You are actually right that many similar textures are being used in the scene, they can be shared actually, but the exporter is not doing this optimization. I guess I need to manually optimize the loaded meshes/textures in the scene and save them back into .Babylon format ? Do we have some kind of scene editor that can be used for this type of purpose ? Which profiler are you referring here ? I've never done web profiling before, any suggestions on the tools ?
  19. @RaananW thanks for looking into this. Angular actually uses webpack for loading modules stuff, so I am afraid this issue will appear on other webpack-based builds (?) I confirmed this issue started to happen since beta.2. My build worked fine on previous bjs npm packages including beta.1. I will try the PR you mentioned above, I just simply copy over the definition files right ?
  20. I am hitting into this weird problem on a scene which I imported from a 3ds max project into .Babylon format. The scene is quite static, it just has lots of static meshes. Nothing moving at all. No animations. I am viewing the scene in vr mode, and looking at the stats panel, a few stat info looks rather abnormal: - meshes count: 235 (this is ok, given there is lot of static meshes in the scene) - draw calls: 332 (this seems too high) - texture collisions: 130 (this also seems too high) (Note: the draw calls and texture collisions rates double up as soon as I enter vr mode, this itself is normal I guess) What caused the high draw calls ? What is texture collision ? why is it so high ? As I mentioned the scene has no moving/animations stuff. It looks very static. If you have tips on how to improve this, please let me know. Thanks
  21. Here is my settings on package.json related to bjs: I am using npm version 5.6.0. So I made sure the gltf2interface package is actually installed. "dependencies": { "babylonjs": "3.2.0-beta.3", "babylonjs-gui": "3.2.0-beta.3", "babylonjs-inspector": "3.2.0-beta.3", "babylonjs-loaders": "3.2.0-beta.3", "babylonjs-materials": "3.2.0-beta.3", "babylonjs-post-process": "3.2.0-beta.3", "babylonjs-serializers": "3.2.0-beta.3", "babylonjs-gltf2interface": "3.2.0-beta.3", "babylonjs-procedural-textures": "3.2.0-beta.3", The top of my .ts file looks like the following: import 'babylonjs' import 'babylonjs-gltf2interface' import 'babylonjs-loaders' When compiling, I am getting the following.(The build was done via angular cli) Note that things were building fine in beta.1. I did not try beta.2. Date: 2018-03-27T18:35:07.808Z Hash: 3686eed3bb451661e5f1 Time: 4884ms chunk {0} styles.0744b9f6769c326ccd7f.bundle.css (styles) 0 bytes [initial] [rendered] chunk {1} polyfills.addd7ef0ff7c1f7ee875.bundle.js (polyfills) 84 bytes [initial] [rendered] chunk {2} main.347f8286efa7b916720e.bundle.js (main) 86 bytes [initial] [rendered] chunk {3} inline.318b50c57b4eba3d437b.bundle.js (inline) 796 bytes [entry] [rendered] ERROR in node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(854,39): error TS2304: Cannot find name 'IAccessor'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(857,47): error TS2304: Cannot find name 'IAnimationChannel'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(861,24): error TS2304: Cannot find name 'AnimationSamplerInterpolation'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(864,47): error TS2304: Cannot find name 'IAnimationSampler'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(867,40): error TS2304: Cannot find name 'IAnimation'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(872,37): error TS2304: Cannot find name 'IBuffer'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(875,41): error TS2304: Cannot find name 'IBufferView'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(878,37): error TS2304: Cannot find name 'ICamera'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(880,36): error TS2304: Cannot find name 'IImage'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(883,39): error TS2304: Cannot find name 'IMaterial'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(892,35): error TS2304: Cannot find name 'IMesh'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(895,44): error TS2304: Cannot find name 'IMeshPrimitive'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(897,35): error TS2304: Cannot find name 'INode'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(910,38): error TS2304: Cannot find name 'ISampler'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(913,36): error TS2304: Cannot find name 'IScene'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(915,35): error TS2304: Cannot find name 'ISkin'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(919,38): error TS2304: Cannot find name 'ITexture'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(921,35): error TS2304: Cannot find name 'IGLTF'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(1022,57): error TS2304: Cannot find name 'ITextureInfo'. node_modules/babylonjs-loaders/babylonjs.loaders.module.d.ts(1059,93): error TS2304: Cannot find name 'IProperty'.
  22. Fyi, I am getting the same errors too in beta.3. The import "babylonjs-gltf2interface" approach does not work for me. Checking the local node_modules dir, I don't see the "babylonjs-gltf2interface" module there.
  23. This is very cool feature. Lots of good stuff going into 3.2 release.
  24. Thanks for the response. That is too bad. A lot of really cool looking scene are using vray and we can't export it for bjs project.
  25. Can the max exporter export max project which uses vray ? If it does not, will it simply abort the entire export or gracefully downgrade to something else ? I checked the exporter doc, it did not seem to mention anything about vray. thank you.