SUBSIM Radio Room Forums


SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Fleet Boat Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-16-2008, 04:42 AM   #1
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,545
Downloads: 25
Uploads: 3
Default [TEC] Import/export 3D models to/from game using S3D.

See the S3D thread for download info: http://www.subsim.com/radioroom/showthread.php?t=119571


This thread will explain all the settings, how to set up the model (with UV-channels) in 3ds Max, and how to get models back into the game.


Export to WaveFront Object file (.OBJ)
  1. In S3D, select the model you wish to export.
  2. Go to the menu: File > Export > 3D model
  3. Choose the WaveFront Object (*.obj) file filter, and then type a file name to save to (or use the default, suggested name). Click 'Save'.
  4. Before actually saving anything the Export settings dialog will appear. All the settings by default are set to work with 3ds Max. Verify your settings so they look like this screenshot below.

    Note: other 3D studio's may require different settings.

  5. Make sure the Save to .UVW radiobutton is checked. If you are using another 3D studio, you probably want to use the other radio button to save extra .OBJ files instead of .UVW files.
  6. In the list view you will see a file name for each map channel that the model contains. Note that the first channel can NOT be deselected. This is the main file which contains both the geometry, as well as the first map channel (diffuse). All the other map channels will use a similar file name as the first one. The added part in the filename indicates it contains the uv-data for channel x. (-uv2 = channel 2, -uv3 = channel 3). You can not change these file names, S3D does this for you.
  7. Click export to save the .OBJ file, each .UVW file (if available), and a .MTL file. Note that you will not be asked to overwrite a file if it already exists. Keep that in mind so that you do not accidentally overwrite a file that you need and haven't backed up.
Import into 3ds Max
  1. Go to the menu: File > Import...
  2. Select the .OBJ file previously exported with S3D and click Open.
  3. Verify your import settings match the screenshot below:

    • The 'Rotate model' must be unchecked. Otherwise, the model will point upwards.
    • 'Texture coordinates' must obviously be on.
    • The 'Normals' checkbox should be selected. If the to be imported model has normals (interiors do for example, ships don't) this ensures you import them as well. If the model doesn't have them, this option does nothing, so it's best to leave it on.
    • 'Use materials' must be on, but you don't have to specify the actual file.
  4. Click OK to import the model.
  5. Press render and see if you get the model rendered properly using the diffuse map. Sometimes, S3D has problems finding the correct texture, or exports a texture file name with extension .TGA, but the game may only have a .DDS. In this case, the render will fail. You should correct the materials and point them to the right texture yourself in this case.
  6. To add extra UV-data to the model do the following steps, for EACH next map channel:
    1. Select the imported model
    2. Click the menu Modifiers > UV Coordinates > Unwrap UVW. A new 'Unwrap UVW' modifier is added to the modifier stack.
    3. In the parameters of the new modifier, change the map channel to the index you are about to add. If you have previously exported -uv2, set map channel 2, etc.

    4. After changing the map channel, you will be asked:



      Click 'Yes'
    5. Now click the 'Load' button, just above the field where you changed the map channel. You can now select the .UVW file that you want to load into this map channel.
    6. All that you have to do now, is modify the materials that come with the model, and include extra texture maps that use the newly imported map channel data. If you have come this far, you probably know how to do this yourself so I'll leave this out of this walkthrough.
That's it. Model import with S3D is posted below, and the steps are pretty much similar. Just reversed.

Now, if you don't have 3ds Max, or want to try the alternative approach using extra OBJ-files per map channel, the idea is similar. Import the main OBJ-file into the scene. Then, one by one, import each next OBJ-file (with the next map channel). Copy the UVW-data from the 2nd imported OBJ-file to the original model, and once you're done delete the extra models.

If anyone wants to write a guide for other 3D software, please do!

Last edited by skwasjer; 08-27-2008 at 08:35 AM.
skwasjer is offline   Reply With Quote
 

Thread Tools
Display Modes

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 06:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 1997- 2017 Subsim