Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1388633 Posts in 66624 Topics- by 59296 Members - Latest Member: Deafcon Audio services

March 03, 2021, 12:47:47 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDesolus: A Surreal First Person Puzzle Game
Pages: 1 ... 20 21 [22]
Print
Author Topic: Desolus: A Surreal First Person Puzzle Game  (Read 72698 times)
JobLeonard
Level 10
*****



View Profile
« Reply #420 on: January 21, 2021, 02:28:11 AM »

Dang, you really nailed that snow shader - I can practically feel it melt on my skin when I see it build up Shocked

Thanks! I spent a bit of time on it, I think what sells it most is the fake subsurface scattering on the snow.
I used a modified version of this algorithm which uses a 'thickness map' to determine how much scattering of light there should be.



Instead of generating the thickness map manually, the thickness is actually just the snow height!

I also tried a version which used textures but it ended up looking bad with the art style.
So the snow is entirely without any textures and is lighting and shaders only.

Welcome back, and happy new year! Looks fantastic. I'm heavily biased in favour of snow in games—I really find it lovely. Kiss The new fog/distance effect looks great as well, but I think it was very cool before too. Each has its own charm.

You'll still see the harsher gamma lighting fog in some areas of the game. I can actually reproduce that effect pretty easily with the new linear lighting fog.
Primarily the advantage of the linear lighting is that it gives me more artistic control over the scene. Gomez

The snow shader is lovely and this whole devlog seems amazing. I'm looking forward to reading it entirely with a cup of coffee.

Outside of keeping certain critical elements like the fog/distance art style, puzzles about black holes (in some shape or form), and an emphasis on interconnected level design, the game has changed radically.   

Everything prior to about 2018 was mostly prototype and exploratory work. There wasn't even gothic architecture in the game until late 2017, and the game didn't have the alternate universe idea until mid 2016, yet this DevLog dates all the way back to 2014!   
Definitely be prepared for a big cup of coffee and a winding road, ha. Coffee
> Instead of generating the thickness map manually, the thickness is actually just the snow height!

Aaaah, good old "we can simplify our problem (and therefore solution) for this use-case"-based approximations. Love it!
Logged
Schrompf
Level 8
***

C++ professional, game dev sparetime


View Profile WWW
« Reply #421 on: January 21, 2021, 02:29:01 AM »

I love the technicality in this devlog. And that it's void of PR speech. Subsurface Scattering was on my ToDo-List for ages, yet I never got around to do it. Yours is well done!
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Mark Mayers
Level 5
*****



View Profile WWW
« Reply #422 on: January 23, 2021, 01:52:47 PM »

Aaaah, good old "we can simplify our problem (and therefore solution) for this use-case"-based approximations. Love it!

Yea, I was pleased with how it turned out. Took a bit of getting the 'magic numbers' right in the shader but I think it looks decent.

I love the technicality in this devlog. And that it's void of PR speech. Subsurface Scattering was on my ToDo-List for ages, yet I never got around to do it. Yours is well done!

 Toast Right
Logged

Desolus Twitter: @DesolusDev Website: http://www.desolus.com DevLog: On TIG!
Mark Mayers
Level 5
*****



View Profile WWW
« Reply #423 on: February 05, 2021, 05:40:56 PM »

Update 160: 02/05/2021

STORM SYSTEM



Recently, I created a storm system for Desolus. These chaotic storms happen periodically throughout the game.
I imagined an apocalyptic feel, as if nature is lashing out. Sometimes the lightning will even destroy buildings!

---

CREATING LIGHTNING



Did you know there are several different types of lightning?

Originally, the lightning was generated randomly. However it didn't look as convincing this way.
Instead, I did some research on how lightning works in real life.

From a simulation perspective, I divided up lightning into 'Leaders' and 'Cloud to Ground' and made the system generate lightning with a probabilistic model.

The logic behind the thunderstorm code itself is fairly simple.
  • Leaders: Have the chance to spawn additional leaders in a similar position and direction. Also, every leader has a chance to spawn Cloud to Ground lightning
  • Cloud To Ground: Created when there is an object beneath a leader. Its strike point is determined by a raycast.

For the wind, clouds, and snow, I was able to leverage all of my previous work on the sky system.

---
Logged

Desolus Twitter: @DesolusDev Website: http://www.desolus.com DevLog: On TIG!
Mark Mayers
Level 5
*****



View Profile WWW
« Reply #424 on: February 25, 2021, 04:57:41 PM »

Update 161: 02/25/2021

DESTRUCTION SYSTEM



I've been working more on my destruction simulation script, which I created last May.
This is the primary script I use for level design in Desolus, as it pre-fractures meshes so they can be used with the game's black holes.
As I mentioned previously, all of the meshes are procedurally generated from within the destruction script, and then reassembled accordingly.

This script was very robust, and turned out to be a great level design tool. However it was very slow running in editor due to the sheer volume of computations required.

In a short explanation, the script is looping through 2,000 meshes which comprise that cathedral, and 30,000 meshes which are the fractured “chunks” of those 2000 meshes.
To determine which chunks are within the boundaries of the green boxes, an algorithm computes the bounds and compares them to each chunk’s vertices.
It deletes the chunks which are in bounds and then reassembles the meshes back together with the remaining chunks.

Given the amount of meshes and vertices, this used to be pretty slow running on a single C# thread.

I decided it was in need of a speedup!

---

UNITY JOBS SYSTEM



I've been glancing at Unity's Jobs System for quite some time, but haven't had the chance to use it until now.
After spending some time the last several days, I ported my destruction simulation to the Jobs System.

It was fairly complex to port. The Jobs System only takes non-managed types, so you can’t give it a native array of arrays or anything.
Only non-managed types, like structures comprised of primitives, or simply primitives, are supported.

I had to redo all the internal logic for iterating over the meshes, to ensure they are done all at once, rather than one by one.

This was tricky because I had to take ALL mesh’s vertices, and plop them into the jobs system into a single native array.
Vertices had to be indexed by a value which determines which vertices belonged to which meshes.
After the bounds computations are done, the data needed to be reassembled back together using a complex loop.

Additionally, I had to reprogram all of the script's methods to be Editor Coroutines, because the Jobs System runs on an asynchronous thread.
The coroutine approach was necessary so the Jobs System could finish computing data, before the script performs Monobehaviour tasks. Previously, all of the methods were done on the main thread.

The results of all of this effort was fantastic!
 
The script running through a combined total of 16.3 million vertices, and 32.7 thousand meshes, in FOUR SECONDS!
This used to take TWENTY MINUTES.
 
Combined with the burst compiler, the jobs system parallelized it and made it super speedy.
I'm extremely excited because the time spent on this optimization will pay back itself several times over!

If you're looking to get started with the Jobs System I would recommend:


---
« Last Edit: February 26, 2021, 03:58:59 PM by Mark Mayers » Logged

Desolus Twitter: @DesolusDev Website: http://www.desolus.com DevLog: On TIG!
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #425 on: February 26, 2021, 02:53:26 AM »

That's amazing! The cathedral is really pretty too, don't think I've commented on that before. Thanks for the writeup and the links! This devlog just keeps on giving. Grin
Logged

Pages: 1 ... 20 21 [22]
Print
Jump to:  

Theme orange-lt created by panic