ALS technical notes: Difference between revisions

Jump to navigation Jump to search
(2 intermediate revisions by 2 users not shown)
Line 1,294: Line 1,294:


<b>Important note:</b> Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.
<b>Important note:</b> Currently (May 2015) the effect does not deal gracefully with child models included into the main model with offsets and/or rotations because these introduce a different coordinate system in which the shadow does not match. The general idea of a code solution is known, but not implemented. Right now this can only be addressed by explicitly positioning child models in the *.ac file and not using any offsets when including them.
=== Shadow Mapping ===
Shadow mapping is disabled by default for objects using the model-interior Effect. The previously mentioned technique of using a cubemap to render shadows is much cheaper than shadow mapping, but it suffers from perspective errors and the shadows can look wrong in some cases. If your aircraft does not use cubemap shadows and instead wants to rely on shadow mapping, you can add the following parameter to the <tt>predicate</tt> section of your Effect:
<syntaxhighlight lang="xml">
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
</syntaxhighlight>
'''Special note:'''
Because your still using model-interior and model-interior.eff is setup around the opacity cube map, if you go without one, and in the event you try, you get an environment reflection cube map as default which happens to have green grass on it and may cast a greenish hue over applied objects thus washing out the compositor shadows some what. A workaround is to create a pseudo cubemap by creating a white.png 64x64 square, and creating the following structure to represent a transparent cubemap.
<texture n="4">
  <type>cubemap</type>
    <images>
      <positive-x>Aircraft/c172p/Models/Effects/interior/white.png</positive-x>
      <negative-x>Aircraft/c172p/Models/Effects/interior/white.png</negative-x>
      <positive-y>Aircraft/c172p/Models/Effects/interior/white.png</positive-y>
      <negative-y>Aircraft/c172p/Models/Effects/interior/white.png</negative-y>
      <positive-z>Aircraft/c172p/Models/Effects/interior/white.png</positive-z>
      <negative-z>Aircraft/c172p/Models/Effects/interior/white.png</negative-z>
  </images>
</texture>


=== ALS flashlight ===
=== ALS flashlight ===
330

edits

Navigation menu