Articles on lenixlobo's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on lenixlobo's BlogenMon, 24 Aug 2020 10:22:32 +0000Weekly Check-In: Week 13https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-13/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> Today marked the official end of the coding period for Google Summer of Code 2020. On this day i would like to take the opportunity to thank all my mentors and Soham who have shown immense support during this time and helped me grow not only to be a better programmer but also to be a better team member. While the GSoC period ends, i will try my best to be active and contribute to the project and help it grow.<br> Cheers!</p> <h2><b>What did I do this week</b></h2> <p>This being the final week of GSoC , my task was to create a PR which showcases not only the shader capabilities of the project but also to create a example which integrates both the UI and shader system of project FURY. This example can help new users to get familiar with both the UI and shaders.<br> Apart from this i also worked on a Toon Shader.</p> <p>The output for the above task is given below:<br>  </p> <p><img alt="" src="/media/uploads/6c73d86a-b971-4602-86cb-d9e4fc4cef57.gif"></p> <p> </p> <p> </p> <p> </p> <p> </p> <h2><b>What's coming up next</b></h2> <p>The next week i will work on the final GSoC documentation which explains what i worked on throughout the GSoC period.In case of any changes are requested by the mentors I will also try to implement them. </p> <h2><b>Did I get stuck anywhere</b></h2> <p>With the help of Soham and the mentors this week went smoothly.</p>lenixlobo@gmail.com (lenixlobo)Mon, 24 Aug 2020 10:22:32 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-13/Weekly Check-In: Week 12https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-12/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week , Picking Outline</p> <h2><b>What did I do this week</b></h2> <p>We needed a Outline feature in FURY to indicate which model we choose in the scene. So the task assigned was to find options to achieve this. There were two ways to do this, 1. Using shader and 2. Using Vtk PolyData Silhouette. Despite trying multiple implementation methods the shader approach was not working . I also tried using VTKs inbuilt function , but there is a bug when i use some models. When i choose a model, it renders outline for every polygon , which is not what we want to achieve. The bug is shown below:</p> <p>Below are the outputs of the techniques i worked on :</p> <p> </p> <p> </p> <p><img alt="" src="/media/uploads/bd420e75-630d-4fbc-acf7-b8697b6dee58.gif"></p> <p> </p> <p> </p> <h2><b>What's coming up next</b></h2> <p>With the end of GSoC approaching soon, the next task is to create a PR which can help new users to test different shaders using UI to get started </p> <h2><b>Did I get stuck anywhere</b></h2> <p>I still was not able to figure out how we can achieve the outline effect. Am currently looking into other approaches we could use</p>lenixlobo@gmail.com (lenixlobo)Mon, 17 Aug 2020 14:15:19 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-12/Weekly Check-In: Week 11https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-11/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week , more shaders</p> <h2><b>What did I do this week</b></h2> <p>The task assigned for this week was to explore more shader techniques which could be implemented using FURY and which would demonstrate the capability of FURY shader system. So i decided to work on implementing shading examples such as Gooch shading and reflection shader using textures.</p> <p>Below are the outputs of the techniques i worked on :<br> <img alt="" src="/media/uploads/431c6664-8e8c-417b-9f8b-5e97d9a0bf51.gif"></p> <p><img alt="" src="/media/uploads/d1d150f6-ae8d-4506-b160-de00fadfd8b8.gif"></p> <p><img alt="" src="/media/uploads/d9d409af-abcc-4439-b74f-9704265a7ea2.gif"></p> <p>The shader demos are available at :<br> <a href="https://github.com/lenixlobo/fury/tree/shader-demos">https://github.com/lenixlobo/fury/tree/shader-demos</a></p> <h2><b>What's coming up next</b></h2> <p>The next week will involve working on more such demos which can demonstrate the capabilities of FURY</p> <h2><b>Did I get stuck anywhere</b></h2> <p>No issues were faced this week</p>lenixlobo@gmail.com (lenixlobo)Sun, 09 Aug 2020 07:56:11 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-11/Weekly Check-In: Week 10https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-10/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week , more shaders</p> <h2><b>What did I do this week</b></h2> <p>After merging the SDF actor last week , the mentors and i decided to work on another project idea which was discussed prior to GSoC . So the next step assigned to me was to look into current shader framework and create immersive visualizations using shaders. Being interested in volumetric rendering i looked into volumetric cloud rendering algorithms and created a basic shader based render in FURY.<br> The output for the same is given below:<br> <img alt="" src="/media/uploads/987af72d-a7e8-491b-855e-79d0ed50651a.gif"></p> <p><img alt="" src="/media/uploads/e387cc66-d248-4f90-b8cb-08f46a60db2f.gif"></p> <p>The above examples  uses multiple box primitives to create a large canvas like effect</p> <p> </p> <p>The shader demos are available at :<br> <a href="https://github.com/lenixlobo/fury/tree/shader-demos">https://github.com/lenixlobo/fury/tree/shader-demos</a></p> <h2><b>What's coming up next</b></h2> <p>The main focus now is to discuss and work on shader demos which an demonstrate the capabilities of FURY </p> <h2><b>Did I get stuck anywhere</b></h2> <p>No issues were faced this week</p>lenixlobo@gmail.com (lenixlobo)Sun, 02 Aug 2020 18:32:48 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-10/Weekly Check-In: Week 9https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-9/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week , merging the SDF PR</p> <h2><b>What did I do this week</b></h2> <p>Since GSoC started I have been working on adding support for raymarching based SDF actors as primitives in the FURY codebase. This week with the release of FURY 0.6.0 , the task assigned to me was to complete the remaining parts of the SDF actor including tests and tutorial. THe SDF actor is now part of the FURY actor and can be accessed using sdf_actor.<br> Currently we support , ellipsoids, spheres and torus as primitive options. As expected, SDF based actors have shown tremendous performance improvements over traditional polygon based actor.<br> <br> <br> Despite using 100,000 torus the FPS is higher than 60 :<br> <img alt="" src="/media/uploads/d4af1699-20b2-4b72-ae16-cdb91a62d812.gif"></p> <p> </p> <p>10,000 actors:<br>  </p> <p> </p> <p><img alt="" src="/media/uploads/d87cf1c6-bae6-419f-a63a-e69888c83931.gif"></p> <p>I also made a tutorial for new users to get started with </p> <p><a href="https://fury.gl/latest/auto_tutorials/04_shaders/viz_sdfactor.html#sphx-glr-auto-tutorials-04-shaders-viz-sdfactor-py">https://fury.gl/latest/auto_tutorials/04_shaders/viz_sdfactor.html#sphx-glr-auto-tutorials-04-shaders-viz-sdfactor-py</a></p> <h2><b>What's coming up next</b></h2> <p>Now that the SDF actor is merged , the next step is to focus on spherical harmonics and i will also be working on creating shader visualization to showcase the features of FURY</p> <h2><b>Did I get stuck anywhere</b></h2> <p>This week involved alot of work , including making tests, tutorial and looking for bugs but everything went smoothly .</p>lenixlobo@gmail.com (lenixlobo)Mon, 27 Jul 2020 05:06:50 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-9/Weekly Check-In: Week 8https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-8/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week, improvements in SDF primitives.</p> <h2><b>What did I do this week</b></h2> <p>Over the past few weeks i have been working on adding SDF based actors in FURY. The task for this week was to complete the remaining features such as support for scaling and rotation based on user direction for the actors. The main objective is to complete the SDF actor and make it ready to merge into the FURY codebase.</p> <p><strong>Scaling:</strong></p> <p><img alt="" src="/media/uploads/0496067b-b392-4086-b046-2f4938608713.gif"></p> <p><br> <strong>Rotation based on direction:</strong></p> <p><img alt="" src="/media/uploads/597d6d96-bc6a-4a2e-b018-59b5b9f27b40.gif"><br> <br> <strong>The code for the above render is available at the branch :</strong></p> <p><a href="https://github.com/lenixlobo/fury/tree/SDF-Experiments">https://github.com/lenixlobo/fury/tree/SDF-Experiments</a> </p> <h2><b>What's coming up next</b></h2> <p>Since the features are almost done the task for next week is clean the code and test for bugs. And then to eventually merge the  sdf_actor into the fury codebase.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>No major issues this week. </p>lenixlobo@gmail.com (lenixlobo)Mon, 20 Jul 2020 05:48:41 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-8/Weekly Check-In: Week 7https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-7/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey Everyone! <br> This week, multiple SDF primitives.</p> <h2><b>What did I do this week</b></h2> <p>The objective of this week was to understand the capabilities of the multiple SDF primitives within the same cube project. To get a clearer understanding of what we can achieve with this approach, i added support for real time rotating primitives. The output of 2 cubes with rotating SDFs is shown below.</p> <p> </p> <p><img alt="" src="/media/uploads/65cb2c8f-bf7d-47c3-b9a1-0d960835009b.gif"><br> <br> <strong>The code for the above render is available at the branch :</strong></p> <p><a href="https://github.com/lenixlobo/fury/tree/SDF-Experiments">https://github.com/lenixlobo/fury/tree/SDF-Experiments</a> </p> <h2><b>What's coming up next</b></h2> <p>The task for next week is to implement features in the SDF actor and also to fix minor bugs within the shaders. Once everything is done as planned, the PR will be merged for users to access the features.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>No issues this week</p>lenixlobo@gmail.com (lenixlobo)Mon, 13 Jul 2020 05:27:30 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-7/Weekly Check-In: Week 6https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-6/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey ! <br> Spherical harmonics, Continued!</p> <h2><b>What did I do this week</b></h2> <p>Last week I added a basic implementation of Spherical harmonics based actors. However, the implementation was quite restricted and we needed to add support for more accurate generation of spherical harmonics. So the task assigned this week was to implement the spherical harmonics function within the shader rather than passing variables as uniforms. This was quite an challenging task as it involved understanding of mathematical formulae and implementing them using existing GLSL functions.<br> <strong>The output of the implementation is shown below</strong></p> <p> </p> <p><img alt="" src="/media/uploads/dd7537a5-40ed-4275-910a-070caf2e26d1.gif"></p> <p> </p> <p>While , i was able to complete the task the frame rate for the generated output was quite lower than expected. </p> <p><br> <br> <strong>The code for the above render is available at the branch :</strong></p> <p><a href="https://github.com/lenixlobo/fury/tree/Spherical-Harmonics">https://github.com/lenixlobo/fury/tree/Spherical-Harmonics</a>  </p> <h2><b>What's coming up next</b></h2> <p>The next task is to discuss possible performance improvements with the mentors and also look into alternative ideas to add spherical harmonics as actors in FURY.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>Spherical harmonics involve a lot of complicated math behind the hood as a result the generated output has a very poor frame rate. Currently, we are looking into improving this.</p>lenixlobo@gmail.com (lenixlobo)Sun, 05 Jul 2020 17:35:04 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-6/Weekly Check-In: Week 5https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-5/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey ! <br> This week, Spherical harmonics!</p> <h2><b>What did I do this week</b></h2> <p>The main task for the week was to include an implementation of spherical harmonics (upto the order of 4) as a FURY actor. This was the initial milestone to be achieved to work towards the support of using spherical harmonics as an visualization technique. I have added the GIFs for both the renders below. I also worked on a occlusion based lighting model .<br> <br> <strong>Spherical harmonics for different values of order and degree:</strong></p> <p> </p> <p><img alt="" src="/media/uploads/a1b4710d-e4c6-4a01-a0f7-46b27155e7bd.gif"></p> <p><img alt="" src="/media/uploads/026b4839-7444-4cc7-8b46-032458f861e1.gif"></p> <p> </p> <p><br> <br> The code for the above render is available at the branch : <a href="https://github.com/lenixlobo/fury/tree/SDF-Experiments">https://github.com/lenixlobo/fury/tree/SDF-Experiments</a>  </p> <h2><b>What's coming up next</b></h2> <p>The next task to add support for the user to be able to render different spherical harmonics by passing argumentst</p> <h2><b>Did I get stuck anywhere</b></h2> <p>Spherical harmonics involve a lot of complicated math behind the hood. So the initial days were spent understanding the math .I was confused while working on the implementation but eventually got it working. .</p>lenixlobo@gmail.com (lenixlobo)Sun, 28 Jun 2020 15:16:16 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-5/Weekly Check-In: Week 4https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-4/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey ! <br> Raymarching continued!</p> <h2><b>What did I do this week</b></h2> <p>As you read in my last blog post, while the SDF primitives were working , there was slight deformation in the render. So the main focus for this week was working on solving the deformation bug. Initially the suspect was possibly the coordinate space in which the ray marching algorithm was being computed, however after testing multiple combination of transformations the issue wasn't solved. To avoid getting stuck too long on a single bug, I decided to simultaneously work on any alternatives to the current approach. So i started working on the 2nd approach. The idea was to render multiple primitives in a single cube rather than one SDF per cube. This turned out to be highly beneficial as while implementing this , i realized what was causing the deformation . I have added the GIFs for both the renders below. I also worked on a lambertian lighting model to create a more realistic render.<br> <br> <strong>Multiple Primitives within a single cube:</strong></p> <p><img alt="" src="/media/uploads/6a9d3d73-f90e-4630-b07e-9ea127dc8b35.gif"></p> <p><br> <strong>Solved deformation with added lambertian Lighting: </strong></p> <p><img alt="" src="/media/uploads/89675468-1286-4276-84e9-cf6ce03af18c.gif"><br> <br> The code for the above render is available at the branch : <a href="https://github.com/lenixlobo/fury/tree/SDF-Experiments">https://github.com/lenixlobo/fury/tree/SDF-Experiments</a>  </p> <h2><b>What's coming up next</b></h2> <p>The next task assigned is to add support for spherical harmonics as primitives.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>I was stuck on the deformation issue for most of the week, but was eventually able to solve that.</p>lenixlobo@gmail.com (lenixlobo)Sun, 21 Jun 2020 16:38:38 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-4/Weekly Check-In: Week 3https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-3/<p><br> Make sure to check out Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey ! <br> This week, Raymarching!</p> <h2><b>What did I do this week</b></h2> <p>This was an exciting week as i got to learn and implement the ray marching algorithm in the FURY repo. In the weekly meeting, the mentors suggested adding support for SDF modelled actors as an alternative to the existing FURY actors. After going through a few implementations of ray marching in GLSL, i proceeded with the implementation in VTK. After being able to render a torus , the next logical step was to add support for multiple actors in the same window. The below render shows support for multiple SDF actors :<br> <br> <br> <img alt="" src="/media/uploads/152ead03-049a-4e4d-b836-38e8c0f119ee.gif"><br> <br> The code for the above render is available at the branch : <a href="https://github.com/lenixlobo/fury/tree/SDF-Experiments">https://github.com/lenixlobo/fury/tree/SDF-Experiments</a>  </p> <h2><b>What's coming up next</b></h2> <p>In the above output, there is some deformation in some of the cubes, The next step is to get rid of this deformation .<br> Also i will be working on adding lighting within the shaders for a slightly more realistic experience.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>Going through and understanding theVTK documentation was quite a challenging task,<b> </b>however whenever i was confused the doubts were immediately cleared by the mentors</p>lenixlobo@gmail.com (lenixlobo)Sun, 14 Jun 2020 13:09:29 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-3/Weekly Check-In: Week 2https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-2/<p>&lt;meta charset="utf-8"&gt;<strong>Project FURY </strong>: <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a></p> <p>Hey everyone!</p> <p>This week : Geometry Shaders!</p> <h2><b>What did I do this week</b></h2> <p>To get a better understanding of the working of the shader pipeline, the mentors assigned me a challenging task of implementing a Dynamic Texture. The basic idea is to create a 'volumetric' texture by stacking layer of textures. Such an example is an ideal use case for a geometry shader. Since i had not much prior experience with Geometry shaders before, i spent the initial days going through existing implementations of similar ideas in OpenGL/DirectX.  <br> After working on the code, the final image rendered is given below. <br> <img alt="" src="/media/uploads/d537c24d-1ae7-45e8-be3f-0e6cfbe20bc5.png"><br> <br> I created a PR for the fur texture which is available at <b><a href="https://github.com/lenixlobo/fury/blob/Dynamic-Texture/docs/experimental/viz_dynamictex.py">https://github.com/lenixlobo/fury/blob/Dynamic-Texture/docs/experimental/viz_dynamictex.py</a>.</b></p> <p> </p> <h2><b>What's coming up next</b></h2> <p>The current PR has some minor bugs which need to be fixed. The next step would be to review the code and find the solutions for the bugs. Also we are looking into ideas on optimization for faster rendering time.</p> <p>The next week will be spent looking into ray marching algorithms and adding them to the current code base as possible alternatives for FURY Actor primitives.</p> <h2><b>Did I get stuck anywhere</b></h2> <p>Nothing major<b>.</b></p> <p> </p>lenixlobo@gmail.com (lenixlobo)Sun, 07 Jun 2020 14:10:39 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/weekly-check-in-week-2/GSoC Blog :  Week 1https://blogs.python-gsoc.org/en/lenixlobos-blog/gsoc-blog-week-1/<p>Project FURY : <a href="https://github.com/fury-gl/fury">https://github.com/fury-gl/fury</a><br> Hey everyone!<br> This is my blog for this summer’s GSoC @ PSF<br> I am Lenix Lobo, an undergraduate student from India, and this summer I will be working with project Fury under the umbrella of the Python Software foundation. I will be working on improving the current shader framework.</p> <p><br> <strong>What did you do during the community bonding period?</strong></p> <p>Since most of the places including my university are closed due to the pandemic outbreak, I decided to get a head start and start with the project early. During the community bonding period, I had video conference meetings with my mentors scheduled every week on Wednesday. During these meetings i interacted with the mentors to have a coherent understanding of how the project design and implementation will be managed over the course of the entire period. <br> Since my project involves a lot of theoretical understanding of concepts such as ray marching, I spent the period going through the theory of each topic.This week also involved going through the documentation for shaders used in VTK. </p> <p><br> <strong>What is coming up next ?</strong><br> The next task assigned to me is to go through the theory of geometry shaders and to create a example using the same. </p> <p><strong>Did you get stuck anywhere?</strong><br> Since, some of the documentation on VTK shaders was not upto date, i had to go through example implementations to understand the nomenclature of variables and their respective usage.</p>lenixlobo@gmail.com (lenixlobo)Sat, 30 May 2020 07:10:04 +0000https://blogs.python-gsoc.org/en/lenixlobos-blog/gsoc-blog-week-1/