x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Turning off static shadow receiving for foliage

Hey,

I don't want lightmass to calculate lightmaps for some foliage - mainly grass and small plants. I saw this hint in the engine: alt text

So I set the "Light Map Resolution" to 0. However Unreal Engine does not agree with my plans. After I click "Enter" to set the value, the engine doesn't respond for a short while and then promptly sets the Light Map Resolution back to 4.

I tried setting the lightmap resolution in the static mesh editor, but it has the same symptoms - can't set it below 4.

So there's the question: How do I disable lightmap baking for some actors or some types of foliage?

Thank you.

Product Version: Not Selected
Tags:
more ▼

asked Jan 03 '15 at 06:22 PM in Rendering

avatar image

Deventico
214 19 20 30

avatar image marceloSR Oct 02 '15 at 04:01 AM

I am having the inverse problem. I'm trying to make my foliage receive shadows but I cant...

Are there any specifics on materials or in the static mesh itself that I need to toggle to make lightmapss work properly?

avatar image w_jones Jan 28 '16 at 06:51 PM

Any progress on this ?

avatar image AndrewHurley Jan 28 '16 at 09:48 PM

Hey w_jones,

What is the exact issue you are having, as there are a few different points made, and I would like some clarification on what you are experiencing.

Thanks,

Andrew Hurley

avatar image w_jones Jan 28 '16 at 10:47 PM

Andrew

My issue is:

You need a lot of grass to cover a level. If you let lightmass light the grass i.e. by setting the grass to static, then the memory used goes up and for me at least lightmass crashes.

So I set my grass to dynamic, so lightmess now ignores the grass, but theres a performance hit.

It would be best to leave the grass as static, but tell lightmass to ignore the grass. That way no crash, and no performance hit.

WJones

avatar image AndrewHurley Jan 28 '16 at 11:43 PM

Uncheck the 'Cast Static Shadows' option, and leave it at static. That should solve the issue. Could you provide me with some screenshots of the foliage you have painted. Keep in mind, you should not exceed 4096x4096 shadowmap resolution per 100 painted instances (default cluster size).

alt text

https://docs.unrealengine.com/latest/INT/Engine/Foliage/index.html#staticmeshsettings

Take a read over the documentation to see if you are able to improve your performance by using lower LOD's and setting up culling distances correctly.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Deventico,

The default value is 4 even though the text bubble would indicate otherwise. The light map resolution override shouldn't matter though since you've disabled the "cast static shadow" which will not use the overridden light map resolution.

If you're building lighting and still seeing an issue let me know and I'll look into it for you. :)

Thank you!

Tim

more ▼

answered Jan 03 '15 at 06:44 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 888 103 878

avatar image Deventico Jan 03 '15 at 07:47 PM

Hey Tim, thank you for your fast response!

The lighting build hasn't finished yet, but there are first results: When I build the scene without all that small vegetation, building it all takes about 5 minutes. Now, after 10 minutes, only 4% are done. I'll report back when it's finished.

However I have one other question: What exactly does "Cast static shadow" turn off or on? Can I have an actor which does cast shadows, but not receives them or vice versa? In my head there is a difference between shadow casting and receiving, but I don't know if UE differentiates between the two.

avatar image Deventico Jan 03 '15 at 09:23 PM

Hey Tim, Lightmass just finished. This is the result: alt text As you can see, the grass on the right side receives shadows. This is not what I want.

My target is to have the grass completely ignored by lightmass. It should neither cast nor receive shadows. Usually I'd do this by setting it "Movable", but I can't do that with foliage :/

And - on a side note - building the light now took 98 minutes instead of the 5 minutes it takes when I delete the grass.

Any help is much appreciated.

shadows.jpg (624.5 kB)
avatar image Deventico Jan 05 '15 at 12:08 PM

I tried building the grass a couple more times, but I can't get it to work.

Not only can I make lightmass ignore the grass, but I also can't save the built lightmaps. Once the build is complete, the lightmaps are loaded into the engine, which takes a couple minutes. But when I click the "Save" button, the engine crashes.

I don't know what to do. I just want lightmass to ignore the grass. To shadow casting, no shadow receiving. Like a "Movable" object is ignored.

Is that possible?

avatar image Helius Jan 09 '15 at 12:15 AM

We're seeing this same problem since upgrading to 4.6

All foliage is Always receiving lightmaps. Turning off "cast static shadow" makes the foliage not cast shadows, but it still receives them.. As Deventico said, you cant set the light map resolution override to 0.. (we tried this in code and it just crashes).. As a huge terrain game, this makes it impossible to bake lighting anymore. We need a "Dont bake foliage" setting.. either globally, or per foliage mesh.

avatar image Skinhinge Jan 09 '15 at 02:08 AM

As Helius stated, we need a switch named "Receive Static Shadow" (or the ability to set the shadow map to 0). Some way to not bake shadows on foliage. What you described was turning off the foliage's ability to cast static shadows on other items.

avatar image Deventico Jan 09 '15 at 02:49 PM

Yeah, best would be a setting per foliage mesh, so you can still bake trees or other foliage.

There is something I want to clarify:

Building the lighting works, but the results take too long and can not be saved.

I opened another question for the issue of saving the lightmaps, since it's a different problem.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question