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"

Double sided material cost

Hello there. I'd like to know how double sided materials compare against real geometry. Being more specific, is it fine using a double sided material for a mesh that only needs it for a small part of it (something like a flag (needs two sided mat) with its pole (no need for two sided mat)) or would it cost less to thicken the flag resulting in doubling its polygons on that part of the mesh? Thank you in advance.

Product Version: UE 4.8
Tags:
more ▼

asked Jul 27 '15 at 10:00 AM in Rendering

avatar image

B14ckfir3
6 1 3 5

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

2 answers: sort voted first

Hey B14ckfir3,

Your most efficient bet, and how I would approach this situation, would be to apply a two-sided material to the flag mesh as its own material. That way, if you want to use the material again on another cloth asset, you can create a material instance and modify whatever parameters you establish within the material. This will eliminate the overhead of creating multiple materials using a similar approach, and so you don't quickly start increasing undeeded poly/triangle count for the flag pole itself. Layered materials are comprised of various material functions which is generally used for more complex shader work.

Material Instances

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/MaterialInstances/index.html

For the flag pole you can apply however simple or complex a material as you would like. If you are looking to test performance and optimize you project I would take a look at the performance and profiling documentation. It can give you a bit more insight on how, when, and where to use and apply certain materials in certain situations. Profiling your project is very important if you have a target platform and need to make sure your levels are optimized to run efficiently at the settings desired.

Performance and Profiling

https://docs.unrealengine.com/latest/INT/Engine/Performance/index.html

In your case, using two separate materials for your mesh would be the most efficient. Especially if you plan on using those materials more than once.

Regards,

Andrew Hurley

more ▼

answered Aug 03 '15 at 02:09 PM

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

Hey B14ckfir3,

The normal will be flipped on back faces, which means lighting will be calculated for both the front faces and the back faces. This is commonly used on foliage to keep from having to double up the number of polygons. Two Sided does not work correctly with static lighting, since the mesh still uses only a single UV set for light mapping. As a result, two sided materials with static lighting will be shaded the same on both sides.

Whatever material is applied to the mesh, will also be rendered on the back side of the faces. If used on material that uses the Translucent Blend Mode, it will create more overdraw and will be more expensive to render. In your case it all depends on the amount of polygons on your flag mesh. If it has a fairly high number of polygons, you will gain better performance from using the 'Two Sided' option rather than doubling your poly count.

Just in case you wanted to read up on some more material properties I have provided a link to that specific documentation page below. Let me know if you have any further questions.

Material Properties

https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/MaterialProperties/index.html

Cheers,

Andrew Hurley

more ▼

answered Jul 27 '15 at 10:33 PM

avatar image B14ckfir3 Aug 02 '15 at 04:41 PM

I'm totally aware of everything you've mentioned above but my question is a little different. Let's go back to the flag example: The flag's fabric is about 100 tris. That part of the flag needs double sided geometry to prevent the back face culling. On the other side, the flag's pole, has about 20 tris but it doesn't need double sided mat.

example image

Which one of the following options is the most efficient:

  • Double the fabric's faces (total 220 tris)

  • Use two different materials for each part (double draw calls)

  • Use layered materials (no idea about the cost)

  • Use one material for both fabric and pole with "two sided material" option enabled (pole gets also the double sided material which is useless)

If the last options is the most efficient because of the low number of tris for pole, which option would be better for a mesh that has something like 10 tris which need double sided material and 1000 tris which do not?

flag.png (69.3 kB)
(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