Kuribo64
Views: 19,854,928 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
03-29-24 07:33 AM
Guest:

0 users reading TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] | 1 bot

Main - Archived forums - SMG documentations and tutorials - TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] Hide post layouts | New reply

Pages: 1 2 3 4
Goembario
Posted on 06-02-13 09:08 PM (rev. 2 of 06-02-13 09:08 PM) Link | #23867
Hello there people.
This tutorial will help you to import your own created 3d model object into whitehole.
I wrote it especially for people which have windows. (though it can be done on linux and osx but ask people who have experience and use one of those systems)
It's not easy for most people when you don't have to much knowledge about programs and command lines and stuff so I hope this will help.
So to be clear, this only helps you to get your own .obj model loaded in whitehole! (with collision added ofc)

So let's get started!
First download the tools pack, it contains the galaxytools, BCSVE-v0.7, obj2bdl-v0.2, RARC Packer and yaz0enc.
Extract it somewhere you like, as example your desktop.
Also download python and PyQt4 wich you can find at the end of my post, but wait with installing it.

Well, when you have your .obj, you'll have to convert it to bdl format, wich smg2 uses.
To do that you'll need python 3.2 OR python3.3 installer and the PyQt4 installer.
You have to install python 3.2/3.3 first.
You should install it to C:/Python32 or C:/Python33 directory.
When you have done that, you'll have to install PyQt4 to your python directory (so likely C:/Python32 or C:/Python33)

If you have no error or whatever, you'll have likely installed it succefully.
Picture of my directory:
[image]

