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, 09:12 AM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Yep, but when I open the 3ds Max obj file in Wings3d, the duplicated vertices are apparently not there. Moreover, if I re-export those meshes, their UV map is broken again by GR2 Editor.

Maybe Max uses a special format for those vertices which is recognized by Wings, and redundant vertices (for Wings) are merged automatically on importing them?
Just looking over the OBJ exports from Wings3D shows that it's doing some kind of optimization on your model. It clearly is removing duplicate vertices either by welding them together or just completely throwing them out.

I don't think 3DS Max is using any kind of special format. It just has no problem with duplicate vertices. It's very Granny friendly

I've used Wings3D in the past and had no problems with importing the OBJ files from it so there is something 'different' with your model. Once I get back home today I'll code in the cloning of duplicate vertice indexes found in the importer and I can almost guarantee it will fix the problem with your model.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 09:25 AM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Just looking over the OBJ exports from Wings3D shows that it's doing some kind of optimization on your model. It clearly is removing duplicate vertices either by welding them together or just completely throwing them out.

I don't think 3DS Max is using any kind of special format. It just has no problem with duplicate vertices. It's very Granny friendly
I think I know what is happening: Wings3d welds automatically redundant vertices within the same geometry (as it is the case of the Max-exported balloon). On the contrary, it keeps coinciding vertices, if they are located in different geometries combined together (as for S3d/GR2E obj files).
If you are familiar with Wings you know what I mean

Quote:
Originally Posted by TheDarkWraith View Post
I've used Wings3D in the past and had no problems with importing the OBJ files from it so there is something 'different' with your model.
As far as I can see it all depends on the complexity of the UV mapping. If you set few UV zones, or if the texture one is using is relatively uniform, you won't ever spot the mistakes, if any.

Quote:
Originally Posted by TheDarkWraith View Post
Once I get back home today I'll code in the cloning of duplicate vertice indexes found in the importer and I can almost guarantee it will fix the problem with your model.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 04:34 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I think I know what is happening: Wings3d welds automatically redundant vertices within the same geometry (as it is the case of the Max-exported balloon). On the contrary, it keeps coinciding vertices, if they are located in different geometries combined together (as for S3d/GR2E obj files).
If you are familiar with Wings you know what I mean



As far as I can see it all depends on the complexity of the UV mapping. If you set few UV zones, or if the texture one is using is relatively uniform, you won't ever spot the mistakes, if any.
Like I said earlier, if I clone vertices that are duplicated in the OBJ file the results speak for themselves:


This was your Wings3D OBJ barrage balloon imported into Iceberg01
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 05:10 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.1.403.1 released. See post #1

This version enhances the loose importer. If an OBJ file has indices that define a vertex more than once then for every indice for that vertex after the first the importer will clone that vertex thus keeping a 1:1 ratio (Granny friendly).

The strict importer will NOT do this. After all it's a strict import and the vertices defined in the OBJ file must equal the number of vertices defined in the mesh.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 05:29 PM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.1.403.1 released. See post #1

This version enhances the loose importer. If an OBJ file has indices that define a vertex more than once then for every indice for that vertex after the first the importer will clone that vertex thus keeping a 1:1 ratio (Granny friendly).

The strict importer will NOT do this. After all it's a strict import and the vertices defined in the OBJ file must equal the number of vertices defined in the mesh.
My Hat's off TDW. The UV map problem had bothered me for the last 3 months

Since we are at it, have you looked into the smoothing groups issue yet? and wath about the other problem I had pointed (see below)?

Quote:
Originally Posted by gap View Post
another weirdness that should be addressed:

http://www.subsim.com/radioroom/show...&postcount=149
http://www.subsim.com/radioroom/show...&postcount=154

This time I had exported some of the crates from small_generic_01.GR2, edited their height in wings, and imported them back in the same file (strict import, only vertices coordinates imported, keep existing Norma/AO data yes). Their material was getting corrupt. The one cure I was able to find, was setting a new material and discarding the old one.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 05:36 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
My Hat's off TDW. The UV map problem had bothered me for the last 3 months

Since we are at it, have you looked into the smoothing groups issue yet? and wath about the other problem I had pointed (see below)?
The loose importer had a problem with smoothing groups. It was fixed in the newest version.

If the importers encounter any 's x' entries in the OBJ files they ignore them (they just skip over them). So shouldn't matter anymore.

The other problem I have to fire up the app in the debugger and see. What files were used and what exactly did you do?
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 05:49 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
The loose importer had a problem with smoothing groups. It was fixed in the newest version.

If the importers encounter any 's x' entries in the OBJ files they ignore them (they just skip over them). So shouldn't matter anymore.


Quote:
Originally Posted by TheDarkWraith View Post
The other problem I have to fire up the app in the debugger and see. What files were used and what exactly did you do?
It has been quite a long time since I experienced that problem. All I can remember is:

file name: small_generic_01.GR2

task performed: exported crates mesh (if you look into that GR2 there are some levitating crates at the end of the docks); edited their y coordinate in Wings3d; imported them back in the same GR2.

import method: strict import (only vertex coordinates imported, kept the existing AO/Normal coordinates when prompted about them).

problem experienced: the crate material gor corrupted (over-reflective), but the GR2 was still working in game.

In case they can help, I think i have a back-up of the GR2 file with my updates and of the meshes imported in it.

P.S: have you seen this last suggestion?

Quote:
Originally Posted by gap View Post
On a side note: TDW, can you make error messages into selectable text fields, for us to quickly copy/paste them on the forum?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 05:50 PM   #8
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

I'm coding something new into the app that will allow you to 'see' how the vertices for a mesh are 'coded'. This is very important if you are going to use existing GR2s as a base for something new. Vertices can have lots of items defined for them such as:
- position (translation)
- UV1
- UV2
- bone weights
- rotation
- normal
- tangent
- binormal
- etc.

There are many ways to define a vertex. If you try and use a mesh that doesn't have the correct vertex information defined your new mesh may not render correctly. Worse yet a mesh could have vertex information that you don't need and needs to be defined but you don't define it so it renders badly/incorrectly.

Ultimately I'm trying to code in a way to change the vertex declaration for the mesh. Since this is Granny it won't be easy
TheDarkWraith 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:49 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.