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:30 PM   #2146
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
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, 06:47 PM   #2147
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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   #2148
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
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   #2149
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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   #2150
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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:33 PM   #2151
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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, 07:46 PM   #2152
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
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   #2153
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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   #2154
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
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
Old 01-23-14, 07:56 PM   #2155
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
...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
That's the way I coded it. When reading the MTL file the newmtl definitions correspond 1:1 to the subsets. If you have more newmtl definitions then subsets then only the first number of subsets newmtl definitions will be used.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 07:56 PM   #2156
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
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.
Well, until yesterday we had v 1.1.374.1 or lower. I am now testing the latest version. I will inform you whether the feature finally works as supposed or not
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 08:01 PM   #2157
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
That's the way I coded it. When reading the MTL file the newmtl definitions correspond 1:1 to the subsets. If you have more newmtl definitions then subsets then only the first number of subsets newmtl definitions will be used.
Okay. In other words, I must always remove manually the 'default' material (from within Wings 3d it is not possible to do it). This would be a minor disturbance but (for the sake of programming cleanness)...

...how hard would be making your application to check actual subset/material linkings instead?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 08:36 PM   #2158
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
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.
Pressing Ctrl in the status tab unselects the text. Right click => Copy did the job though

Quote:
Originally Posted by TheDarkWraith View Post
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.
Well, just tested the feature with version v_1_1_404_1. Either material properties aren't updated (neither visual nor numeric setting changes), or I am doing something wrong.

Regarding subsets, have you ever seen this post of mine. I might have found and exception to the "max two (textured) materials per mesh"...
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 08:50 PM   #2159
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Okay. In other words, I must always remove manually the 'default' material (from within Wings 3d it is not possible to do it). This would be a minor disturbance but (for the sake of programming cleanness)...

...how hard would be making your application to check actual subset/material linkings instead?
Fairly complicated. Not something I'm interested in tackling currently. Maybe in the future.

The first thing I do when I work in Wings3D is delete the default material or rename it to the name I need.

Quote:
Originally Posted by gap View Post
Well, just tested the feature with version v_1_1_404_1. Either material properties aren't updated (neither visual nor numeric setting changes), or I am doing something wrong.

Regarding subsets, have you ever seen this post of mine. I might have found and exception to the "max two (textured) materials per mesh"...
I'll look into the material properties and why they aren't updating tomorrow

I'll check out the exception also tomorrow. I impose no limit as to the number of materials you can define for the mesh. Define away!

v1.1.405.1 released. See post #1
This version adds tooltips to the items in the import/export window and also adds a new checkbox to that window that deals with materials. When importing and the new checkbox is checked then the importer will read the MTL file and update all the mesh's materials. When exporting if the new checkbox is checked then the exporter will write a MTL file and everything else needed for the materials.



Movie time Work will continue tomorrow...
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 09:25 PM   #2160
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Fairly complicated. Not something I'm interested in tackling currently. Maybe in the future.

The first thing I do when I work in Wings3D is delete the default material or rename it to the name I need.
That's just the least problem

Quote:
Originally Posted by TheDarkWraith View Post
I'll look into the material properties and why they aren't updating tomorrow
Okay, I will be online an ready to test any new version.

On a side note: dunno if it is just a side effect of other fixes or something you made on purpose, but I am pleased to tell you that a bug where inporting a new mesh in costal_guns_small.GR2 messed up its UV map (no matter program used for exporting the new meshes or import settings), is now fixed

Quote:
Originally Posted by TheDarkWraith View Post
I'll check out the exception also tomorrow. I impose no limit as to the number of materials you can define for the mesh. Define away!
Who knows, maybe there is something new to learn from those files

Quote:
Originally Posted by TheDarkWraith View Post
v1.1.405.1 released. See post #1
This version adds tooltips to the items in the import/export window and also adds a new checkbox to that window that deals with materials. When importing and the new checkbox is checked then the importer will read the MTL file and update all the mesh's materials. When exporting if the new checkbox is checked then the exporter will write a MTL file and everything else needed for the materials.
I will test this new version tomorrow.

Quote:
Originally Posted by TheDarkWraith View Post
Movie time Work will continue tomorrow...
Fair enough: it has been a productive day
__________________
_____________________
|May the Force be with you!|
...\/
gap 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 08:20 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.