Trying to get the hang of loading exported ASE models from blender.
I've modeled a simple light switch, assigned a basic material, and uv unwrapped it. I created a raw tga file and just painted random colors in the uv view. I then used the ASE exporter found at
http://code.google.com/p/ase-export-vmc/ . I'm using blender 2.63 on linux. No errors or warnings on the export.
My layout looks like:
Code:
~/.doom3/base
|-- maps
| `-- guidoor.map
|-- materials
| `-- mine.mtr
|-- models
| `-- light_switch.ase
`-- textures
|-- light_switch.tga
|-- light_switch_local.tga
`-- light_switch_s.tga
I've replaced the *BITMAP line in light_switch.ase with:
Code:
*BITMAP "\\base\textures\light_switch.tga"
My MTR file:
Code:
textures/light_switch {
qer_editorimage textures/light_switch.tga
bumpmap textures/light_switch_local.tga
diffusemap textures/light_switch.tga
specularmap textures/light_switch_s.tga
}
The normal map is just a 128x128 TGA set to 128, 128, 255.
The specular is just a 128x128 TGA set to 0, 0, 0.
The model loads fine in darkradiant (1.7.2 x64). When I compile the map I get no errors and it says:
loaded collision model models/light_switch.ase
But, I don't see the model when the map loads.
I think material files have to be mtr, not mtl.
simulation wrote:
I think material files have to be mtr, not mtl.
Correct. That was a typo. The file is actually mine.mtr on the drive. I've edited my original post. Thanks!
Any other suggestions? I got this far by reading iddevnet and kat's tutorials. One thing I did not do is create smooth groups for the model. Is that required?
BloodRayne wrote:
*BITMAP "//base/textures/light_switch.tga"
should be backspaces instead of forwards.
eg: \\base\textures\common\nodraw
Fixed, but still not visible in the game. I tried setting r_showTris just for the hell of it but still nothing was visible.
One thing I noticed in darkradiant, if I switch to lighted preview in the 3d view, the switch model dissapears. From loading other .ase models (caves1_6b.ase, for instance), darkradiant seems to cull back faces in both fullbright texture and lighting preview modes. So I don't think the normals on my model are backwards else it would not be visible in either fullbright or lighting mode. Right? So what does that leave? Fubar .tga textures?
...
Well I made a small bit of progress, I had saved the .tga out of blender as Targa Raw instead of Targa RGBA. It now show up in darkradiant in lighted preview mode but *still* isn't visible in the game. I tried commenting out the spec and bump in the .mtr file too. According to iddevnet the engine should create a default flat bumpmap and turn spec off.
The .ase requires the material file name not the texture name. TGA's should be plain RGB, not RAW. I'm using 2.49 but shouldn't make a difference.
IE
Code:
*BITMAP "//base/textures/items/health/armor01"
And the material file:
Code:
textures/items/health/armor01
{
qer_editorimage models/items/armor/armor01.tga
diffusemap models/items/armor/armor01.tga
}
I finally got it to show, but I'm not 100% sure how I did it. I started over with a cube and got that to load. I think it has to do with one or two of the ASE py script export options.
* Use Submaterials (UDK)
* Allow Multiple Materials (UDK)
I unchecked these before exporting and the final .ase had *BITMAP path filled in already. But I was also trying different Targa save options, Raw, RGB, RGBA, etc.
TheHappyFriar, I tried pointing to a renamed light_switch.mtr like you suggested but got a black hole in the wall where the switch was supposed to be. I'll keep it in mind as I continue my experimentation though.
Thanks for the hints/suggestions people. At least I've got a feedback loop working now.
I had the same problem, the correction was to turn off all the options in the ASE exporter.