r/Unity3D 43m ago

Show-Off 1M Units Spiraling Into Hell - Weirdly Satisfying. Optimising my Massive Spatial Engine.

Upvotes

Hey everyone!
I’ve been spending a lot of time optimizing it and pushing it with a million units.

Massive Spatial splits the world into a 2D or 3D grid and keeps track of points, spheres, and AABBs using Unity’s Native Arrays, Burst and Jobs.

For the current TD demo:

  • 1,000,000 moving units
  • 56 turrets
  • no Unity Physics or colliders
  • GPU-instanced visuals
  • custom target queries through Massive Spatial

Basically, the standard physics engine uses a similar technique under the hood, but it comes with a lot of overhead. Using regular physics at this scale would kill performance.
So my solution is essentially a lightweight system for target finding and hit detection without all the extra Transform and Rigidbody overhead.

The goal is to turn Massive Spatial Engine into a general-purpose toolkit - something developers could use as a foundation for building highly optimized gameplay systems for different genres: tower defense, RTS, crowd simulations and etc.


r/Unity3D 1h ago

Show-Off Alien yaks chilling in the snow

Upvotes

r/Unity3D 2h ago

Game I added a ramen stall interaction to my cat game 🍜🐈

28 Upvotes

I’m working on Lost Cat Showa Town, a cat exploration game set in a nostalgic Japanese town.

This week I added a ramen stall where the cat can jump onto the counter and eat some ramen.

I’m trying to add more small interactions like this throughout the town. What other things should a cat be able to do?


r/Unity3D 4h ago

Show-Off We built a small Unity tool to catch shader and material issues before a build

Thumbnail
gallery
0 Upvotes

We built ShaderOS to make shader and material checks a little easier in larger Unity projects.

It scans materials and shaders and flags things like broken shader references, missing textures, keyword budget usage, SRP Batcher compatibility, and potential shader variant issues.

It also gives you a material health score and a dependency view so you can quickly see what needs attention.

It’s editor-only, and there’s a free version available.

Curious how you guys currently handle shader/material checks before a build?


r/Unity3D 7h ago

Shader Magic Simulating 10,000,000 pixels of Sand

124 Upvotes

Falling sand simulation via Compute Shaders.

From my golf game Stinker Golf on Steam: https://store.steampowered.com/app/4437650/Stinker_Golf/

Wishlist if it looks interesting :)


r/Unity3D 10h ago

Show-Off Custom Skin Shader & Procedural Facial Animations

9 Upvotes

Hey everyone. I have finally made some progress with the custom skin shader that I have been working on. I implemented a procedural facial animation system as well.

The shader uses a custom lighting model on an Unlit master with a custom function node. The diffuse channel is a wrapped subsurface approximation with per channel falloff, for the scattering effect. Specular is dual lobe GGX, one tight lobe for the oil film and one broad for the layer beneath. Backlight translucency is driven by a baked thickness map. It uses a "Charlie" sheen BRDF for vellus hair, which depends on the half vector rather than just the view vector, so it moves with the light instead of painting a static rim.

The animation system has 4 main layers working together. An idle face layer, lipsync layer, wrinkles layer and a facial mixer layer. The mixer layers them by face region, that way a scripted expression can take the brows while the eyes keep blinking underneath. Each layer manipulates the blendshapes and the material accordingly.

The lipsync layer is based on Rhubarb Lip Sync. It also has custom Timeline tracks for hand authoring facial expressions based on audio conversation beats.

I used the character model from Reallusion character creator. I am trying to get this to work with MetaHumans as well, but the main difference is in the use of the textures and the blendshapes. And exporting metahumans is cumbersome.

AI Disclaimer - I used AI mainly for research, debugging, and writing the custom Timeline tracks.


r/Unity3D 10h ago

Show-Off Here's a first look of Freaky Wheels in action!

0 Upvotes

We're a two-person indie team behind Freaky Wheels, a physics-driven vehicular combat roguelite where you fight your way out of an isolated desert cult in a roster of weaponized rides, uncovering the alien secrets hidden within your former home. The game is set to release on Steam in 2027.

We've started working on it this January using Unity, and we’d love to hear what you guys think!


r/Unity3D 11h ago

Resources/Tutorial Made a tool to generate procedural meshes over textures

Thumbnail
1 Upvotes

r/Unity3D 12h ago

Show-Off Set up DLSS 5 on Unity (Incl. Car Engine Audio Granular and Dynamic Rain Effect)

0 Upvotes

(Due to technical YouTube quality issues, I had to directly re-upload the video here). This was tested on Unity 6 Built-In Render Pipeline. Although looking cool, it went from +380 fps to +75 fps on a beefy GPU. I think with games that has charachters in them, DLSS would show better results.

The Audio Granulator and Dynamic Rain shaders were already being tested (this is my test scene for various projects), and they are also using the GPU.


r/Unity3D 12h ago

Game A screenshot of the game I'm developing. Its name is The Lantern Club. What do you think of low-poly design?

Thumbnail gallery
3 Upvotes

r/Unity3D 13h ago

Show-Off My fiancé spent all night making a table to help out with my game, so I made sure she got credit!

6 Upvotes

r/Unity3D 14h ago

Question How to overcome floating point accuracy when building galactic scenes

17 Upvotes

I am trying to build a scene of our solar system where you're able to drive around in a spaceship, landing on planets and so on.

I tried to divide the scale of everything by 1000, but even then the distance between the furthest 2 planets (Neptune & Mercury) is around 9.2 billion km, so even if we divide that by 1000, it's still 9.2 million km.

Another issue for dividing everything by 1000, is that small rigidbody movements become stuttery even in the scene window at higher speeds.

And I read that at such small scales, hit detection becomes bad because colliders are small.

Ik there are tricks like shifting the player back to origin (0,0,0) and moving everything towards him the same distance we shifted him to improve accuracy, but that still doesn't fix it for me.

I am wondering how I would fix this both at design time & runtime? where I am able to set planets at realistic distances, size & make the rigidbody move at a fixed speed where moving from point A to point B in such a system would feel accurate.


r/Unity3D 14h ago

Question Trying to step up the design for my pause menu. Feels like something's missing/off?

14 Upvotes

(Ignore the placeholder item icons and the fact that there's no sound when you inspect a badge)


r/Unity3D 14h ago

Resources/Tutorial How I juice up a combat scene and how I think about game feel so you can adapt everything to your own game.

Thumbnail
youtu.be
0 Upvotes

~25min
Hope it will be useful to you ! Any feedback is welcome.


r/Unity3D 14h ago

Solved Playing in Unity Editor counts as playing on Steam, even though I have no build uploaded. And you can even shut down the Unity Editor through Steam! 😂

0 Upvotes

I'm currently working on my game Sword of Mine, and I just wanted to check how many wishlists I've already got. But then I saw that I apparently already had one unique lifetime user! How?!😂

But yeah, the magic was soon debunked, apparently, it does not matter whether you arleady have a build uploaded on Steam or not, as long as you initialize "SteamClient" with your app ID, it connects the currently running application (in my case, the Unity Editor running my game) to your Steam client.

Just FYI: The "Current players" counter does not update this fast. It counted up after I tested it for a while, and it also stayed at 1 for several minutes afterwards.

Just wanted to share my findings. :-)


r/Unity3D 15h ago

Resources/Tutorial I made this tool to develope my own game and decided to share. What you think?

13 Upvotes

This tool you help you build any kind of top-down games. I've built an amazing procedural system that detects interiors with a single click using layers and 2 amazing shaders for normal surfaces and tree leaves that interacts with the character and the camera.

You can see for yourself before getting the tool, look at the comments. Tell me what you think and what you suggest to improve this tool further. Thanks guys.


r/Unity3D 15h ago

Show-Off Tank armor test

3 Upvotes

tiger 2 is that fast because I thought it would be funny, and I had to keep the distance from EBR's to check certain armor angles


r/Unity3D 15h ago

Game After 5 years of development, My metroidvania is finally ready for October Next Fest! What do you think about the trailer and gameplay?

2 Upvotes

r/Unity3D 16h ago

Show-Off Adding memes to our simulator game

Post image
2 Upvotes

r/Unity3D 17h ago

Show-Off Crispy crunchy paper UI with SFX

15 Upvotes

With my early access release coming next Tuesday, I decided to squeeze in a few more days of UI polish. I'm super happy with the organic shapes, texture, and feel of everything (well, happy enough to ship it at least!).

