Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Modding

Reply
 
Thread Tools
Old 25-01-14, 23:46   #1
LukeRaider
Member
 
LukeRaider's Avatar
 
Joined: Jan 2010
Posts: 123
Default Project: Creating a DX11-Compatible TexMod

So let me start out by being completely clear: I have 0 knowledge of C++, other than that I've compiled stuff before. But regardless, I am interested in having a DX11-compatible TexMod and I know a lot of other people are too, so I wonder if perhaps by putting our heads together we couldn't come up with something ourselves.

An updated version of TexMod called Umod entered development a few years ago, and has been out of development since August 2012. It features a new interface and some extra settings TexMod does not, but sadly remains confined to DX9. However, what makes Umod useful to us is that it is open source. Check it out here: http://code.google.com/p/texmod/

If you aren't familiar with SVN, you can download the source code the easy way by punching the URL "http://texmod.googlecode.com/svn/trunk/" into this utility.

Right now what I'm wondering is if we couldn't just basically change all the DX9 references in the source code to DX11 and replace the inclusions from the DX9 SDK with the equivalent files from the Windows SDK (which includes the latest DX SDK). Doing this would make a DX11-only Umod, but I am perfectly alright with that. For example, this code:

Code:
uMod_IDirect3D9::uMod_IDirect3D9( IDirect3D9 *pOriginal, uMod_TextureServer* server)
{
  Message( PRE_MESSAGE "::" PRE_MESSAGE "( %lu, %lu): %lu\n", pOriginal, server, this);
  m_pIDirect3D9 = pOriginal;
  uMod_Server = server;
}
Would become this code:

Code:
uMod_IDirect3D11::uMod_IDirect3D11( IDirect3D11 *pOriginal, uMod_TextureServer* server)
{
  Message( PRE_MESSAGE "::" PRE_MESSAGE "( %lu, %lu): %lu\n", pOriginal, server, this);
  m_pIDirect3D11 = pOriginal;
  uMod_Server = server;
}
Is this even remotely possible, or is DX11 so different that it would require totally different code to pull/push textures the way TexMod does? Anyone with some C++ knowledge that could offer advice would be greatly appreciated. If nobody responds back I will go ahead with my own experiments and just see how it turns out (which will probably be in failure, but maybe I can get us a step closer to the goal).
LukeRaider is offline   Reply With Quote
Old 26-01-14, 01:44   #2
PhantomPain
Member
 
PhantomPain's Avatar
 
Joined: Dec 2012
Posts: 1,049
Default

I think the functions are probably whole different in DX11, someone would have come up with this already if it was achievable this way...
PhantomPain is offline   Reply With Quote
Old 29-01-14, 01:03   #3
LukeRaider
Member
 
LukeRaider's Avatar
 
Joined: Jan 2010
Posts: 123
Default

Hmm, actually upon looking into the Windows SDK my initial idea shows promise. So far the differences between DX9 and DX11 functions (as far as TexMod/UMod are concerned) are minimal. I'm experimenting with the source code now; no idea how much progress I'll make tonight though. I don't have a ton of free time this week.

EDIT: To be more clear, I already have UMod working with the latest Windows SDK (haven't tested, but it should be fine), and I'm working on changing references from DX9 to their DX11 equivalents.

EDIT 2: So far I've found two complications in the source code. 1) TexMod contains code for both D3D9 and D3D9Ex, whereas there is no equivalent from D3D9Ex to D3D11. Probably not a big problem, since I'm only targeting the one API, but D3D9Ex code might require cleaning out. 2) DX11 does away with some of the old image formatting of DX9. Possibly a total non-issue, or possibly very complicated, it depends on what all TexMod does with the DXGI format.

In both cases, I'll know more as I dig deeper.

Last edited by LukeRaider; 29-01-14 at 01:46.
LukeRaider is offline   Reply With Quote
Old 04-02-14, 01:35   #4
LukeRaider
Member
 
