BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

RAINDROPS RUN ON TRAINS WITH 3D CABINS?

3 posters

Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Sun Oct 08, 2023 4:16 pm

Hello, I have questions about how to include raindrops in trains with a 3D cabin.

I know that to add rain to the route it is necessary to direct the .csv file of the drops using ".structure.weather" followed by the ".rain" command in with track, but in relation to the train with 3d cabin, how do I make the drops appear like the video below?



Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Mon Oct 09, 2023 7:41 pm

Not easily at the minute Sad

This would require you to manually create and position raindrops on the 3D panel, and animate them using the subject RainDrop[0 - NumberOfDrops]

Drops should be placed from left to right sequentially. (Y position doesn't matter, you'd just need to ensure a decent random distribution here)

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Tue Oct 10, 2023 5:10 am

Thanks for the feedback.

Do I create a .csv for the drops and then use the command mentioned in the panel.animated file? Could you show me the code and plugins used, please?
Another point, will the windshield wiper clean the drops? We are using plugin [252] for this function.

I'm a developer on a team in Brazil, we only develop trains with 3D cabins and we really want to make this rain animation on the windows.

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Cabine10

Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Thu Oct 12, 2023 8:43 pm

Yes, that's right.
You want a CSV for each drop in the animated file, with the animated state function subject RainDrop[n]
n.b. SnowFlake[n] is also available if snow is set in the routefile.

The wiper position may be found using the animated subject WiperPosition


No plugins are used, this is entirely inbuilt, using the windscreen wipers key.

However, looking at the internals, I don't seem to have hooked this up for anything other than panel2.cfg, although it would work at present on externals.

This build from today will solve that, but unfortunately, the train will need to be in XML format (Where possible new / complicated features are now added here instead):
https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2023-10-12.zip

First, please convert the train using CarXMLConvertor.
Open the car file (or node if single file) for the driver car.
Add a new section within this approximately as follows:
Code:
<Windscreen>
<NumberOfDrops>40</NumberOfDrops>
<WipeSpeed>1.0</WipeSpeed>
<HoldTime></HoldTime>
<DropLife>10.0</DropLife>
</Windscreen>

Documentation on the main site should update shortly to reflect these new properties available.

Please let me know how well this works.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Sat Oct 14, 2023 3:48 am

I think I did as requested, but it didn't work.

I converted the train to XML, created the drops in csv, included the commands passed on to the "Car0.XML' file and, finally, added the command below in panel.animated:

[object]
states = 500\gotas.csv
statefunction = RainDrop [1] 

but an error message "command not supported" appeared.

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Openbv16
RAINDROPS RUN ON TRAINS WITH 3D CABINS? Openbv17

Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Sat Oct 14, 2023 6:58 pm

Fiddle, please have another try with this build:
https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2023-10-12.zip

Hadn't expected you to try it in the viewers (this will now show all drops / flakes in Object Viewer, and hide all in Route Viewer), and I've found another issue to boot.

We will get this working Smile

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Sun Oct 15, 2023 7:33 am

I downloaded the new OpenBve compilation, the error message "the raindrop function is not supported" still appears in the object viewer, but the static drops appear in the game, as created in the .csv file, but they do not appear simultaneously as expected.

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Openbv11

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Openbv18

Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Sun Oct 15, 2023 8:06 pm

Odd; I think the automatic upload must have failed...

https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2023-10-15.zip

I've forced it to rebuild and tested this one from the download- definitely working.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Thu Oct 19, 2023 7:48 am

I downloaded the new build, the error message in the object viewer was corrected, but the drops still appear static. I removed the rain from the route to check if it was something related to the wiper, and even so the drops are fixed, where they shouldn't appear.

But we're on the way, I'm sure we'll make it.  Smile

Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Thu Oct 19, 2023 8:01 pm

It's working OK here Sad
Build from today fixes the fact that the wiper arm function wasn't available in the viewers, but that shouldn't break it in-game.


This is a mega quickly hacked together sample for raindrops + wipers using D1015 as a base.
http://www.bvecornwall.co.uk/downloads/beta/3drain.zip

The raindrops and wiper arms are just colored cubes for ease of showing what's going on.

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Gabriel Souza likes this post

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Quork Sun Oct 22, 2023 3:13 pm

Now that we're touching the subject of raindrops anyways … I never mentioned it since it's really a minor aesthetic factor, but since you're working with rain anyways: It's a bit weird that raindrops conveniently only fall where the wiper lands. They should, if implemented in a cab, fall everywhere on the lowest possible layer (i.e. visually appearing only where the window is) and just be wiped away where the wiper is, rendering the rest of the window more and more unusable, just as in real life.
Quork
Quork

Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Sun Nov 05, 2023 10:31 am

Thanks!
I'll bring you how the project turned out soon.

By the way, what is the button to turn off the cleaner? I wanted to change the key, but I need the file before converting to .DLL

Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Sun Nov 05, 2023 6:52 pm

Wipers are controlled by the in-game control wiper speed up / down controls.
By default, these are set to Y and CTRL + Y

There's no current plugin interaction with these (half the reason for implementing this sort of thing is to try and get it into more mainstream use- Plugins only tend to be used by a few developers)

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Gabriel Souza Sun Nov 12, 2023 8:37 am

leezer3, it looked like this.

I noticed that when I remove the command ".rain 100;0," from the route file, the drops remain fixed in the 3d cabin. Is there a way to create a variable so that the drops only appear when the command is actually written in the route?


Gabriel Souza

Posts : 19
Join date : 2018-08-04

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by leezer3 Mon Nov 13, 2023 8:19 pm

The drops should only appear when rain is present.

This appears to work for me, so I'd first check your animated code, and that you haven't accidentally got another rain command in the routefile. (n.b. Beacon 21 is used by various legacy plugins to control rain, and this is also recognised)

leezer3

Posts : 1978
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

RAINDROPS RUN ON TRAINS WITH 3D CABINS? Empty Re: RAINDROPS RUN ON TRAINS WITH 3D CABINS?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum