Originally posted by Cobalt
View Post
Announcement
Collapse
No announcement yet.
TUT: Creating Rain + Snow + Fog in DarkPlaces
Collapse
X
-
Hello Cobalt,
Yes, just like R00k said recently:
The Quake community devides into 2 camps:
- MP
- SP
For all single player maps, weather ent files are available.
The multiplayer maps have not been done yet.
It seems there is no demand as:
- DP is not a popular MP client
- There are more important things for a multiplayer match than weather effects
Maybe someday someone will stomp his foot on the ground and make it happen.
Best wishes,
Seven
Comment
-
i was wondering if i could use brush locations and make them in to ent locations
Code:// brush 0 { ( -384 192 320 ) ( -384 -128 320 ) ( -640 192 320 ) NULL 0 0 0 1 1 ( -384 320 64 ) ( -640 320 64 ) ( -384 320 -64 ) NULL 0 0 0 1 1 ( -128 192 64 ) ( -128 192 -64 ) ( -128 -128 64 ) NULL 0 0 0 1 1 ( -640 -128 -64 ) ( -384 -128 -64 ) ( -640 192 -64 ) NULL 0 0 0 1 1 ( -640 -192 -64 ) ( -640 -192 64 ) ( -384 -192 -64 ) NULL 0 0 0 1 1 ( -640 -128 -64 ) ( -640 192 -64 ) ( -640 -128 64 ) NULL 0 0 0 1 1 } }
this brush location is the first room in the start map of "1000 Brush/Winter" map pack.
im having a lot of fun playing this map set on the wii and on pc with the smc.
Comment
-
@JD - no.
I say no because, the math behind figuring out what that brush info actually means is tremendous. You should just use the way that seven tutorialized at the beginning of this thread.
But if you are really really dead set on it. This will get you started...lol
Code:d = -(( p1.pt.y*(p2.pt.z-p3.pt.z) - p2.pt.y*(p1.pt.z-p3.pt.z) + p3.pt.y*(p1.pt.z-p2.pt.z) ) + ( p1.pt.z*(p2.pt.x-p3.pt.x) - p2.pt.z*(p1.pt.x-p3.pt.x) + p3.pt.z*(p1.pt.x-p2.pt.x) ) + ( p1.pt.x*(p2.pt.y-p3.pt.y) - p2.pt.x*(p1.pt.y-p3.pt.y) + p3.pt.x*(p1.pt.y-p2.pt.y) )); a = -((-(p1.pt.x*(p2.pt.y*p3.pt.z-p3.pt.y-p2.pt.z) - p2.pt.x*(p1.pt.y*p3.pt.z-p3.pt.y*p1.pt.z) + p3.pt.x*(p1.pt.y*p2.pt.z-p2.pt.y*p1.pt.z)))+ ( p1.pt.z*(p2.pt.x-p3.pt.x) - p2.pt.z*(p1.pt.x-p3.pt.x) + p3.pt.z*(p1.pt.x-p2.pt.x) ) + ( p1.pt.x*(p2.pt.y-p3.pt.y) - p2.pt.x*(p1.pt.y-p3.pt.y) + p3.pt.x*(p1.pt.y-p2.pt.y) )); b = -((-(p1.pt.x*(p2.pt.y*p3.pt.z-p3.pt.y-p2.pt.z) - p2.pt.x*(p1.pt.y*p3.pt.z-p3.pt.y*p1.pt.z) + p3.pt.x*(p1.pt.y*p2.pt.z-p2.pt.y*p1.pt.z)))+ ( p1.pt.y*(p2.pt.z-p3.pt.z) - p2.pt.y*(p1.pt.z-p3.pt.z) + p3.pt.y*(p1.pt.z-p2.pt.z) ) + ( p1.pt.x*(p2.pt.y-p3.pt.y) - p2.pt.x*(p1.pt.y-p3.pt.y) + p3.pt.x*(p1.pt.y-p2.pt.y) )); c = -((-(p1.pt.x*(p2.pt.y*p3.pt.z-p3.pt.y-p2.pt.z) - p2.pt.x*(p1.pt.y*p3.pt.z-p3.pt.y*p1.pt.z) + p3.pt.x*(p1.pt.y*p2.pt.z-p2.pt.y*p1.pt.z)))+ ( p1.pt.y*(p2.pt.z-p3.pt.z) - p2.pt.y*(p1.pt.z-p3.pt.z) + p3.pt.y*(p1.pt.z-p2.pt.z) ) + ( p1.pt.z*(p2.pt.x-p3.pt.x) - p2.pt.z*(p1.pt.x-p3.pt.x) + p3.pt.z*(p1.pt.x-p2.pt.x) ));
Comment
-
I have seen maps from Q3 derived games like Enemy Terrotory and RTCW, "converted" into snow maps, where the maps surfaces in certain areas are just now textured with snow for example. Thats about the extent of my experience brushing BSP's. At first glance they look like (3) sets of vectors that define a quadrent in the world / map area, and the rest of the floats and nulls could represent whats going to take place there, but I am not sure. If those coordinates are real locations inside the world, sure you can spawn ents inside those coordinates nearly to no end, but if you are looking to make it rain or snow there the engine needs to know those coordinates. Maybe another BSP format like BSP2 or whatever, you could have extra data fields for them that correspond to rain or snow, but the engine would have to be able to detect that in the BSP I think.
Comment
-
'-640 -192 -64' '-128 320 320'
as dp only supports axially-aligned weather regions, you can just determine the bounding box for the points given.
the actual maths is a bit more complex, but as *your* brush is axially aligned with the planes defining +z +y +x, -z -y -x, then just read off the mins+maxs without comparing each point.
you know a plane is axial if it contains one axis with the same value in all 3 points, just so you know.
lots of comparisons. woo.
Comment
-
I see where you got those numbers but that's still not very simple. Certainly not more simple than using sevens way.
I have another way though that I believe is comparable to sevens way. Obviously JD has the .map file, so why not just open it in radiant and use the grid coordinates? There is no guesswork, you don't need to fly around in quake to find values and you can select the brush/area you want to work with so you know you have exact numbers. I'm not on a computer with radiant but I believe you can even get the min/max values in one of the menu options (brush info or something, maybe even in the lower right when a brush is selected. Not sure cause I never use those features (assuming they even exist)).
Comment
-
Hello,
Cobalt started a discussion at inside3d regarding the issue of rain bleeds through roofs, which are in rainy open areas.
This issue has been mentioned in this thread several times as well and is indeed sometimes quite annyoing.
I investigated it a little deeper and also tried to read how rain particles are coded in cl_particles.c
These are my findings:
Rain (different to snow) is coded in 3 steps:
1.) Start spark typed particles (which are the actual rain drops) from rain-cube�s upper surface.
2.) Once it hits/collides with declared surface types, rain drop particle vanishes and starts point 3.)
3.) Is a little delayed and starts the rain-splash particle effect, which consists of a circle particle + splash spark particles
The rain-bleeding-through ceilings issue are 80% the splash spark particles that you see.
The splash spark particles lifetime is simply too long !
Normally, this is absolutely no issue, as rain usually falls on ground/earth, with nothing beneath it.
So its splash particles are beneath the maps surface (= in the void) and are not disturbing.
BUT in case, that rain falls on a buildings roof in an open area and you are inside that building, you will see the splash particles 'bleeding' through the ceiling because their lifetime is too long (see screenshot below).
The lifetime could/should be reduced to approx. 1/3 without affecting the visual of the beautiful splash effect, but it would drastically reduce the bleeding-through-ceiling issue.
Unfortunately the complete rain process is hardcoded in cl_particles.c and there is no effectnum which could be used to override this behavior via an external effectinfo.txt, like it is done in SMC for example.
LH uses CL_NewParticle (not CL_NewParticlesFromEffectinfo) for the rain-splash effect.
I will try to contact LH and ask if he could reduce the rain-splash sparks lifetime to 1/3 (or raise alpha reduction value). This is most probably a quick edit in cl_particles.c, but I do not have the knowledge nor a compiler to compile DP myself.
Snow never bleeds through ceilings, because it doesnt spawn a 'splash-effect' when colliding with solids (even when you raise its velocity from -100 to -700 (like rain has)).
Furthermore, these are the cvars to enable/disable rain + snow:
cl_particles_rain
cl_particles_snow
The SMC has an additional:
cl_particles_custom_effects
Best wishes,
Seven
Comment
-
Good work Seven. So its the splash spark type part of the code thats doing this. It sounds like options are there for surface types, Im guessing its probably a simple detection of solid vs non solid? Or does it actually look for surface textures? As it is now, the effect is fine when hitting a liquid, because the view from underneath the liquid does somewhat resemble what you might see when it hits h20. For slime and lava, effect probably ought to be different....treat as if its hitting the solid.Last edited by Cobalt; 02-27-2014, 01:32 PM.
Comment
-
Oh, BTW, I completed rain coordinates for DM2...also commented locations....if anyones interested.
The stairs over the button near the lava will bleed through pretty badly as the current DP system stands now, other than that, the rest of the areas look ok.
Some of my upper_z coordinates may be way too higher than needed, and the lower _z also, sometimes I was experimenting to see if they effected the particles behaviour at all. Im actually spawning a touch field for the rainboxes, which is why I did that.
Code:'1383 -1146 513', '1978 -903 522' '1473 -1409 0', '1889 -1344 402' // grated opening near megahealth '1212 -956 140', '1220 -900 300' // side window near lava '2140 -956 144', '2148 -900 300' // side window near lava '1730 -1756 208', '2236 -1728 276' // one side of grated opening near sliding bridge '1730 -1664 208', '2236 -1636 276' // other side of grated opening near sliding bridge '1636 -1756 208', '1727 -1636 276' // end of grated opening near sliding bridge '2346 -1403 238', '2622 -1282 277'7' // grated opening near rl '1284 -544 184', '1346 -483 1000' // small opening near rl and plat '1668 -728 184', '1724 -648 1000' // small opening nr lava over buttons '1426 -732 184', '1589 -462 1000' // over RL '1796 -757 24', '1976 -452 1000' // over quad '1904 -145 24', '2074 44 1000' // octogogonal opening '2371 -698 47', '2458 -609 500' // over red armor '2214 -470 0', '2452 -357 500' // opening nr red armor over water '2337 -218 5', '2489 -170 500' // opening over nailgun '2585 89 -72', '2650 213 500' // bottom of winding stairway near lava '2243 256 -72', '2494 318 500' // middle of winding stairway near lava '2112 98 24', '2178 228 500' // top of winding stairway near lava '2400 -60 88', '2546 0 500' // stairs near ng '2570 -500 100', '2622 -131 500' // long hall '2592 -796 100', '2620 -620 500' // slotted opening over long hall '2500 -972 100', '2620 -724 500' // slotted opening middle over long hall '2500 -1212 100', '2528 -976 500' // end of slotted opening '2412 -1652 172', '2548 -1544 275' // pent shaped opening near rl '2340 -1900 188', '2620 -1812 276' // square opening near rl '2756 -1912 288', '2785 -1360 404' // long slotted opening near button '2752 -2368 288', '2785 -1956 404' // long slotted opening near teleport pad '2148 -1892 188', '2204 -1820 276' // grated cross opening near stairs '2148 -2300 68', '2204 -2020 404' // rectangular opening over lava '2180 -2492 350', '2460 -2436 404' // rectangular opening nr teleport '2340 -2304 320', '2360 -2040 340' // one side of large rectangular opening over megahealth '2536 -2304 320', '2556 -2040 340' // side of large rectangular opening over megahealth '2240 -2036 320', '2556 -2020 340' // one end of large rectangular opening over megahealth '2340 -2324 320', '2556 -2305 340' // end of large rectangular opening over megahealth
Last edited by Cobalt; 02-27-2014, 02:09 PM.
Comment
-
Originally posted by Cobalt View PostIt sounds like options are there for surface types, Im guessing its probably a simple detection of solid vs non solid? Or does it actually look for surface textures? As it is now, the effect is fine when hitting a liquid, because the view from underneath the liquid does somewhat resemble what you might see when it hits h20.
This are the contents checks for rain (taken from cl_particles.c):
SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_LIQUIDSMASK
And yes, I also like the actual splash-effect, with long lifetime for liquids.
When looking from inside water to outside it looks really nice. But for solids, LH should reduce the lifetime a lot.
Originally posted by Cobalt View PostOh, BTW, I completed rain coordinates for DM2...also commented locations....if anyones interested.
Hopefully players will enjoy it on your server.
Originally posted by Cobalt View PostSome of my upper_z coordinates may be way too higher than needed, and the lower _z also, sometimes I was experimenting to see if they effected the particles behaviour at all. Im actually spawning a touch field for the rainboxes, which is why I did that.
Fantastic !!
I would only make it a bit larger.
Great work Cobalt.
Comment
Comment