Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 84 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : General Gaming Topics
Category: General Modeling
General chat about modeling and animation.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: 3DS Max XModel Conversion
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 02:02 pm
Maybe I should describe this more thoroughly and with an example:

In my 3ds model I have 5 materials (textures); the last one I've named volvo_windows and it's the alpha TGA I was talking about earlier.

In AssMan, I have 5 entries for materials and 1 entry for xmodel. The materials names match with those from Max (for example, the last one is also named volvo_windows). However, the textures names don't match; for volvo_windows the texture (color map) is raw\textures\bus_windows.tga; I'm guessing this is the bus_windows_col the converter requires.

So do the diffuse textures have to have _col at the end of the name ?
I guess so, since in the examples from the model_export folder all the textures have _col, _cos, _nrml and _spec in their names.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 03:16 pm
i don't think the converter requires these suffixes, it appears to me more like a naming convention by the developers

_col - color map (diffuse texture)
_spec - specular color map (reflection color)
_cos - cosine power map (reflection intensity)
_nrml - normal map (to generate fake depth)

but it's possible of course. so you may wanna rename the .tga textures to match the material names, and if it requires the above suffixes then change the material names in asset manager accordingly (or in 3ds max? i'm a little confused right now)
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 05:24 pm
Yay, I've managed to confuse Sevenz [jumping]

OK, I think I'm getting closer to the bottom of this.
I tried with another model, an MG42 I've made, which has only one material (texture) in Max. I've tried before to compile this model and I got this error:
Code:

************ ERROR ************
Can't find material [mg42_diffuseů_col] in directory 'D:\Steam\steamapps\common\call
of duty 4\raw/material_properties/' or 'D:\Steam\steamapps\common\call of duty 4
\raw/material_properties/'

The texture was called mg42_diffuse.tga at the time.

Now I changed the texture name to mg42.tga, re-exported to OBJ, converted with TOXEC and opened mg42.xmodel_export in WordPad and at the end I've discovered this:

Code:
NUMMATERIALS 1
MATERIAL 0 "mg42ů_col" "Lambert" "mg42.tga"
COLOR 0.000000 0.000000 0.000000 1.000000
...


It seems TOXEC is adding some characters and _col to the material name (which is the texture name without the extension).
So I've changed mg42ů_col to mg42 and now I get this:
Code:
*** 6 degenerate tris discarded ***

Surface summary:
mg42 (8140 tris, 7381 verts, 4088 unique verts)
actual mins/maxs (-309.633 -22.3158 -123.421) (-295.482 -4.4254 -63.7235)
actual size (14.151 17.8904 59.6975) radius 31.9535
rotation invariant radius 327.666

************ ERROR ************
auto-generated rotation invariant bounds far exceed physical bounds; model should be exported closer to the root bone

aborting....


This is all like a conspiracy [banghead]
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 06:00 pm
weird characters these are...

silicone_milk, the author of TOXEC, told me back a while that the tool has some memory leaks. So might be a bug. but it seemed to work after you changed the material name manually.

I haven't seen the new error before (auto-generated rotation invariant bounds far exceed physical bounds; model should be exported closer to the root bone). But it sounds like your model is simply too large or too far away from tag_origin or the 3ds max origin (0,0,0) respectively. 1 unit = 1 inch, how large is your model in 3ds max?
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 06:53 pm
attachment: image(270.7Kb)
Finally !!! Yeah, it was too far away from (0,0,0).
I just saw that MODSonline has a YouTube channel and watched a vid of "How to import a terrain model in Radiant" or something like that, and at some point the narrator made a comment about this very error.

I managed to import the bus too (see the pic in the attachment), but it only has 1 texture, the first one in the list. And I'm not sure why it's vertical.

