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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-08-09, 07:44 AM   #211
fair_weather
Planesman
 
Join Date: Mar 2007
Posts: 197
Downloads: 18
Uploads: 0
Default

This is a fairly intriguing discussion.

And as a 3d illustrator it's very interesting to me.

I've been trying to mod the lighting in SH4, but it has eluded me...need to figure out what does what.

But, I think I can help with some of the theory behind lighting, mainly the self shadowing of the turms.

What I think the problem is, is the ambient lighting. It's too bright and it's blowing out the self shadowing.

I've been doing some testing in Cinema4D and have gotten similar results to what you have there.

I'm not one to know how to code much of anything, I just try to make things look good

If there's a way to change the ambient lighting throughout the day, that might fix the muted self shadows. Have the ambient light strong during noon and gradually decrease it throughout the day.

But, that's for way way in the future.

Just me throwing out ideas.

Keep up the good work

Edit:

Just reinstalled SH3, stock 1.0, enabled shadows. In awe.

And I think I figured out what the problem is with the multicolored crew.

It's the UV mapping, or some part of it, on the crew that is conflicting with the shadows. That's why it didn't show up on the modded crewmen. (a few pages back) However it did show up on the binoculars, which I think are a seperate .obj. If the crew were "fixed" by applying an exterior texture mod, can't the same be done with the binoculars?

And if Shadows can be implimented in SH3, it can be done in SH4.

Don't say it's impossible. Just look at Freespace 2 and what has been done with the Source Code Project. If one thing can be done in SH3. Since SH4 is a modified SH3 engine, it should be possible.
__________________

Information on the Real SS-228

Last edited by fair_weather; 03-08-09 at 08:35 AM.
fair_weather is offline   Reply With Quote
Old 03-11-09, 05:42 AM   #212
IFRT-WHUFC
Engineer
 
Join Date: Jul 2006
Location: By the Nordsee
Posts: 200
Downloads: 374
Uploads: 0
Default

[quote=Graf Paper]In perusing some of these files, I just wonder if that fix might be as simple as using the v1.0 crew textures for the uv mapping?

I'm affraid not, as enabling shadows in the original version 1 game, the crew also glowed the same!

ok
Rick
IFRT-WHUFC is offline   Reply With Quote
Old 03-11-09, 07:33 AM   #213
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Quote:
Originally Posted by fair_weather

And if Shadows can be implimented in SH3, it can be done in SH4.

Don't say it's impossible. Just look at Freespace 2 and what has been done with the Source Code Project. If one thing can be done in SH3. Since SH4 is a modified SH3 engine, it should be possible.
I hope so
__________________
What we do in life echoes in Eternity
tonschk is offline   Reply With Quote
Old 03-11-09, 05:11 PM   #214
fair_weather
Planesman
 
Join Date: Mar 2007
Posts: 197
Downloads: 18
Uploads: 0
Default

If you have SH4, you can check this out for yourself.

Go to Documents>SH4>data>cfg>main.cfg

It'll look almost the same compared to SH3, including the line under [VIDEO]

DynamicShadows=No

You can change it to yes, but like later versions of SH3 it won't work.

...actually...

That'd be something to test. If SH3 had dynamic shadows in the stock version, but just had them line disabled.

...Could the same be in SH4?

...I have to try this...
__________________

Information on the Real SS-228
fair_weather is offline   Reply With Quote
Old 03-11-09, 05:21 PM   #215
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by fair_weather
That'd be something to test. If SH3 had dynamic shadows in the stock version, but just had them line disabled.

...Could the same be in SH4?

...I have to try this...
DynamicShadow and DynamicShadowCast controllers do not exist in SH4. Look in SHControllers.ACT and you'll see they are missing. Actually look in all .ACT files for SH4 and you won't find those aforementioned controllers (not even in SH4.xxx).
TheDarkWraith is offline   Reply With Quote
Old 03-11-09, 05:22 PM   #216
fair_weather
Planesman
 
Join Date: Mar 2007
Posts: 197
Downloads: 18
Uploads: 0
Default

Can't they be keyed in?

For a laugh?
__________________

Information on the Real SS-228
fair_weather is offline   Reply With Quote
Old 03-11-09, 05:47 PM   #217
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by fair_weather
Can't they be keyed in?

For a laugh?
I've been trying to figure out what the .ACT files are. Are they Perl scripts? Another kind of script? What? If we can decipher that part then making new .ACT files might be possible.
TheDarkWraith is offline   Reply With Quote
Old 03-16-09, 11:18 AM   #218
Graf Paper
Ace of the Deep
 
Join Date: Jan 2008
Location: Pacific Northwest United States
Posts: 1,146
Downloads: 41
Uploads: 2
Default

