SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [REL] S3D - Silent 3ditor (https://www.subsim.com/radioroom/showthread.php?t=119571)

ref 08-27-08 06:52 AM

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 :up:, will save a lot of trial and error testing!

Ref

sergbuto 08-27-08 10:48 AM

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?

skwasjer 08-27-08 01:08 PM

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 :up:

DivingDuck 08-27-08 02:18 PM

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

Anvart 08-27-08 04:12 PM

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.

:D
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 ...???

skwasjer 08-27-08 05:00 PM

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 08-28-08 11:50 AM

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...

DivingDuck 08-29-08 02:55 PM

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

skwasjer 08-29-08 07:13 PM

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. :smug:

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.

:up:

LukeFF 08-30-08 03:25 AM

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.

ref 08-30-08 02:00 PM

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 :D .

Ref

skwasjer 08-30-08 02:58 PM

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 :lol:

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 :D .

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.

DivingDuck 08-31-08 01:03 AM

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

Anvart 08-31-08 06:00 AM

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 ...

BlackCatx3 09-01-08 12:38 AM

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.


All times are GMT -5. The time now is 06:55 AM.

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.