PDA

View Full Version : Modelling Creating Your First Static In 3DsMax / Gmax


Rhino
2009-01-14, 17:16
mschoeldgen has made a really easy, basic tut to help start people off on making there statics. Thou this tut only goes into the very basics of static making, with any luck this will give some of you the first step up to bigger things :D

Original Topic: Creating Your First Static In Max / Gmax - Official BF Editor Forums (http://bfeditor.org/forums/index.php?showtopic=12770)

']
by mschoeldgen from eXperience World War II

I extracted this quick and dirty tutorial from a post i made a few months ago. It should give you at least hints on how to setup your material manager and manage a successful export of your first static object to BF2/2142:
http://www.schoeldgen.de/bf1942/tutorials/viewbox.jpg

Lets create a simple box :P . Prepare a folder in /objects/staticobjects/myBox and put a texture in there, preferably some wood or metal. Lets do this all in your mod.
Here i have provided a small DDS wood texture in case you don't have one handy:
http://www.schoeldgen.de/bf1942/tutorials/myBox.dds

I assume you have setup your BF2 Tools for Max according to this thread :
Bf2 Tools For 3ds Max - Setup - Official BF Editor Forums (http://bfeditor.org/forums/index.php?showtopic=9648)

Launch Max and open the Material Manager and make one material using the BF2Staticmesh2 shader by pressing the 'Standard' button and selecting the 'BF2StaticMesh2' entry from the following list. Press 'Base' in the first line of the new Material and point the Base texture slot to the above mentioned texture. Leave the Detail slot empty for now , it can later be filled at will, but you'll need a second UVMap for it. Here's a view of the Material Manager with the setup for this simple box:
http://www.schoeldgen.de/bf1942/tutorials/boxmat.jpg

Note that the scale for Max models is metric. Either use the metric setup and use 0.1 for the units or use GenericUnits, where 10 units make 1 meter ingame.

Create a box with the Max primitives and assign the material to it (leave the box selected and from within the Material manager press 'assign material to selection' ) . Convert the box to 'Editable Mesh' and give all faces the Material ID 1. Now all faces should have the texture on it.
Leave the box selected and run the 'Static/Building' wizard from the BF2 utilities.
Your box doesn't have a collisionmesh yet, we need to add it. Select the '__Anchor' object (its a dummy helper) and clone it with max' standard function, renaming the clone to 'nonvis_' .
Now clone your original box , rename it to 'col0' and parent it under the nonvis_ dummy. ( This is done with the 'select and Link' button in max, more about that in this thread :
3ds/gmax Hierarchy Collection (56k Warning) - Official BF Editor Forums (http://bfeditor.org/forums/index.php?showtopic=5013) )

Now clone the 'col0' box to a 'col1' and a 'col2' box, all are parented under the same 'nonvis_' dummy. Here's a view using the Select window of the complete hierachy:
http://www.schoeldgen.de/bf1942/tutorials/boxhier.jpg
You're now ready to export this simple model. You should export it into your mod into the same folder you created above : Enter '/staticobjects/' (without the quotes ) into the export path. A new folder 'myBox' will be created inside /objects/staticobjects and it will be called after your object. It contains a subfolder /meshes with the staticmesh file, a samples file for lightmapping with the editor and a collisionmesh.

Its now ready to be examined in the BF2 Editor. Your first task should be to map materials to it. Open the box in object editor by browsing the resource window and doubleclicking the box. Now find the 'Default' tweaker where you find an entry called 'Map Materials' . Open it and assign a wood material to your box. Save the object.
Place it on a test map , pack your mod and go ingame. There you go :D


Creating a static Part II:
In this follow-up we'll add a Detail channel to our box from Part I of this tutorial. A Detail channel has higher resolution and we can add a normal map to our object. For this purpose i've provided 2 new textures:
http://www.schoeldgen.de/bf1942/tutorials/dirty_white_c.dds which is a small whitish texture and
http://www.schoeldgen.de/bf1942/tutorials/myBox_b.dds which is the texture for the NDetail slot, our 'bump/normal' map.
The Detail channel also provides for glossiness in its alpha channel. I've updated the texture from Part I for an alpha channel and you should probably download the new texture here:
http://www.schoeldgen.de/bf1942/tutorials/myBox.dds

Download all textures and put them in the folder of our object. Optionally you could place all textures into a subfolder or a dedicated /textures folder for all your staticobjects. The exact location really doesn't matter much as long as it is within the /objects folder.

Ok, after making sure of the location of the textures lets start by loading the 'myBox' scene into Max and open the Material Manager. What we want to do now is to move our wooden texture to the detail channel and add a new color texture, the 'dirty_white_c.dds' you just downloaded. Color and Detail channel are multiplied so a white color texture will not affect the Detail texture very much but only adds a little dirt to it. You could also use the dedicated 'dirt' channel but for a simple object its really not necessary. DICE mostly used the COlor channel for basic coloring and the Detail channel for the structure. If you take a closer look at existing textures you'll often find black & white detail textures to blend into the colors imposed by the Base channel.
Press 'Base' and browse to the 'dirty_white_c.dds' texture. Note how the box in the viewport turns all white when we replace the original texture. Now press the 'Detail' button and browse to the 'myBox.dds' texture. Hmm, after assigning it nothing in the viewport has changed ? Thats because the 'BF2StaticMesh2' shader can only display one map channel at a time. To switch to anther channel you can press the little number on the right of the texture in Material Manager. Initially it is set to display channel 1 but you can press the little '2' in the Detail texture row to switch over to display the detail channel. Before closing the Material Manager lets quickly add our bump texture by pressing the 'NDetail' button and assigning 'myBox_b.dds' to this texture slot. Note the little '2' in the row - this means that the NDetail texture will also map on channel 2 so both 'detail' and 'normal-detail' will use channel 2.
If you tried to switch to channel 2 already you will have noticed that the box turns into an ugly brown or something, the wood texture seems to have gone. But don't worry thats only because our object has no uvmap on channel 2 yet. Thats what the material manager should look like after assigning all our textures:
http://www.schoeldgen.de/bf1942/tutorials/boxmatB.jpg
Close the material manager with channel 2 selected and select your box mesh if not done already. Add a new 'UVW Map' modifier, switch it to 'Box' and look for the 'Map channel' setting in its rollout. Enter a '2' into the channel and notice how the box gets its structure again.
http://www.schoeldgen.de/bf1942/tutorials/boxdetailA.jpg
Collapse the UVW Map modifier on the mesh.
Everything looks good, lets export the box once again. We don't need to change anything in the code but we can use the editor to look at our improved box. Note how some depth is added by using the detail channel with its bump map.

Things you can try:
* Change the tint of the color texture and notice how it affects the overall toning of the object.
* use other textures for the detail channel, like brickstones or a metal surface. Try to adjust your color texture so that the object looks natural.

Hope this helps some of you :grin:

McBumLuv
2009-01-17, 00:40
Thanks Rhino, I'll be following this to try and learn how to model :p

Rhino
2009-01-17, 00:48
really not a modelling tut its more of a export tut.

McBumLuv
2009-01-17, 00:59
You're right, I just realized that :roll: Oh well, back to the interwebz I search

Rhino
2009-01-20, 12:30
updated with part 2.

Klikard
2009-03-01, 19:43
Dude How Do I make It so I cant Go Trough it? Mine Dosent Have This Type of mesh Or something You can Walk Troug It How i fix that. I tryed changing in Tweak Closison Physics. it wont Make IT So i canT Go Troug it.

smee
2009-03-17, 00:56
with the static, if have followed the creating col's should it automatically create collisions. Or is there something else to change?

Have got to the stage of having the object in the map but doesn't collide. Have ticked collisions in editor?

any guess's

IronTaxi
2009-03-17, 01:09
make sure the cols are in the collision tree in max before you export and properly named..

http://www.schoeldgen.de/bf1942/tutorials/boxhier.jpg

here you can see the 3 collisions attached to the object..

if you export with that setup you should have your collisions in the editor..

smee
2009-03-17, 11:57
deleted and started again. Made sure was more closely to the naming convention and used the utillity to get the col's and works. Will have to take closer notice :)

Pte.Paynter
2009-04-19, 17:41
I cant wait to test the tut out thank you again.

Im making one now.

Cheers.

Tomato-Rifle
2009-08-05, 02:19
Hehe, got mine to work, maybe just a little on the big side

http://i271.photobucket.com/albums/jj128/Tomato310/itworks.jpg

Wilkinson
2009-08-05, 02:50
man Wish I saw this when I started. Probably woulda helped. :p

wookimonsta
2009-08-07, 13:44
once i am back in germany i will look into this. i used to do a little 3d modelling, but i just played around.

Konfusion2113
2010-03-05, 03:38
cool thanks!