Modelling for Scorched3d with Milkshape3d

Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Modelling for Scorched3d with Milkshape3d
PostPosted: Mon Nov 17, 2003 6:48 pm 
User avatar
Charred
Not Signed Up For Stats

Joined: Tue Aug 05, 2003 9:47 pm
Posts: 157
Location: 49.9N 99.9W
I've done post previously about how to do ASE file tanks for scorched see here.

But with the latest version of scorched (>=35) we've added a new model format, the milkshape3d text format. With this new format there's improved texturing and future expandability.

The first step in making a model for scorched in milkshape is to actually make the model in milkshape. A userguide to milkshape is a little beyond the scope of this article, but are available at other places online.

A note about textures at this point. Currently scorched3d only supports bitmap (.bmp) textures. These textures must also be square and have a resolution of a power of 2 (ie 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024). Textures should be kept in the same direcotry as the model (personally I like to place each milkshape model and it's associated textures in a seperate directory). Also all file names should be lowercase only, since scorched works on multiple file systems and differeing file systems are case sensitive, the general rule of thumb is to always keep filenames lowercase. Alpha textures are supported as well, but must meet the above specifications. All objects in the model must be textured, with the exception of the turretpivot and gunpivot objects (see below).

Once you've completed the model you should start naming the seperate components. All objects that name starts with "gun" are considered part of the gun (ie gunBarrel, gunSight, gunlength), and all objects that name starts with turret are considered part of the turret (ie turretCenter, turretTop, turretWing). The turret rotates around the Y axis along with the gun, to indicate rotation, and the gun rotates vertically to represent the elevation of the shot.
Image
TurretPivot
Image
Gunpivot

Unless otherwise specified the gun and the turret rotate around the center of the turret. If this isn't the desired behavior you can specify pivot points for the gun and the turret. These pivots should be called "gunpivot" and "turretpivot" repectively, these objects ARE NOT DRAWN and don't need to be textured. All objects that start with "turret" are rotated around the center of "turretpivot" object along with all objects that belong to the gun including the gunpivot. All objects that start with "gun" are rotated around the gunpivot.

Once you've completed these steps export the model (File>Export>Milkshape 3D ASCII...), then tranfer you tank model directory to the scorced3d/data/tanks directory.

Then open scorched/data/tanks.xml in a text editor (usually notepad) and place an entry like this:
Code:
   <tank>
      <name>My Model</name>
      <model type="MilkShape">mymodeldir/mymodel.txt</model>
   </tank>


All paths in the tanks.xml file are relative to scorched/data/tanks so the above code assumes that your model is called mymodel and it's in a mymodeldir directory.

If you want to make a category for your own models just place a category tag in the xml tag like this:
Code:
   <tank>
      <name>My Model</name>
      <catagory>my category</catagory>
      <model type="MilkShape">mymodeldir/mymodel.txt</model>
   </tank>


That's all there is to making a tank in Scorched3d.

Note: If your tank's turret rotates down instead of up when increasing elevation you may have created the tank backwards, if this is the case just rotate the entire model around the Y axis by 180 degrees, and re-export the file to the location specified in the tanks.xml file.

Node: Don't worry about the scale of your model, scorched automaticly scales the models to fit inside the tank's bounding area... hence all tanks are aproximately the same size.

Cam
There are only 10 types of people in this world:
Those that understand binary and those that don't


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 16, 2005 8:42 am 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked


Joined: Thu Jan 08, 2004 1:32 am
Posts: 2923
Location: Ohio, US
Just like to add a few points in that may be useful to everyone as they were to me. I learned a lot of this from Cambo BTW.

Things to remember:

1) Turret must not have shared vertices with the stationary part of the model.

2) Gun must not have shared vertices with the turret.

3) Not all parts of a certain group (turret, body, gun) have to be connected together to work.

4) Although sometimes you may encounter a model that won't require a "turret", you should include an "invisible" one inside of your model anyway, or your gun placement may not be aligned properly.

In depth help for Transparency:

(Note: You must be logged in to view the examples)

Scorched does transparency through alpha textures. An alpha texture is a greyscale texture that specifies transparency values that are applied to your normal texture. The darker the pixel (black), the more transparent it will be. The lighter the pixel (white), the less transparent it will be. Note that an alpha texture does not have to be all one shade. You can have many shades. I have constructed a (crude) example showing what I'm talking about. (Don't laugh or you'll make me cry.) In "Example 1" you can see that where we have the window frame (left) it is completely white on the alpha texture (right). That's because we don't want to see through the frame. As for the window panes themselves you can see we have a darker color for transparency. Note that it's not completely black. If it were, it would be completely transparent and we wouldn't see the original texture.

Now, after you've made your textures it's time to import them into Milkshape (assuming you have your model done). To do this, click on the Materials tab and add the normal texture (in this case, Window) as the first texture and add the alpha texture (Window Alpha) as the second texture. You can see how it's oriented in "Example 2". Keep in mind that the alpha texture must be the same size as the normal texture. Sizes and formats are specified above. Please note that I have created this short tutorial assuming that you know how to assign and coordinate textures. Exactly how to apply them and coordinate them to the model is outside the scope of this tutorial.

How to make a custom projectile:

Scorched 3D allows you to make a custom projectile that will replace (and only replace) the default baby missile model. To make a custom projectile, make a model like ususual (only place it so the front of the model is pointing upwards) and place it in the data\accessories directory (preferably in its own directory). To implement this model into Scorched 3D, search in the tanks.xml file for the tank you want to add the projectile to and add the following line to it:

Code:
   <tank>
      <name>My Model</name>
      <catagory>my category</catagory>
      <modeltype="MilkShape">mymodeldir/mymodel.txt</model>
      <projectilemodeltype="MilkShape">myprojectiledir/myprojectile.txt</projectilemodel>
   </tank>


FAQ:

Q: I get an error that says "Incorrect mesh name format..."

A: You have a space in one of your group names. You can change this in your model text file by simply removing the space in the group name.


Q: I get an error that says "Failed to find texture..."

A: Make sure you placed the texture(s) in the same directory as your model. Also, make sure the model txt file itself is listing the correct directory for your texture. To do this, open the txt file and look beneath the section that says "Materials:" and make sure the directory for your texture is listed correctly. It should say ".\texture.bmp"


Q: I added a texture but it doesn't show up on my model!

A: Make sure it is BMP file format and that it meets the dimension requirements listed in the first post


Attachments:
Example 1.jpg
Example 1.jpg [ 37.59 KiB | Viewed 2535 times ]
Example 2.jpg
Example 2.jpg [ 30.28 KiB | Viewed 2533 times ]
Image
Scorched 3D: Mountaintop Removal at its finest!
Image


Last edited by Deathstryker on Tue May 09, 2006 3:38 am, edited 7 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 16, 2005 5:57 pm 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked






Joined: Sat Jun 12, 2004 12:53 am
Posts: 2884
Location: _____________________________ Current Scorched3d Rank: 1 _____________________________ *clink*
Good stuff, Deathstryker! I'll have to add proper support for that in my Blender script. ;)

Cheers!
To be honest, I don't fully understand that page, but it sounds like it provides the answers you need. - Deathstryker

She doesn't stimulate me mentally or physically... I need at least one of those - Anonymous

Who wrote this crap? - G. Camp


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 16, 2005 9:41 pm 
User avatar
Site Admin
Not Signed Up For Stats

Joined: Mon Aug 04, 2003 4:09 pm
Posts: 4771
Location: Scotland
cbx550f wrote:
Good stuff, Deathstryker! I'll have to add proper support for that in my Blender script. ;)

Cheers!


Yeah, nice Deathstryker thanks.


Top
 Profile  
 
 Post subject: YES
PostPosted: Sun Aug 14, 2005 10:20 pm 
User avatar
Reduced to ashes

Current Scorched3D Rank: 485






Joined: Wed Aug 25, 2004 3:54 pm
Posts: 539
Location: In a van down by the river.
gcamp wrote:
True. I need to sort out the whole texture format thing.

1) I should really be trying to use compressed textures on cards that support it.
2) I should allow import of other types (like jpg)
3) The models use two many seperate textures for the same model.


all I can say to all of those is YES YES & YES FINALLY

it would greatly decrease the size of the game itself
and our mods by using .png or .tga

please god do this pleeeeeease!

and while your add it .wav a nono .. mp3 please

quote from pearl harbor:

we need to strip this fat lady & make her skinny
Image
GoPro + F18 = AWESOME Lap Around The Boat VFA-211 (CVN 65)


Top
 Profile  
 
 Post subject: Re: YES
PostPosted: Mon Aug 15, 2005 3:46 am 
User avatar
Desintigrated

