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"

[Closed] Tessellation Camera Distance LOD?

I was wondering if there was a way to control the density of Tessellated meshes/materials as they expand away from or coming toward the camera. Right now my Tessellation triangle density remains the same on all meshes in the level causing a significant performance hit.

Thanks!

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 05:32 AM in Everything Else

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

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

The question has been closed Oct 03 '14 at 03:20 PM by Jonathan Dorman for the following reason:

Beta question


5 answers: sort voted first

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.

more ▼

answered Oct 03 '14 at 03:19 PM

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

Would be Very Nice

've done a lot with DX11 Tessellation in UE4, and I also would appreciate some sort of easy scalar value to plug in to control how much the tessellation factor scales itself with distance of actor to camera :)

In the Meantime

In the meantime here's the basic idea of a Material network you could use to regulate the Tesselation factor by distance

I've dynamically changed tessellation factor via material instances, so I can say that changing this value alot during game time is not a problem

but compiling the material shader does take a while :)

alt text

:)

Rma

basicidea.jpg (169.8 kB)
more ▼

answered Mar 11 '14 at 05:32 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

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

Hey there, I was experimenting a lot and did some math and found a great solution to this problem. I even did a Tutorial how to change the tessellation lod of your object based on your distance towards the object:

https://www.youtube.com/watch?v=D6zyUI33FqA

I hope this helps. The material is driven by 6 parameters -> 3 for World Displacement and 3 for Tesselation Multiplier. You can set up the base value (maximum depth, maximum iterations) and then the minimum and maximum distance. The minimum distance is the distance from the object, where the set tesselation value (depth or iterations) stays the same. Then from the minimum towards the maximum distance it transitions towards 0.

Greetings, Dave

PS: I also just added an unreal engine wiki page: https://wiki.unrealengine.com/Distance_Based_DX11_Tesselation_-_Video

more ▼

answered Apr 23 '14 at 10:28 AM

avatar image

DaveTheFreak
63 7 5 16

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

you can multiply the scene depth and max tessellation value together to scale tessellation to distance.

more ▼

answered Mar 11 '14 at 05:32 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

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

Have you tried enabling adaptive tessellation on the material's properties. That causes the engine to try to choose a tessellation factor to maintain a constant triangle density in screen space. The tessellation factor specified by the material is then read as a multiplier so that you can boost or decrease the computed tessellation factor.

more ▼

answered Mar 11 '14 at 05:32 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3667 1996 9121

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:32 AM

I always enable adaptive tessellation and I've never noticed fps changes based on distance from materials with tessellation

I posted a big forum post with some tests and pictures.

I did a test with 100 shields using dx11 tessellation on their mateiral

http://forums.epicgames.com/threads/978673-Picture-Gallery-Dx11-Turn-Texture-Detail-into-3D-Vertex-level-Detail-Procedural-HD?p=31728190&viewfull=1#post31728190

100 shield with no tessellation = 90 FPS (my set maximum), no drop at all, no matter what distance

100 shields WITH tessellation material, if I was very very far = 90 FPS

If I got relatively close but could see all 100 shields, I was then at 70 FPS, at a distance where the tessellation amount should have been 0. (there's a pic at the link above)

I never noticed an increase in the FPS as I got further away from all the 100 shields (where the tessellation should go to 0).

My material was using a tessellation factor of 1

I also used a Material instance Tess factor of 0.777

The only FPS Changes

The only gains in fps I got where actually very close, when some shields were getting culled.

How to use Tess Factor as a Distance Multiplier Correctly?

I am happy to assume I am just not using the existing system correctly.

Should I not be using a factor of 0.777 or 1 for a relatively small object, seen anywhere from super far away to very up close?

Thanks!

Thanks!

Rama

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:32 AM

It's hard to measure the perf impact if you are just looking at framerate.

You might consider using our GPU profiler. The UI is very early, but the gist is that you enter "profilegpu" on the console or press Ctrl+Shift+Comma to profile the next frame on the GPU. You will get a hierarchical breakdown of where GPU time went for that frame.

For a variety of reasons the numbers you get back from the GPU are not always consistent (frequency scaling, other applications using GPU resources, the driver further optimizing shaders in the background, etc.). I'd suggest always taking a few captures to verify your numbers. It also helps to make sure you are rendering exactly the same objects, so I'd suggest the following:

  1. Launch the game in standalone or PIE.

  2. Go to the viewpoint you wish to profile.

  3. freezerendering on the console

  4. profilegpu on the console

  5. Check out results, report 4-5 a few times.

A couple of experiments can help you determine the performance impact of different levels of tessellation. A good test is to look at the shadow depth passes for a movable directional light as that pass is often vertex bound and will be most impacted by tessellation. You can then experiment with tessellation on/off, adaptive on/off, and different tessellation multipliers.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:32 AM

Thanks for the tip about freezerendering Nick, and your analysis workflow suggestions!

:)

Rama

(I would check mark this but its not my thread)

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

Follow this question

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

Answers to this question