<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Taieb Chaâbini on Medium]]></title>
        <description><![CDATA[Stories by Taieb Chaâbini on Medium]]></description>
        <link>https://medium.com/@taiebchaabini?source=rss-816ca351c572------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*37aR_k8NZKnOK2IxmeujmQ.jpeg</url>
            <title>Stories by Taieb Chaâbini on Medium</title>
            <link>https://medium.com/@taiebchaabini?source=rss-816ca351c572------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 23:42:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@taiebchaabini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[WebVR/WebXR]]></title>
            <link>https://taiebchaabini.medium.com/webvr-webxr-ea3941681b4?source=rss-816ca351c572------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea3941681b4</guid>
            <category><![CDATA[ar-vr]]></category>
            <category><![CDATA[webxr]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[webvr]]></category>
            <category><![CDATA[webgl]]></category>
            <dc:creator><![CDATA[Taieb Chaâbini]]></dc:creator>
            <pubDate>Mon, 22 Mar 2021 15:15:18 GMT</pubDate>
            <atom:updated>2021-03-22T15:33:08.439Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick tour of WebXR</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*x5GCAAAb2m78D6-c8CM5tQ.jpeg" /></figure><p>Augmented Reality/Virtual Reality technologies are evolving so quickly to the point that some API will be deprecated. Therefore it is important to be updated about any new features.</p><h3>Difference between a framework and an API</h3><p><em>API or Application Programming Interface is a software intermediary that allows two applications to talk to each other.</em></p><p>A framework provides a foundation for programming while an API gives access to the framework’s elements, it is a software that is designed by experienced Software Engineers and Programmers, used to build versatile, robust, and efficient applications.</p><h3>Difference between 3DoF and 6DoF</h3><p><strong>DoF </strong>(Degree of Freedom) defines how refers to the freedom of movement of a rigid body in three-dimensional space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*kuYenGmf5tRX2tuDpPQ7RA.png" /><figcaption>Q<a href="https://www.queppelin.com/what-is-six-degree-of-freedom/">ueppelin</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*UFZ3A5tvZvGUwGBN0iZlew.png" /><figcaption>Q<a href="https://www.queppelin.com/what-is-six-degree-of-freedom/">ueppelin</a></figcaption></figure><p><strong>6DoF<br></strong>Specifically, the body is free to change position as:<br>- Up/Down (Elevating)<br>- Left/Right (Strafing)<br>- Forward/Backward (Surging)</p><p><strong>3DoF and 6DoF</strong><br>The orientation and rotation in VR are defined with three values<br>- Yaw (Normal axis)<br>- Pitch (Transverse axis)<br>- Roll (Longitudinal axis)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*NFtIhG8ysq19L_JcahlM1Q.png" /><figcaption>Q<a href="https://www.queppelin.com/what-is-six-degree-of-freedom/">ueppelin</a></figcaption></figure><h3><strong>What is WebVR</strong></h3><p>Introduced in 2016, <strong>WebVR </strong>was the first API to allow interactions between applications and Virtual Reality devices within the web browser : <br>It was an experimental JavaScript API so WebVR was never confirmed as a standard.</p><p><a href="https://webvr.info/"><strong>WebVR</strong></a><strong> </strong>has combined <a href="https://fr.wikipedia.org/wiki/WebGL"><strong>WebG</strong></a><strong>L </strong>and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API"><strong>Gamepad API</strong></a> allowing web applications to present content in Virtual Reality and to get access to the VR controllers like the Oculus Touch, the goal of the project was to provide a way to access VR experiences from a website that can run across devices such as “a touch screen smartphone” or a “3DoF/6DoF headset”.</p><p>From 2018, <a href="https://webvr.info/"><strong>WebVR</strong></a><strong> </strong>has evolved to <a href="https://www.w3.org/TR/webxr/"><strong>WebXR</strong></a>. (<a href="https://www.youtube.com/watch?v=b0KglUkvEak&amp;t=709s"><em>From WebVR to WebXR: The Next Generation of VR Experiences on the Web</em></a><em>)</em></p><h4><strong>Author</strong></h4><p>WebVR was conceived in spring 2014 by Vladimir Vukićević from Mozilla.<br><strong>Contributors<br></strong>The API’s contributors include Brandon Jones, Boris Smus and others from the Mozilla team.</p><h4><strong>Compatibility</strong></h4><p>WebVR was implemented in Firefox and Chromium-based browsers before being deprecated and removed.</p><blockquote><strong>WebVR 1.0 <br></strong>Firefox 55+ for Windows (64 bit version only)<br>Chrome for Android until version 80 as an Origin Trial Experiment, which means that developers can request a token to add to their website which will seamlessly enable <strong>WebVR</strong>. <br><strong>WebVR 1.1</strong> <br>Microsoft Edge from build 15002+, and in Samsung Internet, Chromium, Servo and Oculus Carmel. <br>Chrome for Windows supports <strong>WebVR 1.1</strong> in a special build.<br>Firefox 55+ on macOS also supports <strong>WebVR</strong> if a setting is enabled by the user.</blockquote><blockquote><strong><em>Source: </em></strong><em>Wikipedia</em></blockquote><h3><strong>What is WebXR Device API</strong></h3><p>WebXR is the API standard for web developers to create VR or AR applications, it supports accessing Virtual Reality (VR) and Augmented Reality (AR) devices simultaneously, including sensors and head-mounted displays, on the Web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*huLLzjAn7uBinERTKNcaIQ.gif" /><figcaption><a href="https://github.com/MozillaReality/unity-webxr-export">Unity demo using WebXR</a></figcaption></figure><ul><li>Improves support for 6DoF freedom tracking and varied tracking space</li><li>Includes a purpose-built API for VR Controller</li><li>Provides foundation for Augmented Reality and Mixed Reality using similar code</li><li>No installation required to view XR content</li></ul><h4>Compatibility</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*oGdbDJuSQBlrpKzxlIe9GQ.png" /><figcaption><a href="http://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API#browser_compatibility">Please click here to view the latest update of compatibilty</a></figcaption></figure><h3>WebXR frameworks i would use</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*eWadRuSxF_XUrV6UBVd4RA.png" /><figcaption><a href="https://aframe.io/docs/1.2.0/introduction/">Get started</a></figcaption></figure><h4>A-Frame</h4><p>An open-source web framework for building 3D/AR/VR experiences, absolutely the way to go if you want to create your first AR/VR experience, there are so many design possibilities, A-frame provides an accessible tool for everyone, easy to understand while meeting the performance needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*YQMrHyeo28NjkJg1rcoV1Q.gif" /><figcaption><a href="https://aframe.io/docs/1.2.0/introduction/">A-frame introduction</a></figcaption></figure><h4>Author</h4><blockquote><em>A-frame was originally developed within the </em><a href="https://en.wikipedia.org/wiki/Mozilla"><em>Mozilla</em></a><em> VR team during mid-to-late 2015.</em></blockquote><blockquote><em>It is maintained by developers from </em><a href="https://en.wikipedia.org/w/index.php?title=Supermedium&amp;action=edit&amp;redlink=1"><em>Supermedium</em></a><em> (Diego Marcos, Kevin Ngo) and </em><a href="https://en.wikipedia.org/wiki/Google"><em>Google</em></a><em> (Don McCurdy)</em></blockquote><blockquote><em>A-Frame’s first public release was on December 16, 2015. On December 16, 2019 A-Frame version 1.0.0 was released.</em></blockquote><p><strong><em>Source: </em></strong><em>Wikipedia</em></p><h4><strong>Pros</strong></h4><ul><li>Open-source</li><li>Nothing to install, no build steps.</li><li>HTML is easy to read, understand, and copy-and-paste.</li><li>Performance / Loading time</li><li>Cross-Platform</li><li>Accessible to everyone</li><li>Visual Inspector</li><li>Built on top of three.js</li><li>Large dev community</li><li>Used by companies such as Google, Disney, Samsung, Toyota, Ford, Chevrolet, Amnesty International, CERN, NPR, Al Jazeera, The Washington Post, NASA.</li><li>Companies such as Google, Microsoft, Oculus, and Samsung have made contributions to A-Frame.</li></ul><h4><strong>Cons</strong></h4><ul><li>Not suited for building big games</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*6s_Dkfeldg35ySmAp0tPkQ.png" /><figcaption><a href="https://threejs.org/">Get started</a></figcaption></figure><h4>three.js</h4><p>A lightweight cross-browser Javascript 3D library and API designed to create and display animated 3D computer graphics in the browser using WebGL.<br>It is also used for building XR experiences on the web.</p><h4>History</h4><blockquote>Three.js was first released by Ricardo Cabello (Mr.doob) to GitHub in April 2010.</blockquote><blockquote>Branislav Ulicny, an early contributor, started with Three.js in 2010 after having posted a number of WebGL demos on his own site. He wanted WebGL renderer capabilities in Three.js to exceed those of CanvasRenderer or SVGRenderer. His major contributions generally involve materials, shaders, and post-processing.</blockquote><blockquote>Soon after the introduction of WebGL 1.0 on Firefox 4 in March 2011, Joshua Koo came on board. He built his first Three.js demo for 3D text in September 2011. His contributions frequently relate to geometry generation.</blockquote><blockquote>Michael Herzog became an active contributor in late 2015. He is the second greatest contributor in terms of commits, behind Ricardo Cabello.</blockquote><blockquote>There are over 1300 contributors on GitHub.</blockquote><p><strong><em>Source: </em></strong><em>Wikipedia</em></p><h4><strong>Pros</strong></h4><ul><li>Open-source</li><li>Easy to learn</li><li>Founded by Google</li><li>Probably the best 3D framework</li><li>Highly maintained</li><li>Performance</li><li>Well documented</li><li>Supports most industry standard file formats</li><li>Supports XR</li></ul><h4><strong>Cons</strong></h4><ul><li>Not for beginners</li><li>Revised frequently, API changes</li><li>Requires a Javascript knowledge</li><li>More complex for building projects than a-frame</li></ul><p>Thank you for reading !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea3941681b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I’ve optimized my first VR game prototype on Unity]]></title>
            <link>https://taiebchaabini.medium.com/how-ive-optimized-my-first-vr-game-prototype-on-unity-4be50aa6146c?source=rss-816ca351c572------2</link>
            <guid isPermaLink="false">https://medium.com/p/4be50aa6146c</guid>
            <dc:creator><![CDATA[Taieb Chaâbini]]></dc:creator>
            <pubDate>Thu, 11 Mar 2021 10:36:33 GMT</pubDate>
            <atom:updated>2021-03-11T13:10:28.945Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eo4PqptoX-egiXmikIhhEg.png" /></figure><p>While playing a video game you might have experienced a lengthy loading screen and you are waiting to get back into the action, or a specific area/level that brings your FPS (Frames Per Second) to an almost unplayable state. Whatever the case, this is usually due to the game being poorly optimized.</p><p>I am a strong believer that lack of optimization is a game killer so I’ve been following Unity’s documentation to learn about the best practices and this is how I improved my first VR (Virtual Reality) game prototype on Unity.</p><p>There is a few must known tools used in Unity when going through the optimization process:</p><ul><li><a href="https://docs.unity3d.com/Manual/RenderingStatistics.html"><strong>Stats</strong></a> <br><strong><em>Path: Game view -&gt; Stats</em></strong></li></ul><figure><img alt="Quick review of technical statistics in the game view" src="https://cdn-images-1.medium.com/max/378/1*gvhQ8O5q4ngsFPz7BQHuhQ.png" /><figcaption>Quick review of technical statistics in the game view.</figcaption></figure><ul><li><a href="https://docs.unity3d.com/Manual/Profiler.html"><strong>Profiler</strong></a><strong><br><em>Path: Window -&gt; Analysis -&gt; Profiler</em></strong></li></ul><figure><img alt="Provides a very detailed performance information in areas such as the GPU, memory, renderer, physics, audio, etc.)" src="https://cdn-images-1.medium.com/max/1024/1*NMTWdtDskz-qIlIrYTwauQ.png" /><figcaption>Provides a very detailed performance information in areas such as the GPU, memory, renderer, physics, audio, etc.</figcaption></figure><ul><li><a href="https://docs.unity3d.com/Manual/FrameDebugger.html"><strong>Frame Debugger</strong></a><strong><br><em>Path: Window -&gt; Analysis -&gt; Frame Debugger</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*JzuZtCrTO8LOxsPQYCFQHA.png" /><figcaption>The <strong>Frame Debugger</strong> lets you freeze playback for a running game on a particular frame and view the individual <em>draw calls</em> that are used to render that frame.</figcaption></figure><p>Before going deeper, the best way I’ve preferred to start with is to check on the basic optimization stuff such as:</p><h3>Decreasing the batch count</h3><p>A simple way to deal with that is to mark all stationary (non-moving objects) as <strong>Static</strong>.</p><blockquote><strong>NOTE</strong></blockquote><blockquote>This might not always be a good idea; sometimes you have to sacrifice rendering performance by avoiding static batching for some GameObjects to keep a smaller memory footprint. For example, marking trees as static in a dense forest level can have serious memory impact<br><strong>Source:</strong> Unity</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*nmchhRdQxuvSpiVuQ77zjw.png" /></figure><h4><strong>What are batches ?</strong></h4><blockquote><strong>Dynamic batching:</strong><br>Unity can automatically batch moving GameObjects into the same draw call if they share the same Material and fulfill other criteria. Dynamic batching is done automatically and does not require any additional effort on your side.</blockquote><blockquote><strong>Static batching</strong>: combines static (not moving) GameObjects into big Meshes, and renders them in a faster way.</blockquote><blockquote>Allows the engine to reduce draw calls for geometry of any size provided it shares the same material, and does not move. It is often more efficient than dynamic batching (it does not transform vertices on the CPU), but it uses more memory.</blockquote><blockquote>In order to take advantage of static batching, you need to explicitly specify that certain GameObjects are static and do not move, rotate or scale in the game. To do so, mark GameObjects as static using the <strong>Static</strong> checkbox in the <strong>Inspector</strong></blockquote><blockquote><strong><em>Note:</em></strong> In the profiler batches is the total number of <a href="https://docs.unity3d.com/Manual/DrawCallBatching.html">batches</a> Unity processes during a frame. This number includes static, dynamic, and instance batches.<br><strong>Source: </strong>Unity</blockquote><p>To ensure that optimization I’ve enabled the Static and Dynamic batching in <strong><em>Projects Settings -&gt; Player -&gt; Other Settings</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxn-_pFByIVhSKqgS72sPQ.png" /></figure><p>From that point we can perceive that batching successfully decreased the CPU cost and rendering batches from <strong>1548 </strong>to <strong>1270.</strong></p><h3>Occlusion culling</h3><p>A simple way for getting more performances is to make an Occlusion Culling on any object that have been previously marked as static and which is not in the camera view so it will be ignored from performing rendering calculations.</p><p>Note that Occlusion culling needs to be baked, this can be done in <br><strong><em>Window -&gt; Rendering -&gt; Occlusion culling -&gt; Bake</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*dAXon7GzmemvLMpAkg7jJw.gif" /><figcaption>Simple preview of Occlusion culling.</figcaption></figure><h3>Profiling the end use device:</h3><p>My end use device was the <em>Oculus Quest 2</em> and optimizing VR applications can be challenging so it is important to identify and focus on where the bottlenecks really are, and optimize those sections first.</p><p>From here, I’ve checked if there were any CPU / GPU bound (relates if the CPU is waiting for GPU operations to finish and vice versa).</p><p>The target FPS for VR is 90 so I’ve started measuring the milliseconds (ms) of each operation. When profiling for a specific FPS there is a formula to work with to get our budget.</p><p>11 ms = 1000 / 90 (Target FPS)</p><p>I’ve also noticed when optimizing the batches that the SetPass Calls were too high for VR (1k3), <strong>it should not exceed 1000 per frame.</strong></p><p><a href="https://developer.oculus.com/documentation/native/pc/dg-performance-guidelines/">Please check this guideline for Oculus Optimization</a></p><p>Since optimization can really be time consuming I’ll keep this story updated as I go. That’s my first story about optimization, thanks for reading and stay tuned for new stories !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4be50aa6146c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to display a graphical linux program running on vagrant with Xming]]></title>
            <link>https://taiebchaabini.medium.com/how-to-display-a-graphical-linux-program-running-on-vagrant-with-xming-d1d0c125953c?source=rss-816ca351c572------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1d0c125953c</guid>
            <category><![CDATA[vagrant]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[xming]]></category>
            <dc:creator><![CDATA[Taieb Chaâbini]]></dc:creator>
            <pubDate>Tue, 24 Dec 2019 09:58:07 GMT</pubDate>
            <atom:updated>2019-12-24T09:58:07.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*kujAdxWlWobGVzql.png" /></figure><p>After reading this you will be able to display a graphic linux program running on vagrant or a remote linux server. The output will appear directly in your windows 10.</p><p><strong>We will use</strong> :</p><ul><li><strong>Xming </strong>: X-Windows terminal emulator (X Server) that runs on Microsoft Windows computers. Xming allows the Windows machines to display a graphical linux program which is basically running on a remote Linux server. <a href="https://sourceforge.net/projects/xming/files/latest/download">Click here to download the latest version</a></li><li><strong>Putty</strong> : to secure an X-Window session using Xming with PuTTY SSH Client. <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">Click here to download the latest version</a></li></ul><p><strong>Required informations</strong> :</p><ol><li>Hostname IP</li><li>Port</li><li>Login / Password of the remote machine or SSH KEY</li></ol><p><strong>Steps :</strong></p><ol><li>Start Xming</li><li>Open the session configuration with PuTTy (Start PuTTy)</li><li>In PuTTY configuration window, go to <strong>Connection → </strong>SSH <strong>→ X11</strong></li><li>Make sure that the <strong>Enable X11 forwarding</strong> box is checked</li><li>Make sure you have the correct hostname / port filled in the Session Category</li><li>Connect</li><li>Launch any GUI application from PuTTY and it will appear on your windows 10 screen !</li></ol><p><strong>If you dont use vagrant as remote machine you can pass this part</strong></p><p>To get the required informations with vagrant :</p><ol><li>vagrant up</li><li>vagrant ssh-config</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*qX50gJ-sfvRgPwZcakTgWg.png" /></figure><p>In this tutorial we will assume that the Host Name is <strong>127.0.0.1 </strong>and port is : <strong>2222</strong></p><p>PuTTy configuration should be like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*cJCLEt_ZCUEv7ftV9hI4pw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*sp0AhvUqvCEb7ix1tXmAjw.png" /></figure><ul><li>Connect to the remote machine with PuTTy</li><li>Launch your application on the PuTTy command line ./yourprogram and it will appear on your windows 10</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1d0c125953c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>