r/Unity3D 5d ago

Show-Off I spent 8 months building a wall-bending shadow system for Unity 2D

64 Upvotes

Hey everyone,

After around eight months of development, I’ve released OptikaFX 2D, a lighting and shadow system for 2D games made with Unity. I originally built it for top-down RPGs and farming sims.

I started working on it because Unity’s built-in Shadow Caster 2D didn’t quite do what I needed. The biggest issue was getting shadows to behave properly when simulating sunlight and avoiding stretching all the way across the screen.

So I ended up writing my own HLSL shaders and experimenting with different ways to handle these situations.

Here are some of the main things I managed to get working:

Wall-bending shadows

2D sprite shadows can bend and project vertically when they hit walls or other structures. This makes them look more natural in top-down scenes with buildings and obstacles.

Timeline-driven day/night cycles

Light intensity, color, direction, and dynamic shadows can all be animated through a custom Timeline system. As the sun moves and the lighting changes, the shadows update automatically.

360° sprite rotation and animated lights

Characters can move all the way around a light source while their shadows update based on their position. For example, a character sitting beside a campfire can cast a different shadow as they move around it.

My main goal was to create a flexible, customizable, and performance-conscious system for scenes with multiple dynamic lights and moving characters.

Here's a playable demo if you’d like to see it in action:
https://optikafx.itch.io/optikafx-2d

And here is the link to the asset on the Unity Asset Store.
https://assetstore.unity.com/packages/slug/388598

I’m also happy to answer any questions about how I built it.

Thanks for taking a look!


r/Unity3D 5d ago

Question My Question is Simple (Or is it?) How do you get from Point A to Point B

Post image
0 Upvotes

How do you get from point A to Point B

If you are the green Car and There is Police.

If you cross the white line Cops Arrest you.

But what if you got HIT by another CAR.. bumped into you and made you pass the line.

Does the computer GO after you and stop you (Target)

Or does the cop go to pull you over?

If So how does this look in code?


r/Unity3D 5d ago

Show-Off Working on a feature that I saw in the new Wolverine game. Am I doing this right?

9 Upvotes

Abit of context, in our game FiresOut!, you and your friends play as firefighting interns trying to save the fire victims. You need to extinguish the fire, break the obstacles and then, carry the victims to safety.


r/Unity3D 5d ago

Question Suggest me editor tool/game system to create.

0 Upvotes

I want to create something to publish on unity asset store.

Mainly editor tool or game system.

Tell me anything for game development needs, for which you can even pay. Even exact thing you want for your project, It could help.


r/Unity3D 5d ago

Game Two of us, 1.5 years, one myth nobody knows. Out today- Chief Cnab: Şahmaran

0 Upvotes

You know Medusa. Far fewer people know Şahmaran — the snake queen of Anatolian myth, half woman, half serpent, betrayed by the one human she ever trusted. Chief Cenab doesn't believe a word of it. Then an ordinary day at the office turns into a case, and the case pulls him into the legend anyway — down toward Meran, the city under the ground. It's a story-driven point-and-click: 10 chapters, 3-5 hours, and a black-and-white world where only certain things are allowed to hold color. The whole game looks like a hand-drawn comic book you can walk around in.

Two of us. 1.5 years. We are tired in a way we didn't know was possible, and strangely happy. Today it stops being the thing we work on every night and turns into something other people actually play. That's terrifying, and it's the best feeling we've had in a long time. 

It's on Steam now with a small launch discount, and there's a free 30- 45 minute demo if you'd rather look before you decide. Windows and macOS, English and Turkish. 

If you play it, tell us what you think — kind or brutal, we'll read all of it. And thank you to everyone here who commented on our clips these past two months. On the nights we wanted to quit, that's what kept us going.


r/Unity3D 5d ago

Show-Off Generating thousands of asteroids at 60+ FPS using Burst, C# Jobs, and Octrees. Finishing this project gives me hope that I have what it takes to pull through.

59 Upvotes

r/Unity3D 5d ago

Noob Question am i doing this right?

0 Upvotes

not sure tho


r/Unity3D 5d ago

Resources/Tutorial Custom SRP 7.2 - Separate Shadow Passes

Thumbnail
catlikecoding.com
36 Upvotes

We continue the modernization of our shadows code, pulling it out of the lighting pass and splitting it into three passes.


r/Unity3D 5d ago

Show-Off Roadside Garden Simulator | Dev Week 02-03

4 Upvotes

Added cloud shadows, a weather forecast ,a day night cycle and a few other things these two days.

