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 09-09-13, 06:24 PM   #3766
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
You might have to swap Z & Y axes. That was one of the problems for me. At least at some point for something...

Also, you can try deselecting the "Flip V texture coordinates" option on import.
Tried them both, but still no joy
gap is offline   Reply With Quote
Old 09-09-13, 10:35 PM   #3767
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

could you send me the file and i'll see what is going on?
Targor Avelany is offline   Reply With Quote
Old 09-10-13, 02:30 AM   #3768
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
could you send me the file and i'll see what is going on?
Sure, check your PM box
gap is offline   Reply With Quote
Old 09-10-13, 04:57 AM   #3769
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

After looking more closely at the last picture of post #3770, I think I know what is going on:



It looks like the GR2 format wants to stitch up together adjoining edges which in the UV map are separeted
gap is offline   Reply With Quote
Old 09-10-13, 10:18 AM   #3770
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Got the message today. Thank you.

Tried importing the mesh into GR2 (very quickly, just pretty much following on automation how I used to do it) and had no problems with UVs at all.
I did, however, imported your meshes into 3ds max and re-exported them from there, but still, its a bit odd.

I'm gonna sit down and figure it out more clearly when I get home after work today.
Targor Avelany is offline   Reply With Quote
Old 09-10-13, 10:30 AM   #3771
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
Got the message today. Thank you.
Thank you too, Targor!

Quote:
Originally Posted by Targor Avelany View Post
Tried importing the mesh into GR2 (very quickly, just pretty much following on automation how I used to do it) and had no problems with UVs at all.
I did, however, imported your meshes into 3ds max and re-exported them from there, but still, its a bit odd.


can you try importing my obj files straight in GR2 Editor?

Quote:
Originally Posted by Targor Avelany View Post
I'm gonna sit down and figure it out more clearly when I get home after work today.
Okay, take your time.

In the menwhile I will try repeating your experiment. I have already tried all the possible Wings3d export settings and I don't have 3ds, but I will try exporting my meshes with blender, softimage mod tool and s3d
gap is offline   Reply With Quote
Old 09-10-13, 10:39 AM   #3772
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Let me go step by step how I am generally importing a mesh:

1) Export mesh in triangles w/ inverted Z & Y axes from whatever program I am using. All the normals, mtl lib & etc included.
2) Find the file (let's say balloon.obj & balloon.mtl) I do Ctrl+C & Ctrl+V to get balloon_Copy.obj & balloon_Copy.mtl, after which I rename them into balloon_AO.obj & balloon_AO.mtl. Note, I don't actually change anything in the files.
3) Go to GR2 Editor, load GR2 file I want to work with, go to the mesh and select Import:
a) non-strict
b) everything is selected, inlcuding AO data.
4) Import.

This is my general walk through for import. Try this, see what happens.
Targor Avelany is offline   Reply With Quote
Old 09-10-13, 02:36 PM   #3773
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
Let me go step by step how I am generally importing a mesh:

1) Export mesh in triangles w/ inverted Z & Y axes from whatever program I am using. All the normals, mtl lib & etc included.
2) Find the file (let's say balloon.obj & balloon.mtl) I do Ctrl+C & Ctrl+V to get balloon_Copy.obj & balloon_Copy.mtl, after which I rename them into balloon_AO.obj & balloon_AO.mtl. Note, I don't actually change anything in the files.
3) Go to GR2 Editor, load GR2 file I want to work with, go to the mesh and select Import:
a) non-strict
b) everything is selected, inlcuding AO data.
4) Import.

This is my general walk through for import. Try this, see what happens.
This is exactly the method I have used so far, except for inverting Z & Y (which anyway, under your suggestion I have tried yesterday, but without results) and for importing the AO map which, in the case of the balloon, I have skipped since its AO texture is overlayed to the diffuse texture. Nonetheless the lighthouse got a separate AO map and, while I was working on it, I imported both the diffuse and the AO models I had previously created. Result: both maps were messed up along their borders

It must be some kind of obj file formatting which is required by TDW's tool and not supported by wings
gap is offline   Reply With Quote
Old 09-10-13, 02:44 PM   #3774
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
This is eactly the method I have used, except for importing the AO map which, in the case of the balloon, I have skipped since its AO texture is overlayed to the diffuse texture. Nonetheless the lighthouse got a separate AO map, and while I was working on it I imported both the diffuse and the AO models I had previously created. Result: both maps were messed up along their borders

It must be some kind of obj file formatting which is required by TDW's tool and not supported by wings
I'll go through all of it today and see what happens, looking for difference between the files.

Also, AO obj: I still have no use for it and don't understand why is it getting sepparated. So far, you can pass the AO map through the textures/material maps, so I'm not sure why is there 2 objects and mtl's.
That is why I generally just import both of the same.
Targor Avelany is offline   Reply With Quote
Old 09-10-13, 03:37 PM   #3775
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
I'll go through all of it today and see what happens, looking for difference between the files.

