Flight simulation in TD in 2026?

TD guru help please on a few beginner questions…

I have read everything I can find here on this TD forum relating to flight, flight simulation and flight simulators and there is an interesting, but old example called RADSCAPE flight simulator with T script and old GLSL. I am interested in the idea of procedural generation of terrain such as the brilliant short shader work of Iniigo Quilez “Elevated” which generates an amazingly complex 3D world from very brief math code.youtube.com/watch?v=_YWMGuh15nE

Q1: Knowing almost zero about Tscript, how hard is it to translate into current TD python and are there any utilities for this? (I would like to fix errors in RADSCAPE to see how it works)…

Q2: Knowing just a little bit of GLSL, what is the best approach to updating from ten year old code to modern GLSL used in TD currently? (again - to learn from the RADSCAPE example hopefully).

Q3: Currently knowing just a little bit of GLSL, does it seem like a feasible idea to write my own new ShaderToy-like GLSL code to procedurally generate visually interesting worlds to fly through somewhat like “Elevated” (but not a copy and hopefully today maybe at 3840 x 2160 60 - 120 Hz resolution or higher with GLSL on an i9 with RTX4080), or is that a multi-year very difficult math/code project for gurus only? I am not a pro programmer, just an AV artist type…

Q4: What would be a good learning path for writing a nice flight simulation program in Touch Designer only with very large geometry worlds from scans or real world databases maybe - or should I really try to use Unreal or Unity with procedural generation instead for that?

Any advice on directions, architectures or links to good TD flight simulator examples greatly appreciated. Thanks in advance….

Hi there GoldHarris,

Definitely possible and a nice project to get familiarity with TouchDesigner. There are a couple of approaches you can take. One would be the Inigo route and do it all in a technique called ‘raymarching’, but honestly there are more performant ways to do so inside TD. With raymarching
you step (march) over a vector from your camera into the world until you hit some geometry. This is being done for every pixel. The GPUs nowadays can handle this quite well (though 3840x2160 * 120fps might be challenging).
Other route I would take is use real geometry for your landscape. Having a gridPOP displaced for the rough details of your mountains. Then giving them more details texture maps (basecolor, normals, roughness, ..). This is much cheaper for the GPU since you won’t have to cast rays into your scene. Especially if you want to have some more control over your landscape, having the landscape in POPs can help a lot. You can then easily instance trees on the slope of mountains etc where it becomes increasingly complex by doing it all in 1 raymarch shader (like they do at shadertoy since there is no geometry)

About your questions. Q1, honestly I don’t know :slight_smile: I joined the touchdesigner family when t-script already died, so never learnt it :slight_smile: Perhaps some really old users can help with this, but to be honest I would start from scratch. Also main code is GPU based (POPs / GLSL) and not so much CPU based. Maybe stuff like controlling your flight sim, but this can be done easily in python / operators (see keyboardinDAT for example)

Q2, my guess is that this RADSCAPE example is also a raymarcher. Like stated before, I would go for a rasterizing solution (renderTOP with geometry). But if you do go the raymarcher route, check out Write a GLSL TOP - Derivative . Also worth noting if you go the POP route and would like to use GLSL for it as well, see Write a GLSL POP - Derivative .

Q3, it’s challenging but I think definitely doable and great to learn about geometry/normals/tangents/materials/etc. Definitely not multi-year project. Either way
going for raymarching or geometry, both is very doable in my opinion. If you do go the raymarching route, there are quite some tutorials around I think. Here’s an old workshop I did (not sure if the patch still works in the latest version of TD though): GitHub - timgerritsen/refractive-raymarching: TDSW TouchDesigner workshop files - Refractive raymarching 20-02-2022 · GitHub

Q4, very large geometry worlds might need some extra work on loading/unloading those plans on the fly. I would start with just a static landscape, then if that’s all running nicely, adding some techniques with moving planes around when the plane is approaching a border to get the feeling of infinite landscapes. I’m unfamiliar nowadays what tools are available within unity or unreal, might be there are some more easy solutions for it than in TD, since it is quite a gaming feature. However
don’t give up TD just yet. Definitely possible in touch and a great challenge :slight_smile:

Unfortunately I dont have any links to flight simulator specific examples. Hope this answer does help a bit though.
Good luck!

cheers,
tim

1 Like

@timgerritsen Thank you so much for your detailed help! I have been meaning to learn more about raymarching and will try out your workshop and links - much appreciated. Good to hear that is not a multi-year project! I will put some serious R&D study into those and decide on approach after some more experiments. I only have six months to pull this together for an art show… But I have about a year of code bits work already to draw on for interaction with LEAP and Kinect etc.

Thanks - I am comfortable with that plan. I plan to go for a more abstract appearance than typical video games with a lot of vectors and points which work great in Stereoscopic viewing, which I am doing. So more learning of POPS and regular real geometry which I am much more familiar with in Touch.

Ok got it. I agree that is probably not worth the time and I definitely want to get the most from GPU and POPS and TOPS. RADSCAPE is a really old example….

Great - I will check both out. Many thanks for links!

After watching many Unreal Engine tutorials yesterday I am intimidated by the amount of learning I would have to do, as I recall it took me months for my first Unity VR piece of any consequence. And I don’t want my art experience to just look like a multi-million dollar big team video game or Hollywood VFX blockbuster whcih I can’t compete with as a single creator. I mean, it would be great it if did look that good, but zero chances of success!

I think I might go for a more abstract appearance with a lot of vectors and points which work great in Stereoscopic viewing, which I am doing so more learning of POPS and regular real geometry which I am much more familiar with in Touch.

That is the part I am most worried about, and the least experienced. I do want the viewer to feel they are in a really big detailed world, and not just flying down a tunnel. I have done some gaussian splats with my drones and iPhone lidar and was wondering if there is some cool way to transition between largish 100 foot radius scans or to join multi point clouds? But yes, agree best to start with good interaction in a single static landscape I have already scanned or created in SOPS etc.

I would welcome any more advice on that loading/unloading or LOD Level of Detail switching (if needed - Richard Burns suggested some fog can help disguise transitions!)

Anyway, this gives me lots to investigate so thanks again for sharing your expert advice. I have watched your work from afar for several years in awe….

About the infinite landscape idea, I’ve made a proof-of-concept infinite landscape pop network that might give some more insight how it can be done. I’m using here a noisePOP to displace the landscape, for loading in heightmap files you would need a more complex system that loads the right tile file when needed.
In this POC I’m just translating forward, but with a flight sim you would need a 2d id per tile since you could also fly left/right. The idea is to reuse tiles and move those around instead of the camera.
Indeed like Richard suggested, camera fog is the way to hide the chunkiness of appearing planes in the far distance.

Hope this helps and inspires :smiley:

Cheers,
tim

InfiniteLandscape.tox (5.2 KB)

Thank you Tim! Super kind and generous of you. I started your first raymarching tutorial and got the old 2021 build so I can follow along. Your intro explanation was really clear about inside out thinking of shaders and I will give it a good go at learning more GLSL and raymarching. Today I am off to get an old “bargoon” 3D TV, but I will try out this TOX later. Reusable tiles sounds interesting. In my VR work I always move the geometry VR world mainly for head tracking in HMD so that sounds like a similar idea but the transitions will be the tough part obviously. Paging stuff from disk like pro flight simulators some of which use many levels of detail I think.

Anyway thanks again. I really appreciate you making time to help.

1 Like

@timgerritsen Ok thanks again it looks very promising! All in POPS with no GLSL… I will study this. Thanks for whipping this up so fast!

To get it running I updated my nVidia graphics driver to V610.74 and updated TD to latest build 2025.32820 and updated my commercial license and now your tox works great at 1280 x 720 from 51 to 60 fps depending on viewers cooking. I have not tried to optimize this yet but with my i9 and RTX 4080 I assume it is feasible to get to full HD res 60 fps with this POPS technique with a little judicious tweaking? Or do you think I should target only 1280 x 720 for this flight sim project?