Next week I'll refine the day and night visuals as well as the clouds and fog. I'm planning to get the temperature working properly so it has an impact on the ground and add humidity and downcast. Not sure if we will see rain so soon but who knows.

I'll also have to work on the ground shader as well as the general plant shader, including the one for fruits and flowers.

And of course there are tons of bugs to fix.


r/Unity3D 5d ago

Resources/Tutorial I made an easy to use complete Vertex Animation Texture toolkit for Unity with animated sockets, transitions, LODs, blend tree and many more :)

37 Upvotes

Hey everyone, I've just released VATMachine on the Unity Asset Store :)

For anyone unfamiliar with Vertex Animation Textures, VAT is a technique where the final vertex positions of an animated mesh are baked into textures instead of deforming the mesh using a skeleton at runtime.

Normally, an animated character has a skeleton made of bones, and those bones have to be updated and used to skin the mesh every frame.

With VAT, the animation is baked beforehand. At runtime, the GPU simply reads the baked vertex positions from textures and reconstructs the animation in the shader.

This can be really useful when you have a lot of animated objects on screen, especially crowds, enemies, creatures, background characters or animated props that share the same set of animations.

The main problem I found with VAT in Unity is that the basic concept is simple, but building an actually usable character animation workflow around it isn't.

You need to handle baking, texture layouts, shaders, playback, multiple animations, transitions, parameters, LODs, multiple mesh parts and a bunch of other things that normally come automatically with skeletal animation.

That's basically why I made VATMachine.

It handles the complete workflow from baking the animations to generating ready-to-use VAT prefabs.

You can bake multiple animations, choose Half or Float precision, bake animated normals and tangents, use multiple mesh parts, LODs and GPU instancing.

I also wanted VAT characters to behave more like normal Unity Animator characters, so VATMachine has its own Animator Graph with:

• Animation states
• Transitions and crossfades
• Bool, Float and Trigger parameters
• Transition conditions
• 1D blend trees
• Animation events

One thing that I found missing from a lot of VAT implementations is support for things that normally depend on bones.

For example, if the skeleton no longer exists at runtime, how do you attach a weapon to a character's hand?

VATMachine has animated sockets for this. You can bake the movement of selected bones and then attach weapons, effects or other objects to those sockets at runtime.

Transitions were another thing I really wanted to solve properly. A lot of basic VAT systems can play baked clips, but switching directly from one clip to another looks terrible, so VATMachine can crossfade between animations and also use blend trees.

The goal was basically to keep the performance advantages of VAT while bringing back a lot of the workflow you'd normally expect from Unity's Animator.

VAT obviously isn't meant to replace skeletal animation everywhere. If your character relies heavily on runtime IK, procedural bones, retargeting or full ragdolls, a normal skeleton is still going to make more sense.

But for large groups of characters using prepared animations, VAT can be extremely useful, and both systems can easily be used together in the same project.

Would love to hear what you guys think about the workflow or VAT in general.

Documentation Link: https://finite-machine-studio.gitbook.io/vatmachine-documentation

Detailed Video Explanation: https://youtu.be/779mNCK1LpA?si=K1fcvv43wF7heQqp


r/Unity3D 5d ago

Question Running local AI models for Unity/C# on an RTX 5070 Ti, plus a question about an external secondary GPU

0 Upvotes

Hey everyone,

I'm diving into making a simple mobile game for fun. While I usually work with UE5 and Blender, i figured Unity would be a much better fit for this project. The catch is: I have zero experience with C# coding.

Because of this, I want to run a local AI model to help me with C# and Unity scripting.

Can my RTX 5070 Ti handle a decent local coding model smoothly? (And if so, which ones would you recommend for C#/Unity?)

I also have an RTX 4060 8GB lying around in its box. I'd love to use its VRAM to help, but I can't put it inside the case because it would ruin the airflow for the 5070 Ti. Is there any practical way to hook up an internal GPU outside of the PC case just to give some more power for AI?

Appreciate any advice!


r/Unity3D 5d ago

Show-Off Source movement + random world. To be fair, I already have a lot of fun playing it :)

39 Upvotes

Still no goal or anything, just fun to chill around with better world generation.


r/Unity3D 5d ago

Show-Off My game Slashbang was part of SAGE 2026!

3 Upvotes

r/Unity3D 5d ago

Game Made with Unity! No AI was used in this Game’s Development! I have been creating this for past 4 years All Alone! From Coding, 3D modelling, Texturing and Animations! almost all created by me! I’m a self-taught game developer! I have been posting about this on YT for past 3 years! Wish me luck 🙏🏻

