Register - Login
Views: 99364385
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 02:31:34 PM
Jul - SM64 Hacking (Archive) - Toad's Tool 0.6.0 (On hiatus for an indefinite amount of time) New poll - New thread - Thread closed
Pages: 1 2 3 4 5 6 7 8 9 10 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Next newer thread | Next older thread
Polygon model importer, how soon do you want it?
Please vote or be transformed into Walluigi!
Now! Even if it means it will be buggy and limited to a single untextured model!
 
11.4%, 14 votes
I could wait a month for more features and textured model import.
 
22.8%, 28 votes
I want all the features you can cram in, even if it means waiting indefinitely!
 
56.9%, 70 votes
You shouldn't have announced anything and released it when ready!
 
4.1%, 5 votes
Me don't care!
 
4.9%, 6 votes
Multi-voting is disabled. 123 users have voted.

VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 541/621
EXP: 1135466
For next: 21653

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

Posted on 10-19-09 10:53:34 PM (last edited by VL-Tone at 10-19-09 07:54 PM) Link
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Originally posted by cooliscool

Yeah, OBJ doesn't support per vertex coloring. I could potentially "emulate" it using a color map but that would make the resulting file huge. I could add the RGBA values (8-bits each) to the file as comments which you could read in; and I eventually want to switch to VRML which supports them natively. I can also have it export combiner MUXs as comments for use in your importer. As Xdaniel said, the color combiner commands are globals, all ucodes can use them to the same extent.

The .png textures that BG makes do have their alpha channels (thus why they're PNG).

Edit: Here's a new obj file with vertex RGBAs and precompiled SETCOMBINE commands.

How to interpret them (they're formatted like any other .obj command, space delimited):




vc r g b a - vertex colors, as floats. Multiply by 255 to get 8-bit integer values. They share indices with vertices and texture coords.
cmb command - compiled color combiner (0xFC) command for the current group; stays the same for subsequent groups until the next instance.
BK doesn't use SETPRIMCOLOR, SETENVCOLOR, or SETBLENDCOLOR, combiner generation relies solely on vertex shading, texel0 and texel1.




Welcome to jul cooliscool

Thank you very much for providing this modified .obj file, I'm currently working on making TT64 use it, but I noticed some little problems with the values for the "vc" command. It seems that the second parameter is repeated twice without any spacing...


vc 1 11 1

vc 0.345098 0.3450980.345098 1
vc 0.345098 0.3450980.345098 1
vc 1 11 1
vc 0.5490196 0.54901960.5490196 1
vc 0.4705882 0.47058820.4705882 1







____________________
cooliscool
User
Level: 9


Posts: 2/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-19-09 10:56:17 PM (last edited by cooliscool at 10-19-09 08:12 PM) Link
Originally posted by VL-Tone
Originally posted by cooliscool

Yeah, OBJ doesn't support per vertex coloring. I could potentially "emulate" it using a color map but that would make the resulting file huge. I could add the RGBA values (8-bits each) to the file as comments which you could read in; and I eventually want to switch to VRML which supports them natively. I can also have it export combiner MUXs as comments for use in your importer. As Xdaniel said, the color combiner commands are globals, all ucodes can use them to the same extent.

The .png textures that BG makes do have their alpha channels (thus why they're PNG).

Edit: Here's a new obj file with vertex RGBAs and precompiled SETCOMBINE commands.

How to interpret them (they're formatted like any other .obj command, space delimited):




vc r g b a - vertex colors, as floats. Multiply by 255 to get 8-bit integer values. They share indices with vertices and texture coords.
cmb command - compiled color combiner (0xFC) command for the current group; stays the same for subsequent groups until the next instance.
BK doesn't use SETPRIMCOLOR, SETENVCOLOR, or SETBLENDCOLOR, combiner generation relies solely on vertex shading, texel0 and texel1.




Welcome to jul cooliscool

Thank you very much for providing this modified .obj file, I'm currently working on making TT64 use it, but I noticed some little problems with the values for the "vc" command. It seems that the second parameter is repeated twice without any spacing...


vc 1 11 1

vc 0.345098 0.3450980.345098 1
vc 0.345098 0.3450980.345098 1
vc 1 11 1
vc 0.5490196 0.54901960.5490196 1
vc 0.4705882 0.47058820.4705882 1








Thanks!

Yeah, I fixed that. The link in the post has been updated. Can't wait to see how it turns out. This functionality is now part of Bottles' Glasses's exporter, so if you decide to adopt it we can get all of BK's models into Mario 64.

Also, I'm not sure but you may need the G_SET|CLEARGEOMETRYMODE command as well...
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 542/621
EXP: 1135466
For next: 21653

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

Posted on 10-20-09 12:49:35 AM (last edited by VL-Tone at 10-19-09 09:51 PM) Link
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Ok, here's what works well:


The only thing is that the level seems a little darker than it should be. I got this rainbow effect on Mario again, because I used the same buggy header I was using for transparency, which causes Mario to have vertex coloring instead of normals. I still have no idea how to fix this.

Now here's what doesn't seem to work:


While Gruntilda is improved because of the eyes, her whole face and hat is supposed to be colored green.


While the setcombine commands seems to make a difference in these two cases (before only the top texture would appear), the textures don't fade into each other like they should. Note that the textures now use their alpha channel.

Now I don't know who could help me here, but here's the "header" i'm using for each triangle group:

E7 00 00 00 00 00 00 00 

BA 00 14 02 00 10 00 00
B9 00 03 1D C8 11 30 78
B9 00 02 01 00 00 00 00
F8 00 00 00 00 00 00 FF
BC 00 00 08 0E 49 F2 B7
B7 00 00 00 00 01 00 00
FC 12 98 04 3F 15 FF FF
B6 00 00 00 00 02 20 00
BB 00 00 01 FF FF FF FF
F5 10 10 00 00 01 40 50
F2 00 00 00 00 00 C0 7C
FD 10 00 00 09 00 58 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
E8 00 00 00 00 00 00 00
FD 10 00 00 07 00 00 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
03 86 00 10 07 02 68 00
03 88 00 10 07 02 68 04
04 D0 00 00 07 02 68 08
BF 00 00 00 00 00 0A 14
BF 00 00 00 00 1E 28 00
BF 00 00 00 00 32 3C 46
....



Can anyone tell me what I'm doing wrong or maybe give me a better header to use?

____________________
Kenshi
Member
Level: 21


Posts: 44/75
EXP: 47435
For next: 2508

Since: 09-15-07

From: NY

Since last post: 6.9 years
Last activity: 6.2 years

Posted on 10-20-09 01:24:19 AM (last edited by mortalkenshi2 at 10-19-09 10:25 PM) Link
After seeing where this thread has gone I had to stop lurking on the forums and make a post.

I'm pretty sure VL-Tone made a thread awhile back about water hexing. (It was named super geeky hex hacking stuff + Geo or something.) So I'm sure its possible to do. A couple things, Good job on this, SM64 hacking has come a long way since I last touched a hex editor. [ -7th Grade- ]

Now Don't mean to shoot a bunch of questions at you guys but this a list of questions I have, Feel free to answer any.

I remember reading about extra level slots in SM64. In Rstewarts collision editor that was in like Super Alpha Stage he had some extra levels listed there as well. Are those levels usable in game, and are we able to extend the number of stars that you can put in the game in total? (like SM64 DS) I think one cool thing would be to take DK64 levels and put them in here. DiD you recreate that level or did you get the model of it? (Probably got the model but worth asking)

Messiaen, your hack had the ability to switch between Mario & Luigi During the game select screen. Is it possible to like hit a cap and have the models switch or something mid game? Or maybe Your certain characters in certain levels and not others.

(that sounds confusing but for example I would be mario in Bob Omb battlefield and then Luigi in whomps fortress.)

Finally, I haven't seen it yet and I cannot music hack but if you ever get around to it, I'd like to see any Ocarina of Time Level put into this with some music from it as well (Windmill Music!)

Edit: I also got that same effect awhile back however Mario was lighter rainbow and you couldn't really see his textures because those were covered in the rainbow as well. (Eyes nose mustache mouth Hair)

Edit 2 : VL, Is that first screenshot where you said this is how its supposed to look from TT64? Or a different source?
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 543/621
EXP: 1135466
For next: 21653

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

Posted on 10-20-09 01:53:37 AM Link
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Originally posted by mortalkenshi2
I'm pretty sure VL-Tone made a thread awhile back about water hexing. (It was named super geeky hex hacking stuff + Geo or something.)

I'm still hesitant about adding water support in v0.6.0, I'll keep it as one of the last things I'll add, so if I don't have time before the end of the year, I'll release v0.6.0b, and water in 0.6.1 or 0.6.2.

Originally posted by mortalkenshi2
I remember reading about extra level slots in SM64. In Rstewarts collision editor that was in like Super Alpha Stage he had some extra levels listed there as well. Are those levels usable in game, and are we able to extend the number of stars that you can put in the game in total? (like SM64 DS) I think one cool thing would be to take DK64 levels and put them in here. DiD you recreate that level or did you get the model of it? (Probably got the model but worth asking)

The level slots in the level importer have nothing to do with the game's level slots. There are indeed a few unused level IDs in the game, but we can't use them yet because we still don't know where are some the basic level parameters. TT64's importer level slots are associated with existing level IDs (that's why you can only replace existing levels).

Originally posted by mortalkenshi2
Messiaen, your hack had the ability to switch between Mario & Luigi During the game select screen. Is it possible to like hit a cap and have the models switch or something mid game? Or maybe Your certain characters in certain levels and not others.

I'm pretty sure messiaen mentioned that switching from Mario to Luigi in game would cause problems.

Originally posted by mortalkenshi2
VL, Is that first screenshot where you said this is how its supposed to look from TT64? Or a different source?

Are you talking about this screenshot http://img26.imageshack.us/img26/5456/clipboard01jcg.jpg? This is from Bottle's Glasses, a nice tool by cooliscool that enables viewing and exporting BK levels to the .obj format, amongst other things.

____________________
cooliscool
User
Level: 9


Posts: 3/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-20-09 02:29:15 AM (last edited by Metal_Man88 at 10-20-09 01:48 AM) Link
Originally posted by VL-Tone
GIGANTIC BLOCK OF IMAGES THAT DON'T NEED TO BE REPEATED SNIPPED -MM88

Now I don't know who could help me here, but here's the "header" i'm using for each triangle group:

E7 00 00 00 00 00 00 00 

BA 00 14 02 00 10 00 00
B9 00 03 1D C8 11 30 78
B9 00 02 01 00 00 00 00
F8 00 00 00 00 00 00 FF
BC 00 00 08 0E 49 F2 B7
B7 00 00 00 00 01 00 00
FC 12 98 04 3F 15 FF FF
B6 00 00 00 00 02 20 00
BB 00 00 01 FF FF FF FF
F5 10 10 00 00 01 40 50
F2 00 00 00 00 00 C0 7C
FD 10 00 00 09 00 58 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
E8 00 00 00 00 00 00 00
FD 10 00 00 07 00 00 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
03 86 00 10 07 02 68 00
03 88 00 10 07 02 68 04
04 D0 00 00 07 02 68 08
BF 00 00 00 00 00 0A 14
BF 00 00 00 00 1E 28 00
BF 00 00 00 00 32 3C 46
....



Can anyone tell me what I'm doing wrong or maybe give me a better header to use?


SETGEOMETRYMODE (0xB7) disables or enables lighting. Enabling lighting makes the RGBAs act as normals instead of colors, and vice versa.




CMDHigh = the last 32-bits of the command data
MSET = ((CMDHigh And &HFFFFFF) << 8) >> 8
dim EnableLighting as boolean = (MSET And &H20000) > 0



As far as the alpha blending goes, all of that is set by SETOTHERMODE_L (0xB9). In your screenshots it looks like no blending is occuring - only alpha testing (full alpha or no alpha). You can try removing this command from your header, so it'll default to SRC_ALPHA, ONE_MINUS_SRC_ALPHA, with alpha blending enabled.

In the mean time, I'll work on a version of my exporter that exports the geometrymode commands and setothermode commands. I understand this isn't a permanent fix (though it will get all BK models in to Mario), but it may help you understand better how to accomplish this in the scheme of things.
Kenshi
Member
Level: 21


Posts: 45/75
EXP: 47435
For next: 2508

Since: 09-15-07

From: NY

Since last post: 6.9 years
Last activity: 6.2 years

Posted on 10-20-09 11:49:05 PM Link
VL you running Bottles Glasses under dual booting using an intel mac?

Also, What do you use for screen capturing now, or do you capture under the windows partition?

[I use a PPC mac with leopard but I have an intel Mac so thats why Im wondering]
cooliscool
User
Level: 9


Posts: 5/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-21-09 11:38:35 AM Link
Originally posted by mortalkenshi2
VL you running Bottles Glasses under dual booting using an intel mac?

Also, What do you use for screen capturing now, or do you capture under the windows partition?

[I use a PPC mac with leopard but I have an intel Mac so thats why Im wondering]


I don't think he uses it. The screenshot he posted of it was one I took quite a long time ago, from a very old version of BG (there's some rendering errors in it). This is how it should look:

http://img94.imageshack.us/img94/6345/clipboard01lc.jpg

http://img40.imageshack.us/img40/8307/clipboard02cm.jpg
cooliscool
User
Level: 9


Posts: 6/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-21-09 12:09:56 PM (last edited by cooliscool at 10-21-09 11:21 AM) Link
Originally posted by VL-Tone

Now I don't know who could help me here, but here's the "header" i'm using for each triangle group:

E7 00 00 00 00 00 00 00 

BA 00 14 02 00 10 00 00
B9 00 03 1D C8 11 30 78
B9 00 02 01 00 00 00 00
F8 00 00 00 00 00 00 FF
BC 00 00 08 0E 49 F2 B7
B7 00 00 00 00 01 00 00
FC 12 98 04 3F 15 FF FF
B6 00 00 00 00 02 20 00
BB 00 00 01 FF FF FF FF
F5 10 10 00 00 01 40 50
F2 00 00 00 00 00 C0 7C
FD 10 00 00 09 00 58 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
E8 00 00 00 00 00 00 00
FD 10 00 00 07 00 00 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
03 86 00 10 07 02 68 00
03 88 00 10 07 02 68 04
04 D0 00 00 07 02 68 08
BF 00 00 00 00 00 0A 14
BF 00 00 00 00 1E 28 00
BF 00 00 00 00 32 3C 46
....



Can anyone tell me what I'm doing wrong or maybe give me a better header to use?





'GEO MODES
Public G_CULL_FRONT As Byte = &H2000
Public G_CULL_BACK As Byte = &H4000
Public G_CULL_BOTH As Byte = &H6000
Public G_FOG As Byte = &H10000
Public G_LIGHTING As Byte = &H20000
Public G_TEXTURE_GEN As Byte = &H40000
Public G_TEXTURE_GEN_LINEAR As Byte = &H80000
Public G_LOD As Byte = &H100000
Public G_SHADING_SMOOTH As Byte = &H200000
Public G_CLIPPING As Byte = &H800000



It looks like you're setting the geometry mode, then clearing it (0xB7 and 0xB6 respectively). Not sure of the point in that, you should probably clear then set. You shouldn't need the second SETOTHERMODE_L call (MDSFT = 0x02 (ZSRCSEL), not sure how it works), either. MDSFT = 0x03 (RENDERMODE) sets the current render mode. Try this:



E7 00 00 00 00 00 00 00 

BA 00 14 02 00 10 00 00
B9 00 03 1C C8 11 20 78
F8 00 00 00 00 00 00 FF
BC 00 00 08 0E 49 F2 B7
B6 00 00 00 00 1F 32 04
B7 00 00 00 00 08 22 04
FC 12 98 04 3F 15 FF FF
BB 00 00 01 FF FF FF FF
F5 10 10 00 00 01 40 50
F2 00 00 00 00 00 C0 7C
FD 10 00 00 09 00 58 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
E8 00 00 00 00 00 00 00
FD 10 00 00 07 00 00 00
E6 00 00 00 00 00 00 00
F3 00 00 00 07 3F F1 00
03 86 00 10 07 02 68 00
03 88 00 10 07 02 68 04
04 D0 00 00 07 02 68 08
BF 00 00 00 00 00 0A 14
BF 00 00 00 00 1E 28 00
BF 00 00 00 00 32 3C 46
....



That will disable lighting (so vertex colors are sent as colors), and enable back face culling. The new SETOTHERMODE_L command will force blending (FORCE_BL = 0x00004000) and disable alpha testing (CVG_X_ALPHA = 0x00001000). These are not fixes, you'll need to compute them dynamically for any sort of universality, as you surely well know. An interesting sidenote, both BK and Mario use F3DEX, and from what I can tell pretty much identically.

Edit: What is the purpose of drawing 3 triangles (the last 0xBF commands), for every group? Also, do you insert an ENDDL (0xB8 00 00 00 00 00 00 00) at the end of each list? I find it strange that paramaters set when drawing the level would carry over to Mario.




messiaen
Catgirl
Level: 68


Posts: 675/1085
EXP: 2593951
For next: 134849

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 10-21-09 02:20:11 PM Link
Mario actually uses Fast3D, AFAIR the only other game which uses the same early microcode variant is PilotWings. RDP commands are probably the same as F3DEX, however one of the limitations is that in F3D the vertex cache can only hold 16 vertices at once.

VL-Tone, nice progress with TT64! Do you still have plans to integrate the Text Wrangler into the interface? I ask because one thing I want to try soon is to move the text/level name/acts table to extended memory so it can be expanded freely.
cooliscool
User
Level: 9


Posts: 7/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-21-09 02:24:02 PM Link
Originally posted by messiaen
Mario actually uses Fast3D, AFAIR the only other game which uses the same early microcode variant is PilotWings. RDP commands are probably the same as F3DEX, however one of the limitations is that in F3D the vertex cache can only hold 16 vertices at once.


Ouch. F3DEX can cache 64 vertices. :o
xdaniel
980
Level: 64


Posts: 18/982
EXP: 2151468
For next: 62629

Since: 12-04-08

Pronouns: he/they
From: Germany

Since last post: 16 days
Last activity: 7 hours

Posted on 10-21-09 03:52:13 PM Link
At least Wave Race 64's non-Rumble versions (that one's F3DEX 1.23) and that early Shogi game use Fast3D as well.

Btw, a thought I've just had, at least in regards to porting levels from other N64 games to Mario 64: What about using the source game's original Display Lists as far as possible, converting the commands and syntax to Fast3D? The one big problem I'm seeing here is the differences in vertex cache size, as messiaen mentioned, with VTX and TRIx commands having to be recalculated somehow.

Collision data might also be a problem (a smaller one), but otherwise this could end up being way more accurate than exporting from an N64 game, via a Wavefront object, and then reimporting it in a different game.


____________________
cu xdaniel
Emoluvjd2
Member
Level: 20


Posts: 1/70
EXP: 39565
For next: 2874

Since: 10-24-09


Since last post: 4.1 years
Last activity: 2.6 years

Posted on 10-24-09 07:07:17 PM (last edited by Emoluvjd2 at 10-24-09 05:15 PM) Link
VL - Tone in a future version of Toads Tool 64 would it possible to implement a music importer?
VideoGuy
Member
Level: 22


Posts: 56/84
EXP: 52952
For next: 5398

Since: 05-10-09


Since last post: 12.0 years
Last activity: 9.9 years

Posted on 10-24-09 07:28:54 PM Link
Chances are MML2M64 will remain a separate program, just like it is for SMW hacking. And it works well enough on its own, so merging them would only cause problems.
Emoluvjd2
Member
Level: 20


Posts: 2/70
EXP: 39565
For next: 2874

Since: 10-24-09


Since last post: 4.1 years
Last activity: 2.6 years

Posted on 10-24-09 08:17:52 PM Link
Originally posted by VideoGuy
Chances are MML2M64 will remain a separate program, just like it is for SMW hacking. And it works well enough on its own, so merging them would only cause problems.

The thing is though, the program doesn't work on my computer. I know how Toads Tool 64 is supposed to have a user friendly interface so I just thought that it might work in Toads Tool.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 3568/12211
EXP: 99232278
For next: 641293

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 10-24-09 08:53:26 PM Link

Time/Date

&date&

Posts

&numposts&

Days Here

&numdays&

Level

&level&
Metal_Man88
Local Moderator
As harsh as it may sound, Toads Tool is made to edit SM64's graphics and maybe its text. Not its music--not yet, at least.

The major focus right now is on polygons and custom level insertion--even if they wanted to add sound, they would have to drop a lot of other things to do that.

Not to mention VL-Tone doesn't have the greatest amount of time in the world to do everything in TT.

So if you could stop bugging them about an irrelevant feature already covered by another program that you can ask about in its own topic instead of here before I have to start deleting your posts, that'd be nice.

:p

____________________
Original Layout © Tobias Kelmandia
Emoluvjd2
Member
Level: 20


Posts: 3/70
EXP: 39565
For next: 2874

Since: 10-24-09


Since last post: 4.1 years
Last activity: 2.6 years

Posted on 10-24-09 09:19:40 PM Link
Originally posted by Metal_Man88
As harsh as it may sound, Toads Tool is made to edit SM64's graphics and maybe its text. Not its music--not yet, at least.

The major focus right now is on polygons and custom level insertion--even if they wanted to add sound, they would have to drop a lot of other things to do that.

Not to mention VL-Tone doesn't have the greatest amount of time in the world to do everything in TT.

So if you could stop bugging them about an irrelevant feature already covered by another program that you can ask about in its own topic instead of here before I have to start deleting your posts, that'd be nice.

:p

I see what your saying. It's not harsh and I see what you mean. I wont ask about it again.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 544/621
EXP: 1135466
For next: 21653

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 1.2 years

Posted on 10-25-09 07:57:58 PM (last edited by VL-Tone at 10-25-09 08:02 PM) Link
Time: One second ago - Date: Tomorrow - Weather: Sunshine - Mood: Moody Answer to the universe: Yes
Sorry guys for the time it took to reply, but like you may know, I work a lot during the week so I mainly post during the weekend (my days off are sunday and monday).


Originally posted by cooliscool


It looks like you're setting the geometry mode, then clearing it (0xB7 and 0xB6 respectively). Not sure of the point in that, you should probably clear then set. You shouldn't need the second SETOTHERMODE_L call (MDSFT = 0x02 (ZSRCSEL), not sure how it works), either. MDSFT = 0x03 (RENDERMODE) sets the current render mode. Try this:

...

That will disable lighting (so vertex colors are sent as colors), and enable back face culling. The new SETOTHERMODE_L command will force blending (FORCE_BL = 0x00004000) and disable alpha testing (CVG_X_ALPHA = 0x00001000). These are not fixes, you'll need to compute them dynamically for any sort of universality, as you surely well know. An interesting sidenote, both BK and Mario use F3DEX, and from what I can tell pretty much identically.

Edit: What is the purpose of drawing 3 triangles (the last 0xBF commands), for every group? Also, do you insert an ENDDL (0xB8 00 00 00 00 00 00 00) at the end of each list? I find it strange that paramaters set when drawing the level would carry over to Mario.



When I started reverse-engineering SM64, I didn't know that the display lists commands were already documented (I didn't know that emulators were using them for emulation), so I did a lot of this reverse-engineering by hand, trial-and-error and observation of the data structure. I did eventually got some hints from some more knowledgeable people to help me fix some issues, but since it worked in a "good enough" way, I never studied Fast3D commands thoroughly.

If there are some things that are illogical in my header, you can blame Nintendo as it was ripped from some object in the game (It's possible though that I made a mistake while ripping or that I did some modifications without knowing what I was doing). I never completely understood all steps necessary to "initialize" a display list sequence. Despite having built TT64, you three guys (cooliscool, xdaniel and messiaen) seem to know a lot more than me about RDP commands.

As for having only 3 triangles at the end, it's only because I didn't paste the whole thing (hence the "..." at the end) there are more triangles than that in the real thing.

I tried your header and while it did fix the "level too dark" problem, it broke Gruntilda's eyes texture transparency effect so it ends up looking like in the video.

Edit:

Now I get it... obviously as you explained, the SETOTHERMODE_L (0xB9) command you provided disables alpha testing so it was normal that Gruntilda's eyes didn't use the alpha channel as expected.

The thing is, the blending still doesn't occur, even worse the top texture completely takes over.

Here's with my header (fixed the rainbow Mario and the darkness problem):

Here's with yours.


In my header, the transition between the two textures is sudden, but at least some transition is happening.

Another thing I noticed using my header, when you pause the game, you can see where all the areas where blending is supposed to be happening, some gradual redrawing of one texture over the other, until the cut-off point (it happens in 1/3 of a second).

As for Guntilda's face not being colored green, it seems that it's an emulator problem with SixtyForce (Mac emulator) where it doesn't seem to apply vertex coloring everywhere for some reason. Mupen64 for Mac (which is an old port) has the same problem as both use the same gIN64 plug-in.

In PJ64, it does work correctly as you can see here.



Note that in PJ64 the blending doesn't occur either (though if I activate the "Force alpha blending" option, I do get the expected blending effect on the ground, but the rest of the level ends up being all translucent).

One last thing, I fixed the rainbow Mario problem by inserting the following commands before the 0xB8 command:


BB 00 00 00 FF FF FF FF 

E7 00 00 00 00 00 00 00
BA 00 14 02 00 00 00 00
B9 00 03 1D 00 44 30 78
B6 00 00 00 00 01 00 00
FC FF FF FF FF FE 79 3C
B7 00 00 00 00 02 20 00



These are ripped from an existing model in SM64 (Red Mesh Wall).

Originally posted by messiaen

VL-Tone, nice progress with TT64! Do you still have plans to integrate the Text Wrangler into the interface? I ask because one thing I want to try soon is to move the text/level name/acts table to extended memory so it can be expanded freely.



The Text Wrangler code and interface has already been moved into TT64, but the actual integration with the rest of the interface will probably be done in version 0.6.5 or something.

____________________
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 3574/12211
EXP: 99232278
For next: 641293

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 10-25-09 11:50:43 PM Link

Time/Date

&date&

Posts

&numposts&

Days Here

&numdays&

Level

&level&
Metal_Man88
Local Moderator
You missed them figuring out more about the N64's modeling format by attempting to import Banjo Kazooie levels.

Needless to say, it can do many things, importing Banjo Kazooie levels just being one way to play around with SM64's levels.

____________________
Original Layout © Tobias Kelmandia
cooliscool
User
Level: 9


Posts: 9/11
EXP: 2475
For next: 687

Since: 09-15-09


Since last post: 12.5 years
Last activity: 12.3 years

Posted on 10-26-09 12:37:13 PM (last edited by cooliscool at 10-26-09 09:39 AM) Link
VL-Tone, here's a new obj (this time it's Mumbo's Mountain, which uses similar blending techniques) with all necessary RDP commands exported (SET|CLEARGEOMETRYMODE, SETCOMBINE, SETOTHERMODE_H|L). This should fix everything up nicely, while giving you a good view of what to do in the future. Just inject them into your display list as they appear.

If you'd like me to add the unpacked bits (and their functions) too, just let me know.


SETGEOMETRYMODE = gset

CLEARGEOMETRYMODE = gclear
SETOTHERMODE_H = omh
SETOTHERMODE_L = oml



Mumbo's Mountain .obj

And here's a build of Bottles' Glasses which exports all of this data in its .obj files:

Bottles' Glasses TT64 mod
Pages: 1 2 3 4 5 6 7 8 9 10 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - Toad's Tool 0.6.0 (On hiatus for an indefinite amount of time) New poll - New thread - Thread closed


Rusted Logic

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

41 database queries, 11 query cache hits.
Query execution time:  0.153124 seconds
Script execution time:  0.125883 seconds
Total render time:  0.279007 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 300 - 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 233 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 94 - Warning: unescaped & or unknown entity "&page"
line 149 column 126 - Warning: unescaped & or unknown entity "&page"
line 149 column 158 - Warning: unescaped & or unknown entity "&page"
line 149 column 190 - Warning: unescaped & or unknown entity "&page"
line 149 column 222 - Warning: unescaped & or unknown entity "&page"
line 149 column 254 - Warning: unescaped & or unknown entity "&page"
line 149 column 286 - Warning: unescaped & or unknown entity "&page"
line 149 column 318 - Warning: unescaped & or unknown entity "&page"
line 149 column 350 - Warning: unescaped & or unknown entity "&page"
line 149 column 382 - Warning: unescaped & or unknown entity "&page"
line 149 column 419 - Warning: unescaped & or unknown entity "&page"
line 149 column 453 - Warning: unescaped & or unknown entity "&page"
line 149 column 487 - Warning: unescaped & or unknown entity "&page"
line 149 column 521 - Warning: unescaped & or unknown entity "&page"
line 149 column 558 - Warning: unescaped & or unknown entity "&page"
line 149 column 592 - Warning: unescaped & or unknown entity "&page"
line 149 column 626 - Warning: unescaped & or unknown entity "&page"
line 149 column 660 - Warning: unescaped & or unknown entity "&page"
line 149 column 694 - Warning: unescaped & or unknown entity "&page"
line 149 column 728 - Warning: unescaped & or unknown entity "&page"
line 149 column 762 - Warning: unescaped & or unknown entity "&page"
line 149 column 796 - Warning: unescaped & or unknown entity "&page"
line 149 column 830 - Warning: unescaped & or unknown entity "&page"
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 867 - Warning: missing </font> before </table>
line 152 column 73 - Warning: missing </b> before </td>
line 155 column 210 - Warning: discarding unexpected </a>
line 156 column 131 - Warning: missing <tr>
line 159 column 195 - Warning: discarding unexpected </a>
line 160 column 133 - Warning: missing <tr>
line 163 column 209 - Warning: discarding unexpected </a>
line 164 column 132 - Warning: missing <tr>
line 167 column 195 - Warning: discarding unexpected </a>
line 168 column 133 - Warning: missing <tr>
line 171 column 144 - Warning: discarding unexpected </a>
line 172 column 131 - Warning: missing <tr>
line 175 column 66 - Warning: missing </font> before </td>
line 175 column 140 - Warning: plain text isn't allowed in <tr> elements
line 175 column 25 - Info: <tr> previously mentioned
line 182 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 184 column 9 - Warning: missing <tr>
line 202 column 13 - Warning: missing <tr>
line 205 column 74 - Warning: <style> isn't allowed in <td> elements
line 205 column 9 - Info: <td> previously mentioned
line 205 column 1502 - Warning: missing </font> before <blockquote>
line 205 column 1581 - Warning: inserting implicit <font>
line 205 column 1581 - Warning: missing </font> before <hr>
line 206 column 1 - Warning: inserting implicit <font>
line 206 column 1 - Warning: missing </font> before <blockquote>
line 214 column 2508 - Warning: inserting implicit <font>
line 214 column 2508 - Warning: missing </font> before <hr>
line 219 column 1 - Warning: inserting implicit <font>
line 219 column 1 - Warning: missing </font> before <blockquote>
line 224 column 3368 - Warning: inserting implicit <font>
line 224 column 3368 - Warning: missing </font> before <hr>
line 230 column 1 - Warning: inserting implicit <font>
line 205 column 138 - Warning: missing </div>
line 236 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 238 column 9 - Warning: missing <tr>
line 256 column 13 - Warning: missing <tr>
line 297 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 299 column 9 - Warning: missing <tr>
line 317 column 13 - Warning: missing <tr>
line 320 column 74 - Warning: <style> isn't allowed in <td> elements
line 320 column 9 - Info: <td> previously mentioned
line 320 column 1502 - Warning: missing </font> before <blockquote>
line 334 column 2814 - Warning: inserting implicit <font>
line 334 column 2814 - Warning: missing </font> before <hr>
line 360 column 1 - Warning: inserting implicit <font>
line 320 column 138 - Warning: missing </div>
line 364 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 366 column 9 - Warning: missing <tr>
line 384 column 13 - Warning: missing <tr>
line 406 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 408 column 9 - Warning: missing <tr>
line 426 column 13 - Warning: missing <tr>
line 429 column 74 - Warning: <style> isn't allowed in <td> elements
line 429 column 9 - Info: <td> previously mentioned
line 429 column 1502 - Warning: missing </font> before <blockquote>
line 429 column 1581 - Warning: inserting implicit <font>
line 429 column 1581 - Warning: missing </font> before <hr>
line 429 column 1651 - Warning: inserting implicit <font>
line 429 column 1651 - Warning: missing </font> before <hr>
line 429 column 1790 - Warning: inserting implicit <font>
line 430 column 1 - Warning: inserting implicit <font>
line 430 column 1 - Warning: missing </font> before <blockquote>
line 432 column 2035 - Warning: inserting implicit <font>
line 432 column 2035 - Warning: missing </font> before <hr>
line 432 column 2105 - Warning: inserting implicit <font>
line 432 column 2105 - Warning: missing </font> before <hr>
line 433 column 1 - Warning: inserting implicit <font>
line 433 column 1 - Warning: missing </font> before <blockquote>
line 435 column 2971 - Warning: inserting implicit <font>
line 435 column 2971 - Warning: missing </font> before <hr>
line 435 column 3101 - Warning: inserting implicit <font>
line 435 column 3101 - Warning: missing </font> before <hr>
line 435 column 3294 - Warning: inserting implicit <font>
line 436 column 1 - Warning: inserting implicit <font>
line 436 column 1 - Warning: missing </font> before <blockquote>
line 438 column 3430 - Warning: inserting implicit <font>
line 438 column 3430 - Warning: missing </font> before <hr>
line 438 column 3500 - Warning: inserting implicit <font>
line 438 column 3500 - Warning: missing </font> before <hr>
line 439 column 1 - Warning: inserting implicit <font>
line 429 column 138 - Warning: missing </div>
line 442 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 444 column 9 - Warning: missing <tr>
line 462 column 13 - Warning: missing <tr>
line 501 column 1464 - Warning: unescaped & or unknown entity "&HFFFFFF"
line 502 column 1536 - Warning: unescaped & or unknown entity "&H20000"
line 510 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 512 column 9 - Warning: missing <tr>
line 530 column 13 - Warning: missing <tr>
line 540 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 542 column 9 - Warning: missing <tr>
line 560 column 13 - Warning: missing <tr>
line 576 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 578 column 9 - Warning: missing <tr>
line 596 column 13 - Warning: missing <tr>
line 632 column 1228 - Warning: unescaped & or unknown entity "&H2000"
line 633 column 1271 - Warning: unescaped & or unknown entity "&H4000"
line 634 column 1314 - Warning: unescaped & or unknown entity "&H6000"
line 635 column 1351 - Warning: unescaped & or unknown entity "&H10000"
line 636 column 1394 - Warning: unescaped & or unknown entity "&H20000"
line 637 column 1440 - Warning: unescaped & or unknown entity "&H40000"
line 638 column 1493 - Warning: unescaped & or unknown entity "&H80000"
line 639 column 1531 - Warning: unescaped & or unknown entity "&H100000"
line 640 column 1581 - Warning: unescaped & or unknown entity "&H200000"
line 641 column 1625 - Warning: unescaped & or unknown entity "&H800000"
line 683 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 685 column 9 - Warning: missing <tr>
line 703 column 13 - Warning: missing <tr>
line 711 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 713 column 9 - Warning: missing <tr>
line 731 column 13 - Warning: missing <tr>
line 739 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 741 column 9 - Warning: missing <tr>
line 759 column 13 - Warning: missing <tr>
line 771 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 773 column 9 - Warning: missing <tr>
line 791 column 13 - Warning: missing <tr>
line 797 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 799 column 9 - Warning: missing <tr>
line 817 column 13 - Warning: missing <tr>
line 823 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 825 column 9 - Warning: missing <tr>
line 843 column 13 - Warning: missing <tr>
line 846 column 159 - Warning: unescaped & or unknown entity "&pictureid"
line 846 column 74 - Warning: missing </div>
line 850 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 852 column 9 - Warning: missing <tr>
line 870 column 13 - Warning: missing <tr>
line 873 column 74 - Warning: <style> isn't allowed in <td> elements
line 873 column 9 - Info: <td> previously mentioned
line 873 column 961 - Error: <z> is not recognized!
line 873 column 961 - Warning: discarding unexpected <z>
line 873 column 964 - Warning: unescaped & or unknown entity "&date"
line 873 column 970 - Warning: discarding unexpected </z>
line 873 column 996 - Error: <z> is not recognized!
line 873 column 996 - Warning: discarding unexpected <z>
line 873 column 999 - Warning: unescaped & or unknown entity "&numposts"
line 873 column 1009 - Warning: discarding unexpected </z>
line 873 column 1039 - Error: <z> is not recognized!
line 873 column 1039 - Warning: discarding unexpected <z>
line 873 column 1042 - Warning: unescaped & or unknown entity "&numdays"
line 873 column 1051 - Warning: discarding unexpected </z>
line 873 column 1077 - Error: <z> is not recognized!
line 873 column 1077 - Warning: discarding unexpected <z>
line 873 column 1080 - Warning: unescaped & or unknown entity "&level"
line 873 column 1087 - Warning: discarding unexpected </z>
line 884 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 886 column 9 - Warning: missing <tr>
line 904 column 13 - Warning: missing <tr>
line 907 column 159 - Warning: unescaped & or unknown entity "&pictureid"
line 907 column 74 - Warning: missing </div>
line 919 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 921 column 9 - Warning: missing <tr>
line 939 column 13 - Warning: missing <tr>
line 942 column 74 - Warning: <style> isn't allowed in <td> elements
line 942 column 9 - Info: <td> previously mentioned
line 942 column 1502 - Warning: missing </font> before <blockquote>
line 945 column 1759 - Warning: inserting implicit <font>
line 945 column 1759 - Warning: missing </font> before <hr>
line 946 column 1 - Warning: inserting implicit <font>
line 946 column 1 - Warning: missing </font> before <hr>
line 954 column 2910 - Warning: inserting implicit <font>
line 955 column 1 - Warning: inserting implicit <font>
line 955 column 1 - Warning: missing </font> before <blockquote>
line 989 column 6012 - Warning: inserting implicit <font>
line 989 column 6012 - Warning: missing </font> before <hr>
line 996 column 1 - Warning: inserting implicit <font>
line 996 column 1 - Warning: missing </font> before <blockquote>
line 999 column 6341 - Warning: inserting implicit <font>
line 999 column 6341 - Warning: missing </font> before <hr>
line 1000 column 1 - Warning: inserting implicit <font>
line 1000 column 1 - Warning: missing </font> before <hr>
line 1001 column 1 - Warning: inserting implicit <font>
line 942 column 138 - Warning: missing </div>
line 1005 column 9 - Warning: <div> isn't allowed in <table> elements
line 178 column 17 - Info: <table> previously mentioned
line 1007 column 9 - Warning: missing <tr>
line 1025 column 13 - Warning: missing <tr>
line 1028 column 74 - Warning: <style> isn't allowed in <td> elements
line 1028 column 9 - Info: <td> previously mentioned
line 1028 column 961 - Error: <z> is not recognized!
line 1028 column 961 - Warning: discarding unexpected <z>
line 1028 column 964 - Warning: unescaped & or unknown entity "&date"
line 1028 column 970 - Warning: discarding unexpected </z>
line 1028 column 996 - Error: <z> is not recognized!
Tidy found 562 warnings and 8 errors! Not all warnings/errors were shown.

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