First off, the .mtl (OBJ material library) was wrong. It had 10 entries and I only have 5 materials, so I deleted the extras. Now, the .xmodel_export has this
Code:
NUMMATERIALS 1
MATERIAL 0 "bus_windows_col" "Lambert" "bus_windows.tga"
COLOR 0.000000 0.000000 0.000000 1.000000
TRANSPARENCY 0.000000 0.000000 0.000000 1.000000
AMBIENTCOLOR 0.000000 0.000000 0.000000 1.000000
INCANDESCENCE 0.000000 0.000000 0.000000 1.000000
COEFFS 0.800000 0.000000
GLOW 0.000000 0.000000
REFRACTIVE 0 1.000000
SPECULARCOLOR 0.000000 0.000000 0.000000 1.000000
REFLECTIVECOLOR 0.000000 0.000000 0.000000 1.000000
REFLECTIVE 0 -1.000000
BLINN -1.000000 -1.000000
PHONG -1.000000

at the end and it repeats 4 more times... so there's 5 entries in total, probably one for each material. You'll notice the bus_window_col again. So I changed those 5 entries to this:

Code:
NUMMATERIALS 1
MATERIAL 0 "volvo_int" "Lambert" "bus_int_col.tga"
...

NUMMATERIALS 1
MATERIAL 0 "volvo_ext" "Lambert" "bus_ext_col.tga"
...

NUMMATERIALS 1
MATERIAL 0 "volvo_ext2" "Lambert" "bus_ext2_col.tga"
...

NUMMATERIALS 1
MATERIAL 0 "volvo_nr" "Lambert" "bus_nr1_col.tga"
...

NUMMATERIALS 1
MATERIAL 0 "volvo_windows" "Lambert" "bus_windows_col.tga"
...

I've replace the lines COLOR to PHONG with "..." to keep my post short.
And now only the first entry is valid, the others are ignored, and the bus only has that texture bus_int_col.tga (as you can see in the pic).
I've tried changing NUMMATERIALS to 5 and setting each MATERIAL with a figure from 0 to 4, but I get an error.
I can't seem to figure out how the materials are enumerated and how each vertex is assigned a texture.

I'm writing so much and so detailed because maybe my experience will help some other poor sap.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: General Modeling
Posted: Sunday, Dec. 20, 2009 07:27 pm
cskiller86 writes...
Quote:
I'm not sure why it's vertical.


that is due to a different coordinate type, Blender has a OBJ export setting to translate Blender UP to OBJ UP. But you can also fix this by turning the texture by 90° so UV coordinates will match the model again.
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: General Modeling
Posted: Monday, Dec. 21, 2009 10:57 am
I meant I'm not sure why the model is vertical in Radiant.

My MG42 did compile and it appears in Radiant, but the UV got messed up a bit.

The bus however is a puzzle. I opened another example .xmodel_export, of a character (Al Asad), which has 3 materials. This is the end of the file:
Code:
NUMMATERIALS 3
MATERIAL 0 "mtl_bodies_arab_regular" "Phong" "bodies_arab_regular_col.tga"
...
MATERIAL 1 "mtl_arab_regular_helmet_hands_sp" "Phong" "arab_regular_helmet_hands_sp_col.tga"
...
MATERIAL 2 "mtl_al_asad_head" "Lambert" "arab_regular_al_asad_sp_col_dmg.tga"

I tried doing the same with my bus (with the appropriate changes), but I still get only one texture.
Either I'm doing something wrong or TOXEC can't convert properly objects with more than 1 texture (and isn't that great at the other ones either).
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: General Modeling
Posted: Monday, Dec. 21, 2009 11:02 am
The textures are assigned to the different parts of the model before you make the xmodel_export
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: General Modeling
Posted: Monday, Dec. 21, 2009 02:00 pm
cskiller86 writes...
Quote:
I meant I'm not sure why the model is vertical in Radiant.

Sounds like 3ds max uses a different coordinate system, you gotta find out how to rotate the model in 3ds max so that it comes out with Z up in radiant.

Quote:
Either I'm doing something wrong or TOXEC can't convert properly objects with more than 1 texture (and isn't that great at the other ones either).

TOXEC isn't really finished beside the fact that it re-formats the OBJ input rather than really converting the data [rolleyes]
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : General Gaming Topics : General Modeling

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»