P3D v4 WindShild RainEffect on Buildings

Christian Bahr

Resource contributor
Hi Devs!

A simple question. Is it possible to put the WindShildRainEffect on buildings as well and has someone gained experience with that? Here in the forum I could not find anything suitable for the subject.

What is meant is whether the raindrop effect, which has existed since P3DV4 for aircraft windshild, can also be applied to windows of buildings. This refers to static buildings that are located in a BGL-Lib. Maybe that will work with SimObjects !?
 
Aren't those windshield effects actually FX files?
I believe I have seen draindrop effects in Aerosoft's EDDK preview but pretty sure those are done via effects too.

It is possible to control effects in an FX file to only show in a certain direction, e.g. along a window placed as attachpoints. But that would still need to check the rain on/off condition to display which can't be done through effects as far as I know. Simconnect may be the right direction to look into here?

Bests,
Sascha
 

Christian Bahr

Resource contributor
Hello Sascha.

I actually meant raindrops on the window pane. I am currently in the process of modernizing a few of my scenes. With Muelheim Ruhr X, this worked well, but at Nannhausen I would like to - as a special feature - that the windows of the controller building in rainy weather raindrops are simulated. For this I had read through the corresponding SDK sections in the example of the Mooney Bravo SDK. The difference is that Mooney is an active Sim object, but the controller building is a static object. And there I ask myself the question if that is even possible, namely to put the windshild rain effect of an airplane on the windowpane of a static building.

The raindrop effect in EDDK Cologne I know from the Aerosoft Forum, which looks very, very very good, but that's probably a completely different technique. I did not mean that. I mean the Windshild rain effect on cockpit windows.
 
Hi Christian:

Are you wanting to see the raindrops on the window panes from inside a building with transparent windows ?

If so, do you plan to only do this when loading from a saved 'flight' for ex: a "non-flight" session from inside a (static) SimObject that is not intended to 'fly' ...such as a Control Tower or other building, and from which you will eventually exit, prior to launching a flight in a different (move-able) user aircraft or other user-controllable ground vehicle ? :scratchch


PS: Would you please post a link to the Aerosoft Forum EDDK Cologne 'raindrop effect' discussion thread ?


GaryGB
 
Last edited:

MOUSY

Resource contributor
I think you may be overthinking this Gary. I think he simply means a scenery object building with an effect attached to the glass that we can see when outside or inside the building. For example


I have been thinking about this myself and my first thoughts are that its visibility would probably be controlled by something like SODE.
 
Hi Mousy:

While I believe that there is value in your making well-intended posts that share ideas on possible work-flows, I would not consider it appropriate to word such posts in a way that presumes to know what- and to what extent- another forum participant is thinking (...or not thinking).

I also would not consider it appropriate for you to place a negative value judgement on what you presume to know about another forum participant's thinking process.

As I await an answer directly from Christian (whom I believe to be the only person qualified to reply on his own behalf and to thus explain what he was "thinking" when he made his opening post and subsequent post above, I believe it would be appropriate for you to acknowledge that I have posed a direct question to Christian Bahr for several specific reasons, and for which I would consider his direct answer to be the only valid means of understanding what he (f)actually had in mind when he posted above in this thread.

Please do not presume to know- or comment on (especially with a negative value judgement ! )- ...the "thinking" process of other forum participants, as this may ultimately be found to misrepresent the person in a manner that puts you in an un-enviable position of civil liability ....for "uncivil" behavior.


Thanks for your kind consideration of this request for maintaining "civil" behavior in the FSDeveloper forums.

https://www.fsdeveloper.com/forum/threads/please-keep-discussions-civil.216157/


I look forward to reading Christian's reply to my questions above, as I also genuinely welcome the opportunity to read others' (courteously communicated) ideas on how one might implement rain effects with static scenery objects of buildings, whether seen from inside FS' built-in Control Tower SimObject via "ATC / Multi-player Mode", from custom SimObject camera views via a saved flight, or from outside a SimObject in a 'normal' flight session (with or without the associated use of a conditional display module such as SODE).

GaryGB
 
Last edited:

MOUSY

Resource contributor
Uncivil behavior, negative value judgement, and a link to being civil.
Wow.
I meant nothing de-valuing from my post.
Yet, I realize this is the internet, so:


My apologies for adding my 2 cents to the discussion based on what I understood from the OPs post, and attempting to provide assistance to understanding a question that was put forward, even if it wasn't directed at me.
 

Christian Bahr

Resource contributor
Hi Christian:
Are you wanting to see the raindrops on the window panes from inside a building with transparent windows ?
If so, do you plan to only do this when loading from a saved 'flight' for ex: a "non-flight" session from inside a (static) SimObject that is not intended to 'fly' ...such as a Control Tower or other building, and from which you will eventually exit, prior to launching a flight in a different (move-able) user aircraft or other user-controllable ground vehicle ? :scratchch
PS: Would you please post a link to the Aerosoft Forum EDDK Cologne 'raindrop effect' discussion thread ?
GaryGB

Here is the link to the article in Sascha's mention of the Aerosoft Forum : http://forum.aerosoft.com/index.php?/topic/127688-kölnbonn-airport-preview/&do=findComment&comment=903590

These are raindrops on the ground, but unfortunately this is not what I would like to have. My attempt is to see the native P3DV4 WindshildRainEffect as seen on the cockpit panes of aircraft. I would like to have this WindshildRainEffect (rolling rain drops) on the glass pane of the window at the controller building in Nannhausen ...

ants_eaglet_rain_effect.jpg

Windshild Rain Effect on Ant's Tecnam Eaglet

Whether the windows of the controller building should also be transparent, I had not yet asked the question. But they probably have to be, because that probably requires the material settings !? But I'm not far enough yet. It would be enough for me if raindrops are visible on the glass. At first I would try a non-transparent lens - if that works. The controller building is not an active simobject, like an aircraft that has this rain effect. To better understand which building is concerned, here is a screenshot of the controller building ...

rain_effect_nannhausen.jpg

The "Tower" in EDRN Nannhausen. The windows should have a raindrop effect.


The rain effect should be displayed within a free-flight session and not in the context of a mission or a closed flight. The controller building is an object within a BGL-Lib, so it is not a simobject which should be placed with SODE, for example.

I will now go through the instructions in the SDK for Mooney Bravo again, there is described how to create using an LUA script the WindShildRain Effect for an aircraft. If the effect works only with active Simobjects, then at least one of my avatars gets glasses put on and the lenses get the RainDrop effect ...

rineffect_avatar.jpg

If you can not apply the raindrop effect to windows of buildings, then maybe that works for avatars glasses :)
 
