SUBSIM Radio Room Forums


SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

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

Reply
 
Thread Tools Display Modes
Old 08-27-2008, 07:52 AM   #751
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by skwasjer
Next, I have found out some more unknown data on material chunks, specifically rendering flags like 'Disable Z-buffer write' and 'Cull none'. These flags are important for single plane meshes (like railings) and (semi-)transparent meshes (like glass). If you are cloning incorrect materials, ingame the models may not be rendered correctly (for instance, railings may suddenly disappear from a certain angle due to culling, or objects behind glass are not rendered at all because they are clipped by the z-buffer). These new flags allow you to modify this behavior as well.
Excellent discovery skwasjer , will save a lot of trial and error testing!

Ref
__________________
ref is offline   Reply With Quote
Old 08-27-2008, 11:48 AM   #752
sergbuto
Pacific Aces Dev Team
 
Join Date: Sep 2002
Location: Sweden
Posts: 1,423
Downloads: 15
Uploads: 0


Default

Quote:
Originally Posted by skwasjer
Next, I have found out some more unknown data on material chunks, specifically rendering flags like 'Disable Z-buffer write' and 'Cull none'.
Great. Never knew about the z-buffer thing. Once in a while would bump into strange issues which fit as being due to z-buffer flag.

BTW, is there any possibility to zoom-in and out in the 3D viewer with a keyboard because I do not have a mouse with three buttons and a wheel?
__________________
Serg's SH4 and SH3 pages
sergbuto is offline   Reply With Quote
Old 08-27-2008, 02:08 PM   #753
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default

Quote:
Originally Posted by sergbuto
Quote:
Originally Posted by skwasjer
Next, I have found out some more unknown data on material chunks, specifically rendering flags like 'Disable Z-buffer write' and 'Cull none'.
Great. Never knew about the z-buffer thing. Once in a while would bump into strange issues which fit as being due to z-buffer flag.

BTW, is there any possibility to zoom-in and out in the 3D viewer with a keyboard because I do not have a mouse with three buttons and a wheel?
Yea, I already have keypad keys implemented in current private build for a few weeks so it will come
skwasjer is offline   Reply With Quote
Old 08-27-2008, 03:18 PM   #754
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Quote:
Originally Posted by skwasjer
...
I've got a bit confusing PM from Anvart that NightColor on Omni nodes is not actually the night color but something else. What is not really clear at this point but I hope Anvart can clarify it, and I will investigate it further. May explain some oddities people may have been experiencing with this field.
...
I do confirm, that the Omniīs NightColor is not what it seems to be. Changes to the repsective values have no effect on the lightīs coloration.

[EDIT]
DayLightColor has no effect on coloration also, neither has the intensity. These values serve another function. Whether an omni is "day-lit" or "night-lit" depends on the respective *.sim entry.



Regards,
DD

Last edited by DivingDuck; 08-27-2008 at 05:29 PM.
DivingDuck is offline   Reply With Quote
Old 08-27-2008, 05:12 PM   #755
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia Ū
Posts: 2,366
Downloads: 83
Uploads: 1
Default

Quote:
Originally Posted by skwasjer
...
Next, I have found out some more unknown data on material chunks, specifically rendering flags like 'Disable Z-buffer write' and 'Cull none'. These flags are important for single plane meshes (like railings) and (semi-)transparent meshes (like glass). If you are cloning incorrect materials, ingame the models may not be rendered correctly (for instance, railings may suddenly disappear from a certain angle due to culling, or objects behind glass are not rendered at all because they are clipped by the z-buffer). These new flags allow you to modify this behavior as well.

IIUC, not sure ...
Example, please ...

Quote:
Originally Posted by skwasjer
...
OK, Anvart just told me he doesn't know for sure and that it has to be tested further, so I will have to do some tests on this field.
...
Value is float (single) ... and may be coeff. of attenuation or Falloff radius ...???
__________________
Alex Ū

Last edited by Anvart; 09-17-2008 at 01:32 PM.
Anvart is offline   Reply With Quote
Old 08-27-2008, 06:00 PM   #756
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default

Quote:
Originally Posted by Anvart
IIUC, not sure ...
Example, please ...
Material chunk, relative offset 20 (or 32 from chunk start)

Int32 (4 bytes) - flags:

enum
{
DisableZBufferWrite = 0x1
CullNone = 0x2
}

If material has additional texture data (tga info), then there are more flags that I am not 100% sure about yet, have to do more tests. If anyone finds more, let me know.
skwasjer is offline   Reply With Quote
Old 08-28-2008, 12:50 PM   #757
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default

Thanks for the info. I honestly don't remember anything regarding the material emission parameter, so I will have a look at this.

Regarding this:
Quote:
Originally Posted by Anvart
In SH3: ships: hull - 00000000, for rigging - 02000000 ...
In SH4 airplane: skin - 00000000, glass - 03000000 ...
In SH4 sub's: main material - 00000000 ...
In SH4 ships: for hull - 00000000, for rigging (deck) - 02000000 ... and so on.

Yes, glass and railings amongst things don't use zbuffer and or culling which explains those values. All other materials also have those flags, as per your other examples. Now we can put a technical term and function on those flags

I've made a big list in Excel some time ago of all materials in the game with all those values. It makes it easier to see similarities accross the materials. I will post it in a couple of hours so you lot can do some comparing, I have to have some dinner now...
skwasjer is offline   Reply With Quote
Old 08-29-2008, 03:55 PM   #758
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin,

Не каждый может, что ты умеешь. Никто не понимает ничто о том, кроме тебя и нескольких других. Обращай внимание на твои слова!

Donīt forget, this is a high level conversation. Only a few understand what you and Skwas are talking about.
As for the flags, I remember them from my early SHIII modding days. Someone called them responsible for alpha channel behaviour, so did I. In the beginning I used them to make a material transparent. But an aplha was desperately needed to achieve transparency. Then Avart told about the byte trailing the materialīs ID, thank you. It works with SHIV too, BUT as soon as omnidirectional lights are introduced to a scene, the material and the corresponding object disappear. Besides changing these values seems to have a tremendous impact on the frame rate, at least on my system.

Have you ever noticed, that the glasses in any sub have specular highlights / reflections only? But you canīt see them. Whenever they crush, the animation is triggered and played, but the broken glass textures donīt show up after the event.

Note to Skwas, the MipMapBias is a floating point value.

Regards,
DD
DivingDuck is offline   Reply With Quote
Old 08-29-2008, 08:13 PM   #759
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default

Sorry, I've been a bit too busy again with RL stuff. Anyway, thanks again Anvart for pointing me to the emission byte. I have added it to next release. I was just pondering if selfillumination is a better term though...

Quote:
Originally Posted by DivingDuck
As for the flags, I remember them from my early SHIII modding days. Someone called them responsible for alpha channel behaviour, so did I. In the beginning I used them to make a material transparent. But an aplha was desperately needed to achieve transparency. Then Avart told about the byte trailing the materialīs ID, thank you.
Yea, the zbuffer is the key here. To make a true transparent face/plane both opacity and this zbuffer flag must be used in conjuction.

I've never been able to put correct terminology/purpose on those values, and while I've seen what changing them did, it was hard for me to put it in S3D, because if I can't explain it in simple words, then there was no purpose for me to put it in (would only confuse the user). When I made the 3D viewer for S3D I noticed similar renderings (unintentionally), and found out that those render states (zbuf/cull) caused it.

Quote:
Originally Posted by DivingDuck
It works with SHIV too, BUT as soon as omnidirectional lights are introduced to a scene, the material and the corresponding object disappear. Besides changing these values seems to have a tremendous impact on the frame rate, at least on my system.

Have you ever noticed, that the glasses in any sub have specular highlights / reflections only? But you canīt see them. Whenever they crush, the animation is triggered and played, but the broken glass textures donīt show up after the event.
Interesting. I do too little modding myself to see such things. Did it work in SH3 correctly then?

Quote:
Originally Posted by DivingDuck
Note to Skwas, the MipMapBias is a floating point value.
Thanks, I will correct it.

skwasjer is offline   Reply With Quote
Old 08-30-2008, 04:25 AM   #760
LukeFF
Silent Hunter
 
