Kuribo64
Views: 19,852,185 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
03-28-24 08:15 PM
Guest:

0 users reading Custom planets! | 1 bot

Main - Archived forums - General SMG hacking - Custom planets! Hide post layouts | New reply


Arisotura
Posted on 10-13-12 04:11 PM (rev. 3 of 10-13-12 10:01 PM) Link | #977
In SMG games, it is a known fact that planets are objects. However, they aren't treated like the other objects.

Namely, it would be possible to create custom planets without modifying the game's code.

/ObjectData/PlanetMapDataTable.arc contains a BCSV file that holds information about all the planets in the game. The standard planets, that is. Some planets appear to be using their own class, like the rest of the objects, but for now we'll ignore those.

The BCSV file inside PlanetMapDataTable.arc (PlanetMapDataTable.bcsv) has the following fields:
* PlanetName: the name of the planet object
* LowFlag: flag indicating whether the planet has a low-res model
* MiddleFlag: flag indicating whether the planet has a 'Middle' model (mid-res?)
* BloomFlag: flag indicating whether the planet has a bloom model
* WaterFlag: flag indicating whether the planet has a water model
* IndirectFlag: flag indicating whether the planet has an 'Indirect' model (?)
* ForceLowScenarioName0 to ForceLowScenarioName7: seems to tell for which scenarios this planet will be forcefully rendered in low-res

So to make custom planets, one would make a model, convert it, pack it into a RARC, and add that RARC to the game's files. That's the tricky part, especially for adding the file. We need a replacement for Wiiscrubber. Wiiscrubber sucks.

Then they'd edit the PlanetMapDataTable. This can be done in Whitehole (BCSV editor, archive: /ObjectData/PlanetMapDataTable.arc, file: /PlanetMapDataTable/PlanetMapDataTable.bcsv). They'd add a new line, write their planet's name in PlanetName, and set all the flags to zero.


Now a little explanation on how planets are handled.

If the game finds an object whose name is listed in the PlanetMapDataTable, it'll be treated as a planet. The game renders /ObjectData/.arc where the object is.

Then there are several extra models possible: Low, Middle, Bloom, Water, Indirect. The game will use them if and only if they're present on the disc, totally ignoring the flags in PlanetMapDataTable.

Low (/ObjectData/Low.arc) will be used instead of the default model (and other extra models) when you're far away from the planet. The exact distance isn't known though (perhaps it depends on the object data).

Bloom (/ObjectData/Bloom.arc) apparently serves for bloom effects that are rendered along with the main model.

Water (/ObjectData/Water.arc) is for extra water graphics. I don't know what are the advantages of using this over having the water in the main model. Some planets use this, others have water in their main model. It is worth noting that Water models have no collision with them (the collision being part of the main model), however they have texture animations. But the main model can have texture animations too... idk.

The purpose of Middle and Indirect isn't known yet.


And guess what, this is already known. Thanks to the unorganized SMG2.5 community for totally not sharing their knowledge!

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

NWPlayer123
Posted on 10-13-12 08:19 PM (rev. 2 of 10-13-12 08:21 PM) Link | #979
I'm sorry for being too lazy to document my findings 8 months ago when it was still fresh in my mind :3
It was kinda hard since we didn't even have a wiki and I prefer to do stuff on one. Maybe once Kuribo64 gets one.
Same with other formats once I dig around.
Over this next week I'll try to do the same with the ProductMapObjDataTable

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

Arisotura
Posted on 10-13-12 09:57 PM Link | #980
I'll make the Kuribo64 wiki asap.

I hope it will get filled generously. Not something like the ObjectDB, where it is an awesome effort the first two days and then nothing because the novelty wore off and it isn't cool anymore :/


I'm sorry if I sound pissed off, but that's because I'm really pissed off. I'm not going to spread the details here because I don't want more drama.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

NWPlayer123
Posted on 10-14-12 01:59 AM Link | #1003
Would the indirect or middle things have anything to do with _____PlanetParts?

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

blank
Posted on 10-14-12 06:54 AM Link | #1004
The Indirect models of SMG2 (AquariumPlanetAIndirect, AquariumPlanetBIndirect, BattleWaterTeresaPlanetIndirect and RailMoveWaterObjIndirect) all uses indirect texturing, so there is probably some connection there.

Arisotura
Posted on 10-14-12 10:32 AM Link | #1005
Interesting to know.

Isn't indirect texturing one more crazy feature of that Wii GPU? I don't even think Whitehole's renderer supports it...

Anyway, this is like the Water models. I wonder why the parts of the model with indirect texturing are separate from the main parts...


Posted by NWPlayer123
Would the indirect or middle things have anything to do with _____PlanetParts?

Nah, xxxPlanetParts stuff is different. They're regular models.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

blank
Posted on 10-14-12 11:04 AM Link | #1008
Indirect texturing is a feature that lets the Wii use the values of one texture lookup to offset the texture coordinates of an other texture lookup. It isn't implemented in bmdview2, so I'm guessing it isn't implemented in Whitehole. Not that it's that important as most models looks fine without, but if you're interested in implementing it let me know. I got most of the indirect texturing stuff in BDL files figured out.

Arisotura
Posted on 10-14-12 11:40 AM Link | #1009
Interesting. Sounds like it's another crazy fancy feature but it can be emulated with shaders.

I'll look into it, but it isn't my main priority right now, and I don't even know about models that use it...

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Gericom
Posted on 10-14-12 02:47 PM Link | #1010
Posted by blank
Indirect texturing is a feature that lets the Wii use the values of one texture lookup to offset the texture coordinates of an other texture lookup. It isn't implemented in bmdview2, so I'm guessing it isn't implemented in Whitehole. Not that it's that important as most models looks fine without, but if you're interested in implementing it let me know. I got most of the indirect texturing stuff in BDL files figured out.

Tell me, it is maybe used in some layouts and I want to implement it.

blank
Posted on 10-14-12 04:00 PM Link | #1016
I was more thinking about indirect texturing in relation to BDL files, where and how the data is stored and such. But for indirect texturing in general look here http://libogc.devkitpro.org/gx_8h.html, specifically at the functions GX_SetTevIndirect, GX_SetIndTexOrder, GX_SetIndTexCoordScale and GX_SetIndTexMatrix.

blank
Posted on 10-17-12 09:51 AM Link | #1030
On a related note: The file ProductMapObjDataTable.bcsv in /ObjData/ProductMapObjDataTable.arc contains all the standard map objects. The file has two fields:

* ModelName: the name of the objects model
* ClassName: specifies the type of object

It might be interesting to look more into the different map object classes, as objects in the same class most likely has the same properties (same obj_args's and stuff). E.g. all map objects with ClassName RailMoveObj seems to be moving platforms, and can therefore probably be assigned a path.

MK7tester
Posted on 02-07-13 06:55 AM (rev. 2 of 02-07-13 06:55 AM) Link | #14079
I'm sorry to bump an old thread, but i'm very curious, does WaterFlag allow you to pre-model water that will have water collision in the game?

blank
Posted on 02-07-13 11:53 AM Link | #14104
No. The only planets in SMG2 with the WaterFlag set is NewOnimasuPlanet and StarCreekPlanet, and there is far more planets with water collision models.

By the way, water collision models are stored in MoveLimit.kcl files. But these MoveLimit.kcl files aren't necessarily water collision, they can also be other things such as gravity changing boundaries. I don't know exactly how the game decides what is water and what is something else, but I'm guessing it has something to do with areas.


Main - Archived forums - General SMG hacking - Custom planets! Hide post layouts | New reply

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