Current Scorched3D Rank: Unranked



Joined: Sat Dec 18, 2004 7:20 pm
Posts: 2015
Location: USA
.-*-.ShoCkwaVe.-*-. wrote:
gcamp wrote:
True. I need to sort out the whole texture format thing.

1) I should really be trying to use compressed textures on cards that support it.
2) I should allow import of other types (like jpg)
3) The models use two many seperate textures for the same model.


all I can say to all of those is YES YES & YES FINALLY

it would greatly decrease the size of the game itself
and our mods by using .png or .tga

please god do this pleeeeeease!

and while your add it .wav a nono .. mp3 please

quote from pearl harbor:

we need to strip this fat lady & make her skinny


The only thing about using mp3s is they use much more cpu time then a wav does.
Beware the VOID

When in doubt on why your mod broke...
it's all Bobirov's fault.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 4:27 am 
User avatar
Charred

Current Scorched3D Rank: Unranked


Joined: Sat Sep 25, 2004 1:17 pm
Posts: 155
Location: under your chair
gcamp wrote:
3) The models use two many seperate textures for the same model.


that must be fixe by the guy who make the model,notice most of mine is one texture "splited in quadrants"

one thing i noticed is thatmodels cant share texturesdunno why but when i do game crash whitout warning ,that cause the same texture whit different names repeated per every model that use it,i discover this making the 3 differents koopas
i have no more ideas of what to put here :(

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 10:56 pm 

Current Scorched3D Rank: N/A

Joined: Fri Jul 29, 2005 9:14 am
Posts: 2
Location: brisbane
Knochi wrote:
before you allow down/uploading of custom models, you have to do something with the textures.. i found out they are restricted to 24bit, that makes them very big.
I don't know about the possibilities of adding support for other filetypes like .jpg or .gif.


hi how do you make modles?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 11:13 pm 
User avatar
Charred

Current Scorched3D Rank: Unranked


Joined: Sat Sep 25, 2004 1:17 pm
Posts: 155
Location: under your chair
just pile up a lot of boxes and spheres :D
i have no more ideas of what to put here :(

Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 5:27 am 
User avatar
Burned to a crisp

Current Scorched3D Rank: Unranked






Joined: Tue Aug 16, 2005 4:20 am
Posts: 287
Location: Fiddlers Green, USA
I finished my 2nd tank model with milkshape. What I thought would be simple model ended up with over 16000 triangles. How does this over triangle model matter in game play :?:

Do I try and make a model with less triangles :?:
How would I make a model already done to have less triangles? :?:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 3:10 am 
User avatar
Charred

Current Scorched3D Rank: Unranked


Joined: Sat Sep 25, 2004 1:17 pm
Posts: 155
Location: under your chair
well thats a hight quantity,search for parts that never will be see and delete them,simplify parts,for scorch3d i think whit a value of less that 3ktriangles will be fine,you have to think if all 24 players are having same model how the poly count will go sky high
i have no more ideas of what to put here :(

Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 6:35 pm 
User avatar
Charred
Not Signed Up For Stats

Joined: Sun Aug 21, 2005 9:23 pm
Posts: 106
Location: Hungary
Hi I dont know where can I ask this so I ask it here. Can we use animated models in sorched3d? Because than I made some good modell :D if scorch can handle it.
"For the Emperor!!!!"

Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 11:34 pm 
User avatar
Charred

Current Scorched3D Rank: Unranked


Joined: Sat Sep 25, 2004 1:17 pm
Posts: 155
Location: under your chair
no only animated voids for now,and scorch can handle all models,is just some of users video cards cant handle high poly models
i have no more ideas of what to put here :(

Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 12:57 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Sat Apr 24, 2004 6:52 am
Posts: 1393
Location: Florida, USA
The engine itself has support for animated models (as is evidenced by the boids), but I don't think that support for animated tanks and other objects has been implemented yet. I could be wrong though.
Undead.

Scorched 3D Documentation & Help


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 7:12 am 
User avatar
Charred
Not Signed Up For Stats

Joined: Sun Aug 21, 2005 9:23 pm
Posts: 106
Location: Hungary
Thanks than I make a simple modle, maybe it wouldnt be so simple I modelling a Warhammer 40.000 chaoswarhound titan.
Here you can see a photo from it:
http://www.forgeworld.co.uk/chaostitan.htm
:D
It's cool
"For the Emperor!!!!"

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group