Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Demo - Infinite Rain with Particles

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Jun 2005 23:09 Edited at: 27th Jun 2005 23:19
Thid demo shows how to apply infinite rain with the Cloth and Particles Pack. It uses the example terrain from the free Terrain plugin (included by default from U5.8).

The image shows the "before and after" terrain, with nothing but rain particles and fog added. It completely changes the mood of the scene!



There is one particle emitter. This is a box emitter, which "hangs" above and in front of the camera. It is moved with the camera.
There is also a Wrapround effector, which forms a box in front of the camera. What this does is ensure that as the camera moves forward and backward, or rotates, the scene directly in front of the camera is always filled with rain.

The overall effect is that you have infinite rain in all directions. In truth, you only have a small box of rain which sits in front of the camera. There are only 150 particles to fill an entire landscape!

http://www.biglaugh.co.uk/rain.zip (4.5 MB)

BatVink

Attachments

Login to view attachments
Hawkeye
20
Years of Service
User Offline
Joined: 19th Sep 2003
Location: SC, USA
Posted: 28th Jun 2005 00:14
Dude... I've seriously gotta get that addon..


Benjamin says: fecking twat of a program [msn7]
Meh blog
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 28th Jun 2005 00:26
Great job BatVink. It's a lot better than the sprites that I have seen people use.

-This...is my boomstick!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Jun 2005 01:14 Edited at: 28th Jun 2005 01:16
Update: This demo now does rain and snow. Press "r" and "s" to toggle, one will fade away as the other kicks in.

Quote: "Dude... I've seriously gotta get that addon"


I don't think people realise that particles can be used for more than just...well, particles!
My other demo in WIP shows "The Matrix", lemonade(!), fireworks and explosions.

BatVink
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 28th Jun 2005 01:36
Hmmm... Nice job, I suggested particles the other day in the DBPro forum when somebody asked about rain.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 28th Jun 2005 01:39
Great job

Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 28th Jun 2005 07:07
Well I've checked it out and it was great. Only 2 problems. It looks strange when your moving and the particles sometimes are appearing out of nowhere right in front of you. But none the less great demo and great improvment so far.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Jun 2005 17:04
Keaz, Baggers noticed the same thing, the answer I gave is below. You are right, it can be a bit weird. But remember, in-game you are not likely to be watching the rain in detail.

Quote: "I agree Baggers, I was trying to do a trade-off of various aspects. Originally, I had all particles being created off-screen above, but then I had to increase the particle life, and as a knock-on effect add more particles. This demo was about minimum particles. Even still, it runs at 130 FPS on my 1.7Ghz laptop, thanks to the Particles pack, rather than my coding...I'm just taking advantage!
"


BatVink
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 28th Jun 2005 21:33 Edited at: 28th Jun 2005 21:37
Yeah it was still a good demo anyway as that is what it was a demo to show what could be done with a bit of effort.

The problem is a lot less noticeable during the snow. Prolly since the snow particles are bigger there is more going on onscreen to distract the eye.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Keaz
20
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 28th Jun 2005 21:39
I've got a few ideas of my own I plan on trying once I buy a few more of the extensions.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 29th Jun 2005 13:14
Just got the particle pack today. Anychance we could take a look at your source bat? Im still new to the commands and it would be a nice tutorial.

Thanks in advance

All you need is zeal
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Jun 2005 22:12
Zealous, the easiest way to experiment would be to use the beta of my program. Every parameter in the particles pack can be adjusted, and you can export one emitter, one effector and one collider to DB Pro code in the beta. So...create an emitter, adjust it's properties to get the effect you want, then export the code to see how it's programmed.

http://darkbasic.biglaugh.co.uk/smartparticles.html

BatVink
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 30th Jun 2005 05:14 Edited at: 30th Jun 2005 05:31
Nice program. However I have a few questions maybe you, the particle master, can answer.

1.) How in gods name do you position a emitter? I swer I couldnt find a "position emitter" type command in the help file.

2.) For some reason I cant get the wrap around effector to work. I add it, and can see the wireframe for it. However I am unable to reshape it, or get it to work (particles just shoot right through it, out into space).

3.) How would I go about starting a particle off with a negative y speed? So when a raindrop spawns at the top of my rain box, it doesnt waste time hanging in mid air before gravity pulls it down to the camera?

4.) And lastly, is it possible to rotate emitters/effectors? Im trying to figure out how you got the emitter to "hang" above the camera. Either you just made a giant square spwan area (so you couldnt see the edges regardless of camera y angle), or you some how managed to rotate the emitter box y angle to match the camera.

Thanks in advance for any help! Really glad I ordered this pack its great!

*edit after inspecting some of the exported code I see that emitters are positioned/rotated with the object commands. I imagine that means they need unique object ids as well, thats a shame. Oh well, scratch questions 1 and 4 ehe

*edit wow im on a roll. I guess I was never clicking the emitter to apply it after I created a effector. Gravity and wrap working fine now. Scratch question 2. and I think now that gravity is working they arent shooting up in the air when they spawn, so scratch question 3 as well.

Thanks Zealous!

All you need is zeal
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Jun 2005 05:28 Edited at: 30th Jun 2005 05:36
EDIT: posted at same time! I'll leave it in for others.

Quote: "How in gods name do you position a emitter"


Position Object

Quote: "For some reason I cant get the wrap around effector to work"


OK...I need to make some help files . Create an emitter. Then create your effector. In the list of available emitters, double-click to make the "connection" between the 2. It will be marked with an "X" to show that th e2 are now connected. Double-click again to detach.

Quote: "How would I go about starting a particle off with a negative y speed?"


Basic emitters can be "pointed" using the rotation controls at the bottom. Then you can set the velocity. Box emitters aren't directional. You could use a force effector, which is a constant force rather than gravity which is progressive. You would probably want to activate Falloff, so that it didn't accelerate out of control. Wind might also be an option, as this caps the maximum velocity.

Quote: "And lastly, is it possible to rotate emitters/effectors"

See above, but also...There are 2 bugs in the particles pack. The position resets itself to zero every update . So you must save the desired position in variables and reapply all the time. Secondly, rotation doesn't work at the moment. So for the rain, I had to make the emitter and wrapround effector big enough to cover the screen area as the camera rotated, and the effector became "diamond" shaped in relation to the camera.

These should be fixed in the next update, both confirmed in Bug Reports.

Glad you're having fun! I plan to update my app with a more featured version soon. I don't think it is worth marketing yet, so look out for a better, free version soon.

BatVink
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Jun 2005 05:33
Attached is the smp file for the rain demo. Should be interesting to see if it works across PCs!

Use the File | Load option
It will tell you you don't have the image, but it should still work with untextured particles. You can add your own texture.

Because it's just one emitter and effector, you will be able to export the code and run it yourself. I added the exported code to the terrain demo. The only adjustment was to reposition the emitter in front of the camera every loop.

BatVink

Attachments

Login to view attachments
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 30th Jun 2005 05:42 Edited at: 30th Jun 2005 06:49
Thanks for the help man

Got another Q for you. I may just be missing something, but is there anyway to resize effector boxes (or collision for that matter)? Everytime I make a box emitter and apply a effector, the effector seems to be half the size of the emitter, and I cant see how to change it.

*edit another question. Even when using a force effector, particles still start with a random velocity. Is there anyway to set the starting vector for all particles to 0,0,0 so they dont move on their own when they spawn?

All you need is zeal
Zealous
19
Years of Service
User Offline
Joined: 13th Sep 2004
Location: Colorado Springs
Posted: 30th Jun 2005 07:14
Hmm well this is very discouraging...

You cant notice it in your demo because the sky is grey, but there is a huge problem if you look up. Because all particles are billboarded, when looking at a raindrop thats falling ontop of you, the drop still maintains its long rectangular shape. This looks very, very bad.

I dont suppose there is any option to tell the system to only bilboard along the y axis is there?

sigh...

All you need is zeal
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Jun 2005 08:19
Quote: "I dont suppose there is any option to tell the system to only bilboard along the y axis is there?
"


Funny you should mention that, I asked the same question to Mike...
http://forum.thegamecreators.com/?m=forum_view&t=55723&b=18

Quote: " is there anyway to resize effector boxes "

The only one that needs this is the wrapround effector. All the others are just maths. Some need a position, such as Point.
The wrapround has size sliders, they only appear when you make it a wrapround.

Sphere, box and square colliders also have the necessary size sliders. A Plain collider doesn't need size.

BatVink

Login to post a reply

Server time is: 2024-05-02 09:51:06
Your offset time is: 2024-05-02 09:51:06