Specular and Fresnel in F3DEX3 N64 Microcode

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 123

  • @lilnoobito
    @lilnoobito 10 месяцев назад +46

    Seeing these graphical techniques being performed on real hardware feels like a promise fulfilled.

  • @so-vp2qh
    @so-vp2qh 10 месяцев назад +12

    This seems to be pulling off tricks commonly seen on the PlayStation 2/Xbox (such as specular and bump mapping), which is crazy impressive.

    • @applebottomjames
      @applebottomjames 9 месяцев назад +3

      bump mapping on PS2 was an extreme rarity even, to see any type of form of it running on an N64 is wild to me

  • @Rihcterwilker
    @Rihcterwilker 10 месяцев назад +14

    Nothing better to show lighting effects than the zelda 64 day-night cycle. It always felt so warm.

    • @Sauraen
      @Sauraen  10 месяцев назад +8

      OoT's environment system is very advanced for its time!

  • @kentonm
    @kentonm 10 месяцев назад +77

    man I love your technical breakdowns. the specular highlight on the water from the sunset looks so nice.

  • @wiskimike
    @wiskimike 10 месяцев назад +6

    Imagine seeing this back in 1998 looking over lake hylia 🤩🥳

  • @OneSaile
    @OneSaile 10 месяцев назад +9

    It has been almost 10yrs that i have first wondered what the advancements of software and math optimizations could bring to a hardware as old as the N64, my prayers are finally being answered

  • @Banzeken
    @Banzeken 10 месяцев назад +13

    ”Fresnel and light-to-alpha for bump mapping” Holy sh*t, someone actually pulled off Bump Mapping on N64! I don’t even care if it’s done per vertex or per pixel, it’s still wild to see it in action.

  • @jtown2909
    @jtown2909 10 месяцев назад +142

    wow, crazy how you’re able to make n64 graphics look better than some of the newer pokemon games, keep up the good work man :)

    • @Sauraen
      @Sauraen  10 месяцев назад +42

      😆

    • @jonathogm
      @jonathogm 10 месяцев назад +19

      That's doing a disservice to N64 graphics 😂

    • @dannyboots
      @dannyboots 9 месяцев назад

      Lawl

  • @vladimirchizhov3260
    @vladimirchizhov3260 10 месяцев назад +9

    Jesus Christ, N64 was GREATLY underutilized. Awesome stuff!

  • @Psychx_
    @Psychx_ 10 месяцев назад +38

    This is amazing! To think that such old hardware would even be cabable of this. SGI and Nintendo made something that was ahead of its time. The other video showing ambient occlusion blew my mind aswell. Programming this to run in a performant manner must have been very difficult.

    • @Sauraen
      @Sauraen  10 месяцев назад +24

      I won't say any of the microcode stuff is easy, but given the difficulty of the platform, implementing ambient occlusion was relatively easy. It just does light *= 1 - factor * (1 - alpha), and uses a different factor for ambient / directional / point lights.

    • @johnrickard8512
      @johnrickard8512 10 месяцев назад +4

      ​@@Sauraenwhich sounds to me like something that the RCP's vector unit could chew through like pac Man pellets.

    • @contramachina354
      @contramachina354 9 месяцев назад

      Kaze Emannuar, I think his name is? Perhaps he could give it a try?

    • @Sauraen
      @Sauraen  9 месяцев назад +5

      @@contramachina354 Yes, Kaze will be using F3DEX3 for his upcoming project Return to Yoshi's Island. However, he'll only be using it for its performance improvements, and won't be using any of the new graphical features, as the new features are not compatible with the legacy HLE emulators most of his audience uses.

  • @exonymat1471
    @exonymat1471 10 месяцев назад +15

    This really gives a 6th gen feeling to the N64, massive props to you for figuring this out! Now I'd love to see how Kaze Emanuar could possibly implement something similar into his custom SM64 engine

    • @Sauraen
      @Sauraen  10 месяцев назад +12

      Kaze is planning to use F3DEX3 in RTYI for its performance improvements. However, he won't be using any of its new graphical features, as they are not compatible with legacy HLE emulators which most of his playerbase uses.

    • @xdanic3
      @xdanic3 10 месяцев назад +3

      ​​@@SauraenEmulators will have to catch up, maybe that's easy if emulators devs get to see your microcode?

    • @Sauraen
      @Sauraen  10 месяцев назад +10

      @@xdanic3 It's a chicken-and-egg problem. Part of the problem is that top quality LLE emulators are still too slow on low-end PCs or Android. In five years, that probably won't be a problem anymore.

    • @debugempty
      @debugempty 10 месяцев назад +2

      @@Sauraen What emulators would this work on?

    • @Sauraen
      @Sauraen  10 месяцев назад +2

      @@debugempty Most emulators with LLE graphics. Ares or paraLLEl are recommended, but some others work too. Personally I rarely use emulators, this is developed on real hardware. I recently switched from an Everdrive 64 V3 to a SummerCart64, which has very fast USB upload.

  • @fruitsnackia2012
    @fruitsnackia2012 10 месяцев назад +4

    when this is finished i hope it gets used to its full potential! with all the homebrew that going on for the n64 i think a new era of n64 games are on the horizon. this demo is amazing imo even if the process it "fairly simple" the final result is incredible for the n64 hardware!

  • @OmegaRC59
    @OmegaRC59 10 месяцев назад +11

    The specular vertex lighting is very neat. Looks visually similar to the original unreal engine's vertex specular effect (though the light blending itself is different by far), but a really big advantage of the UE1 effect is that you can control a lot of the parameters between the width and strength, and an additional multiplier for it on top of the regular lighting. Impressive stuff for 1998, and it's very impressive that something close is being done on the N64 after all this time. Awesome job, man

    • @Sauraen
      @Sauraen  10 месяцев назад +6

      I didn't talk about it in the video, but there is a "size" parameter here for each light when in specular mode. The strength is determined by the light color. I originally tried to implement diffuse + specular with a multiplier for each, but I ran out of instruction memory.

    • @OmegaRC59
      @OmegaRC59 10 месяцев назад +3

      @@Sauraen Despite the limitations, I think it looks really nice. That's how it goes with either hardware or software limitations of this period though, you'll have to give ground to them eventually. Very nice job though, what you've managed to do with this hardware is wonderful

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      @@OmegaRC59 Thanks!

  • @guilhermems
    @guilhermems 10 месяцев назад +17

    Amazing! I just wish this was available back then. It would blow people's minds if games could have those effects back in the day.

  • @protocetid
    @protocetid 10 месяцев назад +1

    The future of the N64 is bright, both figuratively and literally thanks to these new graphics techniques lol.

  • @tephereth2078
    @tephereth2078 10 месяцев назад +8

    you have such a relaxing voice tbh, enjoyed the technical breakdown and the atmosphere of the island map too

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      Thanks! :)

  • @livvy94
    @livvy94 10 месяцев назад +15

    This looks so impressive!

    • @Sauraen
      @Sauraen  10 месяцев назад +3

      Thanks!

  • @0DRONZER
    @0DRONZER 10 месяцев назад +3

    thats insane i never thought id ever see this happen

  • @cube2fox
    @cube2fox 10 месяцев назад +3

    The water looks great!

  • @dakota6431
    @dakota6431 10 месяцев назад +2

    i always wondered if the n64 could do specular light and now i know

  • @rmat9023
    @rmat9023 10 месяцев назад +1

    some people go to school, to become layers, doctors, researches. They put their energy to curing disease, fighting for people's rights in the legal system, or making innovations to our world. And then there's people like this (working hard to improve lighting in a 25 year old video game)

  • @zennii
    @zennii 10 месяцев назад

    This is pretty cool, with some vertex colors on the ground to "absorb" red from the colors and some planning ahead the water could look very impressive, much like how mario sunshine's water on gamecube works

  • @goblinshark6847
    @goblinshark6847 10 месяцев назад +5

    its crazy how good the water looks in this you did a great job on this

  • @fungo6631
    @fungo6631 9 месяцев назад +1

    The N64 RCP had Finewine technology before ATI/AMD did!

  • @user-wb8iu1hl6i
    @user-wb8iu1hl6i 10 месяцев назад +2

    Silicon Graphics: AND THIS
    IS TO GO FURTHER BEYOND
    HAAAAAAAAAAAAHHHH

  • @charajaznao2829
    @charajaznao2829 10 месяцев назад +2

    Looking spectacular, PS2 level indeed

    • @so-vp2qh
      @so-vp2qh 10 месяцев назад +4

      Per-vertex lighting is actually on par with what the PS2 does in hardware.

  • @lifeartstudios6207
    @lifeartstudios6207 10 месяцев назад

    watching and learning from this with a mind that is thinking about meta quest and vr development.

  • @cryzenx.
    @cryzenx. 10 месяцев назад

    ok this is insane, this is a big step forward !

  • @jlewwis1995
    @jlewwis1995 10 месяцев назад +2

    Man hopefully libdragon will get that fresnel and bumpmap implementation eventually (if it doesnt already have it)

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      It won't get this implementation, this is based on Nintendo's libultra which is incompatible with libdragon. The homebrew community will have to implement fresnel in their own custom microcodes.

    • @jlewwis1995
      @jlewwis1995 10 месяцев назад +1

      @@Sauraen hm well specifically I meant "an implementation with equivalent or better behavior", obviously I know libdragon and libultea have different features and apis

  • @karlosk5773
    @karlosk5773 10 месяцев назад +3

    Love your content!

  • @nz7166
    @nz7166 10 месяцев назад +1

    this was an enjoyable video

    • @Sauraen
      @Sauraen  10 месяцев назад

      Thanks!

  • @jontaylor1586
    @jontaylor1586 10 месяцев назад +3

    Nice work. The constant switching of camera modes gives me a small headache lol

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      Sorry! That's how looking at things in OoT goes!

  • @OkyDooky
    @OkyDooky 10 месяцев назад

    The two graphical features I'm most looking forward to seeing some makeshift/"good-enough" version of on the N64 are quality full-screen Motion Blur (effectively like either Camera+Object blur or the Per Pixel kinds) and dynamic Depth of Field. Not sure if that's on your radar at all or if you have any ideas how one would approach that, but this gives me hope that someone might implement that someday.

    • @Sauraen
      @Sauraen  10 месяцев назад

      Majora's Mask has motion blur by mixing the last framebuffer with some alpha into the current one. Anything more complex than that is probably out of scope for the hardware, and this doesn't have much to do with custom microcode anyway. What custom microcode can do is vertex-based effects which end up producing a new shade color or alpha or texture coordinates for each vertex.

  • @AmaroqStarwind
    @AmaroqStarwind 10 месяцев назад +3

    Are the following possible on the N64 through microcode?
    - n-Simplex interpolation/filtering
    - Summed Area Tables
    - Progressive Mesh Refinement (different from LOD, but has a similar goal)
    - MFAA (or something similar)
    - Quads
    - Textures using other colorspaces, like Y-CoCg
    - Raymarching
    - Blinn-Phong Shading
    - Directional Colored Shadows (to compliment Colored Lights)

    • @AmaroqStarwind
      @AmaroqStarwind 10 месяцев назад +2

      Progressive Mesh Refinement, IIRC, uses less memory than LOD but requires more computation time

    • @Sauraen
      @Sauraen  10 месяцев назад +4

      The microcode is sort of the equivalent of a compute shader which runs where you would normally have a vertex shader in the pipeline. It can theoretically compute anything, but there are severe memory limitations. Anything which would be normally part of a fragment shader is handled by the RDP, which has a configurable but fixed-function pipeline--this has nothing to do with the microcode.
      - No idea what that is
      - No idea what that is
      - Theoretically yes, practically LoD-like stuff is mostly done on the CPU
      - This is a fragment related thing. The N64 has antialiasing which has a couple settings but it is not that capable.
      - Already supported as two tris. Having a real quad with an undistorted texture on it is supported by the hardware but no microcode implements this.
      - The RDP supports like a dozen texture formats, I've used several in this video (see my video on fast64 textures). For the kind of textures you're talking about, there's only one supported: YUYV. Games rarely used this and community tools don't currently support it.
      - Fragment related, also please, we're talking about a system designed in 1994.
      - Any lighting effect which you're willing to approximate as a per-vertex effect can be done, like I did here with specular.
      - OoT already uses dynamic shadows for some objects, there's no reason they could not be drawn with colors.

  • @x149te
    @x149te 10 месяцев назад +2

    Magnificent!

  • @MrVinicius5000
    @MrVinicius5000 10 месяцев назад

    In this pace, in 5 years the comunity will be able to port doom 3 to the N64 :D.

  • @buzinaocara
    @buzinaocara 10 месяцев назад

    reggarding the environment mapping technique. While it is no more than a static texture, one could re-generate that static texture every frame by rendering it to an off-screen buffer and using its results as the env. map for the desired objects. That way, one could potentially render a cubemap into the env. texture, or even render a very simplified impostor of the scene with correct time of day lighting...

  • @OkyDooky
    @OkyDooky 10 месяцев назад

    I never thought anyone would think it would be worth it to implement either ambient occlusion or fresnel on the N64, let alone both. But, here we are. 😅
    Do you think the shade-to-alpha could be used in combination with some other techniques to produce an inexpensive(-ish) subsurface scattering effect? 🤔

  • @SilverstringsMusings
    @SilverstringsMusings 10 месяцев назад

    These effects are really nice.

  • @Ghorda9
    @Ghorda9 10 месяцев назад +1

    you missed out on a perfect opportunity to make a vaporwave background

  • @Nonhuman
    @Nonhuman 10 месяцев назад +1

    Does Donkey Kong 64 also use the original texture-based crusty specular implementation for it's shine on the character models?, the sheen the kongs have is surely not true specular, but also look suspiciously smooth compared to the og crusty cubemap specular... I wonder if it's anything custom/special Rare did.

  • @Ari_Sturgeons
    @Ari_Sturgeons 10 месяцев назад +4

    Is this available for the public? I've been making some mods for OoT and SM64 decomps with the Fast64 plugin. Is this integrated into that? Or is there some other way to load this microcode? I'm still pretty new to this...

    • @Sauraen
      @Sauraen  10 месяцев назад +6

      All of this is public, check the links in the description. All the scenes shown in my videos are made with fast64, and the modifications to fast64 to support them are public. However, neither the microcode or the fast64 support is finished, so there are some incomplete or unsupported features and things may break in the future.

  • @AaronMorrisTheSteamFox
    @AaronMorrisTheSteamFox 10 месяцев назад +2

    I wonder if any of this could be of use to James Lambert's Portal 64?

    • @Sauraen
      @Sauraen  10 месяцев назад +3

      Not directly. Homebrew must not contain a single line of Nintendo code. So the OS and CPU rendering engine is completely different, and the microcodes are totally incompatible. However, I hope that F3DEX3 inspires homebrew microcode developers to support things like vertex colors and normals at the same time.

    • @ssg-eggunner
      @ssg-eggunner 4 месяца назад

      @@Sauraen hold up so f3dex3 stuff is subject to copystrikes or smth

    • @Sauraen
      @Sauraen  4 месяца назад

      @@ssg-eggunner Of course, it is modded Nintendo content, they can take it down if they want to.

  • @nyanpasu64
    @nyanpasu64 10 месяцев назад

    holy aliasing in the distant water

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      The N64 is capable of fixing that (mipmaps / lod frac), but sadly not at the same time as all the other stuff I wanted to do with this water.

  • @lifeartstudios6207
    @lifeartstudios6207 10 месяцев назад

    also would love to see how far the 3ds could be pushed.

  • @matthewrease2376
    @matthewrease2376 10 месяцев назад

    "link is stranded here"
    "Then how do I click it?"
    "Oh wait'

    • @Sauraen
      @Sauraen  10 месяцев назад

      You can click him as much as you would like!

  • @honkhonkler7732
    @honkhonkler7732 10 месяцев назад

    Imagine if the N64 had 16KB texture cache and memory without horrible latency issues. Would've had crystal clear textures and higher frame rates for maybe an extra $10-15 per console.

    • @Sauraen
      @Sauraen  10 месяцев назад +4

      The texture cache could have been expanded for some small cost like that, but the memory system could not have been easily redesigned. The main constraint was development time--SGI made RCP V1, it had two major bugs, so they made V2 which took an extra 9 months. The console was then already behind schedule so they had to ship it. There are still a number of minor bugs in V2, plus supposedly one of their engineers found an issue causing memory inefficiency in V2 which they would have fixed if they did a V3. I also personally found a few changes they could make which would have improved performance by maybe up to 30% without significant silicon area cost, maybe I'll get a chance to talk about those someday. :)

    • @ssg-eggunner
      @ssg-eggunner 4 месяца назад

      imagine a fantasy derivative of n64 with that and faster RAMbus aswell

  • @colonthree
    @colonthree 10 месяцев назад +7

    I wanna make a game for the N64 now (but I wish I had the time). x'3
    P.S. You should try to do the shadowmapping in Conker's Bad Fur Day and/or stencil shadow volumes for the shadows of Link next.

    • @Sauraen
      @Sauraen  10 месяцев назад +6

      I'm not planning any F3DEX3 features for shadows. OoT's dynamic shadows system is about as good as you can do on N64 without major engine changes or a big perf hit. It is used in the final game for a handful of actors, plus there is beta code which can be re-enabled which draws the dynamic shadow for Link.

    • @buzinaocara
      @buzinaocara 10 месяцев назад +7

      actually, OoT already had a dynamic projected shadow system similar to Conker's, though I've only noticed it beeing used for the shadows of the moveable mirrors in the Sand Temple, and for shadows of Ganon's cape in the last boss.

    • @Sauraen
      @Sauraen  10 месяцев назад +5

      @@buzinaocara Correct, it's used on those two actors, and also on the cuttable signs.

    • @buzinaocara
      @buzinaocara 10 месяцев назад +3

      @@Sauraen such odd choices 😆

  • @Myako
    @Myako 8 месяцев назад

    Oh wow, your work is truly amazing. Is there a chance that you eventually release ROM versions of all these demos? Please? 😁🙏🏻

    • @Sauraen
      @Sauraen  8 месяцев назад +1

      I don't release ROMs for legal reasons, but the microcode source is public and all the assets are public-domain and linked in the description.

    • @Myako
      @Myako 8 месяцев назад

      ​@@Sauraen: oh, that's a shame, I have no idea how to reproduce the ROM from the microcode and assets.
      Have you considered trying libdragon?

    • @Sauraen
      @Sauraen  8 месяцев назад +1

      ​@@MyakoEventually there should be a HackerOoT release with the microcode already built-in. For someone who has a little experience with OoT romhacking, it's pretty straightforward to export the scene and models from Blender with fast64, and copy in the code which is also released. The target audience is romhack developers, not players--this demo isn't a game, it's only what you're seeing on screen here.
      In the near future, no--I'm interested in finishing F3DEX3 and the related tooling to improve the state-of-the-art in SM64 and OoT romhacking. If/when I finish it, I might switch to homebrew, though I probably would move on to non-N64 stuff.

  • @karolrosen9693
    @karolrosen9693 10 месяцев назад

    Great explanation! Thanks.

  • @chameleon2606
    @chameleon2606 10 месяцев назад

    this is amazing!!

  • @lazeddonut
    @lazeddonut 10 месяцев назад

    Incredible !!!

  • @affegpus4195
    @affegpus4195 10 месяцев назад

    Damn nintendo really had no idea what they had in their hands with the SGI gpu did they?
    I wish i could see the alternate world were sega of america menaged to convince japan to use the SGI gpu

  • @wiegraf9009
    @wiegraf9009 10 месяцев назад

    Wild!

  • @MLink23
    @MLink23 10 месяцев назад

    hai sauraen cool stuff :3

    • @Sauraen
      @Sauraen  10 месяцев назад +1

      Hai!

  • @Sanker1
    @Sanker1 10 месяцев назад

    ay that's pretty cool

  • @RiverReeves23
    @RiverReeves23 9 месяцев назад

    Hey Sauraen, has anyone integrated your F3DEX3 microcode in to an engine base like Hacker SM64 yet?

    • @Sauraen
      @Sauraen  9 месяцев назад +1

      There's a PR open for it in HackerSM64 which should be merged soon.

    • @RiverReeves23
      @RiverReeves23 5 месяцев назад

      @@Sauraen thanks man. This is SUPER exciting!!!! Really appreciate the work you've done.

  • @rachit7645
    @rachit7645 10 месяцев назад +1

    So F3DEX4 will have raytracing then

    • @Sauraen
      @Sauraen  10 месяцев назад +4

      I know you're kidding, but someone already did ray tracing on N64. It worked but only could handle a scene with a handful of basic primitives like spheres and cubes.

    • @spht9ng
      @spht9ng 10 месяцев назад +2

      Not possible for much more than tech demos

  • @LavaCreeperPeople
    @LavaCreeperPeople 10 месяцев назад +1

    I see

  • @shadowman_390
    @shadowman_390 10 месяцев назад

    awesome job. How taxing is per vertex lighting vs unlits?

    • @Sauraen
      @Sauraen  10 месяцев назад

      Not very taxing, it depends on how many lights and whether they are point or directional. But it only affects RSP time, and usually the RSP is not the bottleneck, the RDP is. There's a couple examples of timings with lighting on and off in my cel shading video.

    • @shadowman_390
      @shadowman_390 10 месяцев назад

      so much to see and learn in your channel@@Sauraen

  • @beanmchocolate3900
    @beanmchocolate3900 10 месяцев назад

    Fresnel can be used as rim light… huh…

  • @moonhowler667
    @moonhowler667 10 месяцев назад

    Okay cool but isn't Specular... pretty common in later N64 games? I mean right off the top, Perfect Dark had tons of shiny surfaces.

    • @Sauraen
      @Sauraen  10 месяцев назад +2

      I go over the vanilla "hilite" implementation in this video.

  • @chungus1149
    @chungus1149 10 месяцев назад

    Need a time traveler to go back and teach these techniques to nintendo so nintendo couldnjust cone out the gates swinging with this shit

  • @WindBendsSteel
    @WindBendsSteel 10 месяцев назад

    Is there anything the N64 cannot do?

  • @davurphy
    @davurphy 9 месяцев назад

    Does this work with the pc ports?

    • @Sauraen
      @Sauraen  9 месяцев назад +1

      Not directly, PC ports replace the whole graphics system with a PC graphics API, and this is a modification to the N64 graphics system which is the thing they've replaced. But of course, the PC port could implement the same effects, or much more advanced things.

    • @davurphy
      @davurphy 9 месяцев назад

      @@Sauraen do you have any interest in working on the graphics pipeline on the PC ports? I'd like to commission someone to work on it

    • @Sauraen
      @Sauraen  9 месяцев назад +1

      @@davurphy Not at this time, sorry!

  • @jfwfreo
    @jfwfreo 9 месяцев назад

    Why anyone would be using crappy inaccurate HLE N64 emulators in 2024 when quality proper accurate emulators exist...
    Also, if this is based on original Nintendo microcode, how are you going to avoid Nintendo simply sending a take down notice?

  • @lookoutforchris
    @lookoutforchris 6 месяцев назад

    Watching this gave me ADD. Don’t shift focus so fast, this is a presentation not a speed run. Video could also be less than 5 minutes.

    • @Sauraen
      @Sauraen  6 месяцев назад

      There is no "right stick" in OoT, so if you want to orbit the camera around to show something from different perspectives, moving Link and pressing Z is the only option.