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

Reply
 
Thread Tools Display Modes
Old 01-23-14, 06:08 PM   #1
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
In regards to that last suggestion click the Status tab in the app. I'm fairly certain that 99% of what's displayed in a dialog box shows up there also. You should also be able to highlight the text in the dialog box and press Ctrl+C to copy it to the clipboard.
Okay, I will try.

Quote:
Originally Posted by TheDarkWraith View Post
Send me the files you have for this small_generic_01.gr2 thing.
This is the GR2 file with the broken material:

http://www.mediafire.com/download/5z...20textures.rar

In GR2 Editor everything looks fine, but if you open the file in Goblin (or in game) crates should look like this:



As I said before, the problem is in the material. The one solution I found, was replacing the corrupt material with a new one.

I will look into my hard drive for the meshes whose importing corrupted the material, if you think they can help you in understanding what went on
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 06:14 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
This is the GR2 file with the broken material:

http://www.mediafire.com/download/5z...20textures.rar

In GR2 Editor everything looks fine, but if you open the file in Goblin (or in game) crates should look like this:
You do know that you can turn lighting on in the app right? This allows you to check the normals and all to verify they are ok. I bet if you turned lighting on and defined some lights you would've seen this in the app also
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 06:17 PM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
You do know that you can turn lighting on in the app right? This allows you to check the normals and all to verify they are ok. I bet if you turned lighting on and defined some lights you would've seen this in the app also
No, I'd never noticed this feature
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 06:30 PM   #4
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by gap View Post
I will look into my hard drive for the meshes whose importing corrupted the material, if you think they can help you in understanding what went on
Found them!

https://www.mediafire.com/?mqhk320zi0qw0cd
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 07:33 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I see why your objects 'washed out'. It has to do with your MTL file for the Object13:

# Exported from Wings 3D 1.4.1
newmtl default
Ns 100.0
d 1.0
illum 2
Kd 0.8333333333333334 0.7428571428571428 0.6444444444444445
Ka 0.8333333333333334 0.7428571428571428 0.6444444444444445
Ks 1.0 1.0 1.0
Ke 0.0 0.0 0.0

newmtl harbor_ital_cont2_subset0
Ns 100.0
d 1.0
illum 2
Kd 0.588 0.588 0.588
Ka 0.588 0.588 0.588
Ks 0.9 0.9 0.9
Ke 0.0 0.0 0.0
map_Ka harbor_ital_cont2.Tga
map_Kd harbor_ital_cont2.Tga

Since that mesh only had 1 subset the app used the first newmtl definition it found as the material properties for the mesh when it updated the materials. You have to be careful with Wings3D and materials. That 'default' material will always screw things up!

Once I finish adding the checkbox and code for whether you want the materials updated or not to the import window it will help alleviate this problem of happening when you only want the vertex data updated.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 06:47 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
This is the GR2 file with the broken material:

http://www.mediafire.com/download/5z...20textures.rar

In GR2 Editor everything looks fine, but if you open the file in Goblin (or in game) crates should look like this:
Here's what it looks like rendered in the app with lighting enabled. Ambient light was disabled. I defined 3 lights: a directional (sun), a lightbulb (point), and a searchlight (Spotlight). All were positioned around the boxes.


You can see that they are washed out so there is a problem with the normals it appears or the specular value of the material is way too high. Could be other parameters of the material that are way too high also.

So there you have it: lighting in the app. You can create some cool scenes using the lighting

I found a small problem with the lighting also that I fixed (dealt with when you updated a light). Thus new version coming here very soon.

This also reminds me of something I wanted to add to the lights: a way to 'see' where they are visually in 3D space (along with option to show their defined name). I will add that now.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 07:07 PM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Here's what it looks like rendered in the app with lighting enabled. Ambient light was disabled. I defined 3 lights: a directional (sun), a lightbulb (point), and a searchlight (Spotlight). All were positioned around the boxes.]
Cool! I wonder how I had missed this useful feature before

Quote:
Originally Posted by TheDarkWraith View Post
You can see that they are washed out so there is a problem with the normals...
No, normals are okay. How do I know it?

- Wings3d displays the crates correctly.
- If you look closely at the picture at post #2143, the small crates (which I didn't edit) are also washed out, and they use the same material as the big boxes.
- After replacing the corrupt material with a new one, small and big crates looked normal again:



Quote:
Originally Posted by TheDarkWraith View Post
it appears or the specular value of the material is way too high. Could be other parameters of the material that are way too high also.
Again, no:

- Before noticing the corruption, I didn't mess with material properties in that file;
- After noticing the corruption, I checked that material properties weren't altered somehow, but the tweaked and a clean copy of the same file had exactly the same settings

Quote:
Originally Posted by TheDarkWraith View Post
I found a small problem with the lighting also that I fixed (dealt with when you updated a light). Thus new version coming here very soon.

This also reminds me of something I wanted to add to the lights: a way to 'see' where they are visually in 3D space (along with option to show their defined name). I will add that now.
Good!
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 07:18 PM   #8
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.1.404.1 released. See post #1
This version just fixes a problem with lighting that I noticed a few posts back
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 07:27 PM   #9
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

You know what I need to add to the import window? Whether you want the materials to be updated or not. Currently the importers always update the materials no matter what. If you only want to change the vertex data and nothing else then there's no reason to update the materials. I'll make that change
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 07:46 PM   #10
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
You know what I need to add to the import window? Whether you want the materials to be updated or not. Currently the importers always update the materials no matter what. If you only want to change the vertex data and nothing else then there's no reason to update the materials. I'll make that change
Quote:
Originally Posted by TheDarkWraith View Post
I see why your objects 'washed out'. It has to do with your MTL file for the Object13:

...

Since that mesh only had 1 subset the app used the first newmtl definition it found as the material properties for the mesh when it updated the materials. You have to be careful with Wings3D and materials. That 'default' material will always screw things up!

Once I finish adding the checkbox and code for whether you want the materials updated or not to the import window it will help alleviate this problem of happening when you only want the vertex data updated.
Do you mean that your application reads material properties (i.e. Ka, Kd, Ks, d, Ns, illum, etc) directly from mtl files? So far, when needed, I had to set those properties manually. In other words, diffuse, ambient, reflection, etc. properties of the vanilla materials weren't updted apparently. The one thing which was updated automatically, was the number of subset. What did I miss?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 07:53 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Do you mean that your application reads material properties (i.e. Ka, Kd, Ks, d, Ns, illum, etc) directly from mtl files? So far, when needed, I had to set those properties manually. In other words, diffuse, ambient, reflection, etc. properties of the vanilla materials weren't updted apparently. The one thing which was updated automatically, was the number of subset. What did I miss?
Try a version of the app > 400. I saw the same thing in versions < 400. In some version < 400 I screwed it up somehow and I don't know which version the screw up started. It should be working correctly now. Let me know if it's not.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 07:53 PM   #12
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Since that mesh only had 1 subset the app used the first newmtl definition it found as the material properties for the mesh when it updated the materials.
...and now that I think about it: why did GR2E used the default material, when the one subset had harbor_ital_cont2_subset0 assigned as its material
__________________
_____________________
|May the Force be with you!|
...\/
gap 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 04:40 PM.


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