1-BIT GRAPHICS IN UNITY | OBRA DINN TUTORIAL - SHADERLAB

Give the project a download if you want to see the final effect without KZread compression!
github.com/Madalaski/ObraDinn...
Twitter: / madalaski
Itch.io: madalaski.itch.io/
Find The First Person (beta) package here:
github.com/boaheck/TheFirstPe...
And here's Breogán's itch page:
boaheck.itch.io/
Lucas Pope's Posts:
forums.tigsource.com/index.ph...
Get The Return Of The Obra Dinn on Steam:
store.steampowered.com/app/65...
Or better yet, buy the recently released OST on Spotify and Apple Music! Which I apparently could have used for this video! Dammit!
Steps:
- Attach the ObraDinnCameraScript to the main camera of your scene.
- Create a Material with the Dither shader and place it in the "Dither Mat" parameter of the Camera script.
- Set the Dither and Noise properties of this material to the noise textures you want to use and the Color Ramp property to the colour ramp you want to use.
- Adjusting the Tiling property to get the right pixel density with whatever projection you're using.
- Set the resolution of your game screen to 820x470 (the native resolution of Return of the Obra Dinn) or 1640x940 if you're using the 2x sampling method (this helps with performance).
- Make a second material with the thresholding shader if you're using it and set it to the Threshold Mat property.
- If you're using the custom surface shader, you'll need to make materials out of it and place it onto all the objects in your scene.
- For performance Lucas Pope also did custom lightmapping for this and I have no clue how he did it, but you should look it up!
Free Noise Textures that I used:
momentsingraphics.de/BlueNoise...
I created my own Code Animator project to create the code animations for this video. You can find the pre-pre-pre-Alpha here if you desperately need something like this:
github.com/Madalaski/CodeAnim...
Hall of the Mountain King Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
creativecommons.org/licenses/b...
#obradinn #tutorial #madeinunity

