3DS Max 8

Forum Archive - from http://theuniversal.net
Locked
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

3DS Max 8

Post by Quarkite »

I'm having no problems creating, exporting or converting my models to the .atm format but the texture coordinates seem to be getting confused in the conversion tool. I'm sure it must be something I'm doing but...

...Is anyone sucessfully able to save compound textures using 3DS Max 8 that render properly in the conversion tool?
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

for most models i've made / seen, the texture has to be flipped vertically for it to appear right on the model.
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

You can't use compound textures I'm afraid. Single texmaps only. Mit is working on multi-texture support but it'll be a while yet. For now, you just need to export your model as a single mesh with a single set of UVWs. I find .x works best (.3ds sometimes does need the coords flipping as zar said).
f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

It appears that 3DS Max 8 munges the UV Coordinates when exporting a 3DS file from the original .max model...

The way I've been able to solve this problem is to first export a .obj model from 3DS Max and import that model into UVMapper Pro then create a new map.

After creating the new map, I tile by group with "Gaps in Texture Map" and "Rescale each Section" selected then save the updated model (with the new coordinates).

I also save the Texture Map Template (This has to be flipped vertically). Then I edit the texture map to include the actual texture images I need.

I then import the new version of the .obj file back into 3DS Max and save it as .3DS file for import into the conversion tool then save it to .atm format; At this point, the .atm file and the modified texture bitmap are ready for use...

Don't know if this will help anyone else but it works very well for me. I'm happy with the results and have started generating a set of completely new models to use.

:wink:
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Sounds good. Bit of a complex workaround, but whatever works, works. It still might be easier exporting to .x though :)

Any clues as to the sort of stuff you're building? Screenies?

Lemme know if you need any help using the converter (though the manual's reasonably up to date, and it's all fairly straightforward really).
f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

I agree, exporting to .x format would be nice but the DirectX API doesn't have a plugin to support 3DS Max 8 yet. I thought about coding one using the old Max support files but haven't taken the time to write one yet.

I'll set something up so you can get a look at some of the new models soon. I'll make a post to let you know what I come up with.

:)
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Have you tried Panda?

http://www.andytather.co.uk/Panda/direc ... loads.aspx

Free, and sort of stable and useful and other good things. I've been using it for years. Was a bit borked for a while for Max 6+ but looks like he's got something working now for Max 8...

f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

Thanks for the link, I'll check that out right now...

Here's a snapshot of a new building I worked on a bit this morning. It's design is as a Radar Factory but it's kinda abstract, so it could be used for other things too.

Image
User avatar
DeVice
Staff
Staff
Posts: 215
Joined: Fri Oct 10, 2003 9:12 pm
Location: I wish i knew...
Contact:

Post by DeVice »

Oh, nice bongo tree 8)
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

I'll get a page setup and provide a link to additional images soon but here's a screenie of another quickie model of a new oil/fuel tank...

Image
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

I tried the Pandasoft .x exporter and everything seems to work fine until I load the .x file in the Model Converter; I don't get any graphical representation of the model.

At first, I wasn't too sure the exporter was working correctly and just blew it off but I tried the sample models that Pandasoft has and they don't show either. I checked the .x files I exported and the samples from Pandasoft in Microsoft's DirectX Mesh Viewer and they all show up just fine.

Here's a sample .x file of a sphere...

simple sphere model

...Can anyone help me understand what I'm doing wrong?
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Hrrrm. Sounds like something that has happened to me, on and off. I can see that .x file just fine.

If you load an .x, save it as .atm, then open the .atm, is it ok?

1 - make sure you're using the latest converter. Latest is http://islanddownloads.com/ModelConverter17.zip

2- check the scaling: mit changed the import scaling a while ago (I made him change it back in v1.7) because sometimes the model's so huge you just can't pan the cam back far enough to see it :) Scale the .x file down to 1ft or something - any better?

3 - I still get this weird issue with all my .x files where I have to run them thru deep exploration before they become usable in the converter. I thought that was just me, though... anyway, it also might be worth trying to convert from x to something and see if that helps.

Hopefully using the latest MC will fix it, though.

f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

I was using version 1.6, so I downloaded and installed version 1.7 from the link you provided and when I fire it up, I get an error:

**** Texture load error ****
Data/Textures/Font/arialbold000.bmp
File does not exist or is corrupted

Note:
This fle does not exist...
---------------------------------------------------------------------------------------------------------

If I ignore the error, the converter loads but when I load the sample .x file, it still doesn't show up and if I try to save it as a .atm file, I get a fatal memory exception:

The instruction at "0x00446bb1" referenced memory at "0xc4050597". The memory could not be "read".

Note:
I dropped back to version 1.6 and get the same memory exception when trying to save a .atm from the .x file in the link I provided above.
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Great. Well, ignore the font error. It's just mit doing something daft, and it works fine anyway.

Looks like you've got some sort of weirdass .x file error going on - much like the one I have, which I can only solve by running them thru Deep Exploration (basically I convert x to x and it's fine)

No idea what to suggest other than doing the same, or just going back to 3ds or something. I guess it's some kinda problem with the Panda exporter. Praps u could write a better one and we'd all be happy :)

f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

Thinking along the same lines, (that this is a problem with the exporter), I tried opening the sample in Microsoft's DirectX Mesh Viewer and saving a new .x file but when I tried opening Microsoft's .x file in the Conversion tool the problem is still there.

At this point, I'm going to try saving a .x from the conversion tool and compare the results with .x files exported from other sources (from the same model). Now this has my curiosity more than anything else. Since the .x file format is pretty well documented, I should be able to get a pretty good idea what the problem is and possibly a way to resolve it.

I'll let you know what I come up with...
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

i've had that same problem with a few .x models as well fooli.

think it has something to do with how the file is made, like how you can have 25 different .avi files that are encoded differently and needing 25 different codecs. there was a file convertor i tried once long ago that exported an older .x format that wasen't usable in the convertor.
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

Additional templates are saved (and apparantly required) by the conversion tool...

I hand edited a file that didn't work (the sample file) and added the following template declarations (in Red):

template ColorRGBA {
<35ff44e0-6c7c-11cf-8f52-0040333594a3>
FLOAT red;
FLOAT green;
FLOAT blue;
FLOAT alpha;
}

template IndexedColor {
<1630b820-7842-11cf-8f52-0040333594a3>
DWORD index;
ColorRGBA indexColor;
}

template MeshVertexColors {
<1630b821-7842-11cf-8f52-0040333594a3>
DWORD nVertexColors;
array IndexedColor vertexColors[nVertexColors];
}


template ColorRGB {
<d3e16e81-7835-11cf-8f52-0040333594a3>
FLOAT red;
FLOAT green;
FLOAT blue;
}

I also added a template body for MeshVertexColors {} that has a generic array the same size as the nVertices array for Mesh {} in the format:

MeshVertexColors {
701;
0;1.000000;1.000000;1.000000;1.000000;;,
1;1.000000;1.000000;1.000000;1.000000;;,
2;1.000000;1.000000;1.000000;1.000000;;,
.
.
.
698;1.000000;1.000000;1.000000;1.000000;;,
699;1.000000;1.000000;1.000000;1.000000;;,
700;1.000000;1.000000;1.000000;1.000000;;,
}


With these hacks in place, the conversion tool can load the file correctly.


----------------------------------------------------------------------
One template declaration that is missing from the Conversion Tool (that would be very helpful) is...

template TextureFilename {
<a42790e1-7810-11cf-8f52-0040333594a3>
STRING filename;
}

If the Material section includes this, you can, identify the texture file and implement code to have the conversion tool load it automatically (Pandasoft exports the textures to a .bmp and places the name in the .x like this...)

Example:
Material {
1.000000;1.000000;1.000000;0.900000;;
3.200000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"CHROMIC.bmp";
}
}
----------------------------------------------------------------------

I'll put together a utility I can use to bridge the incompatibility for now but maybe a longer term solution would be to add code to allow the conversion tool to work with default values in the absence of these templates... (just a thought)

8)
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Woah. Proper cody file formatty things. With luck mit'll have the faintest idea wot you're going on about, and add things to the MC. Cos I don't, but it all looks good to me :)
f
Quarkite
Posts: 14
Joined: Wed Dec 21, 2005 1:17 am
Location: California

Post by Quarkite »

I didn't mean for my last post to be so cryptic and confusing to look at...

Please don't feel intimidated by the changes I made to the structure of the .x file to make it work, I just identified the differences in two files (one that worked and one that didn't) and made changes to reconcile those differences enough to ultimately resolve the specific problem I was having, nothing more.

Keep in mind that my solution regarding this one file is not sufficient to fix all .x files exported via Pandasoft (or other programs). This was a fairly simple model, so identifying the problem it had was pretty straight forward but a more complex model would require a more robust solution.

Perhaps if I get ambitious (and knee deep into the mechanics of the DirectX API), I can create a soution using the API functions rather than hand editing a .x file and hacking together a patch that addresses just a single model.

I just had to work through the problem I was having -- I guess curiosity just got the best of me on this one.

I have to say, I was releaved to hear that others have experienced similar problems because it showed me a way I might be able to help. If my curiosity ultimately leads to a tangible solution I can reliably use, I'll certainly be willing to share it with others.
Locked