You'll also need the script to convert your .obj to bdl.
First, you had to download the tools and extract all the tools in a folder.
When you have extracted everything, you will see a folder called "obj2bdl-v0.2"
Within that folder, you'll see one folder and 3 files.
You will now copy those 2 files and 1 folder (don't copy the readme) to this directory: C:/Python33
If you have done that right, you should have copied the j3d folder and the btypes.py and obj2bdl.py in that folder.

Now you will be able to convert your obj. to bdl, BUT before we do that, you'll have to make a collision for your planet or object.
Read blank's thread on how to do that: https://kuribo64.net/?page=thread&id=29

Well if you have your .kcl an .pa, we can go on.
Also, your .obj .kcl and .pa MUST HAVE THE SAME NAME, so for me it was: test2.obj, test2.kcl and test2.pa


Now to convert your .obj file, place it in the python folder like you have copied the obj2bdl script.
Note: You have to copy the .obj, .mtl and the texture map wich must have png format textures and should be in the power of 2 (so 32x32 or 64x64 in pixels)

Now to convert it, start command prompt (type cmd in at START menu)
When loaded, type this: cd/python33 (or if you have python32: cd/python32)
In command prompt it will show now C:\Python33> (or C:\Python32> )
Now type: python.exe obj2bdl.py yourobject.ojb

You may have get a sort of error like: material Default_Material has no diffuse texture map, skipping. (this is when using sketchup, I DON'T KNOW WHAT COULD HAPPEN WITH OTHER MODEL PROGRAMS .obj OUTPUT)
But that won't affect you object's textures in whitehole. (as far as I have known)
Here's a picture on how it worked for me in command prompt:
[image]


When doing it right, your .obj file should be turned in a .bdl file

So you now have 3 files:
1 your "planet.bdl"
2 your "planet.kcl"
3 your "planet.pa"

Now make a folder on you desktop or wherever you want, and name it to your planet or object, basically the same name as those 3 files have.
Put those 3 files in it.
Now get RARC PACKER and yaz0enc out of the tools map (where you extracted it) and place it on your desktop or the same folder where you put you folder with the 3 files.
Now put that folder on the RARC PACKER.
If done right, it will output "yourplanet.arc" OR "yourobject.arc" (whatever you named the damn thing)
Now put your .arc file in yaz0enc.
It should output now "thedamnthing.arc.yaz0"
Now delete the .yaz0 part out of the name and delete the old .arc (the one you put in the yaz0enc, not the one that came out obviously :P)

When done all this, you have to put the .arc file into the ObjectData folder in your SMG2 folder.

Now to let whithole load your planet/object, you'll have to add it to it's object register, soo we're almost there!!

Find the "ProductMapObjDataTable.arc" in the ObjectData folder.
Now extract it with arcTools, you can open galaxytools and then select arcTools to use it.
When extracted, you'll get ProductMapObjDataTable.bcsv in a folder IN the ObjectData folder.
Now open BCSVE-v0.7 from the tools.
Open the "ProductMapObjDataTable.bcsv"
Click on "add"
Scroll down and click on the last Entry.

Now change the first "field" in your model/object name so replace ModelName in you object/planet's name without the .arc extension.
In the "Data" field, change whatever is in there, EXACTLY to "SimpleMapObj" (according NewPlayer123 :P )
Here's a pic on how I did it for my "test2" object:
[image]
Don't touch anything else and save the file AND exit BCSVE.
Now repack it with arcTools.
Replace the existing "ProductMapObjDataTable.arc" with your new edited one.

Now open whitehole and choose a galaxy.
Now add any object you want, for ease choose "coin"
Place the coin in the galaxy.
Now rename the coin object to you object's name.
If done right, you will see your planet or object or whatever it is.
If you think you can't see it, you'll have to scale your object lot's of larger then it is now.
Here's my result: (it's a fast lame creation of me with N64 textures Lol)
[image]

Link for the tools: http://www.mediafire.com/download/qva6u4hztjryv45/Tools.rar
Python 3.3: http://www.python.org/download/releases/3.3.0/
PyQt4: http://www.riverbankcomputing.com/software/pyqt/download

Credits to people like NWPlayer123, MrRean and blank for helping to get things clear.
Also, all credits to the people who made all the tools we have here on kuribo64.

If you wan't to complain or that things I've said are wrong, feel free to say so, mods can change things if they want.
Sorry if it may a bit unclear at some parts, if you have a suggestion, like adding more pictures, than say so.

shibboleet
Posted on 06-02-13 09:17 PM Link | #23869
No; You have to close the BCSV editor before packing the file. It won't work if you don't.

____________________
a

Goembario
Posted on 06-02-13 09:22 PM (rev. 2 of 06-02-13 09:22 PM) Link | #23870
Fixed that one :P

Flame8765
Posted on 06-03-13 02:14 AM Link | #23929
I'm sorry, but this procedure is very tedious. In my first attempt, I managed (somehow) to go through all of the steps perfectly, but my object wouldn't load in whitehole, even when scaling it by 1000. In my second attempt, when I try making my kcl file by clicking "Export" in collision-v0.6, the program just hangs itself! What am I doing wrong?? Is it the max triangles tab? My obj file? I just don't get it. I've spent the last day and a half trying to do this. Help me x_x

NWPlayer123
Posted on 06-03-13 02:38 AM (rev. 2 of 06-03-13 02:41 AM) Link | #23934
It hangs because it has tons of polygons to export. Give it a while :P
If you want to get scaling right, export Mario's model from BMDView2 and export it into sketchup or what have you in YARDS. Then you'd use METERS for the actual planet.

____________________
"I hate playing musical chats" ~ Quote of the month

Flame8765
Posted on 06-03-13 03:21 AM (rev. 3 of 06-03-13 10:17 PM) Link | #23942
Thanks. I waited for a few minutes and *pop* there's the kcl file lol.

EDIT: I have completed every step without any flaws. However, whenever I rename an object to the planet I want in Whitehole, the program doesn't let me rotate, pan, or zoom in/out. It freezes, but I can still select other objects and modifiy its properties...Is it loading..?

Goembario
Posted on 06-03-13 10:21 PM Link | #23984
Uhm, I really don't know, you may ask MegaMario about it?
I only know that if you delete to much, it freezes.

Flame8765
Posted on 06-03-13 11:43 PM Link | #23988
Why does this keep happening to me? ;_;

My model is just a single textured face...I don't get it...I did the whole tutorial 100% right, but Whitehole just sort of freezes whenever I rename my object to the planet I want. Every - single - time.

shibboleet
Posted on 06-03-13 11:54 PM Link | #23989
Posted by Flame8765
Thanks. I waited for a few minutes and *pop* there's the kcl file lol.

EDIT: I have completed every step without any flaws. However, whenever I rename an object to the planet I want in Whitehole, the program doesn't let me rotate, pan, or zoom in/out. It freezes, but I can still select other objects and modifiy its properties...Is it loading..?

You exported the model wrong, or something. If it freezes and it lets you do other stuff, that means your model is corrupted. If whitehole freezes and lets you do nothing, it's corrupted. :P
Try exporting it again, with different properties.

____________________
a

James4224
Posted on 06-04-13 12:00 PM Link | #24019
Thank you very much Goembario! It works! IT WORKS! There is a my test: https://www.dropbox.com/s/556s509w7sk94ge/test.png

Goembario
Posted on 06-04-13 12:52 PM Link | #24020
Posted by James4224
Thank you very much Goembario! It works! IT WORKS! There is a my test: https://www.dropbox.com/s/556s509w7sk94ge/test.png

Yaaay, I'm glad that my tutorial actually is helping other people. :awsum:

James4224
Posted on 06-04-13 05:48 PM (rev. 4 of 06-06-13 01:40 PM) Link | #24034
But when I try to play on Wii the 3d model that I made doesn't work... :( Can you help me, please? There are folders that I used for the test here: https://www.dropbox.com/s/3m727p97jla2axm/test.zip

(In Whitehole the 3d model works, but on Wii not). :(

Edit: I uploaded my new folders! And now the 3d model works perfectly! :)

Goembario
Posted on 06-04-13 06:08 PM Link | #24036
Well also try running it on dolphin first: https://kuribo64.net/?page=thread&id=681
Anyway, this thread may help you with revolution : https://kuribo64.net/?page=thread&id=396
Try doing it with the game's ID and not "Smg2 test".

James4224
Posted on 06-05-13 08:50 AM Link | #24134
Can you try my test on your Wii or dolphin, please? I tried as you said, but the 3d model didn't work... :(

blank
Posted on 06-05-13 09:50 AM Link | #24137
Your problem is ProductMapObjDataTable.bcsv. The ModelName field should be set to the name of the model (in your case piattaforma1) and for simple objects the ClassName field should be set to SimpleMapObj.

On a more general note for everybody trying to import objects into the SMG2:

There are two general groups of objects: map objects and planets. Map objects are smaller objects such as platforms, pipes and trees. These are the kind of objects that should go in ProductMapObjDataTable.bcsv. Planets on the other hand should go in PlanetMapDataTable.bcsv in ObjData/PlanetMapDataTable.arc.

James4224
Posted on 06-05-13 12:29 PM Link | #24141
I did all things that you said... May be a problem with the texture or with the collision and the kind of ground... I don't know... :(

Flame8765
Posted on 06-05-13 10:28 PM (rev. 2 of 06-05-13 10:43 PM) Link | #24182
You exported the model wrong, or something. If it freezes and it lets you do other stuff, that means your model is corrupted. If whitehole freezes and lets you do nothing, it's corrupted.
Try exporting it again, with different properties.


I'm using Sketchup Pro 8's exporter, and this is what the settings window looks like. I highly doubt it's my model.

[image]

NWPlayer123
Posted on 06-05-13 10:37 PM (rev. 3 of 06-05-13 10:44 PM) Link | #24184
If you're exporting a model using sketchup as an OBJ, you need triangulate all faces, export 2 sided faces if your model needs it, NO EDGES, export texture maps, and swapping the YZ axis if you're using mario's model from BMDView2 as a reference for scale and such. Be sure to keep it to model units as well.
HOWEVER, if you're exporting collision to OBJ, make sure there are NO two sided faces otherwise you won't even be able to walk on it.

I say this because that pic is down for some reason.
EDIT: Nevermind, that should work, it's most likely your model. Try exporting it with those settings and using this (goes in C:\Program Files\Google\Google Sketchup 8\Plugins) to import it with textures and see if it looks right. If it doesn't you did something wrong.

____________________
"I hate playing musical chats" ~ Quote of the month

Flame8765
Posted on 06-05-13 11:38 PM Link | #24189
Well, I have no damn clue. I did everything WITHOUT FLAW, and Whitehole STILL freezes when I rename my object. I need a video tutorial or something, or else I give up.

NWPlayer123
Posted on 06-05-13 11:39 PM Link | #24190
Have you tried what I said and reimported it?

____________________
"I hate playing musical chats" ~ Quote of the month
Pages: 1 2 3 4

Main - Archived forums - SMG documentations and tutorials - TUTORIAL: How to get a obj. file in Whitehole. [TUTORIAL] Hide post layouts | New reply

Page rendered in 0.038 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 235/235, time: 0.010 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.