Game Development Community

Milkshape export/import trouble

by Jason Sherman · in General Discussion · 06/13/2005 (7:13 pm) · 11 replies

Hello everyone, I'm having trouble trying to "properly" export objects from Milkshape into Torque. When I import the DTS object into Torque the object will either look like a grey box or it will be the actual object without a texture (ALT+L doesnt help). I'm currently using Milkshape ver. 1.7.4 and I have read this tutorial: www.garagegames.com/docs/tge/general/ch09.php but I'm not sure I understand the part about the "special materials" section (if thats what I need to do to get my textures to show up in game). Alot of us use Milkshape so I'm sure someone can help me out with what appears to be a simple configuration option. I mainly need a simple explanation on how to get my Milkshape objects to show up properly, with textures in Torque.

Thanks,

-Redbeard-

#1
06/13/2005 (7:38 pm)
Make sure you are placing your textures in the file where you placed you dts file, Also make sure there the right formate, Either jpg ,png are what i use i know theres others compatible as well tga are not. If you do not have your textures in the game folder then your item will show up as you mentioned above.

I know a guy that goes by the name your using REDBEARD , any chance you play df2 and on the team called TAG
#2
06/14/2005 (4:31 am)
Ok, I've placed the texture file (png) in the folder with the dts file, but I still see no textures after I restrart the mission. Does the size of the texture make a difference? currently its 96x96 (a power of 2). I've done exactly how you suggested but have the same problem when I configure the Milkshape exporter and create a collision mesh, thats when I see a grey box around my object. When I choose "none" however, I see the actual object with no texture. I am just trying to make a simple rock with a rock texture and collision. What am I doing wrong?

Thanks,

-Redbeard-
#3
06/14/2005 (5:22 am)
Try resizing the textures to 128 x 128.

Not all powers of 2 seem to work well.
#4
06/14/2005 (1:37 pm)
Ok, I tried using a texture size of 128X128...no success there. I think it has to do with a configuration option inside of Milkshape. Maybe someone has a link they can post (other than the tutorial link in my original post) that would offer some more insight.

-Redbeard-
#5
06/14/2005 (1:50 pm)
96 isn't a power of 2.
#6
06/14/2005 (2:15 pm)
In milkshape when you make a collsion box be sure to call is collision or simualr like collision01 and so on, Then once there made select HIDE and leave them hidden even when exporting, As for the texture is it showing in milkshape ? Are you applying it in milkshape? PNG file your using what program to make it and export as some will vary and give difficulties sometime.
#7
06/14/2005 (2:19 pm)
Quote:96 isn't a power of 2.

As I write this I'm still trying to decide if I should flame you or...just flame you. I am saddened by the way brilliant minds add their 2 cents only to point out other peoples mistakes. Whats worse is...you probably already have the answer I'm looking for but for some reason all you could add to this discussion was a contradiction. I have a genuine problem that I'm trying to solve and you are just wasting my time making me click on my post again to see if someone posted a "real" solution.
#8
06/14/2005 (2:50 pm)
Hi Allan,

yes I am applying the texture to the object (a rock) in Milkshape. It is a rock texture that I edited using PSP to change the size to 128x128 and save it as a PNG file. I can see the texture fine on my object in Milkshape (version 1.7.4). I shouldnt have to make a collision box because the exporter has an option to automatically create one (box or cylinder). When you say select "hide" Im assuming youre talking about the hide option in Milkshape. Again, I shouldnt have to manually create a collision box because the exporter option does this for me. I doubt my texture is the problem and I have tested every option in the Milkshape exporter thats used for Torque. One thing I havent tried is to save the DTS file into a different folder. Right now, I save the DTS file into the starter.fps\data\shapes\Rocks folder. I'm not sure if it makes a difference where I save my DTS file as long as the file path is right when naming the path in the mission editor. As of right now, I have few options left I could do that would make a difference.

-Redbeard-
#9
06/14/2005 (3:11 pm)
Torque requires that the textures used on models be power of two sized. This is a fundamental, very important, and often misunderstood tenant of making models for Torque so I thought it was important to point out that you appeared to be misunderstanding what exactly a "power of two" is. I fully expected you to either realize what a power of two is or go and research it or just ask if you still didn't understand. Instead I got flamed for not sitting down and writing out a long winded explanation (which I have written out hundreds of times in past...just search if you don't believe me).

Now, I am having to waste my time answering a silly "attack" in addition to setting you on the right path.

96 is divisible by 2 but it isn't a power of 2. Powers of two are the numbers you get when you raised two by the pwoer of another number. For example 2 raised to the power of 2 is 4 (2^2 = 4). 2 raised to 3 is 8. 2 raised to 4 is 16 (2 * 2 * 2 * 2).

The powers of two that you are going to be most concerned about are 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096. Generally, you aren't going to want the textures for a realtime model to exceed 512x512 or 1024x1024 for performance reasons. The texture size does not have to be square however. 32x512 and 256x16 are both perfectly valid sizes.

As far as the issues with your model: I recommend that you take a look at the example Milkshape files that come with the SDK (like starter.fps\data\shapes\lanterns\latern.ms3d) for a very solid demonstration of how you should be setting up your shape. I would also *highly* recommend that you take a look at the example shapes and the very detailed documentation that comes with the Updated milkshape exporter.
#10
06/14/2005 (5:50 pm)
Hey Matthew thanks for clarifying your previous 6 word post...LOL.

Ok I finally got it to work now. For some reason the texture I was using didnt show up but a darker texture did. Maybe an LOD value needed to be changed for my original texture to make it either visible or not blend in with the primer grey color. Thanks everyone for helping me solve my problem. Thanks Matthew for the detailed info; The updated exporter helped me understand what values I needed to change.

-Redbeard-
#11
06/28/2005 (1:33 am)
Redbeard, make sure you dont have export visible copy of collision mesh checked. Also, make sure your textures are assigned properly and in the right size and format. Remember that with almost every engine the textures must be multiples of 64x64. Usually 256x256 is the lowest you can go, and 1024x1024 is considered high res and I think that's the highest Torque can go.