Pages: 1
Author Topic: [Question] post-render Filters/FX  (42,300 Views)
Offline (Unknown gender) db

Member
Joined: Nov 2013
Posts: 10
View profile
Posted on: November 09, 2013, 08:36:21 PM
I'm working on a game called Psyon and its going pretty good so far. Eventually, its going to be psychedelic glitch-graphics arcade adventure, or at least I hope. Its really minimalistic with everything being made out of 8*8 monochrome pixels using nothing but the old EGA palette. It already looks great, but I'd really love to experiment with the visuals, effects. I think these graphics of mine could really benifit of blur, or something that makes all pixels (including the tiles) it look like glowing light. I've been looking around and, though there are many ways to motion blur objects, finding examples/tips on blurring EVERYTHING on screen is hard to find. Besides, I get a total hardon for experimental filters in games (like Teleglitch f.e.). I feel it would be quite important for me to know how to produce such effects.

Whats the best way to achieve fully blurred/glowing graphics using enigma, or add other fullscreen graphical effects or "filters" like that?
Offline (Unknown gender) db

Member
Joined: Nov 2013
Posts: 10
View profile
Reply #1 Posted on: November 09, 2013, 10:40:45 PM
ok, after some more thinking/researching I have a more technical rephrasement of my question.

Would it be possible in enigma to take whatever is rendered x steps back (screenshot?) and project it back onto the screen on top (or below) of the new step? Preferably in a way that lets me adjust parameters like _alpha or image_blend = make_color_hsv() or whatever.

This would open many doors for me.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #2 Posted on: November 09, 2013, 11:04:31 PM
Blur, chromatic aberration, reflections, displacements and so on can all be done purely with surfaces. But a more modern method (and a lot faster, but less compatible) is to use shaders. ENIGMA supports both methods. Of course when using shaders, you still have to use surfaces for these effects, but the end result will be a lot faster.

Tomorrow I will try to make a few examples on this. No promises.

edit: To save framebuffer, you need to use surfaces. Render to surface and then save a few frames. It will allow things like basic motion blur. But the results you can get via simple blending is.. well.. simple. Effects in Teleglitch were more complicated.
Offline (Unknown gender) db

Member
Joined: Nov 2013
Posts: 10
View profile
Reply #3 Posted on: November 09, 2013, 11:41:06 PM
Thank you for your insights ExDeus!

I've been looking into surfaces between our posts. I think I get it in theory and makes sense.
"Render to surface" sounds like the term I'm talking about. Know of any documentation on that?
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #4 Posted on: November 10, 2013, 01:19:26 AM
http://enigma-dev.org/docs/Wiki/Surface_Functions

There is some documentation though a few functions may be lacking in detail.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #5 Posted on: November 10, 2013, 11:30:35 AM
I just tried some more shaders, but sadly they are still broken in 99% of the uses. We use deprecated stuff as GL hasn't been rewritten to use a manager and so even basic things are hard to make. Plus there are some bugs with texture binding I guess. Sadly all of this is going really slow as we still don't have that backwards testing one of the guys were making. That would ensure all the graphics systems work the same and don't break when new commits are made.

Anyway, I do have an example on how surfaces can be used for effects. The sun ray example - https://dl.dropboxusercontent.com/u/21117924/Enigma_Examples/sun_rays/sun_rays.gmk
As well as reflection example - https://dl.dropboxusercontent.com/u/21117924/Surfaces/reflections_surface.gmk

I tried to upload the rays example to EDC, but it seems it's broken, because of the transition to cloud storage. Dunno if anyone is still working on it.
Offline (Unknown gender) db

Member
Joined: Nov 2013
Posts: 10
View profile
Reply #6 Posted on: November 10, 2013, 10:17:39 PM
Thanks for the help brotha's. I'll wrap my head around that example. It seems simplistic enough.
Pages: 1