TGE water upgrades
by Manoel Neto · in Torque Game Engine · 04/22/2006 (5:58 pm) · 53 replies
I opened this thread to stop hijacking that other one in the TSE public forums.
We had to prototype a watersports game, and chose TGE over TSE, adding shader support to the waterblock render, since that way the game wouldn't require a shader capable GPU, but would display a nicer water on supporting hardware, to prevent the game from looking too dated.
I took the "bumpmapped interiors" resource as a start point to add CG shaders support to TGE, modified the fluidRender to load and use vertex and fragment shaders, and modified the GameTSCtrl so I could use a smaller one, placed behind the main GameTSCtrl, to render the reflection to a texture. But with some changes on the .CG files, it's possible to use the ol' spherical map instead of a scene reflection, if performance is a concern.
It looks like the TSE water in motion, with 3 major differences:
- There's no refraction (would bring the performance further down, but could be added).
- No specular yet (easy to add by passing the light direction to the shader).
- It uses the depth mask, just like normal waterblocks (fake depth cueing).
I will post this as a resource, and got as far as take it apart from my own codebase and install it in a TLK source tree. There's only a couple bugs and commenting I need to sort out before it becomes usable.
Screenies:



The CG support was implemented on the windows build only (we aren't really making multi-platform games yet), but CG is supposed to be multi-platform, so people experienced in working on OSX and Linux could get it to work in those platforms as well.
We had to prototype a watersports game, and chose TGE over TSE, adding shader support to the waterblock render, since that way the game wouldn't require a shader capable GPU, but would display a nicer water on supporting hardware, to prevent the game from looking too dated.
I took the "bumpmapped interiors" resource as a start point to add CG shaders support to TGE, modified the fluidRender to load and use vertex and fragment shaders, and modified the GameTSCtrl so I could use a smaller one, placed behind the main GameTSCtrl, to render the reflection to a texture. But with some changes on the .CG files, it's possible to use the ol' spherical map instead of a scene reflection, if performance is a concern.
It looks like the TSE water in motion, with 3 major differences:
- There's no refraction (would bring the performance further down, but could be added).
- No specular yet (easy to add by passing the light direction to the shader).
- It uses the depth mask, just like normal waterblocks (fake depth cueing).
I will post this as a resource, and got as far as take it apart from my own codebase and install it in a TLK source tree. There's only a couple bugs and commenting I need to sort out before it becomes usable.
Screenies:



The CG support was implemented on the windows build only (we aren't really making multi-platform games yet), but CG is supposed to be multi-platform, so people experienced in working on OSX and Linux could get it to work in those platforms as well.
About the author
Recent Threads
#2
Steven
04/22/2006 (11:03 pm)
The most valuable resource for TGE this year! I can help sort out the bugs. So just release it asap.Steven
#3
04/22/2006 (11:06 pm)
When can we play with it?
#4
04/22/2006 (11:09 pm)
Wow that looks great!
#5
04/22/2006 (11:27 pm)
Man this looks sweet cant wait
#7
04/23/2006 (12:18 am)
This will be a great contribution Manoel
#9
04/23/2006 (2:41 am)
:O Wow, good stuff!
#10
04/24/2006 (6:02 pm)
I'm not sure how much "value" it has for TGE, but it certainly is the shiniest resource. Like I said, with all the TGE resources floating around, you can prolly hack it into a ghetto TSE now =P. Makes me sad I don't really have any plans for water in my game ;_;
#11
Agree with all the above guys !
If still working with TGE , this upcoming resource must be one of the most wanted .
04/25/2006 (4:44 am)
Quote:"The most valuable resource for TGE this year!"
Agree with all the above guys !
If still working with TGE , this upcoming resource must be one of the most wanted .
#12
04/25/2006 (6:32 am)
I Agree too! Please post this resource, you will be a hero!
#14
The effort and time you put into this is much appreciated.
04/25/2006 (7:46 am)
Thank you Manoel, The effort and time you put into this is much appreciated.
#15
just goes to show you the potential of the TGE still.
04/25/2006 (8:00 am)
This with the plan Thomas showed us would just make TGE better and better!!!just goes to show you the potential of the TGE still.
#16
TSE is still very different. Its being rewritten with a new material system, supports batching and vertex buffers. This is more of a "make TGE a bit more modern" resource while we wait for TSE.
04/25/2006 (8:05 am)
Quote:Combined with this (plan) how different is TSE (except for CLOD terrain)?
TSE is still very different. Its being rewritten with a new material system, supports batching and vertex buffers. This is more of a "make TGE a bit more modern" resource while we wait for TSE.
#17
04/25/2006 (3:43 pm)
Yes, Thank you Manoel, you did very good job. I am waiting for the resource. I am not very good at programming, you will be great help to me along with alot other people that do good things for us.
#19
04/25/2006 (5:12 pm)
I have to say that your water looks really awesome. The difference that your water makes as opposed to the default TGE water is huge. I look forward to seeing this as a resource we can all use!
#20
great work Manoel...
--Mike
04/26/2006 (8:07 am)
Absolutely spectacular... and that's an understatement...great work Manoel...
--Mike
Torque Owner Cinder Games