Register - Login
Views: 99379028
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 10:41:51 PM
Jul - SM64 Hacking (Archive) - 3D Model importation explained New poll - New thread - New reply
Next newer thread | Next older thread
RomanianGirl

Level: 16


Posts: 28/42
EXP: 19620
For next: 636

Since: 01-31-08

From: Canada

Since last post: 12.9 years
Last activity: 12.9 years

Posted on 04-27-09 12:16:28 AM Link | Quote
Alright, so a lot of people have been asking for a model importer to replace Mario’s model (Or other characters potentially) into whatever character. A lot of hackers here have repeated the same “This is not possible with current knowledge of Super Mario 64”, yet people continue to beg. Well, I’ll hopefully clear up quite a few problems with this thread. : )

First of all, you must realize the fact that Super Mario 64 is a very early 3D game, and thus polygon models were NOT designed the way they are today. Today’s models of characters in video games use a ‘skeleton’ which attaches to the mesh, and primarily deals with animating the character smoothly.


(Please note this is a skeleton I created, not exported from the game’s data)

As you can see on video games, the character’s models aren’t ‘chunked out’ as Mario’s model is (see above). The Super Mario 64 engine uses a much different animating system; polygon body parts go through a series of rotations and transitions to animate Mario jumping, running, swimming, and every other animation. This is evident when Mario has Peach’s animation. His polygonal parts begin to act as if he has Peach’s structure, and thus his polygonal body parts move as if they were Peach’s.

A potential solution to this problem is perhaps a system where you ‘distort’ the body parts to create different characters, and importing these edited vertices into the game. The problem is that the character will maintain the same height and posture as Mario.

A second problem is how the models are built. As VL-Tone explained in a post long ago, the models are made up of triangles. An issue that arises is the fact the vertices are not ‘locked’ together. What this means is you cannot ‘tell’ one vertex to move say 50+ in the y position, and expect the other 3 connecting ones to do so. This leaves ‘holes’ in the models (and since polygons are not shown inside Mario, it’s even more odd].


(Please note this also occurs when RAM values are edited during gameplay)

In addition, you must realize that new vertices cannot be created. This means you are only limited to the number Mario has (plus if there are unused ones in the ROM)

Finally, the animation is the last problem. If people were to make new characters, to avoid over work, Mario’s animation data must be retained. I don’t know too much about how editable the animation data is, but Mario’s data is so vast (hundreds for all his actions + reactions), it would literally take months to create new animation data for every move, then re-write into the ROM. If you don’t understand the diversity of Mario’s moveset, refer to my incomplete list of hex values: http://jul.rustedlogic.net/thread.php?id=2529

With this thread, I did not mean to ‘burst anyone’s bubble’. I wrote this for Messiaen, VL-Tone, and whoever else worked on this to explain to others of the difficulty. Some of my analysis may have been incorrect, and I may have missed a few points, but this gives a general idea of the difficulty involved. I’m not trying to be pessimistic, but others must think realistically.
You are welcome to post questions, opinions, and ideas.

(Please forgive grammatical/spelling errors in this post.)
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 457/621
EXP: 1135502
For next: 21617

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

Posted on 04-27-09 04:41:06 AM Link | Quote
Time: Now - Date: Today - Weather: What can be seen outside. - Mood: How it feels. Answer to the universe: 42
Thanks RomanianGirl, there's a lot of interesting information there.

But Mario does have a skeleton-like hierarchy structure in the ROM. I had to modify it for the Luigi mod. Not only the body parts polygons were strectched, but also the skeleton.

And it is possible to replace Mario's body parts considering what we know now, and stretch the skeleton to accommodate the new body parts sizes. One of the early hacks I did was replacing Mario's head with Peaches.

The main problem we have is that we have to leave the skeleton structure intact, as the animation code depends on it. We can modify the position of body part joints, but not the number and hierarchy of body parts. That's why we can't directly use the Peach model, because she doesn't have legs, and she has a pony tail. Same goes for Yoshi, which doesn't have a matching humanoid body part structure.

And as you said, we don't have enough knowledge of Mario's animation code to make any drastic changes to it's body structure.

As for the vertex problem you highlighted, it comes from the fact that vertex items in the SM64 engine also contain vertex coloring/normals and texture coordinates. That means that while two triangle could use the same vertex located at the same coodinates, they might end up using two different vertex items because each needs to have different vertex colors/normals or texture coordinates. It wouldn't be that hard to fuse vertices using the same position so that they can be moved together.


____________________
RomanianGirl

Level: 16


Posts: 29/42
EXP: 19620
For next: 636

Since: 01-31-08

From: Canada

Since last post: 12.9 years
Last activity: 12.9 years

Posted on 04-27-09 02:38:39 PM Link | Quote
Originally posted by VL-Tone
Thanks RomanianGirl, there's a lot of interesting information there.

But Mario does have a skeleton-like hierarchy structure in the ROM. I had to modify it for the Luigi mod. Not only the body parts polygons were strectched, but also the skeleton.

And it is possible to replace Mario's body parts considering what we know now, and stretch the skeleton to accommodate the new body parts sizes. One of the early hacks I did was replacing Mario's head with Peaches.

The main problem we have is that we have to leave the skeleton structure intact, as the animation code depends on it. We can modify the position of body part joints, but not the number and hierarchy of body parts. That's why we can't directly use the Peach model, because she doesn't have legs, and she has a pony tail. Same goes for Yoshi, which doesn't have a matching humanoid body part structure.

And as you said, we don't have enough knowledge of Mario's animation code to make any drastic changes to it's body structure.

As for the vertex problem you highlighted, it comes from the fact that vertex items in the SM64 engine also contain vertex coloring/normals and texture coordinates. That means that while two triangle could use the same vertex located at the same coodinates, they might end up using two different vertex items because each needs to have different vertex colors/normals or texture coordinates. It wouldn't be that hard to fuse vertices using the same position so that they can be moved together.



He does have a skeleton? I thought the skeleton in SM64 was only used during the developing phase and removed.

It's strange because I was editing the ROM around where Mario's polygon data is found, I changed a value and when the game loaded up (I don't remember exactly, forgive me), Mario's left forearm was raised in the y position during the running animation.

Fusing vertices together would definitely make a few problems easier to deal with, but the new model would only be able to have as many vertices as Mario does.

I think if this were ever to be done, two things would have to be done; block out Mario's low poly (which you've already done), and perhaps block either Mario with a hat or without, since many potential characters would not use this feature. As well, more editing would be required to keep the model the same, which I know a lot of people wouldn't like to bother with.
radorn
Random nobody
Level: 5


Posts: 3/3
EXP: 367
For next: 162

Since: 08-23-08


Since last post: 13.0 years
Last activity: 12.9 years

Posted on 05-07-09 12:40:22 AM Link | Quote
I may be terribly wrong but I think what VL-Tone means when he says there's a skeleton-like hierachy in mario is that, since the body parts are organized in a hierarchy and each part's position in any given moment (which results of the animation code) is relative to the position of it's "parent" part, it conforms a skeleton of sorts, even if it's not a skeleton in the traditional sense.
Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - 3D Model importation explained New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

