Importing your Obj file tutorial

Learn more on how to use Sandbox, or submit your own tutorials or resources.
Radder
Member
Member
Posts: 67
Joined: September 23rd, 2009, 11:31 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Importing your Obj file tutorial

Postby Radder » 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.
Last edited by Radder on September 23rd, 2009, 12:52 pm, edited 2 times in total.

Radder
Member
Member
Posts: 67
Joined: September 23rd, 2009, 11:31 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Importing Obj file

Postby Radder » September 23rd, 2009, 12:27 pm

Here is how you load the your model into the map.

Press "E" to get into edit mode.
Press the tilde key (the one above the tab key) to bring up the console's text input
type "mmodel "the name of your new folder"
Below is the correct way to type it:
mmodel cabin ( replace cabin with the name of your new folder you created.)

Press enter.
Now your model is added to your mapmodel list.
Press the escape key. click on new mapmodel, go to the last number in the list and you will see your new model at the bottom. It is the same name as the new folder you created in the above post.
Click on the name and your model with textures loads into the map.

User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Importing your Obj file tutorial

Postby PizzaLover101 » November 21st, 2009, 11:50 am

What am i doing wrong?

my cfg file is
mmodel testing/sniper/tris
and it shows up in the model directory, but it says that it can't load the skin
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/

User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Importing your Obj file tutorial

Postby Mike » November 22nd, 2009, 9:50 am

It doesn't look like you have the skin linked in your cfg. Check out the .cfgs for our models to get an example of what it should look like. Take care.
-mike
Sign up for our to keep up to date with the Sandbox news!
We also have a , , and a [/b][/color]!

User avatar
Creatorrookie
Member
Member
Posts: 66
Joined: September 22nd, 2009, 8:35 pm
Name: John
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Importing your Obj file tutorial

Postby Creatorrookie » November 25th, 2009, 2:27 pm

What's a Uv map?
The rookie in sandbox... :)

User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Importing your Obj file tutorial

Postby PizzaLover101 » November 26th, 2009, 8:40 pm

ok, thank you
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/

User avatar
Creatorrookie
Member
Member
Posts: 66
Joined: September 22nd, 2009, 8:35 pm
Name: John
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Importing your Obj file tutorial

Postby Creatorrookie » November 26th, 2009, 10:04 pm

What's an mlt file?
The rookie in sandbox... :)

User avatar
Creatorrookie
Member
Member
Posts: 66
Joined: September 22nd, 2009, 8:35 pm
Name: John
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Importing your Obj file tutorial

Postby Creatorrookie » November 26th, 2009, 10:17 pm

If the file I downloaded was "Rifleobj.rar. Is the rar significant, or will not apear as a mapmodel?
Am I supposed to convert the file?
The rookie in sandbox... :)

siimvuss
Member
Member
Posts: 410
Joined: August 19th, 2009, 1:27 am
Name: S
IRC Username: S
Location: Estonia
Contact:

Re: Importing your Obj file tutorial

Postby siimvuss » November 27th, 2009, 7:14 am

.rar means the file is packed its like .zip you have to unpack it then you can put the file in where ever you want

User avatar
stefos
Contributor
Contributor
Posts: 112
Joined: January 9th, 2010, 10:01 am
Name: stefos
Location: Greece, Crete, Elounda
Contact:

Re: Importing your Obj file tutorial

Postby stefos » March 4th, 2010, 5:21 pm

When exporting OBJ files from external programs I get an MTL file and the textures, I don't get just one texture skin how do I load these textures with my model...or how do I export a model from an external program in obj format with just the one texture skin and not the mtl file?

As above I can easily import models into SandBox (obj) but not the textures :(
Why not create your own cool comics with Platinum Arts Sandbox Free 3D Game Maker

Image

Visit Comix Sandbox Here http://www.comix-sandbox.com


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Tutorials and Resources”

Who is online

Users browsing this forum: No registered users and 4 guests