"Impossible" Realtime Shadows on N64 Hardware

Sdílet
Vložit
  • čas přidán 5. 09. 2024
  • Here are a few lighting techniques I developed that run on native N64 hardware at 640x480 resolution and high frame rates. I simulate per pixel lighting by controlling texture coordinates and a texture of a lit plane. I render the square shadow by placing rectangle where the shadow should be. The shadow cast on the monkey is done using a variant of shadow volumes and the monkey casts shadows on the ground by variation on shadow maps.
    You can download the ROM here
    github.com/lam...

Komentáře • 106

  • @vicpro1
    @vicpro1 Před 2 lety +331

    Next is ray tracing on an SNES!

    • @hugothepinkcat
      @hugothepinkcat Před 2 lety +7

      Well... Actually...
      czcams.com/video/VeFF344NbZ4/video.html

    • @rhysjones8506
      @rhysjones8506 Před 2 lety +67

      Already happened 🤣

    • @bobkerr2755
      @bobkerr2755 Před 2 lety +15

      Well, I guess the magnavox odyssey technically has ray tracing..

    • @vicpro1
      @vicpro1 Před 2 lety +4

      @@hugothepinkcat Woah, my mind is blown

    • @Nikku4211
      @Nikku4211 Před 2 lety +8

      @@hugothepinkcat Now try without any enhancement chips.

  • @iamturokn64
    @iamturokn64 Před 2 lety +158

    This is pure sorcery! Give this man a game idea ... I'll support it 🍀💰

    • @rovertronic
      @rovertronic Před 2 lety

      @lucid you could speed it up quite a bit just by knocking the resolution down to 320x240, decreasing fillrate times

    • @menmouzumaki7951
      @menmouzumaki7951 Před 2 lety +1

      @@rovertronic That wouldn't matter, read his discription, it's an animated texture.

    • @Aeduo
      @Aeduo Před 2 lety +1

      @@menmouzumaki7951 The heaviest part seems to be the monkey shadow. Neat demo but a handful of irregular shaped objects would probably bring it to a crawl, but a stylized game where maybe only the player character was a complex shape and everything else cast squares might perform playable. And it's not like boxy characters would be incredibly out of place on an N64. Lowering the resolution of the shadow map might help with speeding up irregular shapes, which lowering the framebuffer resolution would help to allow getting away with, and just lightening up other time taken for rendering in general.

  • @jplays1999
    @jplays1999 Před 2 lety +73

    This is art, I cant even imagine rendering shadows so smoothly on a 90s console

  • @patrickfoxchild2608
    @patrickfoxchild2608 Před 2 lety +5

    Never expected to see a Suzanne rendered on an N64

  • @MultiRobotnik
    @MultiRobotnik Před 2 lety +6

    The bowling screen screen when you get a strike.

  • @alfredolibreros6106
    @alfredolibreros6106 Před 2 lety +12

    Nice, please upload more of your work and projects :)

  • @AlliedMastercomputor
    @AlliedMastercomputor Před 2 lety +7

    even an n64 has better shadows than garrys mod

  • @davidpyne6414
    @davidpyne6414 Před 2 lety +10

    This is so freaking cool thank you!

  • @blendernoob64
    @blendernoob64 Před 2 lety +5

    Doom 3 Stencil shadows are one of the coolest graphics effects for me. This is insane running on an n64! I wonder if the program ran at 240p like other n64 games, we would have a massive performance increase.

  • @christopherwalkinalloverya5824

    But can the monkey's shadow volume cast shadows upon environmental geometry and/or NPC's?

    • @ppmguire
      @ppmguire Před 2 lety +18

      As far as I'm aware, no.

    • @james.lambert
      @james.lambert  Před 2 lety +56

      @@ppmguire correct. Complex shadows can only be cast on flat surfaces. Simple shadows can be cast on complex objects.

  • @KitsuneAlex
    @KitsuneAlex Před 2 lety +41

    Does this use the RCP for accellerating calculations? Also, what lighting model specifically does this demo use? Great video :)

    • @menmouzumaki7951
      @menmouzumaki7951 Před 2 lety +14

      based on his description, it's not a lighting calculation, it's just an animated shadow texture.

    • @KitsuneAlex
      @KitsuneAlex Před 2 lety +10

      @@menmouzumaki7951 I didn't even realize until looking at this while thing a little closer. It's just UV scaling and offsetting based on a projection vector/matrix, that's genious.

    • @menmouzumaki7951
      @menmouzumaki7951 Před 2 lety +10

      @@KitsuneAlex my only gripe is that calling it "realtime" is true in the sense that the animation runs in realtime, but it's not true the sense that it's not actually a shadow being rendered, but a clever way to handle something along those lines.

    • @menmouzumaki7951
      @menmouzumaki7951 Před 2 lety +2

      @@KitsuneAlex Given that the N64's shadows were typically handled by slightly transparent geometry, rather than real shadows.

  • @Ammothief41
    @Ammothief41 Před rokem +2

    Dudes out here unblurring the 64! I'm impressed. Wish the youtube compression wasn't trying to undo all his hard work tho...

  • @aguy3047
    @aguy3047 Před 22 dny

    You really are doing the Lord's work

  • @Chowder908
    @Chowder908 Před 2 lety +3

    i don't think it was so much impossible just impossible to use consistently in real time. A bigger landscape and it would probably eat memory.

    • @harry-smith404
      @harry-smith404 Před 2 lety

      Yep. It would be interesting to see more objects in the scene, more light sources and see the performance.
      But still, it looks cool

  • @Izhen_UwU
    @Izhen_UwU Před 2 lety +9

    Did All-Star Baseball 2000 also had dynamic shadows?

    • @james.lambert
      @james.lambert  Před 2 lety +11

      Yes but they did it by drawing a flat version of the players on the ground. It only works on flat surfaces. Those shadows would not work on complicated surfaces

  • @Lattrodon
    @Lattrodon Před rokem

    Still looks better than any recent Nintendo games.

  • @lepidotos
    @lepidotos Před 2 lety +3

    Excellent wofk!

  • @DeeKnow
    @DeeKnow Před 2 lety

    crazy looking

  • @felipe69420
    @felipe69420 Před 2 lety +1

    Very nice work!

  • @redaipo
    @redaipo Před 2 lety +4

    it seems that the n64 is a lot more powerful than we made it out to be

    • @kitsunekaze93
      @kitsunekaze93 Před 2 lety +1

      its also clever techniques!

    • @redaipo
      @redaipo Před 2 lety +1

      @@kitsunekaze93 yes this is true, but i think my point still stands

  • @timmygilbert4102
    @timmygilbert4102 Před rokem

    MMM so a projector like in unity!
    You can probably Cast complex object by rendering them in a texture buffer like Mario kart screen showing the race. That's how some mobile game on low end fake it,

  • @soviet9922
    @soviet9922 Před 2 lety

    man you are amazing ! this is great

  • @lethenparkesTeamRacc
    @lethenparkesTeamRacc Před 2 lety

    i mean if you add it to a platformer game of the era it would kinda be considering the framerate lag on this. but probably also possible to do some insane optimization to alleviate the slow framerate jitter.

  • @MadamLava094
    @MadamLava094 Před 2 lety

    suzanne my beloved

  • @Nikku4211
    @Nikku4211 Před 2 lety +4

    This video goes hard, feel free to screenshot.

  • @bankbank
    @bankbank Před 2 lety

    gorgeous

  • @MrZeroCool
    @MrZeroCool Před 8 měsíci

    amazing 😍😍😍

  • @colonthree
    @colonthree Před 2 lety

    Turok 2 had stencil volume shadows. :'3c

  • @Malk3
    @Malk3 Před 2 lety

    b l e n d e r m o n k e y

  • @MissFazzington
    @MissFazzington Před 2 lety

    How can this guy even do this

  • @TheDrunkenPL
    @TheDrunkenPL Před 2 lety

    This reminds me of Doom 3

  • @ricardobarros1090
    @ricardobarros1090 Před 2 lety

    Great 👍

  • @guilhermems
    @guilhermems Před 2 lety

    Raytraced shadows when? Jk :P Nice work!

  • @AntonyCannon
    @AntonyCannon Před 2 lety

    Ah, Project Reality.

  • @alittlebit9569
    @alittlebit9569 Před rokem

    Can you try this in super Mario 64

  • @soda_j
    @soda_j Před 2 lety

    not related but why does your gb64 emulator run in 480i instead of 240p?

    • @james.lambert
      @james.lambert  Před 2 lety +2

      I wanted the game content to fill as much of the screen as possible. At 240p scaling the 160x144 screen by 1.5 gives 240x216 wich fits well on the screen but scaling by 1.5 means that some pixels are doubled in height and others remain the same. Doing 480i means that I can scale the screen by 2 so it scales cleaner. I may make that a setting oneday so the player can choose what tradeoffs they want.

  • @cheffdonty
    @cheffdonty Před 2 lety

    Sorcery!

  • @oby1
    @oby1 Před 2 lety +1

    I'm curious, you using a custom made engine? Or the blender game engine?

    • @Subject97
      @Subject97 Před 2 lety +2

      This is an n64 and blender is too complex for an n64, it uses PBR for lighting for example. This is custom (even if it uses the blender monkey model)
      Also I love your videos

    • @pacomatic9833
      @pacomatic9833 Před 2 lety

      Since when was Blender a game engine??

    • @serloinz
      @serloinz Před 11 měsíci

      @@pacomatic9833 you used to be able to make games within blender

    • @Something_Disgusting
      @Something_Disgusting Před 7 měsíci

      ​@@pacomatic9833 for a long time, before 2.8 released.

  • @eyedunno8462
    @eyedunno8462 Před 2 lety +3

    Let us know when you get it to work on goldeneye

    • @dan_loeb
      @dan_loeb Před 2 lety +9

      Considering goldeneyes existing frame rate issues, and how the shadows here are using multiple methods to simulate a cascading shadow on top of the monkey and ground, I don't think this is a system you could just add in to other titles. You'll have better results using reshade to do screen space shadows on an emulated version of the xbla one.

    • @eyedunno8462
      @eyedunno8462 Před 2 lety +1

      @@dan_loeb That was wonderfully boring, thanks

    • @crimehole
      @crimehole Před 2 lety +3

      @@eyedunno8462 That was like two sentences.

  • @tommerstr
    @tommerstr Před 2 lety

    didnt conkers bad fur day use this effect?

  • @illyay1337
    @illyay1337 Před 2 lety

    Ok ship doom 3 on n64 now

  • @Cookiemelter
    @Cookiemelter Před 2 lety

    Didn't Conker's bad fur day have real time shadows?

    • @M1XART
      @M1XART Před 2 lety

      Yes it did. Conker also used realime water reflections during gameplay.
      Also, Banjo -Tooie and Jet Force Gemini uses realtime shadows for all playable characters.

  • @MultiRobotnik
    @MultiRobotnik Před 2 lety

    How come the figurative emphasis on _"Impossible?"_

    • @james.lambert
      @james.lambert  Před 2 lety +2

      Well, it obviously isn't impossible but no game, as far as I know, used a technique until the next console generation and typically relied on a hardware feature not available to the N64

    • @MultiRobotnik
      @MultiRobotnik Před 2 lety

      @@james.lambert Next console generation? Meaning the GameCube?

    • @Zeegoner
      @Zeegoner Před 2 lety

      @@MultiRobotnik No that was 2 generations later. Search the gamesphere on YT. It was featured on Drake and Josh.

    • @realrunnow
      @realrunnow Před 2 lety

      @@james.lambert Didnt conkers bad fur day use it?

    • @Banzeken
      @Banzeken Před 2 lety

      @@realrunnow Conker only used *shadow mapping* which is not quite the same as the *shadow volume* (plus shadow map cast by the monkey head) approach used in this demo.

  • @menmouzumaki7951
    @menmouzumaki7951 Před 2 lety +2

    Your description says that you're simulating lighting by controlling texture coordinates and a texture of a lit plane.
    Which means this isn't even "realtime shadows" it's just an animated texture.

    • @suvetar
      @suvetar Před 9 měsíci +1

      But the hardware doesn't know the difference, it still has to calculate the same math even if it renders the shadow in a different method.

  • @bxnny5861
    @bxnny5861 Před 2 lety

    Rtx on

  • @shawnio
    @shawnio Před 2 lety

    dude. you draw it. it appears. where do you get this confused

  • @adilator
    @adilator Před 2 lety

    With only 20 polygons on screen, this is a useless demo.

  • @jhkuno88
    @jhkuno88 Před rokem

    Conker did have realtime shadow for the main character didnt it? And some other games too.

  • @julianemery718
    @julianemery718 Před 2 lety

    So this video is definitely fake then.
    Like you wrote in the title, it's impossible to do realtime shadows on the N64, thus this video is fake and the title is clickbait.
    Maybe rethink your choice of words for videos yeah?

  • @damysticalone87
    @damysticalone87 Před 2 lety +1

    Those read, listen to / bugged / eavesdrop / overheared / tapped, watched, spied, copied and steal many of my ideas (=inventions) initiated by me:
    + open, transparent 360° sunlight Buildings, construction methods, architectures, designs, concepts;
    + Step-floor / -storey / -level / -tier pyramid (e.g., as a residential building);
    + 360° stepped floors / storey / level / tier buildings (constructions, architectures, construction methods, designs, concepts, 2D, 3D, models);
    + 3D 360° environment (surround), volume, space (room) audio / sound;
    + 360° environment (surround), volume, room screens (displays), monitors, TVs;
    + Screens (displays), monitors, TVs without backlighting;
    + many things with magnets like Micro-OLED;
    + 360° screens, monitors, TVs, panels, glass;
    + curved screens, monitors, TVs, panels, glass;
    + 360° reflections and light digital: "ENB", "Ray-Tracing" / "RTX", “Lumen illumination” and whatever renaming!
    + Short Throw Projectors;
    + dark backgrounds / themes / skins for windows, browser windows, internet sites, programs / apps, etc.;
    + fanless, passive cooling; +thermal pads; + Water cooling (unwanted, because it conducts electricity) and liquid cooling (wanted) for the computer and personal computer / PC application area!
    - I am not the inventor of refrigeration by nitrogen, instant- / blast-freeze / -freezing;
    + 360° open, transparent PC cases;
    + 360° Sphere, Ball as a Wheel (2D, 3D) “Omniwheel” / “Omni-Wheel”;
    + From a standing position / standing a 360° turn / rotation in any direction on all objects, including logically and of course vehicles, transporters, robots of all kinds;
    + Flying objects, planes that take off and land vertically, for example by hot air, example fighter jet;
    + skyscraper up to the weightlessness of space ("space scraper") - "mega construction";
    + LED lights (at least its implementation and intended use outside of tv and pc-monitor); RGB LED “Nanoleaf”, etc.
    + and much more!
    + I'm not the inventor of VR, but of "AR", AR glass, AR glasses;
    It was only later that I realized that they derived a lot from my ideas (=inventions), a lot came about that has to do with color and light, through me as an initiator, booster / catalyst, e.g., through my idea, invention of the Screens without a backlight and without a built-in / integrated backlight! It is no coincidence that only afterwards, after I initiated this, they built, built and are building those inventions thanks to my impetus! They sell my ideas (inventions) as theirs! They are not the inventors, but the first technical implementers of my ideas (=inventions)! And those are not the inventors, but the thieves of my ideas (=inventions) initiated by me, because those act as if I wasn't the first hand and the first domino, and they take unjustly, undeservedly a lot of money, stolen money (blood money), recognitions, awards, certificates, fame and history, they boast of my laurels / merits!
    Before me they all were stucked at LCD, Plasma TV and less lights!
    I have made a deep impact in evolution!
    Those manipulate, sabotage, falsify, distort images, paintings, digitized and real, animations, videos, films, also composed of many images, even the publication dates of mine, others and their posts, images, videos, etc.!
    You have to understand, those can distort everything that can be heard and seen in real life and digitally!
    They block and delete my pictures, videos, posts, comments, comments-answers and answers!
    They are poisoning and murdering the world with fake diseases, treatments, "vaccinations"/ "vaccines" and injections by syringe!
    Now they also make it out as if they haven't been ripping off, cheating, enslaving, murdering other countries with the money currency, money exchange by even -99% for more than two centuries! And as if I'm not the first to disclose that and more! As if I didn't disclose and initiate > 1.00 Ruble (₽) = 1.00 asian Yen (¥) = 1.00 Euro (€) = 1.00 Dollar ($) = any (X) any country < years ago!
    Each and every non-civilian you hear and see on TV is involved! You can hear and see their > blue blue blue

    • @pacomatic9833
      @pacomatic9833 Před 2 lety

      Uh-huh.
      Sure.
      Not a scam.
      Not..
      at..
      all..

    • @MrGil1995
      @MrGil1995 Před rokem

      R/madlads

    • @damysticalone87
      @damysticalone87 Před rokem +1

      If / When you have money, health or "natural" catastrophe / disaster problems or if / when you are somehow affected by traffic accidents, traffic jams at some point, somewhen, anytime, somewhere, anywhere, then think of me, share my posts and my pages!

  • @pulse27
    @pulse27 Před 2 lety

    not too impressive to me, the n64 wasn't a weak console. we probably would have had things that looked like this on the n64 if it was easier to develop for.