Jump to content

Vegetation not being affected by Spot Light in URP


haidumartocian

Recommended Posts

Hello, i wonder if there is any way to make the vegetation being affected by Spot Lights (say i want to make a character to hold a flashlight during the night).  Currently i couldn't find a way to sort it out. Thanks in advance!

 

[edit] 

 

using URP, last version

In HDRP it works just great.

 

spacer.png

Link to comment
Share on other sites

3 hours ago, Bryan said:

Does your grass cast shadows? 

 

They are set to cast shadows, Two SIded, and they do, but only from light received from the Directional Light in the scene (sun/moon).

Link to comment
Share on other sites

can't edit my own comment, so sorry for adding new one.

 

Interesting thing is that trees and tree branches, and all tree elements (bushes) DO receive light from spotLight. Just details elements don't. Gras, fern, etc.

Link to comment
Share on other sites

On 12/13/2022 at 12:12 AM, Bryan said:

Can you please tell me what grass are you using? 
Are you using Flora or something else? 

 

URP, blank new project, building terrain and using Giant Forest Biome, or Alpine one. Same result. Didn"t touch the Flora settings. And trying to set up my FPS Controller to use a flashLight configured with a Unity Spot Light. 

Link to comment
Share on other sites

Can try increase the additional light count in urp asset higher and setting the lights render mode to be important rather than not or auto: 
image.png

Link to comment
Share on other sites

11 hours ago, Bryan said:

Can try increase the additional light count in urp asset higher and setting the lights render mode to be important rather than not or auto: 
image.png

Still, same result. The grass in the Editor, without PlayMode gets light with no problems, but in PlayMode or in Build, no lightning received from other than main directional light. 

 

image832.png

Link to comment
Share on other sites

Hi @haidumartocian,

Try this shader package: Flora_URP_Update.zip

It contains a new way of lighting with subsurface that should support point and spot lights. 

The new variables can be controlled through these variables: 

image.png.a49853dec4567bff031200d1fb5aa3b2.png

Enalbing _GrassNormal should make the foliage shade better across the terrain. 

And _SSS_Effect and _SSS_Shadows control the intensity of the subsurface and backlit faces.

As well as using the _MaskMapMod to control the thickness, ao and smoothness (G = Thickness, B = AO, A = Smoothness).

Link to comment
Share on other sites

Hey, @Isaac. Your sollution is almost great, except for the fact that the veg looks a bit weird during the night time, using urp TimeOfDay from gaia. I will take a look to see if there is any adjustments to make, in order to make it look better. It looks grey, instead of green, when there is no sunlight on the grass. But yea, it gets any additional light from other sources 🙂 Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...