Join Date: Apr 2005
Location: Riverside, California
Posts: 3,610
Downloads: 41
Uploads: 5
Default

Quote:
Originally Posted by skwasjer
Interesting. I do too little modding myself to see such things. Did it work in SH3 correctly then?
Yes, it worked just fine in all boats.
__________________


ROW Sound Effects Contributor
RFB Team Leader
LukeFF is offline   Reply With Quote
Old 08-30-2008, 03:00 PM   #761
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

Skwasjer, a small request, is it possible to speed up the reordering of nodes in the tree?, perhaps entering the node order number directly, the spin controllers for it has no repeat feature, and with big files its a pain in the index finger to rearrange them .

Ref
__________________
ref is offline   Reply With Quote
Old 08-30-2008, 03:58 PM   #762
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default

Quote:
Originally Posted by Anvart
For example look Deep Exploration terms ...
For basic material - emissive ...
For map - selfillumination ...
In Max it's called selfillumination as far as I can see. And since there's no emission color to specify, I thought it applied to the map. How about I use both terms

Quote:
Originally Posted by Anvart
Quote:
Originally Posted by skwasjer
...
I do too little modding myself to see such things. Did it work in SH3 correctly then?
...
What is it?
I was referring to the problem DivingDuck described. I haven't played SH3 in two years so I can't recall if that effect works in SH3.

On a related note, perhaps it is bugged in SH4 due to a shader problem?

Quote:
Originally Posted by ref
Skwasjer, a small request, is it possible to speed up the reordering of nodes in the tree?, perhaps entering the node order number directly, the spin controllers for it has no repeat feature, and with big files its a pain in the index finger to rearrange them .

Ref
I know what you mean. It's a seriously crappy implementation if I may say so myself :rotfl: and I always wanted to improve this.

I'll see what I can do.
skwasjer is offline   Reply With Quote
Old 08-31-2008, 02:03 AM   #763
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin,

Много лет ни одного слова по русский не говорил. Pад, ты все же понял.

Quote:
Quote:
Originally Posted by DivingDuck
It works with SHIV too, BUT as soon as omnidirectional lights are introduced to a scene, the material and the corresponding object disappear. Besides changing these values seems to have a tremendous impact on the frame rate, at least on my system.

Have you ever noticed, that the glasses in any sub have specular highlights / reflections only? But you canīt see them. Whenever they crush, the animation is triggered and played, but the broken glass textures donīt show up after the event.


Quote:
Originally Posted by Skwasjer
Interesting. I do too little modding myself to see such things. Did it work in SH3 correctly then?
Well, there havenīt been any "real" omnidirectional lights in SHIII. And the old SH3 approach, using particle generators and a halo + halo.tga, works in SH4 too. But you have to omit using omnis in order to not make the transparent objects disappear. Regarding the broken glass effect, yes it plays/shows correctly in SH3.

Quote:
Quote:
Originally Posted by DivingDuck
...
Have you ever noticed, that the glasses in any sub have specular highlights / reflections only? But you canґt see them. ...

Quote:
Originally Posted by Anvart
IIUC, if you about SH4 interior for objects (for example as _Geamuri - glasses for dials), you should notice, that they are invisible (visibility byte = 0) ... and you can see only light reflection (two kinds! flat-plane or point) ...
after destruction objects become visible ...
In SH3 (all visible) for reflection we have procedural map GLASS_SPEC.tga (Type 13 specular) ...
Well, the visibility byte is set to '0' with the glasses, thatīs right. But the glasses DO NOT show up after the event of breaking. Even changeing the byte to '1' does not make them appear.

Quote:
Originally Poste by Skwasjer
On a related note, perhaps it is bugged in SH4 due to a shader problem?
Well, tested on my rig and confirmed by a friend. Both systems running with DX9 comp. ATI graphics cards.

[EDIT]
Iīve got confirmation that the same problem occurs when using NVIDIA gc. So, this is not an ATI nor gc driver related problem.

Regards,
DD

Last edited by DivingDuck; 08-31-2008 at 05:03 AM.
DivingDuck is offline   Reply With Quote
Old 08-31-2008, 07:00 AM   #764
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia Ū
Posts: 2,366
Downloads: 83
Uploads: 1
Default

