max123

Members
  • Content Count

    251
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Like
    max123 reacted to Deltakosh in Shadows weirdness   
    Hello! try to play with generator.bias to fight against that (it is called peter-panning :))
    Doc to read: http://doc.babylonjs.com/babylon101/shadows
  2. Like
    max123 got a reaction from Deltakosh in Custom vertex + default fragmet shader   
    ūüĎć
  3. Like
    max123 reacted to Deltakosh in Custom vertex + default fragmet shader   
    Hello,
    yes you can, just do something like:
    shaderMat = new BABYLON.ShaderMaterial("shader-123", scene, { vertexElement: "vertexShaderX", fragmentElement: "default", // Need to use the default shader! }, { attributes: ["position", "normal", "uv", "vUV"], uniforms: ["world", "worldView", "worldViewProjection", "view", "projection"] });
  4. Like
    max123 reacted to RaananW in Uncaught ReferenceError: BABYLON is not defined   
    Babylon doesnt need the shim anymore, it has a proper amd definition. it will automatically populate the global namespace as a fallback, but requiring babylonjs (using this package name) will load it properly using requirejs
  5. Like
    max123 got a reaction from Dong in waterMaterial   
    Had this problem. The solution is to play with scene.clearColor and/or scene.ambientColor. I think it's the former.
  6. Like
    max123 got a reaction from RaananW in waterMaterial   
    Had this problem. The solution is to play with scene.clearColor and/or scene.ambientColor. I think it's the former.
  7. Like
    max123 reacted to dbawel in Babylon.js vs. Three.js... Choosing a WebGL Framework for Sony   
    Hello,
    I thought to place this on the demos and projects thread, however I decided to post this here as it is more a topic for which framework to use and why. I was hired by an elite software development group at Sony Electronics to help them navigate through WebGL to build a pipeline to deliver content for the South By Southwest convention and to create a foundation to quickly develop games and online media for future projects. In short, I was tasked to escape the limitations of 2D media and help Sony move forward into 3D content taking advantage of the WebGL rendering standards. 
    This was no esay task, as I was hired Dec. 11th, and was given a hard deadline of March 5 to deliver 2 multiplayer games which were to be the focus of Sony's booth at SXSW in Austin Texas. But first I had to run a quick evaluation and convince a very proficient team of Engineers which framework was the best fit for Sony to invest considerable resources into for SXSW and which was the right coice to take them into future projects. Yhis wa a huge consideration as the WebGL framework which was to be chosen was to play a much greater role at Sony Electronics considering the group I was assigned to works well ahead of the rest of the industry... developing what most likely will be native intelligent applications on Sony devices (especially smartphones) in the near future. These are applications which benefit the consumer in making their day to day interactions simple and informative. Thus the WebGL framework to be chosen needed to be an element in displaying information as well as entertainment for a greater core technology which is developing daily in a unique tool set used by the software engineers to build applications which allows Sony to remain the leader not only in hardware technology, but in the applications which consumers want to use on Sony devices.
    But as I was working for Sony, I also had a greater task as there were existing expectations in developing a game on Sony devices which needed to be on par with what consumers already were experiencing with their Playstation consoles. As unrealistic as this might initially appear, that had to be the target as we couldn't take a step back from the quality and playability the consumer was already accustomed to.  So back to the first task... selecting the WebGL framework for Sony Electronics to use moving forward. Rather than telling a story, I'll simply outline why there was little discussion as to which framework to choose. Initially Sony requested someone with Three.js experience as is more than often the case. So when they approached me for the position, I told them I would only consider the position if they were open to other frameworks as well. They were very forthcoming to open their minds to any framework as their goal was not political in any way - as they only cared about which framework was going to provide them with the best set of tools and features to meet their needs. And one might certainly assume that since Sony Playstation is in direct competition with Microsoft Xbox, and Microsoft is now providing the resources in house to develop babylon.js, that Sony Electronics might see a PR conflict in selecting babylon.js as their WebGL development framework. However, I'm proud to say that there was never a question from anyone at Sony. I was very impressed that their only goal was to select the very best tools for the development work, and to look beyond the perceived politics and to develop the very best applications for the consumer and to fulfill their obligations to their shareholders in building tools that consumers want on their smartphones and other electronic devices.
    So once again... Three.js vs. Babylon.js. This was a very short evaluation. What it came down to was that three.js had far more libraries and extensions - however, this was not the strength of three.js since there is no cohesive development cycles with three.js and although many libraries, tools, and extensions exist, more than often they are not maintained. So it was easy to demonstrate that practically any tool or extension we would require for the SXSW production would require myself or the team updating the extension or tool to be compatible with the other tools we might use on the project. This was due to the failings of the framework since each developer who writes an extension for three.js is writing for a specific compatibility for their own project needs... and not for the overall framework... as this is not within the scope of any developer or group of developers. Thus I find that it requires weeks if not months of of maintenance in three.js prior to building content, just to ensure compatibility between all of the tools and extensions needed to use for most projects. As for babylon.js, the wheel is not generally re-invented as it is with three.js, as most extensions are quickly absorbed into a cohesive framework quickly - provided they have universal appeal - and this integration ensures compatibility as there are fewer and fewer extensions to use, but instead an integrated set of tools which are thoroughly tested and used in production revealing any incompatibilities quickly.
    The bottom line is that there are no alpha, beta, and development cycles in three.js, thus no stable releases. Whereas the opposite exists with babylon.js. There is a cohesive development of the tools, and Sony is smart enough to see beyond the politics and to realize that having Microsoft support the development of babylon.js is a huge bonus for an open source framework. And if anyone had to choose a company to support the development of a WebGL or any framework, who better than Microsoft? With practically every other useful WebGL framework in existence spawned by MIT, most all are barely useful at best. And why would anyone pay to use a limited WebGL framework such as PlayCanvas when Babylon.js is far more functional, stable, and free? This baffles me and most anyone who chooses one project using babylon.js. The only argument against babylon.js is that the development of the framework is now supported in house by Microsoft. But for myself and others, this is a positive, not a negative. I've been assured by the creators and lead developers of babylon.js that they have secured an agreement with Microsoft ensuring the framework remain open source and free. This ensures that anyone is able to contribute and review all code in the framework, and that it remains in the public domain. Sony gets this and we quickly moved forward adopting babylon.js as the WebGL framework within at least one division of Sony Electronics.
    At the end of this post I'll provide a link on youtube to a news report of not only the games we built for SXSW, but the exciting new technology on built on Sony phones which uses the phones camera to capture a hight resolution (yet optimized) 3D scan of a person's head. This is only a prototype today, but will be a native app on Sony phones in the future. So our task was not only to develop multiplayer games of 15+ players simultaneous in real-time, but to have a continuous game which adds a new player as people come through the booth and using a Sony phone, has their head scanned. This was an additional challenge, and I must say that I was very fortunate to work with a group of extremely talented software engineers. The team at Sony is the best of the best, I must say.
    All in all, it was an easy choice in choosing babylon.js for the WebGL framework at Sony Electronics in San Diego. Below is a news report from SXSW which shows the new scanning technoogy in use, as well as a brief example of one of the games on the large booth screen. And using Electron (a stand-alone version of Chromium), I was able to render 15 high resolution scanned heads, vehicles for each head, animation on each vehicle, particles on each vehicle, and many more animations, collisions, and effects without any limitations on the game - all running at approx. 40 fps. The highlight of the show was when the officers from Sony Japan came through the booth... which are the real people we work for... gave their thumbs up, as they were very happy with hat we achieved in such a short time. And these were the people who wanted to see graphics and playability comparable to what the Playstation delivered. And they approved. 
    Link:
    Thanks to babylon.js.
    DB
  8. Like
    max123 reacted to Deltakosh in Babylon.js v3.2 is out   
    It's celebration time!
    I'm so thrilled to announce that Babylon.js v3.2 is now out. Once again this could not have being possible without all of you (contributors, testers, bug hunters, doc writers)!
    Thanks folks! We have a wonderful vibrant community. So feel proud, share it, love it, use it
    Here is the release notes: http://doc.babylonjs.com/whats-new
    The blog will it the social network at 10am PST!
    And the announcement video:
     
  9. Like
    max123 reacted to Deltakosh in Aliasing in VR mode   
    compensateDistortion has to rely on postprocesses and unless you are on webgl2 we cannot enable antialiasing on them
  10. Thanks
    max123 got a reaction from Converge in Aliasing in VR mode   
    Same thing happens with VRDeviceOrientationFreeCamera, when compensateDistortion is set to true: antialiasing is just gone.
  11. Like
    max123 got a reaction from Deltakosh in Low fps even with very simple scene   
  12. Like
    max123 got a reaction from Arte in Low fps even with very simple scene   
  13. Like
    max123 got a reaction from Temechon in Three.js or Babylon.js for room design   
    You guys rock!
    @Temechon, I'll give it a go
  14. Like
    max123 got a reaction from Deltakosh in Three.js or Babylon.js for room design   
    hahaha you beat me to it, @Deltakosh!
  15. Like
    max123 reacted to Deltakosh in Three.js or Babylon.js for room design   
    I'm convinced it is not possible to satisfy everyone. But I assure you we are trying hard
  16. Like
    max123 reacted to adam in Three.js or Babylon.js for room design   
    If you could pass the function your own pickingInfo object then it could pass that to a new mesh.intersectsToRef and eliminate the creation of PickingInfo here:
    https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1817
    Like I said though, it might not be worth the trouble.
  17. Like
    max123 reacted to Deltakosh in Three.js or Babylon.js for room design   
    Ok the Ray.Transform will be fixed with next nightly
    @max123: Feel free to give us other feedback / improvements that you may have. It is the best way to improve the engine
  18. Like
    max123 reacted to adam in Three.js or Babylon.js for room design   
  19. Like
    max123 got a reaction from Art Vandelay in Three.js or Babylon.js for room design   
    As many here, I moved from Three to Babylon.
    My reasons:
    - Three feels neglected at the moment. It was hard to get things fixed. I had an issue with Blender exporter, it took Three community 6-7 months to resolve the bug. When it comes to Babylon, things get fixed PRONTO. I mean often within hours!
    - This neglect translates to maintainers of various Three importers/exporters, e.g. Collada seemed to have been broken for ages.
    - It's easier to get help for Babylon. This community is fantastic!
    - A lot of building blocks are already present in Babylon: drag/drop, scene optimisers, render loop with delta time, etc..
    Pros/Cons of both:
    - Three feels more coherent at times. When you get past the learning curve, everything (well, almost) seems to follow a set logic. I can't say the same thing about Babylon (the whole Cameras approach feels clunky).
    - Babylon is too "object orientated" for its own good   It's a good thing, generally, but I feel that sometimes levels of abstraction can get too high and long-winded. For example, I got lost at custom shaders bit. Besides, OO is NOT always the best approach where performance is important and the engine is creating/destroying thousands of objects at every tick. 
    - I don't like Babylon's presumption that it knows best what to do with CSS. It's quite a big one for me and with every release I have to go to source code and remove all CSS-related stuff: z-index, tab order, etc. as it messes up with styles already present.
     
    Overall, I think Babylon is more modern, has more features and is FAR easier to get going than Three. If I had to compare these frameworks to programming languages, I'd say Babylon is C# and Three is an early version of C++  
  20. Like
    max123 got a reaction from MehdiZagouri in How to camera go upstairs !   
    I used a ramp. 
  21. Like
    max123 got a reaction from MehdiZagouri in How to camera go upstairs !   
    I've made something like this and it's working fine for my needs. Here are the steps I took (do you geddit? steps?):
    1.
    - Create model in Blender. 
    - Define simple meshes in Blender for collisions (mostly Planes). So for your staircase you'll use a rotated plane.
    - Give a certain prefix to those Planes, e.g. "collider_". 
    - Export .babylon.
    2.
    Loop through the meshes and apply required properties to all meshes with prefix "_collider":
    public static setCollisionsByPrefix(prefix: string, scene: any): void { for (let i = 0; i < scene.meshes.length; i++) { let mesh = scene.meshes[i]; if (mesh.name.indexOf(prefix) === 0) { mesh.checkCollisions = true; mesh.visibility = 0; mesh.isPickable = false; } } } 3.
    Apply Scene/Camera settings:
    scene.gravity = new BABYLON.Vector3(0, -.5, 0); // You might want to play with the Y value. scene.collisionsEnabled = true; camera.ellipsoid = new BABYLON.Vector3(.5, 1, .5); camera.checkCollisions = true; camera.applyGravity = true;  
    You see the pink bits? These are collision meshes in my Scene.

  22. Like
    max123 got a reaction from Wingnut in How to camera go upstairs !   
    I've made something like this and it's working fine for my needs. Here are the steps I took (do you geddit? steps?):
    1.
    - Create model in Blender. 
    - Define simple meshes in Blender for collisions (mostly Planes). So for your staircase you'll use a rotated plane.
    - Give a certain prefix to those Planes, e.g. "collider_". 
    - Export .babylon.
    2.
    Loop through the meshes and apply required properties to all meshes with prefix "_collider":
    public static setCollisionsByPrefix(prefix: string, scene: any): void { for (let i = 0; i < scene.meshes.length; i++) { let mesh = scene.meshes[i]; if (mesh.name.indexOf(prefix) === 0) { mesh.checkCollisions = true; mesh.visibility = 0; mesh.isPickable = false; } } } 3.
    Apply Scene/Camera settings:
    scene.gravity = new BABYLON.Vector3(0, -.5, 0); // You might want to play with the Y value. scene.collisionsEnabled = true; camera.ellipsoid = new BABYLON.Vector3(.5, 1, .5); camera.checkCollisions = true; camera.applyGravity = true;  
    You see the pink bits? These are collision meshes in my Scene.

  23. Like
    max123 reacted to Wingnut in Gource-like visualisation in babylon   
    Hiya Nikos123!  I see admin pulled your post into one of the 4 sub-forums (Q&A).  Welcome!  heh.  Was it cold out there in top-level land?  (Wingnut - trying to be funny)
    Umm... let's start simple.  @jerome has a "thing"... here.  Some kind of network map thing... and it is "tree-like".
    Regarding the gource picture...  when you drag a node to another location, and re-connect... does the whole "tree" sort-of wobble and re-shape itself... based upon some kind of physics-like branch-forces?  (cool)
    And there's buds, and "clusters" (flowers).  It sure is pretty.  BJS can do those post-processing-effect glows, too.
    But ohhhhh... those darned branch-forking force-separated fuzzy-logic "growTree/updateTree" algorithms... ERF!   (My dog ran under the fridge when I said that.) 
    What a cool project.  It's surely a 5-brain-tumor rating... on this one. 
  24. Like
    max123 got a reaction from JCPalmer in Cordova/Phonegap and Babylon   
    OK, after a few trials and errors I managed to come up with a workflow that works(-ish):
    Global:
    1. Install cordova: 
    $[sudo] npm install -g cordova
    2. Install Xcode and Android Studio
    Project:
    1. Create project:
    $ cordova create project-folder-name com.example.myapp MyAppName
    $ cd project-folder-name
    $ cordova platform add [ios][android]
    $ cordova plugin add cordova-plugin-wkwebview-file-xhr
    The last command will replace the default Webview with WKWebview, which is much, much snappier! And the scroll is working too.
     
    The problem is, I'm still unable to launch PDFjs modules (I think there's a problem with webworkers as I'm getting an arcane error: Warning: Setting up fake worker). PDFjs doesn't work on Android either. [Edit: it works on Android, had a trailing slash in requirejs config. iOS - still no luck.]
    Another problem is BJS  on iOS: can't find/load ANY textures. Something to do with paths I presume. Works great on Android though. 
     
  25. Like
    max123 got a reaction from brianzinn in Cordova/Phonegap and Babylon   
    OK, after a few trials and errors I managed to come up with a workflow that works(-ish):
    Global:
    1. Install cordova: 
    $[sudo] npm install -g cordova
    2. Install Xcode and Android Studio
    Project:
    1. Create project:
    $ cordova create project-folder-name com.example.myapp MyAppName
    $ cd project-folder-name
    $ cordova platform add [ios][android]
    $ cordova plugin add cordova-plugin-wkwebview-file-xhr
    The last command will replace the default Webview with WKWebview, which is much, much snappier! And the scroll is working too.
     
    The problem is, I'm still unable to launch PDFjs modules (I think there's a problem with webworkers as I'm getting an arcane error: Warning: Setting up fake worker). PDFjs doesn't work on Android either. [Edit: it works on Android, had a trailing slash in requirejs config. iOS - still no luck.]
    Another problem is BJS  on iOS: can't find/load ANY textures. Something to do with paths I presume. Works great on Android though.