![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
04-13-10, 09:39 PM
|
#1 | |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
The general structure of a DAT-file is:
Code:
- material
- (optional) embedded image
- texture map (set to: Ambient Occlusion)
- (optional) embedded image
- root node
- model
- label (name of node/model)
- controllers (f.ex. UnifiedRenderControler)
- subnodes
For the AO-map, when using Max, you must ensure you use the correct import function (import UVW-file for AO-map, instead of extra OBJ-files). Obviously, you must have exported the UVW-file from Max. So you have: - model.OBJ (main model) - model-uv2.UVW (AO-map) The extra channels 3, 4 can be forgotten. The game does not use them, and they are left overs from the devs (iow. channels they used during design of the models). If you have an AO-map, you must have the UnifiedRenderControler. Again, check existing DAT-files on where to place the controller. It should be a child of the root-node, and placed before any subnodes, but after the label/model. Last, the order of each chunk is very important (a treenode = chunk). The order is indicated by the number in the name (and seen at the top of each chunk-page). You can move chunks up/down in this order using the green arrows. Again, check existing DAT-files (or reuse them) for the correct order. Quote:
[edit] Final note: before importing an OBJ-file, you MUST have set up the DAT-file with all the materials (use the same name or order as in Max), and have those materials assigned to the node that 'hosts' the model-chunk (the one you import into). If not done, the import may succeed, but will not yield correct rendering in most cases. Hope this helps, skwas
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|
|
04-13-10, 11:03 PM
|
#2 | |
|
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
|
Quote:
Do you mean that if i have put additional uvw channel in max ex; 3,4,5,6 the game won't be able to see them or you mean they where just leftover from the developers? Thank you are helping me greatly once i will grasp most of the important concept i won't be asking much questions. Regards Hans |
|
|
|
04-14-10, 01:18 AM
|
#3 | |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
Quote:
channel 1: diffuse map channel 2: AO-map If you bake your lightmap in Max to channel 6, export it to -uv2.UVW. How you work in Max and what channels you use is of no relevance to S3D/game. In SH4 (don't know about SH3), you sometimes see in DAT extra channels too: 3, 4. These are what I mentioned 'left overs from the devs'. The game only knows about 2 channels.
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|
|
04-14-10, 02:07 AM
|
#4 | |
|
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
|
Quote:
For the Turm2A_1_conning ext_high i even have 3 different uv layout total and all show up fine in your editor and in game, so if the game can only have 2 channel usable why my 3 channels are all working fine? Maybe it is because we both are trying to communicate in our non native language ![]() But i sincerely appreciated your time and effort to help me out. Regards Hans, |
|
|
|
04-14-10, 02:35 AM
|
#5 | |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
Quote:
Texture size is irrelevant, you are talking about different materials applied to one model, but they all still use map channel 1 for the diffuse uv-map. That's why S3D and the game show it correctly. Again, for the lightmap you can also have it use multiple textures (multiple materials), but they all should use the same map channel (2 in the case of S3D/game)
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|
|
04-13-10, 11:10 PM
|
#6 | |
|
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
|
Quote:
On this one i look extensively in nodes tree and for Silent hunter 3 i don't see any UnifiedRenderControler, i just load Flakmonkey lightmap for TypeIIA DAT files and his AO are working fine without having any UnifiedRenderControler in it, so i am now perplex on this one? Maybe you are talking about Silent hunter 4 am i right? I am feeding on your precious infos! Regards Hans, |
|
|
|
04-14-10, 01:23 AM
|
#7 | |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
Quote:
All I can say is, most commonly, the problem is with incorrect chunk order, the model was not imported correctly (DAT-materials not set up properly prior to import) or the UnifiedRenderControler is missing or incorrectly setup. So you should try verifying this. [edit] CORRECTION, I misread your question: interiors do NOT have the UnifiedRenderControler (neither in SH4), this is reserved for external models/units. Instead, for interiors you must have an InteriorIllumination-controller for the lightmap to work afaik! Perhaps all a bit confusing yes, since I generally talk about SH4, but most info applies to SH3 as well. Hope this helps.
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|
|
04-14-10, 02:20 AM
|
#8 | |
|
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
|
Quote:
Yes you are helping me a lot believe me i have work almost 12 to 15 hours a day since the last 3 weeks on this project because i am recovering from surgery. And so far i did wonder with that first TypeIIA i am very happy with the result it is totally historically accurate the only part i couldn't touch was the height of the Conning tower floor because i don't think it is possible to found the node for crew members position on CT floor i did search a bit but i think it is hardcoded maybe. Regards Hans, |
|
|
|
04-14-10, 02:38 AM
|
#9 | |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
Quote:
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO |
|
|
|
04-14-10, 02:54 AM
|
#10 |
|
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
|
That what i tough, so no need for unifiedcontroller just as seen in dat files structure from Flakmonkey lightmap mod.
I think i know why it is not working, i just import the obj and i get the warning message about materials missing and i click to import anyway, maybe i will try first setting all material nodes before importing obj tomorrow. If you can tell me the general steps to integrated an animated objects on sub that will follow the sub with a sound trigger from player input on keyboard i would be in Valhalla Regards Hans, |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
