Posted: 22nd Jun 2007 2:30
What is the best way to make realistic looking snow with snow flakes and mist?, any help would be appreciated.

Thanks
Posted: 22nd Jun 2007 2:42
For the snow flakes - Particles. You may want to position them above the player (repositioning the emmitter every loop) or somewhere in the center of your level. For mist I imagine fog would work fine.
Posted: 22nd Jun 2007 3:02
For the snow flakes - Particles


Yeah, but that would be slow. I'd rather just use a plain and position it in front of the camera. Then scroll the texture to make snow.
Posted: 22nd Jun 2007 3:23
The mist: Particles

The Snow Flakes: Sprites/2D Image Plains
Posted: 22nd Jun 2007 5:39
Realistic... wont be done very well with sprites.

Nowadays the snow is particles (only emitted around the user, no point in emitting them way off in the distance), with possibly a few larger plains textured with a bunch of snow flakes positioned off in the distance, with the texture scrolling.

The mist would be done with a shader, but using a smoke effect via plains and alpha fading would work *alright*.

Get some motion blur on the snow flakes, and a depth-of-view shader going, and it'll all look purty. Especially with a slight bloom going on (slight... dont go crazy).

To xSnip3rX


You may want to rethink your game engine name. Theres already a hugely popular multiplayer plugin for DB called Tempest. You naming it the same thing will just cause confusion.

"How do I make an online game?"

"Use tempest"

"But thats a game engine..."
Posted: 22nd Jun 2007 5:45
lol, i know, and i'm sorry for the confusion but it was either that or Exodus...then i looked at the forums and saw the game called "Final Exodus", so i think i'll just sick with Tempest, Thanks though!
Posted: 22nd Jun 2007 6:24
Meh, I think Tempest the multiplayer plugin will be more widely known than your game engine, but that's bad for you. Put a but more thought into it and you'll come up with something...




As for the snow, I would build my own particle engine... But that's just me; I'm sure the default DBP engine can handle it just fine, it's just that I don't trust it. So yea having some blury snowflake images floating down would be great, just keep it around the camera only. And I don't know if DBP particles can independently wave left and right to make it look more like snow, so that's another reason why I'd build my own engine.

The fog I wouldn't even bother trying with the DBP particle engine. I'd have my own giant particles with cloudy white images so that they could drift through 3D space very very slowly, you could control them with the wind, and you could take the ones that are out of range and wrap them around. I would also disable zdepth on each particle. I'd also have the DBP fog on. I would have the images on each particle be animated to look like a fluffy cloud of white dust that was animated... something or other like that, so it looks more realistic, like a whole bunch of animated smoke. It's not just the motion of the particles that makes it look like it's moving around, it's the whole thing.

By the way, is there any way to adjust how abruptly the fog in DBP goes to solid? Is there some kind of attenuation I can control?
Posted: 22nd Jun 2007 9:28
Meh, I think Tempest the multiplayer plugin will be more widely known than your game engine, but that's bad for you. Put a but more thought into it and you'll come up with something...
well that's why we all have the freedom of speech, personally i wouldn't insult someone elses creation until you have something better, and you don't, so i'm not even going to take your oppinion seriously.

[Sorry if i lead this thread off topic mods]
Posted: 22nd Jun 2007 18:11
Behave. Out of those two posts the only one coming off as insulting is you. If you're too stuck up to spend time making something original that's your choice, and if you don't like what I said it's your right to disregard it; bear in mind I didn't realize you were so touchy and sensitive about it. I won't be making that mistake again...
Posted: 22nd Jun 2007 18:15
I remember that someone did produce a Volumetric fog shader somewhere in the forum...
It was done with SHADERS but I think it can fit your need for mist ...
Posted: 22nd Jun 2007 18:35
+ Code Snippet
FOG ON : FOG DISTANCE dist : FOG COLOR RGB(255,255,255)

Done.
Posted: 23rd Jun 2007 1:07
Hi, thanks for all the help.
Posted: 24th Jun 2007 2:56
There is a rain example here somewhere just change the imag to a snow flake

http://forum.thegamecreators.com/?m=forum_view&t=42466&b=6
Posted: 24th Jun 2007 3:24
Here ya go i even modded it a bit to make it a bit more wintery, just change those boxes for snow flakes on a plain



+ Code Snippet
Rem Project: 3D Rain
Rem Created: 09/11/2004 19:28:15

Rem ***** Main Source File *****


sync on
sync rate 60
autocam off
color backdrop rgb(200,200,255)
randomize timer()
rem Make a dummy object to be moved with the camera as camera angles give funny results.
make object box 1,.1,.1,.1
hide object 1
MatrixNumber=1
 make matrix MatrixNumber,1000,1000,25,25
RANDOMIZE MATRIX MatrixNumber, 100
SET MATRIX WIREFRAME OFF MatrixNumber

POSITION MATRIX MatrixNumber, camera position X()-500, camera position Y()-200, camera position Z()
GHOST MATRIX ON MatrixNumber



set ambient light 50
FOG ON
FOG DISTANCE 1000 : FOG COLOR RGB(255,255,255)
fog on
sw=screen width()
while spacekey()=0

speed#=0
if inkey$()="w" then speed#=.4
if inkey$()="s" then speed#=-.4

move camera speed#
move object 1,speed#

gosub draw_rain

text 0,0,"3D Rain - Written by Jason Clogg"
text 0,20,"fps= "+str$(screen fps())
text 0,40,"'w' move forward - 's' move backwards"
sync

endwhile

end

draw_rain:

rem base sprite number
base=600
rem How many raindrops to display
raindrops=100

