PDA

View Full Version : A (New?) Fast Technique for Rendering 3D Laserbolts That Look Good From All Angles



geoff.nagy
10-28-2016, 02:36 PM
Hello,

In case anyone is interested, I've written a brief tutorial and provided an example implementation/source code for a technique for rendering large groups of laserbolts that look good from all angles in 3D. It is not based on post-processing/blur techniques, nor is it based on approaches involving billboarding end-caps, nor cylindrical billboarding.

https://singlehandedgamedev.files.wordpress.com/2016/10/laser-demo-screenshot1.png

While I don't claim to be fully versed in every single approach out there, I've never seen the technique demonstrated or described before. It is based around the idea that a laserbolt can be easily rendered as a plane in orthographic space, covering the end-points of the laser as seen with a perspective projection. A few additional tricks add perspective scaling and proper depth testing.

Tutorial is here (https://singlehandedgamedev.wordpress.com/2016/10/29/tech-report-a-technique-for-rendering-cheap-laser-bolts-that-look-good-from-all-angles/).

Example implementation and source code is here (https://gitlab.com/geoff-nagy/laser-demo/tree/master).

I hope someone will find this useful!

Geoff

geoff.nagy
11-07-2016, 01:17 AM
I made a 2-minute video that describes the effect, complete with a discussion about achieving perspective distortion and depth-testing. It's available on YouTube (https://www.youtube.com/watch?v=bmblOymqfD8). Complete source code and executable for the program demonstrated in my video is available here (https://gitlab.com/geoff-nagy/laser-demo-simple/tree/master).

Geoff