Пікірлер: 94

  • @warpingrealities
    @warpingrealities2 жыл бұрын

    Great video, but wow, KZread's compression does not like the dithering one bit

  • @fujtkrisztian

    @fujtkrisztian

    Ай бұрын

    I thought I was the only one who thought how horrible it looked 😂

  • @snikm2057
    @snikm20573 жыл бұрын

    i've been waiting for something like this for so long, all your works are really awesome and interesting

  • @youknownuno
    @youknownuno Жыл бұрын

    Of all the things you could have done with your time, I for one appreciate that you made this video, made me smile in the moments that you did what would not be sane to do and go the extra mile for this clip. That's love for the job right there! All the best to you pal.

  • @aidanncloete
    @aidanncloete3 жыл бұрын

    I'm so glad you made this! Thank you.

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    I'm so glad you watched it! You're welcome!

  • @felipepeixoto8782
    @felipepeixoto87823 жыл бұрын

    OMG FINALLY ... i found the perfect channel, good shader programming and not that visual "programming style", please continue your shader tutorials

  • @flamshiz
    @flamshiz Жыл бұрын

    this has been super helpful. i'm currently trying to implement dithering on a 2-bit color system and i think i can see a way forward using this method

  • @blogigrodela
    @blogigrodela3 жыл бұрын

    Dude, I just thought about it and you already did .This is so awesome

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Dude, you thought about, told me and I travelled back in time to do it. (•_•) / ( •_•)>⌐■-■ / (⌐■_■)

  • @CadeTrigon
    @CadeTrigon3 жыл бұрын

    I wasn't expecting such a high quality video nor that this topic was so complicated. You explained it really well though.

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Thanks! The Quality+Explanations in my videos is something I've been working on for a really long time! This was actually the first video of mine with a "budget" as I spent a bit of money on a better mic setup xD

  • @demonyearz
    @demonyearz3 жыл бұрын

    saw your post on reddit and came here! great content.

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Thanks! Glad you enjoyed!

  • @BlackIcexxi
    @BlackIcexxi3 жыл бұрын

    This is amazing, thank you so much!!! Subscribed!!!

  • @josemanuel5205
    @josemanuel52053 жыл бұрын

    Mate, i can't believe you don't have millions of subs

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Haha it's a niche and I guess I can't devote enough of my time to it. But it's fun and I'm happy as long as people like you enjoy it!

  • @ItsDayHam
    @ItsDayHam3 жыл бұрын

    You deserve more subs, your videos are so entertaining atleast for me :D

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    I'm sure there are plenty other KZreadrs who deserve more subs than they get xD. I've done just about everything I can do to get more but in reality we're all at the whim of the algorithm. Tbf, at least my channel has a nice healthy growth as opposed to the ridiculous spikes other channels get when they're least prepared for it. As long as people like you enjoy them, I'm content =)

  • @latte4159
    @latte4159 Жыл бұрын

    the Patreon fakeout at the end was REALLY GOOD

  • @devzozo
    @devzozo2 жыл бұрын

    This is an amazing tutorial and walkthrough of how you arrived at the solution but goddamn I think the dithering by youtube compression.

  • @glass1098
    @glass10982 жыл бұрын

    I barely understood anything The bitrate killed himself everytime you switched from the game to the editor But that is on of the best videos i've watched this month, thanks

  • @technopriest8686
    @technopriest868620 күн бұрын

    there's a game called Critters for Sale that has this art style however they've also applied unique effects in addition to some video it seems? I'm wondering how you could apply this effect to a video recording like they did?

  • @AlanZucconi
    @AlanZucconi2 жыл бұрын

    Such a great video!

  • @Madalaski

    @Madalaski

    2 жыл бұрын

    Haha thank you kindly!

  • @psgames6551
    @psgames65519 ай бұрын

    Will you please make an example of this shader in ShaderToy and apply on any Video from ShaderToy?

  • @josephforjoseph
    @josephforjoseph2 жыл бұрын

    Yay! Thank you so much for sharing 😋 Fast but to the point. Will be using this if I go 3d for my game. Just curious are you able to do more than just 2 colors?

  • @-abigail

    @-abigail

    2 жыл бұрын

    Yes, you could use the difference between the sampled noise and the fragment colour (instead of the comparison in this shader) you can choose from an arbitrary palette. Would be interesting to see the results!

  • @MrBoko1234
    @MrBoko12349 ай бұрын

    Is this doable in Godot ?

  • @Madalaski

    @Madalaski

    9 ай бұрын

    Yeah definitely, the shader code is all the same. Just the effect of exporting different bits of information to the different channels might need a bespoke approach,

  • @neonswift
    @neonswiftАй бұрын

    Interesting questions... what specific games art styles are patented? I wasn't aware you could patent an art style, and thought you could only patent the process in which you create that art style. If you create the same art style using another technique that doesn't encroach on the process they patented then it wouldn't be a patent breach. Patents are based on technical specifications not the look of something.

  • @user-tu4lg8zc3n
    @user-tu4lg8zc3n2 жыл бұрын

    it's very nice shader graphics

  • @Madalaski
    @Madalaski3 жыл бұрын

    If you're interested in how I animated the code writing in this video, check out my GitHub where I've released a (pre-pre-pre-alpha) version of the Code Animator I wrote for it. It's made in Unity and uses TextMeshPro, not unlike my TMP tutorial from a few months ago! github.com/Madalaski/CodeAnimator

  • @pancakelele233
    @pancakelele233 Жыл бұрын

    Does this work with URP?

  • @alibabapro1071
    @alibabapro10712 жыл бұрын

    i dont understand what do i need to create

  • @plokie
    @plokie3 жыл бұрын

    Thats so awesome! I was beginning to make my own attempts to recreate this effect too and got quite far, but got totally stuck with the dithering. So thanks! Also I very much enjoy your use of code animator, I saw you post about that on twitter. Awesome stuff, you mentioned you'd be making it downloadable in your next video? No rush tho :D

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    It's uploading to GitHub as we speeeeeak!

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Uploaded! Link the in description! It's definitely not production ready but if you desperately need something like it should do the trick! Just make sure to read the instructions and look at my examples!

  • @plokie

    @plokie

    3 жыл бұрын

    @@Madalaski Awesome! Thank you so much, love your stuff :D

  • @antonsimkin
    @antonsimkin5 ай бұрын

    1:10 for my 2d scene its just white screen. failed at the first step.

  • @einkleinerrabe2023
    @einkleinerrabe20232 жыл бұрын

    Soo cool

  • @laughingvampire7555
    @laughingvampire755514 күн бұрын

    flashes of my old HP48G calculator's games

  • @Henrique02021
    @Henrique020213 жыл бұрын

    This is so cool! How one can use lights with this shader? Specifically spot light.

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Should just work exactly as normal! The only problem will be baking lights where Pope used his own solution.

  • @Henrique02021

    @Henrique02021

    3 жыл бұрын

    @@Madalaski For me Unity is creating some weird outline boxes around the area of a spotlight it's light is touching another object with the shader. imgur.com/2yCQSLF imgur.com/X0yZFpy

  • @anansitube
    @anansitube3 жыл бұрын

    Any chance you could port this to URP?

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    I linked to some videos at the beginning that should help you port it over, at least the first version of the effect!

  • @NikoDellic
    @NikoDellic3 жыл бұрын

    This is great. Can you hold our hands through an SRP version of this? xoxoxo

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Haha if you watch the video I link towards the start, plus my Advanced pixelation tutorial, you'll have more than enough information to do it I promise xD

  • @laughingvampire7555
    @laughingvampire755514 күн бұрын

    why C# people put the { in the wrong place.

  • @__dane__
    @__dane__3 жыл бұрын

    I remember working on an outline pass with some people and I discovered Lucas pope’s edge detection method for this game is used by a handful of edge detection shaders

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    It's a fantastic edge detection system! A bit performance-costly but looks as crisp as crisp can be. I just used a sobel filter here for simplicities sake.

  • @__dane__

    @__dane__

    3 жыл бұрын

    @@Madalaski initially someone else on the open project (unity’s open source initiative) was using a roberts cross sampling method. That led to some “wandering ants” effect so once we realized sobel was a thing that was the solution. Sadly the outline effect ended up being cut later as it was decided it was separating the characters from the background a bit too much Btw I’d recommend you check out Colin Leung on GitHub. Aka NiloCat

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    @@__dane__ I'll definitely check them out!

  • @adrianduke8447
    @adrianduke8447 Жыл бұрын

    Thanks for the help on my homework LOL

  • @juansebastianriosubeda4693
    @juansebastianriosubeda46935 күн бұрын

    Could I use this for my own game?

  • @Madalaski

    @Madalaski

    5 күн бұрын

    @@juansebastianriosubeda4693 yes

  • @HansPeter-gx9ew
    @HansPeter-gx9ew9 ай бұрын

    I am currently doing my Master in Games Engineering and I have no clue how you got so profcient in writing shaders. I know the math on a okay level, but the things you do are extremely technical and would take me weeks or months of frustration to find out/or not being able to do it at all (I shiver just when thinking about every badly documented Unity Function, bug, and lack of math knowledge to do it). I once wanted to do Phyiscs Calculation (stars) on a 2D texture and map it on the skybox and i couldn't make it work :/ like that

  • @Madalaski

    @Madalaski

    9 ай бұрын

    If you're already working on your Masters then trust me, you have the ability to learn how to do this. At the end of the day, what I learnt during my Master's degree is not often used in my day-to-day job as a Gameplay Programmer, but the skills I learnt in how to understand complex problems and use the resources at my disposal are used all the time. Even in this video, most of what I'm talking about is adapted from other (imo "worse") tutorials mixed in with what Pope said he did in his own Devlogs. The knowledge is out there, you just have to keep at it!

  • @HansPeter-gx9ew

    @HansPeter-gx9ew

    9 ай бұрын

    ​@@Madalaski Thanks for the response and the nice words! My current situation is: hey, I want to learn HRDP finally and make a pixel shader + crosshatch for my university project/game in HDRP, shouldn't be that hard, right?? After 4 intensive days I am still figuring stuff out == searching how Unity implemented it; I learned a lot, but am now behind every other course I have. Like how to implement in HDRP a stupidly easy sobel convolution (thanks to you and some other videos I now know) I totally agree that it's possible and that 99% of the tutorials copy from the next adding some of their ideas until you get to Unity itself, which also copied stuff etc., but my semester is so terribly packed with courses that when getting stucked is a huge problem. But like you said, I just have to learn to use my resources, so stepping back a little, prioritizing things and just do it, less whining :D I just watched your Advanced Pixel Tutorial-Like video and I think you can totally feel my frustration with Unity and their "Documentation". It could be so much easier, someone has just to tell me how and where...

  • @HansPeter-gx9ew

    @HansPeter-gx9ew

    9 ай бұрын

    And by the way, you may not be so aware, but it's very hard to be at your IT level. In IT, we're always surrounded by people who no-life their subject, are very advanced and intelligent, and have degrees, so we forget how far we've come ourselves and forget about the 50% that dropped out etc. It's like Counterstrike: the better you play, the better opponents you get. So thank you very much for sharing your knowledge and expertise with us, I really appreciate it!

  • @Madalaski

    @Madalaski

    9 ай бұрын

    @@HansPeter-gx9ew well something that I should stress is that your course should always take priority. Don't shirk off your coursework! Your personal projects and portfolio will always be waiting for you but your deadlines won't wait! The other thing is uh maybe hold off on HDRP. It's no secret that I'm actively avoiding Unity at the moment but the recent Cities Skylines release is a pretty good indicator that Unity's HDRP features are pretty awful for releasing games, and are really hard to scale back for lower or mid-end machines, despite the fact that they've been in development for years.

  • @Madalaski

    @Madalaski

    9 ай бұрын

    @@HansPeter-gx9ew well different things are difficult for different people. I know my fair share of people who dropped out of my course but I also knew people who struggled more but worked harder and relied on their fellow students (myself included) to understand better. But I would also counter-argue that it sometimes difficult to estimate how much more learning you have to get to a higher level of knowledge and it might be less than you think.

  • @clintonbeeler1678
    @clintonbeeler16783 жыл бұрын

    Commenting for the algorithm

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    The algorithm thanks you for your service!

  • @mr.budders8740
    @mr.budders87403 жыл бұрын

    For some reason I have your end credits song stuck in my head...

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    This was 100% my intention. Like this comment if you want me to release the song on Spotify.

  • @Ezui
    @Ezui Жыл бұрын

    is it ok if i used this in my game?

  • @Madalaski

    @Madalaski

    Жыл бұрын

    It's not really mine to say sadly. But I guess you can try and contact Lucas Pope on the forums or Twitter and ask.

  • @WhiteKnuckleRide512
    @WhiteKnuckleRide512 Жыл бұрын

    How come it looks good in the Obra Dinn though?

  • @Madalaski

    @Madalaski

    Жыл бұрын

    KZread compression and clear art direction via modelling.

  • @Cheesecannon25
    @Cheesecannon252 жыл бұрын

    What game was patented?

  • @Madalaski

    @Madalaski

    2 жыл бұрын

    I blurred it cuz I don't wanna bad mouth other developers. Tho the decision likely came from higher ups. There are plenty of examples (not the game being patented tho just mechanics within the game) but I guess the one I'm fine with pointing you towards is how Konami patented mini-games in loading screens for 20 or so years which is a big reason why games have never really had them.

  • @MrSharmabros
    @MrSharmabros3 жыл бұрын

    Im deeply in love with you

  • @pisdeds
    @pisdeds3 жыл бұрын

    Ахуенно получилось!

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Спасибо!

  • @SlamWeasel
    @SlamWeasel3 жыл бұрын

    RIP KZread Bitrate You wont be missed...because you ruin videos like this one

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Aw man "ruin" is a strong word. Just give the project a cheeky download ;)

  • @SlamWeasel

    @SlamWeasel

    3 жыл бұрын

    @@Madalaski its just a shame, because the part that is all about the different pattern s, you can't read really distinguish them very well, but your right, it's still a entertaining video ^^

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    You're not wrong to be fair but there's always a lesson to be learned. Here, it's that artistic techniques are just as important as programming techniques. Pope worked hard to make sure that their game was not only readable when playing but also when advertised and they did that by making sure there were lots of different faces for the edge filter, lots of flat light and dark areas so that they could be distinguished, plus different noise types and particles to brush up the scene. Unfortunately, I'm no artist, plus it's not that kind of tutorial but it's certainly not impossible to think and plan around this and you'll be a better game developer for it!

  • @SlamWeasel

    @SlamWeasel

    3 жыл бұрын

    @@Madalaski i beg to differ, i think you are a artist. Just as someone who plays a small role in a small movie still is a actor

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    @@SlamWeasel well okay yes I do consider myself and other programmers artists in that sense, I just meant I'm an amateur visual graphic designer 😂

  • @olliesampson5875
    @olliesampson58753 жыл бұрын

    Haha KZread Algorithm go brrrr

  • @Madalaski

    @Madalaski

    3 жыл бұрын

    Jesus, you got that right...

  • @lemonad903
    @lemonad903 Жыл бұрын

    I would like to know if I can create a face, a scenery, or a scene and then sell it as an NFT on a marketplace just like with any digital creation software.

  • @Madalaski

    @Madalaski

    Жыл бұрын

    I am very strongly against NFTs so please do not discuss them on this channel or use my code to generate them. :)

  • @alexanderwiseman715

    @alexanderwiseman715

    Жыл бұрын

    @@Madalaski W