Fade Objects with C# and the Standard URP Shaders | Unity Tutorial

Fade Objects with C# and the Standard URP Shaders | Unity Tutorial

LlamAcademy

1 год назад

15,067 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Old belt
Old belt - 21.08.2023 16:24

Thank you! this works perfectly!

Ответить
Michael Vicente
Michael Vicente - 20.07.2023 02:02

looks promising, sadly I get an error "Assets\urp-fading-standard-shaders-main\Assets\StarterAssets\TutorialInfo\Scripts\Editor\ReadmeEditor.cs(79,23): error CS0115: 'ReadmeEditor.OnInspectorGUI()': no suitable method found to override"

Ответить
James Lafritz
James Lafritz - 22.06.2023 06:10

Hey, Great Video. Is there a reason you chose to go this route instead of using the "Render Feature" of the Rendering->URP Render Pipeline, you may have a video on this already. I use 2 "Render Objects" One for when the character is behind an object and one for when the character is in front using the depth test. if a character is behind an object it use a dither material that I have set up to make it appear as the object is sim-transparent. But there is always the ability to create your own custom render feature that could fade the object out instead.

Ответить
rennie moffat
rennie moffat - 30.05.2023 18:54

Wow!
Thanks. Crazy that such a simple task would be so complex!

Ответить
Falric The Sleeping
Falric The Sleeping - 30.05.2023 14:06

Hey nice video, at the first of the video you said you can use shaders, well where can I find any source for how to do it? thanks

Ответить
j janor
j janor - 11.05.2023 19:45

is there any way to fix the SSAO popping in and out? looks pretty terrible

Ответить
Hamza Kontaz
Hamza Kontaz - 03.04.2023 05:22

Thank you so much for this effort

Ответить
Stephen Banbury
Stephen Banbury - 24.03.2023 02:35

Thanks for putting this together - just what I need for a project I'm working on and I will be following it in detail. BUT... can I just ask... is it absolutely necessary to put music in the background, particularly on a repetitive loop? I find it hinders following the tutorial, which is kinda counter productive. I've had to remove my headphones and take a break so many times purely due to the background music. It will eventually drive me to distraction! Can we just have the education without the background elevator music, please? Otherwise, keep up the fantastic work!!

Ответить
dimlantern
dimlantern - 15.03.2023 08:51

Awesome tutorial here, what an amazing wealth of knowledge your channel has! That being said.. I am having some difficulties getting this working. Currently, there is one spot on my mesh that does turn transparent when blocking the player, but the rest of the mesh stays opaque. Is there any special magic that needs to be done within the URP shader to make this work correctly?

Ответить
Calvin MS
Calvin MS - 25.01.2023 15:11

thank you!

Ответить
Daniel Hasi
Daniel Hasi - 18.01.2023 18:47

nice work, but its not possible if i using terrain and try to hide trees right?

Ответить
PhantomOS Team
PhantomOS Team - 03.01.2023 21:34

Hello i have a different stile of my game that consist of cubes. I think this method is good for big objects instead but actually in my case only 2 cubes disappear and the rest remain opaque so i still can't see my player behind that cubes. Is there a method to give raycast more radius to area??

Ответить
Miguel BR
Miguel BR - 28.12.2022 23:50

THANK YOU MAN, YOU SAVED MY PROJECT. I spent all along last day trying to figure out something, trying to compute shaders to do this, THANK YOU VERY MUCH

Ответить
Mu Ra
Mu Ra - 04.12.2022 08:11

Omg, you are awesome! super thanks for your example! you deserve more followers and attention indeed!

Ответить
Max G
Max G - 11.10.2022 16:19

I'm currently implementing this into my game. I got it working like a charm like in the video. However, I want it to check an list of targets, not just one player target. Currently I am doing the foreach loop for each target in the list in the CheckForObjects coroutine. However, it is still only working for one target at a time. Maybe you would have a better understanding of why that is and how to implement this?
Thanks

Ответить
Gerald Christie
Gerald Christie - 31.07.2022 06:20

I can't pretend I completely understand this script, but I was able to tweak it for my game, so thank you!

Ответить
alexleonardkrea
alexleonardkrea - 31.07.2022 04:05

Very clever sir!

Ответить
Rick Zhang
Rick Zhang - 26.07.2022 17:04

Great work and I've learned a lot from your video! Unfortuantely when I tried using your code in my project, it appeared to have a bug when encountered with more than one object in the way. When there are 2 objects between player and camera, the fading process worked fine, but when the player walked out of the objects, only the object near the camera returned to opaque, and the other one (blocked by the object near the camera) stayed transparent. That's how I conclude the problem here. Bad at code, I can't fix the issue by myself. Guess this methond only works well in open area.
But still, this method is fantastic!

Ответить
you slug
you slug - 24.07.2022 23:08

+1

Ответить
Water Cat
Water Cat - 23.07.2022 07:36

Wen I have create therd person player controller in past I have use one system that makes the camera to get closer wean the hit in collisions

The problem with that system is the fact block even if the are something small like columns fences ECT but I think if someone make acception for the spefic object I will perfectly fine

Ответить