#1 2015-01-09 02:17:14

bool'
Member

Trouble importing custom model

So I have been through and read other topics about importing custom models and have taken the information that I could from them but with no success. I'm purely just trying to test model importing, I'm not trying to bring something into an existing map. I have the following files and folders set up:

I have a map called: "modelimporttest"
the map file: "modelimporttest.ogz"
and the cfg: "modelimporttest.ogz.cfg"
all inside the map folder

I also have
Door.mtl
Door.obj
Door.obj.cfg
Door.png
all in the <media/models/mapmodel/> folder

The map cfg ("modelimporttest.ogz.cfg") contains the following line:
mapmodel "C:/Users/bool/Documents/My Games/Tesseract/media/models/mapmodel"
(i have tried with the actual obj file in the path aswell)

The obj cfg (Door.obj.cfg) contains the following lines:
objload Door.obj
objskin Door.png

mdlscale 10
mdlcollide 1
mdlspec 100

I have tried the file names of the cfg's both as below:
"modelimporttest.cfg"
"Door.cfg"
(so there was not two file extensions in the name)

The error I get when I do "/objload Door.obj" is not loading an obj

I'm no doubt missing something very simple but can not figure out what it is that I'm doing wrong but any help would be appreciated.

Cheers

Offline

#2 2015-01-09 08:54:06

Antiklimax
Member

Re: Trouble importing custom model

Hi!
"modelimporttest.ogz.cfg" don't use this! just : "modelimporttest.cfg"
Door.obj.cfg -> Door.cfg
don't use full path in the map cfg: "C:/Users/bool/Documents/My Games/Tesseract/media/models/mapmodel"
on another pc the path will change (other user name), so use:
mapmodel "yourcustommapmodeldir/mydoor"

need to be look like this : c:/Users/yourusername/Documents/My Games/Tesseract/media/model/mapmodel/yourcustommapmodeldir/mydoor

"mydoor" is a directory put this:
Door.obj
Door.cfg
Door.png
no need Door.mtl
in the Door.cfg you need to add the mesh name of your model:
objskin mesh skin.jpg (if you don't know, just look inside the Door.mtl and search the material name for ex.: newmtl mesh)


if you want more custom mapmodel, make more dir. inside "yourcustommapmodeldir" mydoor2 for example.
your map and cfg need to be inside:
c:\Users\yourusername\Documents\My Games\Tesseract\media\map\

if you want publish it, download a custom map package from here and look inside.
Bye!

Sry :) new mapmodel command is: /newent mapmodel 1 (the number, is the row number in the map cfg. first mapmodel is 0, next 1, 2, ...)

Last edited by Antiklimax (2015-01-09 09:44:03)

Offline

#3 2015-01-10 20:55:36

bool'
Member

Re: Trouble importing custom model

Antiklimax wrote:

Hi!

in the Door.cfg you need to add the mesh name of your model:
objskin mesh skin.jpg (if you don't know, just look inside the Door.mtl and search the material name for ex.: newmtl mesh)

Hey,
I couldn't find the mesh name in the Door.mtl file, so when I imported the model it was invisible.

I decided to start fresh with a new map and model I tried making a new model that was just a basic cube, It has an .obj file, a .cfg, a normal texture, diffuse texture, mask, (all textures .png) and the .cfg looks like this:

objload cube.obj
objskin cube        diffuse.png      masks.png
objbumpmap cube        normal.png

mdlscale 100
mdlspec 100
mdlshadow 1

I could not find the name in the .mtl file again so I used the name of the model file so I assume this may be causing me problems...the .mtl file looks like this:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

Im pretty confident I have the map .cfg correct, I checked the complex.cfg for reference, just incase I did something wrong here is what the .cfg looks like.

mapmodelreset
   mapmodel "bool/cube"

(bool is my costom directory)
(the new map is just called map btw)

So if you know what I'm doing wrong and could point me in the write direction that would be a great help,

Thanks

Offline

#4 2015-01-11 21:17:48

Antiklimax
Member

Re: Trouble importing custom model

newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

so your material name is: Material
this is the default. if you want rename it in blender when you make a new material, just double click on the material name in blender.
if you have more materials search always for -> newmtl "materialname" and add skin for it.

objskin Material        diffuse.png      masks.png

I don't use Blender for static modelling. Wings3d is a very simple and easy for making static models in .obj format.

Last edited by Antiklimax (2015-01-11 21:31:07)

Offline

#5 2015-01-13 00:59:33

bool'
Member

Re: Trouble importing custom model

finally got it working, thanks for all your help. :)

Offline

Board footer