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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-03-07, 06:52 AM   #1
Jimbuna
Chief of the Boat
 
Jimbuna's Avatar
 
Join Date: Feb 2006
Location: 250 metres below the surface
Posts: 190,818
Downloads: 63
Uploads: 13


Default

Sorry mate

Welcome aboard kaleun
__________________
Wise men speak because they have something to say; Fools because they have to say something.
Oh my God, not again!!

Jimbuna is offline   Reply With Quote
Old 02-03-07, 08:07 AM   #2
Kaleun_Endrass
Sparky
 
Join Date: Jan 2007
Location: Hannover, Germany
Posts: 158
Downloads: 39
Uploads: 0
Default

Thanks for the welcome...

Ok, I need to give additional information for those who doesnīt know about the TMAP-chunk but could find an explanation what it could be.

The Silent Hunter III DAT-, ZON-, VAL-, SIM-, DSD-Files consists of chunks. There are several types. One of them is Type 1. That type encapsulates a 3d model. A "normal" 3d model has Vertices, Triangles and Texture Coordinates. Some type 1 chunks have the TMAP structure (as described in my earlier post) right after the VertexArray, TriangleArray and TxCoordArray.
My first guess was, that these data stands for smoothing the mesh, but that wouldnīt make much sense because one TMAP contains one 6-byte data structure for each triangle and a SmoothingGroups contains only information of those vertices/triangles that build a smoothed surface. If you take a look at the file description for the OBJ fileformat then Smoothing could be an explanation for the TMAP but still, why are information stored for each and every triangle - that doesnīt make sense?!
My second guess was, that the TMAP has something todo with multi-texturing but that doesnīt make sense either because you can find 3d models that uses three different materials but have only one TMAP. But if Iīm wrong with this, what are those unsigned shortints for?

Well, Iīll keep looking... maybe someone of you have an idea.
Kaleun_Endrass is offline   Reply With Quote
Old 02-03-07, 10:52 AM   #3
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Kaleun_Endrass
Thanks for the welcome...

Ok, I need to give additional information for those who doesnīt know about the TMAP-chunk but could find an explanation what it could be.

The Silent Hunter III DAT-, ZON-, VAL-, SIM-, DSD-Files consists of chunks. There are several types. One of them is Type 1. That type encapsulates a 3d model. A "normal" 3d model has Vertices, Triangles and Texture Coordinates. Some type 1 chunks have the TMAP structure (as described in my earlier post) right after the VertexArray, TriangleArray and TxCoordArray.
My first guess was, that these data stands for smoothing the mesh, but that wouldnīt make much sense because one TMAP contains one 6-byte data structure for each triangle and a SmoothingGroups contains only information of those vertices/triangles that build a smoothed surface. If you take a look at the file description for the OBJ fileformat then Smoothing could be an explanation for the TMAP but still, why are information stored for each and every triangle - that doesnīt make sense?!
My second guess was, that the TMAP has something todo with multi-texturing but that doesnīt make sense either because you can find 3d models that uses three different materials but have only one TMAP. But if Iīm wrong with this, what are those unsigned shortints for?

Well, Iīll keep looking... maybe someone of you have an idea.
That's one of the few misteries remaining on dat file structures (along with the animation format), as far as I know nobody has been able to figure it out, in any case don't use obj file format as a reference, it's used by us because it's the easiest one to produce, if you look at the SH4 thread pictures you'll see that the devs use 3ds max for designing, so probably it's a 3ds feature.

Ref
__________________
ref is offline   Reply With Quote
Old 02-03-07, 12:19 PM   #4
Kaleun_Endrass
Sparky
 
Join Date: Jan 2007
Location: Hannover, Germany
Posts: 158
Downloads: 39
Uploads: 0
Default

Hi ref,

I know that the devs are using 3dsmax and as I first started working on the dat files in March 2005, I found alot of similarities between the 3d models in the dat files and the 3ds fileformat.
But none of the chunks of a 3ds file have a structure size as the TMAP has.
Based on the name I would guess itīs an additional texture map (for each triangle one RGB value - but I never heard of a game using 48bit textures)

There is really just one thing left I think the TMAP is for and thatīs SmoothingGroups but I canīt figure out how the 3 unsigned shortints or 6 bytes should built such a group and futhermore why each triangle of the mesh needs to be in this group...

Did anyone tried to delete the TMAP section of an unit and compared the both visual appearances in the game? Maybe thatīs one hint... (Iīm asking, because I canīt test any longer - Iīm nearly 1000 miles away from my copy )
__________________
I hope alot of people will buy SHV. I will and I will mod it and play it. Keep in mind if we donīt buy it, the next SH title will look like this and you can look forward to a starfish addon...
Kaleun_Endrass is offline   Reply With Quote
Old 02-03-07, 07:04 PM   #5
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

I haven't had many time myself for research in the last months, too busy with GWX, as soon as we release the january (now february) patch I'll resume the work on some tools and research of some unknown stuff in sh3 that has potential for improvement/additions.

Ref
__________________
ref is offline   Reply With Quote
Old 02-09-07, 09:44 AM   #6
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin,
Quote:
Originally Posted by Kaleun_Endrass
...
Did anyone tried to delete the TMAP section of an unit and compared the both visual appearances in the game? Maybe thatīs one hint... (Iīm asking, because I canīt test any longer - Iīm nearly 1000 miles away from my copy )
I did, by mistake. Iīm doing the coding for Urfischīs open hatch project. After several days of investigation Iīve found out that the self illumination seems to be controlled by this TMAP section. The problem lies with Pack3D. When importing an object this section getīs lost. Even the unchanged original command roon canīt be re-imported without loosing it. I hope Iīll get the point how to (re-)attach this section to newly imported objects soon.

As you can see in the screenie below the newly added compartment is kind of foggy.



Donīt get confused about the green ambient light. Iīve used this color for some testing purposes. And yes, the compartment is lacking of several polys. First coding, then eye candy.

Regards,
DD
DivingDuck is offline   Reply With Quote
Old 02-09-07, 09:56 AM   #7
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by DivingDuck
Moin,
I did, by mistake. Iīm doing the coding for Urfischīs open hatch project. After several days of investigation Iīve found out that the self illumination seems to be controlled by this TMAP section. The problem lies with Pack3D. When importing an object this section getīs lost. Even the unchanged original command roon canīt be re-imported without loosing it. I hope Iīll get the point how to (re-)attach this section to newly imported objects soon.
Maybe prelighting applied to each face?

Ref
__________________
ref is offline   Reply With Quote
Old 02-09-07, 11:05 AM   #8
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin,
Quote:
Originally Posted by ref
Maybe prelighting applied to each face?
Ref
Sorry ref, donīt know what prelighting is.
Iīve altered the illumination data for the corresponding *.tga file. Seems that there is an effect. But I think the devs wouldnīt have made it that way for no reason.

Regards,
DD

Last edited by DivingDuck; 02-09-07 at 01:25 PM.
DivingDuck 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 11:13 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.