Harnessing the Power of GPU to Draw Pixel Art Lines - Legacy Devlog #21

  Рет қаралды 178,314

aarthificial

aarthificial

Күн бұрын

Пікірлер: 321
@aarthificial
@aarthificial 3 жыл бұрын
Quick update 1) I've tried to render these lines using *line primitives* connecting points A and B: imgur.com/a/Path692 It seems that some angles are not pixel-perfect and chaining multiple lines together can result in random holes. 2) I thought that, in Unity, there's no way to change the primitives used by a mesh. It's not true - MeshTopology allows you to do just that. So that changes quite a lot of things. 3) Lesson learned - geometry shader bad. It's not supported on some hardware and tends to be less performant than, say, a compute shader. 4) Some of you have proposed some interesting methods of using a fragment shader to draw these lines. I'm currently looking into them. All in all, thanks so much for all the feedback! I'll try to improve the way I render lines. There will be a follow-up video if I come up with something interesting.
@sadpancake6563
@sadpancake6563 3 жыл бұрын
Can you please add reddit article url to description?
@aarthificial
@aarthificial 3 жыл бұрын
@@sadpancake6563 Thanks, totally forgot about it.
@uis246
@uis246 2 жыл бұрын
Have you looked to line width and conservative rendering?
@sipos0
@sipos0 2 жыл бұрын
OpenGL's rules about when polygons line up are confusing. It seems like there is no good reason to need triangles along the line instead of line segments, but I can completely imagine it not working with line segments.
@Dastmema
@Dastmema 3 жыл бұрын
The hability of this guy to make graphs for explanations always takes me out of guard
@aarthificial
@aarthificial 3 жыл бұрын
This whole channel is really just an excuse for me to make these graphs at this point
@Dastmema
@Dastmema 3 жыл бұрын
@@aarthificial can you teach us?
@alex.g7317
@alex.g7317 2 жыл бұрын
@@Dastmema I take that as a no then…
@galaxy3432
@galaxy3432 2 жыл бұрын
@@aarthificial can you teach us?
@yokowan
@yokowan 2 жыл бұрын
momiji profile picture spotted in the wild
@user-qu5pv2uv5m
@user-qu5pv2uv5m 3 жыл бұрын
I really hope a level creator is added to the final game it would be so sick
@aarthificial
@aarthificial 3 жыл бұрын
Totally agree!
@qualia765
@qualia765 3 жыл бұрын
@@aarthificial i like this answer
@brandonbaker2598
@brandonbaker2598 3 жыл бұрын
This production quality is impeccable.
@someonewithsomename
@someonewithsomename 3 жыл бұрын
TRUE!
@tseb668
@tseb668 2 жыл бұрын
Fr it’s insane
@YohanesVienas
@YohanesVienas 3 жыл бұрын
I absolultely love what you're doing. I don't even know what Astortion is gonna be exactly, but its getting bought, simply because of the technical side of things. This is so damn impressive
@aarthificial
@aarthificial 3 жыл бұрын
Thanks! Now as I think of it, I should probably make a video about what Astortion is exactly. Because I've never really talked about this in detail
@lemonlordminecraft
@lemonlordminecraft 3 жыл бұрын
@@aarthificial I cannot wait, you're one creative dude
@blackboxpup
@blackboxpup 3 жыл бұрын
i understand all of the individual pieces of this, but the fact that you've managed to both theorize a way to combine them AND also actually managed to follow through and build it astonishes me. thank you for sharing all of these clever ideas. your uploads are inspiring me to think more creatively about ways to make amazing things out of the skills i already have, and it's hugely empowering
@voidling2632
@voidling2632 Жыл бұрын
I understood absolutely nothing.
@KingGurke98
@KingGurke98 3 жыл бұрын
So glad I found this devlog; it always gives me a huge burst of inspiration to watch what you have done! It got me to return to an old game project aswell. Though I'm always amazed at how much care you put into Astortion's looks so early on...
@_kett2164
@_kett2164 3 жыл бұрын
once again your stuff blows me away! You could have done it the easy way but you did it in the coolest way possible instead!
@tiredko-hi-
@tiredko-hi- 3 жыл бұрын
WITCHCRAFT!! I'm dying Edit: Forgot to say amazing visualizations (as always) Wasn't bored, very much like this kind of stuff. Keep it up!
@aarthificial
@aarthificial 3 жыл бұрын
Thanks as always!
@t3ssel8r
@t3ssel8r 3 жыл бұрын
Cool work as usual :) Interesting how these days to get a pixel perfect line on GPU we have to resort to tessellation, geometry shaders, compute shaders, etc. In the past one might have been able to trust that GL_LINES was implemented with Bresenham's algorithm in hardware, but on my current machine this is not the case.
@aarthificial
@aarthificial 3 жыл бұрын
Thanks! Is there a way to use things like GL_LINES in SRP though? Also, now as you said it, I wonder if I could output a point primitive instead of a triangle in my geometry shader and make it work
@t3ssel8r
@t3ssel8r 3 жыл бұрын
​@@aarthificial I haven't looked too closely at what drawing functions are permitted in SRP. on the bleeding edge, SL5 has enableRandomWrite textures, or a compute shader can write directly to texture memory. Another thing that came to mind was to use the vertex shader to output a 3-pixel thick triangle strip (dirty region), and use a frag shader to get the pixel perfect lines. Bresenham's isn't optimal for frag shading in this case, but O(1) per fragment algorithms exist. It might be a reasonable tradeoff on platforms that don't support more advanced shaders, such as WebGL.
@sofi390
@sofi390 2 жыл бұрын
Ooo have you considered using this system to give her real-time ponytail physics? I rarely see it done in pixel games and with all the innovations you’ve made it would be interesting to see! It may add a sense of physicality that would fit in well with the aesthetics! I can see how custom animations also have their own benefits as well tho
@takieddinbalti6956
@takieddinbalti6956 Жыл бұрын
This is so insane. I started to feel like an intermediate as a game developer. But you make me feel like an absolute beginner again. 😮‍💨
@erikahlundhelguera
@erikahlundhelguera 3 жыл бұрын
This is seriously amazing! I've wanted to implement the VelocityBuffer in my top down game for a while and this just convinced me to do it
@Xeraclom14
@Xeraclom14 3 жыл бұрын
Babe wake up new Aarthificial video
@JujuProdGames
@JujuProdGames 3 жыл бұрын
The motion graphics in this video are incredibly well made. Awesome work!
@PabloPazosGutierrez
@PabloPazosGutierrez Жыл бұрын
I'm not into gaming or animation, but been watching your videos, and I really like how you explain things and make visual cues. Simply awesome.
@salabimsalabao
@salabimsalabao 3 жыл бұрын
The editing is amazing and the game is looking really good so far! Also, congrats on 15k! you deserve it and much more
@aarthificial
@aarthificial 3 жыл бұрын
Thank you!
@MichaelSchultzSF
@MichaelSchultzSF 3 жыл бұрын
You're updates are so incredible. Not just the content but the way it's presented. Keep it coming and thanks so much for spending time explaining your process.
@m1che_
@m1che_ 2 жыл бұрын
Ur devlogs are so well made and the explanations are pretty easy to understand. I'm going to just binge every single one now.
@alexanderrotmg
@alexanderrotmg 3 жыл бұрын
Community: How much detail do you want? aarthificial: yes.
@LanK111er
@LanK111er 3 жыл бұрын
hey love your way of going about things by finding the absolute best solution to the problem even if its complete overkill for what you want. It's fun to watch.
@canadianblitz3468
@canadianblitz3468 3 жыл бұрын
I love how you went through everything in detail!
@monawoka97
@monawoka97 3 жыл бұрын
I've worked in the game industry for a bit now and I've started to develop a smell for when things are implemented the right way vs the wrong way. Let me tell you this smells fucking great.
@zenzizenzic
@zenzizenzic 2 жыл бұрын
+
@joshbishop
@joshbishop 3 жыл бұрын
I never clicked on a notification thumbnail so quickly
@vb0t429
@vb0t429 2 жыл бұрын
Impressive solution and implementation!
@AyyyyyyyyyLmao
@AyyyyyyyyyLmao 3 жыл бұрын
This is incredible. You need to man a dev team just to bring these tools to the rest of us. The world needs you!
@WuchtaArt
@WuchtaArt 3 жыл бұрын
This video is like a line: straight to the point
@tastygold
@tastygold 2 жыл бұрын
Shaders are absolutely brain melting to me, I have never got my head around it. I need to try learn how to make stuff like this. The velocity shader was mind blowing!
@theblackkoopa2329
@theblackkoopa2329 3 жыл бұрын
Just saying that all of the effort you put into explaining the technical details of your project is what keeps me, as an avid programmer myself, invested!
@Grivel176
@Grivel176 3 жыл бұрын
Absolutely Magnificent. I don't really understand all of the complexity of such a thing but the result is stunning.
@NeoWisp777
@NeoWisp777 2 жыл бұрын
Wow that is beautiful! Well done and thank you for sharing your video.
@blueberrygames321
@blueberrygames321 3 жыл бұрын
I love how you went from explaining the compushader with arrays to an arrow with "witchcraft" and the end result. This is often how I feel about a lot of this, the math is so far beyond my paygrade its insane.
@aarthificial
@aarthificial 3 жыл бұрын
Tbf, the math would deserve a separate video but the reddit post in the descriptions does a really good job explaining it
@adt4864
@adt4864 3 жыл бұрын
Oh my gosh these graphics are so beautiful!
@gavaii
@gavaii 3 жыл бұрын
Love the minimalistic look of the explanations!
@plusmorale
@plusmorale 3 жыл бұрын
Almost 4 minutes of pure infromation. Always enjoy Astortion Devlogs
@PrabowoMurti
@PrabowoMurti Жыл бұрын
Your excellent work has a great impact to the humanity. Thank you.
@AlmantasKli
@AlmantasKli 3 жыл бұрын
Gorgeous video from start to finish, super excited to see what you make next!
@dawidpietrykowski
@dawidpietrykowski 3 жыл бұрын
Amazing work, quality of the animations is incredible, can't wait to see more devlogs like this from you
@igrb
@igrb 3 жыл бұрын
The systems you make for the game are so cool, really like how you explain them
@abdusalammalaev2338
@abdusalammalaev2338 3 жыл бұрын
I REALLY LIKE YOUR VIDEOS! This awesome infographics, this nice style of telling, minimalism and other... It is so nice to watch!
@GregoryTheGr8ster
@GregoryTheGr8ster 3 жыл бұрын
I love what you are doing with the GPU here! The GPU is the best invention since the invention of the personal computer itself. The GPU inspires ingenuity.
@filipemecenas
@filipemecenas 2 жыл бұрын
I dont understand much , but im keeping watching ! Because It looks fantastic , im enjoying your Channel ! Thanks for sharing all this cool tips of your jorney
@bishan_8617
@bishan_8617 3 жыл бұрын
The graphs used to explain stuff in your videos are always so satisfying & clean, also I don't know what you mean by "This time I'll bore you," this was a nice interesting video that was simple and concise :)
@thezestychunk5575
@thezestychunk5575 3 жыл бұрын
Dude I’ve been follow you for awhile now and it’s just so sick seeing you working hard and trying new things. The game looks absolutely amazing, and the art and atmosphere are perfect
@aarthificial
@aarthificial 3 жыл бұрын
Thanks so much!
@devjeanayala
@devjeanayala 3 жыл бұрын
I'm so exiting to see how this evolve
@yoctometric
@yoctometric 3 жыл бұрын
This is really neat! Thanks for the stunning quality and lovely explanations as always
@Lolatronn
@Lolatronn 3 жыл бұрын
1:57 I laughed a bit to hard at the "witchcraft" arrow.
@Tubeytime
@Tubeytime 2 жыл бұрын
Never thought I would called game dev beautiful but here we are
@krycerkris
@krycerkris 3 жыл бұрын
Love your videos! Clear, informative, visually interesting. And the project itself is simple, but full of passion! Amazing work!
@aarthificial
@aarthificial 3 жыл бұрын
Thanks so much!
@hopesndreams5033
@hopesndreams5033 2 жыл бұрын
ohhhhhhhhhh that rope is so satisfying, I can't WAIT to play this game
@sinus4784
@sinus4784 3 жыл бұрын
another amazing devlog video i can't wait for the next one! this was really cool i want to try to replicate this in godot at some point
@FireNLightnin
@FireNLightnin 3 жыл бұрын
You and Sebastian League are the two most talented/innovative programmers I've ever seen.
@aarthificial
@aarthificial 3 жыл бұрын
I'm honored to even be compared to him
@nasta4554
@nasta4554 3 жыл бұрын
You are a genius dude! I'm loving these videos keep it up
@elvismd
@elvismd 3 жыл бұрын
As always you solve these problems in intrresting ways, amazing!
@web_dev_cz
@web_dev_cz 2 жыл бұрын
Man, you are crazy. So inspirative, sooo well made and amazingly thought out. Kudos. P.S. I absolutely love your graphics, the font, the colors, the color accent and icons, work with whitespace... ah, a true bliss. I'm in daze how you manage it beside the project :) Best wishes with project and in life. (I noticed you quit your job recently what the hell you also worked fulltime ?!?!?!)
@Domarius64
@Domarius64 2 жыл бұрын
Genius... I love pixel art and it's great to see it marrying with modern technology.
@EVILBUNNY28
@EVILBUNNY28 3 жыл бұрын
Sebastian Lague AND aarthificial upload a video on the same day! Am I in coding heaven?
@lucianorubio9129
@lucianorubio9129 3 жыл бұрын
Your project is amazing!
@NishanGhoshgameshamelame
@NishanGhoshgameshamelame 3 жыл бұрын
Thumbs are held up high! Nice showcase, Also liked the memento at the end. XD
@AstonishedByTheLackOfCake
@AstonishedByTheLackOfCake 3 жыл бұрын
your work never ceases to amaze me, this is truly some next level shit and your dedication really shows
@gefulltetaubenbrust2788
@gefulltetaubenbrust2788 3 жыл бұрын
This video is great, you’re getting better and better with each one. Just one thing: There IS a way to render lines using the GPU, as there are render modes for that in the graphics APIs. But this might not be possible with Unity, so a rather minor point.
@aarthificial
@aarthificial 3 жыл бұрын
Thanks so much! I've added a pinned comment a moment ago. It may address some of the things you're referring to
@RetroDead
@RetroDead 3 жыл бұрын
babe wake up, new Astortion devlog
@jordy15322
@jordy15322 3 жыл бұрын
Great editing and content as always, keep up the good work!
@jgtb0pl
@jgtb0pl 2 жыл бұрын
that's nice form of foreshadowing
@Skeffles
@Skeffles 3 жыл бұрын
That looks awesome with all those ropes.
@SuperGamersgames
@SuperGamersgames 3 жыл бұрын
Small stuff like this always get me in development. No player will ever care about these additions, BUT ALL THE DEVS WILL. Like have an editor for the lines?? You're almost making me want to switch to Unity (almost)! Also, wow, foreshadowing and I didn't even know it.
@bezimienny5
@bezimienny5 3 жыл бұрын
Nice. Now we can finally get next gen 8k hair similations in 2d on our characters. Good job!
@noiJadisCailleach
@noiJadisCailleach 3 жыл бұрын
You are a GENIUS!
@meady200
@meady200 2 жыл бұрын
Absolutely goddamn amazing!
@tulasigopinath
@tulasigopinath 3 жыл бұрын
3:07 you should make a secret room called The Room of Thousands Nodes, this is very satisfying to see
@plzbgaming
@plzbgaming 3 жыл бұрын
Impressive as always
@syncarn
@syncarn 3 жыл бұрын
What do you do for a living? You have more skill than most professional Unity devs I work with every day! Great video :)
@aarthificial
@aarthificial 3 жыл бұрын
Thanks! I've been a full stack developer for about two years now
@syncarn
@syncarn 3 жыл бұрын
@@aarthificial Awesome! Not sure where you live, but if you are in the US, Canada, Argentina, Germany, or Columbia and you are interested in working on mobile games professionally with Unity then send me a message. I have some connections... :) Edit: Also possibly Poland which I saw listed somewhere. We have a few devs there too ;)
@nguyenhoangminhtrung2779
@nguyenhoangminhtrung2779 Жыл бұрын
What is this godsends content I just found?
@liltrashpanda174
@liltrashpanda174 2 жыл бұрын
This is the kind of stuff that makes me want to get into game development.
@mrpedrobraga
@mrpedrobraga 3 жыл бұрын
You're awesome, dude.
@captaincyborg1429
@captaincyborg1429 3 жыл бұрын
I really like the editing. Good job!
@aarthificial
@aarthificial 3 жыл бұрын
Thanks!
@arnerademacker
@arnerademacker 3 жыл бұрын
You know, most people would just put sprites on screen and be happy. Great devlog :D
@JustATempest
@JustATempest 3 жыл бұрын
The definition of over engineering. Great work!
@ZealZeal
@ZealZeal 3 жыл бұрын
I usually don't click on notifications, but I will make an exception out of you
@MelonSiggi
@MelonSiggi 2 жыл бұрын
At this point he's about to make cloth simulation in a pixel game. Neat!
@DolphinDev
@DolphinDev 3 жыл бұрын
Super interesting concept!
@Junivieve
@Junivieve 3 жыл бұрын
This man is a genius
@Timbobs
@Timbobs 3 жыл бұрын
Thank you for accurately describing a process as witchcraft 😄 I have no idea why youtube sent me here, but it’s fascinating.
@ruzco4873
@ruzco4873 3 жыл бұрын
You're a genius omg
@fledered6967
@fledered6967 3 жыл бұрын
This is some dzrk magic happening right there. This is amazing
@MechanizationStudio
@MechanizationStudio 2 жыл бұрын
awesome! I love performance!
@Eldarduil
@Eldarduil 2 жыл бұрын
wow thank you, it's very inspiring to me.
@Zarokii
@Zarokii 2 жыл бұрын
my man is thinking on supporting low hardware in a pixel art game, truly champ!
@UnofficialFoneE
@UnofficialFoneE 3 жыл бұрын
Great work as always!
@parsuli.
@parsuli. 3 жыл бұрын
I cannot wait to get this game when it comes out and spend hours trying to speedrun it while my eyes rest on its fabulous art... And I've only seen two devlogs, and don't even know what kind of game it'll be (thought I suspect a platformer of some kind).
@nikhilsood9501
@nikhilsood9501 3 жыл бұрын
Good Job M8. Obviously not only subscribing the channel but also eagerly waiting for the next video as well. ^_^
@aarthificial
@aarthificial 3 жыл бұрын
Thanks and welcome aboard!
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 3 жыл бұрын
3:23 big brain move ;)
@foobar2285
@foobar2285 3 жыл бұрын
This is very cool! Drawing pixel perfect lines is notoriously hard to do on the GPU. I believe it should be possible to do this without creating a triangle for every pixel in the geometry shader though, by instead using a quad that is stretched between the two end points. If you are rendering at a lower resolution, a way of achieving the pixel perfect line effect would be to: 1. Set the UVs of the quad so that the zero cross boundary is along the the centre of the quad (where you want the line to be). In the other direction, make sure that the uvs do not reach the zero cross boundary. So, for example, if you designate the x-axis as the line axis, then set the lower edge to v=-0.5, the top edge to v = 0.5, and the u values of each vert to any non-zero positive values: *(0.5,0.5)------------*(0.5,0.5) | | --------------------------- (this is where the line will be) | | *(0.5,-0.5)-----------*(0.5,-0.5) 2. Stretch the quad between your two line points. You could do this in the compute shader to save streaming bandwidth. 3. In your fragment shader, use the screen space partial derivative functions to determine the fragment where the zero cross boundary is. If you designate x as the line axis, I believe you can calculate it like so: vec2 fractional = abs(fract(uv)); vec2 partial = abs(fwidth(uv)); vec2 point = smoothstep(-partial, partial, fractional); float s = 1.0 - clamp(point.x * point.y, 0., 1.); 4. Use 's' to determine whether this fragment should be transparent/discarded or be your line color. (Edit) here is a simple shader toy demo: www.shadertoy.com/view/sts3zB Hope that makes sense! Best of luck with your game :)
@aarthificial
@aarthificial 3 жыл бұрын
Thanks so much for taking your time to write this! I'll test it out later today. Although - initial thoughts - this would fill all the fragments that cross the UV's x axis right? So the result would be slightly thicker than Bresenham's implementation?
@foobar2285
@foobar2285 3 жыл бұрын
@@aarthificial Using the fractional component of the uv to smooth step the derivative is a neat trick that makes the line exactly 1 fragment thick :) That being said, this method is fairly dependent on the precision of the hardware that it is running on. You would probably have to feed the result through a step function first to filter out (unfortunately quite a bit of) floating point error. That's not to say that this method is unfeasible: I vaguely remember reading that Unity uses something similar to draw the grid in the scene view. You can also improve the precision by making the quads wider (at the cost of more fragments).
@tedchirvasiu
@tedchirvasiu 3 жыл бұрын
This is super smart
@mylesfranco3545
@mylesfranco3545 Жыл бұрын
well thats cool!
@innovativename5268
@innovativename5268 3 жыл бұрын
Interesting, thanks
@SilentOnion
@SilentOnion Жыл бұрын
3:15 looks scary. Like hair growing out of the cealing
@2tvtv
@2tvtv 3 жыл бұрын
the prophecy has been fufilled. we now have swaying cables
@Javantea
@Javantea 2 жыл бұрын
I understand the value of having pixel perfect lines in real-time but you can get a very similar effect with much less effort by using meshes. I did a simple test and using a simple alpha texture also works. Rendering it carefully would make it 1 pixel wide. That said, thanks for the idea. The idea of dangling ropes is pretty cool.
@freddysingbot7400
@freddysingbot7400 2 жыл бұрын
Nice ropes. I use moho for pixel animation. Just disable antialiasing and add a pixelation value to the project... the vector drawings then create nice crisp sharp pixel renders
Stealing Control from Players - Legacy Devlog #22
3:41
aarthificial
Рет қаралды 103 М.
Schrödinger's Levels - Legacy Devlog #27
6:25
aarthificial
Рет қаралды 239 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
The Minecraft Movie memes are way too good.
8:10
Phoenix SC
Рет қаралды 312 М.
Color Quantization and Dithering
11:55
Acerola
Рет қаралды 443 М.
How to Make Pixel Art Isometric Tilesets
9:48
Apox Fox
Рет қаралды 4,6 М.
Smooth Parallax - Pixel Renderer Devlog #2
8:18
aarthificial
Рет қаралды 118 М.
Programming Is Cooked
9:30
ThePrimeTime
Рет қаралды 173 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,6 МЛН
This Should Be Impossible...
23:05
Alec Steele
Рет қаралды 489 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,2 МЛН
Remaking the First Area of my Game
11:45
Legend 64
Рет қаралды 69 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН