- Видео 14
- Просмотров 74 696
PixTrick
Франция
Добавлен 2 фев 2015
I'm a French beginner game dev enjoyer that just wants to share his work.
This is my main hobby and this channel is the perfect place for me to show you the results of my experiments or researches.
Please let me know what you think of it (especially if you dislike), i'm eager to learn and to improve :)
This is my main hobby and this channel is the perfect place for me to show you the results of my experiments or researches.
Please let me know what you think of it (especially if you dislike), i'm eager to learn and to improve :)
[TUTORIAL] Unity Shaders - Vertex, Fragment and Fundamentals
Hey, game dev enjoyers!
In this episode, we focus on the rendering pipeline as well as fundamentals you have to know before actually writing shaders. I hope you'll like it (and if you do, don't forget to like and subscribe) :D
Feel free to add some things or to correct me in the comment section, i'll be glad to answer! I've tried to be as concise as possible, but tell me whether you would like me to take more time or not.
Also, you can join the discord server of the community if you want to discuss about your projects and/or about game dev in general, everyone is welcomed !
Here's the link : discord.gg/TnGhH5CAnj
In any case, i'll see you in the next episode !
Take care !
Chapters:
0:00 Intro
0:36...
In this episode, we focus on the rendering pipeline as well as fundamentals you have to know before actually writing shaders. I hope you'll like it (and if you do, don't forget to like and subscribe) :D
Feel free to add some things or to correct me in the comment section, i'll be glad to answer! I've tried to be as concise as possible, but tell me whether you would like me to take more time or not.
Also, you can join the discord server of the community if you want to discuss about your projects and/or about game dev in general, everyone is welcomed !
Here's the link : discord.gg/TnGhH5CAnj
In any case, i'll see you in the next episode !
Take care !
Chapters:
0:00 Intro
0:36...
Просмотров: 608
Видео
Unity Shaders - A Quick Overview (in 3 minutes)
Просмотров 1 тыс.7 месяцев назад
Hey, game dev enjoyers ! Here's the first video of a series about shaders. This episode is a quick overview of what are shaders, i hope you'll like it (and if you do, don't forget to like and subscribe) :D Feel free to add some things or to correct me in the comment section, i'll be glad to answer ! Please join the discord server of the community if you want to discuss about your projects or ab...
[TUTORIAL] Stencil buffer in Unity URP (cutting holes, impossible geometry, magic card)
Просмотров 28 тыс.Год назад
Hey game dev enjoyers! Here we are: the mighty tutorial about the stencil buffer that I’ve been working on for weeks now. I hope you’ll enjoy it ;) WARNING: Please make sure to follow the instructions of the “IMPORTANT” chapter (it's only 30 seconds long no worries), otherwise you would not be able to use the stencil buffer. The shader and the 3D model of the impossible geometry : github.com/Pi...
Stencil buffer in Unity URP (advanced hole cutting, ground crack, magic card)
Просмотров 1,8 тыс.Год назад
Hey game dev enjoyers ! Here's the last video showcasing my work on the stencil buffer in Unity. I'm currently working on a huge video about this topic, so there's no need to ask for a tutorial this time ;) EDIT : Here's the link to the tutorial : ruclips.net/video/y-SEiDTbszk/видео.html Also, I created a discord server to discuss about the videos and to build a little community of game dev enj...
Monument Valley movement system remake in Unity
Просмотров 1,2 тыс.Год назад
Hey game dev enjoyers ! Here's my work on the Monument Valley movement system. The main difference is that i did not use some pathfinding to move the player, so that the player can move freely. The full Monument Valley gameplay : ruclips.net/video/Yy2bXqs0x3o/видео.html Let me know if you're interested in a tutorial or some explanations ! Also, I created a discord server to discuss about the vi...
Stencil Buffer in Unity URP (cutting holes, impossible geometry/magic box)
Просмотров 2,1 тыс.Год назад
Hey guys, here's a different topic than usually ;) I did not use the ProBuilder tool to cut holes but only the stencil buffer. Let me know if you're interested in a tutorial or some explanations. EDIT : Here's the link to the tutorial : ruclips.net/video/y-SEiDTbszk/видео.html Also, I created a discord server to discuss about the videos and to build a little community of game dev enjoyers, like...
[TUTORIAL] Interactive Shadows in Unity
Просмотров 5 тыс.Год назад
Hey, game dev enjoyers ! Here's the tutorial on the interactive shadows, i hope you'll learn some things ! I tried to keep it as short as i could, but i also tried to explain different things at the same time. If i said something wrong or that is irrelevant in the video, please tell me in the comment section. I'll be glad to answer ! The scripts made in the tutorial : github.com/PixTrick/Intera...
3D Volumetric Shadows in Unity
Просмотров 982Год назад
Hey guys, this is one of the last shadow-related topics i worked on. Disclaimer : this is not a light shaft technique nor a volumetric light technique. This is basically a mesh created by the projection of some object vertices in the light direction, depending on what type of light it is. I admit the shadows can behave weirdly sometimes in motion, still this is great for static shadows. I'm wor...
Interactive Shadows in Unity
Просмотров 2,1 тыс.Год назад
Just a showcase of my work on interactive shadows in Unity. Let me know if you're interested in a tutorial or more in-depth explanations ;) EDIT : The link to the tutorial : ruclips.net/video/3MnA8lYQ_P0/видео.html (I admit i tried to make a more attractive thumbnail) Cheers ! #unity3d #gamedev #shadows #interactive
[TUTORIAL] Custom Shadows in Unity URP using Shader Graph
Просмотров 26 тыс.Год назад
Here we are. I tried to keep it as short as i could, but i also tried to explain different things at the same time. If i said something wrong or that is irrelevant in the video, please tell me in the commentary section. I'll be glad to answer ! Regarding the files needed for the custom shadows : github.com/PixTrick/PixTrickCustomShadows To configure a URP project from a built-in one : ruclips.n...
Shleep Chaser
Просмотров 204Год назад
Hey ! I just finished a game jam and released my game. Go check it out if you're interested : pixtrick.itch.io/shleep-chaser Cheers ! EDIT : The final results got me 3/66 for the jam :D #unity3d #gamedev #gamejam #puzzle #puzzlegame #sleep #sheep
Mirrors in Unity URP (read description)
Просмотров 1,3 тыс.Год назад
A showcase of my work on mirrors in Unity URP. This is NOT a reflection probes technique, it is just uses a camera, a render texture and the power of mathematics. Let me know is you're interested in a tutorial or more in-depth explanations ;) Cheers ! #unity3d #gamedev #mirror #reflection
Custom Shadows in Unity URP using Shader Graph
Просмотров 2,1 тыс.Год назад
Just a showcase of my work on custom shadows using Shader Graph in Unity. Here's the tutorial : ruclips.net/video/GiJbur0CrnU/видео.html I used a toon shader base that i modified to get this result. I used this video for the base : ruclips.net/video/K5yhPrjttaI/видео.html Cheers ! #unity3d #shadows #gamedev #shaders
Amazing tutorial! I'm currently having some preformance issuses in my VR project while using the solution you show us on video. Do you have any performance tips to VR projects? or any performance tips in general? thanks!!
What method should I use if I want to render mouth over beard of each character even when beard is covered mouth? I tried following your video but mouths of all characters is now rendered over every character's beard.
I don’t understand what is wrong
How to make this shader work in HDRP 14.0.11?
Why don’t you use URP for non-realistic rendering?
@@pixtrick my project is already being made in HDRP. I'd like to add something like this into my game
@@JayPatel-t7z All right. It is definitely possible to use this shader in HDRP, but you would have to remake the custom function node retrieving the light direction. It's not a big deal since I'm pretty sure there is a main light direction node, but you would not be able to use casted shadows
Fantastic video! Please bell the new video! I want to add shadows to my vert/frag shader, but the topic is scattered at best.
Thanks a lot! It is one of the topics I want to cover, so stay tuned!
Are there any tips for adding a ramp shading?
Sure! Change the step node after the dot product by a smoothstep one and you'll have it
This is really cool! Question: is there a way to make this a postprocess/fullscreen shader instead of only doing it for on mesh at a time?
Thanks! It is possible indeed. An easy way would be using the same texture for every object of the scene as well as modifying the space of the texture, making it screen space. If you really want to make it as a post-process, it would be much more complicated, as you would need to "mark" every shadow pixel before drawing them with a texture. I think this is possible to modify the base shadowmap shader in order to do this, but i have never tried that. Maybe a topic for another video? Who knows ;)
@@pixtrick Thank you so much!
Bro, because of you i have a very good prototype of my game. I want you to know that your content is veryyyyyy good, way better than most tutorials. So please, keep posting, even if only when you have time
That’s wonderful! I'd be glad to see it! I will continue posting, I just haven’t got the time for now
Hi, im having trouble with the texture not loading for some reason. Im using urp and Unity 2022.3.50f. When I try to apply it to a gameobject it becomes purple (missing texture)
Hi! Does it turn purple only when you try applying a texture?
I appreciate the video but honestly this is so fn complicated. UPDATE: I got it working. Took some real concentration 😅 appreciate your help here!
Yeah, it is quite difficult to grasp. Glad you got it working though!
@@pixtrick mostly, but I realize this doesn't completely work for my use-case. I need to make a hole in an object, but only if the "hole creator" object is actually visible, i.e. not occluded. With you example, the "hole creator" can be behind the object (occluded) and it will still make that part invisible.
You would have to use the depth buffer on top of the stencil buffer for that. You can dm me on discord if you want to talk more about it
458 views? Bro this was pretty good, I appreciate the video!
Thanks a lot!
Thanks a lot. You saved me!
Please make more shader tutorials!
I will !
Ton accent français te trahit :) Très bon tutoriel. J'apprécie beaucoup ta chaîne YT - très pédagogique. Bonne continuation ++
Je ne m'en déferai jamais de celui-là ;) Merci beaucoup, ça me touche !
You didn't use DistanceAtten right? or did I miss something. Also, suggestions for adding normal maps to this? Just WorldNormal and BlendNormals node or something?
I didn't use DistanceAtten indeed About the normal map, you should add a texture for the normal map, then multiply the output of the texture sample 2D node with the normal vector, and use the result instead of just the normal vector for the dot product with the light Hope that makes sense
Я очень сильно хочу увидеть твой туториал
I was looking for this!! Thank you sooo much
Thanks! It's a great tutorial, worked perfectly right off the bat.
Please when it's the next video coming out 😭 love ur work
Patience mate! I'm a bit overwhelmed these last months but I will definitely make the sequel in the future
Great tutorial! I have a question, why do we create a new layer for each view? Can’t we modify the materials of each object and change their stencil ref values to be equal to 1 2 3 4 respectively and set the test to equal? I don’t want to clutter the project with many layers just for some effect. Same for the first ground crack effect. Follow up Q for the Mask shader, could we have said Comp Never and Fail Replace? Wouldn’t that also make the mask invisible? Would we still need Blend Zero One in that case? Another follow up Q.. for the objects that fail the stencil test and not get drawn, does Unity still write them to the depth buffer?
Only great questions here! About the layers, you can use materials that have stencil behaviours for the objects in the cube without having to modify their layer indeed. The drawback of this method is that you have to create a custom shader for these objects so that you can customise their stencil behaviour. You wouldn't be able to use any material for these objects, whereas you can with the layer method. About the mask shader: yes, Comp Never / Fail Replace is a great method for making an invisible mask. However, it won't draw at all, so it won't write into the depth buffer. It could be annoying for some edge cases, but for I tend to prefer that approach too. You don't need ZWrite Off or Blend Zero One with that technique, I find that quite elegant. About your last question, I partially answered it before but just to clarify: if a pixel fails the stencil test, it is not rendered. If it is not rendered, it cannot write into the depth buffer. Hope that helps!
@@pixtrick Amazing! Thank you
this is truly amazing, thank you for your mind boggeling work
Could this be used for making bullet holes on walls etc?
If you want to see through the hole, yes it could be useful. However, most games use decals for that, which is basically slapping a bullet impact texture on a wall. Still, I would be curious to see that! That's kind of a good idea :)
So nice, I'd love to have a tutorial on this plz!!!
This helps a lot! You make my day!🤫
what sorcery is this? i must know!!! we need a tuto
Yes please do a tutorial!
Great video, thank you for your work !
It is my pleasure!
This custom shadow's work on the floor and ever other mash I have on the Sean ? The reason I asked it's because if that is and If the transparentcy work with this I will able make shadow's for glass and other similar stuff. For example if have glass bottle I will able to make White showdow and experiment with paternt in the order to look like better. Shame on the beer bottle 🍾 I will make green transparent shadow and I will look so much better seen if I add normal shadow on those object looks pretty bad.
This shader works only for opaque rendering, it does not handle the transparency unfortunately ... It would be something to dig in if I would remake this shader
@@pixtrick i know that but if is possible to make the shadow to have lighter color's and add objects that only have shadow I'm probably able to make the system i wand to make.
Nice Video, Learn A Lot
That's good news!
Hello! Reallyyyy cool shader! Do you know why it makes my pattern still show in the whole object and not just the shadows that we create?
Hey ! Thanks ! Yes it's my bad actually, I should do an updated version of this tutorial since it's quite old now. It's due to the order in the operations, I posted a fix last week on the GitHub repository if you want to take a look !
Is this effect somehow possible with depth priming set to auto or forced?
Not sure, but all the tests I've made so far point to the fact it is not
I'm confused as to why I'm getting this error. Shader error in 'Shader Graphs/Master': 'MainLight_float': output parameter 'Direction' not completely initialized at Texture/CustomLighting.hlsl(4) (on d3d11) Using Unity 2022.3.20f1
Hey ! You can check the pinned comment, maybe it would solve your problem
@@pixtrick I found the problem I was not using URP T_T Anyways awesome video and I appreciate the response!
@@JeebZ-3D happens x)
I think this 3D mask system i was looking for i will definitely do some tests tomorrow.
Don't hesitate to message me on discord if you need anything
Hey, I'm using unity version 2022.3.27, I've used your shadergraph from github, however the material is not working and is just a pink output. Do you know what im doing wrong?
Hey ! Have you also imported the .hlsl file that was provided in the files ?
@@pixtrick Yea I did
Can you contact me on discord? It would be easier to understand your issue
I spent my entire childhood learning not to step on shadows. And I guess I figured out why.
I'm still doing it today 😭
Your brain is massive
You're flattering me x)
You explain very well! Good anim.
Thanks a lot ! :D
Woohoo, good topic! Can't wait for more content.
Thanks a lot !
Very intersting, glad to see a new serie emerge, can't wait for the next episode ;)
Thanks ! I'll try to post it as soon as possible
Disabling the ground collider is fine for a single entity but you’re quite likely to have multiple entities and those will still rely on the ground entity!!
Absolutely, that was just an example, it's totally up to you to improve this ;) In this case what you would do instead is disabling the collision between the 2 colliders basically
This works greatly in Editor for me, but in the build it doesn't function properly (neither on Android nor on PC) and I just get plain geometry.
What unity version are you using ?
2022.3.17f1@@pixtrick
You have to make sure that the depth priming is off, and I'm not entirely sure but I think setting the rendering path to forward can help as well
@@pixtrick yes it is disabled and the rendering path to forward, I tried different depth texture modes as well. I'll try to isolate the problem by making a new project and make some test and I'll come back to you.
@@TheGameLecturer all right ! By the way you can message me on discord if you prefer
Is there any chance to apply the same effect in the HD render pipeline? needed very very much
Hey, I'm not very sure about that, you should try ! In any case, if the render features are not available, you can still use the stencil buffer through custom shaders
great explanation! is this possible in the build in render pipeline ? i struggle a lot to convert the technique correctly
It is indeed possible, but you won't have access to the render features. Basically, the URP allows a per-layer rendering with its render features (so you don't have to worry about the materials of each object of the layer), whereas the built-in RP don't, so you'll have to write custom shaders to get the same result, it's a bit harder but 100% doable in my opinion.
@@pixtrick thanks for the response! I finally succeeded! I think the hardest part was that i used Amplify and its stencil buffer parameters were some time buggy 😅 But you're explanation was really great and help me find the way!!
Merci, maintenant c'est limpide
this looks really cool i want a tutorial!
Can these be done in Shader Graph?
Unfortunately no, shader graph doesn't support the stencil buffer
Hii, thank you so much for the tutorial, but I just tried everything you did in the video but there isn't any change or interaction for my shadow. I'm wondering could you share the project file somewhere so that I can take a look?
I can't seem to follow your instructions when it comes to NOT using a shader to solve it. You pop up the render object settings but I can't figure out how to set it up to work. I am trying to solve this without shaders because I am developing something that can't use normal shaders at all. It could use shader graph, but I don't know how to do this in shader graph either.
Hey ! You just have to use a render feature then. Basically, instead of using a shader for the mask material, you just have to create a render feature with a Never stencil comparison operation, so that it won't show on screen. You can use any material you want for that mask then since it won't show on screen at all. EDIT : I forgot to mention that after doing that, you'll have to use the Fail operation instead of the Pass operation, because the comparison operation will always be false, so that the Pass operation will never trigger.
Hmm, yeah, I just can't seem to figure it out. I was trying to make something for the Apple Vision Pro but you can't use normal shaders, you can only use shader graph (or other node based shading methods), because they use MaterialX which requires node based shading. Thanks for your help though! Appreciate you taking the time to respond.@@pixtrick
@@helikaon00 I struggled with the same thing and got it to work. I don't know if it will work for you or anyone else reading, but this is what I did: - Make sure that the culling mask dropdown menu of your main camera has both your walls layer and your occlusion object layer checked - Make sure the proper render pipeline asset (the one you have the stencil on) is set in the quality section of project settings - Make sure that in the "Filtering" section of the render pipeline asset inspector window, the Opaque Layer Mask dropdown has both your walls layer and your occlusion layer UNchecked - On the render feature for the walls, set Event to AfterRenderingOpaques, set the layer mask to your walls layer, enable Stencil and set its value to 1, and then go "Not Equal, Keep, Keep, Keep" for the next four dropdown menus, in that order from top to bottom. - On the render feature for the obscuring object, set Event to BeforeRenderingOpaques, set the layer mask to your obscuring object layer, enable Stencil and set its value to 1, and then go "Never, Keep, Replace, Keep" for the next four dropdown menus, in that order from top to bottom. Lastly, in case anyone wants this to only work when behind a wall, not in front, give your obscuring object a new script. Have it fire a raycast from itself to the main camera every frame. If the raycast is obstructed by any object in the wall layer, change it's scale to whatever size you want. Otherwise, change its scale to 0. I'm not a professional at this, I figured this out through trial and error. So if it doesn't work for you, I'm really sorry but I have no clue how to fix this. I just hate when people post "I figured it out" and don't say how, so hopefully this helps someone.
SSAO and DECALS not working how can we fix it ?
Decals are not compatible with the stencil buffer, or at least I haven't find a way to make them work together yet. We discussed about it on the discord server of the community but didn't find a solution ... Regarding SSAO, I'm not entirely sure why it doesn't work as intended ... It may be either the AfterRenderingOpaques event queue or simply because objects rendered through a render feature are not considered as "real" geometries
Thank you so much you done great job
THIS IS THE BEST TUTORIAL out there for URP / Stencil / Depth mask - for AR masking as well. Don't search further. I checked other tutorials, this one is the best. Thank you for your work!
Thanks for the kind words ! :D