Also, AO obj: I still have no use for it and don't understand why is it getting sepparated. So far, you can pass the AO map through the textures/material maps, so I'm not sure why is there 2 objects and mtl's.
That is why I generally just import both of the same.
I can answer this question:

often diffuse textures are tiled along a model. This is especially true for big models like ships, which otherwise would require huge textures. As long as textures used are homogeneous enough, and UV maps are placed wisely, you won't notice the repetitions, and the same pixels can be used on various parts of the model. This involves overlapping UV maps.

AO maps are another matter though: being caculated on the base of models' topology, there is a little chance that their texels can be used effectively on more than one area of their 3d model. Even if the model had many similar elements (which would correctly use the same portion of a diffuse texture) they would probably receive different internal shadows, depending on other surrounding elements, and they would therefore require each its own portion of the texture. On the other hand, shadows baked in AO maps don't need to be as detailed as the particulars usually painted on diffuse maps: for their nature shadows tend to be blurry anyway. As a consequence, a good AO map should contain little or no overlapping, with many small elements crammed over a relatively small texture area.

The obj format don't support multiple UV sets. The workaround used by GR2 Editor and by s3d, is importing the two UV sets from two copies of the same model, with identical vertex coordinates but with different UV maps. Nonetheless, if you are not going to use an AO map, or if your AO map uses the same coordinates as the diffuse one, you can discard the second UV set (thus reducing file size), and eventually overlap the AO on the diffuse texture as I did with the barrage balloon.
gap is offline   Reply With Quote
Old 09-10-13, 04:33 PM   #3776
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
I can answer this question:

often diffuse textures are tiled along a model. This is especially true for big models like ships, which otherwise would require huge textures. As long as textures used are homogeneous enough, and UV maps are placed wisely, you won't notice the repetitions, and the same pixels can be used on various parts of the model. This involves overlapping UV maps.

AO maps are another matter though: being caculated on the base of models' topology, there is a little chance that their texels can be used effectively on more than one area of their 3d model. Even if the model had many similar elements (which would correctly use the same portion of a diffuse texture) they would probably receive different internal shadows, depending on other surrounding elements, and they would therefore require each its own portion of the texture. On the other hand, shadows baked in AO maps don't need to be as detailed as the particulars usually painted on diffuse maps: for their nature shadows tend to be blurry anyway. As a consequence, a good AO map should contain little or no overlapping, with many small elements crammed over a relatively small texture area.

The obj format don't support multiple UV sets. The workaround used by GR2 Editor and by s3d, is importing the two UV sets from two copies of the same model, with identical vertex coordinates but with different UV maps. Nonetheless, if you are not going to use an AO map, or if your AO map uses the same coordinates as the diffuse one, you can discard the second UV set (thus reducing file size), and eventually overlap the AO on the diffuse texture as I did with the barrage balloon.
Ah, now everything makes sence! Thank you, sir! I believe this will help me in the future on the major scale. Especially with importing uboats from SH3 (for now at least) as their AO maps absolutely cannot be done on the regular UVs.
Well, in that case, I'll see what is going on with the uvs coordinates between the two files and why are you having such oddness.
Targor Avelany is offline   Reply With Quote
Old 09-10-13, 05:00 PM   #3777
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
Ah, now everything makes sence! Thank you, sir! I believe this will help me in the future on the major scale. Especially with importing uboats from SH3 (for now at least) as their AO maps absolutely cannot be done on the regular UVs.


you can use the same concept, just the other way around, for a possible new release of your lifeboat mod: take the AO map, overlap it to the diffuse map using the multiply blend mode, and just discard the AO texture together with the second UV channel.

One last reminder: vertex coordinates of the two objects used for diffuse and AO maps must be identical. Move one vertex in one of the models by one hundredth of unit, and GR2 Editor will throw an error (experienced it myself ).

Quote:
Originally Posted by Targor Avelany View Post
Well, in that case, I'll see what is going on with the uvs coordinates between the two files and why are you having such oddness.
Thank you Targor, I was going to ask you to send your 3ds-exported obj file my way, for me to do the comparison
gap is offline   Reply With Quote
Old 09-10-13, 06:39 PM   #3778
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Your file is missing tex-coords for the dmg cable object

That may be what is causing the mess.
  Reply With Quote
Old 09-10-13, 07:03 PM   #3779
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
Your file is missing tex-coords for the dmg cable object

That may be what is causing the mess.
Need collision models to be UV-mapped?

In any case that cannot be the problem: I still haven't started importing the model that you are talking about. The messed UV coordinates are the ones of the main balloon (see the last version of the GR2 file included in the package I sent you).
gap is offline   Reply With Quote
Old 09-10-13, 11:07 PM   #3780
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

so far was not able to find anything. I'll throw the file back at you tomorrow and see if we can narrow it down.
Targor Avelany is offline   Reply With Quote
Reply

Tags
awesome, campaign, graf zeppelin, harbour, new bases, new ships, ohii


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 10:56 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.