SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-01-09, 05:49 AM   #1
keltos01
Silent Hunter
 
Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
Default




S3D does not look in the texture directory but the .dat's directory for the texture !!!

I had to create a new separate dir with the gun.dat and the occlu and texture to test the .dat...

keltos
__________________
"Honorable Builder of Sinking Ships"

keltos01 is offline   Reply With Quote
Old 04-01-09, 10:54 AM   #2
DarkFish
Sea Lord
 
Join Date: Aug 2008
Location: Stinking drunk in Eindhoven, the Netherlands
Posts: 1,844
Downloads: 28
Uploads: 0
Default

weird... I always put custom textures in the textures\tnormal\tex folder. And I've never had any problem with textures not showing up.
Were you working in your normal game folder (...\Silent Hunter 4 Wolves of the Pacific\Data\....) or a different directory? Cause probably S3D can't find the textures folder if the texture folders are placed in another directory (e.g. ...\AnotherDirectory\Data\textures\...).
DarkFish is offline   Reply With Quote
Old 04-01-09, 04:48 PM   #3
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by keltos01 View Post
S3D does not look in the texture directory but the .dat's directory for the texture !!!
There are different types of material. If you tell it to look in the same directory for the material, then it will. There are some system labels that it uses and replaces to get the directory, that's what the cfg_TXR and other such lables mean in the mateiral property. You can also have internal textures, that have the graphics contained within the .dat file and of course external textures. It will only look where you tell it :-).
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 04-05-09, 02:42 PM   #4
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

Quote:
Originally Posted by keltos01 View Post


S3D does not look in the texture directory but the .dat's directory for the texture !!!

I had to create a new separate dir with the gun.dat and the occlu and texture to test the .dat...

keltos
It does, but the search routines are a bit different from the game because S3D also has to take into account your mod directory. However, the local directory where the .DAT resides takes precedence over the global texture folder. Not only that, S3D takes this into account:

* Search local folder in your mod: <MODS>\<Your mod>\Data\<Folder with Dat-file>
* Search local folder when MOD is installed in game: Data\<Folder with Dat-file from your mod>
* Search global texture folder in your mod: <MODS>\<Your Mod>\Data\Textures\TNormal\tex
* Search global texture folder: Data\Textures\TNormal\tex

Additionally, S3D obviously also looks for internal textures.

As you can see, it's a little bit more complex than it appears

Conflicts can happen when the material is not set up correctly, like Nisgeis indicates, or when textures with the same name are used (and worse, stored in more than one of the locations mentioned above), resulting in incorrect representation in the 3D viewer. There's more odd scenario's possible when mods are intermixed, enabled over eachother, etc. where you expect a texture to show up, but S3D can't find it because it's outside its search path, or if S3D finds another (old one) first.

A good example of unexpected texture loaded is the prop_black.tga which comes with each airplane. The game has that file in the global texture folder but also each plane has it as internal texture. Replacing the internal texture will not yield expected result as the global texture is still used (it takes precendence over internal textures, although it makes more sense if it didn't). Only after removing the global texture will you see the new internal one.

I tried to best match the game load behavior but since mods during design time generally reside in their own \MODS location, I had to deviate from the game it's method of loading and resolving textures. That and the fact that it's not documented by Ubisoft how textures are resolved, all I could do was guess/test and try to come as close as possible.
skwasjer is offline   Reply With Quote
Reply

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 -5. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.