Results 1 to 9 of 9

Thread: Unit editing in 3DS Max

  1. #1
    Leonidas The Lion's Avatar Until we win! Or die.
    Content Emeritus

    Join Date
    Apr 2006
    Location
    UK/Der Freistaat Griechenland
    Posts
    10,406

    Icon1 Unit editing in 3DS Max

    [SIZE=3][FONT=&quot]1. What do you need to have?

    First of all: 3D Studio MAX 4.0 and later

    You can get a demo from www.discreet.com or you can buy it. Don't ask for the price...

    Next thing you need is a paint program you are familiar with (I use Corel Photo Paint, most people use Adobe Photoshop, you either need JASC Paintshop Pro or Adobe Photoshop because the dds exporter (needed for textures), available at NVidiaīs homepage is only availabe for those programs)

    Finally you need the CAS exporter script and the xpak tool. You can find them in the Downloads and updates thread.

    2. How to prepare yourself?

    Start by extracting the packs in the data/packs folder by using xpak. The models are already unpacked, the textures are not. Put the import / export script into the /scripts folder of 3DSMax. Set up the dds-plug-in as described on NVidias page. Now you are ready to go.

    3. After the startup of Max

    On your empty workspace click on file -> import -> filetype ..... boing, fooled you. It isnīt as easy as that.
    On the right side of your workspace there are some register cards. On of them has the symbol of a hammer. Choose it. One of the buttons reads "MAXScript" (if not, add the button by clicking on "More..." and choosing it) . Select it. Click on "Run Script" and choose the import/export script where you installed it to. If you open the drop down there should be a new entry "R:TW Import/Export". Select it.
    Click "Set textures path" and choose the"/models_unit/textures/" path where you extracted the packs to. Click "Import CAS..." and choose a basic model.


    HINT: Choose a model which resembles roughly the unit you want to create. This will prevent you from having to endure heavy scripting duty to make your unit behave the way it should. Good basics are:

    unit_east_cataphract_400.cas for cavalry
    unit_barb_peasant_high.cas for infantry



    Voilá, it should have worked. Sometimes the script gives the warning you have imported an older file format, but in most cases you can ignore that.

    If your unit has no texture, check the following:

    Open up the Material editor (four colored balls on top of the screen). Activate the checkered box (display texture in viewport). If your texture still does not show up, click on "Maps", choose "diffuse color" and check whether the path is correct.

    If you see a wireframe only, righclick on the viewport name an choose "smooth + highlights".

    4. Basic editing

    Now you can click the model, choose "Editable Mesh" and start moving around the vertices, edges or faces. Try to get familiar with the possibilities of MAX, read some tutorials on that (e.g. on www.3dcafe.com) to learn how to create geometry. Just a few hints:

    HINT:
    1. You can make extra objects (additionally to the body mesh, the weapon and so on...) but you have to link them to the bone they should belong to. This can help prevent extra work, since these objects do not have to be weighted (see below)

    2. Names do not matter, but: weapons have to be name "Primary Weapon" or "Secondary Weapon"

    3. Every object has to have one and the same material applied. Otherwise R:TW will return an error while loading a battle.

    4. Every object has to have at least an UVW Map modifier to export (see below)

    5. Keep your model symetrical. This will help you skinning it, since you only have to do the half skin which is mirrored afterwards, enabling you to give it greater detail. (see below)

    6. Detach (button in the edit geometry submenu) the geometry which is to be mapped seperately. For example if the head and neck appear on the upper left corner of your texture but the body on the lower right they have to be seperated from each other, otherwise the texture will look messed up in R:TW (although it will look fine in MAX)

    7. Donīt make it to detailed. Remember your model will mostly be seen from greater distances and in huge numbers, so try to judge whether some detail can be achieved by the texture and has not to be geometrically visible.


    5. Skinning

    Skinning is the process of giving the surface a texture. Basicly MAX projects the geometry on a surface which is then wrapped around the model. Sounds difficult, is rather easy. Since a am sure you thoroughly read the tutorial up to now [IMG]file:///K:/DOCUME%7E1/DIMITR%7E1.MIC/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif[/IMG], you should now select the the faces of the parts your model consists of in the "Edit geometry" menu. The selected faces appear red. Now you apply a "UVW Map" modifier by selecting it in the "Modifier List" drop down. Be careful not to close the "Edit geometry" modifier (a box or triangle should always be visible next to it) otherwise the "UVW Map" modifier will be applied to the whole geometry (what is seldomly what you want). Now fit the the "Gizmo" as the Mapping object is called to the faces you selected. Remember: the gizmo resembles the surfaces your object is projected on. Next choose "Unwrap UVW" in the Modifier List. Press the "edit UVW" button. The window which opens shows the projection of your geometry and the texture. You can now move the vertices to fit your texture. You can instantly see any changes in the viewport, which makes adjustments easier. If you are satisfied, rightclick on the "UVW Map" modifier in the stack view and choose "collapse to" if you are editing the body mesh or "collapse all" if your edit some extra object. Repeat all these steps until you have completely skinned your model.

    Hints:

    1. Get familiar with the Cylindrical UVW Map. If used properly it will prevent your model from having areas where the texture appears to be overstretched.

    2. If making a texture from scratch, start making it in 1024x1024 or 512x512 (or any other factor of 256) and rescale it before saving. This will make your skin look much more detailed.

    3. Leave some border from your UVWs to the texture background. Keeps your model from having weird outlines.

    4. The following procedure helped me fitting the geometry to the texture:

    A) Unwrap UVW
    [IMG]file:///K:/DOCUME%7E1/DIMITR%7E1.MIC/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image002.gif[/IMG]Move the Vertices to a place where you want them to be on the Map and get them into the position you think is best
    C) make a screenshot ("Print Screen")
    D) Paste the screenshot into your graphics program
    E) Cut the Object in the UVW Map window using the lasso function.
    F) Import it into the texture as a new object (Layer, whatsover it is called...) and move it roughly to the position it appears in MAX. Only use the "Scale" feature to modify it
    G) Export the texture, reload it in MAX. You should now see it in the "Edit UVW" window. Move the vertices to fit their exported counterparts on the texture. Your model should now look somehow "wireframed"

    Now you can be sure the texture will appear on the right place.



    6. Weighting

    Some basics on the skeleton concept:

    Introduced with Character studio, 3D Studio got the ability to deform a geometry as if it was just a skin covering a skeleton. Your draw a skeleton consistiong of bones and joints and then link the vertices to the bones the shall belong to. The advantage is, that an animation has only to be applied to the skeleton. If an equal model (e.g. another body style) is linked to the skeleton, it automatically inherits the animations.

    Concerning R:TW this means you can use the animations already made (if anyone can remember Quake and its MDL files, there you had to animate everything by yourself which was a pain in the ass...)

    Click on the "Skin" modifier. Press "Edit envelopes". Unselect everything except "Vertices".
    Choose the bone you want to start with (Iīd suggest starting with the Bone_Pelvis). Select the vertices you want to be moved by the bone. Enter "1.0" in the "Abs. Effect" field followed by pressing enter. Unselect the vertices (IMPORTANT!). Choose the next bone. Repeat the steps until you have weighted every vertex.
    To check if everything works as you want, you can rotate the bones an watch the effect on the geometry.

    [B]Hint: I found it helpful if you assign every vertices to the LFoot Bone at first. Since it is the last bone you will weight if you stick to the tables order you can then easily identify any vertex which hasnīt been weighted yet.

    7. Exporting

    Now you are ready to export. Choose the Script. Open the "Export" Menu. Click "Export CAS..." and choose the /data/models_unit folder of your R:TW installation.

    Do not overwrite existing models unless you backed the whol directory up. (overwriting is unnessecary since I will explain how to use custom names)

    If everything has gone right, you have the model exported by now.

    possible problems:

    Vertex XYZ is assingned to multiple bones, make sure each vertex blablabla....

    You havenīt weighted every vertex. Open the skin modifier. Click on weight table. Scroll until you have found the vertex which isnīt "1.000". Change that.

    Object XYZ has no mapping coordinates, make sure each object has a skin modifier on top of its stack blablabla...

    One of your objects isnīt linked to the skeleton. Select the Scene root object ( Close to the pelvis bone) and move it. Everything unliked will stick to its place. Change that.

    8. Re-Import

    May sound strange but is useful. Instantly import your model again and take a close look at it. If anything wasnīt textured the way R:TW wants it, you can see it by now. Furthermore, if you mirrored geometry in the design process, the "normals" (which tell the computer from which side a face can be seen) may be flipped. Select the according faces in the "Edit geometry" dropdown and press the "Flip normals" button.

    9. The texture.....

    Now you can export the texture. Using Adobe Photoshop you should first of all flatten the image (merge any layers to the background) next you open the save as dialogue and choose .dds as format. If you used alpha maps for transparency make sure you select a *.dds type which supports alpha channel. Save the texture in the data/models_unit/textures/ folder of your R:TW installation. Make sure the file extension reads Filename.tga.dds otherwise R:TW will not recognize it.

    10. Your model in R:TW

    Open up the descr_model_battle.txt file in the data folder. Find the string describing the model you used as base. It should read something like

    model_flexi data/models_unit/unit_warband_peltast_gaul_high.cas, 8

    Substitute the CAS by the model you created, so if your model is called "warrior.cas" the file should read

    model_flexi data/models_unit/warrior.cas, 8

    Select the texture of the nation you want your model to be used by. For example

    texture gauls, data/models_unit/textures/unit_barb_warband_peltast_gaul.tga

    If your model shall substitute a peltast in the gaulish army. Change it the way it fits your textures name

    texture gauls, data/models_unit/textures/my_texture.tga

    (not *.tga.dds !!)

    Save the file, start R:TW, Custom battle, choose the nation and select the unit type you substituted (a peltast will still be named peltast, but use your model. names an descriptions are stored in another file)

    Have fun.

    You may have to zoom close in to see your model depending on your graphic settings since the model you created will only be used as highest detail model.


    All credit for this tutorial goes to Lasse Reinboeng
    Last edited by Leonidas The Lion; March 30, 2007 at 03:20 PM.
    Quote Originally Posted by Jom View Post
    When using the stick and carrot approach, remember that what you have to do is shove the carrot up their arse and then beat them with the stick.
    Check out my YouTube Channel here
    Under The Patronage Of jimkatalanos
    Patron Of
    Murfios,
    Bolkonsky and DekuTrash


  2. #2

    Default Re: Unit editing in 3DS Max

    Does the following mean anything to you:

    "Lasse Reinboeng" ???




    How can you be so selfish? Copy another persons tutorial, and still to claim it being your own? You have even left his jokes in there!

    Here's the original tutorial, made by Lasse Reinboeng at SCC.

    Do NOT give this person rep, he doesn't deserve it.
    Last edited by Arakorn; March 30, 2007 at 07:38 AM.

  3. #3
    Halie Satanus's Avatar Emperor of ice cream
    Join Date
    Nov 2005
    Location
    London
    Posts
    19,574
    Blog Entries
    1

    Default Re: Unit editing in 3DS Max

    After looking into this it is quite clear that the above tutorial was created by Lasse Reinboeng and posted at the SCC.

    I won't make you remove the tutorial, but i do insist that you give full accreditation to the creator and never try to pass another persons work as your own again.

    I thought it looked familiar.

  4. #4
    Leonidas The Lion's Avatar Until we win! Or die.
    Content Emeritus

    Join Date
    Apr 2006
    Location
    UK/Der Freistaat Griechenland
    Posts
    10,406

    Default Re: Unit editing in 3DS Max

    First of all I would like to apologize to TWC and to Lasse Reinboeng.
    This tutorial was e-mailed to me from a friend when i had asked him to on help about 3DS Max. I had no idea it was Lasse Reinboeng's tutorial.
    "I thought my friend has written it"
    Again I apologize for this misunderstanding.
    Quote Originally Posted by Jom View Post
    When using the stick and carrot approach, remember that what you have to do is shove the carrot up their arse and then beat them with the stick.
    Check out my YouTube Channel here
    Under The Patronage Of jimkatalanos
    Patron Of
    Murfios,
    Bolkonsky and DekuTrash


  5. #5

    Default Re: Unit editing in 3DS Max

    So, are you going to edit it?

  6. #6
    Leonidas The Lion's Avatar Until we win! Or die.
    Content Emeritus

    Join Date
    Apr 2006
    Location
    UK/Der Freistaat Griechenland
    Posts
    10,406

    Default Re: Unit editing in 3DS Max

    Quote Originally Posted by Arakorn-eir View Post
    So, are you going to edit it?
    I will edit it now.
    I will give credit where credit is due.
    Again I apologize for this misunderstanding
    Quote Originally Posted by Jom View Post
    When using the stick and carrot approach, remember that what you have to do is shove the carrot up their arse and then beat them with the stick.
    Check out my YouTube Channel here
    Under The Patronage Of jimkatalanos
    Patron Of
    Murfios,
    Bolkonsky and DekuTrash


  7. #7

    Default Re: Unit editing in 3DS Max

    how can you remove something.. like the pilas on the back of a shield of legionary??

  8. #8

    Default Re: Unit editing in 3DS Max

    you remove them in 3dsmax but you'll never see them.

    Basically, the model has the pila stuck on the shield... forever. by removing them so you can see your legionnaires charge without the pila means you won't ever see the pila.

  9. #9

    Default Re: Unit editing in 3DS Max

    I'm trying to add a unit from a different mod into my RTW 1.3. Everything seems to work fine except the unit's weapon (sword) is invisible. It's actually rather funny to see them kill the enemy with air

    I was told that it is a .CAS problem, however if the same unit is set as an officer, everything works fine...including the weapon being present.

    Any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •