[ON HOLD] Bumi: Real-Time Day/Night & Weather

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
User avatar
Nash
 
 
Posts: 17456
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

[ON HOLD] Bumi: Real-Time Day/Night & Weather

Post by Nash »

Image




"Bumi" means earth in my native tongue (malay).

Bumi is a real-time day/night cycle and weather system for GZDoom. It is made for RPGs and/or open world-ish projects.

Current features:

- Real-time day and night cycle with tinting across the entire map
- Gregorian calendar system with days, months and years
- Moon phases
- Adjustable timescale
- Sun lens flare
- Particle clouds in the sky
- Chance for overcasting, rain and thunderstorms - completely random and in real-time
- Rain drops that do not fall through ceilings
- Compatible with sector lighting - my engine does not overwrite your sector lighting work
- Minimal sector tagging required (and customizable range of tags - useful for maps with a lot of 3D floors)
- Sky lights (dynamic lights that follow the ambient colour; useful when placed indoors to simulate environmental lighting)
- Fog and haze
- Seasons
- Snowing during winter
- Seasonal texture swap (level textures that change appearance depending on season)
- Stars in the sky

KNOWN ISSUES
- Sun glare looks slightly incorrect with PixelRatios other than 1.0
- Sun glare position does not scale with ScreenSize at all
- Clouds are not flat (requires +FLATSPRITES)
- Mists during winter do not have +ROLLSPRITE
- Snow isn't A_Warped to the player - you can outrun the particles
- Snow and rain sprites will overlap in multiplayer (requires A_VisibilityFilter)
- Decorative actors do not switch to snowy variants during winter
- Sun glare and environment sounds do not work correctly in chasecam, coop spy, or when viewing through any non-player cameras
- Rain and snow will not spawn if sky ceiling height is below 256
- Sun glare appears at the wrong height if player's ViewHeight is too short
- During screen melts, you can briefly see the skybox is black
- Does not report any errors if the template skybox is not found in the level
- Returning to a previously visited level via map or changemap cheats might possibly be broken (for now)
- Base year is 2001; make it so that base year could be user-definable

ADDRESSED

Added simple environment sound mode as a server CVar:
- Environment sounds cannot sync seamlessly to your camera position in multiplayer due to player prediction
- Environment sounds will leak between players if you stand close enough to each other

Ideas for version 1.1 in future:

- Currently, weather system is linear. It goes from clear -> overcast -> rain. Thunderstorms and fog can be layered on top of these weather modes but it's kind of clunky. Future goal would be to completely overhaul the weather system so that current weather will be 1-dimensional and you can smoothly blend to and from different weather "modules" or "blocks" seamlessly and non-linearly. Idea inspired by FoxEngine devs who mentioned doing something like this
- Each weather module would have their own set of unique properties - blend colours, precipitation type, etc (PS day and night would be considered as modules as well).
- Overhaul the chance calculation because right now it's too erratic and has very biased favours (look into implementing custom random number generators).
- Externalize weather module defintions so that ACS doesn't need to be recompiled? Not sure how feasible this would be.
- Probably would eventually need an editor to generate the data needed (and if weather modules would be externalized, then DEFINITELY an editor would be needed)
- Get rid of the sun glare hack, this shit has no business being any of this hacky HudMessage nonsense... it should be a GZDoom full-screen post process shader.

Credits [incomplete for now; will update this constantly]

Randy Heit - ZDoom
Graf Zahl - GZDoom
Nash Muhandes - main developer, programmer
carlcyber -assistant programmer, technical advice and optimization
DavidPH - GDCC, technical advice

Special thanks:

Zeberpal - giving me permission to feature his map DCA2TechTest in the demonstrational video
Blzut3 - GetAspectRatio() (heavily modified)
Isle, LilWhiteMouse, Gez, TheZombieKiller, DavidN, FDARI, marrub - general programming help
Gavin "Interkarma" Clayton (Daggerfall Tools for Unity) - his season code in DFTFU gave me some ideas on how to implement my own
undead003, Shane Strife, loismustdie555 - playtesting
Last edited by Nash on Sun Apr 02, 2017 7:55 pm, edited 41 times in total.
User avatar
Nash
 
 
Posts: 17456
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: [WIP] Real-time day/night and weather engine

Post by Nash »

NEWS

18th January 2016:

Image

- Fog and haze Done!
- Seasons Done!
- Snowing during winter Done!
- Seasonal texture swap (level textures that change appearance depending on season, in real-time) Done!
- Stars in the sky Done!

ALL DONE!

Just need to prepare the docs and the devkit, and fix a multiplayer sound bug only discovered 10 minutes ago, and... this would be good to go!

Kept you waiting, huh?

17th January 2016:



Guess what happened? I couldn't sleep and spontaneously implemented this dynamic sound dampening system! The rain and thunder sounds will get dynamically low passed depending on how far you are from the exterior. This isn't scripted, it totally works in real-time and with any kind of map!

What's hilarious is that I wasn't even planning on working on this particular feature so soon! It was an idea I dropped in a single-line comment... reminded myself that eventually I would figure out how to do this but I never even thought of this or even tried to think how it would be done until I actually started to do it today. Sleep deprivation may have played a huge factor in implementing this.

So, bonus feature for y'all that I didn't even expect to make, yay!

16th January 2016:
Upcoming features before I release version 0.9 BETA:

- Fog and haze Done!
- Seasons Done!
- Snowing during winter
- Seasonal texture swap (level textures that change appearance depending on season, in real-time) Done!
- Stars in the sky Done!
Only 1 item remains in the task list. This weather system has come a long way, code-wise, since I made this thread in 2014. Code has been drastically changed and improved upon. I've switched compilers from acc.exe to gdcc-acc.exe and coding this has been so much more fun and easier, and I can write stuff much cleaner because I no longer have to hack around with acc.exe's limitations. The precipitation system also does not lag as much as it used to now, meaning rainy weathers won't butcher your frame rate too much. I will use the same system to spawn and render snow flakes.

I've also made tremendous improvements on how things are setup so that you, as a mapper, do not need to be too careful of too many restrictions on how the system is setup. It used to be that you had to setup special linedef scripts, assign some tags that you had to memorize, and other nonsense, to make the weather system work correctly in your maps. Almost all of that stuff cruft is gone now. My eventual goal would be to allow you to just make your map, copy and paste the template skybox anywhere into your level and it will just work™.

Anyway, the final task (falling snow), and documentation, should be done in a few days.

I want to talk about my plans to release the open source as beta. It will stay in beta because there are currently 2 engine features that prevent me from declaring this as complete:

1) GZDoom flat sprites

In the video demo from 2014, the clouds seen in it are models (flat planes) rendered with the "Shaded" render style. This lets me draw clouds that can have smooth transparency, but the catch here is - it only supports 1 colour. So the cloud textures are really just a huge blob of white with varying transparency. I cannot colourize the clouds because the darker a colour is, the more transparent it will get (so I can't do black clouds, for example). This has nothing to do with alpha (more on that in the next paragraph).

With flat sprites, I could render the clouds as a normal sprite, with rich colours and full alpha, and then make them flat. It looks so much better than the previous "shaded model" technique. I will put up a comparison image sometime soon so that it's easier to see the differences.

tl/dr: clouds will look uglier in the beta release

2) Visibility filtering

Rain (and eventually snow) is constantly spawned around the player's position, instead of all over the entire map, and is attached to the player so that it follows the camera. This technique is more practical than simply spamming the entire level with precipitation sprites because it would introduce massive lag and STILL wouldn't look good anyway especially if the player moves fast. The downside to this technique is that, every player can see this mass of precipitation move around other players. If there were 2 players in-game, I could see player 2's rain sprites, and they could see mine. To combat this, visibility filtering is needed so that I can limit the visibility of the sprites to ONLY the player the sprites "belong" to.

tl/dr: rain and snow will look like crap in multiplayer in the beta release

And in case it wasn't obvious... I am currently developing these with custom home-made GZDoom builds. The issues I talked about can easily be disabled for official GZDoom builds and swiftly re-enabled when GZDoom officially implements flat sprites and visibility filtering.

That's all I have for now. I'm excited to let this bad boy out and hopefully it will be helpful to everyone in some way!

11th October 2015:
Spoiler:
10th October 2015:
Spoiler:
8th October 2015:
Spoiler:
Last edited by Nash on Sun Jan 17, 2016 1:51 pm, edited 11 times in total.
Naitguolf
Posts: 502
Joined: Wed Mar 17, 2004 6:16 pm
Location: London

Re: [WIP] Real-time day/night and weather engine

Post by Naitguolf »

Just only one question. When?
User avatar
Sinael
Posts: 244
Joined: Tue Oct 18, 2011 8:57 am

Re: [WIP] Real-time day/night and weather engine

Post by Sinael »

My sole thought throught the video: "HOLY SHIT AMAZING".
User avatar
doomfiend
Posts: 526
Joined: Sun Aug 27, 2006 6:10 am
Location: some where

Re: [WIP] Real-time day/night and weather engine

Post by doomfiend »

Will this work real time with Vanilla, Boom and Zdoom based maps? by (Zdoom I mean maps with a custom skybox such as TUTNT) or do you have to manually put in the acs code into the map? I would imagine your going to set it as a global script, so all maps will work indefinitely. if so than I will definitely use this from here on out upon release :O what my worry is. what about the hell levels for say like in Plutonia or Doom 1 episode 2/3, would you adjust the skycolor to a more demonic vibe to them? like tint the sky ever so slightly red? I know its still very wip. but those are the kinds of little things that I'm curious about :P

