Showing posts with label babylonjs. Show all posts
Showing posts with label babylonjs. Show all posts

10/30/18

BabylonJS applied | Model Train Simulator

Some nice examples of BabylonJS applications. Who doesn't like model trains anyway? :)





You'll find the project and demo's over here:

The project site (by Quintus Hegie): https://quintushegie.com/gardentrains/

We'll be organizing more workshops on BabylonJS in our Wednesday Evening Trainings!

This is great techology and a lot of fun programming! We've already had sessions on BabylonJS (and OpenGL and Unity3D) in our Wednesday Evening Trainings, and we'll definitely continue!

You 'll find post of previous WET sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining, and more posts on BabylonJS here: http://hansrontheweb.blogspot.com/search/label/babylonjs

10/12/18

This week's Wednesday Evening Training: a "klusavond" on a giant Arduino driven LED cube, a lot of sensors and generating 3D Archimate models

In this week's Wednesday Evening Training we had some great demo's and discussions on our individual projects on IoT and 3D modelling.





A lot of IoT

Aish showed us her giant LED cube (10x10x10 LED's, that's a lot of soldering!) and explained to us how she managed to build and run it. We discussed powering such a large collection of LED's and how the software was designed. Such a bug LED cube offers plenty of applications, including running 3D animations and games within the cube. We've started building a graphics library for basic LED handling that is going to be a great help in building such applications.

Aish also showed us her multi sensor project; a test platform on which all sorts of sensors are installed. We discusses the various sensor types, how to connect and use them and how (combined) measurements can best be done. Interesting stuff! One of the topics we also discussed is the way which the sensors are read in the software. That can be done in a loop but also using interrupts (low level event handlers). The latter method is faster, less error prone and cleaner. We'll be investigating this technique in the upcoming Wednesday Evening Training IoT sessions.







Archimate architecture models in BabylonJS 3D

This week's session, I gave give a demo of my BabylonJS prototype in which an Archimate model view (using the free Archi editor) is converted into a BabylonJS 3D model. For complex architectures, 3D modelling may give more insight than plain 2D models. Worth doing some experiments to see whether this is a good approach. The Technical Proof of Concept is running great. It uses MySQL as a central database and a simple website with some Web Workers to gather model data, generating and continuously updating a JavaScript Archimate model and a derived Babylon 3D model from this in the background. Our colleague Fred van Nimwegen also joined my project and he had experimented with Neo4j in which he stored the Archimate model.  Neo4j is a graph database (while MySQL is a relational database). Graph databases have some advantages over relational databases, mainly when querying data collections that naturally resemble networks. And that is exactly what an architectural model resembles: a network of related nodes. Moreover: modern architectures are getting more dynamic and will change over time more rapidly. When analyzing an architecture model to answer architectural questions like "what will happen when I change this?", an efficient query language and dito database are very convenient. We've planned a Wednesday Evening Training session on Graph databases and Neo4j in november. Fred will then share his knowledge gained with us.





Further reading

Do you want to read more on the topics in this post? Here are some links…

Considering building your own LED cube? Start simple with a 4x4x4 cube (still 64 LEDS, but at least you won't be needing a nuclear plant to power it): https://www.instructables.com/id/4x4x4-LED-Cube-Arduino-Uno/
BabylonJS: https://www.babylonjs.com
Archi: https://www.archimatetool.com
Archimate tool database plugin: https://github.com/archi-contribs/database-plugin
Neo4j: https://en.wikipedia.org/wiki/Neo4j


Past Wednesday Evening Trainings

You 'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining


Next week 's Wednesday Evening Training

Next week, we'll have the intro on Progressive Web Apps (PWA)This a hot topic in the world of web development and its only growing further in popularity. It is a relatively new way to develop applications for the mobile phone, combining the best of the web and apps. We will cover benefits using a PWA instead of traditional hybrid/native solutions, the basics and possibilities of a PWA, show some examples in functionality and give an example of how you can get started building your own PWA’s quickly. Yes, there will also be a handson lab. In later sessions we expect to cover topics like push notifications, background refresh, et cetera. 

9/30/18

This week's Wednesday Evening Training: Taking a deep dive in WebGL coloring and continuing our BabylonJS labs

In this week's Wednesday Evening Training we continued our exploration of WebGL and BabylonJS.


A deep dive into coloring in WebGL and continuing our BabylonJS labs

Quincy Jacobs took us on a deep dive into WebGL and showed us how to add color to objects. Combining the Color and Position Vertex Buffers involves quite a bit of math. In order to polish up our mathematics in that area, we have planned a refresher hour for the Wednesday Evening Training on WebGL (that will be October 10th) . We also took plenty of time for our BabylonJS labs. Based on the labs we did last week, we experimented with diffferent camera's, light sources and materials. We also experimented with parent and child objects and did a bit of animation. More of that also on October 10th, then I'll give a demo of my BabylonJS prototype in which an Archimate model view (using the free Archi editor) is converted into a BabylonJS 3D model. For complex architectures, 3D modelling may give more insight than plain 2D models. Worth doing some experiments to see whether this is a good approach!


Further reading

Do you want to read more on the topics in this post? Here are some links…

Quincy's WebGL explanations and examples on GitHub: https://github.com/QuincyJacobs/WebGLTutorial
Building up a basic demo with Babylon.js: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_Babylon.js
A practical intro to BabylonJS (presentation): https://www.slideshare.net/HansRontheWeb/a-practical-intro-to-babylonjs-115869611

See also the BabylonJS links in my previous posts in the Wednesday Evening Training.

Past Wednesday Evening Trainings

You 'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next week 's Wednesday Evening Training

Next week 's Wednesday Evening Training In next week's Wednesday Evening Training, one of our security experts, Vince Corona, will give us some more examples of hacking and explain us the importance of security in ICT. In the previous session, we already had a great intro on security in which he explained and demoed some basic hacking scenario's.
This evening on october 3rd is also open for visitors! The location is our main office in Leidscherijn, Utrecht (The Netherlands). You can subscribe at the following URL: https://www.werkenbijcapgemini.nl/events/How-to-become-a-hacker

In the future, more of the Wednesday Evening Trainings will be opened for visitors. Make sure that you follow the #wednesdayeveningtraining on LinkedIn or my Blog.

9/22/18

This week's Wednesday Evening Training: Introduction to WebGL, BabylonJS and 3d/game engines

In this session, we continued our exploration of 3D modeling and animation with a deep dive into WebGL and BabylonJS. Quincy Jacobs and I gave explanation on the basic concepts and illustrated these with code walkthroughs of WebGL and BabylonJS examples. The class could also gain some experience with two handson labs in which graphics and animations were implemented.



WebGL 

WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins. WebGL is integrated completely into all the web standards of the browser, allowing GPU-accelerated usage of physics and image processing and effects as part of the web page canvas.

In the WebGL part, Quincy explained us the Graphics pipeline that is used to draw graphics. The concepts of a Vertex array buffer, Element array buffer, Vertex shader, Fragment shader and a Shader program have all been explained and illustrated based on a code example in which a triangle object was drawn on the screen. An effective way of really getting to know technology. There is a lot of math involved, so we also needed some recap of stuff we learned a long time ago :).

Quincy has published his WebGL explanations and examples on his GitHub site: https://github.com/QuincyJacobs/WebGLTutorial



BabylonJS

This is complete JavaScript framework for building 3D games and experiences with HTML5, WebGL, WebVR and Web Audio (https://www.babylonjs.com). It's based on WegGL, so if you understand the nuts and bolts of WebGL, it increases understanding of BabylonJS.

First I explained the basic concepts of BabylonJS. Basically, a BabylonJS application consists of a webpage in which a canvas element (just an HTML tag) is used for drawing a model into. The model is a scene in which model objects are defined, a camera is positioned, a light source is added (since it's rather difficult to see your objects in the dark) and a "render loop" is added to continously update the model. In the render loop you can add interactivity. Well, that's a BabylonJS application in a nutshell, in reality this can be a bit more complicated.

Based on the handson lab provided by Mozilla (see resources), we did a code walkthrough of the lab code in which the concepts were explained more thoroughly. The basic objects (called "meshes", like cubes, spheres, etc.) were discussed, but also self-defined objects. This last category can be composed on the basis of vectors. We went into the use of light; different light sources and their effect on the display of objects. In addition, animations were discussed and the way in which this can best be implemented in a BabylonJS application.
We also paid attention to more advanced topics like performance optimization (necessary because a lot of calculation work is involved, especially when implementing animation) and tooling. Using Blender, for example, you can create 3D objects that you can import easily in your BabylonJS scene. 

I've published my intro on SlideShare, you'll find the link in the resources section below. Game engines Also, we did a very quick overview on the architecture of (online, multi user) gaming engines. This is a fairly extensive subject for which we will certainly need more time. We will therefore take that time in the coming months.


Further reading

Do you want to read more on the topics in this post? Here are some links…

Quincy's WebGL explanations and examples on GitHub: https://github.com/QuincyJacobs/WebGLTutorial
Building up a basic demo with Babylon.js: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_Babylon.js
A practical intro to BabylonJS (presentation): https://www.slideshare.net/HansRontheWeb/a-practical-intro-to-babylonjs-115869611

See also the BabylonJS links in my previous posts in the Wednesday Evening Training.


Past Wednesday Evening Trainings

You 'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next week 's Wednesday Evening Training

In next week's Wednesday Evening Training, we will continue on WebGL and BabylonJS. We have some additional topics to discuss and some extra labs to play with. I'll also give a demo and explanation on my Archimate 3D model generator. This is my pet project that I've been busy with the past months. It's not finished yet, but it's a nice example of a basic multi user BabylonJS model generator combined with a primitive multi player game engine.

Also worth mentioning is the Wednesday Evening Training of october 3rd. That evening, one of our security experts, Vince Corona, will give us some more examples of hacking and explain us the importance of security in ICT. In the previous session, we already had a great intro on security in which he explained and demoed some basic hacking scenario's.

This evening on october 3rd is also open for visitors! The location is our main office in Leidscherijn, Utrecht (The Netherlands). You can subscribe at the following URL: https://www.werkenbijcapgemini.nl/events/How-to-become-a-hacker

In the future, more of the Wednesday Evening Trainings will be opened for visitors. Make sure that you follow the #wednesdayeveningtraining on LinkedIn or my Blog.

#capgemini, #wednesdayeveningtraining, #lifeatcapgemini, #workatcapgemini #webgl, #babylonjs, #3d, #graphics, #animation

9/12/18

This week's Wednesday Evening Training: a good old "klusavond" on IoT, 3D modelling and more…

In this week's Wednesday Evening Training we continued our individual projects on IoT, 3D modelling and more… On such evenings, things can be quiet (only typing noise) and lively in the same evening.



So what have we done?

Luc showed us progress on his Domoticz IoT project in which he was testing and optimizing connectivity in his "pool temperature measurement and adjustment project". He's promised us an intro on the Domoticz platform shortly. Quincy and I were propering next week's Wednesday Evening Training on WebGL, BabylonJS and 3d/game engines. There is really a LOT to demonstrate, explain and play with. For next week, we've determined the basic topics, selected examples and created some handson labs. Next week we will see how far we will come. In the tradition of the Wednesday Evening Training, we shift what we do not finish to the next week. It was instructive and fun!




Further reading

Do you want to read more on the topics in this post? Here are some links…

Domoticz: https://www.domoticz.com
BabylonJS: https://www.babylonjs.com
WebGL: https://en.wikipedia.org/wiki/WebGL 
OpenGL: https://en.wikipedia.org/wiki/OpenGL

Past Wednesday Evening Trainings

You 'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next week 's Wednesday Evening Training

Next week, we'll have the intro on WebGL, BabylonJS and 3d/game engines. Worth mentioning: on October 3rd the Wednesday Evening Training "How to become a hacker! Introduction to security & handson hacking, part 2" will be open for visitors as well. See https://www.werkenbijcapgemini.nl/events/How-to-become-a-hacker if you want to read more and sign up for the event.

8/1/18

This week's Wednesday Evening Training: continuing our 3d and IoT projects and a bit of Windows programming

This Wednesday Evening Training, we continued our exploration of IoT and 3D technologies and learned about Windows programming.

Also: a special welcome to our guests from Siemens Germany: Florian, Alexander and Achim.


Windows DIB Buffer and Sound Buffer

First we had a nice demo and code walkthrough of our colleague Quincy Jacobs, who has experimented with the Windows DIB Buffer and Sound Buffer using good old C++/C. This ignited a lively discussion on wave and sound generation and techniques used for that. It took me right back to the era of home computers, in which I experimented a lot with the Commodore 64's SID (Sound Interface Device) programmable sound generator chip. Revolutionary for it's time (see also: https://en.wikipedia.org/wiki/MOS_Technology_SID).

BabylonJS

Next, I gave an update on my BabylonJS Archimate model project. This week, I had implemented an Observer to keep the Archimate (JavaScript Object) model in sync with the BabylonJS model. This enables the 3D model of the architecture being updated at runtime. I abandoned the proxy approach that I mentioned last week, since this is not supported by IE (in Edge it is supported) and IMHO it's too early to exclude IE. Instead I used a classic Observer implementation in JavaScript. We did a code walkthrough and discussed application of the Observer- and Factory pattern in general and in JavaScript. There is interest to plan a separate knowledge session on BabylonJS and WebGL. BabylonJS is based on WebGL (Web Graphics Library), which is a JavaScript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins.

To be continued...

RFID (Radio-Frequency Identification)

As promised last week, we took a look at RFID technology. Roughly speaking: using a reader/writer  your application can interact with RFID tags (e.g. in your security card). Your RFID tag provides a unique id to your application, which you can use as a key in your database. In a nutshell this is the basis of access and registration systems. At very low costs, a few Euro's actually, you can have a lot of fun in your IoT project! See the links below for resources on this.
We could use RFID labels and a scanner for building an interactive toy for young children (see my last week's post on this). Based on RFID and Lilypad Arduino technology we should be able to create some kind of easily foldable and transportable carpet on which you can place all kinds of tagged objects and interact with them using an sowed in Lilypad Arduino.

Anyway... a lot to learn!

Further reading

Do you want to read more on the topics in this post? Here are some links...

RFID: https://en.wikipedia.org/wiki/Radio-frequency_identification
Tutorial 12 for Arduino: RFID Card Reading: https://www.youtube.com/watch?v=gIlSLwcbeTU
What is RFID? How RFID works? RFID Explained in Detail: https://www.youtube.com/watch?v=Ukfpq71BoMo
MF522 RFID Write data to a tag: https://www.youtube.com/watch?reload=9&v=uihjXyMuqMY
RFID Programming Made Simple and Cheap: https://www.developer.com/net/article.php/3628811/RFID-Programming-Made-Simple-and-Cheap.htm
BabylonJS, see my previous 19th july post: https://hansrontheweb.blogspot.com/2018/07/this-weeks-wednesday-evening-training_19.html
Understand the Factory Design Pattern in plain javascript (one of the many articles on this): https://medium.com/front-end-hacking/understand-the-factory-design-pattern-in-plain-javascript-20b348c832bd
The Observer Pattern in JavaScript explained: https://pawelgrzybek.com/the-observer-pattern-in-javascript-explained/
WebGL: https://en.wikipedia.org/wiki/WebGL

Past Wednesday Evening Trainings

You'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next Wednesday Evening Training

Next Wednesday Evening Training, we'll take a deep dive into Micro Services. We'll discuss this from both an architectural point of view and a (Java) software engineering point of view. Demo's will be shown, code walkthroughs will be done and hopefully we'll have yet again a lively discussion!

Experiment, learn and have fun!


#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #3d #virtualreality #unity3d #babylonjs #arduino #rfid #iot #internetofthings #archimate #archi #patterns #windowsprogramming #c #c++

7/25/18

This week's Wednesday Evening Training: continuing our Arduino, Raspberry Pi and Babylon projects and brainstorming on new projects

This Wednesday Evening Training, we have continued our exploration of IoT. We made progress on our projects and had a brainstorm of two new project initiatives: creating an application for tuning musical instruments (yes, like a digital pitchfork like the one that you can buy online for a few Euro's, but building one is a lot more fun) and building an interactive toy for young children (yes, with lots of lights and sounds, robust and easy to travel with).

One of the nice things of the Wednesday Evening Trainings is that it's free format. We, as a group, can decide on the spot what topics we want to discuss and what learning form we'll adopt. That's agile! In this case, two of our colleagues came up with some idea's for which we could immediately search for suitable technologies. In case of the toy project, we found out that using RFID and Lilypad Arduino we should be able to create some kind of easily foldable and transportable carpet on which you can place all kinds of tagged objects and interact with them using an sowed in Lilypad Arduino. It's a rough concept, but this could work.
Anyway... a lot to figure out to realize this. Therefore, the next Wednesday Evening Training will contain the following topics: RFID and Arduino Lilypad. We'll gather some links, labs, tools and share video's for this. There is a lot to be found on the internet. See my links below for a few pointers.

 

Also, this evening, we had a portion of BabylonJS for dinner. Last week I showed my first prototypes of a 3d architecture model. This week I showed a mechanism to synchronise a JavaScript based Archimate architecture model with a BabylonJS 3d (Mesh) model. Since it must be possible to immediately reflect changed in one model into the other, I looked for some kind of observer pattern implementation. I chose not to use a heavy framework like Angular, but keep my application as light weight as possible (perhaps I have to say: "Frameworkless JavaScript"). Luckily, JavaScript currently includes proxies, which is quite useful in this situation.
Also next week, I'll show my proceedings on the prototypes and do some explanation on JavaScript proxies.

To be continued...


Further reading

Do you want to read more on the topics in this post? Here are some links...

BabylonJS portal: https://www.babylonjs.com
JavaScript Proxies: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
RFID Basics: How to Read and Write Tags: https://blog.atlasrfidstore.com/rfid-basics-read-write-tags
Arduino hardware, also the Lilypad: https://www.arduino.cc/en/Main/Products
The ArchiMate Enterprise Architecture Modeling Language: http://www.opengroup.org/subjectareas/enterprise/archimate-overview
Archi Open Source ArchiMate Modelling Tool (a free and easy to use open source modelling tool to create ArchiMate models and sketches): https://www.archimatetool.com/

Past Wednesday Evening Trainings

You'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next week

In next week's Wednesday Evening Training, we'll be having an additional "klusavond" (translated into English as "a typical Dutch evening of doing, learning and a lot of fun") on Arduino, RFID and BabylonJS.


#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #3d #virtualreality #unity3d #babylonjs #arduino #arduinolilypad #rfid #iot #internetofthings #archimate #archi

7/19/18

This week's Wednesday Evening Training: continuing Virtual Reality with Unity3D and getting to know BabylonJS

This Wednesday Evening Training, we have continued our exploration of Virtual Reality using Unity3D. In previous sessions, we already learned what Unity3D can do, so we continued our handson labs guided by our Unity3D champion Alexandra Belzon.

We have also started exploring BabylonJS, with which I have played around past weeks.




We know Unity3D, but what is BabylonJS?

BabylonJS is an open source 3D engine based on webGL and JavaScript. With BabylonJS you can create well performing 3D models and animations, even on your mobile. You can "walk through" your model, use a cardboard VR headset and implement augmented reality applications. It's a rather recent technology, but the platform is growing fast in popularity.

There are a lot of applications for BabylonJS, e.g. in product and data visualization, gaming, education. Recently I even stumbled upon an application of BabylonJS in Microsoft SharePoint, visualizing and manipulating data and documents in 3D. See the links below for more information.

This evening, we saw a lot of demo's and code examples and we did our first handson labs. In the past weeks I've experimented using BabylonJS for creating a 3d model of Archimate architecture views, generating JavaScript from Archi XML's (.achimate files) using XSLT. We did a code walkthrough and in the next sessions, I'll be showing progress on my prototypes.

To be continued for sure!

Further reading

Do you want to read more on BabylonJS? Here are some links...

BabylonJS portal: https://www.babylonjs.com
BabylonJS Playground (online editor): https://www.babylonjs-playground.com
BabylonJS examples (select, view, edit): https://doc.babylonjs.com/examples
BabylonJS GitHub repo: platform software, tools, extensions, reusables: https://github.com/BabylonJS
BabylonJS online editor: http://editor.babylonjs.com
BabylonJS Meshes Library: https://github.com/BabylonJS/MeshesLibrary
Building up a basic demo with Babylon.js: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_Babylon.js
BabylonJS Sandbox - Drag and drop gltf, glb, obj or babylon files to view them: https://sandbox.babylonjs.com/
Babylon101 - Online course: https://doc.babylonjs.com/babylon101/
Introduction to WebGL 3D with HTML5 and Babylon.js: https://mva.microsoft.com/en-us/training-courses/introduction-to-webgl-3d-with-html5-and-babylonjs-8421
Microsoft is bringing the SharePoint work environment to virtual reality headsets: https://www.theverge.com/2018/5/21/17376422/microsoft-sharepoint-spaces-mixed-reality-virtual-reality-features
BabylonJS on Twitter: https://twitter.com/babylonjs
Google Cardboard: https://vr.google.com/cardboard/get-cardboard/

Past Wednesday Evening Trainings

You'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining


Next week

In next week's Wednesday Evening Training, we'll be having a "klusavond" (translated into English as "a typical Dutch evening of doing, learning and a lot of fun". There will be plenty of room for all the technologies we have learned so far. This kind of session form an excellent opportunity for mixing technologies, creating applications using multiple technologies.
In my opinion, a good way to create new idea's and innovate and having a lot of fun in the meantime!


#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #3d #virtualreality #unity3d #babylonjs