Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 06:06:11 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsSnow Hz
Pages: [1]
Print
Author Topic: Snow Hz  (Read 4152 times)
Evilion
Level 0
**


View Profile
« on: August 07, 2014, 04:14:31 AM »

I'm starting a new project, and decided to make a devlog this time, to see if it can catch your interest!

Let's call it Snow Hz for now. It'll feature snow and some kind of radio antenna, amongst other things, that's why.

I think I'll talk further about the core concept later. For the moment, it's a character in first person, struggling to dig his way through the blizzard.

Currently, I'm working on a snow terrain...



Dig your way through the thick layer of snow.



The snow falls and covers your trail, making you lost your bearings.


(The red ground corresponds to the lowest level of the snow, it's not mean to stay red...or maybe at some point? Smiley)

The game will feature several days of the character's life. So the thickness of the layer of snow, the amount of "falling snow" and the fog density are going to change depending on the weather.
« Last Edit: August 08, 2014, 08:18:25 AM by Evilion » Logged
Evilion
Level 0
**


View Profile
« Reply #1 on: August 08, 2014, 02:41:22 AM »

I'm currently working on the snow system that covers your trail.

The point is, I have to optimize it to prevent the game of lagging of course, but also to make it more "narutal".

At first the system was only checking the already dug points in the terrain, and was chosing a random point from the list to rise it. But then, more there were points (=longer trail in the snow), more the rising points were scattered, and less there were chances for the player to see his trail being covered behind him. It gave the impression that more you walk, less the snow is falling.

So now I'm working on a new system to make it more natural. Each tick, it choses a certain amount of point in the whole terrain, and check if it's part of the already dug trail. If so, it rises the point. It works great, but it makes the snow "falling slower", so I have to tweak some values.

Also, I changed the heightmap resolution and the terrain size. I'll check different values there too, to obtain a good render while keeping good FPS.
« Last Edit: August 08, 2014, 08:18:49 AM by Evilion » Logged
jgrams
Level 3
***



View Profile
« Reply #2 on: August 08, 2014, 06:56:55 AM »

Or maybe take a certain percentage of the dug-out points? If you already have a list of them... That would solve the snow-falling-slower-as-the-path-gets-longer problem, and you wouldn't be wasting time checking points all over the map. Generate a random number for each dug-out point, and if it's below a threshold, then it rises...?
Logged
DocLogic
Level 0
***



View Profile WWW
« Reply #3 on: August 08, 2014, 07:07:15 AM »

You've caught my interest, following this. I've been thinking about something like this for my next game. I like the visual style of the snow, sort of low-polygon, cell shaded.

Are you going to make this a Unity Asset?

Will you be able to do more pronounced footsteps, or like a trail from a snowboard?
Logged

Evilion
Level 0
**


View Profile
« Reply #4 on: August 08, 2014, 07:58:19 AM »

@jgrams Yes taking a percentage is a solution, but I'm afraid that if the amount of dug points gets too high it will decrease the FPS. I'll see how it goes, and in which conditions it's more efficient. Thank you for the advice! For now I switched to a system that doesn't use the dug points list and is much more optimized.

@DocLogic Thank you for your interest! I don't know if I'm gonna make it a Unity Asset since it's very roughly made right now, but who know? Basically it's just editing Unity terrainData with SetHeights stuff, but it's a bit tricky and need a good amount of tweaking. I can actually change the value of the footsteps depth, and the area of dug snow. So with the right values, I can make some snowboard trail yes  Smiley
Logged
Evilion
Level 0
**


View Profile
« Reply #5 on: August 08, 2014, 08:17:55 AM »

To simulate an infinite map, I make the player teleport to the other side if they go to far away from the middle. To prevent them to realize it, I increase the fog density when they come close to the border. I let a relatively big margin so they can't see any cut in their trail.



Teleporting through the map without even being aware of it


I'll add some points in the map that work the same way (increasing progressively the fog density as the player get closer), so the player will hardly know if they just have been teleported to the other edge of the map, or if they simpley passed through a thick fog area. I could even make the player teleport to another thick fog area if they get too close to the point, but it would be too mean...but why not?  Evil


Each day, the player have to find a location (the radio antenna, which position changes each day, strangely), and then goes back to their hut, and this before the night fall. Their only landemark is the trail in the snow, that is progressively covered in the storm. In days of huge blizzard, they can get lost very quickly...


I'll talk further about the hut/antenna trips later, let's keep some mystery for now!
« Last Edit: August 08, 2014, 08:23:51 AM by Evilion » Logged
ndke
Level 2
**


View Profile
« Reply #6 on: August 08, 2014, 09:46:16 AM »

Wow, this is really cool!
I really like this Smiley
Logged
Evilion
Level 0
**


View Profile
« Reply #7 on: August 09, 2014, 02:38:07 AM »

I finally switched to a percentage system as recommended by jgrams. To prevent slowdowns, I have to keep the dug points list relatively short. It's some tweaking bewteen added points pace and the removed points pace(points are removed from the list when they reach the base value). So, I'm working on finding a good balance between the digging depth, the walking speed, the raising distance of the points, the rate of the raisings, the percentage of the raising points...

With the current values, the list stop increasing at a lenght of 200, and the game keeps good FPS. But since I want different "weathers" happening with the progression of the player, I'll have to find other working combinations of values. I mean, I'll not be able to just put random values, or it'll risk to make the game lag at some point. So it'll be a lot of tweaking already!

To render the raising trail more "alive", instead of making a suddent raising, I start coroutine (there is no simply direct yield WaitForSeconds() in C#) and make the point raise several times with a smaller value, waiting a little bit between each lifting. This way, I want to give a better feeling, like you "see the snow pile up" instead of just notice a vertex moving. However, I don't know if it's really optimized, maybe there are better way to do it.
Logged
somin
Level 0
***



View Profile WWW
« Reply #8 on: August 09, 2014, 12:49:37 PM »

I like the idea in general! I'm not certain what the actual gameplay will be but I'll be sure to check in once in a while. I'm intrigued.

As for the tech your using:
I would suggest a texture/shader solution instead of iterating through the verts.
What i mean by that is that you create a heightmap texture which you use to deform the snow layer. When the player walks through the snow you basically do the same as your doing now, just write the information in pixels instead of vertices.
Sure, accessing textures direction isn't that fast, but I doubt that its slower than adjusting the verts themselves.
The texture method however would yield some other benefits:

* you can easily tile the texture over a larger surface without performance issues, which in turn means that you don't need to increase the fog to 100% to obscure the teleport.
* you can have a higher resolution snow surface and thanks to texture filtering the snow will still be smooth  without adding more data points that store the height.

actually, thinking about it you could do the raising of the snow with a shader as well, making it way faster that adjusting the verts.
I imagine you could use a render to texture pass to render the falling snow onto the depth texture. This would be a constant cost no matter how much you do with it.
Additionally you could do a lot more complicated calculations with this, like snow crumbling in when the edge is to steep or drifting snow that piles up near structures because of the wind and such.
Granted, this is a little more elaborate, but this method would allow for experimentation.

enough talk, I'll get back to work.
Logged

@sominklein      WIP Story Exploration Game      WIP Weltenformer      Done CLIMB
Evilion
Level 0
**


View Profile
« Reply #9 on: August 10, 2014, 02:58:32 AM »

Thank you for the precise advice!

Actually maybe I used a wrong term for what I am doing, I'm not accessing a vertex as in a 3D model, I'm moving the heights of a Unity terrain. I suppose that it's the way to access and modify the heightmap?
I'm using a mid grey texture heightmap to initialize the height of the snow layer at a certain value. I have to reset it at each launch (in the code, by reseting the heights values), otherwise the heightmap (?) stay the same and the game starts with an already modified terrain.
Plus, the fact that I'm accessing point from 0 to [heightmap size] (for width and height) let me think that I'm actually already modifying the pixels of the heightmap rather than the vertices of the terrain.

Could you tell me if it's what you were talking about? If so, sorry for being not clear enough about which method I am using!

You're talking about some shader too? You mean in the snow material?
Logged
somin
Level 0
***



View Profile WWW
« Reply #10 on: August 10, 2014, 06:22:15 AM »

I never used the terrain in unity so I dont know how is is handled internally, but all the same, its not exactly what I meant, just similar Smiley I guess its a matter of using terms that carry different meanings and associations for both of us.

When I talked about the shader I actually talked about the vertex shader part that could deform your model using the heightmap. This way you would not change your model at all but when the texture changes the deformation is shown on the mesh all the same ( through the vertex shader ). That might be the way unity handles the terrain anyway but I doubt it. It seems a waste for static terrain.

That being said, I think I'm just geeking out over the tech possibilities. You should just use what comes easiest to you and makes sense for your project. I get sidetracked way too often by stuff like that and stop working on the actual game, so don't let me distract you Smiley
Logged

@sominklein      WIP Story Exploration Game      WIP Weltenformer      Done CLIMB
Evilion
Level 0
**


View Profile
« Reply #11 on: August 10, 2014, 06:23:02 AM »

I'm modeling a huge dish (I prefer to call it radio telescope), like these ones in the desert oriented toward space to detect some extraterrestrial signals.







It's not finished yet, I have to create the base that support the radio telescope and suggest that it can be rotated and oriented differently. Maybe I'll divide the object in several parts, allowing me to create several orientation depending of the in-game day.

So yes finally it will not be a radio antenna. A radio telescope is more explicite as a component, plus since I want the player to collect data it will be easier to place some kind of screens and electric meters on the base than it would have been with a simple antenna. Also, I found the radio telescope more "memorable".

In the blizzard, it will be easier to detect than an antenna, but not too easy thanks to the fog. I like the feeling to be in quest for something hugethat should be clearly detectable on a plain, but that you struggle to find because of the storm. With the right colors of textures, I can make it in a way that sometimes you walk just next to the radio telescope without noticing it.

Each in-game day, the player wakes up in his hut. He has to go out, fight the blizzard to find the radio telescope, collect some data (he writes them on a notebook), goes back to his hut and record the collected values in an old computer.
« Last Edit: August 11, 2014, 01:27:08 AM by Evilion » Logged
Evilion
Level 0
**


View Profile
« Reply #12 on: August 10, 2014, 06:28:09 AM »

@somin Oh yes ok so you were really talking about actual shader stuff. I never worked with such displacement shaders, but I'll make some researches and try it at some point. I could even combinate the two methods if it happens to be possible and useful.

Anyway, thank you for taking some time to explain it to me, and thank you for your interest! Smiley
Logged
Evilion
Level 0
**


View Profile
« Reply #13 on: August 10, 2014, 01:53:33 PM »

Here is my progress on the radio telescope so far :




I'm not totally satisfied by the support of the radio telescope, it doesn't seem good to me. These bar-things look weird, and I'm not convinced by the pillars structure. It doesn't seem logical either. Maybe I'll just go with a concrete structure directly anchored in the ground. Also, I have to rearrange the smooth groups.
I'll add some details like rails, barriers antennas and cables.

As you may see, there is an opening in the building (there will be an openable door). It allows the player to enter and access some kind of electric stuff, like an electric meter, and some computers screens.

I would like to add stairs or ladders, to allow the player to climb to the top of the radio telescope. There could be a ramp to reach the first door, then circular stairs inside the building, leading to a second door, opening straight to the outside, higher on the building. Then some kind of ladder to the top.
Well, I'll see if this kind of route could work, but the thrilling feeling of climbing a structure in the blizzard is really something I'd like to produce. It has to stay ergonomic, and not to frustrate the player by making him fall too much. It doesn't have to be challenging. Plus I think I'll not allow the player to jump.






Here is what it currently looks like to discover the radio telescope in the blizzard :


The huge structure appears in the storm


I like how the radio telescope seem to spring from the fog, and its ghostly aspect. I have several global fogs effects with different values of distance and density. It's, once again, a lot of tweaking to reach the correct value and render the wanted effect and feeling. I think I'll make some of the in-game days less foggy (then easier to find the building), to vary the rhythme, and because I like the aspect of the radio telescope silhouette on the horizon :


A ghost...
« Last Edit: August 11, 2014, 01:28:14 AM by Evilion » Logged
DocLogic
Level 0
***



View Profile WWW
« Reply #14 on: August 10, 2014, 03:18:42 PM »

Here is my progress on the parabol so far :


I'm not totally satisfied by the support of the parabol, it doesn't seem good to me. These bar-things look weird, and I'm not convinced by the pillars structure. It doesn't seem logical either. Maybe I'll just go with a concrete structure directly anchored in the ground. Also, I have to rearrange the smooth groups.
I'll add some details like rails, barriers antennas and cables.


I think they look alright in that top pic, but they do look a bit off when placed in the snow, as in your bottom picture.

Perhaps you could take influence from the poles holding up chair lifts? More of a round shape, but a flat bottom
 Examples:

http://www.ski-epic.com/steamboat_wp_2002/p03_gondola1280x1024.jpg
http://www.mountkato.com/sites/default/files/images/IMG_1539.JPG
http://www.nelsap.org/nj/belledoubleline.jpg

Under 200cm of fresh powder, all you see is the round part usually.


*edit* I think the bar things look great! Its just the square-cubes under the main platform I'm referring to.
Logged

unsilentwill
Level 9
****


O, the things left unsaid!


View Profile WWW
« Reply #15 on: August 10, 2014, 03:33:45 PM »

This looks really great right now.
Logged

Evilion
Level 0
**


View Profile
« Reply #16 on: August 13, 2014, 10:08:13 AM »

The new base of the radio telescope is now cylindrical. This plus the external footbridge and the interior circular ramp (which take me way too much time to model correctly), make it look like some kind of lighthouse. I like its current aspect and the symbolism of the lighthouse, so I think I'll stay with this version for now.



The external footbridge around the cylindrical base



The circular interior ramp



The barely visible silhouette in the fog



I've spent some time aligning edges and modifying smoothing groups, in order to render something clean. I'm not sure about the whole apparent polygons instead of surfaces smoothed together, but I like it actually. Well, I want to spend my time on other aspects of the game for now.

I think I'll fill the interior of the cylyndrical base with big computers and other electronic stuff. I'll add a ladder at the other end of the footbridge, leading to the area right below the dish. There, I'll put some emergency control panel that the character is allowed to use only in case of problems with main computers inside the base. Let's say there'll be some switches and other fuses the character isn't allowed to handle AT ALL.



I'm saying the character and not the player, because I want to separate the "scenario" theoretical objectives of the character, and the personal objectives of the player as a...player. The game will be about this concept. The character will be given a task. Some things will be ordered to him, some others will be forbidden, but not in term of gameplay. Doing something against the given rule won't lead the game to end.
 
I mean, the game will not punish the player for doing the wrong thing, or not doing the right thing. But the character risks to be punished, by whoever gave him the rules to follow. But not in term of health points or score loss. Let's say that, depending on how he behaves toward his given task and the given rules, things may or may not happen in the blizzard...



I don't know if I am clear with all this speech, and maybe not convincing enough. But that's really something that I want to experiment with this game. Separate the player's objectives from the character's theorical objectives. Develop an alternative sense of duty, or its opposite. Give the player freedom, and the character vain and stressing task, and see what happens.
« Last Edit: August 13, 2014, 10:18:22 AM by Evilion » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic