Other solution (URP or HDRP) : make a quad, import every frame of your sprite image as a texture (Texture rendering mode:cutout, mesh renderer:two sided and receive shadows), and animate the texture (just pull every texture in the animation timeline). > It's cast shadows.
@AngelCorpse666 Жыл бұрын
Hey. Just letting you know, this works like a charm. I've been looking for this for awhile now. Thanks for the content!
@cozygamemaker7 ай бұрын
Thanks a lot! This is the clearest and most complete tutorial for 2.5D URP setting!
@LightPython24 Жыл бұрын
This was perfect thank you so much! So easy and clear to follow. PLEASE make more videos like this in the future, would love to see more 😄
@GregorKariАй бұрын
Ok, this works and looks decent! Thank you!
@Lao_lu8 ай бұрын
I'd love a followup which shows how to add the walk cycles and attack animations to this 2.5d player object
@bluzenkk8 ай бұрын
thanks for the tutorial~~ would like to see more on 2.5D stuff~~
@TheNinja12345685 ай бұрын
Great tutorial, really helped out !
@PeterMilko8 ай бұрын
Very cool
@Y10012 ай бұрын
Perfect tutorial.
@leoromiya53389 ай бұрын
What I really need to know is why NOBODY addresses the weird lighting on the other side of the sprite. I have this issue and cannot for the life of me figure out how to make it look the same on both sides as it does on the front, with no weird lighting at all. I just want my sprite to be able to cast and receive shadows while looking the way it did before I applied the material on to it.
@MichaelsGameLab9 ай бұрын
If you need to have both sides visible, then you might want to check out double sided materials or using a custom plane model that has a plane for the front and one for the back. I think the issue stems from the plane that the sprite is rendered on only has the one face and the lighting applies to both. So, if you rotate the sprite, then it will get darker as it's front face turns away from the light source and vice-versa. You can check out the following pages where other people had similar issues: www.reddit.com/r/Unity3D/comments/iiogt5/tree_leaves_how_to_get_proper_lighting_from_both/ forum.unity.com/threads/double-sided-material.474594/ forum.unity.com/threads/render-face-both-backface-light-problem.1303200/ Hope this helps.
@SUWGamer4 ай бұрын
I've looked into this. One way is to write a custom shader.
@randomstuff67869 ай бұрын
thanks so much!! works great
@mehmeh88839 ай бұрын
Very cool video! Now question is would I use a 3d colliders with this?
@MichaelsGameLab9 ай бұрын
Hello, yes I use 3D colliders for this method. More specifically, I use the capsule collider.
@joseh4930 Жыл бұрын
Thanks. How can I add a Normal texture to that Material?
@MichaelsGameLab Жыл бұрын
You would need to add a texture input for the normal texture and link it up with the normal input of the material. You will also need to make sure the texture is tagged as a normal texture.
@kirrychan11 ай бұрын
THANK YOU SO MUCH I LOVE YOU
@tldmbruno Жыл бұрын
Great video btw!
@muhammadaqil64675 ай бұрын
does this only work for directional lights? it does not seem to work for point and spot lights
@MichaelsGameLab5 ай бұрын
Yes, it should work with point and spot lights as well.
@muhammadaqil64675 ай бұрын
@@MichaelsGameLab i seem to be having issues with getting it to work with spot and point lights, do you mind helping me out privately or are there any settings i should be looking at to get this to work?
@dgw85142 ай бұрын
I also encountered this problem, did you solve it?
@dgw85142 ай бұрын
I solved this problem. You just need to check Rendering-New Universal Render Pipeline Asset-Additional Lights-Cast Shadows.
@tldmbruno Жыл бұрын
Does this method renders sprites at the correct depth? Or does the sprite still clip into each other when near?
@MichaelsGameLab Жыл бұрын
Should render at the correct depth if you use a different material for the sprite renderer, like shown in the video.
@Flusap4 ай бұрын
thank you comrade
@mehmedcavas3069 Жыл бұрын
But how do you handle render order or other spriterenderers inside the player. I have a spriterenderer player which will carry weapons but have problems with rendering order
@MichaelsGameLab Жыл бұрын
In the video I make a new URP material and assign it to the sprite renderer. This should handle the render order issue because it is no longer using the 2d sprite material.
@Mmk-dn1fi Жыл бұрын
Why doesn’t he just choose URP when creating the unity project, instead of adding URP later from the package manager? Is there a benefit to doing it that way?
@MichaelsGameLab Жыл бұрын
There is no real reason to do it one way or the other. Does the same thing.
@RodrigoReyesRetanaGonzález Жыл бұрын
I still can't manage to get the shadow, it might be because I could change my sprite texture type since the setting doesn't show up. Any way i can fix that?
@MichaelsGameLab7 ай бұрын
Did you enable shadows in the debug options?
@Quick-Bull015 ай бұрын
I found that the lighting on the sprite makes the sprite too bright. How should I fix it?
@MichaelsGameLab5 ай бұрын
Is it too bright from the material or from the light source?
@Quick-Bull015 ай бұрын
@@MichaelsGameLab I guess it's from the material? It's like the sprite reflects some light on the surface. You can also see it in your video, the sprite becomes lighter after applying this material. If I don't want any reflection, how should I switch it off? Thank you!
@MichaelsGameLab5 ай бұрын
You probably need to change some material properties. I think materials will have .5 smoothness by default, so maybe try setting that to 0.
@Quick-Bull015 ай бұрын
@@MichaelsGameLab I found the solution: I changed the material type in Alpha from "Lit" to "Unlit", then the sprite reflect no light. Thank you friend!
@Kopellis8 ай бұрын
mine doesnt make a shadow but just has the sprite deformed on the back
@MichaelsGameLab8 ай бұрын
Did you turn on the shadow casting from the debug menu and set the material as shown in the video?
@Kopellis8 ай бұрын
Ok on the directional light i had cast shadows off
@tldmbruno Жыл бұрын
I've noticed you used a 2x scaled 16x16 sprite. Is there a reason for this? Does Unity work poorly with sprites that are smaller than 32x32?
@MichaelsGameLab Жыл бұрын
I do it so I can see the images better when using the search in unity. Other than that I don't think there is any other reason.
@Bear-en6dt3 ай бұрын
Thank U
@upercutsssАй бұрын
When i apply the material my sprite dissapears.
@MichaelsGameLabАй бұрын
Maybe the alpha clip value needs to be adjusted
@tianqigao869 Жыл бұрын
cool!
@doublehitgames5316 ай бұрын
where the continuation?
@MichaelsGameLab6 ай бұрын
I have not made a continuation yet. I might do one soon though.