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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[4.12] Cable Components Don't Render Custom Depth Pass

Cable components include the render flag for 'render custom depth', but it doesn't seem to have any effect. I would really like to do a post process material on the cables in our game, but I can't get one working. I tried using a conditional on the custom depth value, and I tried using a custom stencil, but neither worked for cable components (they worked for other meshes in the scene, though). Just for more info, my custom depth pass is before the tone mapper, and my cable's material is opaque.

Product Version: UE 4.12
Tags:
more ▼

asked Aug 03 '16 at 06:30 AM in Bug Reports

avatar image

extralongpants
54 1 7 10

avatar image AndrewHurley Aug 03 '16 at 02:45 PM

Hey extralongpants,

Can you provide me with some screenshots and steps so I can visualize and reproduce this issue on my end?

Since you are trying to use Custom Depth I highly recommend taking a read over an article one of our staff wrote for the many uses of Custom Depth in Unreal Engine 4.

Let me know if you have further questions.

Cheers,

Andrew Hurley

avatar image extralongpants Aug 03 '16 at 10:40 PM

Hi Andrew - Sure, here are some simple steps:

  1. Create a blank project with starter content -mine had a level with two chairs, a table, lights, etc. in it.

  2. Click on one of the chairs and add a cable component

  3. In the cable component, set 'Attach End To' to the other chair.

  4. Set the cable's local location to (0,0,100)

  5. Set the cable's 'End Location' to (0,0,100) - so you can see it above the ground.

  6. Assign an opaque material to the cable. I used M_Basic_Wall.

  7. In the cable's rendering settings, check 'Render Custom Depth Pass' and set 'Custom Depth Stencil Value' to 255.

  8. Click on one of the chairs and do the same thing - enable Render Custom Depth Pass and set the custom stencil value to 255.

  9. Go to Edit -> Project Settings... -> Rendering. Set 'Custom Depth-Stencil Pass' to 'Enabled with Stencil'.

  10. Create a new material and open it for editing

  11. In the material's settings, change the material domain to Post-Process.

  12. Also set the 'Blendable Location' to 'Before Tonemapping'

  13. Create nodes to match: http://imgur.com/a/QaFC1 (just does a simple color*10 on objects that write to the custom stencil buffer).

  14. Save your material

  15. Go back to the scene, and click on the 'GlobalPostProcessVolume'.

  16. Expand the Post Process Volume Settings, expand Blendables, and add an element

  17. In the drop down, select asset reference.

  18. Choose the material you just created

  19. The chair will now glow brightly through objects, while the cable looks the same as it did before: http://imgur.com/JvMb8jP

  20. :(

Hope that helps.

Thanks, Chris

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

1 answer: sort voted first

Hey Chris,

Thanks for the clear and precise repro steps. I was able to confirm what you are reporting and have gone ahead and entered a bug report for the issue. You can track the issue following the link below on our new Public Issues Tracker.

UE-34365

Once the issue has been addressed by our engineers, the fix will be added to the release notes for fixed issues within an upcoming full engine or hotfix release.

Let me know if you have further questions or need additional assistance.

Cheers,

Andrew Hurley

more ▼

answered Aug 08 '16 at 05:45 PM

avatar image extralongpants Aug 09 '16 at 02:04 AM

Great, thank you!

avatar image homembarata Mar 01 '17 at 07:38 PM

Sorry to bump this but I was having the same problem, saw that the bug was marked as "Won't Fix" and fixed it myself on the engine code: alt text

I haven't noticed any problems after changing the code, just added one line actually. Should I send this to Epic to include on the next version or what?

2017-02-28 (1).png (205.8 kB)
avatar image extralongpants Mar 02 '17 at 05:06 PM

You could make a pull request with the change in question. What was the line you added?

avatar image homembarata Mar 04 '17 at 12:45 AM

On CableComponent.cpp I just added:

 Result.bRenderCustomDepth = ShouldRenderCustomDepth();

to the GetViewRelevance function on the FCableSceneProxy class. I don't know the exact line cause I've been changing some stuff on the CableComponent class and it's likely that it won't be the same to you.

Now Epic states that when a bug is marked as "Won't Fix", this could mean that they won't have time to look into that because there's too much stuff that's more important or that the bug may break something in the engine. I hope it's the former and I wish someone could clarify that to me. Well, I'm making a pull request and I guess I'll find out then.

avatar image extralongpants Mar 06 '17 at 08:28 PM

Thanks for sharing your fix! :) From the description, it looks like the bug just went to won't fix because it hasn't been updated in a while. Hopefully Epic will reopen it in response to your pull request.

avatar image grygabrielphon Aug 25 '17 at 04:39 AM

This is still broken in 4.17. It's annoying - please fix

avatar image Adder1812 Jul 04 '18 at 08:17 AM

This is bull**** ;/ Almost two years and still....

(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