Register - Login
Views: 19676467
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Color Chart - Smilies
09-06-10 08:40:53 PM
fortyfive-antelope

Jul - SM64 Hacking - Mario 64 Level Importer New poll - New thread - New reply
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32Add to favorites | Next newer thread | Next older thread
messiaen
Member
Level: 50


Posts: 660/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-06-09 02:58:23 PM (last edited by Metal_Man88 at 02-03-10 05:21 PM) Link | Quote |
This is a program I wrote over the last weekend so people can have an idea how their .obj files work on Mario 64.

It imports an .obj file as the level mesh of Bob-omb Battlefield into a special ROM (ppf patch included in the zip file)

Here is a sample of what it can do:



Download obj_import 0.02 alpha. - Outdated
Download Object Import 0.4 Alpha

In theory, it can use also material data to assign different textures (not external, but from the game itself), however this part is still buggy.

It will only work for .obj files in which faces uses the v/vt/vn format (ie, f 1/1/1 2/2/2/ 3/3/3), so if your .obj file doesn't cointan texture coordinates and normals the parsing will fail.

Only triangles are supported, so if your object file use quads or polygons with more faces, be sure to save it again using the "triangulate" function of your 3d modeller.

USE IT AT YOUR OWN RISK AND DON'T EXPECT GOOD RESULTS!

Usage: obj_import [obj_file] [rom] [scaling] (-mtl) (-culling)
ie: obj_import myfile.obj myrom.z64 300 -mtl

If you are unsure how to use the Windows console (MS-DOS prompt), please search Google instead of asking here. Your ROM name can't contain spaces, unless you specify them between quotation marks: "my file.z64"

The progam will warn if your vertexes are out of range. If this happens, try using a smaller scaling value.

To enable material support, use the -mtl flag. If only back faces are shown instead of front faces and the collision is buggy, use the -culling flag, which will reverse face order.

From what I have tested, Blender is the modeller that may give you the best results, though you can try Google SketchUp along with a Triangulate ruby plugin. Only Google SketchUp Pro supports exporting to .obj file, unless there is a free script that does that. Don't ask me to convert your SketchUp files into the .obj format!

There are some size constrainst for vertex and polygon data, the program will warn you if you surpass these. I haven't enabled extended memory since it would make the ROM incompatible with Toad's Tool 64. By the way, to open it you may have to turn on the verify checksum option in Toad's Tool preferences menu.

That's pretty much it, at the very least I hope someone can create a nice slide level with this . Again, don't expect good results of this buggy tool.
Gecko
Member
Level: 18


Posts: 46/108
EXP: 25801
For next: 4096

Since: 03-27-09


Since last post: 40 days
Last activity: 12 hours

Posted on 10-06-09 04:18:57 PM Link | Quote |
Thank you for giving us a chance to look into your work. I'm still trying to set up a working environment. I'm currently into a few problems. The object file shows up in TT64, but Nemu64 crashes after Mario's head intro. Am I using the wrong emulator?
luigiman1928
Member
Level: 12


Posts: 42/46
EXP: 7384
For next: 537

Since: 02-23-09
From: Gscentral

Since last post: 150 days
Last activity: 62 days

Posted on 10-06-09 05:52:46 PM (last edited by luigiman1928 at 10-06-09 06:02 PM) Link | Quote |
Ok im trying my models that i made in Google Sketchup, and when i try them in my Emulator,(they actually work! ) Project64, i get this error mesage: Unhandled CicChic (-1) in first DMA. And it takes longer to load, any reason why? And this: http://dsultimate.net/Board/upload/picture.php?albumid=1181&pictureid=12573
messiaen
Member
Level: 50


Posts: 661/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-06-09 06:58:38 PM (last edited by messiaen at 10-06-09 07:00 PM) Link | Quote |
Originally posted by Gecko
Thank you for giving us a chance to look into your work. I'm still trying to set up a working environment. I'm currently into a few problems. The object file shows up in TT64, but Nemu64 crashes after Mario's head intro. Am I using the wrong emulator?


Nemu 64 doesn't run the extended ROM (this has been discussed in another thread and will be fixed in the next version of the ROM extender), try using Project 64. By the way, post screenshots of your imports (either in TT64 or in-game) so I can see how well the importer has worked for you.

Originally posted by luigiman1928
Ok im trying my models that i made in Google Sketchup, and when i try them in my Emulator,(they actually work! ) Project64, i get this error mesage: Unhandled CicChic (-1) in first DMA. And it takes longer to load, any reason why? And this: http://dsultimate.net/Board/upload/picture.php?albumid=1181&pictureid=12573


Ignore the message, it's just a modification made to the ROM. It shouldn't take any longer to load.

Not sure what you are trying to show with the screenshot, try using -culling and see if it makes a difference. If you level is still glitched I'm not sure what's going on, but as said in the first post Blender will probably give you the best results.
wwwarea
Member
Level: 16


Posts: 52/72
EXP: 16819
For next: 3437

Since: 08-09-08


Since last post: 166 days
Last activity: 96 days

Posted on 10-06-09 07:06:25 PM (last edited by wwwarea at 10-06-09 07:14 PM) Link | Quote |
(Replying to messiaen's reply from the other thread.)

Oh, yeah I know much about scaling a little. But this object was my first object ported into Super Mario 64 and now, I have some other files ported. BTW, I use Wings 3D to make that.

Edit: -Culling? Do I only type that after the -mtl part?
messiaen
Member
Level: 50


Posts: 662/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-06-09 07:17:15 PM Link | Quote |
Originally posted by wwwarea
Edit: -Culling? Do I only type that after the -mtl part?

Yes, type that either after or before -mtl. Only do it if your model looks severely glitched up (ie, back faces are shown instead of front faces and collision is buggy)
wwwarea
Member
Level: 16


Posts: 53/72
EXP: 16819
For next: 3437

Since: 08-09-08


Since last post: 166 days
Last activity: 96 days

Posted on 10-06-09 10:41:03 PM Link | Quote |
Oh, OK. I will see what I can do. Thanks for helping. I also am making a dessert. It is my goal to create a new dessert with pyramids. But when the ground is flat and the models are pyramids but this will have to do for now. =)
Gecko
Member
Level: 18


Posts: 47/108
EXP: 25801
For next: 4096

Since: 03-27-09


Since last post: 40 days
Last activity: 12 hours

Posted on 10-07-09 07:41:56 AM Link | Quote |
Yay, it works. Had to resume Project64 after its halt.




messiaen
Member
Level: 50


Posts: 663/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-07-09 08:24:07 AM Link | Quote |
Gecko: nice to see your .obj file worked . Could you try using the -mtl option and see if textures are assigned to the correct polygons?
Gecko
Member
Level: 18


Posts: 48/108
EXP: 25801
For next: 4096

Since: 03-27-09


Since last post: 40 days
Last activity: 12 hours

Posted on 10-07-09 08:43:27 AM Link | Quote |
I do not have much time left, just taking my break from work.
Here are some obj and mtl files: http://www.file-upload.net/download-1931416/Gecko.rar.html
luigiman1928
Member
Level: 12


Posts: 43/46
EXP: 7384
For next: 537

Since: 02-23-09
From: Gscentral

Since last post: 150 days
Last activity: 62 days

Posted on 10-08-09 10:17:05 AM Link | Quote |
Ok, nother' problem. When i import my Models. They either come out out of the barrier, background, thing, or they just show up as a blinking line.

I hope Vl-Tone has time to look over the Mechanics of this program.
messiaen
Member
Level: 50


Posts: 664/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-08-09 12:47:36 PM Link | Quote |
Originally posted by luigiman1928
Ok, nother' problem. When i import my Models. They either come out out of the barrier, background, thing, or they just show up as a blinking line.


Can't help you much unless you give more details, such as screenshots, the .obj file (upload it in a free host such as mediafire) and the exact settings you used to import the file.

This weekend I wlil try to flexibilize a bit the .obj parsing so it can accept a wider range of format variants.
Breegullbeak
Member
Level: 19


Posts: 33/128
EXP: 30962
For next: 4815

Since: 06-06-09


Since last post: 56 days
Last activity: 10 hours

Posted on 10-08-09 07:26:14 PM Link | Quote |
The link to the program isn't working.
messiaen
Member
Level: 50