LukeRaider's Avatar
 
Joined: Jan 2010
Posts: 123
Default

(is double posting allowed in this situation?)

Just a quick update: I've completed my first pass of converting DX9 instructions to DX11 instructions. Next I'll have to check the GUI source code for any necessary modifications and then I can work on compiling and testing. Do I expect it to work? No, and for a few reasons, but if I can look at exactly what errors are triggered it will help me correct the problems.

At the same time, I've been learning bits and pieces about the differences between DX9 and DX11 and how to convert applications from the former to the latter. So I may be uneducated in this field, but don't count me out yet
LukeRaider is offline   Reply With Quote
Old 26-02-14, 23:31   #5
TheBengineer
Member
 
Joined: Feb 2014
Posts: 1
Default

Hey dude keep working on this! I want to mod tomb raider, but i don't want to lose how visual the game is. If you can get this working, you'll be a god in my book.

Last edited by TheBengineer; 29-03-14 at 21:15.
TheBengineer is offline   Reply With Quote
Old 29-12-14, 16:30   #6
telespentry
Member
 
Joined: Dec 2014
Posts: 1
Default

Quote:
Originally Posted by LukeRaider View Post
(is double posting allowed in this situation?)

Just a quick update: I've completed my first pass of converting DX9 instructions to DX11 instructions. Next I'll have to check the GUI source code for any necessary modifications and then I can work on compiling and testing. Do I expect it to work? No, and for a few reasons, but if I can look at exactly what errors are triggered it will help me correct the problems.

At the same time, I've been learning bits and pieces about the differences between DX9 and DX11 and how to convert applications from the former to the latter. So I may be uneducated in this field, but don't count me out yet
Any updates? I have been waiting a long time.
telespentry is offline   Reply With Quote
Old 29-12-14, 21:15   #7
jack9267_
Member
 
jack9267_'s Avatar
 
Joined: Jul 2014
Posts: 471
Default

Quote:
Originally Posted by PhantomPain View Post
I think the functions are probably whole different in DX11, someone would have come up with this already if it was achievable this way...
They are very different. I'm currently making Tomb Raider IV and C use Direct3D 9 and 11 etc. through the use of my abstracted rendering engine. It took long enough to get the engine to a point where its sort of generic. It will take a long time still to make the game use it which I plan to use hooks rather than a fake interface since that method doesn't wrap anywhere near as good to do a good wrap.

That method will work to wrap d3d8 to d3d9 perfectly though minus the shaders!
jack9267_ is offline   Reply With Quote
Old 14-01-15, 00:45   #8
GabrielCroft
Member
 
GabrielCroft's Avatar
 
Joined: Dec 2009
Posts: 1,428
Default

It looks like this guy managed to mod Lara Croft and the Temple Of Osiris.

Look here: http://www.gamevixenzone.net/saucy-r...-texture-1883/

But I don't know how, since it's a DirectX11 game.
I asked him but no answer yet.
I really wonder how he managed to do it.
GabrielCroft is offline   Reply With Quote
Old 07-04-15, 19:55   #9
memeo96
Member
 
memeo96's Avatar
 
Joined: Dec 2011
Posts: 310
Default

Hi, is there any progress ?
I must say that I am really interested in creating some mods for DX11 games ..so sad that we don't have any useful tools
memeo96 is offline   Reply With Quote
Old 29-07-15, 14:23   #10
Khan213
Member
 
Joined: Jul 2015
Posts: 2
Default Tomb Raider Mod

Quote:
Originally Posted by memeo96 View Post
Hi, is there any progress ?
I must say that I am really interested in creating some mods for DX11 games ..so sad that we don't have any useful tools
Your TR Mod is Awesome with new look, I have question that mod will work in DX11 or only DX9? plus I need download link for your Mod.

Thanks.
Khan213 is offline   Reply With Quote
Reply

Thread Tools

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



All times are GMT. The time now is 23:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.