Quote:
Originally Posted by DivingDuck
Moin,

Много лет ни одного слова по русский не говорил. Pад, ты все же понял.
...
Well, the visibility byte is set to '0' with the glasses, thatґs right. But the glasses DO NOT show up after the event of breaking. Even changeing the byte to '1' does not make them appear.
...
:hmm:
You tried to turn off InteriorIllumination controller?
It does some objects invisible ...

P.S.
I for a long time do not play SH3 and SH4 and may be has forgotten all ...
__________________
Alex Ū

Last edited by Anvart; 08-31-2008 at 07:12 AM.
Anvart is offline   Reply With Quote
Old 09-01-2008, 01:38 AM   #765
BlackCatx3
Swabbie
 
Join Date: Aug 2008
Posts: 9
Downloads: 0
Uploads: 0
Default Export Error found in v0.9

First let me state that this is really an incredible program! I started using it yesterday and came across my first problem with it today.

When I attempt to Export certain 3D models from stock SH Wolves of the Pacific Gold Edition, I get the following kind of error message:

ex. - "Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

File<105mm_Body> is not a valid file name"

Note, the .dat files that contain these models can all be read by S3D with no problem! It is only when I click on a 3D model on the left panel to select it, and then click EXPORT that the error message is immediately thrown up on the screen. If I click continue, the error dialog box disappears, BUT NO model gets exported and the export options box never appears.

This error occurs when I attempt to export certain parts of the 105mm deck gun or the 20mm and 37mm AA gun models. These models are for the Type IXD2 uboat that is included with the "Uboat Missions" add-on. Interestingly, the uboat model itself and the Turm export with NO errors..

It is very strange, as the 3D models named <105mm_WheelL1> & <105mm_WheelL2> cause export errors, and the models named <105mm_WheelR1> & <105mm_WheelR2> export properly with no errors.

Note that the .dat files and the models within them are STOCK, they have not been modified in any way since I installed the game on my computer.

I'm not sure if this is a known problem or not, I was trying to read through all the posts to see if someone already reported it... Hopefully there is some sort of solution to this problem, as I was really hoping to be able to export that entire IXD2 model!!


Here is an example of the error "details":

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.InvalidOperationException: File <20mmTwin_Wheel> is not a valid file name.
at System.Windows.Forms.SaveFileDialog.RunFileDialog( OPENFILENAME_I ofn)
at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
at System.Windows.Forms.CommonDialog.ShowDialog(IWin3 2Window owner)
at a.y()
at a0.a(Object A_0, LinkLabelLinkClickedEventArgs A_1)
at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkL abelLinkClickedEventArgs e)
at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEven tArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
S3D
Assembly Version: 1.0.0.0
Win32 Version: 0.9.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/S3D.EXE
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
skwas.Forms
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Bin/skwas.Forms.DLL
----------------------------------------
Dat
Assembly Version: 1.0.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Bin/Dat.DLL
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
S3D.Resources
Assembly Version: 1.0.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Bin/S3D.Resources.DLL
----------------------------------------
Microsoft.DirectX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
Assembly Version: 1.0.2911.0
Win32 Version: 9.12.589.0000
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2911.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
Microsoft.DirectX.Direct3D
Assembly Version: 1.0.2902.0
Win32 Version: 9.05.132.0000
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Dat.Shared
Assembly Version: 1.0.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Shared/Dat.Shared.DLL
----------------------------------------
Controllers
Assembly Version: 0.0.0.0
Win32 Version: 0.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Steve/Local%20Settings/Application%20Data/skwas/S3D_Asm/6d89b983/S3D/Controllers.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
skwas.Drawing
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Bin/skwas.Drawing.DLL
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
exylzjmp
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
skwas.IO
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/skwas/Silent%203ditor%20(v0.9)/Bin/skwas.IO.DLL
----------------------------------------
Microsoft.VisualC
Assembly Version: 8.0.0.0
Win32 Version: 8.00.50727.42
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
BlackCatx3 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 09:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright Đ 1995- 2019 Subsim