{"id":480,"date":"2014-08-13T22:31:27","date_gmt":"2014-08-13T20:31:27","guid":{"rendered":"https:\/\/petras.xn--ukys-f6a.lt\/?p=480"},"modified":"2024-01-20T10:39:48","modified_gmt":"2024-01-20T08:39:48","slug":"playground-for-graphics","status":"publish","type":"post","link":"https:\/\/petras.shoekeys.lt\/2014\/08\/playground-for-graphics\/","title":{"rendered":"Playground for graphics"},"content":{"rendered":"
<\/a><\/p>\n During my experience in various commercial and non-commercial projects I’ve came across some interesting CG ideas, algorithms and approaches. Some of them I get to implement on those projects, some of those are already implemented and I just have to use them. Those that are left behind are still lingering in my mind with the label “I wanna do this”. That’s how I’ve decided to create a playground for myself.<\/p>\n First, it would be used to have slightly more organized (than regular drafty piece of code while trying something out) collection of various methods, tools and algorithms relating to 3D rendering and CG. Although it is way slower than just to bash some lines of code, but trying to fit methods I want into somewhat nice framework and pipeline is part of the task. In other words, it’s not really a playground, but more like a tool for myself, were I can play around with new CG and 3D stuff.<\/p>\n Another reason why I wanted to do this is to have a playground for shaders. There are plenty of shader authoring tools on the vast Internet, but I still haven’t found one that would fit my needs. At the moment I am using a set of ShaderMaker<\/a>, Shader Toy<\/a> and Shdr<\/a>. Having my own environment suited for my style and needs is something I was misssing.<\/p>\n I’ve started it as a very simple “load and show” program. Since I had OBJ file loader implemented some time ago (here<\/a>), I’ve started with using\/adapting\/adjusting the same code. And, implemented simple Phong shading with forward rendering using OpenGL. I did some more stuff on top of that, such as some GUI implementation, some abstract classes to support extensibility to some sort, etc.<\/p>\n Finally, as my next step (and one of those “I wanna do it”), I’ve started with deferred rendering. And I had my ups and downs. Idea is extremely simply. But it took me a lot of time to figure out and find that rendering empty vector of light objects results in empty\/dark scene. Stupid me. Anyways, picture above is current screenshot of my test scene rendered with 500+ point lights and couple of objects. This is still not optimized version of the algorithm so frametimes are just around 15ms.<\/p>\n Coming up next: the shadow! Probably. Well, first I will optimize the rendering and then most likely will want to go for shadows. Or some spotlight implementation and some other cool stuff related to that. Argh, so much stuff, so little time… \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":" During my experience in various commercial and non-commercial projects I’ve came across some interesting CG ideas, algorithms and approaches. Some of them I get to implement on those projects, some of those are already implemented and I just have to … Continue reading