So far, I love what I see, another small question I have is how easy is it to set the day to night transitions to say like a full 24hr cycle = 1 hr real time. will those settings save if one has to do it via console command? or are you thinking you might be able to set it via options tab.
User avatar
abbuw
Posts: 653
Joined: Tue Jun 12, 2012 10:24 am
Location: South Lake Hills

Re: [WIP] Real-time day/night and weather engine

Post by abbuw »

This is really amazing, I can't wait to see the 1.0 release.
User avatar
Orb Swallowing Fox
Posts: 49
Joined: Thu May 02, 2013 7:46 pm

Re: [WIP] Real-time day/night and weather engine

Post by Orb Swallowing Fox »

Just, holy snout! That is amazing! Even more so than most modern stuff out there! I can hardly wait to see what you'll do with 1.0! That's going to up immersion by magnitudes!
User avatar
seedzhao
Posts: 64
Joined: Wed Jun 18, 2014 5:34 pm

Re: [WIP] Real-time day/night and weather engine

Post by seedzhao »

wow, nash, this looking promising.

amazing work!!
arkore
Posts: 25
Joined: Wed Nov 27, 2013 8:27 pm

Re: [WIP] Real-time day/night and weather engine

Post by arkore »

Looks like v1.0 to me. What's the hold up?

BTW, I make mods for Zandronum (aka Skulltag).
User avatar
armymen12002003
Posts: 1420
Joined: Wed Jun 01, 2011 10:25 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Castle Wolfenstein

Re: [WIP] Real-time day/night and weather engine

Post by armymen12002003 »

Nice nice nice. :D Very good job Nash.
User avatar
Nash
 
 
Posts: 17456
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: [WIP] Real-time day/night and weather engine

Post by Nash »

Thanks for the awesome feedback, everyone! <3

Naitguolf: when it's done. XD

doomfiend: vanilla and Boom format maps will not work I think... because you'll have to edit the maps to insert my custom skybox. This is actually meant more as a modder's resource rather than a mod for players. It's currently not possible to insert skyboxes into maps without actually editing the maps anyway. And because of that, ZDoom maps like TUTNT will have to be edited too. The scripts that my engine uses will not clash with any existing scripts because they use named scripts. Regarding hellish or outworld-y levels... I haven't thought of that yet. I made this engine to mimick real-life, but I may add support for non-realistic skies and weather after 1.0 is released. Technically, it is possible to simply edit the colours of the sky and the hues during the day, you just have to change a few lines in the ACS, but you'll just overwrite normal, earthly weather that way. I may add support for additional skies and weather after 1.0. Lastly, you can change the speed that time passes in my engine easily in the ACS. The console commands I used in my video are "cheat" commands, you can remove them from the source completely if you don't want the player messing with the sky and weather. And by the same fashion, you can also make your own custom sliders in the Options menu to control the speed of the time if you want.

arkore: besides the features I listed in the OP of what needs to be implemented before 1.0... my biggest concerns is with performance. It's not running at a rate which I am happy with yet, and I will be taking my time to really optimize the performance... because at the end of the day, you want a map that is playable, not a map that is pretty but runs at 10 FPS. :P
User avatar
Stormblade
Posts: 74
Joined: Fri Sep 19, 2014 5:56 pm
Location: UAC Ganymede Labs

Re: [WIP] Real-time day/night and weather engine

Post by Stormblade »

Hallelujah!

This is... this is awesome!

Just imagine playing Doom engine games like Doom, Hexen, Heretic, Strife, etc.etc.etc. with it.... :D

Also I'm going to insult all of the Build Engine users, just give me a second...

OUR ENGINE IS BETTER! NYAH NYAH! Build Engine users suck on it! Doom engine kicks some serious ass still and this right here is proof!
User avatar
YukiHerz
Global Moderator
Posts: 1503
Joined: Mon Dec 02, 2013 6:01 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Where corruption is redefined daily.

Re: [WIP] Real-time day/night and weather engine

Post by YukiHerz »

Are the rain drops actors?, if so, how hard would it be to change the actor spawned? in example, instead of spawning those raindrops, being able to spawn rocks...
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: [WIP] Real-time day/night and weather engine

Post by Leonard2 »

Absolutely stunning!
I really like the hud effects (sun lense/flare).
Usually people don't even think about those but it's important in my opinion.
As for the rain, it already looks pretty good but I think you should take a look at the "Slick City Streets" from Ral. The rain looks much better.
User avatar
NantoCodd
Posts: 230
Joined: Thu Jul 18, 2013 12:58 am
Location: The Ultimate DOOUMB

Re: [WIP] Real-time day/night and weather engine

Post by NantoCodd »

Is this the real life? I love this! Really hope for this to be released and used for a mod that will shake the whole gaming community! But, for now what is minimum pc specs, Nash?

Return to “Resources”