RWSCreations.com

3d Models for various projects
It is currently Sun Dec 21, 2014 4:33 pm

All times are UTC - 5 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Thu Jul 29, 2010 9:05 am 
Offline
Site Admin
User avatar

Joined: Sun Aug 15, 2004 7:27 pm
Posts: 720
Official OEI Tutorial Document is
HERE

This is a repost of the documents contents, So I can easily get to them :)


Environment Placeable Prop Set-up and Export Info

1. Expotron Flags
2. Mesh Pivots
3. Material Settings in 3ds max
4. Door Hooks
5. Walkmesh Cutters
6. Level of Detail (LoD)
7. Texture Compression and Export
8. Naming Convention


1. Expotron Flags: Of the first and highest importance: Every object in the max file for a placeable must be properly flagged in the Expotron Utility in 3ds max. This document assumes you have 3ds max 6, 7, or 8 and Obsidian’s Expotron plugin.

Image

The selections for ‘Type’ and ‘Flags’ are self explanatory.

1. The mesh piece or pieces that will be visible in the game need to be flagged: Placeable (rigid). Character (skin) only applies to boned and skinned models (such as creatures and characters.)
2. The C2 mesh (comprised solely of axis-aligned boxes) is flagged: Collision Type 2
3. The C3 mesh (a more conforming collision mesh) should be flagged: Collision Type 3 (Special note: the C3 mesh must be contained fully within the boundaries of the C2 mesh.)
4. Any door hooks present need to be flagged as: Attachments (hook)
5. If there is a walkmesh present (sometimes there isn’t) it should be flagged: Walkmesh
6. If any alpha-masked transparency, or “alpha test” is present in the model, it needs to be flagged: Transparency Mask
7. If any portion of the model is to be walked on, it needs to be detached from the model out and flagged: Force Interface Projected Textures (this is so the selection circle shows up on it)
8. If any portion of the model should never cast a shadow (like ceilings in an interior tile) it needs to be flagged: Don’t Cast Shadows
9. If any portion of the model is supposed to ‘glow’ (be fully self-illuminated) it needs to be flagged as: Glow (nolight). The mesh name should also end in _G (example: PLC_MC_lamp01_G)

Note that if an object is flagged Glow (nolight), it will become translucent and draw additively in the game. If you want your glowy object to be opaque, a self illumination texture or “glow-map” needs to be utilized. The name of a glow-map texture needs to end with _i.

WARNING!!! >>> Sometimes, when you set or change a flag, the type can revert from Placeable (rigid) to No Type. Always double check to make sure the “Type” flag is properly set on objects. If you ever export a placeable and any portion of it is not showing up in-game, the most likely cause is that it is not properly flagged.



2. Mesh Pivot Points: It is important to reset the pivots and x-forms of all objects (except for attachment hooks). Resetting pivots and/or x-form on door hooks, for example, will break them, causing the doors to show up at 0, 0, 0 (in the center of the building) instead of positioned in the doorway where they should be. Needless to say, that’s bad.

All model pieces, collision meshes, and walkmeshes should have their pivot points set at 0, 0, 0 in the max scene, and this should represent the base (ground level) of the object at its center. There can be exceptions to this rule as in the case of fence or wall pieces. It may be more advantageous to orient the pivot at the end of the piece rather than dead center so that placing the pieces end-to-end and rotating them is a little easier.



3. Material Settings in 3ds Max: Textures and material properties must be correctly assigned and set in the max file. In some cases, a model’s material (shader) can be utilizing as many as four different textures as in the case of a street lamp prop: PLC_MC_LAMP02. A Diffuse Texture, Self-Illumination Map, Tint Map, and Normal Map are all being utilized to achieve the final visual result of the object. Note that the tint map image is plugged into the “Filter Color” slot in the material editor. Only the Diffuse Color, Specular Color, Specular Level, and Glossiness have any bearing on the appearance of a model in-game.

Image

Regarding Tint Maps: If a placeable is using a tint-map, default tint values need to be entered in the appropriate .2da file.


4. Door Hooks: A door hook is a dummy object whose pivot point is the exact spot where the door’s pivot point will position itself. A door hook on a building should be oriented in the lower left hand corner of the doorway, and it’s local X axis should point across the face of the door, as shown below. The “Reference Coordinate System” should be set to Local to accurately represent the orientation of the door hook.

Image

A building can have multiple doors and door hooks, and they all need to be linked to the base house model. Door hooks should have the name: HP_DR_STD01, HP_DR_STD02, etc. This naming convention represents abbreviations for HookPoint_Door_Standard.

Below is an example of a complete list of objects in a max file for a house prop. Represented are the base model of the house, two door hooks (both parented to the base model), the C2 mesh, the C3 mesh, the walkmesh, the windows which are detached as a separate object from the house because they are using a self-illumination map, LoD 1 and LoD 2. This is a typical setup for a house prop.

Image


5. Walkmesh “Cutter”: Generally speaking, the C2 box of an object will define the area around a placeable prop which will cut out or “stitch” into the walkmesh it is placed on, whether that is exterior terrain or in a tileset. However, there are some cases where this is a problem, or where more precise detail is required. Walkmesh stitching is calculated in 2D from the top down. In the example of the wall-with-archway shown below, the portion of the C2 mesh surrounding the arch of the doorway is necessary to prevent the camera from passing through the arch, but if this C2 were allowed to stitch into the walkmesh, it would cut a hole in the ground below, blocking the player from passing through. The walkmesh as shown (in red) cuts out only the wall areas and allows players and creatures to pass through the archway. A walkmesh cutter always overrides a C2 mesh when stitching.

Image

Some placeables that are intended to be walked upon require some special care. In the example of the water well below, the prop needs to prevent walking in some areas, and allow the player character to walk up on in other areas. Walkable and non-walkable surfaces are determined by assigning specific material IDs within the custom “Walkmesh Material”.

Additionally, all the vertices along the outer edge of the walkmesh need to be assigned a specific vertex color green (RGB=0, 255, 0) in order for the engine to recognize them as “transition vertices”, which essentially means vertices that define the edges where the walkmesh of the placeable meets the walkmesh of the terrain (or tileset) walkmesh. These two surfaces need to “stitch” together seamlessly to allow movement and path-finding of the player character.

All other vertices should be colored white (RGB=255, 255, 255). The white vertices are recognized by the engine as verts that need to maintain their position relative to the object itself. In other words, if you raise the entire well up a little, or shove it down into the terrain a bit, the border vertices will still attach to the walkmesh surface below, while the remaining vertices will move with the well.

Player character collision with environment objects in the game is determined exclusively by the walkable and non-walkable boundaries of the walkmesh. A model such as a wall and its collision meshes are NOT involved in any way with blocking movement of the characters and creatures. It is for this reason that a walkmesh cutter should not conform tightly to the contour of a placeable, but rather should have a reasonable margin of space between the object and the non-walkable boundary so that the player does not clip into the object when walking near it. The purpose of the C2 and C3 meshes is only to block the camera and projectiles from passing through objects, and to block line-of-sight of characters and creatures.

“Transition” Vertices:

Image


Vertex Color Settings:

Image

Material ID Settings:

Image


Material ID assignments also serve the purpose of defining the type of surface that is being walked upon (dirt, stone, wood, grass, etc.), and therefore the footstep sound that will be played when the character/creature walks upon it.


6. Levels of Detail (LoD): Placeable objects, especially buildings, in excess of 3,000 or 4,000 polygons should be considered for having LoDs.

Here’s an example of the naming convention for a placeable and it’s LoDs:

PLC_BC_Building01
PLC_BC_Building01_L01
PLC_BC_Building01_L02

WARNING!!! >>> Make sure the number “zero” and NOT the letter “O” are used for L01 and L02 (L zero one and L zero two). This small typo will cause the LoD mesh to not be recognized by the game engine.

L01 and L02 should represent roughly 70% and 40% of the model’s total polygon count. For example:

If “PLC_BC_HugeHouse” is 10,000 polys, then “PLC_BC_HugeHouse_L01” should be about 7,000 polys and “PLC_BC_HugeHouse_L02 should be about 4,000 polys.


7. Texture Compression and Export: Generally speaking, a diffuse texture with no alpha channel present should be exported as DXT-1 (no alpha). Any texture containing alpha channel information, such as the specularity mask in the normal map texture, transparency alpha-masks in the diffuse, or masks in tint-maps should be exported as DXT-5. DXT-1 is a higher compression level with greater detail loss but smaller file size, and DXT-5 is a lower compression level that holds better detail, but has a larger file size. (DDS export plugin for Photoshop is required; available from Nvidia)



When exporting from Photoshop, save as format D3D/DDS (*.DDS) -

Image

Then choose the compression level as shown -

Image


*Apparently, a wide variety of formats are available. Consult your local graphics programmer. Use responsibly!

8. Naming Convention: This is a brief explanation of the abbreviation system for naming placeables. All placeables, whether they are buildings, walls, fences, crates ‘n barrels, tree stumps, or a tome of Thaumaturgic Incantations, will always begin with PLC. Note that there can be no spaces in object names. Elements must be separated with underscores.


Using a color key to illustrate, the element in BLUE is the general model type (PLC=Placeable, C=Creature, P=Player Character, W=Weapon, I=Item)

The element in RED designates placeable type categories (B=Buildings, M=Manmade, N=Nature, D=Door).

The element in GREEN represents a location type (C=City, R=Rural, N=Nature, T=Tileset, S=Swamp, F=Forest).

The element in BLACK is the name of the object followed by an iteration number if the object is a part of a set.

For example: PLC_BR_House01 = Placeable_BuildingRural_House01

(Only placeables have the RED and GREEN classifications.)



In conclusion, there are a couple more general things to consider when making placeable props. For engine performance reasons, the number of dynamic light sources affecting a single object needs to be kept low. Around 3 and no more than 5 was the rule used in NWN2. If the directional light (Sun/Moon) light is being utilized in the level, that counts as one light, and then any placed lights count additionally. If your placeable is particularly large, like a humongous castle for instance, it is advantageous to divide the model up into separate (detached) pieces within the max file. If your model is really big, but you can only have 3-5 lights affecting it, then this obviously prevents you from placing 10 torch lights along the front of it, for example. Dividing a large model up into segments enables more flexibility with lighting the object. This is also true for Meta-Tiles. A standard tileset tile is 9x9 meters, so if you make a Meta-Tile that is three tiles wide by three tiles long (27m x 27m) for example, it should be cut up into 9x9 meter sections so that more placed lights can be used within it.

_________________
Image

Klaatu Barada Nicto


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group