Posts: 665/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-09-09 09:12:32 AM Link | Quote |
Corrected the link and also uploaded a new version. This one supports .obj files without normals or texture coordinate information, so a wider variety of files will work.
Breegullbeak
Member
Level: 19


Posts: 34/128
EXP: 30962
For next: 4815

Since: 06-06-09


Since last post: 56 days
Last activity: 10 hours

Posted on 10-09-09 09:29:38 PM (last edited by Breegullbeak at 10-09-09 09:31 PM) Link | Quote |
Which file should I use and what do I do to make the patch?

http://www.mediafire.com/?sharekey=d1ad73b54e5c24c8e62ea590dc5e5dbb3974d0b407f8f175947708e37b913e74
messiaen
Member
Level: 50


Posts: 666/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-10-09 06:47:22 PM Link | Quote |
Originally posted by Breegullbeak
Which file should I use and what do I do to make the patch?

http://www.mediafire.com/?sharekey=d1ad73b54e5c24c8e62ea590dc5e5dbb3974d0b407f8f175947708e37b913e74


As the name of the program implies, you use the .obj file as input. Your file is very big, however I did a few changes in the patched ROM and I got your 3000+ faces .obj file to work, but texture coordinates are really messed up. I will release a new version of the importer and the patched ROM tomorrow, now it will support very big .obj files.
Breegullbeak
Member
Level: 19


Posts: 35/128
EXP: 30962
For next: 4815

Since: 06-06-09


Since last post: 56 days
Last activity: 10 hours

Posted on 10-10-09 07:34:35 PM Link | Quote |
Originally posted by messiaen
Originally posted by Breegullbeak
Which file should I use and what do I do to make the patch?

http://www.mediafire.com/?sharekey=d1ad73b54e5c24c8e62ea590dc5e5dbb3974d0b407f8f175947708e37b913e74


As the name of the program implies, you use the .obj file as input. Your file is very big, however I did a few changes in the patched ROM and I got your 3000+ faces .obj file to work, but texture coordinates are really messed up. I will release a new version of the importer and the patched ROM tomorrow, now it will support very big .obj files.


Thanks. Thats actually a model from Banjo Kazooie so I should have assumed it would have been to big, but thanks for making it bigger. I can't wait.
messiaen
Member
Level: 50


Posts: 667/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-10-09 07:45:13 PM Link | Quote |
This is how your .obj looks in the game:



Unfortunately, I don't have a clue how to deal with the vertice coordinates from your file (VL-Tone, you should try importing this one and see what happens), which make thing look sort of bizarre.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 41


Posts: 525/573
EXP: 462499
For next: 17646

Since: 07-27-07
From: Montreal, Canada

Since last post: 26 days
Last activity: 21 hours

Posted on 10-10-09 09:00:56 PM Link | Quote |
Breegullbeak, would it be possible to get all the .png textures for this file? I would like to try to import the model in TT64, and it's currently dependent on finding texture files. I guess I could patch it so it uses some random textures instead, but it would be nice to try with the real ones.

messiaen: What does your program do with .obj files that do not have texture coordinates or normals?

messiaen
Member
Level: 50


Posts: 668/930
EXP: 906336
For next: 40981

Since: 11-20-07
From: Porto Alegre, Brazil

Since last post: 7 days
Last activity: 1 day

Posted on 10-10-09 09:12:23 PM Link | Quote |
Originally posted by VL-Tone
messiaen: What does your program do with .obj files that do not have texture coordinates or normals?



If there aren't texture coordinates, it simple doesn't write them . In that scenario I guess the best choice would be to simply open the .obj file in a 3d editor and assign texture coordinates.

By the way, how do you handle normals? Do you "normalize" them (no pun intended!) or simply truncate it to a 8-bit value (in that case, values usually seems too out of range) ?

I finally got around a stupid bug in material support, now it seems to work fine:

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32Add to favorites | Next newer thread | Next older thread
Jul - SM64 Hacking - Mario 64 Level Importer New poll - New thread - New reply




Rusted Logic


Acmlmboard - 04/23/2010 b378.01
©2000-2010 Acmlm, Emuz, Blades, Xkeeper bargaining-tycoon
Page rendered in 0.375 seconds.