Brick by brick

Made a brick wall thats waaayyy to detailed to put in game:

I did this after frustration from trying to make a brick wall just from a texture:

Which looks much much worse. This was also my first major step into using geometry nodes in blender (see: https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/index.html) which essentially let you make parameterized geometry in blender. You can see the layout for the geometry nodes:

Essentially my version is a modified version of the stack exchange post here: https://blender.stackexchange.com/questions/311786/how-do-i-create-bricks-in-an-object-with-geometry-nodes

Looks like a lot but really there’s only Two parts (2nd part is repeated 3 times):

This first part just takes whatever geometry I defined (in this case a cube) converts to type of “volume” then makes a bunch of individual points in said volume.

Theses points are then passed into the “second” portion which is essentially this flow repeated a 3 times:

This essentially says “Make a cube of size 0.25m 0.12m 0.065m, copy and paste the cube on each of the points, offset the position of all of the points chosen by my selection array by 0.06m, and set the material of all of the cubes to the brick material”. The incoming “selection” line to the “set Position” node comes from here:

“Index” is set for each cube on creation from “Instance On points” so If I make 200 cubes each cube will be labeled [0 1 2 3 4 5 …. 199]. What the “Floored Modulo” node does is take that index value and return 0 if the value is even or 1 if the value is odd, so that means the “set Position” will only be applied on even indexes, this gives the brick offset on every other row effect.

The bottom two portions here are for the mortar in between the bricks:

These are just smaller bricks that I apply a different material to then shove in between each of the bricks.

Now the problem with this is the number of triangles:

To give a frame of reference the first person view models should be “high poly” and the assault rifle for the game is around 4000 triangles.

