Xycaleth Posted January 30, 2017 Author Posted January 30, 2017 I've diverged from the ioq3 code base slightly so not all their changes are applicable. The PBR cvar could be ported but it's mainly a simplification of what was already available. Instead of having multiple cvars to enable pbr, they've been consolidated into one. minilogoguy18 and Smoo like this
Tempust85 Posted January 30, 2017 Posted January 30, 2017 Yeah I noticed, which is why I can't bring in any updates with my limited knowledge.
Xycaleth Posted February 26, 2017 Author Posted February 26, 2017 So... I had the misfortune and fortune of having a full weekend where I could just work on rend2 the whole time. It's unfortunate because this only came about because I'm ill. Fortunate because I've been able to get somewhere with adding weather Here's what I have so far: All I'm missing now is to stop it raining indoors and underneath things, and to make it a bit more customisable so that it can do other weather effects. I also need to actually spawn rain around the camera, instead of covering the entire map. When I get around to doing any of that, who knows So, the fun thing about this rain, is that there are around 250k rain drops, with very little performance impact. It even runs well on my MacBook Air which isn't the most powerful thing in the world Sentra, Ramikad, Boothand and 11 others like this
Archangel35757 Posted February 26, 2017 Posted February 26, 2017 @@Xycaleth - great work! ...but it was difficult for me to tell from the video-- does it include a droplet impact/splash EFX?
minilogoguy18 Posted February 27, 2017 Posted February 27, 2017 I didn't see the splash effects, would be cool to have droplets on the screen when in first person also. Archangel35757 and Futuza like this
Exmirai Posted February 27, 2017 Posted February 27, 2017 Could you push changes to github?I would be happy look into it
Xycaleth Posted February 27, 2017 Author Posted February 27, 2017 No splashes atm. That could potentially be an improvement though. I'll upload the code sometime today minilogoguy18, SomaZ and Tempust85 like this
Xycaleth Posted February 27, 2017 Author Posted February 27, 2017 Code is here: https://github.com/xycaleth/OpenJK/tree/rend2-dev/weather There's some hard-coded stuff there at the moment, so it only really works properly for mp/ffa5. If anyone wants to improve on it, first thing to do would probably be to stop it raining inside, and also to make the rain follow the camera. Stoiss, minilogoguy18, SomaZ and 1 other like this
Futuza Posted February 27, 2017 Posted February 27, 2017 I can't tell, but adding a shader/thing to the ground like this would be neat (probably what minilogoguy18 meant). Also this, as a reference (splashes on the monitor when the view is directed at the sky):
Archangel35757 Posted February 27, 2017 Posted February 27, 2017 I can't tell, but adding a shader/thing to the ground like this would be neat (probably what minilogoguy18 meant). Also this, as a reference (splashes on the monitor when the view is directed at the sky):https://www.youtube.com/watch?v=-BEFdvniAtIthat would be cool too. But I was referring to an EFX or something to make the droplet impact effect.
Tempust85 Posted February 27, 2017 Posted February 27, 2017 You can do that in the effectsEd, where you can call another effect upon effect "death", but no idea how to do that in code. Archangel35757 likes this
UniqueOne Posted February 28, 2017 Posted February 28, 2017 that would be cool too. But I was referring to an EFX or something to make the droplet impact effect. Warzone weather system uses efx files. It's not a glsl system though, it creates the weather in cgame, but its very customizable. I decided that trying to do it with glsl just wasnt worth the effort of working out indoor/outdoor, it was simple in cgame. It could do splashes easilly (actually it originally did), but i disabled the splashes because they require traces for the ground surface for each particle. GLSL could do it faster, but im not sure how xycaleth is going to handle the indoor/outdoor and collision checking that late in the frame. z3filus likes this
Xycaleth Posted February 28, 2017 Author Posted February 28, 2017 but im not sure how xycaleth is going to handle the indoor/outdoor and collision checking that late in the frame.I was planning to use the same principle as a shadow map. At the start of the map I'll render a birds eye view of the entire map depth into a texture (or multiple). Then each rain drop can check against this depth map to see if it should be drawn or not. Can also use this to randomly place rain drop effects. z3filus, Tempust85, Archangel35757 and 1 other like this
mrwonko Posted February 28, 2017 Posted February 28, 2017 I was planning to use the same principle as a shadow map. At the start of the map I'll render a birds eye view of the entire map depth into a texture (or multiple).I would've also used a "shadow map", though it could be rendered in realtime to allow dynamic objects to stop rain and to account for changing wind. Smoo and Archangel35757 like this
Smoo Posted March 2, 2017 Posted March 2, 2017 So... I had the misfortune and fortune of having a full weekend where I could just work on rend2 the whole time. It's unfortunate because this only came about because I'm ill. Fortunate because I've been able to get somewhere with adding weather Here's what I have so far: All I'm missing now is to stop it raining indoors and underneath things, and to make it a bit more customisable so that it can do other weather effects. I also need to actually spawn rain around the camera, instead of covering the entire map. When I get around to doing any of that, who knows So, the fun thing about this rain, is that there are around 250k rain drops, with very little performance impact. It even runs well on my MacBook Air which isn't the most powerful thing in the world That is so cool AngelModder likes this
z3filus Posted March 5, 2017 Posted March 5, 2017 I'm really liking the progress here, just saying. Rend2 is amazing.
UniqueOne Posted March 5, 2017 Posted March 5, 2017 I was planning to use the same principle as a shadow map. At the start of the map I'll render a birds eye view of the entire map depth into a texture (or multiple). Then each rain drop can check against this depth map to see if it should be drawn or not. Can also use this to randomly place rain drop effects. I foresee issues with using depth maps, you might be better off using a modified version of this code i made to generate heightmaps for wz. https://github.com/Stoiss/Rend2/blob/rend2/codemp/rd-warzone/tr_mapping.cpp#L747 Then you can use material types to work out stuff like water hits, etc, and it makes it a bit easier to skip translucent objects and stuff. You simply have more info to make use of via traces. That would give you a map of surface positions for each map point using a single image (the other 3 colors in the texture could be used for material and 2 other useful position infos). A heightmap can be useful for other stuff too. You are also however going to need a positionmap for the screen, but thats a good thing, its a start to moving rend2 to deferred to get that FPS up on detailed maps.
Xycaleth Posted March 5, 2017 Author Posted March 5, 2017 You can derive surface positions from the depth map. Water drops aren't going to be (and don't need to be) pixel perfect. You can randomly place them and they will look completely natural.
UniqueOne Posted March 5, 2017 Posted March 5, 2017 You can derive surface positions from the depth map. Water drops aren't going to be (and don't need to be) pixel perfect. You can randomly place them and they will look completely natural. I guess, as long as you use very small splashes or make them fully procedural and 3D. You don't want a 2D splash hitting the top of a signpost and creating a big flat splash, it would look unnatural. One advantage of traces is you can skip past small objects easily. Anyway I just thought I would point out that I already made a system for mapping surfaces of the map to images for whatever needs (which I currently am not using for anything myself). How is the FPS of the rain when you add alpha channel textures for them? Also, I wonder if (instead of static shaders or glsl procedural effects) the raindrops and splashes would be best done by pre-recording efx system scripts at map start (into animated image maps), which may not look as good, but would probably be good for JKA modders and make the whole system very easy to customize. I guess another option is to allow loading custom glsl files for the system, which is a better option, but requires modders to learn new stuff. The only other option is preset weather systems, which is pretty limiting.
Xycaleth Posted March 5, 2017 Author Posted March 5, 2017 How is the FPS of the rain when you add alpha channel textures for them?All the rain drops in that video have an alpha of 0.4 so they're already being alpha blended. There's almost no perceivable fps drop
Tempust85 Posted March 5, 2017 Posted March 5, 2017 Would FPS take a hit if you used an .EFX file for the rain drops? Because you can set another .EFX to play from within the current .EFX file when the effect is "killed". Would be useful for making splashes, and you can also distance cull within the .EFX file as well.
Tempust85 Posted March 5, 2017 Posted March 5, 2017 I'm really liking the progress here, just saying. Rend2 is amazing. Wait 'til you get a load of rend2 in DF2 Mod. Smoo and minilogoguy18 like this
ensiform Posted March 11, 2017 Posted March 11, 2017 Would FPS take a hit if you used an .EFX file for the rain drops? Because you can set another .EFX to play from within the current .EFX file when the effect is "killed". Would be useful for making splashes, and you can also distance cull within the .EFX file as well. Big time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now