Jump to content

Home

Glintercept for kotor and tsl


Xarwarz

Recommended Posts

This could be sticked as a modders resource if the mods dont mind thanks.

 

I came across a program called glintercept for open gl applications. I decided to try it on kotor and tsl. Interesting enough it has a FREE CAM mode to fly around the levels also a shader editor. The shader editor from messing around with it seem to change the color and lighting of certain objects. Theres also a wire frame mode and the ability to dump textures shaders and frame buffers. I just sharing this in hopes that maybe one day a REAL-TIME LEVEL EDITOR can be made for both games. Anyhow check it out for yourself...PICTURES ON BOTTOM:thmbup1:

 

Link.....http://code.google.com/p/glintercept/

 

About GLintercept.

 

GLIntercept is a OpenGL function call interceptor for Windows that will intercept and log all OpenGL calls.

 

Basic usage

Select the version of GLIntercept right for the application being debugged (x86 or x64) - Note you select the version of GLIntercept based on if the application is x86 or x64 (64bit) - not if the operating system is 64 bit.

 

Then after installation, simply copy the opengl32.dll and a gliConfig.ini file from the install directory to the executable folder of the application you want to intercept OpenGL calls.

 

Then edit the gliConfig.ini file, enable the options required and then run the application.

 

How it works

GLIntercept works by overriding the call to wglGetProcAddress, wrapping the real function pointer in some assembly and then returning it to the application being debugged.

 

This means that when new OpenGL extensions/versions are released, GLIntercept will automatically log the new functions.

 

However, while all function names are automatically logged, function parameters need to be specified. These are supplied via text files in a "C" style syntax that can be updated as needed.

 

eg. void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );

 

History

GLIntercept has existed since 2003 and was mainly designed as an OpenGL 1.0-2.1 debugger. So while basic function logging should work on all OpenGL versions, the more advanced features listed below may or may not work in OpenGL 3.0+. (especially when using a core OpenGL profile)

 

Features

Main GLIntercept features:

 

Save all OpenGL function calls to text or XML format with the option to log individual frames.

Activate and log ARB_debug_output messages to the log

Run time shader edit. Display shader usage and edit the shaders at run time. Supports ARB VP/FP/GLSL and NV VP/FP......To enable Shader Edit ctrl+shft+s

Free camera......ctrl+shft+c Fly around the geometry sent to the graphics card and enable/disable wireframe/backface-culling/view frustum render.........Wireframe my settings ctrl+shft+z

Save and track textures. (1D,2D,3D,NVRect and p-buffer bound textures are supported.) Saving can be to TGA,PNG and JPG formats......Dump frames,textures,shaders ctrl+shft+f

Save and track shaders/programs.

Save and track display lists.

Saving of the OpenGL frame buffer (color/depth/stencil) pre and post render calls. The ability to save the "diff" of pre and post images is also available.

Track error states (logging them to the debugger output) and breaking on errors.

Basic thread error checking.

Function timer log.

Resource leak tracking for contexts, display lists, shaders and textures.

OpenGL extension/version override. Add/remove/replace the OpenGL extension and version strings. (Test lower end rendering paths without changing cards)

OpenGL function stats - how many times each function is called.

 

MY INI SETTINGS.....

 

GLICONFIG.ini

 

Show spoiler
(hidden content - requires Javascript to show)
//////////////////////////////////////////////////////////////

//

// GLI - openGL Intercept Configuration file

//

//////////////////////////////////////////////////////////////

//

// (Note: all options are case sensetitive)

//

//////////////////////////////////////////////////////////////

 

//ProfileName = "Development Standard";

//ProfileDescription = "Standard development options - XML Frame Grab + Shader editor + Free Camera";

 

//////////////////////////////////////////////////////////////

//

// Log Options:

//

//////////////////////////////////////////////////////////////

//

// LogEnabled - Enable function call logging

//

// LogFlush - If true, will flush the logger after each OpenGL call is made.

// This is useful to catch a OpenGL call that crashes the

// application. This only applies to text file logging.

//

// LogPath - Path to store the logged files. If not specified, files

// will be stored relative to the GLI OpenGL dll.

//

// LogFileName - The name of the file to log to (without extension)

//

// AdditionalRenderCalls - Names of additional OpenGL functions that are to be treated as render calls.

// (extra frame and state info can be dumped at render calls)

//

// LogMaxNumFrames - The maximum number of frames that will be logged.

// This is useful for retrieving startup information from a

// application or limiting the file size on apps that make

// a lot of OpenGL calls (Note: This also affects per-frame logging)

//

// LogFormat - The format of the log. If equal to "XML" (without quotes)

// will log in the XML format. Else, the plain text format is used.

//

// XMLFormat::XSLFile - When the log format is XML, this option specifies the XSL file

// to be used (if any). A XSL file usually formats the XML into a

// readable HTML format.

//

// XMLFormat::BaseDir - The base (or source) directory where the XSL file can be found.

//

//////////////////////////////////////////////////////////////

 

FunctionLog

{

LogEnabled = True;

LogFlush = False;

//LogPath = "c:\temp\";

LogFileName = "gliInterceptLog"

 

//AdditionalRenderCalls = ("glClear");

 

//LogMaxNumFrames = 200;

 

LogFormat = XML;

 

XMLFormat

{

XSLFile = gliIntercept_DHTML2.xsl;

BaseDir = "C:\Program Files (x86)\GLIntercept_1_1_0\XSL";

}

}

 

 

//////////////////////////////////////////////////////////////

//

// LogPerFrame Options:

//

//////////////////////////////////////////////////////////////

//

// Enabled - Enable logging per frame. If this is true, instead of

// logging all OpenGL calls, the below frame start keys will

// enable the loggers at the start of a frame. The loggers

// will be disabled when the keys are pressed again and the next

// frame is reached (see OneFrameOnly for other options).

//

// Output of logging is saved to a directory called

// Frame_XXXX where XXXX is the frame number that logging

// started.

//

// FrameStartKeys - The keys used to enable/disable logging. Valid values can be any

// combination of 0-9,a-z,f1-f12,ctrl,shift,tab,lwin,rwin,

// print,up,down,left,right,add,sub,insert,delete etc.

//

// OneFrameOnly - If enabled, will only log only one frame per key-press.

// Loggers will be disabled at the end of the next frame.

//

//////////////////////////////////////////////////////////////

 

 

LogPerFrame

{

Enabled = True;

FrameStartKeys = (ctrl,shift,f);

OneFrameOnly = True;

}

 

 

 

 

//////////////////////////////////////////////////////////////

//

// Input Files:

//

//////////////////////////////////////////////////////////////

//

// GLFunctionDefines - The file to retrieve the OpenGL function defines from.

// (The text header files that contain the parameters of OpenGL functions to be logged)

//

// GLSystemLib - The full path to the "real" OpenGL system library. This will be assigned automatically

// so usually does not have to be defined.

//

//////////////////////////////////////////////////////////////

 

InputFiles

{

GLFunctionDefines = "C:\Program Files (x86)\GLIntercept_1_1_0\GLFunctions\gliIncludes.h"

//GLSystemLib = "c:\windows\system32\opengl32.dll"

}

 

//////////////////////////////////////////////////////////////

//

// Error Checking:

//

//////////////////////////////////////////////////////////////

//

// GLErrorChecking - A OpenGL glGetError() is made after all appropiate OpenGL calls.

// If an error is detected, the error code is logged to the current text/XML log next

// to the function that caused the error.

// (OpenGL Error context is still saved so application invoked glGetError() calls are safe)

//

// ThreadChecking - While GLIntercept is not currently thread-safe, (ie. So you cannot have multiple render

// contexts active at the same time) enabling this option will perform basic thread checking.

// (Will currently check OpenGL calls to see if they are made on the thread with the

// active render context)

//

// BreakOnError - (used with above) Issue programmer debug breakpoint on an error.

// Note that glIntercept alters the stack, so to get a valid call stack when debugging

// you will need to step through some assembly (F10 on VC6) until the stack is restored.

//

// LogOnError - (used with above) Log all OpenGL errors to the GLIntercept error log (gliLog.txt).

//

// ExtendedErrorLog - (used with above) Report all available data about the function the produced the error.

// (ie. Full resolved parameters that were passed to the function are reported.)

// (Enabling this option will cause a severe slowdown even when no errors are produced. Only

// enable when debugging specific errors)

//

// DebuggerErrorLog - Mirror the contents of the error log (gliLog.txt) file to the debuggers' window.

//

//////////////////////////////////////////////////////////////

 

ErrorChecking

{

GLErrorChecking = True;

ThreadChecking = False;

BreakOnError = True;

LogOnError = True;

ExtendedErrorLog = False;

DebuggerErrorLog = True;

}

 

//////////////////////////////////////////////////////////////

//

// Image logging:

//

//////////////////////////////////////////////////////////////

//

// LogEnabled - Enabled the image logger. OpenGL textures are saved to the directory

// "Images" under the main log path. Only the texture types specified in

// SaveGLTypes are saved.

//

// RenderCallStateLog - If enabled, each render call issued will list the currently bound

// textures for all texture stages. (works with text and XML logging)

//

// SaveFormats - The image formats to save the textures in. Current valid formats are

// PNG,JPG and TGA. Note that more than one format can be specified.

// (ie. (PNG,TGA) will save all textures twice, once in PNG format, once

// in TGA format)

//

// Note on image formats:

// TGA - Is pixel precise and is the fastest save format but is also the biggest.

// TGA's are also not supported by web browsers (if you use XML with XSL to view the logs).

// PNG - Is pixel precise and is slower to save but is smaller than TGA.

// PNG's are brower compatable.

// JPG - Is a format that does not save alpha and saves colors in a lossy format.

// It is the smallest format and is slower to save than TGA's.

// JPG's are brower compatable.

//

// FlipXAxis - The saving of textures is upside-down by default. Using this option will

// flip the image before saving.

//

// TileCubeMaps - Cube map textures are saved as six individual images. Enabling this option enables

// the six image to be tiled together (flattened cube shaped) and saved as one image.

//

// SaveGLTypes - The types of OpenGL textures to save. Valid options are 1D,2D,3D and CUBE.

// Note: NVRect textures use the 2D option.

//

// SavePbufferTex - This option enables/disables the saving of textures that are bound from a p-buffer.

// Note: P-Buffer textures are saved each time a p-buffer is bound to the texture.

// (ie. no checks are performed to see if the p-buffer has changed)

//

// ImageIcon->Enabled - This enables saving a icon version of all images saved. (useful in XML browser viewing)

//

// ImageIcon->SaveFormat - The format of the save icon images (TGA,PNG or JPG)

//

// ImageIcon->Size - The size of the icons to save

//

//////////////////////////////////////////////////////////////

 

ImageLog

{

LogEnabled = True;

 

RenderCallStateLog = True;

 

SaveFormats = PNG;

FlipXAxis = False;

TileCubeMaps= True;

 

SaveGLTypes = (1D,2D,3D,CUBE);

SavePbufferTex = True;

 

ImageIcon

{

Enabled=True;

SaveFormat = JPG;

Size = 40;

}

}

 

//////////////////////////////////////////////////////////////

//

// Shader logging

//

//////////////////////////////////////////////////////////////

//

// LogEnabled - Enabled the shader logger. OpenGL shaders/programs are saved to the directory

// "Shaders" under the main log path. Supported types included ARB/NV vertex/fragment

// programs and vertex/fragment GLSL shaders/programs. ATI specific vertex/fragment

// shaders are not supported.

//

// RenderCallStateLog - If enabled, each render call issued will list the currently bound

// shaders (vertex and fragment). (works with text and XML logging)

//

// AttachLogState - If enabled, attitional information such as compile/link state and additional

// driver information may be attached to each shader/program.

// (Currently only GLSL support). Note that enabling this option may force

// shaders to complete compiling immediately.

//

// ValidatePreRender - If the above AttachLogState is enabled, this option will perform a validation of

// the shader before each render and append it to the log. Enabling this option will

// cause the shader to be re-saved at each render call.

// (GLSL only feature via glValidateProgram)

//

// UniformLogPreRender - If the above AttachLogState is enabled, this option will dump all uniforms that

// are active in the shader before each render. Enabling this option will

// cause the shader to be re-saved at each render call. (GLSL only feature)

//

//////////////////////////////////////////////////////////////

 

ShaderLog

{

LogEnabled = True;

 

RenderCallStateLog = True;

 

AttachLogState = True;

ValidatePreRender = False;

UniformLogPreRender = False;

 

//Future formatting options

}

 

//////////////////////////////////////////////////////////////

//

// Display List logging

//

//////////////////////////////////////////////////////////////

//

// LogEnabled - Enabled the display list logger. OpenGL display lists are saved to the directory

// "DisplayLists" under the main log path. If a program has a lot of big glBegin/glEnd

// sections in display lists, (ie 1000's of glVertex calls) the application may seem

// un-responsive on startup as all these calls are processed on the list creation.

//

//////////////////////////////////////////////////////////////

 

DisplayListLog

{

LogEnabled = True;

 

}

 

//////////////////////////////////////////////////////////////

//

// Frame(Buffer) logging

//

//////////////////////////////////////////////////////////////

//

// LogEnabled - Enabled the frame(buffer) logger. When enabled, each render call can

// save the pre/post/diff frame buffer (color or depth) to view the changes

// that the render call made. Frame buffer saves are written to a directory

// "Frames" under the main log path.

//

// SaveFormat - The image format to save the frame buffer in. Current options are TGA,PNG, and JPG.

// (see ImageLog::SaveFormats for a decription of the formats)

//

// FrameIcon->Enabled - This enables saving a icon version of all images saved. (useful in XML browser viewing)

//

// FrameIcon->SaveFormat - The format of the save icon images (TGA,PNG or JPG)

//

// FrameIcon->Size - The size of the icons to save

//

// FrameMovie->Enabled - This enables a movie of the "post" and "diff" frame buffers to be saved. If multiple, buffers

// are saved, they are tiled together. (This is useful to quicky inspect how a frame is composed)

// The resulting movie is called FrameMovie.avi in the frame buffer directory.

//

// FrameMovie->Size - The width height of the saved frame buffers. (ie. (640,480)) The resulting movie will be

// larger if multiple buffers are saved at once as they are tiled together.

//

// FrameMovie->FrameRate - The frame rate of the saved movie.

//

// FrameMovie->Compression - The list of compression codecs used to save the movie (usually 4 letters).

// The first valid codec is used. Special codecs are:

// "menu" - will display a menu for the user to select a codec.

// "none" - will use no compression.

//

// ColorBufferLog - The color frame buffer save options. Options can include any combination of

// (pre,post,diff).

// pre - The frame's color buffer is saved before the render call

//

// post - The frame's color buffer is saved after the render call

//

// diff - The difference between the pre and post buffer saves is written.

// (green represents pixels with no differnce. If the image is red,

// no image differences were detected)

//

// DepthBufferLog - The depth frame buffer save options. Options are the same as in ColorBufferLog.

// (Note: Depth-buffer saving can be very slow)

//

// StencilBufferLog - The stencil frame buffer save options. Options are the same as in ColorBufferLog.

// (Note: Stencil-buffer saving can be very slow)

//

// StencilColors - When saving the stencil buffer, it can be useful to save the buffer with color codes.

// (ie stencil value 1 = red) This array supplies index color pairs for each stencil

// value up to 255. The indices must be in order and the colors are in the format

// AABBGGRR. If an index is missing, it will take the value of the index as the color.

// (ie. stencil index 128 = (255, 128,128,128) = greyscale values)

//

//////////////////////////////////////////////////////////////

 

FrameLog

{

LogEnabled = True;

SaveFormat = JPG;

 

FrameIcon

{

Enabled = True;

SaveFormat = JPG;

Size = 40;

}

FrameMovie

{

Enabled = False;

Size = (640,480);

FrameRate = 15;

Compression = ("mpg4","divx","none");

}

 

ColorBufferLog = (pre,post,diff);

//DepthBufferLog = (pre,post,diff);

 

//StencilBufferLog = (pre,post,diff);

StencilColors = (0,0xFF000000, //Black

1,0xFFFF0000, //Blue

2,0xFFFFFF00, //Light Blue

3,0xFF0000FF, //Red

4,0xFF00FFFF, //Yellow

5,0xFFFF00FF, //Purple

6,0xFF80FFFF, //Bright Yellow

7,0xFFFFFFFF); //White (Note green is not used as that is the "diff" color)

 

}

 

 

 

//////////////////////////////////////////////////////////////

//

// Function time logging

//

//////////////////////////////////////////////////////////////

//

// NOTE: It is important to not mis-use the results of this logger. OpenGL is a very pipelined

// API and you can not optimize your code based on how long is spent in each function call.

// This logger is only intended for advanced users to determine where pipeline stalls "MAY"

// have occured and determine speeds of operations such as glReadPixels etc.

//

// LogEnabled - Enabled the timer log. When enabled, the time taken inside each OpenGL

// function is added to the main log. (if enabled). The logging reports

// in microseconds (millionth of a second). Only take these results as

// approximate figures as GLIntercept will add a small amout of overhead.

// (More overhead may be indicated in the functions wglGetProcAddress,

// all wgl*(context) functions, glBegin,glEnd,glGetError)

//

// If you are using this logger to determine where pipeline stalls occur,

// ensure to disable ALL other loggers (image/shader/frame etc) as these

// loggers may cause pipline stalls. Also disable parameter logging by

// not defining "GLFunctionDefines" and use flat text logging to get the

// fastest logging possible. (and hence the most accurate results)

//

// LogCutoff - The number of microseconds below which the time value is not reported.

//

//////////////////////////////////////////////////////////////

 

TimerLog

{

LogEnabled = False;

 

LogCutoff = 20;

 

}

 

 

//////////////////////////////////////////////////////////////

//

// Plugins

//

//////////////////////////////////////////////////////////////

//

// BaseDir - The base directory where the plugins can be found

//

// Plugins - Listing of all plugins to load (and the locations

// to load from) Under each plugin, plugin specific options

// can be specified.

//

//

//////////////////////////////////////////////////////////////

 

PluginData

{

 

BaseDir = "C:\Program Files (x86)\GLIntercept_1_1_0\Plugins";

 

Plugins

{

 

//

// Name of plugin | Plugin load location

// { Plugin specific options. (See the plugins' config.ini file for options) }

 

OpenGLShaderEdit = ("GLShaderEdit/GLShaderEdit.dll")

OpenGLFreeCamera = ("GLFreeCam/GLFreeCam.dll")

ExtensionOverride = ("GLExtOverride/GLExtOverride.dll")

DebugContext = ("GLDebugContext/GLDebugContext.dll")

{

CameraMoveSpeed = 10.0;

}

 

}

}

 

FREECAM.ini settings

 

Show spoiler
(hidden content - requires Javascript to show)
//////////////////////////////////////////////////////////////

//

// Free Cam config file

//

// The free camera allows visualization of what geometry is sent to the

// graphics card by allowing the camera to "fly" around the geometry.

// This is mainly useful for seeing how well frustum culling is implemented

// and checking that LODs perform correctly.

//

// If an application uses vertex programs/shaders, the free camera will not

// work unless the OpenGL model view state matrix is used in the

// transformation. (ie by ftransform() or gl_ModelViewProjection type uniforms.)

// (This is the common case)

//

// To use, add the following to the plugins section of gliconfig.ini:

//

// OpenGLFreeCamera = ("GLFreeCam/GLFreeCam.dll")

//

// Note: Changing this file will affect all GLIntercept sessions that load

// this DLL. To only affect a single GLIntercept session, place the

// relevant options inside this plugins' section in gliConfig.ini.

//

// (This file is parsed first for the defaults, then the options in

// gliConfig.ini can over-ride the defaults)

//

//////////////////////////////////////////////////////////////

 

 

//////////////////////////////////////////////////////////////

// Enable/Disable keys

//////////////////////////////////////////////////////////////

//

// EnableKeys - Key combination to enable/disable the free camera. See "CameraKeys"

// for the movement keys.

//

// ResetPositionKeys - Key combination to reset the position of the free camera

//

// ResetOrientationKeys - Key combination to reset the orientation of the free camera

//

// DisableFaceCullKeys - Key combination to disable face culling. (Useful when behind objects)

//

// EnableWireFrameKeys - Key combination to enable wireframe mode.

//

// RenderViewFrustumKeys - Key combination to attempt to display the view frustum (in wireframe).

//

//////////////////////////////////////////////////////////////

 

EnableKeys = (ctrl,shift,c);

ResetPositionKeys = (/*ctrl,shift,*/p);

ResetOrientationKeys = (/*ctrl,shift,*/o);

DisableFaceCullKeys = (ctrl,shift,u);

EnableWireFrameKeys = (ctrl,shift,z);

RenderViewFrustumKeys = (ctrl,shift,v);

 

//////////////////////////////////////////////////////////////

// Camera options

//////////////////////////////////////////////////////////////

//

// CameraInputLock - If enabled, it will attempt to lock out the keyboard

// from the application. This can be useful if the camera

// control keys map to keys used in the application.

// This will not work on apps that use low level key

// handleing (ie. via DirectInput).

//

// CameraMoveSpeed - The movement speed of the camera (per second)

//

// CameraRotateSpeed - The rotation speed of the camera (per second)

//

// CameraMoveModifierKey - The key to press to modify the movement by "CameraMoveModifierValue"

//

// CameraMoveModifierValue - The value multipled by "CameraMoveSpeed" when

// "CameraMoveModifierKey" is down.

//

// CameraKeys - The keys to move/strafe/rotate the camera.

//

//////////////////////////////////////////////////////////////

 

CameraInputLock = False;

 

CameraMoveSpeed = 100.0; //Use 100.0 for FPS's like Quake3/Doom3

CameraRotateSpeed = 2.0;

 

CameraMoveModifierKey = "shift";

CameraMoveModifierValue = 10.0;

 

CameraKeys

{

Forward = "w";

Backward = "s";

 

StrafeLeft = "a";

StrafeRight = "d";

 

/*Standard WASD controls (usually used in the application)

 

Forward = "w";

Backward = "s";

 

StrafeLeft = "a";

StrafeRight = "d";

 

*/

 

//Assuming numlock on:

PitchUp = "num8";

PitchDown = "num2";

 

YawLeft = "num4";

YawRight = "num6";

 

RollLeft = "num7";

RollRight = "num9";

 

}

 

//////////////////////////////////////////////////////////////

// Misc options

//////////////////////////////////////////////////////////////

//

// AdjustScissor - Adjust the scissor to match the view port when rendering.

// Useful if scissoring is used to optimize out parts of a scene. (ie. Doom3)

//

// IgnoreOrthographic - If enabled, will prevent the free camera from operating on

// orthographic projected geometry. (usually user interfaces/ render to texture)

//

// MainContextOnly - If enabled, will prevent the free camera from operating on

// any context other than the "main" context. This can be useful offscreen

// p-buffers/render surfaces that should not be updated.

//

// AdjustGLLighting - If enabled, will adjust the OpenGL lighting (if enabled) to reflect the

// changing camera position.

//

// ForceAdjustGLLighting - If enabled, and "AdjustGLLighting" is enabled, OpenGL lighting will be

// updated reguardless of if the OpenGL lighting state is enabled. This

// can be useful of vertex programs/shaders that access OpenGL's lighting

// state.

//

// RenderViewFrustumColor - The color of the view frustum. Can only be "black" or "white"

//

//////////////////////////////////////////////////////////////

 

AdjustScissor = False;

IgnoreOrthographic = True;

MainContextOnly = False;

 

AdjustGLLighting = True;

ForceAdjustGLLighting = True;

 

RenderViewFrustumColor = "white"; //"black"

 

 

 

 

Show spoiler
(hidden content - requires Javascript to show)
K2_00029_1.png

 

Show spoiler
(hidden content - requires Javascript to show)
K2_00030_1.png

 

Show spoiler
(hidden content - requires Javascript to show)
K2_00035_1.png

 

Show spoiler
(hidden content - requires Javascript to show)
K2_00033_1.png

 

---------------------------------------------------------------

 

UPDATE 11-6-12

 

Heres a tool to extract levels out of kotor and TSL. If you need to covert the models you could use a converter like 3d object converter. Not shure if these would work in game after edit and conversion but its worth a try.

 

NOTE:This is slightly different from glintercept.....

 

 

This is the OpenGLXtractor Windows Tool!

 

With this tool, it is possible to Capture 3D Data from an OpenGL Application.

 

Like 3D Mesh, Textures,Shaders,UV's,....and more.

 

 

http://members.chello.at/alexan/

 

 

PICZ

 

Show spoiler
(hidden content - requires Javascript to show)
2012-11-06_09h00_34.png

 

Show spoiler
(hidden content - requires Javascript to show)
2012-11-06_08h04_21.png

 

Show spoiler
(hidden content - requires Javascript to show)
2012-11-06_09h15_01.png
Link to comment
Share on other sites

" Then edit the gliConfig.ini file, enable the options required and then run the application."

 

:raise:

 

What does this mean? What functions are required and how do you proceed next?

 

I read somewhere that the freecam is activated using ctrl, shift and C and i,j,k,l, or something, are used to move but nothing happened when I tried it.

 

And K1 goes into an unplayable state (a lot of lag)

Link to comment
Share on other sites

I am looking forward to what the KOTOR and TSL movie makers might do with this. I've just pointed the way to this thread.

 

Tested this out a bit on TSL, and for the most part, it does work. It is buggy in some places though so I'm going to play around with the angles and maybe even the config settings a little bit. Like the NWN camera angles not painting the sky lots of the time, some angles don't paint the entire background while others do (specifically, I noticed the shield wall on Telos, the pillars on Korriban, etc. disappear and reappear in spots). I've found about 4 different camera angles so far and you can adjust the height up or down however you like. I think I can make use of this program though and overall it does have a lot of potential. I'll be sure to play around with it when I get to the filming stage of my Episode V. Once again, great find and this is sure to improve my next two movies!

Link to comment
Share on other sites

" Then edit the gliConfig.ini file, enable the options required and then run the application."

 

:raise:

 

What does this mean? What functions are required and how do you proceed next?

 

I read somewhere that the freecam is activated using ctrl, shift and C and i,j,k,l, or something, are used to move but nothing happened when I tried it.

 

And K1 goes into an unplayable state (a lot of lag)

 

Its a little confusing at first.

 

1. Download the 32 bit version of Glintercept...32 bit is for the application type not windows version.

 

2. Then after installation, simply copy the opengl32.dll and a gliConfig.ini file from the install directory to the executable folder of the application you want to intercept OpenGL calls...I used the gliConfig_AuthorStd.ini then renamed it to gliConfig.ini this ini file has the best settings.

 

3. You could edit the free cam ini found in the plugins folder from the glintercept install directory. I have an example below....basically i changed wireframe mode to ctrl+shft+z and camera movement to w,s,a,d.

 

To enable free cam ctl+shft+c

 

FreeCam.ini

 

Show spoiler
(hidden content - requires Javascript to show)
//////////////////////////////////////////////////////////////

//

// Free Cam config file

//

// The free camera allows visualization of what geometry is sent to the

// graphics card by allowing the camera to "fly" around the geometry.

// This is mainly useful for seeing how well frustum culling is implemented

// and checking that LODs perform correctly.

//

// If an application uses vertex programs/shaders, the free camera will not

// work unless the OpenGL model view state matrix is used in the

// transformation. (ie by ftransform() or gl_ModelViewProjection type uniforms.)

// (This is the common case)

//

// To use, add the following to the plugins section of gliconfig.ini:

//

// OpenGLFreeCamera = ("GLFreeCam/GLFreeCam.dll")

//

// Note: Changing this file will affect all GLIntercept sessions that load

// this DLL. To only affect a single GLIntercept session, place the

// relevant options inside this plugins' section in gliConfig.ini.

//

// (This file is parsed first for the defaults, then the options in

// gliConfig.ini can over-ride the defaults)

//

//////////////////////////////////////////////////////////////

 

 

//////////////////////////////////////////////////////////////

// Enable/Disable keys

//////////////////////////////////////////////////////////////

//

// EnableKeys - Key combination to enable/disable the free camera. See "CameraKeys"

// for the movement keys.

//

// ResetPositionKeys - Key combination to reset the position of the free camera

//

// ResetOrientationKeys - Key combination to reset the orientation of the free camera

//

// DisableFaceCullKeys - Key combination to disable face culling. (Useful when behind objects)

//

// EnableWireFrameKeys - Key combination to enable wireframe mode.

//

// RenderViewFrustumKeys - Key combination to attempt to display the view frustum (in wireframe).

//

//////////////////////////////////////////////////////////////

 

EnableKeys = (ctrl,shift,c);

ResetPositionKeys = (/*ctrl,shift,*/p);

ResetOrientationKeys = (/*ctrl,shift,*/o);

DisableFaceCullKeys = (ctrl,shift,u);

EnableWireFrameKeys = (ctrl,shift,z);

RenderViewFrustumKeys = (ctrl,shift,v);

 

//////////////////////////////////////////////////////////////

// Camera options

//////////////////////////////////////////////////////////////

//

// CameraInputLock - If enabled, it will attempt to lock out the keyboard

// from the application. This can be useful if the camera

// control keys map to keys used in the application.

// This will not work on apps that use low level key

// handleing (ie. via DirectInput).

//

// CameraMoveSpeed - The movement speed of the camera (per second)

//

// CameraRotateSpeed - The rotation speed of the camera (per second)

//

// CameraMoveModifierKey - The key to press to modify the movement by "CameraMoveModifierValue"

//

// CameraMoveModifierValue - The value multipled by "CameraMoveSpeed" when

// "CameraMoveModifierKey" is down.

//

// CameraKeys - The keys to move/strafe/rotate the camera.

//

//////////////////////////////////////////////////////////////

 

CameraInputLock = False;

 

CameraMoveSpeed = 100.0; //Use 100.0 for FPS's like Quake3/Doom3

CameraRotateSpeed = 2.0;

 

CameraMoveModifierKey = "shift";

CameraMoveModifierValue = 10.0;

 

CameraKeys

{

Forward = "w";

Backward = "s";

 

StrafeLeft = "a";

StrafeRight = "d";

 

/*Standard WASD controls (usually used in the application)

 

Forward = "w";

Backward = "s";

 

StrafeLeft = "a";

StrafeRight = "d";

 

*/

 

//Assuming numlock on:

PitchUp = "num8";

PitchDown = "num2";

 

YawLeft = "num4";

YawRight = "num6";

 

RollLeft = "num7";

RollRight = "num9";

 

}

 

//////////////////////////////////////////////////////////////

// Misc options

//////////////////////////////////////////////////////////////

//

// AdjustScissor - Adjust the scissor to match the view port when rendering.

// Useful if scissoring is used to optimize out parts of a scene. (ie. Doom3)

//

// IgnoreOrthographic - If enabled, will prevent the free camera from operating on

// orthographic projected geometry. (usually user interfaces/ render to texture)

//

// MainContextOnly - If enabled, will prevent the free camera from operating on

// any context other than the "main" context. This can be useful offscreen

// p-buffers/render surfaces that should not be updated.

//

// AdjustGLLighting - If enabled, will adjust the OpenGL lighting (if enabled) to reflect the

// changing camera position.

//

// ForceAdjustGLLighting - If enabled, and "AdjustGLLighting" is enabled, OpenGL lighting will be

// updated reguardless of if the OpenGL lighting state is enabled. This

// can be useful of vertex programs/shaders that access OpenGL's lighting

// state.

//

// RenderViewFrustumColor - The color of the view frustum. Can only be "black" or "white"

//

//////////////////////////////////////////////////////////////

 

AdjustScissor = False;

IgnoreOrthographic = True;

MainContextOnly = False;

 

AdjustGLLighting = True;

ForceAdjustGLLighting = True;

 

RenderViewFrustumColor = "white"; //"black"

Link to comment
Share on other sites

Thanks, this is really an awesome discovery. I also advise people go check the gliconfig.ini and disable the different type logging - I was playing around a minute and after I had a 8gb log file and like two subfolders (images and shaders)

 

Just change most "Enablelogging: true" to false or something. It was a big help to the framerate.

Link to comment
Share on other sites

I've tested the camera function a bit:

 

(This BBCode requires its accompanying plugin to work properly.)

(This BBCode requires its accompanying plugin to work properly.)

(This BBCode requires its accompanying plugin to work properly.)