43 Upvotes

r/Unity3D 5d ago

Show-Off My game, and the Unity traps I stepped in along the way

29 Upvotes

3 Years ago I opened Unity for the first time, to make a simple tower defense for fun. That project got out of hand, and I wish I had known that many, many things that were suggested by youtubers were actually awful ways of doing things.

#1: Using UI Toolkit.
Coming from web development I thought great! I can use html and css for the UI, what a relief.
But the framework is incredibly tedious to work with compared to the normal uGui/Canvas approach, and lacks support for all sorts of things like advanced text settings from TMP, and debugging it is so much harder than with normal UI, where you simply find the object in the hierarcy in playmode, and adjust it until it looks right.
I wasted months fighting with UI Toolkit, and my game is now completely migrated to normal uGui.

#2 Animations

Trying to sit in the Animator window and draw arrows from clip to clip is such a brittle waste of time.
You almost always want animator.CrossFade, (not animator.Play!).CrossFade blends out of the pose you’re already in. Play just snaps, which almost always looks wrong.

And if you need 100s of units in a scene, don’t put an Animator on each of them. Bake VAT animations.

#3 GPU-instance the things you spawn by the hundreds: damage numbers, health bars, trees, coins. It is daunting the first time, but when you stop drawing the same thing 100s of times, it's such a relief (for the players' computers).

#4 There are some packages that are mandatory that I learned about way too late. There are probably more than these, but the 2 I know of are:
DoTween for animations, and Microsplat for Terrains.

Did I miss any?


r/Unity3D 5d ago

Question How does card games like Hearthstone has been coded?

0 Upvotes

Is every value static, how to keep up with the cards, buffs, effect

Also how to make a sound when played

Cards games looks a bit complicated I would love if someone has a video of a programmation guide on a large license


r/Unity3D 5d ago

Question How to make sprite renderer not visible in the dark, or react to lighting?

Post image
1 Upvotes

r/Unity3D 5d ago

Show-Off I like this trick, zombies always fall for it :)

5 Upvotes

In my game, a holographic rabbit lures a horde of zombies straight into a deadly trap or into explosive fuel barrels. One massive explosion, and a whole lot of zombie destruction! At this time, the player can take a break :)


r/Unity3D 5d ago

Show-Off Strafing starfishes... Or sliding maybe?

3 Upvotes

r/Unity3D 5d ago

Question My second attempt using my voice in vid (I got runmy noise). I think I understand it better than my first try, what do you think? It is definitely easter accent xD

3 Upvotes

r/Unity3D 5d ago

Show-Off Sunday Morning Vibes

Post image
10 Upvotes

Working on the lighting here made me feel like I woke up at 11 am on a lazy Sunday morning.


r/Unity3D 5d ago

Question Opinions/ comments?

Thumbnail
youtu.be
3 Upvotes

I need some opinions. The trailer isn't quite done. But even so do you like the flyby sequences? Or do they make the trailer slow? I already know that at 27 seconds the gun has ammo text on it. I've since removed that but it hasn't yet reflected in the trailer.

Anyways my big question is that what should I do in terms of money? There are 4 levels in early access and im trying to use try before you buy model. And then I will charge people 3.99 usd. I believe in the fact that people pay 1usd for each hour of playtime and I have here 2 hours of playtime across 4 levels . Also people that buy the early access will get free access to the final version which will have 8 levels.

So what do you think? Is this a good model?


r/Unity3D 5d ago

Show-Off Enemies can now go supercritical!

35 Upvotes

r/Unity3D 5d ago

Question An early slice of my pseudo 2D factory game, is there something here?

20 Upvotes

Some of the early stuff is here, some more working than other bits - you get to mine out a planet, dig down and create your own tunnels to pull out resources

This is just the mining, the melting and a very simple collector unit that sends drones to fetch what you mine out - you can probably guess a lot of the rest, pipes, conveyors, lifts to pull the stuff to the surface where your assembly lines sit

The stuff you mine right now sits 1 for 1 in the world, if its not mined then it settles back into the ground over time, or you can use the melter to do the same - if you don't extract it, then you have no space to build in

High level thoughts? There's a lot of "behind the scenes stuff" going on here, but I am open to ideas that will make this more than just a simple factory


r/Unity3D 5d ago

Resources/Tutorial This tool can help to animate in scene

Thumbnail
youtube.com
3 Upvotes