TLK CG Water + DRL
by Thanhda Tie · 06/01/2006 (8:38 am) · 96 comments
Download Code File
This Resource is a Combination of Alex "Delerium" Scarborough's DRL 2.0 Resource and Manoel Neto TGE Water upgrade Resource. I just decided to put them both together to make people's lives a little bit easier. This Resource contains all the little bug fixes that occured, and has been fully tested and working with TLK 1.4
All you need to get this to work is a TLK 1.4, and the cg tool kit which can be located at: http://developer.nvidia.com/object/cg_toolkit.html
Important: you also need to open cgGL.h in the "Cg/include" folder and replace this:
#include
By this:
#include
Otherwise you'll get loads of compile errors.
To Fix the the wierd editor bug, modify the following file in /creator/editor/EditorGui.cs
-------------------------------------
Fix Update, CG Water Clipping Plane bug
Code by: David Laurie
In sky.cc change the top of Sky::Render to look like this:
And at the bottom of the same function:
For information on script usuage or for more detail, check out the original resource
Water: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10357
DRL 2 : www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10232
In short, copy paste and compile.
FOR FULL DOCS OR SUPPORT PLEASE VISIT THE ORIGINAL RESOURCE.
Good Resource to check out:
Mission in main menu GUI 1.4
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10668
This Resource is a Combination of Alex "Delerium" Scarborough's DRL 2.0 Resource and Manoel Neto TGE Water upgrade Resource. I just decided to put them both together to make people's lives a little bit easier. This Resource contains all the little bug fixes that occured, and has been fully tested and working with TLK 1.4
All you need to get this to work is a TLK 1.4, and the cg tool kit which can be located at: http://developer.nvidia.com/object/cg_toolkit.html
Important: you also need to open cgGL.h in the "Cg/include" folder and replace this:
#include
By this:
#include
Otherwise you'll get loads of compile errors.
To Fix the the wierd editor bug, modify the following file in /creator/editor/EditorGui.cs
function EditorGui::onWake(%this)
{
optimizeDRL(true); /*add*/
MoveMap.push();
EditorMap.push();
%this.setEditor(%this.currentEditor);
if (DemoEditorAlert.helpTag<2) Canvas.pushDialog(DemoEditorAlert);
}
function EditorGui::onSleep(%this)
{
EditorMap.pop();
MoveMap.pop();
optimizeDRL(false); /*add*/
resetDRL(); /*add*/
$Server::CurrentScene.open();
}-------------------------------------
Fix Update, CG Water Clipping Plane bug
Code by: David Laurie
In sky.cc change the top of Sky::Render to look like this:
void Sky::render(SceneState *state)
{
PROFILE_START(SkyRender);
F32 banHeights[2] = {-(mSpherePt.z-1),-(mSpherePt.z-1)};
F32 alphaBan[2] = {0.0f, 0.0f};
F32 depthInFog = 0.0f;
Point3F camPos;
S32 index=0;
if(gClientSceneGraph)
{
F32 currentVisDis = gClientSceneGraph->getVisibleDistanceMod();
if(mLastVisDisMod != currentVisDis)
{
calcPoints();
for(S32 i = 0; i < MAX_NUM_LAYERS; ++i)
mCloudLayer[i].setPoints();
mLastVisDisMod = currentVisDis;
}
// krimzon - PRLD_WATER_SHADER
if (gClientSceneGraph->mReflectPass)
glDisable(GL_CLIP_PLANE0);
// -krimzon
}And at the bottom of the same function:
// krimzon - PRLD_WATER_SHADER
if (gClientSceneGraph)
{
if (gClientSceneGraph->mReflectPass)
glEnable(GL_CLIP_PLANE0);
}
// -krimzon
PROFILE_END();
}For information on script usuage or for more detail, check out the original resource
Water: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10357
DRL 2 : www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10232
In short, copy paste and compile.
FOR FULL DOCS OR SUPPORT PLEASE VISIT THE ORIGINAL RESOURCE.
Good Resource to check out:
Mission in main menu GUI 1.4
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10668
About the author
Digital Shock President & CEO, Thanhda's main role is to direct the business development team, and all other technical development. Thanhda began as a business relations manager & programmer, and has since worked on many projects.
#82
7>BSCMAKE: error BK1506 : cannot open file '..\engine\out.VC8.DEBUG\fluidRender.sbr': No such file or directory
7>Build log was saved at "file://f:\Torque SDK Content\Torque\SDK\engine\out.VC8.DEBUG\BuildLog.htm"
7>Torque Demo - 2 error(s), 9 warning(s)
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========
07/02/2006 (10:17 pm)
Now I am no coder, I just want DRL and This sweet ass water enabled in my game, but I MUST be doing something wrong. Below is the error I get on compile completion.7>BSCMAKE: error BK1506 : cannot open file '..\engine\out.VC8.DEBUG\fluidRender.sbr': No such file or directory
7>Build log was saved at "file://f:\Torque SDK Content\Torque\SDK\engine\out.VC8.DEBUG\BuildLog.htm"
7>Torque Demo - 2 error(s), 9 warning(s)
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========
#83
07/02/2006 (11:20 pm)
Has someone get it to work underwater?
#84
No, ask Manoel Neto, for help on that.
@Steve Adamson
Hmm, are you sure you built it on a clean build of TLK. It shouldnt work with TGE.
07/03/2006 (10:11 am)
@Alex (Stalker)No, ask Manoel Neto, for help on that.
@Steve Adamson
Hmm, are you sure you built it on a clean build of TLK. It shouldnt work with TGE.
#85
07/03/2006 (10:49 am)
@T Squared - Clean build? I assume you mean not altered. if thats the question then yes. How do I INCLUDE directories in a project. cg/lib and cg/include I did not include those into my project. I think that has something to do with it.
#86
Please read the Resource proprely, before asking that question.
*Hint, its an API.
07/03/2006 (6:07 pm)
@Steve Adamson Please read the Resource proprely, before asking that question.
*Hint, its an API.
#87
I have successfully compiled this resource and it looks great, but for some reason, the various editors get disabled in the engine except for the gui editor.
when I hit f11 or whatnot, i get this message in the console:
"creator/editor/editor.cs (0): Unknown command open.
Object editor(2047) editor -> EditManager -> GuiControl -> SimGroup -> SimSet -> SimObject"
I know it must be a simple fix, but I don't know much about editing the gui....
Thanks for the help in advance.
07/07/2006 (6:24 pm)
hello. This is driving me nuts.:I have successfully compiled this resource and it looks great, but for some reason, the various editors get disabled in the engine except for the gui editor.
when I hit f11 or whatnot, i get this message in the console:
"creator/editor/editor.cs (0): Unknown command open.
Object editor(2047) editor -> EditManager -> GuiControl -> SimGroup -> SimSet -> SimObject"
I know it must be a simple fix, but I don't know much about editing the gui....
Thanks for the help in advance.
#88
07/07/2006 (6:26 pm)
ps. Re: my previous post: I have made the fixes to the code that are stated at the beginnning of this thread.
#89
comparing the files they look correct but this is what I'm seeing
08/07/2006 (10:56 pm)
With a completely clean install I'm getting an odd clipping problem, it's only rendering very near the camera. comparing the files they look correct but this is what I'm seeing
#90
if(!mReflectPass)
{
there you go
08/08/2006 (1:09 pm)
nm, result of a bad merge but if anyone is interested in what happens when you leave outif(!mReflectPass)
{
there you go
#91
any ideas what I might have done wrong?
09/03/2006 (8:53 pm)
I started working on this resource a few days ago, worked through small errors here and there, but finally got to this one error that I can't seem to get around.. Figured I'd come and ask here since everyone here tends to have an answer to everything in some form or another. :-PCompiling...
fluidRender.cc
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(102) : warning C4005: 'GL_ALL_ATTRIB_BITS' : macro redefinition
../engine\platformWin32/gl_types.h(714) : see previous definition of 'GL_ALL_ATTRIB_BITS'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(117) : warning C4005: 'GL_ZERO' : macro redefinition
../engine\platformWin32/gl_types.h(366) : see previous definition of 'GL_ZERO'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(118) : warning C4005: 'GL_ONE' : macro redefinition
../engine\platformWin32/gl_types.h(367) : see previous definition of 'GL_ONE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(138) : warning C4005: 'GL_TRUE' : macro redefinition
../engine\platformWin32/gl_types.h(166) : see previous definition of 'GL_TRUE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(139) : warning C4005: 'GL_FALSE' : macro redefinition
../engine\platformWin32/gl_types.h(165) : see previous definition of 'GL_FALSE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(214) : warning C4005: 'GL_NONE' : macro redefinition
../engine\platformWin32/gl_types.h(457) : see previous definition of 'GL_NONE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(298) : warning C4005: 'GL_NO_ERROR' : macro redefinition
../engine\platformWin32/gl_types.h(685) : see previous definition of 'GL_NO_ERROR'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(968) : warning C4005: 'GL_CLIENT_ALL_ATTRIB_BITS' : macro redefinition
../engine\platformWin32/gl_types.h(761) : see previous definition of 'GL_CLIENT_ALL_ATTRIB_BITS'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(1147) : warning C4005: 'GL_LOGIC_OP' : macro redefinition
../engine\platformWin32/gl_types.h(418) : see previous definition of 'GL_LOGIC_OP'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(1148) : warning C4005: 'GL_TEXTURE_COMPONENTS' : macro redefinition
../engine\platformWin32/gl_types.h(650) : see previous definition of 'GL_TEXTURE_COMPONENTS'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(1152) : error C2144: syntax error : missing ';' before type 'void'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\GL/gl.h(1152) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
TorqueLightingKit.exe - 3 error(s), 10 warning(s)any ideas what I might have done wrong?
#92
P.S. It looks amazing, much much much better than stock
09/17/2006 (2:11 am)
Just a note to the curious: I have manoels cg water working in tlk and tge 1.4 , then added drl2.0 and its working, compiled with VS 2005, and it all DOES work together.. above and underwater just read through all the fixes, and add the resources one at a time. Instead of overwriting files from the resources, use winmerge to make sure you arent overwriting changes from another resource. It wasnt nescicarily hard to do and the best help i can offer you would be to tell you to read carefully, merge dont overwrite, and it may be easier to follow the original resources as their respective fixes are all gathered/updated on thir own pages.P.S. It looks amazing, much much much better than stock
#93
7>gameTSCtrl.cc
7>c:\torque1.4.tlkb\sdk\engine\game\gametsctrl.cc(243) : warning C4482: nonstandard extension used: enum 'GBitmap::BitmapFormat' used in qualified name
7>gameProcess.cc
warning what do i need to fix this?
also i have lost the ability to use the F11 editor i get
Loading compiled script creator/editor/TerrainEditorVSettingsGui.gui.
creator/editor/editor.cs (70): Unknown command init.
Object EditorGui(1736) EditorGui -> GuiControl -> SimGroup -> SimSet -> SimObject
Compiling creator/editor/editorRender.cs...
Loading compiled script creator/editor/editorRender.cs.
creator/editor/editor.cs (142): Unknown command open.
Object editor(1715) editor -> EditManager -> GuiControl -> SimGroup -> SimSet -> SimObject
09/18/2006 (3:49 pm)
i am getting7>gameTSCtrl.cc
7>c:\torque1.4.tlkb\sdk\engine\game\gametsctrl.cc(243) : warning C4482: nonstandard extension used: enum 'GBitmap::BitmapFormat' used in qualified name
7>gameProcess.cc
warning what do i need to fix this?
also i have lost the ability to use the F11 editor i get
Loading compiled script creator/editor/TerrainEditorVSettingsGui.gui.
creator/editor/editor.cs (70): Unknown command init.
Object EditorGui(1736) EditorGui -> GuiControl -> SimGroup -> SimSet -> SimObject
Compiling creator/editor/editorRender.cs...
Loading compiled script creator/editor/editorRender.cs.
creator/editor/editor.cs (142): Unknown command open.
Object editor(1715) editor -> EditManager -> GuiControl -> SimGroup -> SimSet -> SimObject
#94
11/04/2006 (12:10 pm)
You have implemented cg to TGE 1.5, is possible share it. I tied it. but compilation dont work.
#95
11/14/2006 (9:01 am)
@AndyGFX : As I read the implementation was on TGE 1.4 with TLK. Not sure about TGE 1.5 although it WOULD be very handy to have.
Torque Owner Ron Frazier
http://www.resident-evil-eschaton.com/images/Tlkreflect.zip
I emailed you the exe by its self too but this link contains alot more data that could help out.
Well emailing didnt work at all! Its not that big but I cant seem to send it. Oh I know why, gmail wont send exes. I guess instead of scanning it like yahoo does it simply blocks it! Well i changed the extension from exe to bxb so gmail wouldnt know the difference. Simply rename it back to exe and you should be good.