Render to Framebuffer
Moderators: winston, another_commander
- Griff
- Oolite 2 Art Director
- Posts: 2484
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Render to Framebuffer
Ha that's awesome! Just needs "Incoming missile" written in the style of those silent movie caption cards and we could claim Oolite came out before the BBC micro original
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
Re: Render to Framebuffer
Is there also an underwater mode?another_commander wrote: ↑Mon Aug 08, 2022 9:24 amOK, now I am just fooling around with it, but this is awesome! It's crazy what this post-processing stuff can generate. Here is Oolite in old style silent film format:
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
Not ready to call this a feature yet - it is still a bit buggy and very intense, affects the gui too and reminds me of the first 3D Prince of Persia game which was completely flooded by it. I think it may require bringing our shaders up to modern glsl grammar standards to get it fully under control, but hey, it's a start. It's blooming!
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Render to Framebuffer
Voyage to the Bottom of the Sea [ping] starring Richard Basehart [ping]
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: Render to Framebuffer
wow...
That would make (for) an interesting planet...
Are the effects only applicable to the entire view screen or also on individual objects?
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
Entire screen.
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: Render to Framebuffer
Hello
I don't think this is "water"
probably "spacetime distortions"
cheers
I don't think this is "water"
probably "spacetime distortions"
cheers
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
Milestone achieved ladies and gents. Bloom is in!
I finally managed to get it to apply gently and subtly in the scene and is noticeable only when it is needed. It still affects the HUD (slightly), but that's something to worry about later. In the animations below you can see it in action. The video start with a pan of the camera to the left, where everything is set like up till now. Then the camera stops, bloom is activated and it pans back to the right. Notice the difference in specular reflections this time round?
For those who want to test it, I have uploaded a test package here. It contains:
- The changed source files.
- The latest version of the shaders reauired to run it.
- A patch file done against the latest trunk.
- Updated keyconfig2.plsit which contains the setting for the F9 key.
- A Windows test executable. You can use F9 to toggle bloom on and off. Note that, due to the complexity of calculations involved, bloom is an expensive operation. On one of my test systems, CPU usage goes from 50 to 88 percent when I activate it, but thankfully without change in fps or in GPU temperature. On the other, which is low-end, I see around 40% fps drop at the Extras detail level when I activate it.
And a few screenies showing a random scene without and with bloom. Notice the intensified glow at the parts of the ship reflecting light the most.
I finally managed to get it to apply gently and subtly in the scene and is noticeable only when it is needed. It still affects the HUD (slightly), but that's something to worry about later. In the animations below you can see it in action. The video start with a pan of the camera to the left, where everything is set like up till now. Then the camera stops, bloom is activated and it pans back to the right. Notice the difference in specular reflections this time round?
For those who want to test it, I have uploaded a test package here. It contains:
- The changed source files.
- The latest version of the shaders reauired to run it.
- A patch file done against the latest trunk.
- Updated keyconfig2.plsit which contains the setting for the F9 key.
- A Windows test executable. You can use F9 to toggle bloom on and off. Note that, due to the complexity of calculations involved, bloom is an expensive operation. On one of my test systems, CPU usage goes from 50 to 88 percent when I activate it, but thankfully without change in fps or in GPU temperature. On the other, which is low-end, I see around 40% fps drop at the Extras detail level when I activate it.
And a few screenies showing a random scene without and with bloom. Notice the intensified glow at the parts of the ship reflecting light the most.
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
An improved version of the bloom implementation has been uploaded here for anyone interested. It contains today's revisions of the files that were uploaded yesterday and, of course, a new Windows exe for those who would like to see it.
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
I have uploaded a new test executable and shaders here for those who have already downloaded the previous message's package and are willing to follow the development of the feature as it moves ahead. Unzip the files to their corresponding locations, overwriting the previous ones.
In this episode:
In this episode:
- The cloaking device has now been assigned a post processing effect all of its own. The effect is based on the night vision one, but renders in blue instead of green (remember, the codename of the cloaking device is "Blue Alert"). To test, just go out in space and activate / de-activate it normally.
- Activation of post processing effects is now possible from scripts. In this first iteration, you can use the read/write JSGlobal object postFX to query and set the currently active effect. When setting an effect, you must assign postFX an integer value corresponding to the desired effect. Cuurently there are 5 available:
1. Cloak vision
2. Colorblindness correction (Protanopia)
3. Colorblindness correction (Deuteranopia)
4. Colorblindness correction (Tritanopia)
5. Grayscale
To set grayscale, for example, usepostFX = 5
. For cloak vision use 1 etc. ExecutingpostFX = 0
will reset to normal rendering sans fx. Values out of range will reset to no fx too. - The default bloom has been raised just a tad.
- Fixed a bug that would cause screen corruption when setting detail level below "Shaders Enabled".
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
We are almost ready to make this official. Pull request is up on github: https://github.com/OoliteProject/oolite/pull/407
Before the final merge, please test and ensure that the code in the above PR works and runs OK for you. This is basically for Lunux (and maybe Mac? anyone?) users, as testing on Windows seems to have produced no blockers. We'll let quite a few days for testing and if there are issues we'll hold the merge until resolved.
I should also note that, as far as Windows is concerned, the feature will be implemented only for 64-bit versions of the OS. I think it is time we retire the (obsolete, really) 32-bit version, which is not scheduled to receive any new features from now on, unless someone interested in maintaining it steps in.
I once again want to express my sincere thanks to both Mauiby de Fug, who made the first attempt at this and kept the flame burning, and tsoj, who bit the bullet and actually made the darn thing work. Evrything I added after that was just fluff, really . So, thank you guys, this is something I wanted to see for a long, long time!
Before the final merge, please test and ensure that the code in the above PR works and runs OK for you. This is basically for Lunux (and maybe Mac? anyone?) users, as testing on Windows seems to have produced no blockers. We'll let quite a few days for testing and if there are issues we'll hold the merge until resolved.
I should also note that, as far as Windows is concerned, the feature will be implemented only for 64-bit versions of the OS. I think it is time we retire the (obsolete, really) 32-bit version, which is not scheduled to receive any new features from now on, unless someone interested in maintaining it steps in.
I once again want to express my sincere thanks to both Mauiby de Fug, who made the first attempt at this and kept the flame burning, and tsoj, who bit the bullet and actually made the darn thing work. Evrything I added after that was just fluff, really . So, thank you guys, this is something I wanted to see for a long, long time!
- Cholmondely
- Archivist
- Posts: 5381
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Render to Framebuffer
I'd love to try it out. But how? I can't compile for toffee - I need an Apple version which I can just download...another_commander wrote: ↑Fri Aug 19, 2022 3:49 pmWe are almost ready to make this official. Pull request is up on github: https://github.com/OoliteProject/oolite/pull/407
Before the final merge, please test and ensure that the code in the above PR works and runs OK for you. This is basically for Lunux (and maybe Mac? anyone?) users, as testing on Windows seems to have produced no blockers. We'll let quite a few days for testing and if there are issues we'll hold the merge until resolved.
I should also note that, as far as Windows is concerned, the feature will be implemented only for 64-bit versions of the OS. I think it is time we retire the (obsolete, really) 32-bit version, which is not scheduled to receive any new features from now on, unless someone interested in maintaining it steps in.
I once again want to express my sincere thanks to both Mauiby de Fug, who made the first attempt at this and kept the flame burning, and tsoj, who bit the bullet and actually made the darn thing work. Evrything I added after that was just fluff, really . So, thank you guys, this is something I wanted to see for a long, long time!
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Render to Framebuffer
Yeah, believe me I know... but that's exactly the problem...Cholmondely wrote: ↑Fri Aug 19, 2022 3:51 pmI'd love to try it out. But how? I can't compile for toffee - I need an Apple version which I can just download...
- Cholmondely
- Archivist
- Posts: 5381
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Render to Framebuffer
Is there any way in which I could take over Getafix's transmogrification duties? What would I need? And how much would I need to know?another_commander wrote: ↑Fri Aug 19, 2022 3:52 pmYeah, believe me I know... but that's exactly the problem...Cholmondely wrote: ↑Fri Aug 19, 2022 3:51 pmI'd love to try it out. But how? I can't compile for toffee - I need an Apple version which I can just download...
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?