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-22-14, 08:32 PM   #2116
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by TheDarkWraith View Post
Tell me what's wrong with the way I do it. How does the sorter make it 'compatible' with the way I do it? If you can give me files and procedures to follow to expose the problem that would be great.

Being away from modding sucks, I love writing code and making new things. Life and my career always come first though and those are priority. Thank god I'm single too
I'll get the files to you ASAP. Like you? I travel for my liveing also and am currently in Wilkes-Barre, PA destroying a perfectly good store.


It's just the way your reading an obj file for import.
I'd suspect a few lines of code to adjust for universal import from any type obj.
  Reply With Quote
Old 01-22-14, 08:36 PM   #2117
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
What I would like is a compilation of problems/bugs/errors that need to be fixed/looked into.
Quote:
Originally Posted by privateer View Post
I'd suggest adjusting the way you read the obj files.
I agree. I didn't get time today for testing the latest versions of GR2 Editor. Will do it tomorrow. Anyway the main limitations of 1.1.374.1 (besides the ones already addressed with v1.1.395.1 and later versions) are:
  • unabality to clone bones;
  • unability to import smoothing groups in obj files exported from any 3d application but 3ds max;
  • after importing, UV coordinates of obj files exported from any 3d application but 3ds max are corrupt (no matter import settings set in GR2 Editor).

I am using Wings 3d as main tool, but objects exported from S3d or Blender show the same problem.

If you need it, I can give you a link to one of my models, for you to look into it.



Quote:
Originally Posted by privateer View Post
Real life is takeing it's toll on me also.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-22-14, 08:48 PM   #2118
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I agree. I didn't get time today for testing the latest versions of GR2 Editor. Will do it tomorrow. Anyway the main limitations of 1.1.374.1 (besides the ones already addressed with v1.1.395.1 and later versions) are:
  • unabality to clone bones;
  • unability to import smoothing groups in obj files exported from any 3d application but 3ds max;
  • after importing, UV coordinates of obj files exported from any 3d application but 3ds max are corrupt (no matter import settings set in GR2 Editor).

I am using Wings 3d as main tool, but objects exported from S3d or Blender show the same problem.

If you need it, I can give you a link to one of my models, for you to look into it.
Cloning bones is a problem? Really? Try v1.1.400.1 because there were a lot of problems with the 'fillers' in previous versions. I could add and delete bones without a problem with v1.1.400.1 using my new convention to work with GR2 files other than SH5s. What were the problems when cloning bones? I'll try cloning some bones tonight. Can you give me names of files and bones tried to clone in those files that caused errors?

As far as the importing and smoothing groups you'll need to give me files and detailed directions as to what you did so that I can view the problems myself in the debugger. This beast is getting very complicated now

I'm not well versed in smoothing groups so that's probably one of the reasons for the errors. If I don't know about it or what it is/does I can't code it. Why the 3DS max smoothing groups work? I must've got lucky
TheDarkWraith is offline   Reply With Quote
Old 01-22-14, 08:54 PM   #2119
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

This is what I and Privateer are talking about:



http://www.subsim.com/radioroom/show...postcount=3770

...and here is one of the last version of the barrage balloon recently added to OHII (after import/export in max):

http://www.mediafire.com/download/v9...inal_parts.rar

P.S: I will post later a mesh containing smoothing groups
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-22-14, 09:00 PM   #2120
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by gap View Post
  • after importing, UV coordinates of obj files exported from any 3d application but 3ds max are corrupt (no matter import settings set in GR2 Editor).

I am using Wings 3d as main tool, but objects exported from S3d or Blender show the same problem.

If you need it, I can give you a link to one of my models, for you to look into it.

The corrupted UV's seem to be from the way 3D Models are mapped in some programs and then when imported, some numbers are not matched so information is lost resulting in the corrupt UV's.

I know (after hours spent in a hex editor, our favorite tool) what is going on.

GR2's, when exported from a program add a fake kind of insert to make sure numbers match to allow full imports.
Some times it's zeroed, some times it's a repeat of already used info.

Smooth groups seem to have no effect as far as I have been able to detect.
Most 3D models I've been sent only have one smooth group anyway?

I also base that on the original files sent to me by the Dev's that have only one smooth group.
  Reply With Quote
Old 01-22-14, 09:12 PM   #2121
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Cloning bones is a problem? Really? Try v1.1.400.1 because there were a lot of problems with the 'fillers' in previous versions. I could add and delete bones without a problem with v1.1.400.1 using my new convention to work with GR2 files other than SH5s. What were the problems when cloning bones? I'll try cloning some bones tonight. Can you give me names of files and bones tried to clone in those files that caused errors?
No need for it: using v1.1.400.1 with the stock stuka model I was finally able to clone one of her bones (Junkers_Ju-87B_Stuka_wing_R, for the record). Tried again with v1.1.374.1 and it failed, as expected


Quote:
Originally Posted by TheDarkWraith View Post
As far as the importing and smoothing groups you'll need to give me files and detailed directions as to what you did so that I can view the problems myself in the debugger.
Okay, I am packing a simple model for you to check what I am talking about

Quote:
Originally Posted by privateer View Post
Smooth groups seem to have no effect as far as I have been able to detect.
Most 3D models I've been sent only have one smooth group anyway?
If you mean 3d models by me, the reason is that, being aware that GR2 Editor can't import them, I had replaced hard edges with bevelled edges
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-22-14, 09:18 PM   #2122
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
...and here is one of the last version of the barrage balloon recently added to OHII (after import/export in max):

http://www.mediafire.com/download/v9...inal_parts.rar
What were you importing this barrage balloon into? Tell me the file(s) and what you were doing (what kind of import, etc.)

Quote:
Originally Posted by gap View Post
No need for it: using v1.1.400.1 with the stock stuka model I was finally able to clone one of her bones (Junkers_Ju-87B_Stuka_wing_R, for the record). Tried again with v1.1.374.1 and it failed, as expected
Good, if the bones are working correctly that means I should be able to fix the meshes problems also since it will use the same fix.

Ensure to use that File-->Verify after making a change. That way when you do something and it fails because there are errors you can tell me what you did and when you did it so I can try and reproduce it.
TheDarkWraith is offline   Reply With Quote
Old 01-22-14, 09:19 PM   #2123
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by gap View Post
If you mean 3d models by me, the reason is that, being aware that GR2 Editor can't import them, I had replaced hard edges with bevelled edges
Your not the only one that sends me 3D models.


I've sent 3D models to a few of the original Dev's with more then one smooth group and had the GR2 version sent back and see nothing strange.


A model with one smooth group really has no smooth groups and can be ignored.
  Reply With Quote
Old 01-22-14, 09:29 PM   #2124
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
What were you importing this barrage balloon into? Tell me the file(s) and what you were doing (what kind of import, etc.)
If memory serves me well, I had tried inporting it in two native GR2's: costal_guns_small.GR2, and one of the icebergs. Loose import. All my import attempts failed -i.e. corrupt UV mapping-, no matter import settings used (options used more commonly: all checked but "import AO coordinates", and when prompted if I wanted to retain existing AO data, I normally answered no but, again, I really tried a lot of other combinations not to avail).

Quote:
Originally Posted by TheDarkWraith View Post
Good, if the bones are working correctly that means I should be able to fix the meshes problems also since it will use the same fix.
Yep, the feature definitely works again with latest version of your program

Quote:
Originally Posted by TheDarkWraith View Post
Ensure to use that File-->Verify after making a change. That way when you do something and it fails because there are errors you can tell me what you did and when you did it so I can try and reproduce it.
Will do that
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-22-14, 09:45 PM   #2125
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

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-22-14, 10:03 PM   #2126
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Where are the TGAs/DDSs for the barrage balloon?
TheDarkWraith is offline   Reply With Quote
Old 01-22-14, 10:05 PM   #2127
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
A model with one smooth group really has no smooth groups and can be ignored.
That is sure. Please see below.