Underneath the POPs it’s all GLSL. Every operator is a glsl shader. Full HD 60fps should definitely be possible and I think the current setup should already work. You might have all viewers on. Also the edit mode of touchdesigner takes alot of performance. To test the fps, try perform mode and view a performCHOP showing the fps.
If it is still too heavy, lowering the grid vertices would help. Right now there are 200x200 per grid, lowering this down would help, but makes things chunky with high frequency landscapes. I would focus on low frequency landscape (little hills) and get the detail from the textures.
Using PBR material and the right textures (roughness, metallic, ao as well) you can get quite realistic landscapes with not too much gpu processing power. Textures costs mainly gpu memory.
Also be sure to checkout Probe in the palette to see where the bottlenecks are. Is it gpu/cpu/mem/vram, which node, etc.
Last thing I think the heaviest part is the noisePOP that calculates the noise field every frame. If you have predefined landscapes, this would be faster.

Cheers,
tim

OK good to know Full HD60fps is doable and those optimization reminders. I have used most of those techniques in past at one time or another. Ben’s TDSW talks on Optimization were also very helpful. I finished watching your three excellent TDSW raymarching tutorials and really like your explanatory animations made in GLSL. My linear algebra and matrix math from physics in the 70’s is very weak now so I found the GLSL code pretty heavy going… but fascinating to watch your iterative exploratory GLSL development process. I need to learn the math, GLSL and POPS much better and will work on that. I will check out your other links on those next.

For my beginner skills and the 6 month time frame I have for this flight sim project my preliminary conclusion is that I think ray marching in GLSL and Inigo Quilez SDF’s is a stretch for me, so I think I will focus mainly on traditional TOPS/CHOPS etc node-based coding and learning POPS and python better to start.

Thanks again Tim for sharing all your deep knowledge and experience on this. Live long and prosper!

@gordharris Thank you so much :slight_smile: I’m happy you liked it. Sorry about the ending where I realized I didn’t had time and rushed over it.
Yes it’s mainly the math that’s the tricky part. POPs makes it a little bit easier but still knowing a bit of linear algebra can help alot (especially vectors and how to work with them). A super nice serie is the one from grant sanderson (3blue1brown). Definitely worth to check if you don’t know it yet: https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab
If you want to go deeper and fully understand it, I really like Gilbert Strang as a teacher (MIT lectures): https://www.youtube.com/playlist?list=PLE7DDD91010BC51F8
The raymarching approach could work, but I do think it’s quite challenging to make it optimized. Just a landscape like inigo quilez would be possible, but if you want to have some more control over the landscape and using touchdesigner, I would definitely go to POP route. With a raymarcher kinda everything lives in 1 shader. You would miss out of so much nice stuff from touchdesigner :smiley: (geometry, lights, camera, etc.)

Good luck and please share a screenshot/video when you created some epic worlds :smiley:

cheers,
tim

Tim you had so much good content in your 3 part class it was no problem to condense the end part a bit as you did. Super content and so well organized. I loved your animations explaining the physics of light and ray marching the best. I finally get an inkling of how a page of GLSL code can magically turn into transparent running water! Which really was total magic to me before your course. Like the Arthur C Clarke quote (paraphrased maybe) “Any suitably advanced technology is indistinguishable from magic”.

IQ’s work and other ShaderToy pieces also seem like magic to me. How could 4K of code produce video like he does? Incredible.

Anyway, GLSL will be a long haul for me but I have started learning POPS better with the excellent derivative course, and Darien Brito’s course etc and plan to use them mainly for this project. I have not created any epic worlds yet but I did make a short Work In Progress video for an art grant application I submitted for show production from Aug to Jan if I get it (no word yet). This might give you an idea of what I want to achieve, but still a very long way to go to make this with POPS.

WIP Flights of Imagination concept video

I hope the link works - I have had trouble in past with vimeo links but if not let me know. Any future advice on how to achieve this vision are welcome. A heck of a lot to do the next six months….

Thanks again for all your help.

2 Likes