Views: 22,940,948 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
10-15-24 09:58 AM |
Guest: |
0 users reading Importing/Creating Planets/Objects Tutorial v2 [New!] [Updated!] [Shiny!] | 1 bot |
Main - Archived forums - SMG documentations and tutorials - Importing/Creating Planets/Objects Tutorial v2 [New!] [Updated!] [Shiny!] | Hide post layouts | New reply |
NWPlayer123 |
| ||
Member Imma Snuggle You Level: 111 Posts: 2365/3604 EXP: 14486221 Next: 382139 Since: 07-07-12 From: Colorado Last post: 3275 days ago Last view: 1432 days ago |
NWPlayer123's Importing Guide v2Now with more rewrites!Starting NotesThis isn't solely for planets, this can be applied to any object you want, for whatever effect you want. There's a ton of definitions in ProductMapObjDataTable that let you do quite a bit of cool stuff if you know how to get it to work. Creating the modelStarting NotesEven if you don't do the modeling in Sketchup (Sketchup Pro 8 for best compatibility, it's the one I'll be referring to when setting it up), you should still follow the setup in this to know your scale is right. Setting Up Sketchup ProBefore we start, you should really install my Plugin Pack into C:/Program Files/Google/Google Sketchup 8/Plugins (might be different if you have 64 bit or a different installer, the main thing is the plugins folder in sketchup's data in Program Files). When starting it up for the first time, there should be an option for a template (if you have already disabled it or something go to Help > Welcome to Sketchup), set it to Simple Template - Meters. Once that's done, hit "Start using Sketchup" and wait for it to load for the first time. Your first step would be to import Mario's model so you have a correct scale. Start by going to File > Import, setting it to 3DS files, and clicking the "Options" button on the right side of the window. I would recommend merging coplanar faces, makes it a little lighter on the program, but the important thing is that the units are in YARDS. Then download Mario and Luigi's models and import them using one of them using those settings. That will be the scale that the in-game Mario or Luigi will be relative to your planet when you import it. Once that's done, get to modeling and/or texturing! One of the most useful plugins that I use on a regular basis when working on a model is Plugins > Cleanup[sub]3[/sub]. It basically makes your life a hell of a lot easier when trying to optimize it in-game. The settings take some understanding to get used to but it's a lifesaver. Exporting from Sketchup Pro to OBJOnce you've finished the model, it's time to export it to import into the game. To do so, delete the Mario reference model, unless you want a T-Post Mario in your planet, and go to File > Export > 3D Model. Set the export format to OBJ and hit the "Options" button. Doesn't matter if Export only current selection is on, that's for helping you select what to export, but the main thing is that you Triangulate All Faces, because otherwise half of them will be missing when you import it. It doesn't matter whether you allow it to Export 2-Sided Faces, that's just allowing you to have back faces for polygons (when modeling you probably noticed how one side of a polygon is a greyish-blue and the other is white, if this isn't selected it will only export the front side of them, and any textures on the back won't be transferred). I don't think the importer cares if there are any lines but I would just disable it. The other big things are to make sure that exporting texture maps and flipping YZ coordinates are on, because otherwise you'll get an error when importing because it has no textures to apply to the model, or if it does import, it'll be sideways and you'll have to rotate it in whitehole or anarchy when making the level. Units I would just leave to Model Units. Once that's done, select where to export and export! NOTE: If you're going to use this model for both collision and the model, make two versions because if two sided faces are on when exporting the collision file then you won't be able to walk on it, you'll just slide around. Creating the BDL FileStarting NotesThis is the section that gives a lot of people trouble, apparently typing in simple commands is difficult for some people, or they get an error because they did something wrong. Make sure you know what paths, drives, and scripts are. Setting Up DependenciesAs mentioned before, you need to know what scripts are, on a basic level. Most of the tools we have for SMG Hacking are scripts that run via the Command Prompt. However, these scripts need something to run them, and sometimes another library to make it easier. As such, you'll need python 3.x and PyQt4 for OBJ2BDL and OBJ2KCL. You can find python here, the version as of writing this is python 3.4.0, though I'm running 3.2.3. You can find the PyQt4 library here under Binary Packages. Make sure it matches your version of python and your operating system type (32-bit or 64-bit). Importing the ModelOnce you have installed python and pyQt4, it's time to finally import it. The download for OBJ2BDL (I like to call it BDLCreate) is here (an exe is here but it still requires using the command prompt and is UNTESTED). Download it, and copy the OBJ from where you exported it to the folder where the python scripts are. Now comes the supposedly difficult part with the command prompt. You can find it by going into your start menu, typing in "cmd", and hitting enter. It's a black window with white text. So, step 1 is to navigate to the folder in the command prompt. I will assume you are already familiar with paths and drives, if you're using multiple drives and the files are not on your C drive then you'll have to do "D:" or whatever the other drive is and hit enter to change the drive it's in. Now what you need to do is type "cd drive:/pathtodrive" and hit enter to move to the folder that the script is in. For instance, I would type "cd C:\Users\npboo_000\Desktop\SMG2WorkFiles\Tools\BDLCreate-0.4" since that's where it is for me. Now it's a matter of typing in the right command to import it. Said command, for me at least, would be "C:/python32/python.exe obj2bdl.py model.obj export.bdl". What this is doing is running python.exe and telling it to execute the obj2bdl.py script. The script has additional parameters, namely the import file and export file (export file is optional). If everything is right it should take a bit, and a BDL file should be created. Hooray! The hard part is over...kinda. Creating the CollisionStarting NotesTo start off, as noted before, if you're using a model that you exported with 2-sided faces, DON'T. Make a seperate model without it, and simplify it as much as is needed. There's a much bigger limit on the amount of polygons of collision you should have, don't make the game work harder then it needs to. Second, if you want to assign floor codes (there's a list of them in the program), use colors in sketchup to texture polygons to group them, and give them a descriptive name so you can find them later when importing. Basically each color/texture/group of polygons can be assigned a floor/wall/other code when importing. Importing the CollisionThankfully, importing collision isn't quite as painful since blank made a nice handy GUI to import them with. The download link for the collision creator (I call it KCLCreate) is here (and if you really want it, the script source code is here and a 32-bit version of the EXE is here). Once you download it, just double click collision_creator.exe and wait for it to load. It should be self explanitory, go to File > Open and open the OBJ, it should pop up with a list of the textures/colors you exported the model with (there should also be one with default group or something, that's the untextured polygons, you can usually leave them alone as the program will default to importing them as normal solid polygons). If you want to play around with the codes and settings, be my guest, that's how you make the honey for Bee Mario to climb on and the walls for Boo Mario to go through, among other things, but otherwise, just go to File > Save or Save As, and export. Importing into the gameOpening the Game FilesSo, now's where you need SMG2's files, the ones we need to edit to get the game to recognize that there are new planets are either "PlanetMapDataTable" or "ProductMapObjDataTable", both of which are in ObjectData. You need to extract them using ArcExtract. To use it, the easiest thing to do is use my handy .bat file to extract it automatically. You just right click any arc file, Open with > Choose Default Program, and make sure you let it use the program with all arc files, manually select the bat file in the download, it shouldn't extract it on the first run, but just double click the arc file, and it'll create a folder, and inside it is another folder and inside THAT is the file's contents. The reason I create a double folder is so you can copypasta ArcPack into it and pack the new data correctly (IE all the files in a folder), makes it easier when you're editing it multiple times. Okay, back on topic. Inside said folders, you should have PlanetMapDataTable.bcsv or ProductMapObjDataTable.bcsv. Now comes the fun part. Starting NotesJust wanna say, there's pros and cons to using each file, if you use PlanetMapDataTable, that's considered the "right" way to import planets simply because it has all the customization options to make planets, and the name. If you want to know what all the parameters do (when we open up the BCSV for it), you can try looking at this thread. ProductMapObjDataTable has a lot more definitions (and definitions in general) for creating objects. Here's the full list if you want to see all the options. To open any BCSV, you're going to need Marionumber1's BCSV Editor. Importing using PlanetMapDataTableTo start off, open the BCSV editor and open the BCSV in it. Then hit "Add" to add a new entry at the bottom of the list. Scroll to it, and start by changing "Placeholder" to the name of the planet (no .arc or file extension, look at the other entries for an example), and notice that above it is a list of fields with the name of the hash in hex, and then what the string is for the entry. All you want to do is go to the "Unknown" fields and delete the "Placeholder" text in it so it's blank. Once you've done that, just save and BE SURE TO CLOSE THE PROGRAM ONCE YOU DO. If you don't, it won't work when you're trying to pack the file. As such, the final step is to pack said file. Do what I mentioned above in starting notes by copying the exes and then clicking and dragging the folder onto ARCPack.exe. It'll make an ARC file. Drag the ARC file onto yaz0enc.exe and it'll make a "PlanetName.arc 0.rarc" file. Delete the original arc and rename the rarc to what the old one was, so you end up with a yaz0 encoded "PlanetName.arc" file. That's it! Go and add the arc and your planet to your SD and go create a level! Importing using ProductMapObjDataTableImporting using ProductMapObjDataTable is much easier, just extract and open up the BCSV, hit the add button at the bottom so it creates another entry at the bottom of the list, in this case Entry 406, and change the data from "Placeholder" to whatever the name of your planet is. Then click the dropdown for the field and change it to ClassName, the other one you haven't edited yet, and change the data in that from "Placeholder" to "SimpleMapObj". Closing NotesSomething I didn't mention above, if you're using Whitehole to create and you're trying and failing to get the planet to appear in it, that's because you're using a version of the model with custom vertex colors, which for whatever reason whitehole doesn't like. You'll need to make a seperate version using v0.3, you can find the script here and the (untested) EXE here. ____________________ "I hate playing musical chats" ~ Quote of the month |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1866/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
Nice tutorial, look forward to the video. |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 164 Posts: 1393/9039 EXP: 57567667 Next: 134723 Since: 07-03-12 From: in a box Last post: 14 days ago Last view: 2 days ago |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1456/4661 EXP: 21305676 Next: 530925 Since: 07-07-12 Last post: 1522 days ago Last view: 535 days ago |
if _____Low.arc is used with LowFlag, then...
BiancoWater.arc < With WaterFlag and connect the WaterArea to that. tada, working water. ____________________ a |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1869/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
Pics or it didn't happen, literally. Show us it works, until then i'm not convinced.
EDIT: Yep, didn't work correctly, who would have thought? |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 164 Posts: 1395/9039 EXP: 57567667 Next: 134723 Since: 07-03-12 From: in a box Last post: 14 days ago Last view: 2 days ago |
Posted by Luigi ... connecting a WaterArea object to... a flag?! What the hell do you mean? ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
blank |
| ||
Normal user Level: 26 Posts: 70/129 EXP: 98087 Next: 4188 Since: 07-08-12 Last post: 3514 days ago Last view: 2487 days ago |
I'm not sure, but I believe that to get working water you have to combine a MoveLimit.kcl with a WaterArea. |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 164 Posts: 1397/9039 EXP: 57567667 Next: 134723 Since: 07-03-12 From: in a box Last post: 14 days ago Last view: 2 days ago |
I looked at SMG1 Beach Bowl Galaxy's main planet and it also has a WaterSurface.kcl.
However, in the same galaxy, the planet with the waterfalls doesn't use WaterSurface.kcl or separate Water models. Water shit is mysterious to say the least. ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1457/4661 EXP: 21305676 Next: 530925 Since: 07-07-12 Last post: 1522 days ago Last view: 535 days ago |
I Just tested it....
lolwut. I set the WaterFlag to 1 in PlanetMapDataTable.arc and used BiancoHillsWater as the water model from Bianco hills, and placed the water where it needed to be, scaled, and I placed the WaterArea in the same place with the same scale. But with a bit of y scale problems. ____________________ a |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1870/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
Err.... I wouldn't say it worked too well, the thing I saw on your stream was an absolute mess. Even the railmovewaterobj was better. |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1458/4661 EXP: 21305676 Next: 530925 Since: 07-07-12 Last post: 1522 days ago Last view: 535 days ago |
It was just the Y scale ._. ____________________ a |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1871/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
It was still an absolute mess, I don't remember the X and Z scales being all too perfect either. |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1459/4661 EXP: 21305676 Next: 530925 Since: 07-07-12 Last post: 1522 days ago Last view: 535 days ago |
No, they were just fine. The reason It was a mess is because it was too high scaled.
End of story. ____________________ a |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1872/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
Still not gonna fix any problems we had before, will it? |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 124 Posts: 1460/4661 EXP: 21305676 Next: 530925 Since: 07-07-12 Last post: 1522 days ago Last view: 535 days ago |
Posted by Silver It was just to see if it was possible, so stahp. It's a start to this though, we can improve beyond here. ____________________ a |
MK7tester |
| ||
Magikoopa I'm back Level: 104 Posts: 1873/3145 EXP: 11808626 Next: 53500 Since: 07-07-12 From: Dolphic Island Last post: 2771 days ago Last view: 2769 days ago |
That's something I can agree with you on, it was a start. |
Goembario |
| ||
Normal user Level: 24 Posts: 54/109 EXP: 73361 Next: 4764 Since: 05-30-13 From: The Netherlands Last post: 3962 days ago Last view: 3088 days ago |
Sooo does anyone know why I can see my model in whitehole, but doesn't show up in the game itself?? (on dolphin)
Changing stuff and adding stuff does work ingame, but it won't show the model like it does show it in whitehole. |
NWPlayer123 |
| ||
Member Imma Snuggle You Level: 111 Posts: 2370/3604 EXP: 14486221 Next: 382139 Since: 07-07-12 From: Colorado Last post: 3275 days ago Last view: 1432 days ago |
Well I would try actually testing it in riivolution on your wii since using dolphin to test and relying on it probably isn't the best idea... ____________________ "I hate playing musical chats" ~ Quote of the month |
Goembario |
| ||
Normal user Level: 24 Posts: 58/109 EXP: 73361 Next: 4764 Since: 05-30-13 From: The Netherlands Last post: 3962 days ago Last view: 3088 days ago |
Well okay thanks for the reply then , I'm just screwed then since my wii has no drive anymore and Wiiu's vwii doesn't support revolution. (and I don't have a retail copy :/)
Well, I hope vwii will get supported in the future (though not counting on it yet), so I'll stop working on custom planets for a while :/ (and may buy the retail copy in the meantime ) |
NWPlayer123 |
| ||
Member Imma Snuggle You Level: 111 Posts: 2371/3604 EXP: 14486221 Next: 382139 Since: 07-07-12 From: Colorado Last post: 3275 days ago Last view: 1432 days ago |
Actually it does now, suprisingly. If you ever get the disc you can play it. We were just talking about it on the IRC today xD you just gotta run the exploit to install the homebrew channel first. Then it should be simple enough to run it.
Unfortunately stuff like letterbomb doesn't work though, you have to use a game exploit, somethign like smash stack. ____________________ "I hate playing musical chats" ~ Quote of the month |
Main - Archived forums - SMG documentations and tutorials - Importing/Creating Planets/Objects Tutorial v2 [New!] [Updated!] [Shiny!] | Hide post layouts | New reply |
Page rendered in 0.028 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 235/235, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |