Game Development Community

Faster Waterblocks ...

by Melv May · in Torque Game Engine · 03/30/2002 (11:48 am) · 45 replies

Hi,

I've just about finished playing with Part2 of my fluid rendering modifications. I have not got it packaged fully yet but have all the control parameters in place within the code. When I release it I will put together a help file detailing all the new parameters but for now I was wondering if anyone would test it, without the help file?

The improvements I've made are:-

- Multi-texturing for supported hardware (faster!)
- Texture refraction/distortion effects of the surface (Position/Time/Magnification).
- Indiviual control over the dual-layer surface texture tesselation counts.

In english the means that you can get the dual-layer surface done in a single pass on supported hardware which should be much faster. If you use the Environment map then that takes it to a two-pass which is still better than the three-pass before! I'm gonna play with doing it correctly though. In the final version I will check for the texture unit count and get a single pass rendering (inc. env map) if possible.

Previously, I added the ability to select drift/flow modes for both surface textures. You can still do this but additionally you can distort the texturing process in X/Y directions to look like waves or simulate refraction from the selected wave magnitude. I am just looking at using the surface normals for refraction/reflection but that's not finished yet.

You can now control the tesselation of both surface layer textures individually to create a more detailed surface. As each layer can be controlled independantly, quite complex surfaces can be created.

Does all this come with a price-tag? Not really, the computational overhead of doing this is minimal and with the addition of multi-texturing you should get a good performance boost.

I can have something ready fairly soon if anyone wants to try it.
Page«First 1 2 3 Next»
#41
04/21/2002 (5:40 am)
Melv, I'm also interested in your new dgl extension as it may easier my life for the cel-shading fx I have already put in my proto.

Thx

Frank
#42
04/21/2002 (6:20 am)
And i would like it too please ... want to see it so i can learn something else :)
#43
04/21/2002 (6:38 am)
Frank/Phil,

I've embedded nearly all of the extension prototypes but only implemented a subset of them. No point in stuffing too many fixed-function calls in there if they are not needed yet.

Anyways, the new dglDoesSupportXXX checks become ...

inline bool dglDoesSupportVertexShader();
inline bool dglDoesSupportTextureShader()
inline bool dglDoesSupportTextureShader2()
inline bool dglDoesSupportRegisterCombiners()
inline bool dglDoesSupportRegisterCombiners2()
inline bool dglDoesSupportVertexProgramNV()
inline bool dglDoesSupportTextureEnvCombine4()
inline bool dglDoesSupportTextureCubeMap()
inline bool dglDoesSupportEXTTextureLODBias()
inline bool dglDoesSupportTextureBorderClamp()
inline bool dglDoesSupportTextureRectangle()

I implemented dependencies that were mentioned within the OpenGL extension registry as well for consistency.

The new OpenGL functions thus become ...

// Vertex Programs.
glBindProgramNV
glAreProgramsResidentNV
glIsProgramNV
glBindProgramNV
glDeleteProgramsNV
glExecuteProgramNV
glGenProgramsNV
glGetProgramParameterdvNV
glGetProgramParameterfvNV
glGetProgramivNV
glGetProgramStringNV
glGetTrackMatrixivNV
glGetVertexAttribdvNV
glGetVertexAttribfvNV
glGetVertexAttribivNV
glGetVertexAttribPointervNV
glLoadProgramNV
glProgramParameter4dNV
glProgramParameter4dvNV
glProgramParameter4fNV
glProgramParameter4fvNV
glProgramParameters4dvNV
glProgramParameters4fvNV
glTrackMatrixNV
glVertexAttribPointerNV
glVertexAttrib1dNV
glVertexAttrib1dvNV
glVertexAttrib1fNV
glVertexAttrib1fvNV
glVertexAttrib1sNV
glVertexAttrib1svNV
glVertexAttrib2dNV
glVertexAttrib2dvNV
glVertexAttrib2fNV
glVertexAttrib2fvNV
glVertexAttrib2sNV
glVertexAttrib2svNV
glVertexAttrib3dNV
glVertexAttrib3dvNV
glVertexAttrib3fNV
glVertexAttrib3fvNV
glVertexAttrib3sNV
glVertexAttrib3svNV
glVertexAttrib4dNV
glVertexAttrib4dvNV
glVertexAttrib4fNV
glVertexAttrib4fvNV
glVertexAttrib4sNV
glVertexAttrib4svNV
glVertexAttrib4ubvNV
glVertexAttribs1dvNV
glVertexAttribs1fvNV
glVertexAttribs1svNV
glVertexAttribs2dvNV
glVertexAttribs2fvNV
glVertexAttribs2svNV
glVertexAttribs3dvNV
glVertexAttribs3fvNV
glVertexAttribs3svNV
glVertexAttribs4dvNV
glVertexAttribs4fvNV
glVertexAttribs4svNV
glVertexAttribs4ubvNV

// Register Combiners.
glCombinerParameterfvNV
glCombinerParameterfNV
glCombinerParameterivNV
glCombinerParameteriNV
glCombinerInputNV
glCombinerOutputNV
glFinalCombinerInputNV
glGetCombinerInputParameterfvNV
glGetCombinerInputParameterivNV
glGetCombinerOutputParameterNV
glGetCombinerOutputParameterivNV
glGetFinalCombinerInputParameterfvNV
glGetFinalCombinerInputParameterivNV

// Register Combiners2.
glCombinerStageParameterfvNV
glGetCombinerStageParameterfvNV

// Additional Multi-Texture Calls.
glMultiTexCoord3fARB
glMultiTexCoord3fvARB
glMultiTexCoord4fARB
glMultiTexCoord4fvARB

The other extensions produce tokens (too numerous to mention here) which I have also implemented.

I have implemented the appropriate function pointers for logging/directX but have not implemented either the DirectX emulation or logging support, perhaps someone else can do this?

I only ask that you let me know if you have any problems at all.

I'll send the files later today.

Melv.
#44
04/21/2002 (7:15 am)
Phil, Frank, Xavier,

I sent a codedrop to your email.

Hopefully you should see something like the following within the console...
www.objectheaven.dial.pipex.com/garagegames/console.jpg

I attempted to describe the steps involve in achieving these kind of extensions (including DirectX support) in a earlier post ...
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=4519
Page«First 1 2 3 Next»