Recreating Darkwood's Vision Effect in Unity

  Рет қаралды 51,609

aarthificial

aarthificial

Күн бұрын

Пікірлер: 74
@berhangundogdu7297
@berhangundogdu7297 4 жыл бұрын
"don't worry the people who wrote this (shader) was just as confused as we are" This is how you know that you are lost but have a feeling that this is the right place. You win a sub too
@ULTRADARKSETH
@ULTRADARKSETH 3 жыл бұрын
Yup. Agreed
@Tantandev
@Tantandev 4 жыл бұрын
'don't worry the people who wrote this (shader) was just as confused as we are' Most definitely lmao!
@ozgunleventkaya2867
@ozgunleventkaya2867 4 жыл бұрын
Finally! I was trying to achieve this effect for so long. Thanks for the video
@aarthificial
@aarthificial 4 жыл бұрын
Glad to help
@davemurray9977
@davemurray9977 4 ай бұрын
Thank you!!!!! Also, for anyone who's using this recently and are struggling to get it working, since this video was released, Unity added a 4th blend style option - so just set the vision light to the 4th blend style.
@mehultahiliani8797
@mehultahiliani8797 3 жыл бұрын
“thank you for listening to my ted talk” I love the subtle humor of this channel
@Tomatech
@Tomatech 3 жыл бұрын
I got stuck trying to find the four render textures when I tried doing this myself on my own when I first started experimenting on 2d lights, glad to see I wasn’t the only one with the idea, and that it’s actually possible.
@luvster3789
@luvster3789 4 жыл бұрын
Leaving a like because you helped my friend through a hard wall, Thanks mate.
@viniciusrosa8215
@viniciusrosa8215 4 жыл бұрын
You are a legend! I was trying to go for something like that and I had the same idea of the render texture (obviously didn't work). One month after I see this video and I was actually shacking just for reading the title. Really nice work and explanation of what works and what doesn't. Hope your channel grows a lot one day.
@aarthificial
@aarthificial 4 жыл бұрын
Thank you so much! It really means a lot.
@viniciusrosa8215
@viniciusrosa8215 4 жыл бұрын
@@aarthificial Hey, would you mind sharing the source code of the changes in the CombinedSharedLights shader? I was trying to replicate in my end but I couldn't follow the video very well.
@aarthificial
@aarthificial 4 жыл бұрын
@@viniciusrosa8215 Sure thing, I've added a link to the source code in the description.
@mirox6271
@mirox6271 2 жыл бұрын
can you mmake a little more in-depth video on this?
@pcccmn
@pcccmn 3 жыл бұрын
Thanks so much for the shader code man. I spent like 2 days trying to replicate the lighting system in Among Us. Your shader code did the trick!
@dak5327
@dak5327 Жыл бұрын
Love the video, earned a sub! Is it possible for you to create a tutorial on this? I've been trying for a week to a vision effect like this but being a beginner, I understood nothing any forums or "guides" were talking about
@FoleyX90
@FoleyX90 2 жыл бұрын
I've been trying to achieve this for soooo long. Thank you so much!!!!
@gameplode7397
@gameplode7397 6 ай бұрын
Please provide a full tutorial, I'm lost, man!
@fruitymario3742
@fruitymario3742 3 ай бұрын
If you guys are using Unity 6, they updated the default lit sprite shader, so it's very different and no longer works if you try to implement this as is. You will need to get the new lit shader as well as the combined shape light shared include file from the packages folder, and make the same kind of changes to the shader files and the include file. The line "finalOuput = finalOutput * _UseSceneLighting + (1 - _UseSceneLighting) * color;" is no longer needed and should be omitted.
@GainZick
@GainZick 3 жыл бұрын
this is great, very good recreation
@matthew.wilson
@matthew.wilson 2 жыл бұрын
Haha! I had the same reaction when I found that "Is this the right way to do this?" comment myself 😂 Glad to see it's made its way onto KZbin now!
@Danee2108
@Danee2108 3 жыл бұрын
Thanks for this amazing video! I've got one question. Are these two shaders made so they work with each other? I tried using the entity shader alone, but the entities were desaturated.
@bub1x
@bub1x 2 жыл бұрын
Hey man, great video, but I'm new to Unity and have literally no idea on how to get this to work. I downloaded the source code but don't understand how to implement it into my own project.
@Rowland4825
@Rowland4825 Жыл бұрын
thank you I hope this still works after all theys years
@diogocichocki4947
@diogocichocki4947 3 жыл бұрын
You could make the new saw thing to stay on that position until you look again. Maybe te the thing will be there... maybe not.
@GiefCat
@GiefCat 4 жыл бұрын
Very nice!
@aarthificial
@aarthificial 4 жыл бұрын
Thank you!
@S41L0R
@S41L0R 3 жыл бұрын
how did I miss this video
@AtomicBrainbag
@AtomicBrainbag 2 жыл бұрын
Hello, I have popped your awesome asset into my project but I seem to be having an issue. I'm using unity 2021.2.7f1 and there appears to be a problem with lights with a low radius value. When the radius is set low the lighting effects are intermittant, causing the player to see through walls. Is this an issue you have encountered before and do you know of a fix for it? I have looked over everything but my understanding of shaders and the like is very limited. Any help would be amazing.
@aarthificial
@aarthificial 2 жыл бұрын
Hmm, I'm not sure what may be the problem. Maybe the shadow casters you're using don't have enough points/vertices? Sometimes it causes the light to pass through them which, in this context, could cause the player to see through them
@renzbolado153
@renzbolado153 2 жыл бұрын
Do you think its possible to create this effect in a first person, 3d setting?
@sgoff9
@sgoff9 4 жыл бұрын
This is wonderful, any idea how to achieve this with text? For example if you have a player name displayed above the character?
@sgoff9
@sgoff9 4 жыл бұрын
Figured it out. I just want white player text so setting final output to half4 finalOutput = (0, 0, 0, color.a * visionMask); in ShapeLightVisionEntity solved it for me (I also was able to remove most of the body of CombinedShapeLightShared as I don't care about calculating color, only alpha)
@aarthificial
@aarthificial 4 жыл бұрын
I'm so sorry I don't know why I haven't seen your comments up until now. Anyway, glad you figured it out!
@JimSuo11
@JimSuo11 8 ай бұрын
Background rendering will cause sprite rendering errors in versions after unity2023.2. How can I fix it?
@BBore
@BBore Жыл бұрын
how do i add it to my project?
@lehcaR_0731
@lehcaR_0731 2 жыл бұрын
I have a question: all the scene objects use the shader in this video to not be lit, so if some Tilemap objects need to use some other material (eg grass jitter), how to add it? Only one shader can be added to each object, at least for Tilemaps...
@waffln
@waffln 11 ай бұрын
Hii, can you please create a tutorial about the simple player controller you used in this video? Thank you!
@EzyGaming
@EzyGaming 3 жыл бұрын
Hi, I am making a similar project but when the point light source get too close to the shadow casted, it seems like it don't completely block it, it let light pass through the wall(light go over behind the shadow created(Player)( Light )(wall)( Shadow )( ?Light? ))? (the wall currently have a shadow caster just like in the video) Question
@aarthificial
@aarthificial 3 жыл бұрын
From my experience, the effect you're describing usually occurs when the spacing between vertices is too big. Try subdividing your shadow caster more. Even if it's just a rectangle, try adding more vertices along the sides
@EzyGaming
@EzyGaming 3 жыл бұрын
@@aarthificial That is AMAZING!!! Although it take many time to add the shape one by one, it does solve my problem! Thanks for your fast response as I have already search for this problem for two whole days XD. May I know why subdividing the shape help remove the light behind the shadow and is there any way to subdivide shadow caster shape faster than adding it one by one?
@StarrkrinGamer
@StarrkrinGamer Жыл бұрын
Im trying to implement this but i have a problem, i need that the vision light dont light up anything, and that things are only visible when im looking at them and there is light on them
@tomix604
@tomix604 Жыл бұрын
How to hide also a TextMesh pro? If I put the shader on text, it works but the text is always black, can't chage color of it
@OIndieGabo
@OIndieGabo 2 жыл бұрын
Hey! This is awesome! Thanks a lot! Got it working on the 2020.3 unity version but when I try using the shader on 2021.3 (default URP package version 12.1.7) it crashes and ge really buggy. Any directions on how to make it work on most recent LTS versions of Unity?
@eyelessmikeymike
@eyelessmikeymike 2 жыл бұрын
same, getting some weird errors
@eyelessmikeymike
@eyelessmikeymike 2 жыл бұрын
@@OIndieGabo thanks! Will check it out
@dragontear1638
@dragontear1638 3 жыл бұрын
Out of curiosity, would it be possible to add a layer that is a animated fog texture or the like, having it become translucent when close enough to the player?
@lightweightuavs1942
@lightweightuavs1942 2 жыл бұрын
Hi, awesome work! Do you also have a solution for the text, e.g. enemy's name to disappear outside of the field of view? If the vision material is applied to the text, then it turns the letters black completely...
@tomix604
@tomix604 Жыл бұрын
Did you figured it put? I’m also strugling with black text
@AltepEN
@AltepEN Жыл бұрын
MAN I LOVE YOU I LOOKED FOR IT LIKE FOR 2 WEEK I WANTED SOMETHING LIKE AMONG US
@bubblemage
@bubblemage 2 жыл бұрын
Is there a way to make the player not be able to see through walls, like at all? So when you're next to a wall, you only see "darkness" on the other side, hiding literally everything else until the player reaches the other side or hits a corner that would allow the player to see more.
@klaudiah9209
@klaudiah9209 7 ай бұрын
Just don't use global light
@Caduceus80
@Caduceus80 3 жыл бұрын
Hello. Thank you very much for this project. But what version of Unity need? I downloaded your sources from Git, tried to run in last Unity - and nothing. Scene "showcase" showing only blue screen
@aarthificial
@aarthificial 3 жыл бұрын
Hmm, I believe it was 2019.3 I'll take a look at it later today
@Caduceus80
@Caduceus80 3 жыл бұрын
@@aarthificial I find a reason. All PNG images in Sprites folder downloaded like non-correct files - therefore scene is empty. I downloaded each PNG manually - and all works fine now. Thank you!
@aarthificial
@aarthificial 3 жыл бұрын
Oh, that's right, it's cuz I'm using git fls to store these. I'll add proper info to README
@Caduceus80
@Caduceus80 3 жыл бұрын
@@aarthificial Thanks! Another question - why if I duplicate Inner Wall and place copy in other position - shadows are not works for this new wall?
@aarthificial
@aarthificial 3 жыл бұрын
There's a shadow caster 2d component in the scene that describes how shadows are casted. You need to modify it as well. Here's more info on it: docs.unity3d.com/Packages/com.unity.render-pipelines.universal@10.3/manual/2DShadows.html
@lordzockt1853
@lordzockt1853 3 жыл бұрын
Question: What is your Visual Studio's Code Theme called?
@lordzockt1853
@lordzockt1853 3 жыл бұрын
It looks so nice
@aarthificial
@aarthificial 3 жыл бұрын
It's a different editor - JetBrains Rider
@lordzockt1853
@lordzockt1853 3 жыл бұрын
@@aarthificial Okay ty!
@MorisaKirisame-u2d
@MorisaKirisame-u2d 22 күн бұрын
If you're using the shader file in this video for a 2D side-scroller, it will have issues with normal rotation and unexpected sprite map translucency. If anybody needs help, u can contact me.
@LocutusMoW
@LocutusMoW 10 ай бұрын
I wish someone could replicate this in Unreal Engine.
@neutron3768
@neutron3768 2 жыл бұрын
this video is very nice, but it is not instructive, I would be very happy if you make a tutorial video about it.
@meepwagon8031
@meepwagon8031 2 жыл бұрын
Yes, darkwood. Thats the first game i think of that uses this mechanic. There definitely isnt any other more popular games that are kind of sus with impostors that use this mechanic
@ronishrohan
@ronishrohan 4 жыл бұрын
i think i found out a way simpler method
@Ivan-bk9xs
@Ivan-bk9xs 2 жыл бұрын
what was it?
@Danee2108
@Danee2108 3 жыл бұрын
Thanks for this amazing video! I've got one question. Are these two shaders made so they work with each other? I tried using the entity shader alone, but the entities were desaturated.
@aarthificial
@aarthificial 3 жыл бұрын
Hm... no, they should work alone. The entity shader by itself shouldn't desaturate anything, it only changes the alpha value. Do your entities still disappear when they go out of view?
@Danee2108
@Danee2108 3 жыл бұрын
@@aarthificial Yep, the entities still dissapear when outside of the vision light.
Field of View Effect in Unity (Line of Sight, View Cone)
23:35
Code Monkey
Рет қаралды 157 М.
Pixel Art Animation. Reinvented - Astortion Devlog
4:41
aarthificial
Рет қаралды 2,1 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Field of view visualisation (E03: stencil shader)
6:44
Sebastian Lague
Рет қаралды 126 М.
Realistic 2D Lights & Shadows in Unity
11:28
Willy Dev
Рет қаралды 64 М.
Reimagining Astortion | Devlog 0
7:22
aarthificial
Рет қаралды 102 М.
Darkwood : The Most Disturbing Game You Never Played
1:40:32
BeamBuddy
Рет қаралды 1,7 МЛН
Field of view visualisation (E01)
22:32
Sebastian Lague
Рет қаралды 443 М.
I Turned Fake Mobile Game Ad into a Real Game
10:26
Fat Dino
Рет қаралды 3,5 МЛН
Deferred Lights - Pixel Renderer Devlog #1
8:41
aarthificial
Рет қаралды 401 М.
Remaking the Black Hole Shader from Outer Wilds! | Unity Shader
11:37
Quontyn Tech Art
Рет қаралды 24 М.
Creating SMART enemies from scratch! | Devlog
5:40
Challacade
Рет қаралды 366 М.
Enemy Line of Sight, Stealth Game in Unity (Field of View)
11:57
Code Monkey
Рет қаралды 55 М.