Jump to content


Photo

3D Rain Effect


  • Please log in to reply
14 replies to this topic

#1 EmpalamadoGames

EmpalamadoGames

    GMC Member

  • New Member
  • 38 posts

Posted 06 September 2010 - 07:24 PM

A very simple example of 3D rain effect.

Posted Image

80 Kb
DOWNLOAD
  • 2

#2 weckar

weckar

    Helping Hand

  • New Member
  • 1946 posts

Posted 13 September 2010 - 03:22 PM

Every drop of rain as a separate object can't really be efficient?
  • 0

#3 MasterMind007

MasterMind007

    MasterMind Prod.

  • GMC Member
  • 543 posts

Posted 13 September 2010 - 03:54 PM

@weckar
But it is a great effect at high FPS, so it is efficient.

@EmpalmadoGames
A great example. Congratz.
  • 0

#4 EanFox

EanFox

    GMC Member

  • GMC Member
  • 58 posts

Posted 13 September 2010 - 07:26 PM

@weckar
But it is a great effect at high FPS, so it is efficient.

Wrong, if every drop uses a seperate object, it's not efficient at all, it's an extreme resource hog.
Imagine this in a game with like... 200 more objects, will it be fast? No.

But don't get me wrong, this is actually pretty good as an effect, it's just that it's not recommended to be used in a heavy 3D Game.

Edited by EanFox, 13 September 2010 - 07:28 PM.

  • 0

#5 IQbrew

IQbrew

    Pro-Grammar

  • Banned Users
  • 2607 posts
  • Version:Unknown

Posted 13 September 2010 - 07:33 PM

I only get 94 FPS, and my computer is extremely fast.
The effect doesn't even look that good, and having over a thousand objects for rain is a terrible idea.

But it is a great effect at high FPS, so it is efficient.


40-90 FPS is not a "High FPS", Just try adding a room larger than 640x480 or any content and watch
your FPS spike down to 10s and 20s.

#6 demon13

demon13

    GMC Member

  • New Member
  • 444 posts

Posted 13 September 2010 - 09:52 PM

If you use 1 "emissor" you still get a descent, light rain effect. With my good computer, I put the room speed to 999 and got around 800fps.
  • 0

#7 Phantom107

Phantom107

    Graphics Enthusiast

  • GMC Member
  • 2616 posts
  • Version:GM:Studio

Posted 14 September 2010 - 07:34 PM

The efficiency of the example is extremely low.
I'm only getting 119 fps and I'm on a i7 920 + GTX 275 + 6 GB DDR3 ... what the hell?

  • If anything, you should loop through the rain drops using an array. Using individual objects is really slow.
  • Don't use d3d_draw commands ...ever! They're pathetically slow!
  • It's probably a better idea to have a bunch of pre-computed rain models that drop continuously, instead of tons and tons of single drops falling.
  • Make the raindrops splash a bit when they hit the floor.
  • Make raindrops on the camera.

  • 0

#8 Fish9

Fish9

    GMC Member

  • GMC Member
  • 16 posts

Posted 02 February 2011 - 11:51 PM

When I turn off the rain, I get 3400 FPS. and when I turn it on, I get up to 95. It seems the rain is 2D rather than 3D. Given I have a Radeon 5800 series, which is designed for DX10 and NOT for 2D graphics, I found this rather irritating. I would probably get a better frame rate if walls were being drawn in 3D. not much has been done lately to improve 2D graphics, while 3D has been constantly for the better part of 20 years. Although my computer can play Crysis at 70fps at the highest graphics settings with DX10, it drops below 60 fps when there are more than ~400 solid vectors being drawn. there are very few GPU's that are designed for vector graphics, but the ones that are, are extremely good at it.

look at the scores for 2d graphics of the top ten computers ever benchmarked with this software:
PC benchmarking

Edited by Fish9, 02 February 2011 - 11:52 PM.

  • 0

#9 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

  • GMC Member
  • 809 posts
  • Version:GM8.1

Posted 03 February 2011 - 06:20 PM

When I turn off the rain, I get 3400 FPS. and when I turn it on, I get up to 95. It seems the rain is 2D rather than 3D. Given I have a Radeon 5800 series, which is designed for DX10 and NOT for 2D graphics, I found this rather irritating. I would probably get a better frame rate if walls were being drawn in 3D. not much has been done lately to improve 2D graphics, while 3D has been constantly for the better part of 20 years. Although my computer can play Crysis at 70fps at the highest graphics settings with DX10, it drops below 60 fps when there are more than ~400 solid vectors being drawn. there are very few GPU's that are designed for vector graphics, but the ones that are, are extremely good at it.

look at the scores for 2d graphics of the top ten computers ever benchmarked with this software:
PC benchmarking

Hahahahahahah :lol:
You are funny!
  • 0

#10 toao

toao

    GMC Member

  • New Member
  • 157 posts

Posted 25 February 2011 - 07:31 AM

How about sorting all the rain data into an array?
  • 0

#11 john_smith

john_smith

    GMC Member

  • GMC Member
  • 184 posts

Posted 17 March 2011 - 06:56 PM

looks cool but to really make it a showstopper:

use a gradient with additive blending.

real rain isn't blue guys, sorry :(

Edited by john_smith, 17 March 2011 - 06:56 PM.

  • 0

#12 Captain Mangoes

Captain Mangoes

    GMC Member

  • GMC Member
  • 117 posts

Posted 18 August 2011 - 10:31 PM

There are ways to speed it up. I ran it and got 1467 drops and a speed of 115fps, but in my game the player won't be able to look up so the drops won't need to fall from a height of 1024 and since they fall with a constant velocity I can easily change it the height to 128, which gives 107 drops, and brings the fps up to about 500. Now in order to keep the effect looking consistent regardless of room size, I'll just change the emitter so that it generates drops randomly within a fixed distance from the camera.
It's just an example, there's always room for tweaking.
  • 0

#13 RoyalCardMan

RoyalCardMan

    GMC Member

  • GMC Member
  • 244 posts

Posted 24 August 2011 - 02:57 PM

Well, on my crappy computer, it ran fine, so I don't get why people are saying it is inefficient.
  • 0

#14 storkEXEC

storkEXEC

    GMC Member

  • New Member
  • 365 posts
  • Version:GM8

Posted 24 August 2011 - 03:01 PM

Well, on my crappy computer, it ran fine, so I don't get why people are saying it is inefficient.


Alone it's fine but when you put it inside of a game its horrid. Maybe a better way would be to have single triangles rendered as primitives using an array. Even better, a few big model objects holding dozens of primitives that loops continuously. No d3d_walls, just a single primitive, 2x speed gain.
  • 0

#15 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

  • GMC Member
  • 809 posts
  • Version:GM8.1

Posted 25 August 2011 - 09:20 PM

Well, on my crappy computer, it ran fine, so I don't get why people are saying it is inefficient.

:no: You are joking.. right?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users