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"

为什么空场景没有任何光照,Unlit无光照材质还是会受影响,而在Unity里是不会的

alt text

Product Version: UE 4.22
Tags:
more ▼

asked Jun 03 '19 at 02:09 PM in Chinese

avatar image

LittlerStar
3 1 1

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

1 answer: sort voted first

Hi,

你的理解可能有些问题,无光照材质并不会受到光照影响。你搞错的原因是你这里看到的区别是由于debug的viewmode造成的。在lighting阶段后,所有的着色计算两者都是完全相同的,只是在pp的tonemapping阶段有了变化。而发生变化的关键是Exposure的值。在Unlit的viewmode下,引擎的debug标记会标记成全场景都不没有lighting,也就是整个渲染的EngineShowFlag.Lighting是0,也就无从进行EyeAdaption。否则即使你什么灯光都不放,引擎也并不知道你的自发光材质本身会不会对当前亮度产生影响,所以走的代码路径是不同的(注意这里的Unlit viewmode是个debug mode,在真实情况下是不可能存在并走到的)。

具体代码可以看ComputeEyeAdaptationValues方法,区别在于Unlit的的分支什么都没有计算,但是Lit的分支,默认会使用引擎默认设置的Settings.AutoExposureMinBrightness/Settings.AutoExposureMaxBrightness,从而影响了Out[0]的Z和W值,进而影响了FixedExposure值,会在tonemapping的时候造成影响。

more ▼

answered Jun 03 '19 at 07:53 PM

avatar image

Mi.Wang STAFF
150 12 4 5

avatar image LittlerStar Jun 04 '19 at 09:47 AM

非常感谢大神提供的帮助alt text

(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