#1 2014-12-22 09:32:19

DB1999
Member

How do I import a model?

I have a .obj model (exported from Tesseract itself via the /writeobj name command) and I would like to import it in my map. I know I have to make a CFG file for the map itself,, but what do I need to put in here? I tried objload C:\Users\david_000\Documents\My Games\Tesseract\N.obj, but that did not work. I also would like to import the textures of the model.

Last edited by DB1999 (2014-12-23 14:30:58)

Offline

#2 2014-12-23 08:54:32

ThaOneDon
Member

Re: How do I import a model?

You need to mess around with it until it works. Its different depending on what you want to import. Just like with any engine.

Offline

#3 2014-12-23 13:46:22

Unnamed
Member

Re: How do I import a model?

First you have to put the model into a new directory inside C:\Users\david_000\Documents\My Games\Tesseract\media\model\mapmodel\
and you have to write objload N.obj in the cfg file
textures:
objskin <mesh> <skin> <mask>
objbumpmap <mesh> <norm>

Offline

#4 2014-12-23 14:18:24

DB1999
Member

Re: How do I import a model?

@unnamed

I just tried that first part about importing the model, but it still gives me the error: not loading an obj.

Offline

#5 2014-12-23 15:05:10

Unnamed
Member

Re: How do I import a model?

I guess you wrote objload into the .cfg file of the map. You have to create a .cfg file in directory of the model and write mapmodel <path> into the .cfg file of the map, e.g. mapmodel "nobiax/gaz_tank"

Offline

#6 2014-12-26 11:30:26

DB1999
Member

Re: How do I import a model?

So I have 2 config files. One in the map folder, and one in model/mapmodel folder (also where the N.obj file is). What has to be the name of the cfg file in the mapmodel folder? Do I have to add anything in the cfg file in the map folder?

Offline

#7 2014-12-26 20:52:16

Unnamed
Member

Re: How do I import a model?

The .cfg file of the model must have the same name as the model format (in this case "obj.cfg").
You have to add the line
mapmodel <path>
to the .cfg file of the map.

Offline

#8 2015-01-10 09:07:24

DB1999
Member

Re: How do I import a model?

Sorry for not replying here for a while. I dis manage to import 2 models. When I put them into my world though, nothing appears (only a model marker that you have with every model you place).

Offline

#9 2015-01-10 12:23:01

Unnamed
Member

Re: How do I import a model?

Do you get a error message (press F11)?

Offline

#10 2015-01-10 15:27:35

DB1999
Member

Re: How do I import a model?

No. I just see a little square with an arrow in the world (like with every model), but no actual model. This is what my files look like:

in the media/map folder (airfield.cfg):

mapmodel N.obj
mapmodel Touareg.obj

In the media/model/mapmodel folder (obj.cfg):

objload N.obj
objload Touareg.obj





Did I miss something important? Both models appear in the F3 list, (icon = blank), but the actual models don't appear.

Offline

#11 2015-01-18 13:29:09

DB1999
Member

Re: How do I import a model?

Anyone? Please?

Offline

#12 2015-01-20 15:13:18

SniperGoth
Member

Re: How do I import a model?

Well, if you could upload the file/folder, we could see if it's setup right ^^

Offline

#13 2015-01-20 16:18:57

DB1999
Member

Re: How do I import a model?

Here is a link. i removed map files and that stuff

http://www.mediafire.com/download/fdc65 … /media.rar

Offline

#14 2015-01-20 21:23:10

SniperGoth
Member

Re: How do I import a model?

Well......  there's no textures on it, and the cfg has basically nothing .
Even if it was setup right, it would have a giant "error" texture all around it when you load in-game, so.... texture it! :)

Offline

#15 2015-01-22 17:46:47

DB1999
Member

Re: How do I import a model?

Okay. I got these files with the download. Where do I put them and what do I add in which CFG file?

http://www.mediafire.com/download/0i3wz … skin00.rar

Offline

#16 2015-01-24 09:33:17

Calinou
Moderator

Re: How do I import a model?

Please use .zip format instead of .rar.

Offline

#17 2015-01-25 16:02:12

DB1999
Member

Re: How do I import a model?

Offline

#18 2015-01-25 22:52:03

SniperGoth
Member

Re: How do I import a model?

Are you really sure it's textured? I loaded it on wings3d with the textures provided, and there's basically no textures on it. Just lots and lots of meshes split.....

Offline

#19 2015-01-26 05:44:03

DB1999
Member

Re: How do I import a model?

No I'm not sure :/. And what if I use this model for example? It says it's textured.

http://tf3dm.com/3d-model/vw-touareg-72326.html

Offline

#20 2015-01-26 11:23:36

angjminer
Member

Re: How do I import a model?

DB1999 wrote:

No I'm not sure :/. And what if I use this model for example? It says it's textured.

http://tf3dm.com/3d-model/vw-touareg-72326.html


export it with object groups enabled,
and every piece of that will have to be skinned
EG: in you obj.cfg file

objskin parrtname yourtexture.jpg
objskin parrtname yourtexture.jpg


partname is the name of the mesh , door, wheel,.....
"
vt 0.5478 0.5707 1.0000
vt 0.5499 0.5713 1.0000
# 79 texture coords

g Bottom02 <<<<<<<<<<<here just Bottom02
usemtl 01___Default
s off
f 1/1 2/2 3/3
s 1
f 1/1 4/4 2/2
"

use notepad to open the exported obj file and look for the "g" there will be a name next to it.

should be several.

oh and if there are spaces in the name, fix it. the engine doesnt like that.
EDIT:
read this as well:
http://sauerbraten.org/docs/models.html#obj_format

Last edited by angjminer (2015-01-26 11:34:28)

Offline

Board footer