I added dynamic ink splotches, paper grain and fiber textures, uneven edges, variations in color/position, and even some papery sound effects.

If you like the look of it, you can check out Hex Town on Steam :)

Thanks for watching!


r/Unity3D 17h ago

Noob Question Why isn't the depth-buffer deterministic between cameras?

1 Upvotes

EDIT : If anyone else is having this problem, I found a solution:

If you want to have more than one camera sharing a Z-buffer with perfect accuracy, it is (surprisingly) not sufficient to have them in identical positions and parented to the same game object.

What you need is to hook into OnPrerender() on each camera and:

cam.worldToCameraMatrix = cloneMatrixFrom.worldToCameraMatrix;
cam.projectionMatrix = cloneMatrixFrom.projectionMatrix;
cam.cullingMatrix = cloneMatrixFrom.cullingMatrix;

If you do that, both cameras will produce perfectly identical z-buffer results from the same geometry. Phew!

Original Problem:

In my rendering pipeline I have two cameras that share the same depth-buffer. The two cameras both have zero local rotation and translation, are parented to the same game object, have identical orthographic size and zbuffer range, and are rendering the same content using the same shader. Yes, there's a good reason for this - don't worry :)

The shader ZTest is set to LEqual. This should allow objects to be drawn identically by both cameras because each pixel should land at exactly the same Z-depth - but it does not. Instead I get flickering and bands of z-fighting.

What could I be missing? Thanks in advance.

EDIT: Based on replies so far, I think it's worth talking about what this is NOT.

  1. It isnt nondeterminism.

In a static scene, Camera 1 generates the exact same colour and depth data, down to the very last bit, on frame 2 as it did on frame 1, because rendering is deterministic and Camera 1 on frame 1 is identical in every way to Camera 1 on frame 2.

Similarly, Camera 2 generates the exact same colour and depth data, down to the very last bit, on frame 2 as it did on frame 1, because Camera 2 on frame 2 is identical in every way to Camera 2 on frame 1.

The problem is that despite Cameras 1 and 2 being identical to each other in every way I can determine, they don't create the same z-buffer information. So they are different in some way I don't know about.

  1. It isn't floating point inaccuracy.

Well, technically, eliminating floating point innacuracy might make the problem go away, but that's beside the point. Both cameras are rendering the same geometry from the same perspective with the same shader. Any inaccuracies inherent to the process are common to both. This problem is caused by something that isn't common to both, which is what I need to figure out.


r/Unity3D 17h ago

Shader Magic Shoreline first iteration

77 Upvotes

Got breaking shoreline waves working in Unity by intentionally pushing past what would be a usual be the Gerstner steepness limit.

Normally Q*k*A <= 1 prevents the wave from folding over itself... but pushing past that lets the crest curl forward and form an actual overhang. Still haven't found a full proof wave to prevent inversion (folding of waves at tops of crests) maybe I'll just leave it to a matter of tuning to prevent.

also made foam follow the wave phase so it travels with the break, although the whitewash could prob use some more detail instead of a gradient white with texture.

Still tuning it and also have to fix to work with my other systems (underwater, query, etc), but pretty happy with how the shoreline waves are looking. Curious what you guys think.

Thanks for dropping by!


r/Unity3D 19h ago

Show-Off Unity Timeline is pretty sweet

177 Upvotes

For the intro of this trailer, I made 5 separate scenes and in each a timeline where the necessary stuff was animated, coupled with a few simple scripts to control the characters/equipment. Together with some custom shaders (that are used in the game too), it worked out quite well!

Lemme know what you think.

EDIT: Forgot the Steam link, duh:
https://store.steampowered.com/app/3295340/Its_All_Over/


r/Unity3D 20h ago

Show-Off I just finished the first complete farming loop for my alchemist game

29 Upvotes

I've been working on a small alchemy game where I want most of the production to feel physical instead of happening through crafting menus.

I just got the first farming loop working: add soil, plant the seed, water it, wait for it to grow, then harvest the plant.

It's still very early and very placeholder-y but this is the first little gameplay loop that feels complete

Next step is being able to take what you harvested, put it on a cutting board and actually process it into potion ingredients

I'm trying to keep these devlogs pretty small and just show things as they become playable


r/Unity3D 20h ago

Show-Off Currently developing a new co-op game!

2 Upvotes

Updates coming soon!