- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
- 纳金币
- 17488
- 精华
- 1
|
Summary
LightWave users who want to use the 3DS file export capabilities of LightWave can use this tutorial to help develop a workflow for good model translation. There are no support files for this tutorial.
Category
Tutorials
Author
eric
Difficulty
Beginner
Time to Complete
15-20 min
Before you begin, a few words on 3DS legacy issues
The 3DS file format has been around since the days of DOS, so there are some legacy issues that need to be remembered and steps you should take to use 3DS files successfully.
For a complete tutorial on working with 3DS files, refer to the tutorial "Using 3DS files with Anark."
IMPORTANT: 3DS files can reference external images for textures, but they must be in the same folder as the 3DS file. Internally, 3DS only knows of the image's name, not a directory path to the file. So, if you create surfaces that reference files in your LightWave Content folder or other directory, you must copy the texture into the same folder as the 3DS file so it will automatically map onto the material in Anark.
IMPORTANT: External texture files can only have 8 characters + extension in the name. 3DS files only remember images named in the old DOS (8.3) naming convention. Example: a file named FABRIC23.JPG will be imported. RedWovenFabric.jpg will not.
IMPORTANT: Take care if using textures for LightWave surfaces with names longer than eight characters + extension. For example, if you use a texture named: LakeReflectionYellow.jpg, the reference name to the file is truncated to just "LakeReflecti." It is best to copy your used textures into a single directory and rename them to the DOS 8.3 format, then apply them to surfaces in LightWave.
Unfortunately, LightWave does not warn you which images had their names truncated on export.
LightWave can rename exported models and materials to have no more than eight characters long as well. A mesh named "RoundThingy" could be renamed to "RoundThi" or "RoundTh1." If naming is important to preserve in Anark, especially for scripting, name objects with only eight characters.
Because of the auto-renaming scheme that may happen in LightWave, models might be named the same in the 3DS file, which may or not be a problem under normal circumstances. However if you plan on addressing the object through JavaScript, having identical names is likely to point to the wrong "object" when accessing them in the DOM.
Bump maps are not supported and rendered at this time.
Save a copy
As a best practice, you should export your model to a file other than your working file because the export process does alter your model data slightly.
Choose Save Objects As� from the File menu to save a copy of your project to a new file.
Working in Triangles
Anark's real-time playback engine, as with most real-time engines, deals with polygon meshes as triangles instead of quads. If building or converting models specifically for Anark production, it's best to set LightWave to display and work with triangles. This step isn't necessary; however, to work with the raw mesh when fixing problem areas this may help.
From the Edit Menu, select General Options.
Under the Polygons item, select Triangles.
Click OK to close the dialog.
Determine the Scale of your LW Scene
Depending on your playback requirements, you may need to adjust the scale of your model to optimally fit within a certain volume in Anark Studio. Like many 3D software packages, LightWave uses an internal scale for working with geometry and is different from Anark's. Unless you scale the object up or down to fit in Anark's working environment, your imported object may be too small or too big to work with easily.
The following steps provide a guideline for scaling a model for a product demonstration or general multimedia demonstration. If you require real-world representation with a 1:1 unit scale, skip to the next section.
For the purposes of this tutorial, we will be working with meters as our unit of measure. If you don't want to change the scale in your LightWave file, you may need to change it in your Anark Studio project.
From the Edit Menu, select Display Options....
From the Units tab, select meters from the Units drop-down.
Click OK to close the dialog.
On a separate layer, create a Ball/Sphere at 0, 0, 0 (X, Y, Z) with a radius of 300 meters. This represents a good viewing volume of a standard Anark presentation. It may be necessary to use the Numeric options panel to aid in creating the sphere.
View all the layers of your object, and using the newly created sphere as a guide, move and scale down the selected model proportionally to fit within this sphere. The sphere is only a guideline, so it is not important that the model fit completely within the sphere. NOTE: If you do not want to scale your model to fit the sphere, there will be other ways, explained in later steps, to scale your object to a correct size.
Scaling your object to fit within a "good usable size" for use in Anark ensures that your model will not have to be rescaled within Anark using large post-import scaling like 100 or 1000 times larger or smaller, which can introduce mouse picking or orientation problems.
Delete the sphere or hide the sphere layer.
Working with Pivot Points and separate meshes
For every layer in your LightWave "model" file, a separate addressable object is generated in Anark Studio. If your project has three layers, then three models are created in your Anark file.
Currently, the LightWave AMX exporter does not export out LightWave's pivot point information from LightWave 8.5+. If you want to animate some objects around a pivot point in Anark Studio, you will need to set things up a specific way in LightWave.
For this tutorial example, the sideburn/beard trimmer is going to be animated around a specific pivot point.
Find the layer that contains the object you want to set the pivot point for.
In Anark Studio, each layer's center pivot point is generated from the origin of the LightWave scene. Move any objects that will pivot around a certain axis or point to the origin. For this example, the sideburn trimmer was moved down below the origin so the trimmer will rotate up from the top edge (X axis) of the model.
Export to the File
LightWave exports objects to the 3DS format with one visible layer per 3DS file. Therefore, if your model has multiple objects that will be articulated, animated or addressed by JavaScript individually, then each of those meshes should be exported to a separate 3DS file or entirely separate surface name and then assembled into one Anark presentation.
This could be as simple as migrating or merging all the separate layers into a single layer while keeping the animated object in a separate layer. For this tutorial, all the models except the sideburn trimmer will be merged to a single layer. This process can also help with playback speed as it will reduce the number of addressable "nodes" in the Anark presentation and may improve performance. Each separately named surface will become a separate node within Anark Studio.
For this shaver tutorial, all the layers that you want to merge together need to be visible.
Select Cut from the Edit Menu.
Make just a single layer active.
Select Paste from the Edit Menu.
If you did not build your model in triangles, go to the Multiple menu tab and select Triple on all your layers to ensure that your model is triangulated.
Select the layer with the merged parts to be the only one visible.
From the Export menu, select Export 3DS.
Browse to a location to save your file and enter a name. Click OK.
If your model has image maps applied as textures, engage Capture UV Maps.
Look at your object through the 揊ront� viewport.
Ensure that this is the orientation that you want your model to have in your Anark presentation. This assumes that you are using default Anark cameras and have not moved them from their default locations. Engage Apply Rotation and Custom Rotation and enter these values into the HPB fields: H: 0, P: -90, B: 180.
If you did not scale your model to fit within the sphere in the earlier steps, enable Apply Scale and Custom Scale and enter a scale factor. A baseline unit to try is 30. You may need to experiment with different values to achieve good results.
Click OK to save your 3DS file.
Repeat the export process for any other layers that contain articulated/animated objects.
Ensure that you are using the same values in the Custom Rotation fields for all your exported objects.
Import into Anark
First you need to create an empty group in the Anark Timeline.
Click and drag the Group object from the Basic Objects palette onto a Layer in the Timeline window.
Rename the group to something that you'll want to keep.
From the File Menu, select Import Resource.
One item at a time, browse and import all the models you exported from LightWave. They will appear in the Library palette.
Drag all the imported groups from the Library onto the empty group in the Timeline. They will now be child objects of the main group.
In this example, the beard trimmer was imported at the center of "TheShaver" group, so it needs to be repositioned to the correct location on top of the shaver body.
Click on any objects you need to move and use the Inspector palette or Position tool to reposition the object.
Now, any objects will rotate or move around the axis you specified within LightWave.
|
|