Game Development Community

Model created in Milkshape causes fatal error in Torque

by Norm35 · in Torque Game Engine · 03/01/2005 (3:29 pm) · 6 replies

I applied texture and animated a lion model in Milkshape with no serious problems. I then exported the model as a dts file using the Torque supplied exporter.

When I added the dts file to my Torque application (with appropriate changes to the code), it did not appear on the screen but the Console Log file indicated that an object was created for the lion.

The log also indicated that it could not find the texture file for the lion so I copied the texture file from the Milkshape models directory to the Torque folder that contained the the lion dts file.

Now, when I run the Torque application, I get a fatal error message,

"GBitmap::GBitmap: in order to extrude miplevels, bitmap w/h must be POW2"

Disabling the texture file eleiminates the fatal error and the application runs OK but again does not display the lion.

This is the third model I have created for this Torque application with Milkshape and the first I have had trouble with.

I also tried to view the model with the Torque ShowTool Pro viewer. It caused a fatal error here also.

I repeat, this model works OK with Milkshape as an MS3d file. The problem is with the DTS version. I tried twice to create the DTS file; got no error messages either time.

I have also reported this problem to the Milkshape people.

Let me know if you want any specific questions answered.

#1
03/01/2005 (3:53 pm)
Quote:"GBitmap::GBitmap: in order to extrude miplevels, bitmap w/h must be POW2"
Tetures must be a power of 2! 64,128,256,512,1024

character models generally use 512x512
#2
03/01/2005 (5:52 pm)
FBIS

Thanks!

Converting to 512X512 took care of the JPEG problem.

Now all I have to do is figure out what is wrong with the DTS.
#3
03/02/2005 (7:25 am)
I got some responses from the Milkshape forum and am posting my response to them here for information purposes:

I successfully changed the texture dimensions to 512X512. This eliminated the fatal error.

However, it did not solve the dts problem. I have rescaled the image several times in the hope that this would correct that problem. Frankly, at this point I don't know what size the image is nor how to determine this.

It still will not display in the Torque ShowTool Pro viewer so that is no help in determining how big the image appears to be.

How do I determine how big the image is (or appears to be to the application displaying it)?

The end effect of the problem is that instead of a lion, Torque displays a ragged plume sticking out of the ground and moving along the path it is supposed to. I thought it might be scaled wrong (much too large) and so went back to Milkshape and scaled it down. This changed its shape some, making it look more like a huge triangle.

Unfortunately, the DTS file is not in a readable form so I can't tell what is wrong with it. It must be bad since I can't display the image with the Torque
ShowTool Pro viewer either. I don't know where to start in addressing this.

Sobek, I don't think I understand your response. Would you elaborate a bit?
#4
03/02/2005 (10:34 am)
Here's a bit more information relevant to the thread.

I loaded the lion model into Milkshape and without rescaling I welded the vertices together and immediately exported it as a DTS model.

I then loaded into the Torque game.

The scene appeared and so long as I did not change anything remained.

However, as soon as I began turning the player, I received an error:

"Fatal (c:\torque\sdk\engine\core\bitRender.cc @65
BitRender::render: V2 out of range"

How do I interprete this?
#5
03/03/2005 (3:45 pm)
Well, I have gotten the lion to appear in the scene.

It is still quite oversize but follows the the path ok.

The "plume" referred to previously was actually a long appendage emanating from the lion's head.

I have experimented with removing triangles from the model's head and can reach a point where the appendage disappears.
However by the time I reach this point, there is very visible hole in the lion's head. No specific triangles seem to be causing the problem but when I remover enough triangles, the problem goes away.

This raises the question of whether Torque or Milkshape or the DTS exporter has a limit on the number of triangles the model or a group whithin the model can have.

This lion model has 18,529 vertices and 32,529 triangles.

Am I exceeding some limit?
#6
03/04/2005 (1:03 pm)
I have confirmed that I am not exceeding the Milkshape limit for triangles.

That narrows things down to either the DTS exporter or the Torque SDK.

My bald headed lion asked me to straighten this out before he catches a cold.

How about some ideas for dealing with this problem.