So this would cause heavy performance issues if I actually put it in a game. There are solutions for things like this such as LODs (Level of details: https://en.wikipedia.org/wiki/Level_of_detail_(computer_graphics) ) and Unreal’s Nanite (https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-virtualized-geometry-in-unreal-engine) both would essentially dynamically change the number of triangles as you move through the world. However, I’m not trying to make the most photo-realistic things in the world so I think I might try to remake a wall with some normal maps (https://en.wikipedia.org/wiki/Normal_mapping ) instead.

Here’s a spin render of the brick wall:

Give me early 2000s nvidia vibes:

Rain Wilson

I added in rain and some mood lighting. There were also a bunch of other smaller changes but this is where I’m at.

It’s very dark and the rain kinda looks like pills falling so I’ll probably need to do another pass here. I’m happy with the water material I setup here:

Essentially its just a blue matte material with a sphere mask. The sphere mask just tells unreal what to make translucent instead of blue. Going back to my last game post (the one about how compiling materials is horrible). I made a generic rain material instance where I parameterized the rain settings:

Which it’s not crazy impressive but I used to modify the material directly so I’m happy with my personal progress here. I also started making a larger landscape for game and I think I have a better idea of how I want a real level to be shaped.

The rain itself is attached to the character. Which I honestly kinda hate, I could add another ray trace to check if the player is inside, but I’m trying to limit the amount of work I do in the tick functions.

I also moved the whole project up to unreal 5.6 from 5.3

This has a better setup for first person games where it renders the gun ontop of everything else so I don’t need to do as many weird tricks to make the gun not clip through walls.

Example:

Finally I added a zoom with right click:

I’m leaning towards making larger maps so I wanted to add in things to facilitate that. Currently my focus is on making said “Larger Map” which I think might take the majority of my time from the game here. The only thing that might be required to make a map like that work is a vehicle system, which I think shouldn’t be horrible to make as unreal has a bunch of templates for that. The map itself however I can see easily making the game zero fun, so my primary goal is to really just start pumping out levels to see what works.

Loop-da loop

As it says in the title I’m pretty sure this is a beat from a cyberpunk 2077 track but I’m not sure which one….

Otherwise I added a sidechain compressor the way you’re “supposed” to in order to keep what you want emphasized within a bar emphasized.

Essentially: Bass drum hits -> enable compressor (i.e. volume reduction) otherwise no compressor.

I also did a bunch on the game but I’m gonna throw that into a separate post.

How (Not) to use materials in unreal

hell yeah

The borderlands 4 issues with unreal (see: https://www.pcgamer.com/games/fps/borderlands-4s-latest-patch-triggers-a-flurry-of-performance-complaints-but-gearbox-says-new-stuttering-problems-should-resolve-over-time-as-the-shaders-continue-to-compile/ ) made me realize I was doing all of my materials wrong.

Originally the way I pulled in 3d meshes generated a material of each slot in the mesh. So I thougth I was being clever by using material slots to determine colors (so I didn’t have to texture paint), however the issue above made me actual look into things. So I was taking materials for granted as things that were inherent to unreal, however materials themselves are nothing more than giant HLSL files (see https://en.wikipedia.org/wiki/High-Level_Shader_Language). This means that every material I made has to be complied for whatever graphics hardware the user is using (which is the borderlands 4 problem from the article above.) The solution is to use material instances (see https://dev.epicgames.com/documentation/en-us/unreal-engine/creating-and-using-material-instances-in-unreal-engine)! These are parameterized unreal materials which allow for the developer to expose parameters into compiled base materials so we dont have to deal with as much shader compiling.

Sooo from just imports and optimized development had 30-40 plus materials which would come from asset imports, most I could categorize into:

-Painted Metal
-Exposed Metal
-Wood
-Plastic
-Rubber
-Concrete
-Brick
-Glass

So instead of 30-40 compilations for all of the materials I could whiddle things down to 8 compilations to save myself from making the user wait with no colors on their screen. After 30 painstaking minutes I was able to remove all other materials (minus a few specialized ones) to the 8 materials above and instances thereof.


Now things look a little shinier and more visually consistent

The side effect that I wasn’t expecting is that the game is now BLAZING FAST. I went from around 60-70 fps on light load and 40-50 on heavy load on average to pretty much locking to 120fps in light load and 80fps in high load. I had plans to re-write how I handle some of the animation data transferring but I’m thinking now that might not be needed.

I also did some work on the ai so they stayed a bit more mobile. I also added recoil to the bots

Also bots now have a pitch when aiming:

Finally I added in weapon switching via the num keys:

I want to add a half-life style cross selection bar but that will probably happen later with another hud pass.

The gameplay test map has now gone from a placeholder dev map to a low effort source engine map:

The whole level I would argue is pretty bad for gameplay also the only thing I want to add is some rain effects just to get a vibe then I’ll move onto a kind of multi-lane style of map.

WillKolb.com: ZuneHD Compatible

I found my old zune hd and I’ve been messing around with it. I connected to the internet and surprisingly:

The text doesn’t scale properly, which is because why on earth would any front end support 480×272. Makes me wonder if there’s a low res “reader mode” plugin/redirect I could get running.

Also the Zune software works on win11 which is crazy.

Back in the day I had win XP x64 professional and it refused to run on that. I’m guessing compatibility mode has gotten much better in the last 15 years.

Still miss the original interface with the simulated zune 30 buttons on the bottom.

From https://arstechnica.com/gadgets/2006/11/zune/

Touch-ups (also feat. boomstick)

Got the double barreled shotgun in game:

I also added in some tracers to make shooting a bit better:

On the back-end side I re-worked how damage functions, so now there’s falloff for shots: (Note the damage numbers in the corner).

This should make things a bit better in terms of longer range engagements.

I also added more limits to the bot’s ragdoll so the legs won’t just stick around when you shoot them.

Also Send to UE is broken in blender 4.5.2

https://github.com/poly-hammer/BlenderTools/issues/168

Also I’m starting to take that gameplay map and expand it out a bit

Finally I made a fence tool:

So progress all over the place.

Using ML to make a well known and established DSP techniques harder (Part 2)

I got some feedback from my last post which basically said:

1.) “Why didn’t you test against different signals? “

2.) “The signal I chose was too match against was pretty simple, you should do a continuous function”

3.) Why wouldn’t you make a subfunction to detect something like a pulse (containing something like a comms symbol) then apply it to a large context?

