We are trying to have a decent shadow, something that could remotely resemble reality, we spend many hundreds of hours to make a decent plane model, others spend hundreds of hours to have decent scenery, others create and maintain complex code, all to give us the satisfaction of having a flight simulator as we want.
All this should be magnificently well, but we continue to neglect the essential elements for the perception of the quality of a project.
An absolutely emblematic case are the shadows generation ...
This is the C172P shadow:
The shadow is really sad, in pieces, this because of the fact that the 3D shadow is made of various parts and the shadow is not 100% but with a certain level of transparency, for this reason dark stripes are formed at the junction points.
With Rembrandt the situation is much better and the shadows are dynamic and the bad "tile" effect does not form when the ground is not regular.
The problem is that Rembrandt is not currently updated and therefore does not incorporate the ALS effects that are very well done.
In fact, currently the solution of the shadows is not present, satisfactorily, in FGFS with ALS. It is a real sadness
Our G91-R1B can not use Rembrandt as many effects that are used, especially in the cockpit, they are working properly only in ALS.
I know that someone can criticize this choice, but it was born out of the fact that it is unlikely that Rembrandt will continue to be used in the future.
We made a 3D model of the fuselage, landing gear and wing tanks, we put everything inside a .ac file and we activated it using XML as described and used, for example, by C172P.
This is the code:
- Code: Select all
<?xml version="1.0"?>
<PropertyList>
<path>shadow-vol-g91.ac</path>
<offsets>
<x-m>0.0</x-m>
<y-m>0.0</y-m>
<z-m>-1.07</z-m>
<roll-deg>0.0</roll-deg>
</offsets>
<effect>
<inherits-from>Effects/shadow-vol</inherits-from>
<object-name>shadow-vol-g91</object-name>
<object-name>shadow-vol-g91_tank</object-name>
<object-name>gear-front</object-name>
<object-name>gear-principal</object-name>
</effect>
<animation>
<object-name>shadow-vol-g91</object-name>
<object-name>shadow-vol-g91_tank</object-name>
<object-name>gear-front</object-name>
<object-name>gear-principal</object-name>
<type>select</type>
<condition>
<not>
<property>/sim/rendering/rembrandt/enabled</property>
</not>
<equals>
<property>/sim/rendering/shaders/skydome</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>noshadow</type>
<object-name>shadow-vol-g91</object-name>
<object-name>shadow-vol-g91_tank</object-name>
<object-name>gear-front</object-name>
<object-name>gear-principal</object-name>
</animation>
<!-- Roll -->
<animation>
<type>rotate</type>
<object-name>shadow-vol-g91</object-name>
<object-name>shadow-vol-tank</object-name>
<object-name>gear-front</object-name>
<object-name>gear-principal</object-name>
<property>/orientation/roll-deg</property>
<factor>1.0</factor>
<center>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</center>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<!-- Pitch -->
<animation>
<type>rotate</type>
<object-name>shadow-vol-g91</object-name>
<object-name>shadow-vol-g91_tank</object-name>
<object-name>gear-front</object-name>
<object-name>gear-principal</object-name>
<property>/orientation/pitch-deg</property>
<factor>1.0</factor>
<center>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</center>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
</PropertyList>
The result is absolutely depressing, it is incomprehensible that the sun is under 180 ° compared to the real one ... someone can help me to tell me where we were wrong about the code.
Then there is the problem of the absolute black color of the shadow, there is no gradient on the edge, does anyone have an idea that we can improve it?
We hope someone can advise me on how to better program the XML. But it would be much better if the problem was resolved in a more radical way. It would be necessary to have a piece of Rembrandt in XML.
I found this article very interesting for the shadows, I do not know if it's known:
http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/