Hi Christian:

Thanks for your reply to help us understand what your goal is in working with this interesting "Rain Effect" applied via LUA.


The direct link to P3Dv4.x SDK docs on this WindshieldRain Effect is:

http://www.prepar3d.com/SDKv4/sdk/modeling/3ds_max/modeling/new_aircraft_procedures.html#Virtual Cockpit Specific Materials


I am curious if you may have seen this thread on implementing the WindshieldRain Effect script ?

https://www.fsdeveloper.com/forum/threads/p3dv4-material-scripting.440875/



Some additional info c/o Lagaffe:

https://translate.google.com/translate?hl=en&sl=fr&u=http://www.pilote-virtuel.com/viewtopic.php?id=82987&prev=search



A YouTube demo video of the WindshieldRain Effect:



...which is linked from this thread at SOH:

http://www.sim-outhouse.com/sohforums/showthread.php/107771-Version-4-1?p=1107137


GaryGB
 
Last edited:

Christian Bahr

Resource contributor
Hello Gary, thank you for your answer.

The corresponding sections in the SDK on the windshield effect, I have now gone through several times, but come to no result. The raindrop effect is not displayed on any of my materials. The SDK always refers to the virtual cockpit. And this is probably the problem. A virtual cockpit is the internal model of an airplane, and only then will raindrops be displayed. So you will not be able to easily apply this technique to a static BGL file. And in an avatar with glasses always external model (exterior model) is displayed. Whether that comes to success, I'm not sure anymore. But I stay tuned and will report as soon as there is something successful to report :)
 
Hi Christian:

Thanks for your additional interpretation and description of tested work-flow with this

IIUC, if the P3Dv4.x default:

[Prepar3D v4 install path]\Scripts\PrecipWindshieldRain.LUA

...script is comparable to a worked example provided by DaveWG in the thread linked above, perhaps:

* a "dry" Diffuse texture is substituted / modified by a "wet" version of the Diffuse texture on a 2nd set of Material mapping UVs as a 2nd channel

...or:

* a P3Dv4.x default "special" texture (32-bit color grayscale with Alpha channel ?):

C:\Prepar3d\trunk\art\objects\Weather\VCRain\VCRainMoving0000.tga

...with unique pixel coordinates for areas of variable grayscale Alpha transparency, is utilized as Detail Material (...dynamically read / displayed to create the "moving droplet" effect ?)


I wonder if this is comparable to texture image coordinate 'zone' mapping in a "animated image sequence" Effect (*.Fx file), or perhaps a way of modulating Shader functions such as might be done for wave action with the "OceanHeight20Field*.DDS" and "OceanHeightField.BMP" files via FS "LivingWater.DLL" in other parts of the FS rendering engine sub-system ? :scratchch


In either case, it appears 'unique' Material Properties are used for the mapped Diffuse and/or Detail textures cited above. :pushpin:


