![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#16 | |||
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
![]() |
|||
![]() |
![]() |
![]() |
#17 | ||||
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
May be you speak about Selfillumination maps? In NSS_Uboat7_CR.dat they are LM01.tga, LM02.tga, LM03.tga, LM04.tga and others. These maps simulate the shined and shadow spots and are in Type13 blocks.
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 02-19-07 at 03:02 PM. |
||||
![]() |
![]() |
![]() |
#18 |
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]()
Bump. Ref?
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... Last edited by Anvart; 02-19-07 at 03:19 PM. |
![]() |
![]() |
![]() |
#19 |
Sparky
![]() Join Date: Jan 2007
Location: Hannover, Germany
Posts: 158
Downloads: 39
Uploads: 0
|
![]()
Hi,
I looked again at the TMAP chunk and I found out, that the 3 unsigned shortints are indices for the elements of the TxCoordArray (as I mentioned in an earlier post). That means, each vertex that is an element of the trianlge at TriangleArray[i] gets an additional texture coordinate. In pseudo-code it would look like this: TriangleArray[i].V1.AddTxCoord( TxCoordArray[TMapDatChunkList[i].T1] ); TriangleArray[i].V2.AddTxCoord( TxCoordArray[TMapDatChunkList[i].T2] ); TriangleArray[i].V3.AddTxCoord( TxCoordArray[TMapDatChunkList[i].T3] ); So, I´m currently reconsidering the possibility that the TMAP stands for SmoothingGroups. I´m not an game engine developer but I guess that smoothing like 3dsmax renderings during runtime would be extremly slow and an easy way could be to display the same texture at the mesh several times but with some offsets each time. What do you guys think?
__________________
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... ![]() ![]() |
![]() |
![]() |
![]() |
#20 | |
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... |
|
![]() |
![]() |
![]() |
#21 | |
Grey Wolf
![]() Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
|
![]() Quote:
They put it in the dats waiting for the programers to implement it but they didn't finish it in time, personally I've seen no difference with or without TMAP. Ref |
|
![]() |
![]() |
![]() |
#22 | ||
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... |
||
![]() |
![]() |
![]() |
#23 | |
Grey Wolf
![]() Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
|
![]()
Moin,
as for the smoothing I remember having some problems in the past. If my remembrance is right an object appears "un"-smoothed ingame if one applies smoothing to an object and exports these smoothing groups when creating/exporting to wavefront *.obj file. Cutting off the TMAP sections has an effect. The textures seem darker then. But it´s not that obvious since most of the interior is brought to the scene by separate objects that have their own TMAP. Take a closer look behind the handwheels. Quote:
Regards, DD
__________________
|
|
![]() |
![]() |
![]() |
#24 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Ok, let me share my findings. While all of you are partially right, my -be it premature- conclusion is the following: I think the additional maps do indeed refer to the texture index array.
I've analyzed the chunk, and found that most models seem to not use all of the texture coordinates (Vector2). So, basically, we have an texture index array that does not map into each and every texture coordinate array. Now, if you think about it, this doesn't make sense. Why would there be more texture coordinates, then are actually used/mapped to each face. This triggered me to search further. Enter the TMAP. Many of the indexes in the TMAP array (one or more maps possible), fill those holes! They refer to many of the remaining (yet unmapped) - but not all - texture coordinates. Great, so what now? Well, it seems like the TMAP provides additional material info. For a ship with a wooden deck, the deck will cast/reflect light differently then the hull. Makes sense? But how does SH do this... Many of the models have more than 1 texture. Ie.: take the Yamato: it has NBB_Yamato_T01.dds as the main texture. The NBB_Yamato_N01.dds is a normal map, and is used for bumpmapping. It is similar in layout to the T01 texture and could be directly mapped using the same texture coordinates. However, when we look at the NBB_Yamato_O01.dds texture, you can see it is a crazy image where the alpha channel is completely different from the RGB channels. It's very simple though, the alpha channel looks to me like the height map, and is also used with bumpmapping. The RGB channels however looks like a specular or diffuse map or maybe even another type of map they introduced to make a big surface look more unique by blending it. But since the layout of this texture is entirely different, we need new texture coordinates! Eureka? You tell me... In case of interiors the same idea applies, although the TMAP appears to hold even more data. I haven't investigated this fully, but from what I see, interiors also use lightmaps, and maybe also both a specular and diffuse map. I will check this out later... Anyway, I will try to use this data in my renderer (see http://forums.ubi.com/eve/forums/a/t...5/m/9841082745 and http://www.subsim.com/radioroom/showthread.php?t=110392) and see what the effects are (may take a few days/weeks though). I will try to use the TMAP indexes and only texture the ship with the RGB channel (without the alpha) of the xxx_O01.dds texture to see if my findings work. If you have other ideas, think I'm absolutely wrong or whatever is on your mind, please keep 'm coming! ![]() |
![]() |
![]() |
![]() |
#25 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Oh and one other thing. Did you guys know about the NORM section that some models have trailing the TMAP? Looks like normals for each vertex, which will aid in smoothing out lighting/shadows...
|
![]() |
![]() |
![]() |
#26 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Ok, well, so much for days/weeks:
The Yamato with the NBB_Yamato_T01.dds texture mapped using coordinates from the standard index array: ![]() The Yamato again, this time textured with the RGB channel of NBB_Yamato_O01.dds. Note that I ONLY used the last TMAP texture index coordinates here, and completely ignored the standard texture index coordinate array. ![]() See all the rust and deep shadows? TMAP solved... Well partially, now for interiors... Will look asap ![]() |
![]() |
![]() |
![]() |
#27 |
Grey Wolf
![]() Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
|
![]()
Hey Skwasjer,
that´s a pretty glamorous start. Hope there will be some more information I can use to create my own TMAP then. Good luck with your project. And in case you need someone to test it, I´m at your service. Regards, DD
__________________
|
![]() |
![]() |
![]() |
#28 | |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]() Quote:
TMAP - 4 bytes mapCount - 1 byte following this is a 'mapCount' number of structures of: type - 1 byte, probably type of map. Most common value = 2 = SelfIllum map. Also found values of 3 and 4. ushort[trisCount * 3] - 6 bytes * trisCount If you use your structure, you would miss any additional texture coordinate maps. Most models only have one map so you wouldn't have a problem, but hey, we're after the correct data structure here... It's good that you already had a close understanding of the layout of this data section, but from all the info I have gathered, everybody was a bit wrong along the line or hadn't been able to fully prove what the data was there for. Alot of guesses were in the right direction, which was great help for me to be able to prove it. I will determine what the other types are for asap, specifically for interiors. |
|
![]() |
![]() |
![]() |
#29 | |
Admiral
![]() Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
![]() Quote:
![]()
__________________
Alex ® ![]() Moses said: "Don't create yourself an idol"... |
|
![]() |
![]() |
![]() |
#30 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Yes? I don't understand...
|
![]() |
![]() |
![]() |
|
|