SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [REL] Open Horizons II (https://www.subsim.com/radioroom/showthread.php?t=189818)

gap 09-09-13 06:24 PM

Quote:

Originally Posted by Targor Avelany (Post 2112252)
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 :-?

Targor Avelany 09-09-13 10:35 PM

could you send me the file and i'll see what is going on?

gap 09-10-13 02:30 AM

Quote:

Originally Posted by Targor Avelany (Post 2112323)
could you send me the file and i'll see what is going on?

Sure, check your PM box :salute:

gap 09-10-13 04:57 AM

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

http://img194.imageshack.us/img194/1268/rnn1.jpg

It looks like the GR2 format wants to stitch up together adjoining edges which in the UV map are separeted :hmm2: :doh:

Targor Avelany 09-10-13 10:18 AM

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.

gap 09-10-13 10:30 AM

Quote:

Originally Posted by Targor Avelany (Post 2112505)
Got the message today. Thank you.

Thank you too, Targor!

Quote:

Originally Posted by Targor Avelany (Post 2112505)
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.

:confused:

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

Quote:

Originally Posted by Targor Avelany (Post 2112505)
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 :up:

Targor Avelany 09-10-13 10:39 AM

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.

gap 09-10-13 02:36 PM

Quote:

Originally Posted by Targor Avelany (Post 2112516)
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 :wah:

It must be some kind of obj file formatting which is required by TDW's tool and not supported by wings :hmmm:

Targor Avelany 09-10-13 02:44 PM

Quote:

Originally Posted by gap (Post 2112583)
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 :wah:

It must be some kind of obj file formatting which is required by TDW's tool and not supported by wings :hmmm:

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.

gap 09-10-13 03:37 PM

Quote:

Originally Posted by Targor Avelany (Post 2112588)
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. :know:

Targor Avelany 09-10-13 04:33 PM

Quote:

Originally Posted by gap (Post 2112613)
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. :know:

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.

gap 09-10-13 05:00 PM

Quote:

Originally Posted by Targor Avelany (Post 2112635)
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.

:up:

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 :doh:).

Quote:

Originally Posted by Targor Avelany (Post 2112635)
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 :)

Madox58 09-10-13 06:39 PM

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

That may be what is causing the mess.

gap 09-10-13 07:03 PM

Quote:

Originally Posted by privateer (Post 2112662)
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? :doh:

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

Targor Avelany 09-10-13 11:07 PM

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.


All times are GMT -5. The time now is 08:04 PM.

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