Sdfgeoff's node shaders and other experiments

Yeah, we’ve got a robot vacuum cleaner and it’s crap. Navigating a real world space is really a big problem for robots still.

Not in BGE, but in HTML:



And:


And infinite more…

This is the CaveX algorithm that I mentioned after making CaveX16, this time implemented in Javascript and Canvas/HTML5. It specializes in making caves with lots of walls but still relatively well connected. If I get rid of the bucket fill to isolate the playable area:



The larger areas on the map are fairly well connected. The thing to realize is that you must preserve entropy. When you fill a map with random noise, every operation on it (short of adding more noise) reduces entropy. So by minimizing blur filters (ie normal cellula automata), narrow tunnels and twisty bits can be extracted.

Why red? Well, this will be the collision mask, and the other colour channels contain other information.

When I’ve made an interface for the generator I’ll plug it up on my website.

More walking robots:

this is very nice work!

I would very much like to take a look at how it works, and potentially use it for a vehicle and friendly and enemy robotics.

How does it deal with drop offs?

More coming:

How does it work. Well. I’ve been developing dynamic leg placement for a long time now. This is (I think) the third iteration, and is the best so far.
Here’s something I wrote for a report I mentioned it in:

The point of a robot leg is to walk. There are two ways to handle this. One is to pre-define a path. The other is to teach the robot what walking is: movement in a certain direction. This is done by giving each leg a region of ‘comfort’ centred on where the leg would normally rest. You then tell the leg that when it’s on the ground it should be moving in a certain direction. When the leg reaches a certain level of ’discomfort,’ the leg is picked up and transits to it’s rest position. To keep the leg’s motion centred around it’s rest position, the region of comfort is shifted in the desired direction of motion.
This is shown digramatically in Figure 3. An extension to this algorithm is to add in an overseeing system that looks at all the legs of the robot and moves the leg furthest away from it’s desired position.

Figure 3:


I’m not quite ready to release the blend for this yet (I want to texture the model and give it a nice environment, as well as a couple more tweaks to the leg placement).

Drop-offs? Currenlty it has issues with those. I have a couple ideas for how to deal with them, but haven’t implemented anything yet.

Shaded Particles with light in the middle

Side:


Bottom:



Yeah, they get rim-lighting. That’s just an artefact of how I give 2D sprites their shading.

Blend:
Shaded Particles.blend (887 KB)

1 Like

Desert Scene:



Note that the normal strength for the small ripples fades off with distance. If it doesn’t, the scene looks terrible. I feel the specularity is wrong, but can’t get it any better. It may also need to alter with distance or maybe frensel.

Blend:
Desert.blend (3.9 MB)

1 Like

The specular makes it look a bit too much like plastic.
A wardlso slope of 0.4 and intensity of 0.1 looks nice, or just turning off specular completely also works.

I would assume desert sand has a very fine grain, therefore would not have very ‘visible’ specular.

The mist and everything works really well though

@Good advice Thatimster. I like the way it shines in the distance though.

Render to texture as an UPBGE PythonComponent:

I don’t feel comfortable sharing the script (it was developed on Company time), but I’ll happily give advice to someone wanting to make something similar. I may remake it in my own time along with ImageMirror etc.

I like the PythonComponent API.

Wow cool, I have known about the PythonComponents feature in upbge but I haven’t used it but it looks very handy. I think it’s time to take a look to it. :smiley:

They’re great for things you’ll want to do lots, and they should be quite sharable as resources.

I will try and implement it, I need it for my own work, and there is no video texture control in the materials editor like reflection probe is setup.

this seems like a good stop gap

FILTER THE HECK OUT OF IT:



After creating some over-bump-mapped materials, I decided to over-filter it.

Blend:
Brick.blend (1.24 MB)

Actually, I quite like the materials, they just aren’t quite right.


I like swirling water in the well.I get a framerate of 30 with it.

I threw even more 2D filters at it:



I now think it looks quite pretty from an artistic point of view.

I’ll try increase performance before I upload it…

Here’s quite a useful component for UPBGE:


import bge
import logging
from collections import OrderedDict


LOCAL = True


class DistFromObj(bge.types.KX_PythonComponent):
    args = OrderedDict([
        ("ObjName", "Player"),
        ("Distance", 5.0),
    ])
    def start(self, args):
        self.target = args['ObjName']
        self.distance = args['Distance']
        self.object.staticShadow = True
        
    def update(self):
        player_obj = self.object.scene.objects[self.target]
        dist = self.object.getDistanceTo(player_obj)
        self.object.staticShadow = dist > self.distance

Apply it to a light, and it will make it so the shadow only updates when the specified object is within the specified distance. What this means is that you can have lots of shadow lights and not have as much of a performance hit (bear in mind you will still have the texture samples and VRAM use though)

Hi. Can this be ported via blender node editor?
http://madebyevan.com/shaders/curvature/

Unfortunately you don’t have access to the parameter “varying vec3 vertex;” in the node editor, at least, not to my knowledge.

My game for LD37 currently looks like this. I’ll finish it off tomorrow morning.


And while I did get it to a playable-ish state (ie enemies chase you), it isn’t very fun, so I won’t put it up on LDjam. But if you want the blend, here it is:

LD37.blend (1.41 MB)
Needs UPBGE 1.2

Really could have done with another day to add in more enemies, to balance it, add sounds etc. That’s what you get for starting 48 hours into a 72 hour comp.
Charging shields:

Navigation lights:
https://s24.postimg.org/qbf0wq49h/anim.gif