Community Post

First blog post on TouchDesigner about Litte Planet


I'm learning TouchDesigner (TD) since January 2024, did follow a course at SAT and tried by myself a few tutorials.

My motivation to learn TD was to overcome limitations I met in previous projects of mine - mainly done in Python - about Little Planets (LPs) image generation in Python with Hugin.

So below I will present what I want to do: 360 panorama image to LP image in Python with my tools to a first attempt in TD.

In a first approach I was interesed in creating those LPs and to print some of them, and my first set of tools were perfectly fine for that. It is when I wanted to add motion, animation, interaction that those tools failes.

How to create LP images?

  • You need an equirectangular image as below:
  • You need to apply a transformation (see my tools) to obtain this:

How to create an animation?

By animation I wanted to have a video/image of LP turning around an axis perpendicular to the image center (and LP center).

To do so I have used the same tool, generated more LPs (which I called frame###.jgp) with various angles and create animated gif, see the command line below invoking convert from Imagemagick:

convert -delay 20 -loop 0 frame*jpg -quality 50% animated.gif 

It works, but it's not very interactive and suffer from easyness of modifications (eg if I want to change the speed of rotation)

How to create similar animation with TD?

Luckily I found on this forum someone who had the issue a few year ago: Marius did port a litte planet shader from Panolens.js.

My first thought was I need to improve my shader skills but quicky I saw the littlplanet.tox from the Marius was doing everything I needed. Therefore I only needed to pass my equirectangular image and set up the rotation angle in relation to changing values (here time) and could generate an animation as I wanted. See below a screenshot of TD and a example of video generated:

and the video below: