![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
|
![]()
Ok folks be prepare, go get some tylenol with a coffee and any stimulants around to augment your brain wave frequency. (coffee=10% increase in metabolism).
I finally find out what seem to be the best uvw work flow to get exactly what you want in sh3 and in your preferred 3d app. Take notes that i am using max 2009 so others versions might have slightly different approach that i will not cover but feel free to do another tutorial based on mine but with your own version. I will describe bellow the step by step and explain after to eliminate confusion because if you follow the exact step by step with numbers then you will see it work perfectly and after you can read the tech stuff so here it go : 1.Open your model in sh3 select the node to export as obj. 2. Import your previous export in your 3d app with the same usual obj . setting that skwasjer mention in is tutorial import/export http://www.subsim.com/radioroom/showthread.php?t=135177 but don't follow the instructions for uvw saving and loading because my method don't need that for other the original skwasjer method work fine. 3. Select your model in viewport and go to utility panel in max 2009 select more and in the list choose uvw remove and click both buttons uvw/Materials, this will clear any uvw information's remove material. 4.Now select your Edit mesh modifier/polygon in the stack and start selecting the faces you want to be include in your new uvw layout. 5. Now with your face selected go in modifier menu/UV coordinates/Unwrap uvw apply only one leave it on default channel 1.(This will apply the Unwrap in sub-object mode) 6.Select Unwrap uvw in your stack and go face selection then arrange your uvw layout the way you want it. 7. When done apply an edit mesh modifier on top of your Unwrap uvw. 8. Select your Edit mesh modifier/polygon in the stack and start selecting the faces you want to be include in your next uvw layout. 9. Now go back to modifiers menu/ UV Coordinates and apply a second Unwrap uvw on top of the edit mesh and change the channel to 3.(we use 3 to leave channel 2 free for Ambient Occlusion pass later) 10.Now go to your newly apply Unwrap uvw select face and arrange the uv layout number 3 the way you want. 11 When finish right click in the stack and choose the collapse all option don't worry you won't loose your previous edit. 12. Now again go back in modifiers menu/ UV Coordinates and apply on top of your edit mesh. 13. Open in rendering menu/Render setup and in the window go to the tab/assign renderer and choose mental ray as your renderer. 14. Go back to rendering menu/Render to texture make sure your model is select. 15.Go to the mapping coordinates field and select use existing channel and select channel 2. 16. Go in the output tab now and click on add and select Ambient Occlusion (MR) in list. 17. Again in the output tab select the size of your map. (Note; 512X512 is sometime more then enough for good quality but i use 1024X1024, 2048 is a total waste of fps because Ambient occlusion is a real burden on the game engine.) 18. Now go to the selected element unique Settings field and change the samples to 80 and the spread to 1. 19. Go to the automatic mapping tab and adjust the spacing to 0.0. 20. Now select your unwrap uvw modifier and go in Parameters tab and make sure channel 2 is selected. 21. Open the edit window and click on the reset UVWs in your modifier/Parameters. 22. Now go in edit window and select all the mesh and in mappings menu select flatten mapping. 23. Go back in render to texture Click render button at the bottom left and you have your ambient occlusion map done. (notes; You can specify the location folder where your map will be saved at the very top of the render to texture window in general settings tab under output). 24.Now go in max file menu and selected export selected option and saved as obj. make sure you name your model correctly with the extension -uv2 ex; Turm2A_1_hd-uv2 25.Now go back to your unwrap modifier parameters tab and select channel 3 and repeat the step of number 23. but instead of saving as -uv2 change the number 2 for 3 ex; Turm2A_1_hd-uv3 to match your modifier channel. 26. Now select your unwrap uvw modifier and go in Parameters tab and make sure channel 1 is selected. 27.Now go in file max file menu and selected export selected option and saved as obj. make sure you name your model Turm2A_1_hd. This one is without any extension because it is the default channel number already include in obj. export. 28. Now back in sh3 editor and select the node you want to import make sure you always used the radio buttons call Load UVW files (3ds max) if you used another 3d app you used the other radio buttons instead the one call : Load obj files (others). 29. Now if you done everything correctly you should see in import window : Turm2A_conning int_High.obj 1 Turm2A_conning int_High.obj -uv2.uvw 2 Turm2A_conning int_High.obj -uv3.uvw 3 Selected all and import and voila you can go to the fridge take all the booze you want you deserve it! The main advantage of this method is that you don't have to bother anymore about channel 1 default that get paste by default in the next edit unwrap uvw so you keep your layout clean and separate. And you don't have to worry anymore about the damn reset uvw after each edit because this method have baked your different channel uv in one single modifier when you collapse the stack. Others advantage is that your file will used less memory and will be more stable because even if they call it stack, if you add many modifiers on top of each others you will get instability and big risk of file corruption. This method is by no way the only way to achieve the same result but it keep everything clean and eliminate the risk of overwriting your hours of uv layout edit i know what i'm talking about cause i redid three times the int conning tower! ![]() I hope i shed some light on the process and will continue to update this thread with tech info as i go along the process. Regards Hans, Last edited by Hans Witteman; 04-14-10 at 07:23 PM. |
![]() |
![]() |
![]() |
#2 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Nice work Mate!
![]() I've copied and save this information. ![]() |
![]() |
![]() |
#3 |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
|
![]()
Uhm Hans, uv map 3 has NO effect in game. None! Importing it makes no sense. See my earlier posts. It is probably collapsed to channel 1 in the primary OBJ, which is why it may work and you may think channel 3 is needed. But it isn't. Really!
__________________
![]() 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 | |
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
|
![]() Quote:
I will write a complete tutorial on ambient occlusion setting in max and how to baked them correctly in photoshop soon. I am presently testing it in game and so far it look great with 18 fps gain that not negligible at all, if everything go well i will never again used ambient occlusion from in game implementation i saw a post in a game developers forum mentioning that ambient occlusion was badly implemented in silent hunter 3. Now i am struggling with animation integration there is no tutorial on this so far, if possible i would greatly appreciated if someone can just give me some general pointers to help me finish it. The animation is done i only want to know how to attach an animated object to my sub that could trigger a sound file with keyboard command from the player? Thank again gentlemen's for any support Regards Hans |
|
![]() |
![]() |
![]() |
#5 |
Kaleun of U-3
![]() Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,816
Downloads: 123
Uploads: 0
|
![]()
I hope i made it clear enough i write it while i was doing it if i miss any crucial info's feel free to mail me if you see some inconsistency and i will correct it.
And just as a reminder skwasjer is correct on the fact that the game engine don't used channel 3 but it is only to help having a cleaner work flow in max and as he said probably the game engine automatically put it in it's own channel 1. In a word channel don't represent the exact same thing in max and in game engine. I hope i have not add more confusion with this one ![]() Regards Hans, Last edited by Hans Witteman; 04-15-10 at 01:59 AM. |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|