Sdfgeoff's node shaders and other experiments

Nice, I did a similar shader once before to simulate radar vision.

@sdgeoff

is the fire with nodes performance heavy?


THere is a single texture in this image and some vertex color magic. It’s a little like the damaged wall shader from the first page except more compressed. The green channel is the grass texture, the blue channel is the dirt and teh red channel is the fade-texture between the two. The actual location of grass vs dirt is set using vertex color.

Blend:
GrassBlend.blend (1.01 MB)

It’s a pretty good concept, and the result looks great. But there are a couple of problems:

  1. It’s not that intuitive as to what color I should paint to get the result I want.
  2. It looks good in small areas where you have roughly a 50/50 mix of grass/dirt, but where you end up with large areas of only dirt or only grass it wouldn’t look so good.
  3. Where the frequency of the verts is quite high on screen, or where the frequency of mixing outweighs the frequency of the detail noise it wouldn’t look as good. So you have to keep the areas quite big which leads back to point 2 eventually.

How about adding a dirt texture over the top to add some more color noise to the texture? This can be tiled with global co-ordinates or UVs. It breaks up the pattern more and stops it from being too focused on one set of colors. It doesn’t add much more to performance since the texture can be quite low res, you don’t need to see the details as it’s partially transparent anyway. As long as the scale of the dirt texture doesn’t match the scale of the detail textures you shouldn’t get much repeating either. For example 2.5 and 3.0.


Sampling textures is quite expensive. Ideally the texture used to blend the two should go into color variation and be scaled differently, but that requires a whole extra texture sample. Does performance matter? Probably not here, so here’s what it looks like with that small change:



This is a much larger plane.

Blend:
GrassBlend.blend (1.03 MB)

You can still tell it tiles, but one of the reasons for that is because the grass texture tiles poorly (has brightness variation across it rather than just being texture data)

Paint it white for grass black for dirt. I left the previous blend on ‘blur’ brush, so it probably wasn’t doing much when you were painting it…

Ah, I thought you meant red for dirt and green for grass in the vertex colors. Silly me.

I think it doesn’t matter too much if small detail tiles tile a lot, as long as you have another texture, at a different scale to introduce large details.

Don’t forget, if you save your textures as a png or dds (DXT5 for greyscale alpha) you can get one more channel from the alpha. Just slpit the channels RGB and get the fourth texture from the value socket of the texture node.

I was going to do these after reading that same blog the other day. Glad you beat me too it.

Have your own go at it anyway, you’ll learn a lot more that way, and probably come up with your own cool tricks.

Playing with Cycles Baking for lighting.
The environment lighting is baked, the cube lighting is dynamic.



I quite like this AO style thing, even the noise generated by the low-samples cycle bake is relatively artistic.
Blend file:
EncTest1.blend (1.82 MB)

Also, I suck at making environments. Anyone know any good resources? (preferably reading material rather than videos)

I wanted to do the above with purely dynamic lighting rather than half-dynamic half-baked. Here’s a screenshot:



Yes, I added in the noise. I like it, OK? It adds detail. I’ve added in motion as well so you can walk around.
There are two lights visible in the above screenshot. To fake the reflected light I have a spot-light pointing upwards below the floor.
There is also a flashlight (third light) on the left mouse button if you want to go into the darkness.
EncTest2.blend (1020 KB)
If you’re wondering what an ‘enc’ test is, it’s a miscpelling of ‘env’ for environment.

I’m somewhat tempted to put this in the WIP forum as ‘cycles environment test’ and see if anyone notices it’s not cycles…

I like it, the environment looks great, though you should always model your environment with an eye for interaction first. The spiral stairs look great, but you can’t climb up them (unless you added a walking up those stairs animation and a state transition/ cut scene like in this video when they climb up the ladder). Likewise the diagonal beam just behind the stairs would be a great place for AI to get stuck on, or the player to accidentally push themselves through the scenery…

@smoking_mirror:
You are completely correct about it being a terrible design for playability. Originally it was going to be render only, then I thought I’d try baking it, and well, uh, hmm.

Chromatic Abberation 2D filter. Based on one by SolarLune from Leonnon, but modified beyond recognition. It has configurable strength as well as configurable number of smoothing passes in real time using game properties.


Blend:
Abberation.blend (468 KB)

I expanded the shader above and added barrel distortion and vignetting as well as using dithering to reduce the number of passes required. The result can be seen in the video below:

Blend is, well. hmm:



This may well become my next game project, as I have some ideas ticking around, and think it’s about time to do a long term project again.
I’m using a very similar structure to CaveX16 for loading levels and so on. I found it rather nice to work with.

1 Like

I love the look of the video.
I think the drone needs some kind of z axis auto stabilization, this is something most modern drones have so to not have it feels strange.

The “puddles.blend” could be an “Invasion from Beyond”-like game ! That was awsome game !

to not have it feels strange.

Have you hacked my gitlab account and tried it already? (Joking).
Good idea, some sort of alignment system would be a good plan.

I love the look of the video.

Thanks.

The “puddles.blend” could be an “Invasion from Beyond”-like game ! That was awsome game !

I’ve never heard of that game before! Guess I’m too young to know about all the games from the 90’s eh?

Good point, But I did play descent and your other game based on it.
I’d guess from the video that this new project would use similar gameplay elements.

Descent works, with its “no way up” world because it takes place in a place with few human features. It’s like an adventure through the air conditioning ducts. There doesn’t have to be a recognizable up or down. If you have human elements like doors and view screens then you have to start thinking of the would as having a z axis. I’ve said before how many people get motion sickness in that sort of environment. However if you want that zero gravity feel you could make it so auto alignment can be toggled.

Yup, there’s something about me and 6DOF games. However, this game is intended to be slightly different. Instead of the typical shooter that all modern 6DOF games have turned out to be I want something a little different. I want a puzzle game. Unfortunately most puzzle games rely on restriction of movement (eg portal), and as a result, don’t translate well to 6DOF.
For the past two days I have been trying to think of puzzle mechanics that work when you can move up and down with freedom, but am having issues. It’s a fun challenge (trying to think of challenges), so I’ll give it another week or two before I decide on an actual gameplay.

Some ideas so far are:

  • Mazes - the problem is that peoples minds don’t work well in 3D and the area you can cognote is quite small
  • Your ship is a virtual construction. You are obstructed by physical objects but cannot influence them. The only way you can do things is by interacting with computer systems.
  • Exploration/finding gold, in the same way as the old games such as Zork. This will be a big project in terms of environment modelling, which I am not good at.

If you have any ideas, I’d love to hear them.

You could have a “real” space and a virtual space as separate spaces. Beneath a steel sky and the original system shock did this very well. You have to open doors in the virtual space so you can fly though them in the real space. Turn off gas flows to shut down fires, deactivate defense drones etc…

You can also play with the idea of an insect sized drone in a human sized environment. Can’t open a door? Fly through a vent instead.

Things like lazer tripwires and a time limit can be fun too. Hit a button at one end of a corridor then fly back down it to the open door before it closes, but avoid lasers/sparking wires etc… natural time limits like an automatic door or cycling machinery are better than artifical ones like a clock, though you could have pinhead bombs with timers… an idea there could be putting a blast proof surface between you and the bomb because you can’t get far enough away (another idea from system shock).