lfnetwork.com mark read register faq members calendar

Thread: Glintercept for kotor and tsl
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 11-04-2012, 05:33 AM   #1
Xarwarz
Forumite
 
Xarwarz's Avatar
 
Join Date: Sep 2005
Posts: 631
Veteran Modder 
Exclamation Glintercept for kotor and tsl

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

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


FREECAM.ini settings

Show spoiler





Show spoiler


Show spoiler


Show spoiler


Show spoiler


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

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


Show spoiler


Show spoiler


USE MY MOD IN ANY MOD
xediixarwarz.com

NEXTGEN PICZ
Show spoiler

Last edited by Xarwarz; 11-06-2012 at 02:19 PM. Reason: Add pictures
Xarwarz is offline   you may: quote & reply,
Old 11-04-2012, 06:22 AM   #2
Sith Holocron
M4-78
 
Sith Holocron's Avatar
 
Join Date: Mar 2006
Location: Pasadena, MD(Nar Shaddaa East)
Posts: 1,345
Current Game: The Old Republic
Forum Veteran Folder extraordinaire Helpful! Alderaan News Holopics contributor 
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.




Considering trying out (or returning to) SWTOR? You may as well go through my link and help get me some SWTOR referral points!
Sith Holocron is offline   you may: quote & reply,
Old 11-04-2012, 08:32 AM   #3
Lord2
Rookie
 
Lord2's Avatar
 
Join Date: Nov 2006
Posts: 114
" Then edit the gliConfig.ini file, enable the options required and then run the application."



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)

Last edited by Lord2; 11-04-2012 at 10:53 AM.
Lord2 is offline   you may: quote & reply,
Old 11-04-2012, 11:12 AM   #4
Yceman
Lurker
 
Yceman's Avatar
 
Join Date: Nov 2012
Posts: 6
Quote:
Originally Posted by Sith Holocron View Post
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!
Yceman is offline   you may: quote & reply,
Old 11-04-2012, 11:20 AM   #5
Sithspecter
Big things are coming...
 
Sithspecter's Avatar
 
Status: Moderator
Join Date: Jan 2008
Location: Ebon Hawk
Posts: 1,787
Current Game: Mechwarrior II: Mercenaries
Contest winner - Modding Forum Veteran Veteran Modder LFN Staff Member 
That's pretty cool! Nice find.



Sithspecter is offline   you may: quote & reply,
Old 11-04-2012, 12:27 PM   #6
Xarwarz
Forumite
 
Xarwarz's Avatar
 
Join Date: Sep 2005
Posts: 631
Veteran Modder 
Quote:
Originally Posted by Lord2 View Post
" Then edit the gliConfig.ini file, enable the options required and then run the application."



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


USE MY MOD IN ANY MOD
xediixarwarz.com

NEXTGEN PICZ
Show spoiler
Xarwarz is offline   you may: quote & reply,
Old 11-04-2012, 01:02 PM   #7
Lord2
Rookie
 
Lord2's Avatar
 
Join Date: Nov 2006
Posts: 114
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.
Lord2 is offline   you may: quote & reply,
Old 11-05-2012, 03:18 PM   #8
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
I've tested the camera function a bit:

View page
YouTube Video
View page
YouTube Video
View page
YouTube Video
View page
YouTube Video
View page
YouTube Video

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!


JCarter426 is offline   you may: quote & reply,
Old 11-05-2012, 07:37 PM   #9
Yceman
Lurker
 
Yceman's Avatar
 
Join Date: Nov 2012
Posts: 6
Nice clips, Carter. That's about what I encountered as well, but you stated it much more elegantly....and posted some video

It has potential and I'm looking forward to playing around with it some more.
Yceman is offline   you may: quote & reply,
Old 11-05-2012, 08:08 PM   #10
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
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.


JCarter426 is offline   you may: quote & reply,
Old 11-05-2012, 10:48 PM   #11
Xarwarz
Forumite
 
Xarwarz's Avatar
 
Join Date: Sep 2005
Posts: 631
Veteran Modder 
Nice vid demonstration when i discovered this it didnt dawn on me the movie concept...but the cams too ruff around the ends..im researching how to make new plugins for this...


USE MY MOD IN ANY MOD
xediixarwarz.com

NEXTGEN PICZ
Show spoiler
Xarwarz is offline   you may: quote & reply,
Old 11-08-2012, 04:17 PM   #12
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
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.


JCarter426 is offline   you may: quote & reply,
Old 11-09-2012, 08:30 PM   #13
Darth Avlectus
If Sunday you're free...
 
Darth Avlectus's Avatar
 
Join Date: Dec 2006
Location: Why don't you come with me...
Posts: 4,275
Current Game: Poisoning pigeons in the park.
I like this thread.


We'll murder them all, amid laughter and merriment...except for the few we take home to experiment!

"I cant see S***! --YOU GO TO HELL!" --Tourettes guy
Darth Avlectus is offline   you may: quote & reply,
Old 11-09-2012, 11:50 PM   #14
Yceman
Lurker
 
Yceman's Avatar
 
Join Date: Nov 2012
Posts: 6
Quote:
Originally Posted by JCarter426 View Post
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!
Yceman is offline   you may: quote & reply,
Old 11-18-2012, 09:38 AM   #15
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
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.


JCarter426 is offline   you may: quote & reply,
Old 12-06-2012, 09:58 PM   #16
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
Since other people had trouble with the logging, here's my configuration file with all the logging removed, so you don't have to waste time hunting down everything. You'll need to rename the TXT to INI (because LF won't let me upload INI) and put it in the main directory of whatever game you want.
Attached Files
File Type: txt gliConfig.txt (18.9 KB, 92 views)


JCarter426 is offline   you may: quote & reply,
Old 12-07-2012, 08:52 PM   #17
Xarwarz
Forumite
 
Xarwarz's Avatar
 
Join Date: Sep 2005
Posts: 631
Veteran Modder 
Cool that should make it easy for a new person to get into it


USE MY MOD IN ANY MOD
xediixarwarz.com

NEXTGEN PICZ
Show spoiler
Xarwarz is offline   you may: quote & reply,
Old 12-08-2012, 04:07 PM   #18
Quanon
Senior Member
 
Quanon's Avatar
 
Join Date: May 2006
Location: Lost in my own unconsiciousens
Posts: 2,600
Forum Veteran Veteran Modder Helpful! 
Quote:
Originally Posted by JCarter426 View Post
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.
Code:
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.


TIQUILAAAAAAAA
Quanon is offline   you may: quote & reply,
Old 12-08-2012, 04:38 PM   #19
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,636
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.


JCarter426 is offline   you may: quote & reply,
Old 10-13-2014, 09:54 PM   #20
DarkWatcher
Lurker
 
Join Date: Oct 2014
Posts: 2
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

Last edited by DarkWatcher; 10-13-2014 at 09:56 PM. Reason: Grammar errors
DarkWatcher is offline   you may: quote & reply,
Old 11-16-2014, 04:41 PM   #21
DarthVarkor
Lurker
 
DarthVarkor's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 1
Current Game: Borderlands, Ass Creed IV
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?


"You exist because we allow it, and you will end, because we demand it"

~ Sovereign, Mass Effect 1.
DarthVarkor is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Community > Ahto Spaceport Cantina > Glintercept for kotor and tsl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:18 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.