So far as I can decipher so far, the ACT files seem to have a C++ executable wrapper with the line numbers stripped out, using MS Visual C++ 7.0. Find out what that wrapper hides and you'll know what ACT files are at their heart. Could be they're simple DLL files or maybe some sort of scripting language.

I've been experimenting with the settings for the Shadows test mod and it seems every experiment I've tried had yielded unremarkable results. Still no shadows just beneat the waves.

I suppose I need to Google for information on exactly how translation and rotation work with light sources in DirectX 9.

If I still canoot get some worthy results, it would seem that editing other files may be called for.
__________________
Still sailing the high seas, hunting convoys with those who join me.
Graf Paper is offline   Reply With Quote
Old 03-17-09, 09:32 AM   #219
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Graf Paper
Could be they're simple DLL files or maybe some sort of scripting language.
I think they're simple DLL files actually. Just from the bits and pieces I see when viewing them with a hex editor gives me this idea. From my assembly programming days they appear to have assembly segment 'parts':

text....;.......@.................. ..`.rdata..d....P.......P..............@..@.data.. .............................@....reloc

it appears there is a text segment, rdata segment, data segment, and reloc segment.
TheDarkWraith is offline   Reply With Quote
Old 03-17-09, 08:18 PM   #220
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

They act in several different ways.
They have a table that directs each block much as standard files.
But they are also designed to interact with Kashmir.
Kashmir, as we know, can edit the act files, and other files
in Sh3 and SH4.

So if you have Kashmir?
You fire it up,
it reads all the SH? files and you go on your merry way.
Much of the code in the ACT files is interface stuff.

It tells Kashmir how to display the key information.
(Can you say interface?)

What more do you need to know?
  Reply With Quote
Old 03-17-09, 10:05 PM   #221
Reece
CINC Pacific Fleet
 
Reece's Avatar
 
Join Date: Sep 2003
Location: Down Under
Posts: 32,763
Downloads: 171
Uploads: 0
Default

Quote:
(Can you say interface?)
Now that's rubbing it in-to-face!
Sorry I couldn't help myself!
__________________

Sub captains go down with their ship!
Reece is offline   Reply With Quote
Old 03-19-09, 08:10 PM   #222
UberTorpedo
Planesman
 
Join Date: Jun 2006
Location: Southern California
Posts: 194
Downloads: 78
Uploads: 0
Default

Ouote:

"So if you have Kashmir?
You fire it up..."

Ahhh, yes. Best Led Zeppelin song ever :rotfl:
UberTorpedo is offline   Reply With Quote
Old 03-23-09, 05:52 AM   #223
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by privateer View Post
They act in several different ways.
They have a table that directs each block much as standard files.
But they are also designed to interact with Kashmir.
Kashmir, as we know, can edit the act files, and other files
in Sh3 and SH4.

So if you have Kashmir?
You fire it up,
it reads all the SH? files and you go on your merry way.
Much of the code in the ACT files is interface stuff.

It tells Kashmir how to display the key information.
(Can you say interface?)

What more do you need to know?
Greetings Privateer.
I'm glad to see you!
...
This thread still ruminates about problem of past years (2005... 2006) ...?
Modders of past years have not wanted to expend time for this bug of Dev's ...
"Овчинка выделки не стоит ..." - russian saying ...
*.act - dynamic library ...
If it's interestingly possible to look import\export of executed files using the native Widows tool ... "Dependency Walker" (depends.exe) ...
For the best presentation it is necessary to use "Undecorate C++ functions" ...
You must use "Application Profiling to Detect Dynamic Dependencies" for more detailed review (for dynamic libraries) ...
Simply load sh3.exe, run application profiling and play in game some time ... and then look functions ...

As example: fragment (kernel.dll - one of the main files):
...
void cEngAnswer::CreateClones(struct sObject *)
void sAssocTable::Set(unsigned int,unsigned int)
void sCamera::EnableSpecular(bool,float)
sOcclusionQuery::sOcclusionQuery(void)
Transform3D::Transform3D(bool)
cEngAnswer::cEngAnswer(int)
sAutoList::sAutoList(struct sAutoList * *)
sAutoPointer::sAutoPointer(void)
sCamera::sCamera(struct sObject *,struct sGeometry *,float,float,float,float,float,float,float,float)
sController::sController(struct sController &)
sController::sController(struct sRuntimeInstance * *)
sGeometry::sGeometry(struct sRuntimeInstance * *)
sMaterial::sMaterial(struct sMaterial &)
void EngFree(void *)
int sTextureManager::Eval(void)
void FastNormalize(float (&)[3],float (&)[3])
struct sRuntimeInstance * sRuntimeInstance::FindByID(unsigned int,unsigned int,unsigned char)
struct sRefTarget * sRefTarget::FindByName(char *)
void GetBezierCoefs(struct Quat &,float,float,float,float)
unsigned int sAutoList::GetClassID(void)
unsigned int sController::GetClassID(void)
unsigned int sGeometry::GetClassID(void)
unsigned int sMaterial::GetClassID(void)
unsigned int sObject::GetClassID(void)
unsigned int sOcclusionQuery::GetClassID(void)
unsigned int sRefTarget::GetClassID(void)
unsigned int sRuntimeInstance::GetClassID(void)
unsigned int sSectorAlignedBox::GetClassID(void)
unsigned int sVectorController::GetClassID(void)
unsigned int sVertexProgram::GetClassID(void)
unsigned int sVirtual::GetClassID(void)
void Transform3D::GetColumn(float (&)[3],int)
char * sRuntimeClass::GetData(struct sRuntimeInstance *,int,int *)
char * sRuntimeClass::GetData(struct sRuntimeInstance *,int,int *)
char * sRuntimeClass::GetData(struct sRuntimeInstance *,int,int *)
char * sRuntimeInstance::GetData(int,int *)
float GetDefBezierTangents(float *,int,int,int,float *)
struct sRuntimeClass * sRuntimeClass::GetRuntimeClass(char *)
void GetScreenPixels(int,int,int,int,void *,enum PixelFormat *,enum DataType *)
struct sTexture * sTextureManager::GetTexture(char *)
void GetViewport(int &,int &)
struct sRuntimeInstance * GlobalFind(unsigned int *)
struct sAssocTable sAssocTable::GlobalRepository
struct sRuntimeInstance * sObject::HFindByID(unsigned int,unsigned int,unsigned char,int)
struct sObject * sObject::HierarchySweep(struct sVirtual *,unsigned int,int)
struct sObject * sObject::globallist
struct sRuntimeInstance * sRuntimeInstance::globallist
struct sRuntimeClass * sRuntimeClass::list
struct sPixelShader * sMaterial::pGlobalPixelShader
unsigned int sObject::sFrame
:rotfl:

P.S.
It's not exact tool, but the general (or common?) kind of functions you will see ...
Besides using this method ("Application Profiling") you can see errors in work of sh3 on your machine (as example, your video don't work correctly with game shaders) and also absence (loss) of some files (textures, for example) ...
P.P.S.
Very long post therefore has reduced in 2 times ...
__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 04-02-09 at 04:19 PM.
Anvart is offline   Reply With Quote
Old 03-23-09, 10:09 AM   #224
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

@Anvart:

Ever seen this before:

00:00:00.203: GetProcAddress(0x7C800000 [c:\windows\system32\KERNEL32.DLL], "FlsAlloc") called from "c:\program files\ubisoft\silenthunteriii\MSVCR71.DLL" at address 0x7C341950 and returned NULL by thread 1. Error: The specified procedure could not be found (127).
00:00:00.203: GetProcAddress(0x7C800000 [c:\windows\system32\KERNEL32.DLL], "FlsGetValue") called from "c:\program files\ubisoft\silenthunteriii\MSVCR71.DLL" at address 0x7C34195D and returned NULL by thread 1. Error: The specified procedure could not be found (127).
00:00:00.203: GetProcAddress(0x7C800000 [c:\windows\system32\KERNEL32.DLL], "FlsSetValue") called from "c:\program files\ubisoft\silenthunteriii\MSVCR71.DLL" at address 0x7C34196A and returned NULL by thread 1. Error: The specified procedure could not be found (127).
00:00:00.203: GetProcAddress(0x7C800000 [c:\windows\system32\KERNEL32.DLL], "FlsFree") called from "c:\program files\ubisoft\silenthunteriii\MSVCR71.DLL" at address 0x7C341977 and returned NULL by thread 1. Error: The specified procedure could not be found (127).

Is there something wrong with my c:\windows\system32\KERNEL32.DLL?
Nice little tool you have shown also

It's also interesting what happens with you try to run a 'modified' SH3.EXE with this tool. It terminates the application saying that a debugger is in use and for you to shut it down and then retry
TheDarkWraith is offline   Reply With Quote
Old 03-23-09, 11:33 AM   #225
CapZap1970
Sea Lord
 
Join Date: Mar 2007
Location: La Paz, Bolivia
Posts: 1,956
Downloads: 259
Uploads: 51
Default

Anvart:
What prog are u using?
Could you please provide more details on how to use it?
Thank you
CapZap
__________________
CapZap1970 is offline   Reply With Quote
Reply


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 11:38 PM.


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