Simulate Minecraft Redstone [Geometry Nodes]

Question

I am trying to simulate Minecraft redstone's behavior to create videos teaching computational redstone concepts with the convenience of Blender.

My first step is redstone dust, but I have already hit a roadblock.


Essentially, I start with a setup like the first screenshot's and I want to assign a different texture to each face depending on how many tiles they have traveled from the power source (the lightest redstone dust), and depending on where adjacent faces are. (Each face is 1m²)

I know this is a lot and probably not a question that could be answered just like that, so what I was wondering was :
How/Where could I learn the skills necessary for this project?
I started the ASSEMBLE course in hopes of learning what I needed, and while the course was really helpful for other stuff, it didn't really suit my specific situation.

If anybody knows about good resources for me to get started, or if by some chance anybody is interested in teaching me (you never know), please let me know.

Thanks in advance!

P.S. If you wish to contact me, please do so on Discord username : "sillyneve"

1 love
Reply
  • Dwayne Savage(dillenbata3) replied
    I'm not sure, but I think dynamic paint and/or switched texture tiles. Then again it might be doable with a texture atlas. I'll be watching this post to see what ideas come up. 
    1 love
  • Omar Domenech replied

    I didn't even know how to use redstone in Minecraft, let alone Blender. But I'm guessing it is going to take a lot of knowledge from shader and geometry nodes wizardry. Only thing I can think of is this procedural shading course:

    https://studio.blender.org/training/procedural-shading/

    1 love
  • coyo (coyohti) replied

    Do you want this to be a set animation or to be able to dynamically change? A set animation would be pretty straight-forward, I think. If I wanted it to change dynamically...well...honestly, I'd switch to using a game engine because that's what I know. Doesn't mean it's not possible in Blender though...maybe via geonodes? Take a look at the Particles Course to see if that looks like a potential solution.

    2 loves
  • Martin Bergwerf replied

    HI SillyNeve ,

    If you still need help and care to explain what you want to do, to someone who doesn't play Minecraft, I will have a look.

    I looked online, but the explanations about Redstone I found, where all meant for Minecraft players and didn't help me at all.

    1 love
  • Silly Neve(SillyNeve) replied
    Solution

    Hey!
    I have actually gotten all the help I needed so far for this project, from here and other places.
    It's difficult to mark an answer as correct given how vague my question is, but I have gotten my question answered here.

    If you still want to give it a go just for fun however (and because I would love to trick someone into learning some redstone)
    Here is the best explanation I can give :

    Minecraft operates on a grid of 1x1 tiles, and every block has to conform to this grid (redstone dust being no exception).

    In this example the base geometry is a set of 1x1 faces as to respect said grid.
    Another quirk of redstone, is that it has a Signal Strength Power.



    The signal strength can vary from 15 to 0, but how do you know which signal strength it should have?
    Well, by default redstone has a signal strength of 0, no power.
    If [x] is a redstone dust where x is the signal strength,
    an 18 blocks long, straight line would look like this:

    [0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]

    Right now, there is no power, so we need a power source, that is, assigning any signal strength to a chosen tile (or face, in this case).
    If we chose the first redstone dust to have a power of 15, our line would suddenly look like this:

    [15][14][13][12][11][10][9][8][7][6][5][4][3][2][1][0][0][0]

    The power propagates from the source depleting by 1 for every tile it crosses, and stops going down once it reaches 0.
    If the original power source was around the middle, and we gave it a power of 5, here is what our new line would look like.

    [0][0][0][0][1][2][3][4][5][4][3][2][1][0][0][0][0][0]


    This is how the signal strength changes, but what about the color?
    It's pretty simple actually, for a pretty accurate representation of the color in game, you only have to worry about the red channel.
    I found this simple equation to work wonderfully : 12*power + 10

    Now for the other way redstone dust's textures dynamically change : Connections



    This one is simpler to explain, redstone will visibly connect to any directly adjacent tile.

    Starting from the top right and reading right to left and top to bottom :
    The first one in the image above would be connected on all 4 sides, the second would have 3 (on the left, bottom and right), the third would have 2 (on the left and bottom).
    The fourth one is special, it will either show if it has a connection on the top and bottom, or if it has a connection on either the top or the bottom.
    (The fifth one is honestly irrelevant to the question and can be completely ignored)

    Note that this isn't every possible case, but all of these can be rotated to create any possible case.
    If we had a redstone dust with an adjacent to it's right and top, we could rotate the third one 180° to get what we need.


    This about sums up redstone behavior for a flat plane.
    If you want the textures to make this possible, or have anymore question, please contact me on discord, it would be a pleasure!

    Here is the link to the wonderful answers I got from elsewhere :
    https://blender.stackexchange.com/questions/324042/simulate-minecraft-redstone-where-to-start


    2 loves
  • Martin Bergwerf replied

    So, if I understand this correctly, there is no simulation, but you 'draw' the tiles and want the patterns and colors to be set automatically.

    If you're not too fixed on using GN, here's what you could do for the Power/Color:

    Reddust.png

    Just Duplicate the tile and move it and calculate the Manhatten Distance to get the Strength (numbers can be tweaked to set the Strength of the first tile).

    The patterns for the connections are a bit more difficult and might not be do-able with just Shader Nodes...

    2 loves
  • Martin Bergwerf replied

    Oh, I obviously didn't think that through!

    Here it already goes wrong; the Manhatten distance (in blue) is less than the traveled distance (in green):

    Red Dust_01.png



    2 loves
  • coyo (coyohti) replied

    SillyNeve - Ooooo you might be tempting me with your redstone shenanigans. I have played very little Minecraft but the redstone stuff looks fun. The game studio my spouse is partnered into makes some intense engineering games and they often rocket beyond my understanding. It would be nice to play with something that might have an easier learning curve.

    2 loves