Valid points…

Testing different signals

Went through and updated the signal simulator to take in more than one type of signal.

The results aren’t great:

(Again green is detected and red is not detected).

So this that tells me that the AI might be trained around the absence of pure noise rather than the detection of the signal! To fix this I expanded training to take in the signal types I made here (guassian, sine wave, sawtooth wave)/

I started with 20000 varying SNR signals for each type and the results seem good enough:

The edge cases seem to be the weirdest portion where each type seems to be marked as successful? To fix this I added a limit to the shift amount for detection to check just to see if I could get it to be seemingly perfect.

I think the issue is directly related to #2, where I’m not using a continuous function for detection so I’m essentially making the two “non-signals” close to looking like two guassian functions so the neural net detects them as positive.

Continuous functions

To enable this I need to re-write a bunch of the code. I also need to re-work how I’m identifying an “ideal” signal. I’ll jump back on this next week and show off the results, my hope is to essentially feed time data into the neural net and hopefully the neural net can determine frequency content as needed??

More to figure out next week.

“Time is the Enemy” (feat. boombstick)

Now that I’ve closed the gameplay loop I realized there’s really nothing pushing the player along. Right now if I just have “go destroy this thing” the gameplay would get stale very fast. To counter this I wanted to make some kinda timer that would force the player to go out and explore/accomplish their mission. I was thinking about adding something more akin to a base that would get destroyed if you did nothing but that would GREATLY increase the amount of work here (This human npcs, animations, sounds etc.). So I started making this guy instead:

The idea is that the robots are trying to destroy the world or something and they have these devices that are slowly going to rise up then come slamming down. The player will be tasked with destroying these devices before the end of the world!

This also give me the opprotunity to break down the game into phases (like “the first slam” the “second slam”, “The final slam”) to have the map change, difficulty ramp up etc.

Or maybe I’ll have a huge lazer come out the bottom of that middle thing?. In other news:

I resurrected a double barreled shotgun I had half finished earlier and I need to get it in game. This is very rudimentary and basically doesn’t make sense design wise. For instance:

That bottom bit is all one piece, so there’s really now way to open the breach. However currently all of my reload animations are just “hide gun” “wait a second” “Show gun” so for now I think I’m good.

Also I was thinking about adding a ps1 art style in this so I started messing with texture warping (which I honestly read zero about before hand so this isn’t great).

Seems like a good way to give people motion sickness…

Bunch-o-Updates (also “Git outta here”)

Here is the first full(ish) gameplay demo for this game mode (gotta use youtube because of WordPress size limits)

Big things that changed:
I added a bit more to the test gameplay map:

Including a quick fence model:

Also I put lights ontop of all the bots to indicate what team they’re on. Blue=player team, red = enemy team.

I also added hit reactions (animations for when the robot gets shot) to the bots to make things less…robotic:

I also added that red flash. I wanted to do for a while now to get a bit more zelda-y vibes. I also fixed up some problems with the shooting mechanics. Turns out I was making a ray from the center of the screen to the place where the tip of the gun was pointing rather than making a ray from the center of the screen forward, then making a ray from the tip of the gun to that location.

There was also some work done on how bots engage/disengage. I need to do more work there, everything right now is copied in the tick function which is bad. Also the pawn controls everything which is also bad (Controllers are more easily replicated for multiplayer).

Also unreal’s detection of source control stopped working so I gotta do everything manually in git bash. Not the end of the world but still, kinda weird. EX:

I broke something but I’ll punt on this for now. Finally I think I’m going to remove any bot types outside of the gun bot. They’re really unbalanced right now and kinda buggy, I’m thinking I’ll try to diversify the bots based upon different attack types (gun, motor, close range, AOE). I also included unreals crowd avoidance systems (see https://dev.epicgames.com/documentation/en-us/unreal-engine/using-avoidance-with-the-navigation-system-in-unreal-engine) , which all…kinda work?

More polish to do in general though I want to make that test map a city style map to try honing in on what I want the game to look like.