GSoC- SDF fonts and OpenGL

What did I do this week?

FURY

| I’ve created the PR that will allow FURY to draw hundreds thousands of labels using texture maps. By default, this PR give to FURY three pre-built texture maps using different fonts. However, is quite easy to create new fonts to be used in a visualization. | It’s was quite hard to develop the shader code and find the correct positions of the texture maps to be used in the shader. Because we used the freetype-py to generate the texture and packing the glyps. However, the lib has some examples with bugs. But fortunelly, now everthing is woking on FURY. I’ve also created two different examples to show how this PR works.

*   

    The first example, viz_huge_amount_of_labels.py, shows that feature has a realy good performance. The user can 
    draw hundreds of thounsands of characters in a regular computer.

  ![](https://user-images.githubusercontent.com/6979335/129643743-6cb12c06-3415-4a02-ba43-ccc97003b02d.png)

*   The second example, viz_billboad_labels.py, shows the different behaviors of the label actor. In addition, presents 
  to the user how to create a new texture atlas font to be used across different visualizations.
  • PR fury-gl/fury#437:
    • Fix: avoid multiple OpenGl context on windows using asyncio

      The streaming system must be generic, but opengl and vtk behaves in uniques ways in each Operating System. Thus, can be tricky 
      to have the same behavior acrros different OS. One hard stuff that we founded is that was not possible to use my 
      TimeIntervals objects (implemented with threading module) with vtk. The reason for this impossibility is because we can't use 
      vtk in windows in different threads. But fortunely, moving from the threading (multithreading) to the asyncio approcach (concurrency) 
      have fixed this issue and now the streaming system is ready to be used anywhere.
      
    • Flickering

      Finally, I could found the cause of the flickering effect on the streaming system. 
      This flickering was appearing only when the streaming was created using the Widget object. 
      The cause seems to be a bug or a strange behavior from vtk. 
      Calling  
      

iren.MouseWheelForwardEvent() or

iren.MouseWheelBackwardEvent() inside of a thread without invoking the Start method from a vtk instance produces a memory corruption. Fortunately, I could fix this behavior and now the streaming system is working without this glitch effect.

FURY/Helios

This uses the PRfury-gl/fury#489: to give the network label feature to helios. Is possible to draw node labels, update the colors, change the positions at runtime. In addition, when a network layout algorithm is running this will automatically update the node labels positions to follow the nodes across the screen.

image1

This PR granted compatibility between IPC Layouts and Windows. Besides that , now is quite easier to create new network layouts using inter process communication

Did I get stuck anywhere?

I did not get stuck this week.

Bruno Messias
Bruno Messias
Ph.D Candidate/Software Developer

Free-software enthusiast, researcher, and software developer. Currently, working in the field of Graphs, Complex Systems and Machine Learning.

comments powered by Disqus

Related