31 database queries, 1 query cache hits.
Query execution time:  0.085316 seconds
Script execution time:  0.011059 seconds
Total render time:  0.096375 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 298 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 201 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 101 - Warning: unescaped & or unknown entity "&postid"
line 206 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 208 column 9 - Warning: missing <tr>
line 226 column 13 - Warning: missing <tr>
line 227 column 101 - Warning: unescaped & or unknown entity "&postid"
line 229 column 74 - Warning: <style> isn't allowed in <td> elements
line 229 column 9 - Info: <td> previously mentioned
line 229 column 138 - Warning: missing </div>
line 243 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 245 column 9 - Warning: missing <tr>
line 263 column 13 - Warning: missing <tr>
line 264 column 101 - Warning: unescaped & or unknown entity "&postid"
line 288 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 290 column 9 - Warning: missing <tr>
line 308 column 13 - Warning: missing <tr>
line 309 column 101 - Warning: unescaped & or unknown entity "&postid"
line 314 column 17 - Warning: missing <tr>
line 314 column 17 - Warning: discarding unexpected <table>
line 317 column 35 - Warning: missing <tr>
line 317 column 50 - Warning: missing </font> before </td>
line 317 column 91 - Warning: missing </font> before </table>
line 319 column 35 - Warning: missing <tr>
line 319 column 50 - Warning: missing </font> before </td>
line 320 column 37 - Warning: unescaped & or unknown entity "&id"
line 319 column 201 - Warning: missing </font> before </table>
line 321 column 17 - Warning: discarding unexpected </textarea>
line 321 column 28 - Warning: discarding unexpected </form>
line 321 column 35 - Warning: discarding unexpected </embed>
line 321 column 43 - Warning: discarding unexpected </noembed>
line 321 column 53 - Warning: discarding unexpected </noscript>
line 321 column 64 - Warning: discarding unexpected </noembed>
line 321 column 74 - Warning: discarding unexpected </embed>
line 321 column 82 - Warning: discarding unexpected </table>
line 321 column 90 - Warning: discarding unexpected </table>
line 323 column 9 - Warning: missing </font> before <table>
line 335 column 25 - Warning: discarding unexpected </font>
line 344 column 57 - Warning: discarding unexpected </font>
line 322 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 160 column 11 - Warning: <img> lacks "alt" attribute
line 161 column 22 - Warning: <img> lacks "alt" attribute
line 161 column 63 - Warning: <img> lacks "alt" attribute
line 161 column 112 - Warning: <img> lacks "alt" attribute
line 161 column 162 - Warning: <img> lacks "alt" attribute
line 162 column 11 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 183 column 748 - Warning: <img> lacks "alt" attribute
line 192 column 2133 - Warning: <img> lacks "alt" attribute
line 211 column 22 - Warning: <img> lacks "alt" attribute
line 211 column 63 - Warning: <img> lacks "alt" attribute
line 211 column 112 - Warning: <img> lacks "alt" attribute
line 211 column 162 - Warning: <img> lacks "alt" attribute
line 222 column 15 - Warning: <img> lacks "alt" attribute
line 229 column 694 - Warning: <img> lacks "alt" attribute
line 240 column 3183 - Warning: <img> lacks "alt" attribute
line 240 column 3342 - Warning: <img> lacks "alt" attribute
line 247 column 11 - Warning: <img> lacks "alt" attribute
line 248 column 22 - Warning: <img> lacks "alt" attribute
line 248 column 63 - Warning: <img> lacks "alt" attribute
line 248 column 112 - Warning: <img> lacks "alt" attribute
line 248 column 162 - Warning: <img> lacks "alt" attribute
line 249 column 11 - Warning: <img> lacks "alt" attribute
line 259 column 15 - Warning: <img> lacks "alt" attribute
line 293 column 21 - Warning: <img> lacks "alt" attribute
line 293 column 62 - Warning: <img> lacks "alt" attribute
line 293 column 111 - Warning: <img> lacks "alt" attribute
line 293 column 161 - Warning: <img> lacks "alt" attribute
line 304 column 15 - Warning: <img> lacks "alt" attribute
line 320 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 320 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 320 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 329 column 25 - Warning: <img> lacks "alt" attribute
line 334 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 314 column 17 - Warning: trimming empty <tr>
line 317 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 227 column 27 - Warning: <nobr> is not approved by W3C
line 229 column 158 - Warning: <table> proprietary attribute "height"
line 229 column 223 - Warning: <td> proprietary attribute "background"
line 229 column 319 - Warning: <td> proprietary attribute "background"
line 229 column 409 - Warning: <table> proprietary attribute "height"
line 229 column 489 - Warning: <td> proprietary attribute "background"
line 229 column 1444 - Warning: <td> proprietary attribute "background"
line 264 column 27 - Warning: <nobr> is not approved by W3C
line 309 column 27 - Warning: <nobr> is not approved by W3C
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 112 warnings and 0 errors!


The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md