Creating Your First Static In 3DsMax / Gmax

Information and tutorials related to modding BF2.
Post Reply
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Creating Your First Static In 3DsMax / Gmax

Post by Rhino »

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
'mschoeldgen[Xww2 wrote:']
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:
Image

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

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:
Image

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 )

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:
Image
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
'Part 2' wrote: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:
Image
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.
Image
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:
Last edited by Rhino on 2009-01-20 13:30, edited 1 time in total.
Image
McBumLuv
Posts: 3563
Joined: 2008-08-31 02:48

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by McBumLuv »

Thanks Rhino, I'll be following this to try and learn how to model :p
Image

Image

Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Rhino »

really not a modelling tut its more of a export tut.
Image
McBumLuv
Posts: 3563
Joined: 2008-08-31 02:48

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by McBumLuv »

You're right, I just realized that :roll: Oh well, back to the interwebz I search
Image

Image

Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Rhino »

updated with part 2.
Image
Klikard
Posts: 13
Joined: 2009-02-08 20:28

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Klikard »

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
Posts: 516
Joined: 2007-11-15 10:43

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by smee »

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
3 x 22" samsung 226bw. Matrox triplehead Quad Pro Q6600 "LGA775 Kentsfield" 2.40GHz (1066FSB) OC 3.2 , 8gb's of 1066mhz ram. 9800GTX OCX. 520mb. 3 x 320gbs samsungs. raid 0

Image
IronTaxi
Retired PR Developer
Posts: 4925
Joined: 2006-05-31 12:56

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by IronTaxi »

make sure the cols are in the collision tree in max before you export and properly named..

Image

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
Posts: 516
Joined: 2007-11-15 10:43

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by smee »

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 :)
3 x 22" samsung 226bw. Matrox triplehead Quad Pro Q6600 "LGA775 Kentsfield" 2.40GHz (1066FSB) OC 3.2 , 8gb's of 1066mhz ram. 9800GTX OCX. 520mb. 3 x 320gbs samsungs. raid 0

Image
Pte.Paynter
Posts: 150
Joined: 2009-03-03 23:25

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Pte.Paynter »

I cant wait to test the tut out thank you again.

Im making one now.

Cheers.
Image

Insurgent Strike Modification Developer

http://www.ismod.co.uk
Tomato-Rifle
Posts: 2091
Joined: 2007-12-31 22:24

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Tomato-Rifle »

Hehe, got mine to work, maybe just a little on the big side

Image
Image
Wilkinson
Posts: 1916
Joined: 2008-08-18 21:55

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by Wilkinson »

man Wish I saw this when I started. Probably woulda helped. :p
Image
Image
wookimonsta
Posts: 681
Joined: 2008-08-31 13:16

Re: [Tutorial] Creating Your First Static In 3DsMax / Gmax

Post by wookimonsta »

once i am back in germany i will look into this. i used to do a little 3d modelling, but i just played around.
Last edited by wookimonsta on 2009-08-07 13:53, edited 1 time in total.
Post Reply

Return to “Modding Tutorials”