`Calculate a point in front of the camera to start drawing the starfield

cx#=camera position x()
cy#=camera position y()
cz#=camera position z()

if object exist(base)=0
   make object box base,.1,.1,.1
   set object light base,1
   ghost object on base
   color object base,rgb(255,255,255)
   fade object base,50
   set object collision off base
   for i=base+1 to base+raindrops
      clone object i,base
     rem rain should not be affected by light or included in collisions
      set object light i,1
      ghost object on i
      color object i,rgb(255,255,255)
      fade object i,50
      set object collision off i
`      position object i,rnd(spread*2)-spread,rnd(spread*2)-spread,camera position z()+rnd(dist)
   next i
endif

for i=base to base+raindrops
`reposition rain if they are out of camera shot
   if object in screen(i)=0
      screenx#=rnd(sw):screeny#=0
      dist#=rnd(200)+10
      pick screen screenx#,screeny#,dist#
      sx#=get pick vector x()
      sy#=get pick vector y()
      sz#=get pick vector z()
      position object i,cx#+sx#,cy#+sy#,cz#+sz#
   endif
`Calculate distance of star from camera and scale star accordingly
   scale object i,1000,10,10*rnd(300)
   set object to object orientation i,1
   pitch object down i,90
   move object i,1+dist#/200
   next i
return

function distance(x1#,y1#,z1#,obj)

x2#=object position x(obj)
y2#=object position y(obj)
z2#=object position z(obj)

dist#=sqrt((x1#-x2#)*(x1#-x2#)+(y1#-y2#)*(y1#-y2#)+(z1#-z2#)*(z1#-z2#))

endfunction dist#

Posted: 24th Jun 2007 20:03
dont forget to add bit of random sideways movement to the snow plains, and also slow it down a bit too (would try coding it but im lazy )
Posted: 24th Jun 2007 21:08
added more snow, slower snow, and movement in all directions (use your arrow keys)

+ Code Snippet
REM Project: snow_fx
REM Created: 24/06/2007 09:40:17
REM
REM ***** Main Source File *****
REM
Rem Project: 3D Rain
Rem Created: 09/11/2004 19:28:15

Rem ***** Main Source File *****


sync on
sync rate 60
autocam off
color backdrop rgb(200,200,255)
randomize timer()
rem Make a dummy object to be moved with the camera as camera angles give funny results.
make object box 1,.1,.1,.1
hide object 1
MatrixNumber=1
 make matrix MatrixNumber,2000,2000,25,25
RANDOMIZE MATRIX MatrixNumber, 100
SET MATRIX WIREFRAME OFF MatrixNumber

POSITION MATRIX MatrixNumber, camera position X()-1000, camera position Y()-200, camera position Z()-1000
GHOST MATRIX ON MatrixNumber



set ambient light 50
FOG ON
FOG DISTANCE 1000 : FOG COLOR RGB(255,255,255)
fog on
sw=screen width()
while spacekey()=0

speed#=0
speed#=0.8
control camera using arrowkeys 0,speed#,(speed#/4.0)
rem move camera speed#
move object 1,speed#

gosub draw_rain

text 0,0,"3D Rain - Written by Jason Clogg"
text 0,20,"fps= "+str$(screen fps())
text 0,40,"Snow version update by GatorHex (use arrowkeys to move)"
sync

endwhile

end

draw_rain:

rem base sprite number
base=600
rem How many raindrops to display
raindrops=500

`Calculate a point in front of the camera to start drawing the starfield

cx#=camera position x()
cy#=camera position y()
cz#=camera position z()

if object exist(base)=0
   make object box base,.1,.1,.1

   set object light base,0
   ghost object on base
   color object base,rgb(255,255,255)
   fade object base,50
   set object collision off base
   rem yrotate object base, 270
   for i=base+1 to base+raindrops
      clone object i,base

     rem rain should not be affected by light or included in collisions
      set object light i,0
      ghost object on i
      color object i,rgb(255,255,255)
      fade object i,50
      set object collision off i
`      position object i,rnd(spread*2)-spread,rnd(spread*2)-spread,camera position z()+rnd(dist)
   next i
endif

for i=base to base+raindrops
`reposition rain if they are out of camera shot
   if object in screen(i)=0
      screenx#=rnd(sw):screeny#=0


      dist#=rnd(200)+10
      pick screen screenx#,screeny#,dist#
      sx#=get pick vector x()
      sy#=get pick vector y()
      sz#=get pick vector z()
      position object i,cx#+sx#,cy#+sy#,cz#+sz#
   endif

`Calculate distance of star from camera and scale star accordingly
   scale object i,1000,10,10*rnd(300)
   rem set object to object orientation i,1
set object to camera orientation i
   pitch object down i,90
   move object i,0.7+dist#/1000

   next i
return

function distance(x1#,y1#,z1#,obj)

x2#=object position x(obj)
y2#=object position y(obj)
z2#=object position z(obj)

dist#=sqrt((x1#-x2#)*(x1#-x2#)+(y1#-y2#)*(y1#-y2#)+(z1#-z2#)*(z1#-z2#))

endfunction dist#

Posted: 24th Jun 2007 21:20
Their is a command called 'Make Snow Particles' That looks good to me.
Posted: 24th Jun 2007 21:28
Have a go at using 'Make Snow Particles' and you'll see why no one use's it.
Posted: 24th Jun 2007 21:59
Oh. Ok, I see now...My mistake
Posted: 24th Jun 2007 22:12
Hope I didn't offend you, it's just that there no control with that command, so it's best to make your own system.