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"

Patchy Distance Fields, whats wrong?


Since distance field shadows are a thing, I have never been able to create models that cast proper shadows.

To illustrate I attached the visualization and resulting look from a roof mesh for a model I'm making. Increase/Decrease in geometry didn't do anything. Increase in the resolution scale did bring some improvements but nothing to write home about. Extruding the mesh so that it's double sided did improve it somewhat but at steeper angles the shadows where still inaccurate.

alt text

Looking at the models that ship in the Epic demos, they all have these spotless Distance Fields so I know it's possible.

Are there any tutorials out there on how to model with distance fields in mind? What are the main things one must look out for?

Thank you for your help.


Ps. Under product version I listed 4.8 preview but it's been happening with all versions.

Product Version: UE 4.8 Preview
df_shadows.jpg (169.1 kB)
more ▼

asked May 20 '15 at 09:41 AM in Using UE4

avatar image

96 11 15 35

avatar image NomadSoul2501 May 24 '15 at 08:33 AM

No one else having problems with this?

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

1 answer: sort voted first

Hi Sebastian,

I've tried to reproduce this on my end, but I cannot get the same results, even with a simple long plane mesh.

If you want you can attach the asset and I'll have a look on my end to see if I can offer some pointers.

As for limitations and developing assets with Distance Fields in mind you should have a look at the documentation for Distance Field AO and Distance Field Soft Shadows. A lot of the limitations listed between these two carry over to each other. There are some things that are specific to DFAO or DFSS, but mostly the limitations are similar and should be adhered to.

Let me know if you have any questions.


more ▼

answered May 26 '15 at 08:25 PM

avatar image

Tim Hobson ♦♦ STAFF
48.9k 887 101 877

avatar image NomadSoul2501 May 27 '15 at 09:38 AM

Hi Tim,

Thank you for your reply. This happens on almost every mesh I make. I've tried exporting using different fbx versions and different grid/size settings. Nothing helps.

I'm using Win7, Maya 2014 and 2016

If its possible, I'd love to send you a mesh and see if it happens on your end as well. How can I do that? It wont let me attach meshes here as it says they are an invalid filetype,

Thank you for your help, Sebastian

avatar image Tim Hobson ♦♦ STAFF May 27 '15 at 01:35 PM

You can put it in a zip file and upload here as long as it's under 5.2 mb or you can send a download link via a PM in the forums here: https://forums.unrealengine.com/private.php?do=newpm&u=4894

avatar image NomadSoul2501 May 28 '15 at 10:53 AM

Oh cool, that worked :) Hope you can make some sense of this. Made a simple room yesterday and even there I can't get distance fields to calculate right.

Thank you so much for your time.

Best, Sebastian

link text

avatar image Tim Hobson ♦♦ STAFF May 28 '15 at 02:03 PM

Looking at your asset, it is a very large piece, which doesn't scale well with distance fields. Distance Fields that are generated work best with smaller modular pieces to get the best results.

Sometimes using a higher distance field resolution (build settings in the static mesh editor) will help alleviate some of this by generating a high resolution distance field mesh for your asset.

When troubleshooting some of these issues it's best to use the viewport view mode to see your distance fields by going to Show > Visualize > Mesh Distance Fields.

With your room that you mention you're having issues with, is this a single mesh or very large mesh? If that's the case it would be better to break the walls up into their own individual pieces and add some thickness to them, if not already. This will give the best results when creating meshes for distance field methods.

I hope this helps and feel free to ask any other related questions if you have any.


avatar image NomadSoul2501 May 29 '15 at 09:27 AM

Thank you Tim, for taking a look. I'll try breaking everything up into smaller chunks. For a huge and simple mesh like this I wanted to keep it one piece to save on drawcalls but I was probably overzealous :)


avatar image Tim Hobson ♦♦ STAFF May 29 '15 at 01:40 PM

While you may have a few more draw calls for static meshes in your scene, it's better in the sense that when breaking up your mesh into multiple pieces, the meshes that are not visible will not be rendered, where as if you have a single large mesh the parts that are hidden will still be rendered since it's a single mesh.

If they're all using the same material this should be a single draw call for that material, so you really shouldn't see a dip in performance compared to what you already had.

If you find you're still having trouble please let me know and I'll help where I can. :)

(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