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
Great video, but wow, KZread's compression does not like the dithering one bit
@fujtkrisztian
Ай бұрын
I thought I was the only one who thought how horrible it looked 😂
i've been waiting for something like this for so long, all your works are really awesome and interesting
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.
I'm so glad you made this! Thank you.
@Madalaski
3 жыл бұрын
I'm so glad you watched it! You're welcome!
OMG FINALLY ... i found the perfect channel, good shader programming and not that visual "programming style", please continue your shader tutorials
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
Dude, I just thought about it and you already did .This is so awesome
@Madalaski
3 жыл бұрын
Dude, you thought about, told me and I travelled back in time to do it. (•_•) / ( •_•)>⌐■-■ / (⌐■_■)
I wasn't expecting such a high quality video nor that this topic was so complicated. You explained it really well though.
@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
saw your post on reddit and came here! great content.
@Madalaski
3 жыл бұрын
Thanks! Glad you enjoyed!
This is amazing, thank you so much!!! Subscribed!!!
Mate, i can't believe you don't have millions of subs
@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!
You deserve more subs, your videos are so entertaining atleast for me :D
@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 =)
the Patreon fakeout at the end was REALLY GOOD
This is an amazing tutorial and walkthrough of how you arrived at the solution but goddamn I think the dithering by youtube compression.
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
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?
Such a great video!
@Madalaski
2 жыл бұрын
Haha thank you kindly!
Will you please make an example of this shader in ShaderToy and apply on any Video from ShaderToy?
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
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!
Is this doable in Godot ?
@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,
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.
it's very nice shader graphics
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
Does this work with URP?
i dont understand what do i need to create
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
3 жыл бұрын
It's uploading to GitHub as we speeeeeak!
@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
3 жыл бұрын
@@Madalaski Awesome! Thank you so much, love your stuff :D
1:10 for my 2d scene its just white screen. failed at the first step.
Soo cool
flashes of my old HP48G calculator's games
This is so cool! How one can use lights with this shader? Specifically spot light.
@Madalaski
3 жыл бұрын
Should just work exactly as normal! The only problem will be baking lights where Pope used his own solution.
@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
Any chance you could port this to URP?
@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!
This is great. Can you hold our hands through an SRP version of this? xoxoxo
@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
why C# people put the { in the wrong place.
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
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__
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
3 жыл бұрын
@@__dane__ I'll definitely check them out!
Thanks for the help on my homework LOL
Could I use this for my own game?
@Madalaski
5 күн бұрын
@@juansebastianriosubeda4693 yes
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
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
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
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
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
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.
Commenting for the algorithm
@Madalaski
3 жыл бұрын
The algorithm thanks you for your service!
For some reason I have your end credits song stuck in my head...
@Madalaski
3 жыл бұрын
This was 100% my intention. Like this comment if you want me to release the song on Spotify.
is it ok if i used this in my game?
@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.
How come it looks good in the Obra Dinn though?
@Madalaski
Жыл бұрын
KZread compression and clear art direction via modelling.
What game was patented?
@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.
Im deeply in love with you
Ахуенно получилось!
@Madalaski
3 жыл бұрын
Спасибо!
RIP KZread Bitrate You wont be missed...because you ruin videos like this one
@Madalaski
3 жыл бұрын
Aw man "ruin" is a strong word. Just give the project a cheeky download ;)
@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
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
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
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 😂
Haha KZread Algorithm go brrrr
@Madalaski
3 жыл бұрын
Jesus, you got that right...
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
Жыл бұрын
I am very strongly against NFTs so please do not discuss them on this channel or use my code to generate them. :)
@alexanderwiseman715
Жыл бұрын
@@Madalaski W