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"

I there a way to allow a custom depth to foliage in unreal 4

I am still learning a lot with unreal and I would like to know if there is anyway I can get my foliage to react the same way my other objects act in the zone. I created a toon shader post processing volume and I want the foliage to shade the same way. The only I can get it to work is when I activate apply custom depth to the object but I cant seem to do that for foliage. If anyone might have a solution I would greatly appreciate it.

Product Version: Not Selected
more ▼

asked Nov 28 '14 at 06:56 PM in Using UE4

avatar image

6 2 3 4

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

3 answers: sort voted first

I don't have the original blueprint in front of me, but on the left, I think there was more or less just OnBeginPlay node and on the right, there was the node that sets the custom stencil of the instanced mesh to a Random Integer in Range between 10-50.

more ▼

answered May 07 '18 at 06:05 AM

avatar image

109 1 4 12

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

Hi Zeoger2000,

I have entered a feature request to expose the "Render Custom Depth" parameter to foliage actors as UE-6061. I do not have a timeframe of if or when this will be made available in the engine.

more ▼

answered Nov 28 '14 at 08:36 PM

avatar image Zeoger2000 Nov 28 '14 at 08:55 PM

Thankyou! I'm still trying to find a way to get it to work!

avatar image Nobody Sep 22 '15 at 08:28 AM

Is this still in the works?

avatar image Adam Davis STAFF Sep 22 '15 at 02:17 PM

Hi Nobody,

This is currently backlogged as our resources are dedicated elsewhere. While it still may be addressed, I would not expect this feature to be implemented any time in the near future.

avatar image Selentic Feb 27 '17 at 05:33 PM

Has there been any progress made on this?

This feature is desperately needed for scenes that rely on custom depth for post process effects.

avatar image JackP STAFF Mar 10 '17 at 02:23 AM

I just checked in a change exposing CustomDepth properties to Foliage for 4.16.

If you can't wait, it is a very simple code addition to expose the bRenderCustomDepth flag to foliage. The properties bRenderCustomDepth and CustomDepthStencilValue need to be copied from the UPrimitiveComponent class to the UFoliageType class. Then the FFoliageMeshInfo::UpdateComponentSettings function needs to be modified to copy these properties to the component when they are updated.

Cheers Jack

avatar image homembarata Apr 13 '17 at 02:37 AM

You can create Blueprint subclassing FoliageInstancedStaticMeshComponent and set CustomDepth and stencil there, that's how I did (check the images) alt text

rockfoliage.jpg (48.0 kB)
rockfoliage2.jpg (28.5 kB)
rockfoliage3.jpg (23.1 kB)
avatar image DigitalShocks Apr 13 '17 at 06:49 PM

is this possible with landscape grass types? if so what are the steps to doing this?

avatar image mitjaprelovsek Jan 11 '18 at 04:09 PM

Hi homebrata,

Could you please explain this a bit further? Specifically, what do you mean by subclassing?

For example, in my environment, I have InstancedFoliageActor as shown on the image below. alt text

What should I do?


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

Ok, I've managed to find a solution.

Please see this screenshot. It seems you can select 'Instanced foliage' in the Get All Actors of Class node and after some conversions and casting you can get static mesh component reference.

alt text The blueprint

alt text The custom stencil

more ▼

answered Jan 16 '18 at 04:20 PM

avatar image

109 1 4 12

avatar image WeylKioz May 05 '18 at 01:55 PM

On your screenshot, what is on the left and right of all of the nodes you showed, mitjaprelovsek ?

(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