GaryGB
 
Last edited:

Christian Bahr

Resource contributor
It seems so, so if my idea is not so easy to carry out, Gary.

The steps I have now performed several times, and of course the second channel in the UV map settings. I've tried both a diffuse texture and the VCRainMoving000 texture. I have to go through all this in peace and if I succeed, then this is written down.
Thank you for your help, Gary!
 
Since I do not have P3Dv4.x to test with yet, I am of course interested in a possibility that one might do this for FSX as well. ;)

AFAIK, "Multi-Texturing" historically only worked on FS aircraft, but IIRC, Detail / Bump Maps were able to be used (...with a performance hit) on both user aircraft and static scenery MDL objects beginning with the FSX MDL format.

I wanted to research to what extent static scenery MDL objects not configured as SimObjects can implement "Detail" Maps etc., and I am reviewing this interesting thread regarding a flat 3D model compiled as a FSX MDL-based G-Poly (...which is not configured as a SimObject):

https://www.fsdeveloper.com/forum/threads/how-to-add-a-detail-map.424929/


UPDATE:

I also found another pertinent and informative thread on this topic here at FSDeveloper:

https://www.fsdeveloper.com/forum/threads/tfdi-design-trueglass.441174/


I hope this info might yield some helpful insight on the topic under consideration here for both FSX and P3Dv4.x. :)

GaryGB
 
Last edited:

Christian Bahr

Resource contributor
Since I do not have P3Dv4.x to test with yet, I am of course interested in a possibility that one might do this for FSX as well. ;)

AFAIK, "Multi-Texturing" historically only worked on FS aircraft, but IIRC, Detail / Bump Maps were able to be used (...with a performance hit) on both user aircraft and static scenery MDL objects beginning with the FSX MDL format.

I wanted to research to what extent static scenery MDL objects not configured as SimObjects can implement "Detail" Maps etc., and I am reviewing this interesting thread regarding a flat 3D model compiled as a FSX MDL-based G-Poly (...which is not configured as a SimObject):

https://www.fsdeveloper.com/forum/threads/how-to-add-a-detail-map.424929/

UPDATE:

I also found another pertinent and informative thread on this topic here at FSDeveloper:

https://www.fsdeveloper.com/forum/threads/tfdi-design-trueglass.441174/

I hope this info might yield some helpful insight on the topic under consideration here for both FSX and P3Dv4.x. :)

GaryGB
Thanks again, Gary.

At the moment I put the topic back on my to-do-list. An interesting, but not easy topic. Currently I'm just distracted by something else and will then deal with the RainEffekt again.
 

JB3DG

Resource contributor
I believe the sim does allow rendering $textures on scenery objects using the PDK and one can apply a single texture to multiple windows.
 
Regarding the latter (2) posts immediately above, I'm curious as to whether use of a Texture.Cfg with a scenery object might effectively substitute for- and eliminate the need for- a Panel.Cfg (...which IIUC, is otherwise a component of a SimObject) when implementing alternate textures mapped onto a MDL without use of a Gauge "planar" in a virtual cockpit MDL ? :scratchch


I was intrigued as to how much of the 'legacy' SDK methods may still apply in FSX and P3D as discussed here:

https://www.avsim.com/forums/topic/71756-default-vcs/


Thanks for your additional input on options for a possible work-flow to implement this "WindShield Rain Effect" on a scenery object in FSX and P3D. :)

GaryGB
 
Last edited:
Regarding the latter (2) posts immediately above, I'm curious as to whether use of a Texture.Cfg with a scenery object might effectively substitute for- and eliminate the need for- a Panel.Cfg (...which IIUC, is otherwise a component of a SimObject) when implementing alternate textures mapped onto a MDL without use of a Gauge "planar" in a virtual cockpit MDL ? :scratchch


I was intrigued as to how much of the 'legacy' SDK methods may still apply in FSX and P3D as discussed here:

https://www.avsim.com/forums/topic/71756-default-vcs/


Thanks for your additional input on options for a possible work-flow to implement this "WindShield Rain Effect" on a scenery object in FSX and P3D. :)

GaryGB
My question is how do you tell an MDL based object to read a $texture instead of a normal texture (.dds)?
In an MDL driven object (no CFG files), is this possible?
 

Christian Bahr

Resource contributor
First of all many thanks for the many answers and the many good tips :)

Now I've come a step further and can say that my idea of raindrops on a windowpane of a BGL building probably does not work. The corresponding section in the SDK to the Mooney Bravo, I have now read several times and it follows that you need two models: external and internal. The windows of both models (internal / external) need different material settings. For this I had specially created a vehicle (Hummer H3) to implement there the WindShildRain effect. That did not work out, but I'm on a good way.

Thanks again to all!
 
Top