Game Development Community

Inserting new render options in TGE pipeline

by Funky Diver · in Torque Game Engine · 11/14/2004 (12:47 am) · 15 replies

Greetings!


I would like to insert new custom features into TGE rendering pipeline, for instance, simple shaders (ala Quake 3) for materials. I know, it's not an easy question, so I pretend :) only for small and quick information (I just want to save some time): which classes/functions should I look at? Where is the main function that renders/sends to video card materials onto screen in OpenGL?

Thank you alot in advance!

#1
11/14/2004 (8:36 am)
Melv's RenderObject resource will get you started in the right direction and give you some of the pointers needed for what you want to do.
#2
11/14/2004 (9:37 am)
Best solution is to buy TSE. Its rendering pipeline is much, much, much more flexible. :)

Otherwise, Melv's tutorial is good. Retrofitting the materials into the interior and 3space renderer will be painful, though.
#3
11/15/2004 (5:11 am)
Thank you!

I do plan to have TSE, but:
1) I want to add Quake like shaders for now
2) waiting for TSE to become more mature and MacOS/OpenGL enabled ;)
#4
11/15/2004 (10:21 am)
It would probably be more efficient/less work to write your own GL backend for TSE than it would be to retrofit everything into TGE.
#5
11/15/2004 (12:50 pm)
Do we take this to mean that GG won't be writing a GL backend? Or did you mean "less work if you don't want to wait for TSE to mature"?
#6
11/15/2004 (1:45 pm)
What Ben probably means is that adding GL to TSE yourself (before they do) will be a much easier task than undertaking what Alexander wanted.

Short and simple: There will be a GL implementation in TSE. No, it's not easy to add shaders into the TGE rendering pipeline. :)
#7
11/15/2004 (2:24 pm)
We will be writing a GL backend. But we are waiting for our implementation of TSE to finish maturing, and for compliance with the latest GL specs to happen. It's a choice between lots of pain now, and fewer features overall, or more features overall, and less pain later. Not too surprisingly, we've gone with the path of less pain...

As is usual with development, if you need a feature Right Now it's better to do it yourself than to hope someone else will do it. And given the choice of implementing a material system in TSE or TGE, I'd take TSE hands down.
#8
11/15/2004 (3:33 pm)
K, thanks for clarifying. I wasn't trying to start something, just wondering :)
#9
11/16/2004 (12:53 pm)
Ok, I see the point ;)
#10
11/17/2004 (6:27 am)
Quake 3 shaders have nothing to do with the "actual" shaders.
Adding Q3 shaders to TGE should be straight forward and has nothing to do with the pixel/vertex shaders
everyone and his dog are talking about nowadys ....
#11
11/17/2004 (7:31 am)
How would that work? Quake3 and TGE are two different licenses.. and Q3 being GPL. (Correct me if I'm wrong there)
#12
11/17/2004 (8:24 am)
Adding Q3 style shaders would be different than using the Quake 3 source (which hasn't been released into the GPL yet, but it is hoped that it will be before the end of the year). Adding GPL source into Torque is a huge licensing no-no, though.
#13
11/17/2004 (8:54 am)
Oh I thought J.Ritter was working with the Q3 GPL engine. I must have misread his plan.
#14
11/18/2004 (12:15 am)
Well, I was not going to add actual code from Quake 3.

My idea was enable some similar effects for low end cards. I'm aware about GPL hell ;)

Shaders are good, but 80% casual gamers have video cards without them, it may change after 1-2 years, but we still have these years to profit ;)

Probably, Melv's fxRenderObject will be enough for some effects... I just need to do more research.
#15
11/18/2004 (12:25 am)
There are some implementations of the Q3 Shader system which are not under the GPL... and for which the copyright holder may be willing to apply another license (LGPL, BSD, MIT, whatever)...

The thing is that the TGE's material system and rendering code is specific to terrain, interiors, shapes, sky, water, etc and it would be very difficult to apply such a unified shader system...

I'd listen to Mr. Garney...