(This BBCode requires its accompanying plugin to work properly.)

(This BBCode requires its accompanying plugin to work properly.)

 

As I mentioned in the video description, there are clearly a few problems. As far as the game is concerned, the camera hasn't changed; this causes a discrepancy between what the game renders and what you actually see. This has confirmed some of my suspicions regarding the way the game's rendering engine works. The area models of the room you are in are always rendered, for the most part; however, any creatures, doors, or placeables that you are not looking at directly aren't rendered at all, and the other rooms seem similarly dependent on your player's perspective. You can trick the game into rendering more by messing with camerastyle.2da but even this is limited.

 

Still, what it can do is rather rather handy. And I'm sure by testing with it further, we can resolve some of these issues. Excellent find!

Link to comment
Share on other sites

I also noticed some textures are not rendered properly; they seem flat, don't move with the model... reminds me of Stan from Monkey Island. I don't believe it's a problem with the actual texture files, as it doesn't seem to affect all instances of that texture, and swapping out the texture doesn't fix it. It seems like it should be a shader issue, except some shaders work fine, and not every texture affected is even using a shader. Odd.

Link to comment
Share on other sites

Well, I've been working on a film project for a few years now. Mostly I've used AniCam, but GLIntercept is quite handy for being in real time. The movement is a lot smoother in conjunction with a gamepad.

 

JC, I didn't want to skew any creativity when working on my Episode IV, but now that it's finished, I decided to finally check out your Peragus clips. You've got some real skill my man and I'm really looking forward to your project. Re-creating the Peragus events from the holovids is brilliant. I actually pondered something similar when considering my own version for my film, but after seeing your clips, I'm glad I didn't go in that direction since you'd have put mine to shame! I assume AniCam is how you accomplished some of the great camera work. I played around with it some but could never get the hang of it, definitely not in the same way you've seemed to have mastered it. I'm hoping to use GLI now to give my next two movies some more flavor. Anyway, just thought I'd share. Really digging GLI, so once again, great find Xarwarz!

Link to comment
Share on other sites

  • 2 weeks later...

Oh, thanks. Yeah, it's AniCam... and it is a challenge. It's good for large, sweeping motions, but anything that requires speed or precision is really tricky if you're doing it manually. GLIntercept is better in those areas because it has the advantage of being in real time. There are some drawbacks, however; most importantly, it lacks repeatability. If you make a mistake, you must start over from scratch. You also can't seamlessly combine two shots. In that respect, AniCam much resembles the Steadicam used for the special effects in the original trilogy. GLIntercept is your handheld model, good for quick and dirty action shots.

Link to comment
Share on other sites

  • 3 weeks later...
This has confirmed some of my suspicions regarding the way the game's rendering engine works. The area models of the room you are in are always rendered, for the most part; however, any creatures, doors, or placeables that you are not looking at directly aren't rendered at all, and the other rooms seem similarly dependent on your player's perspective. You can trick the game into rendering more by messing with camerastyle.2da but even this is limited.

 

Editing the .vis and .lyt file of a game area could solve some of these "problems'. Within both these files the game gets info on what parts of the whole area need to be rendered. Both files contain basicly a list of the differant rooms an area is made of. Plus each room gets a list of its own, saying what needs to be rendered if the player is within said room.

 

example of how it looks.

RoomA 3
RoomB
RoomC
Sky
RoomB 3
RoomA
RoomC
Sky
RoomC 4
RoomB
RoomD
RoomE
Sky

 

Though, you might still have problems regarding the rendering of creatures, placeables etc... I believe these are depended on other settings, propebly hardcoded.

 

Nice find though, it certainly will help the modding community. It beats the sluggish slow work of compiling and puzzling stuff together in 3Ds Max.

Link to comment
Share on other sites

Yeah, the area geometry isn't much of a problem. For the most part it all loads fine, with a few minor exceptions that editing the VIS file wouldn't help anyway because it's already set up correctly; the game just doesn't know what it's looking at, so it doesn't render it.

Link to comment
Share on other sites

  • 1 year later...

I am having lots of fun with this! I had the Xbox version of KOTOR, but then I gave my Xbox away. I later found out about the free cam feature, and at that moment I wanted my Xbox back! But now that I came across this, I am very happy! Thanks for this awesome discovery :D

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
I am still at a complete loss of how to get the free camera to work and have followed all the steps instructed here, even downloaded JC's .ini file and it still does not work.

 

Help anyone?

 

Make sure you are in the swkotor folder for KOTOR 1(Or Knights Of The Old Republic II for KOTOR 2) and make sure you downloaded the right GLintercept for your computer. (64 bit or 32 bit) and then you just put in a OpenGL32 file in there and drop in the author config file. Once you have done that, rename the author config file to "gliConfig" without quotations. It should work from there.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...