![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Navy Dude
![]() Join Date: Oct 2006
Location: California, USA
Posts: 176
Downloads: 4
Uploads: 0
|
![]()
This, hopefully easy to understand, tutorial is meant to allow prospective and current SH4 modelers a means to create those tricky Ambient Occlusion texture maps for their future shipping releases.
Anyhoo, before getting started I just want to make a few notes. 1. This was all done in 3dsmax 9, so methods in other modeling suites may vary. 2. This is done using a completely original Mesh, so don't assume that it works in the same way for modded/kitbashed stock ships although I'd imagine it'd be pretty similar. 3. I haven't spent too much time adjusting the various parameters mentioned throughout this tutorial, so feel free to experiment. 4. Finally, I don't claim to be literate with 3dsmax in anyway shape or form, and am still slowly learning; therefore, if there are any errors, ommissions, or perhaps better methods than what is desribed here, then please do say so. ![]() ---------- Lets begin. 1. First of course you'll need to load up your model into max. Once that is done then navigate along the top menu bar to 'Rendering', and click on 'Render' in the roll down menu. This will bring up the 'Render Scene Dialog'. Now under the 'Common' tab navigate all the way down to the bottom and expand out the menu with the header 'Assign Renderer', click on the box next to 'Production' and select Mental Ray as the rederer. Click "Ok" and close out the 'Render Scene Dialog'. ![]() 2. Alright now with your ship selected, go back to the 'Rendering' menu list and select 'Render to Texture' which will open a new menu. For this perticular example my Tone model was not uv mapped, so in the 'Mapping Coordinates' section I have 'use automatic unwrap' checked which will generate new uv coordinates to be used by the Ambient occlusion map. ![]() 3. Just below the 'Mapping Coordinates' section is the 'Output' roll out in which you'll want to add an 'Ambient Occlusion (MR)' from the list of available options that opens up. ![]() 4. Once that's done then scroll down a bit more, and set the maps size for 1024x1024. In addition set the number of samples to 80 and spread to 1.0 in the 'Selected Element Unique Settings' section. Also under 'Automatic Unwrap Mapping' set the spacing to 0. Leave everything else as is and click 'Render'. ![]() 5. It might take a little while for max to compute all the numbers, so go get a cup of coffee while you wait. ![]() ![]() Hmm, not too bad. Here's the Tone with ^ applied. And yes she is a WIP just in case anyone felt like pointing out her missing anchors. ![]() ---------- Last edited by rodan54; 05-06-08 at 03:36 PM. |
![]() |
![]() |
![]() |
#2 |
Silent Hunter
![]() Join Date: Feb 2008
Location: Milan Italy
Posts: 4,999
Downloads: 114
Uploads: 18
|
![]()
just what I was missing ! will post image when my Jyunsen B is rendered
![]() damn ! I have to redo the conning tower now ![]() thanks a lot there goes what I've done : ![]() is it normal that the option "ambiant occlusion mR" disappears from the menu when it's rendered to file ? here applied to the mesh : [url=http://imageshack.us] ![]() Last edited by keltos01; 05-06-08 at 08:56 AM. |
![]() |
![]() |
![]() |
#3 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Does the 2nd map channel in S3D show you the correct uv map in the preview window? It sounds like the uv coordinates aren't right. If they are right though, then I'd like to have a look at the .dat.
Oh, and you may want to check if SelfOccEnable is true in the UnifiedRenderControler.
__________________
![]() 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 |
![]() |
![]() |
![]() |
#4 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
The model is fine. But the problem you are having may be the key to some hidden data in the material chunk. I will want to investigate this further, but to do this I will need a ready to use mod with this dat-file. Do you have a testmod available for me, or can I just pick your current public release with this dat? I have been guessing for a long time about the remaining few bytes of materials (and am almost sure about some, just not 100%), and would like to find out.
One other thing I do notice is the node order. The 2nd material splits the first material. You may want to first try if moving the label and illum chunk directly after the parent material does anything.
__________________
![]() 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 |
![]() |
![]() |
![]() |
#5 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Hi Mikhayl, I've taken a look, and it's not a problem at all in the .dat. It's a problem with the texture. The artifacts you see in game are in fact not the ambient occlusion map itself (the AO map is rendered OK!), but the specular map that is rendered. I noticed this immediately because I only saw the artifacts when I moved the cam (iow. the angle vs the sun changed).
Then I looked at the O01 DDS, and there I saw indeed the AO map was also in the alpha channel of the texture, which is wrong. The alpha channel is reserved for the specular map. So, I copied a grayscale version of the T01 map (which is quick-n-dirty, you'd want to make a true specular map) into the alpha channel, and she rendered fine. This is the texture I used: http://sh4.skwas.net/temp/NSS_Uboat2b_O01.rar PS: You should also provide the extra mipmaps. You can choose this as an option when saving to DDS. PS2: The AO map could use a little more detail. PS3: The specmap uses the same uv-data as the diffuse map.
__________________
![]() 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 Last edited by skwasjer; 05-07-08 at 12:58 PM. |
![]() |
![]() |
![]() |
#6 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Punt for info.
Let's say you take an object from one ship (a carried boat, for example) and put it on another. The occlusion map fouls up the way it looks where it is now. Do you need to export the ship plus the boat, then make a new o-map? |
![]() |
![]() |
![]() |
|
|