Quote:
Originally Posted by privateer View Post
I've sent 3D models to a few of the original Dev's with more then one smooth group and had the GR2 version sent back and see nothing strange.
Well, it must be a problem with the way Wings writes smoothng groups then, because every time I tried importing an object with GR2 Editor, the program threw an error message even before actually starting the import.

An example? Try importing this object using last GR2E version:

https://www.mediafire.com/?71d3v1du34su3bm

I am importing it in the stuka stock GR2 (loose import, every option checked but 'AO map').

I get this message:

Quote:
***** the number of vertices defined in (path)\llighthouse for TDW.obj(558) does not match the number of vertices in the mesh (2378) *****
If I set all the edges to smooth before exporting (in wings3d), or if I remove manually all the smoothing groups from the file, the export works flawlessy (except for the usual UV corruption).

In both cases File-->Verify doesn't show any error.

On a side note: TDW, can you make error message 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-22-14, 10:08 PM   #2128
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Where are the TGAs/DDSs for the barrage balloon?
ops... sorry, I forgot about textures. You can get them from here
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-23-14, 01:37 AM   #2129
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
ops... sorry, I forgot about textures. You can get them from here
Ok I finally got to the bottom of the problem with the barrage balloon and importing. I found a few very minor errors in the importer but that wouldn't cause the rendering problem.

Granny is a little inefficient (if you want to call it this) in the way it treats vertices. If you export any mesh from any of the SH5 GR2s you'll notice that it has a LOT of vertices defined. Why you may ask? Every vertice in Granny has it's own texture coordinate and might also have a normal defined. If a vertice has the same position data but different texture data then Granny needs another vertice for it.

Your barrage balloon has been optimized in it's vertices. By optimized I mean if two vertices were found to have the same positional data then the 'duplicate' was discarded. This is not good for Granny!

I had the importer track all the indices defined and if a duplicate indice was found then it checked to see if the texture coordinates were different for the two. What I found was what I thought: the indices are defining two vertices (it's actually the same index in the vertices) that have the same positional data but different texture data. My importer is then overwriting the vertices existing texture data (which was previously defined) with new texture data. This makes it appear that texture data is all hosed up.

How to fix? What I have to do is when a duplicate vertice is found (face definition defines a vertex index that has already been used) I have to clone it.

Last edited by TheDarkWraith; 01-23-14 at 01:47 AM.
TheDarkWraith is offline   Reply With Quote
Old 01-23-14, 08:08 AM   #2130
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post

Granny is a little inefficient (if you want to call it this) in the way it treats vertices. If you export any mesh from any of the SH5 GR2s you'll notice that it has a LOT of vertices defined. Why you may ask? Every vertice in Granny has it's own texture coordinate and might also have a normal defined. If a vertice has the same position data but different texture data then Granny needs another vertice for it.

Your barrage balloon has been optimized in it's vertices. By optimized I mean if two vertices were found to have the same positional data then the 'duplicate' was discarded. This is not good for Granny!

I had the importer track all the indices defined and if a duplicate indice was found then it checked to see if the texture coordinates were different for the two. What I found was what I thought: the indices are defining two vertices (it's actually the same index in the vertices) that have the same positional data but different texture data. My importer is then overwriting the vertices existing texture data (which was previously defined) with new texture data. This makes it appear that texture data is all hosed up.

How to fix? What I have to do is when a duplicate vertice is found (face definition defines a vertex index that has already been used) I have to clone it.
It makes perfect sense, but why 3ds max exports of the same ballon model, whose vertices are also optimized, are imported correctly by GR2 Editor?

Please have a look to the obj files below (kindly provided by Targor Avelany) to know what I mean:

https://www.mediafire.com/?2l6uew8aqxebk2y
__________________
_____________________
|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 09:39 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.