Importing your Obj file tutorial
Posted: September 23rd, 2009, 12:11 pm
Hi all, new here. I just downloaded Sandbox the other day and it took awhile to figure out how to load an obj file with the textures correctly.It is really easy in the end. This assumes you have a obj trianglated model with it's uv map for your textures.
1. Create a new folder in the packages/models folder. Name your new folder so that is describes the model like cabin etc...
2. Save or copy your obj file into your new folder you just created. ( I also include my obj's mlt file to the folder but that might not be necessary. If you do add it rename it to tris.mlt)
Rename your obj file to tris.obj
3. Save or copy your jpg texture file into the new folder. Rename your jpg texture file to skin.jpg
Also you need a cfg file. You can copy one from the other folders or make your own using notepad.
If you copy a cfg file from another folder be sure to delete the text inside it. It can be left blank with no information.
Rename the cfg file obj.cfg
The model now will load with the textures and with collison detection on.
There are loading paramters that you can put in the cfg file but that can be dissused later
There might be other ways to get your obj file with textures loading into your map but this way does work well.
1. Create a new folder in the packages/models folder. Name your new folder so that is describes the model like cabin etc...
2. Save or copy your obj file into your new folder you just created. ( I also include my obj's mlt file to the folder but that might not be necessary. If you do add it rename it to tris.mlt)
Rename your obj file to tris.obj
3. Save or copy your jpg texture file into the new folder. Rename your jpg texture file to skin.jpg
Also you need a cfg file. You can copy one from the other folders or make your own using notepad.
If you copy a cfg file from another folder be sure to delete the text inside it. It can be left blank with no information.
Rename the cfg file obj.cfg
The model now will load with the textures and with collison detection on.
There are loading paramters that you can put in the cfg file but that can be dissused later
There might be other ways to get your obj file with textures loading into your map but this way does work well.