Popular Content

Showing content with the highest reputation since 05/05/14 in all areas

  1. 25 points

    Babylon.js 3.1 is available!!!

    Dear beloved community, I'm thrilled to announce that Babylon.js v3.1 is available. For this special occasion, we created a cool announcement video: I will blog on dev.windows.com later today but I wanted to share with you beforehand The list of features is (as always) really great and we can all be really proud of such an achievement! We also shipped several WebVR demos: And do not miss our hero demos: Congrats team!!!
  2. 25 points

    Phaser Isometric plugin

    I've spent the last week or so putting together a fairly comprehensive plug-in for Phaser in the form of an isometric (axonometric and dimetric to be precise) renderer for Phaser. Not wanting to stop there, I decided to go the whole hog and port over Phaser.Physics.Arcade to the new renderer by adding in an extra dimension. You can get the plug-in here: http://rotates.org/phaser/iso/ - the page also contains a working example so feel free to view the source to get a feel for how it works. I'll be creating several more examples in the coming days and weeks, as well as improving the plug-in, fixing bugs and so on. As of yet, I am undecided as to whether to embark on trying to create an isometric equivalent to TileMap (with Tiled importer) but if there's enough interest I may see what I can do. Enjoy, and I'm looking forward to seeing what you do with it!
  3. 24 points
    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
  4. 24 points

    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:
  5. 22 points
    Hello everybody, As you surely noticed it, the old debug layer has been reworked in something bigger... called the "inspector". This tool has the goal to become the 'F12 tool' of our beloved engine, without replacing the official editor. It's dedicated to HELP the developer by providing some debug features. You will find almost every feature from the debug layer, and much more: display shaders code, display textures used on materials, check stats, enable lights... All properties are refreshed almost in real time (actually every 200ms for performances reasons). AND you can update any value (among strings, numbers and booleans) by clicking on it and pressing 'enter'. Sure, there is still work to do and bugs to fix. But in the current state, we decided that it is already more useful than the debug layer was. I'm still working hard on it, don't worry ! You can also help me a lot by reporting every kind of bugs in this thread and even contribute to its development. In the next days, I'll first fix all the annoying display and integration bugs. Then, I'll work on : - Restore clickables labels from the old debug layer (for Dad72 and DK ) - Update the documentation (of course) - How to contribute (add a new tab, add a new tool, change panel color theme...) - Add new features ! (Cameras, particles, textures, audio, animations...) - <insert your suggestion here> I'm having a lot of fun to work on this, and I really hope you will find it as useful as I do ! Cheers
  6. 20 points

    Canvas2D Main Post

    Hello good people of the babylon.js community! Update #14 from January 29th, 2017 Primitive Collision Manager (PCM, @ller request) The PCM is finally done! Well, first release, I've already spotted some not supported cases... Anyway, you can check a PG demonstrating the feature here: http://babylonjs-playground.com/#1PXWLR#2 (I've commented the PG for you to see how it works) Turned out that I didn't do what I wrote in the previous message, I didn't check for OOB and I've implemented a generic triangle set versus triangle set intersection algorithm right away. Basically all primitive types now create/update a Tri2DArray which contains a list of triangles describing the primitives surface. It needed to be that way because an Ellipse with a intersection of 8 is graphically not shaped like a perfect ellipse: there's not enough polygons, so I couldn't use a intersection algorithm involving a true/perfect ellipse, same goes for the Rectangle2D with round corners. So I decided to go for the most generic and accurate way. All primitive types are supported except the new WireFrame2D one. Through the PCM object you have a list of all primitives intersecting with the Canvas' border (if you activate the feature), it's useful. You also have a list of all the pair of two colliding primitives. From a given prim you have the intersectWithObservable and intersectWith properties to get notified of new/removed intersections and to access the full list of them. New Text Alignment (vertical and horizontal) and word wrapping features for Text2D (coded by @adam, I'm very thankful to him! It's good to feel less alone on this whole coding...) Basically now you can set a left/center/right text horizontal alignment and a top/center/bottom for the vertical one. If you specify a size for your Text2D primitive you can now have auto word-wrapping if the line exceed the horizontal limit. Maybe @adam could share a PG demonstrating the feature! New Primitive Type: WireFrame2D Well, I needed it to draw the debug World AABB and Cluster of the PCM, so I wrote it. The Primitive accept many WireFrameGroup2D, each one having a default color and contain a list of lines. Each stored vertex has its own color. Basically you create a WireFrameGroup2D instance then use its method to fill it with vertices. Note: it's Line List, not line strip: each line is defined by two own vertices. You can use an API to start, fill, end a LineStrip but internally it will double the vertices for everything between the first and last vertex. Right now this Primitive doesn't support any kind of intersection (point or prim-prim), I'll add an intersectionThreshold and implement the algo any time soon...It's not a priority right now... Misc things The BoundingInfo2D now support a WorldAABB with an efficient dirty/update, I obviously needed it for PCM Each Prim Instance has now a uid property which is a unique id (a GUID), I use it as a key to store the prim or prim related data into a StringDictionary, it's an efficient way to retrieve a given prim without going O(n). There's a Triangle versus Triangle intersection method in the Math2D.ts file, its implem is slow. If someone has the code for a Tri-Tri in 2D implemented using the Separating Axis Theorem (SAT) algo: I'm in ! Update #13 from January 24th, 2017 WorldSpaceCanvas TrackNode feature So I've developed the feature requested by @royibernthal to create WorldSpaceCanvas that track a 3D Scene Node with the optional feature for the WSC to always face the camera (billboard mode). You can find a demo in this playground. It was truly missing to the whole "WorlSpace Canvas interacting with 3D Scene" scenario. Other users requested more about this specific scenario and it perfectly makes sense: C2D was develop to provide 2D support for the 3D Scene, I've been focus on the "2D stuff" by itself a lot, because, well, it's already a big task, but yes there should be more things to come on this area, I'll try to dev feature requests on this matter with a higher priority. Update #12 from January 11th, 2017 Few announcements: We can now use BMFont to render text with Text2D PG here the documentation of the Text2D was update to explain the different techniques you can use to render text (normal, Super Sample, Signed Distance Field, BMFont) and which one you should use. (Thanks @MasterK for the idea and help) There's a new page about how the Rendering is working, it will help people to understand how to get transparent sprites, for instance. (this page is currently only accessible by the link I gave before, because I've messed up the link in the Canvas2D Homepage, yeah, that's my special ability, DK loves it) Some new Playgrounds are available at the bottom of the Home Page I was ill during the release of the 2.5, so I couldn't update the doc and the what's new, so I've updated the what's new of the documentation web site, go take a look if you want. As a separate module, Canvas2D has its own section in the What's New. Update #11 from January 5th, 2017 Long time that I didn't develop new features but here we go: AtlasPicture is now supported, see the documentation about it. Scale9Sprite is a new feature of Sprite2D class.The Sprite2D documentation was also updated. You can play with the following PG: Scale9Sprite AtlasPicture Of course you can use Scale9Sprite for a Sprite generated from an AtlasPicture. Update #10 from October 21th, 2016 allow3DEventsBelowCanvas Until now, pointerEvent occurring above a ScreenSpaceCanvas were also sent to the 3D Scene, many people (rightfully) complained about this so I decided to add the feature, which is called "allow3DEventsBelowCanvas" (which is false by default). The PR is here for more info https://github.com/BabylonJS/Babylon.js/pull/1448 (preview files updated and PG not updated so far). You have to realize that this is a change in behavior, now by default events won't be sent to the 3D Scene if they occurred above the Canvas, but I figured it made more sens this way. If you want them to be sent anyway, just set the setting to true! Update #9 from October 19th, 2016 Stabilization The latest weeks were spent on keeping stabilizing the Canvas2D feature, fixing bugs and adding feature only when necessary. Overall bug fixes were concerning Positioning Engine (alignment), StackPanel Layout Enigne, pointerEvent observable (leave/out now works better), some dispose issues solved, you're supposed to have no more opacity/transparency issues (well, let's say, "less"). One new feature One new feature was developed recently, during the creation of a ScreenSpaceCanvas you can now specify the renderingPhase setting, allowing you specify for which camera and which renderingGroup the Canvas is supposed to be rendered to. Simpler version: you can now interleaved 3D layers (which are renderingGroup) with 2D layers (which are ScreenSpaceCanvas). Many people requested it ( @MasterK, @HenryPeng, @stormwarestudios) to render 3D content above UI for FX (particles) or simply some 3D preview (like a 3D character preview in a UI). This playground is a very raw demonstration of the feature. Modularization Oh, by the way, I nearly forgot to tell something pretty important: we have recently extracted the Canvas2D feature (and the forthcoming GUI Lib first code lines) from the main babylon.js file. This is the first step of what is going to be a modularization of babylon.js, Canvas2D/GUI being obvious (and easy) candidates. What is changes for you? Well, not that much, if you use C2D/GUI you now have to use the "babylon.canvas2d.d.ts", "babylon.canvas2d.max.js", "babylon.canvas2d.js" that are sitting next to the "babylon.js/d.ts/max.js" files in the "dist" directory of your choice (right now only the "preview release" directory contains the Canvas2D related files, for obvious reason. The module's name is still "BABYLON", which will ensure you'll compile without changing anything. On a repository point of view, the source code was moved from /src/Canvas2D to /canvas2d/src/. Our lovely boss made the move and the Gulp config to compile everything the same way babylon.js does so you don't be lost. La surprise du chef! And the "chef" is not me, but another core member @Temechon spent some very valuable time (and I can't thank him enough for that!) to work on a feature I desperately need for so long but that I'm unable to code (well, in the time frame it will took me) which is called: c2dinspector.js. Basically the c2dInspector is a HTML Pane that is added on the right side of your HTML pane and that displays all the Canvas2D instances in your Scene (well, Engine to be more accurate) and their content as a tree of Primitives. You can select a given Primitive to see its details on the Detail Plane below, you can even change some values (still work in progress). In the tree, for each item there're two icons at the very left, an "eye" to show/hide the prim, and a "double frame" which is used to show/hide the debugDisplayArea (more on this below). This feature will help you (and me!) debug and understand better what's going on and why! It's not released yet, but a beta will be very soon (tonight or tomorrow), it's still Work in Progress, but hey, it's better than nothing and it won't harm you. The debugDisplayArea (the only thing I coded, bugs are to expect!): as you may know a primitive has four area: layout, margin, padding and content, this feature will display them with a given color code (layout being light red, margin is yellow, padding is magenta, content is cyan). This screenshot below is the same UI as above but with the debugDisplayArea on the "GUI Visual Placeholder of MainWindow", which has a margin of 50, 50, 50, 50 (the yellow area shows it) and padding of 100, 100, 100, 100 (the magenta area show it). The content in blue is the Windows' background, in light grey, which is here covered by the blue area. GUI Library I've started the GUI Library, it's going on very well, but I just can't work as much as I wanted on it the last couple of weeks, so there's delay: that's life. There's a separated thread about the GUI here so don't expect me to say more in this post, got watch the other thread if you care about it. That's all folk, enjoy, as usual: feedback are welcomed, you can do it in this thread of course! I just don't want this thread to be a "bug tracker" one, if you have issue, keep creating a new post and don't forget to mention me as I don't look at the forum everyday to see if someone needs help (but DK does, happy him...) Update #8 from August 31, 2016 I pushed a new commit today that address many things around using Scale on the Canvas object directly. I'm lazy so I copy/paste the PR description: You can now set a Scale (or ScaleX/Y) to a Canvas2D object, it will render as expected, for every caching strategies. At creation time of a ScreenSpaceCanvas you can set a designSize which will be used to compute the Canvas' scale automatically in order for you to specify absolute coordinate in the frame of the designSize (MasterK request) Any Cached Renderable Group can have a new GroupCache Behavior: GROUPCACHEBEHAVIOR_NORESIZEONSCALE. When set the cached bitmap for the Group won't be resized when the scale of the group will change, improving performances over rendering quality Ellipse, Rectangle are now drawn with a prescale computation to ensure the best result when using high/low scaling Prim2DBase has not the actualScale and actualScaleX/Y property that return the accumulated scale of the primitive. At their creation, primitives can specify if they should not inherit from the scale of their parent through the dontInheritParentScale setting. I don't know if many of you will get the GROUPCACHEBEHAVIOR_NORESIZEONSCALE and find a usage, but I thought it was the time or never to do it, so I did. And it works pretty well. I think for mobile gaming it may help to improve the perf by setting/keeping a fixed resolution of what's being rendered into a Cached Renderable Group2D. The designSize mode was made upon a request from @MasterK and it's really a good idea, I can see the use case from a game UI point of view and I hope it will work the way it should be, otherwise I'll do bug fixing! If there's no more urgent thing I'll go back on my working list and the next thing (that was already started but paused) is supporting the Device Pixel Ratio, which is another big thing for mobile gaming I think. I will be a breaking change for people who are right now "compensating the lack of this feature", but well, I'm sorry, there's nothing I can do about it except I wished I knew more about HTML few months ago! I know most of you are still trying to understand how things work with the Canvas2D and don't have time to try and use different Caching Strategies (and then rely on the DONTCACHE mode). Truth is the other modes were pretty bugged, they are less bugged now, but I'm not sure it's working the same. To solve this matter I'm revamping my whole "Unit Test" project, which was a local thing and not as powerful as it should be. There are so many different combination to test a given Use Case against: the different Caching Strategies, the support of the Instanced Array and with different Device Pixel Ratio values. I have to find time to put a good Unit Test framework and publish the whole stuff once it's done, because I think it will help all of you to discover the many things you can do and how. When this will be done then I think I'll start the true "why I did this": a GUI Library based on Canvas2D, with the UI Controls you all are waiting for. The foundation of Canvas2D is getting more and more stable so I think it will be soon the right time to start it and it will be the perfect chance to fix dozen of bugs, I'm sure of it! Update #7 from August 13th, 2016 @ Legoland, Billund, Denmark The latest fix is a long ongoing one noticed by @FlashyGoblin concerning transparency of Sprite2d. To make a long story short: I mixed up the implementation of AlphaTest and AlphaBlend (aka Transparency), the result were...well ugly...and you couldn't do things like the one FlashyGloblin ran against. So here are the new ground rules about this: I try to behave the same way the 3D Engine StandartMaterial does, so people familiar with it will catch things up pretty quickly. One noticeable difference is that useAlphaFromTexture is true by default. There are three render modes: Opaque, Alpha Test and Transparency (Alpha Blend). If you don't use Alpha in a Brush or a Texture and the Opacity is 1, the primitive is rendered in Opaque mode If you use Alpha in a Brush, if you set BaseTexture.hasAlpha to true in a Texture your primitive uses or if the Opacity is not 1, then it will be either Alpha Test if useAlphaFromTexture is false or Transparency if it's true. Beware: until now you didn't have to set hasAlpha for a Sprite2d to deal automatically with transparency, this is no longer the case! With the latest version your Sprite2d will be rendered as Opaque if BaseTexture.hasAlpha is set to false (which is the default value no matter what your bitmap stores). To sum up Text2d is set as a Transparent primitive to ensure a proper blending. Shape2d based primitives will be either opaque or transparent based on Opacity and Alpha in their Brushes. Sprite2d can use the three modes, the default behavior being Opaque if the texture has hasAlpha to false or Transparent if it's set to true and you can use useAlphaFromTexture to switch to Alpha Test. Update #6 from 15 June 2016: babylon.js 2.4 is out! I took the time to finish the overview/tutorial documentation. I also updated the playground and use the BABYLON. prefix everywhere it was needed (which mean I removed the alias like "var Scene = BABYLON.Scene") in order for you the user to copy/paste more easily. The documentation entry point is: http://doc.babylonjs.com/overviews/Canvas2D_Home (with all the playgrounds at the bottom of the page). The architecture/design doc is: http://doc.babylonjs.com/overviews/Canvas2D_Overview_Architecture Please, I've also created a PRO for the Canvas2D feature in Slant, for those who think it's a great addition to babylon.js, please follow this link and upvote, this work is on my spare time so fame is my only reward! thanks! http://www.slant.co/topics/3777/viewpoints/4/~open-source-javascript-3d-engines~babylon-js#15 Update #5 from 13 June 2016: new features added and also a lot of little bug fixes This version is supposed to be the "first official release", there were breaking changes with the previous ones, most notably: You don't use the public static CreateXXX method to create a primitive, you can now use the constructor, the parent is an optional parameter in the settings object (see sample below). At construction you can use a settings object that contains many many properties that you can set as you wish, some are somewhat overlapping (e.g. there's size, width and height, you set either the first or the two latest). This was designed to bring you some flexibility. You won't certainly notice, but the location of a primitive will always be relative to its bottom/left corner, regardless of the origin you set. This change was necessary to bring something coherent and understandable when alignment/layout comes into play. You have to use the actualPosition and actualSize properties to get the "real" values. position/size properties are the value before layout/positioning takes place. New features: This new creation mode allows you to cascade the creation of objects (see below). You'll see that Brushes can now be initialized with a string to make the code more simple. The same is true for margin/padding/alignment. You will find example in some playgrounds, doc will come asap. Lines2D now fully support intersection/picking, as well as roundedRectangle. The size of a primitive is now optional, if omitted it will be sized to its content bounding box. (the same behavior as Group2D) Margin, Padding, Alignment is introduced, you can play here. Margin/Padding support units in pixels or percentage, the value can be inherited from its parent or simply be automatic (0) A LayoutEngine feature now allows to position/size the primitive, by default it's the CanvasLayoutEngine that is assigned to all primitives, unchanging the behavior you already know. But I've made in few minutes a StackPanel Layout that you can test here (don't forget to CTRL-F5 your web browser to fetch the latest .js file) By the way, there's a new playground for Transparency testing. Update #4 from 03 June 2016: new features added and also a lot of little bug fixes intersection works better on Lines2D, I now support every Cap types, it's also accurate on rounded Rectangle (if you click on the empty zone create by the rounding corner it won't generated a hit). interaction mode can now be enable in WorldSpace Canvas, you can take a look at this PG for an example: http://babylonjs-playground.com/#1BKDEO#9 I've also added a alignToPixel property in Sprite2d to make sure the rendering of the sprite will be aligned to the render target device pixel, is ensure the best rendering quality, but in rare case of slow animation you would probably want to turn it off to ensure smooth animation. by default it's on. I won't detail it too much here because it need proper doc to be fully understood, but now you can give your own WorldSpaceNode to render a WorldSpace Canvas on something else that a simple Plane mesh. This mode is easy if you don't use Interaction, but if you do, you have to give a method that compute the world space intersection with your mesh and then compute the local position in the Canvas of the resulted intersection. This is not the simplest method to code but you have an example with the current implem for Plane World intersection to Canvas. Update #3 from 25 May 2016: new features added Breaking changes in the API: concerning the way to create Canvas and Primitives, now it's using the same signature than other object in babylons.js, with an options{} json object for optional parameters. There are default value each time it's possible. Including many bug fixes and little features improvements. We have two new primitives: Ellipse2D and Lines2D. I worked hard to dev a nice Lines2D primitive and I hope you will like it! A full Overview Documentation is now online, the main entry page is here: http://doc.babylonjs.com/overviews/Canvas2D_Home, from this page you'll be able to access to every others pages of the overview doc and also all the playgrounds I've made so far. The reference documentation is now online for the 2.4 you will find documentation for about 80% of the Classes/public methods. Update #2 from 19 May 2016: new features added Lots of little bug fixes, I hope everything will be ok with the origin property, nesting primitives, the text render is way much better now than before. Interaction is supported! There's an pointerEventObservable property in Prim2DBase for you to be notified about many things concerning interaction with a pointer (mouse, touch, pen). I've also added the support of the ActionManager, it's the same as Mesh and Sprite. I support all triggers exception Intersection and KeyUp/Down. Animation is supported too! You have the animations property in the base class of a Primitive for you to add animation the exact same way you would do for the scene objects. Update #1 from 16 May 2016: added link in the Documentation section to a new tutorial that explains how to write your own primitive types Original post I am very pleased to announce you a new feature I've been working on for weeks now! Well, to put things simply, Canvas2D is...a 100% WebGL 2D Engine! It may sound strange at first but I really thought it was missing to this lib, all started from the time I realized I couldn't efficiently display text in babylon.js. So I started to work on a new feature to do so and one thing led to another and I realized we could use of a real 2D Engine for many things! It's not related to the HTML Canvas Element at all, Canvas being a generic term (like Rectangle, for instance). I've called it Canvas2D because the main class controlling the feature is called Canvas2D and acts as its name suggest: you can draw 2D content inside. For performance reason the rendering is 100% WebGL your graphic card loves to do these kinds of things if you spend the right amount of time to create a good rendering engine. Developing such 2D Engine wasn't an easy task because I wanted to lay strong foundations to allow it grows decently through time. Future will tell if I did well or not! At last, for a better understanding this features serves the same purpose than Pixi.js, but the intent were slightly different: Pixi.js relies on two rendering engines (HTML Canvas or WebGL Canvas), but the Canvas2D relies only on WebGL, because it's made to be used along with a 3D Scene, which requires WebGL anyway. Primary focuses while designing the feature: fast, flexible and hopefully easy to contribute. Concerning the "fast" if your device support the WebGL Instanced Array extension, you should be really pleased with the result, the engine was designed to work with this extension (even though if it also works without). I think I overall did well although if there's still room for improvement. Basically, how does it work? You can create many Canvas2D instance on a given Scene, you have two kinds of Canvas: ScreenSpace: the canvas is displayed above the 3D Scene, in 2D space, like you would expect See this example. But there's another interesting mode: WorldSpace:the canvas is displayed in a 2D Rectangle as a part of the 3D Scene, you setup its position, rotation and scale, like a Mesh (well, it's in fact a Mesh of a Plane). See this example. When you want both Performance and Flexibility Things get a little technical! When you create a Canvas you have to choose a Caching Strategy. Why? Because depending on what you will do with it you may use different rendering strategies. CACHESTRATEGY_DONTCACHE: easy, nothing will be cached, all Group2D are called "logical" and the whole content is redrawn every render. If you have few things or if it always change, you may use this mode. It's also the most stable right now. CACHESTRATEGY_TOPLEVELGROUPS: my favorite! Only Group2D that are direct childs of the Canvas will be cached and considered as RenderableGroup, their children Group will be logical only. If you have some On Screen GUI to display at the different corners of your Viewport, this mode may be the best for you. CACHESTRATEGY_CANVAS: Well, the whole Canvas is put into a cache, you better avoid this if you create a Canvas with the size of the Viewport because a texture/depth buffer will be allocated with the size of the viewport. Note: this is actually the only mode that can be used with World Space Canvas. (the other at the exception of DONTCACHE will follow later). CACHESTRATEGY_ALLGROUPS: this is the most technical one, sound brute force at first, but its the opposite: the most complex one. Potentially every groups are Cached, but in reality for each Group you create you can set a CacheBehavior which states if: The Group follows the cache strategy (then be cached), It won't be cached (then rendered every time) or If it's cached in the nearest Cached group parent. This mode has been elaborate to allow the creation of GUI controls being part of a complex canvas with a lots of Depth and diversity. As for today, this is the least tested one, be indulgent. A canvas is made of Primitive: this is the base type, has many property like position, rotation (along the Z axis), scale (uniform), visibility, an origin, zBias (if you're not happy with the default behavior), and a list of children primitives. Group2D: to create a new reference of frame, but also if you wish to cache its content, to avoid redraw at every render. If you have primitives that are most of the time static (or changing sporadically, in response of an event for instance) it'll be well advised to cache them to speed up the canvas rendering. Renderable Primitive: as its name suggest, it's a base class for primitive that render to the canvas, so far: Text2D: to display text. Sprite2D: to display a sprite (a part of a texture if you will). Shape2D: another based class for a 2D Shape made of an optional Border and or Fill content. The Border and Fill Content are drawn using a specific type of Brush, for now SolidColorBrush2D and GradientBrush2D are supported. TileBrush2D (so based on a bitmap pattern) should make its way in the 2.5. So far only the Rectangle is implemented, but it does support roundRadius, which is nice. I think I can implement Ellipsis and Circle in no time, but well, I wanted to focus on the engine first. nPolygon, WireFrame should come later. Vectored based graphics (SVG support) should be a nice addition too. Documentation The tutorial can be found here. An overview of the feature architecture and capabilities can be found here. That's where you'll understand everything you can do and what you can expect in term of performance. A long tutorial to explain how to write your own primitive type can be found here. Few last things My mantra for this feature: by indulgent with the current state of the Canvas2D, but be fearless on the feedback side! I will try my best to fix things as much as possible, I've made already some testing, but nothing will replace the impartiality of the user! I also have some bugs already logged (like don't try to change the origin of a Text2D, the result will be rather funny...and unpleasant) and will fix them asap. Critical features are missing: Group2D and Text2d horiz/vert alignment, more shapes. As well as interaction support through an event system and a better support for animation. I will work on them right away. I don't make promise of what will be there for the 2.4 RTM but I expect everything except animation improvement, really hoping that interaction will make it (edit: also done). A big thanks to the core contributors of the lib for their help: @Deltakosh @RaananW @Temechon @jerome and @Sebavan! I'm waiting for your feedback!
  7. 20 points

    Babylon.js 2.5

    We're done my friends!!! Thank to this wonderful community we managed to close and ship v2.5: https://github.com/BabylonJS/Babylon.js/releases/tag/v2.5.0 Here is the announcement tweet: Please RT
  8. 19 points

    New Playground features

    Hello community! As you know, the playground is a very valuable tool if you want to try, experiment and share your Babylon scenes. You can even search for a specific word in the whole snippet database from the documentation website, that make it easy to find and discover a new snippet. And because we know it's a very powerful tool, we worked hard last month with @Deltakosh on a better user experience when searching for playground. From now on, when saving a new playground, you'll have to fill several information: a title, a description and some tags. It will be asked only once at the playground creation, and all next iterations of this PG will share these metadata. You won't be able to redefine it afterwards. For all PG that don't have any metadata, you will be asked to fill it only once. The search has also been improved. You can search for a word in the PG code like usual, but you can also search for a word into a PG title/description, or a specific tag. The overall quality of search had also been improved (ou can now search with several words, that will return all PG that contain these words, and several bugs have been fixed). All this work couldn't have been done without @Jaskar and @DeathSoul who wrote all the code (back and front-end), and @Deltakosh of course So go try it : http://doc.babylonjs.com/playground Please helps us by reporting all bugs you can have in this thread Thank you very much !!
  9. 19 points

    Announcing Babylon.js v3.0

    We did it again Congrats to all our great community, we've just shipped Babylon.js v3.0: https://github.com/BabylonJS/Babylon.js/releases/tag/v3.0.0 I hope you'll like it! And the blog post: https://github.com/BabylonJS/Babylon.js/releases/tag/v3.0.7
  10. 18 points
    Hi everyone, I've created over 1000 tracks of music and sound effects that you are welcome to use in your games. It's all original...all my own work. All I ask is to be attributed as indicated on my homepage: http://soundimage.org/ I sincerely hope my tracks are helpful. Any and all feedback is welcome and always appreciated. All the best, Eric
  11. 18 points

    Babylon.js v3.3 is out!!!!

    We did it guys!!! Let's share the love: Feel free to retweet as much as you can!!!
  12. 18 points
    Hello team! Since the very first version of Babylon.js materials are working in a pull mode. This means that every time a mesh needs to be rendered, its material has to ask the engine about a lot of information in order to compile the best shader possible for the given mesh. For instance, here is an incomplete list of states required to compile a shader: - Lights affecting the mesh (taking in account inclusion and exclusion lists and masks) - Textures and channels (including associated parameters like parallax for bump or reflection mode for reflections) - Fog, clip planes, point rendering or wireframe - Mesh attributes (does the mesh contains UV? tangent? colors?) This leads to a pretty expensive function named Material.isReady. Due to the previous reasons, the function is really CPU intensive. Here is for instance the profile of the "materials" playground: The highlighted functions are part of the IsReady root function. The scene is extremely simple and you can see that the isReady is taking almost 13% of the CPU time While it was ok because of the complexity of the task assigned to this function, I decided recently to change it to a clever model: The push mode. When a material is in this mode, instead of asking on every frame for every state, the states will push updates to the material when they change. Obviously the performance boost is immense. Look at the same profile with the new mode: We are now at 2.51%. On bigger scene like Sponza, this function could take up to 30%: And now with the new mechanism: ONLY 3%!!!!!!!!!! But obviously with such a big change, there will be some bugs.. So please use this thread to report any issue with StandardMaterial. If everything is fine, I'll update the PBR to push mode in one or two weeks. Associated PR: https://github.com/BabylonJS/Babylon.js/pull/1959/
  13. 18 points

    Road to Babylon.js v3.0

    Hello all, next version will certainly be 3.0 depending on my progress regarding WebGL2.0 support I'll use this thread to track progress. Done so far: WebGL 2.0 context initialization Shaders migration Texture LOD: used by PBR shader Depth Frag: Used by logarithmic depth buffer Vertex Array objects: Used to speed up vertex buffer submission Standard derivatives: Used by bump Multisample Rendertarget: Used to apply antialiasing to render targets (mirrors for instance) Uniform buffer objects: Used to speed GPU communication up Multiple render targets: Used to render to multiple textures simulteanously I also started a documentation page to better explain every feature: http://doc.babylonjs.com/overviews/webgl2
  14. 17 points

    Build your own Babylon.js

    Hello team! I'm glad to announce the availability of Version Builder: http://www.babylonjs.com/versionBuilder/ Now that we have a lot of satellite services, you can use this page to build a custom merged version of babylon.js!
  15. 17 points

    Announcing Babylon.GUI

    Hey all, I'm really pleased to announce the availability of Babylon.GUI. http://doc.babylonjs.com/overviews/gui In a nutshell, Babylon.GUI is a GUI layer which can be used inside your scene. It is an alternative to DOM or Canvas2D. Please try it and give me any feedback
  16. 17 points
    I can actually provide some insights on this point since prior to starting my indie game venture I was working as Technical Lead for an American brokerage firm in London (7 years) and prior to this, I worked for 3 years as C++ dev for a bank in Paris. As a dev in the financial sector you can expect to earn a lot more than in any other sector coupled with high bonuses and generous packages. Financial stability is definitely easier to achieve with these kind of careers. There are however some constraints that money cannot offset. Money cannot buy time lost (I started my life in an orphanage in Korea and there was things that I really ought to do regarding this personal matter). After 10 years of career abroad I realised that time was just flying by... being able to untie myself from constraints while making money was my main motivation to start with and this is something that I managed to do. When I told the company that I was leaving to create an indie game business they were understandably surprised. They offered me a higher package, I explained my personal circumstances, they suggested part time freelancing or that I take a short sabbatical leave to focus on my personal situation but I wanted to start anew and have no further constraints. On top of having a much better quality of life now, my indie game business allowed me to focus on these and this is my greatest pride so far. Now I am not saying you should leave your day to day job today. I had savings when starting Okijin Games and a career (with 10 years experience) to go back to "in case of failure" so the risk was mitigated. I also got lucky as my first game (Zombies Can't Jump) was a success on Windows Phone and on the licensing market so it started generating revenue immediately and I actually did not have to tap into my savings despite a one game only catalogue. But what I am saying is that it is perfectly viable to make it as an indie dev in the HTML5 game industry provided you pay attention to the right opportunities and partnerships. Some markets in the game industry are saturated by extremely high expectations, this is definitely not the case with HTML5 games where there is so much room for development. If you read the latest news you will even find that 2017 is likely to be full of development. To debunk even further, last month my work consisted on successfully negotiating 7 non-exclusives for my latest game Sailor Pop ($1100 average per license), adding to this a discounted sale across my older game catalogue ($1300) and passive revenue from rev. share and stores ($2350). I also went to sign a deal for distribution on several Asian Markets. Most of my revenue comes from these type of deals as I do almost no client / freelancing work (in 3 years I took only 2 contracts for clients and refused many more). Client work may feel safer but you are not building your assets, no scaling prospect nor repeat sales which is one of the most important component of a business along with its structure - I believe that if you ever want to grow your income and value over time then this is a dead end. I also don't necessarily make games on a treadmill, I took one month off development work to offset the burnout from my latest game and I am now 1 month into my next project (my first multiplayer HTML5 game) although I ought to finish all my projects within 3 months max. There are obviously other viable ways to make it as an indie (like discussed above), we can also look at the exceptionally successful stories, but in the shades there are many ways to make it decently while having fun with less constraints (that's what "independent" stands for after all). To conclude I also agree that in all this, there is also the prospect of one day making it big with one hit! But in between it does not mean that making a living is impossible.
  17. 16 points

    Learning Babylon.js - The ebook!

    Hello all, As some of you already knew it, I've been working on the a Babylon.js ebook for several months. Today, this book is finished, and I named it Learning Babylon.js. What is included in the book: - Getting started with Babylon.js (Hello world in 3D!) - Learn how to use primitives (box, spheres, torus,...), default cameras and lights - Detailed guide on materials and textures - Particles - Shadows - Collisions - Intersections - Physics engine (Oimo.js) - User inputs (keyboard/gamepad) - Animations - How to use exporters (3DSMax, Blender, Unity) - Shaders - Skeletons/bones - And more! The main goal of this book is to CREATE a whole game, chapter by chapter: start with the basics (cubes, spheres and torus), add materials, replace with custom 3D models exported from 3DSMax/Blender,... The game you will create is greatly inspired from the Super Monkey Ball serie. By the end of the book, you will have a complete game to play with, and (I hope!) enough knowledge to create your own. Sadly, I was not able to handle all Babylon.js features in this book alone (I would have spent a whole year on it, and DK is adding new features every day!), but I tried to cover as much as I can with one game. You can find some more information here : http://learningbabylonjs.com/, as well as some screenshots of the book. I hope it will help you in your next Babylon.js projects. If you have any questions, remarks, I'm not far from this forum (as you know it:) )
  18. 16 points

    GPU particles

    Heya team!! I'm proud to announce that the GPU particles feature is now available! Documentation: http://doc.babylonjs.com/babylon101/particles#gpu-particles Interactive demo: https://www.babylonjs-playground.com/#PU4WYI#2 Please note that this feature requires webGL2 or it will fallback to CPU particles
  19. 16 points

    Glow Layer

    Hello, It has been a while I did not introduced a new feature in BJS so as the higlight layer was famous, let s introduce the glow layer: http://www.babylonjs.com/demos/glowlayer/ Documentation is available here: https://doc.babylonjs.com/how_to/glow_layer
  20. 15 points

    I Love This Forum

    Hey Devs and All, I'm just feeling a bit sentimental about how far this forum has come the past 4 years. @Deltakosh and @davrous ( + others) have given us a creative outlet that has turned into a new frontier. I just wanted to say how much I appreciate that I am able to come to a place that provides me not only technical advice, but I've made many new friends as well. Much love to you all. DB
  21. 15 points
    Hello gentlemen!!! Thanks to some colleagues here at Microsoft and to Temechon's team we now have a new toy to play with!!!! http://doc.babylonjs.com/playground And yes this is what you expect: a search engine INSIDE all playground snippets produced since the origin of the world!! Have fun! (please note that we still need to rework the display, but you get the idea)
  22. 14 points

    Shell Shockers

    http://shellshock.io My first BabylonJS project is a whacky multiplayer first person shooter featuring, well, eggs, of course! It's in very early development and still fairly rough around the edges, but it's super easy to jump in quickly and play. It's just been made public, so finding people to shoot may be a little hit and miss (pun intended). Enjoy! Facebook: http://www.facebook.com/ShellShockGame Twitter: https://twitter.com/eggcombat
  23. 14 points

    OfficeGames project

    Hi people, I'm glad to introduce you to my new project : OfficeGames. http://officegames.eu Well ... 3D games for office computers (not only, though). As said in the text, there's only one game for now and it's not even finished. I need your feedback and ideas to improve it and get it to the right direction. So please let your opinions, comments, criticisms, wishes, whatever in this thread. I won't answer everyone but will read them all for sure. Have fun [EDIT] FYI, my best score ever is 10200.
  24. 14 points

    500 HTML5 games in 4 years.

    Today, we finished number 500 of our growing list of html5 games. We (Arjan Haverkamp and me, Bram Schoonhoven) started this journey at the end of 2013. Our first html5 game was a remake of our Flash game Animals Connect. Now almost 400 different games are launched on our various portals. Our next goal: 1,000 HTML5 games. If we keep releasing 2 new games a week, it will take us another 5 years. All our games can be licensed for your game portal or you can distribute our games for free. Some statistics: Our most played game is Candy House with 2.5 million game plays. We have around 6 Million game plays per month with 1.25 million unique users playing our games. Average playing time is 12 minutes per game. Interestingly enough, our games are played 69% on desktop, 16% tablet and 15% mobile. Top 5 countries: United States, Germany, Brazil, Poland and Russia. Chrome is used in 58% of the game plays. Some of the tools/technology we use: Howler.js for audio. Hammer.js for touch support. Cloudflare as CDN solution. Javascript Obfuscator for obfuscating Javascript code. Browserstack for testing the games in various browsers. Google IMA SDK for monetization. Google Analytics. Add to Homescreen for adding game to the home screen. Screenfull.js for full screen support. Webfontloader.js for loading custom (Google) fonts. Cordova for creating apps. Website2APK for creating Android apps. PNGquant and JPEGoptim for optimizing images. Wavepad for creating sound sprites and optimizing MP3's.
  25. 14 points

    Help wanted!

    Hey team! we were clearly heads down working on 3.0. Now that we successfully shipped it I would like to get the help of our wonderful community. I would like to improve the content of our documentation. If you go there: https://github.com/BabylonJS/Documentation/issues you will find a list of issues related to the doc. There are 2 kinds of issues: Missing documentation: These issues are used to flag a missing tutorial / documentation / overview Incomplete documentation: These issues flag articles / topics where we consider we should add more info If you want to help, you can: Create more issues to help identify what is missing / incomplete / unclear / using bad english / whatever could be wrong Take one issue and fix it: My favorite one Pick an issue, read this small tutorial and contribute to the best doc ever made for a 3d engine One of the goal of the 3.1 will be to add helpers everywhere to make common tasks even simpler. And I'm convinced that doc will be an important part of this simplification as well. Thanks a LOT
  26. 14 points

    PBR composer ( node based )

    Hello, I'm happy to announce that the node based PBR Composer is on the road. What is PBR Composer ? In short, PBR Composer helps you design and visualize a PBR Material in an efficient way. Parameterizing takes place by dragging and connecting specific nodes from a palette (typically textures, colors and uv-coordinates) to the output node, which represents the PBR Material. A preview panel lets you see all changes in realtime and the corresponding js-sourcecode will be updated as well. The resulting graph can be downloaded in JSON format for later use. Images can be inserted via preview fileselect dialog and/or Drag&Drop, in latter case the images will be transformed to embedded data-urls so the javascript functions can be reused without dependencies. Different meshes and environment-maps are available to see the material under different geometry and reflective light conditions. Motivation for PBR Composer: Due to the complexity of the PBR material (soo many combinations with soo much amazing effects) there is a need of having realtime feedback reflecting the changing parameters. Other than some editor already out using a bunch of parameters in confusing properties panels, nodes lets you to concentrate only on the parameters you need giving a nice overview in form of a graph. Nodes can also be shared and avoids therfore redundancy in the sourcecode. The goal is/was to make the user interface as efficient as possible. The idea for realizing the PBR Composer was inspired from Shader Editor. Technical details: PBR Composer is a web application based on dat.gui, w2ui, litegraph.js and of course on BABYLON.js TODO: At the moment, PBR Composer is customized for PBR-Glossy materials. The current activity is realizing a function for switching between Glossy and Metallic paradigms. Any questions? Let me know... PS: PBR Composer is still in alpha stage but will be deployed in beta stage soon Here it is te demo ...
  27. 14 points

    Webgl Spector

    Hello, I am happy to announce the release of my last Dev: http://spector.babylonjs.com This will help any of you willing to troubleshoot or understand what are the webgl commands generated by the engine ! Have fun,
  28. 14 points
    Hello team! as part of 3.0 version, I'm proud to announce the availability of ESM shadows (Exponential Shadow Maps). I updated the great doc done by @Wingnut to take this in account: http://doc.babylonjs.com/tutorials/shadows VSM (variance shadow maps) were removed (to keep backward compatibility the properties are still here but they will trigger a warning in the console). ESM are great because they can be blurred. Here is an example of all kind of shadows we have now: http://www.babylonjs-playground.com/#20FROK#2 ESM are great because they allow you to deal with selfshadowing: http://www.babylonjs-playground.com/#1CXNXC#3 Hope you like it!
  29. 14 points

    Happy Christmas!

    Hello my beloved community! It has been a really cool year for our little babylon.js! We (as a community) did so many improvements to the engine, the doc, the website that I can't count them I wanted to wish a WONDERFUL CHRISTMAS to you and your families. I won't be too much available until early January as this is the first Christmas for my daughter (the first where she can understand what is happening). But I'm not worried as I know that we have a team of extraordinary people dedicating time to help each others. Please take some time to spend time with your friends and family. I'll try to swing by sometimes but not like right now (my current pace is once or twice a day :)).+ PS: If you really need my help, just wait for early January and ping me on your topic!
  30. 14 points

    A Ghost of Christmas Past

    I had hoped to create a brand new Babylon Christmas Card - but real life gets in the way of virtual Reality So I decided to bring back my first Christmas effort with a few changes - I know @dbawel likes it. Basically some added geometry - a cottage, a sign and chimneys. The chimneys gave me the opportunity to experiment with particles - in addition to the particle effect I stole from @Wingnut; a long time ago. I had to create 5 textures, and I also tweaked the terrain. Anyway here it is: A Babylon Christmas Card You can also change the volume of the music Up or Down with the "u" and "d" keys, and if you, for what ever reason, would rather have no music, it can be toggled On/Off by hitting the "o" key. The camera speed can be made slower or faster with the "s" or "f" keys. Have fun. Ohh and the sign - do whatever you can do Nadolig Llawen, Merry Christmas, Joyeux Noel, Feliz Navidad, Frohe Weihnachten, to one and all. Next year, hopefully a new Village cheers, gryff
  31. 14 points
    Thanks to the awesome Babylon framework, I'm creating a city building and simulation game; I thought I'd share the progress so I can ask some questions in case I get stuck. Here's a sample town (read-only at the moment because the UI is far from complete): http://misc.blicky.net/c2/?id=1 (desktop only) Some screenshots.. Current issues: Shadows are way too 1990's, even though the targetTexture is 4096 in size. It would be nice if the shadowGenerator's matrix would adopt to only include faces that are in the camera frustum. That way shadows would look good from afar and close-up. Solved Road intersections are a pita. The current solution, using CSGs on the road segments (extruded shapes) and some math to create a plane is barely acceptable and rather slow/error-prone. Performance. While 'idle' FPS is not bad, when adding more structures, the browser will lag because it is using MergeMeshes() to merge the new structures to the existing meshes. I'm currently transitioning to SPS meshes, because they build a lot faster, however are also more restrictive. So my question is: why is MergeMeshes() slower than SPS.buildMesh() and can it be made to match the latters' speed?
  32. 14 points
    Hi, One of our intern in Microsoft France and now core member of the team, @Luaacro, has been working with us building an online editor for Babylon.js: http://editor.babylonjs.com. In order to showcase what you could do with it, he decided to build a complete impressive scene: http://www.babylonjs.com/demos/ruins Yes, it has been entirely built with our editor! It uses a lot of high end effects we have in the engine like a standard pipeline, dynamic shadow generators and particles. He has written a small article about it: https://medium.com/babylon-js/babylon-js-editor-demo-is-now-live-a8fc217a6324#.wp85aq2kx As the scene could be a bit hard to render on every machine (you need a GTX970+ to render it without issue), I’ve added some code to monitor performance based on the last 60 frames rendered. If the fps is too low, I’m: - First lowering the size of the render canvas to 66% and removing the standard pipeline (post processes cost a lot of perf) - Lowering the size of the render canvas to 50% if it’s not enough If fps goes up again, I’m doing the opposite but will never re-enable the standard pipeline. It means that if your machine is able to render the complete demo in full resolution from the first frame to the last one, it has a great GPU and/or a great browser. Enjoy! David
  33. 14 points
    Everything is here: http://doc.babylonjs.com/overviews/Physically_Based_Rendering Have fun!
  34. 14 points

    Grid Material

    Hello, It often happens in a project that a grid is required but it is not that easy to get it right (anti-aliased, easily configurable...). So please, find below a new material available in the babylon extensions (2.4) that may help dealing with it. This material requires the webgl derivative extension in order to work correctly. The documentation is available in here : http://doc.babylonjs.com/extensions/Grid As well as the playground : http://babylonjs-playground.com/#1UFGZH#12
  35. 13 points

    Web Game Editor (MMORPG)

    Hello, I'm proud to talk about version 2 of my MMORPG editor (FR and ENG) that I renamed to "Web Game Editor" instead of "HeroonEngine" which was a name that looked too much like another existing editor. This version 2 comes with a new, more modern, community-based website. It will be possible to find a manual and video tutorials for getting started, as well as a shop and a forum (FR and ENG). The editor has undergone many improvements, new features and various fixes to make it more stable, more functional and more successful. Some things have been totally rewritten. It will come with a small Integer demo that contains two terrain and plenty of media on offer. I should hopefully release version 2 in the month and make an announcement of its release. For the moment I present it here. I have been working on this editor for years since BabylonJS was born. The editor has been renamed 4 times and rewritten 3 times totally and this name is the last change. Content and features: Here is some screenshot:
  36. 13 points
    Take a look at where I'm going with this and let me what you think. It is basically a heavily modified Babylon Unity Exporter Demo Video Link U3D - BabylonJS Game Editor Toolkit Quick Intro Demo API Update Warning: I tried to make it shorter, i took a deep breath and spoke as fast I could but it still took about 1 hour and 20 minutes. But the technical folks who are up to it and want to see how to use and how i put together a Manage Scene Component API with a light weight 'Unity-Style' life cycle with native babylon scene hooks for 'start, update and destroy' stages... Then this is for you U3D - BabylonJS Scene Component API Intro Note: I found the problem at the end of the video with the getSceneMarkup function. I had to move the controller.ready() to AFTER the scene.manager has been set. But you should still where i was going with that
  37. 13 points

    Stupax - Sidescroller game

    Hi all, I would like to introduce Stupax: A different sidescroller game, where you are not the guy, you are the level! In fact you control a movable platform using the arrow keys or your gamepad (Gamepad API) to help the guy (namely Stupax) to get through the levels. You can play the game here: http://mbarde.bplaced.de/stupax/ Controls: Arrow keys / Gamepad 'R' for level restart 'ESC' pause game and open menu Create and test your own levels here: http://mbarde.bplaced.de/stupax/editor.html You can find further information on my website and view the source code including contributions for the music, sounds and textures on GitHub.
  38. 13 points
    Hi Everyone, I recently launched a preview version of my game made with BJS, and you can try it here. It's a 3d billiards game, but currently only Snooker available in this preview version. Hope you'll like it, and have fun. It currently supports these browsers on desktop: Firefox, Chrome, Safari and Edge. (To BJS team: I have added a "powered by babylon.js" in the 'about' page of the game, please let me know if it is allowed to use your logo, and if I have used the right logo, since I just grabbed it from your home page, and converted to png.)
  39. 13 points
    The default pipeline has been updated to add Depth of field, Grain, Chromatic aberration and MSAA post processing. The existing bloom effect has also been updated to only bloom the bright highlights instead of blurring the entire image. See the updated demo and docs. Please let me know if you have any feedback. Thanks!
  40. 13 points

    Animation weights

    Hey team! @MackeyK24 asked for it with so much energy that I spent my entire week end working on a new feature: the animation weights support To learn more about it, please read the doc here: http://doc.babylonjs.com/babylon101/animations#animation-weights A demo can be found here: https://www.babylonjs-playground.com/#IQN716#3 As always, any feedback is welcome! Note: I could have added a third animation to the demo (a run animation) but the model animation for run is a bit bad (it looked like the model was flying). If you have a better model, feel free to let me know
  41. 13 points
    A simple demo displaying the power of the ParticleSystem by creating a low-hanging fog. https://www.babylonjs-playground.com/#BHNVUE#1 Thanks to @Wingnut for finding the PG used as base for this demo. Have a nice saturday
  42. 13 points

    The new Babylon Viewer

    Hi boys and girls, I don't know if you noticed, but the repository has a new directory called "Viewer" : https://github.com/BabylonJS/Babylon.js/tree/master/Viewer The viewer is a simple way of displaying a model without the need of JavaScript at all. It (obviously) uses babylon, and can be customized to your needs using HTML tags and HTML attributes. The only two important lines in your page would be: <babylon model="https://playground.babylonjs.com/scenes/Rabbit.babylon"></babylon> <script src="https://viewer.babylonjs.com/viewer.min.js"></script> Which will result in this: https://viewer.babylonjs.com/basicexample You can read about how to use it and how to customize it here - http://doc.babylonjs.com/extensions/the_babylon_viewer It is currently in a very early stage. The (public) project can be found here - https://github.com/BabylonJS/Babylon.js/projects/6 , including future plans. I am in the process of simplifying the development, build, and deploy process and it will soon be available on NPM as well, if anyone wishes to embed it using webpack/imports/require/whatever
  43. 13 points

    Sponza demo

    Hi, The babylon.js team is proud to share the last project we’ve been working on during the last weeks during our free evening & week-ends. We’ve done a lot of things into this new demo, I’ll blog about it later on. You can check it there: http://babylonjs.com/demos/sponza It uses almost all cool HTML5 available features: WebGL, Web Audio (with some 3D sounds), CSS3 transitions (during the demo mode), Fullscreen, Pointer Events (across platforms via jQuery PEP), Gamepad & IndexedDB/HTML5 Offline API. We’re using our new Universal camera that provide a FPS like experience using either keyboard/mouse, touch or gamepad. So if you’re using a PC, you’ll be able to move using keyboard/mouse, on a mobile device using touch and on Xbox One using gamepad. It’s the same code completely transparent for the user. This new Universal camera is now used by default by Babylon.js (for instance on BabylonJS.com, all demos can now be used using mouse, touch or gamepad) Michel has done an awesome job optimizing the original scene from Crytek to create a beautiful experience but still very performant. For instance, it runs at 60 fps on an iPhone 6s! Some cool demo scripts to test. On Windows 10, use MS Edge: 1 – Launch the demo on a touch enabled laptop 2 – Click on the “camera icon” and then move using keyboard/mouse 3 – Move using a finger touching the screen 4 – Plug a Xbox controller in one of the USB port and move using the controller 5 – Click on “Pin this page to Start” and you’ll be able to show the various tiles defined. 6 – Switch to airplane mode or disconnect from Internet. Click on the pinned Sponza site. 7 – The web app still loads and provide the very same experience! (thanks to our IDB engine and the HTML5 offline API/manifest) You can follow the same procedure on iPhone/Android devices. I've created a big set of icons/tiles for all platforms. On Xbox One: 1 – Navigate to http://babylonjs.com/demos/sponza 2 – Use the Xbox pad with the A button to switch between interactive/demo mode 3 – Use the Y button to display our debug layer 4 – Use the gamepad normally to navigate inside the 3D scene J Enjoy! David
  44. 13 points

    Forum Downtime - The forum is moving

    Hi all, Yesterday, starting at 4pm GMT, the forum suffered a comprehensive, well-coordinated DDoS attack. This was a properly distributed attack, meant to disable the site (which it did), not just some script kiddies playing around. We had thousands of open connections blocking ports and exhausting our httpd service, with sustained inbound traffic floods of 20GB per second (the equivalent of saturating a dedicated 40Mbps T3 line). I spent the entire night working diligently with my host to resolve the problem. As a side effect, the attack also took down other sites hosted on the same server, including the Phaser site. The target, however, was the forum. We finally managed to block the attack, but there were 12 hours of downtime and ripples of it carrying on throughout today. It cost me a lot of time, money, and effort. Although no-one has claimed to be responsible we have evidence indicating it was related to a previous altercation that took place on the forum. As a result, several things are happening: 1) The forum is moving to a different host. It will be hosted directly by Invision, the company who make the forum software. They are in the process of transferring the forum, and in approximately 6 hours time it will be offline as the transfer takes place. They will retain all member accounts, forum posts and file uploads. Custom plugins will also be kept. My thanks to the Babylon.js team to helping fund this move. 2) The Chat room has been disabled, and will not be bought back after the move. 3) The forum will be offline as the domain name is transferred over the course of this weekend. Honestly, I'd just wait until Monday and come back then. 4) I am personally taking the decision to remove a member of the community a lot of you may know: TrueValhala. To be clear, I do not believe he is responsible for orchestrating the DDoS at all. However, he constantly clashes with other forum members (some of it warranted, some most certainly not), and I am regularly receiving complaints to the point where I cannot ignore them any longer. This DDoS attack was the final straw. I've given this situation a lot of thought, and for many years I have let his actions slide because it was always just a form of 'passive aggressiveness' and over-reaction, rather than anything malicious, and sometimes it was justified too (he receives his own fair share of vitriol now and again.) If you are one of those who has attacked him in the past, perhaps you helped contribute to his polemical responses? But I've moderated forums for over 20 years now, and can confidently say this is one is the most helpful and friendliest ones I've had the pleasure to be part of, and I'm not willing to let it be negatively impacted like this any longer. I'm genuinely upset it had to come to down to this. I know a lot of you follow TV and admire his work, and personally, I admire greatly what he has achieved with html5 on a business level. I'm only writing about him here because I know a lot of you will ask why he is 'banned', I didn't wish to single him out, but he's a prominent part of the community, and you don't just remove that without justifying it first. I genuinely wish him the best for the future and hope he can find another forum to share his insights on, for when you strip away the scathing elements, what is left is usually really informative. You're welcome to email me directly about any of this.
  45. 13 points

    3D scan using a single iPhone only

    Most people here know that I have an 82 DSLR cammera scanning rig. I use this specifically for scanning in people at the shortest time possible (which is currently 1/300th of a second). However, such a complex rig is not required for scanning objects. You don't even need a DSLR camera or a handheld scanner. In this demo I used a simple iPhone 6+ and walked around a statue. We took 89 photos from different angles. My web designer had to stand on my shoulders for the top row of photos. The bust needed to have smooth shading but the base has sharp edges which I needed to preserve so I wanted flat shading for that. With babylon.js you can't pick and choose which edges to smooth. In order to pull this off I made the base and bust 2 separate meshes and turned off smooth shading on the base. It still doesn't look perfect, but it was much better than everything smoothed or everything flat. This is my first test scanning with an iPhone and I usually scan people so this is a rough demo. www.punkoffice.com/statue
  46. 13 points

    The Wingnut Chronicles

    'Twas the frame beforeRender, and all through the scene, Not a vertex was indexed, the canvas was clean. Observers were hung on event loops with care, In hopes that St. Deltakosh... soon would grow hair. The cameras were nestled on Y-offset peds, The lights well-positioned in greens blues and reds. A box and a sphere and a tube with a cap, A torus, a plane, and a fresh-baked light map. When out of the engine arose such a clatter, It woke-up young Davrous to check on the matter. Away to the Windows... he flew in a flash, To resize the viewport and refresh the cache. The specular shined on a heightMap of snow, The includedMeshes were starting to show. When what to his wondering eyes did appear, A Wingy-made bobsled and 12-pack of beer. The BJS framework so lively and quick, Was rendering elves each with onPointer pick. They all went to work wearing new Christmas formals, Connecting the verts and adjusting the normals. A beautiful pano on isBackground Layer, And cool twinkle lights... it just couldn't be gayer. This holiday playground was now well-awake, So Davrous relaxed with a nice Christmas cake. More rapid than beagles the elves made their fame, They yelled at observers, and called them by name: "OnPointer, onReady, onActivate true." "onAfterUnbind, onBeforeRender, too!" The scene came to life at a fine framerate speed, The particle snows had a great random seed. The post-process pipe added gorgeous effects, The boys at Three JS were all nervous wrecks. Ol' Davrous and DK and all of the puppies, Were dancing and singing like freshly-fed Guppies. And Davrous, he smiled and he started to sing... “Merry Christmas to all, and to all a good ping!” Happy holidays!
  47. 13 points
    After hundreds of hours of hard work, 13 Release Candidates and changes pretty much across the whole board - Phaser 2.2 is out! 2.2.1 Update There were a couple of small but really important bugs that slipped in at the last minute, one involving alpha not working in Pixi.js in WebGL mode, and the other a Tween Manager update. These have been rolled into a 2.2.1 release which is now live. Everything else remains the same as with 2.2.0, no API changes took place, so it's a safe direct update. What's new in 2.2.0? One of the nicest and most surprising things about a truly open-source project like Phaser is that you never know who might jump on for the ride. I've been extremely lucky with the support I've received over the years - fellow developers both fixing bugs and reporting issues, all helping to make Phaser stronger as a result. But sometimes a single individual can come along and make a substantial difference all on their own. A quick glance at the Change Log for this release will show many different contributors, but one stood out more than any other: Paul Stickney. Thanks to his contributions alone Phaser is now sporting a powerful new Scale Manager, nicely updated API docs and many other fixes and features across the board. The Scale Manager, a core part of any HTML5 game has had its own book published about it: A Guide to the Phaser Scale Manager which is available now. One of his other major contributions was in updating Signals, the event system used inside Phaser. Before Phaser was creating thousands of Signals in a busy game, most of which sat idle. Now they've gone on a diet in terms of memory consumption and hide behind a proxy causing them to not even be created unless needed. This has cut down on the amount of objects being generated every frame dramatically. As you may have noticed we've bumped the release version to 2.2 from 2.1. This is because there are some API breaking changes and some core fundamentals have been updated as well. The biggest change here is the move to a proper fixed-step internal game loop. The logic and rendering are now fully decoupled, with both Arcade Physics and Tweens having been updated to use this new system. This is by no means a panacea for overloading low-powered mobile devices. However it will help prevent issues arising from devices running Phaser games at different speeds just because it has a slower processor. Also given a large update is the Tween Manager. This is now hooked in to the new timestep code, smoothing out tweens when the frame rate drops. New features have been added, including the ability to pause and resume a whole timeline of tweens and tween chaining has vastly improved. The Change Log is indeed extensive. I would say that if you are *already* working on a Phaser game, and a good way through development, then you should carry on with whatever version you used before. But for all new projects definitely take the leap into 2.2 and I hope you enjoy splashing around in its new features Thank you to everyone who beta tested 2.2 with us in one of its many Release Candidate incarnations. Your feedback helped fix issues that would have been otherwise troublesome to find and it's a process we'll carry on with for future builds. 2014 has been an amazing year for Phaser and I'd like to take this opportunity to thank everyone who has been involved, one way or another. Your support has been fantastic and we've built great things. Here's to 2015. Cheers, Rich
  48. 13 points

    Babylon Projects

    Hello, I just released a new game called BLOCK here : http://pixelcodr.com/games/block/index.html Move the block with the arrow keys and try to complete all levels !
  49. 12 points

    BabylonJS EditControl

    Documentation: https://ssatguru.github.io/BabylonJS-EditControl/ Demo: https://ssatguru.github.io/BabylonJS-EditControl/demo Source and Download: https://github.com/ssatguru/BabylonJS-EditControl/releases Release 3.1.0 (01/22/2018) * planar guides always rotate to face camera. makes it easier to pick them * mesh with parents or childs are properly supported. see https://ssatguru.github.io/BabylonJS-EditControl/demo-parenting.html * constructor now has an additional optional parameter called "pickWidth". This determines how close the pointers need to get to an axis before the axis can be picked up. The default is 0.02 * constructor "scale" parameter has been made optional. Default is 1. * code refactored. private properties are prefixed with underscore "_". This warns JavaScript coders from using those as JavaScript does not honor TypeScript's "private" keyword. Underscore also helps with property name mangling and thus reducing the minified size. * added additional demo file (demo-parenting.html). The long term intention being to use these for tests. Release 3.0.0 (12/31/2017) major change to rotation UI now uses the more common "spherical" guides new methods getPosition() getRotationQuaternion() hide() show() isHidden() setVisibility() few properties and methods which were private were exposed by mistake. They are now hidden code refactoring. Release 2.5.0 (12/03/2017) added translation and scaling bounds. client can limit translation and scaling between a minimum and maximum value contributed by @focomoso Release 2.4.5 (09/04/2017) see https://github.com/ssatguru/BabylonJS-EditControl/releases for details with this release the edit control is now also available from the NPM repository Release 2.3.0 (06/05/2017) Changes migrated from Java to TypeScript rewrote picking process to make the control snappier added transforms in planes added scale snap changed UI - hopefully more intuitive now Release 1.0.0 (03/22/2016) Of late I had been working on a small in-world kind of 3D editor similar to what you find in open sim or second life kind of virtual worlds. As I worked on it I realized that the part used for controlling translation, rotation or scaling of objects can be re-written as a reusable component. So that' what I did I created, what I call a "BabylonJS EditControl". You can use this in your editor, if you like, to handle translation, rotation or scaling of meshes. For a simple demo see https://ssatguru.github.io/BabylonJS-EditControl/demo For source code and explanation on how to use it from your code see https://github.com/ssatguru/BabylonJS-EditControl The initial version was written using Java and JSweet. ( don't think I could have done this without JSweet ) Newer versions from 2.3.0 have been written using TypeScript. Please try and provide some feedback. Regards
  50. 12 points
    Hi guys, This weekend I joined ludum dare again and I managed to build a game using babylonJS. The theme that was chosen was "one room". This is the game I created: http://jppresents.net/static/ld37/ You play with the mouse, holding down the mouse button fires the laser. Not much more to say.. obviously you don't want them to reach the bed. Pressing "s" toggles sound on and off. And here is a short timelapse of the creation within about 13 hours. (This includes creating everything from code to assets, except for the custom loading screen.) Thank you guys for the cool engine and the awesome playground examples. Special thanks to everyone from http://www.html5gamedevs.com/topic/21992-creating-a-scanning-laser-effect/