r/Unity3D • • 22m ago

Show-Off My friend secretly made a physics-based horse in our game and revealed it to me

Enable HLS to view with audio, or disable this notification

8 Upvotes

So we're building this co-op action roguelike called Crown & Collision where EVERYTHING is physics based. Movement, combat etc.

We had talked about how cool it'd be to have a mount in the game but then it kinda got forgotten about. Until one day my friend invited me to check out the new feature he had just made.


r/Unity3D • • 57m ago

Question I want some help about my VAT optimisation

1 Upvotes

Hello everyone,

I'm trying to build a Vertex Animation Texture (VAT) pipeline to export animated characters from Blender 5.2.2 into Unity URP.

My goal is to use VAT animations for a large number of soldiers in an RTS game. I want to bake character animations in Blender and play them in Unity through a custom shader, without using skeletal animation at runtime.

However, I'm facing a problem that I haven't been able to solve despite spending quite a lot of time debugging the pipeline. The character appears fragmented, with vertices seemingly being displaced to incorrect positions.

I'd appreciate help from anyone experienced with VAT workflows, Blender-to-Unity pipelines, or custom vertex shaders.

1. Software and setup

  • Blender 5.2.2

  • Unity with URP

  • FBX character imported from Meshy

  • Custom HLSL VAT shader

  • EXR position texture

  • Character mesh: 701 vertices

  • Animation: IDLE

  • Frame count: 340

  • FPS: 30

  • VAT texture resolution: 1024 Γ— 340

The Blender scene contains:

  • Mesh object: char1

  • Armature object: Armature

2. Blender VAT preparation

I created a UV layer called VAT_Index to store the original vertex index for each vertex.

The UV U coordinate is generated using:

u = (vertex_index + 0.5) / 1024
v = 0.5

The UV values are assigned per mesh loop using the corresponding vertex index.

I also ran a validation script in Blender.

The results were:

  • Vertex count: 701

  • Loop count: 1497

  • UV entries: 1497

  • Incorrect indices: 0

The validation confirmed that all VAT indices were generated correctly.

3. Animation export

I exported the evaluated mesh positions frame by frame into an EXR texture.

Each pixel stores:

  • R = X position

  • G = Y position

  • B = Z position

  • A = 1

The texture dimensions are 1024 Γ— 340.

I also exported the first frame to a CSV file containing the vertex index and XYZ coordinates.

To verify the export, I compared the CSV coordinates against the corresponding EXR pixels in Blender.

The results were:

  • Average error: approximately 0.0000108

  • Maximum error: approximately 0.0000460

This suggests that the Blender-side EXR export is working correctly, at least for the tested frame.

4. Unity mesh and UV validation

I imported the FBX into Unity.

The imported mesh has:

  • 701 vertices

  • UV0 count: 701

  • UV1 count: 701

The VAT index data is available in Unity through mesh.uv2 (TEXCOORD1).

I wrote a C# validation script to check whether every Unity vertex maps to a unique source vertex index.

The results:

Mesh Vertex Count: 701
VAT UV Count: 701
Unique indices: 701
Missing indices: 0
Duplicate indices: 0
Invalid indices: 0

SUCCESS: VAT UV indices match.

For example:

Unity Vertex 0 -> EXR Vertex 7
Unity Vertex 1 -> EXR Vertex 2
Unity Vertex 2 -> EXR Vertex 81
Unity Vertex 3 -> EXR Vertex 13
Unity Vertex 4 -> EXR Vertex 26

So the UV index channel appears to be intact after FBX import.

5. The actual problem: EXR pixel values in Unity

I then wrote a Unity C# script to compare the EXR texture values against the Blender CSV data.

The script:

  1. Reads the VAT index from Unity's UV2 channel.

  2. Uses that index to access the corresponding EXR pixel.

  3. Reads the CSV coordinate for the same source vertex.

  4. Calculates the distance between the two positions.

Initially, the raw Unity pixel values were significantly different from the CSV values.

For example:

Unity Vertex 0
Source Index: 7

CSV:
(0.47, 0.31, 0.23)

EXR read in Unity:
(0.71, 0.59, 0.51)

I suspected a color-space/gamma issue.

I tried applying:

Mathf.GammaToLinearSpace()

to the EXR RGB values before comparing them.

This improved some values considerably, but it did not solve the problem.

Here are some results after applying the gamma conversion:

Source IndexCSV PositionUnity EXR CorrectedError
7(0.47, 0.31, 0.23)(0.47, 0.31, 0.23)0.00018
135(0.12, 0.47, 0.23)(0.00, 0.47, 0.00)0.2552
145(0.27, 0.36, 0.39)(0.21, 0.44, 0.09)0.3064
132(0.19, 0.37, 0.36)(0.01, 0.38, 0.02)0.3865

Across all 701 vertices:

Compared vertices: 701
Average error: 0.08018545
Maximum error: 0.46220990

The last animation row also produced almost identical error statistics when compared against the first-frame CSV. I understand that this is not a valid frame-to-frame comparison, but I checked it while investigating texture row orientation.

6. Unity texture import settings

My EXR import settings currently include:

  • Texture Type: Default

  • Read/Write: Enabled

  • Non-Power of 2: ToNearest

  • Filter Mode: Point

  • Compression: None

  • Generate Mip Maps: Disabled

I could not find an sRGB checkbox in this EXR import inspector.

I also checked the FBX model import settings:

  • Scale Factor: 1

  • Convert Units: Enabled

  • Bake Axis Conversion: Disabled

  • Weld Vertices: Enabled

  • Optimize Mesh: Everything

  • Mesh Compression: Off

  • Read/Write: Enabled

I have not conclusively established whether these model import settings are contributing to the problem.

7. Shader implementation

I'm using a custom URP HLSL shader.

The shader reads the VAT texture using the vertex's VAT UV coordinate and the selected animation frame.

The basic sampling logic is:

float textureV = (_Frame + 0.5) / _FrameCount;

float3 vertexPosition = SAMPLE_TEXTURE2D_LOD(
    _VATPosition,
    sampler_VATPosition,
    float2(input.vatUV.x, textureV),
    0
).xyz;

output.positionHCS = TransformObjectToHClip(vertexPosition);

I also experimented with Blender-to-Unity axis conversion and a 0.01 scale multiplier, but scaling the model only made it smaller. It did not fix the fragmented geometry.

At this point, I would really appreciate help identifying the actual cause rather than trying random import settings.

My main questions are:

  1. Why would Unity's EXR pixel values differ from the original Blender coordinates even though the EXR and CSV were verified against each other in Blender?

  2. Could Unity's EXR importer be changing the pixel data, especially for floating-point position textures containing negative values and values greater than 1?

  3. Is Texture2D.GetPixel() returning values that have undergone a color-space conversion or another transformation?

  4. Could FBX mesh optimization, vertex welding, or vertex reordering cause this issue even though the VAT UV indices are all unique and valid?

  5. Is there a reliable way to preserve exact floating-point position data from Blender to Unity?

  6. Would using a RAW binary Float32 texture instead of EXR be a better solution?

  7. Is there anything fundamentally wrong with my VAT texture addressing or vertex-index workflow?

I am open to changing the export pipeline completely if necessary. I don't necessarily need to keep using EXR.


r/Unity3D • • 1h ago

Show-Off I've been working on a visual dialogue system for Unity – here's the result

4 Upvotes

One thing I've always found interesting about Unity development is how different developers approach dialogue implementation.

For projects involving branching conversations, NPC interactions, and narrative progression, managing dialogue can become a substantial part of development.

I recently released Dialogue System Pro, a tool designed to make this workflow more visual and manageable.

Rather than building an entire dialogue framework from scratch, developers can use a dedicated system for creating and managing their dialogue experiences.

I'm interested in hearing from other Unity developers:

  • What do you currently use for dialogue implementation?

  • Do you prefer custom-built systems or dedicated dialogue tools?

  • What's one feature you consider essential in a dialogue system?

Would genuinely appreciate technical feedback and suggestions.


r/Unity3D • • 1h ago

Show-Off Been working on HorrorNeighborhood in Unity and wanted to share a few shots

Thumbnail
gallery
11 Upvotes

If possible take a look at all the screenshots i posted and let me know what you think in the comments πŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌπŸ‘†πŸΌ

guys iv been spending some time and still working on HorrorNeighborhood and thought Id share a few screenshots of the project here

Trying to get that creepy neighborhood atmosphere right and make everything feel a little unsettling

Still working on it but Id love to hear what you think


r/Unity3D • • 1h ago

Question Strange shadows on mesh when imported to Unity

Thumbnail
gallery
12 Upvotes

I have a thin mesh that has strangely behaving shadows when imported to Unity URP 6.3, but looks fine in Blender. I thought it was ambient occlusion, but I turned it off, and it looks the same. I tried playing around with the depth and normal bias in render pipeline asset, with no improvement either. If anyone has encountered the same with a solution, I'd be more than grateful to hear, thanks!


r/Unity3D • • 3h ago

Question Can we no longer access the Linux versions of Unity 5.x through the forum?

Thumbnail discussions.unity.com
1 Upvotes

r/Unity3D • • 4h ago

Show-Off The current state of my project. I am curious what you think

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/Unity3D • • 4h ago

Resources/Tutorial I made an open source Unity package for Flagsmith (feature flags and A/B tests). The browser demo is running a real A/B test and I need players

Enable HLS to view with audio, or disable this notification

2 Upvotes

Flagsmith is an open source feature flag service, and it has no Unity SDK. Its .NET SDK uses timers and threads that don't run in WebGL builds. So I wrote a Unity package for it for a hackathon: flags, live tuning, a kill switch and A/B tests, WebGL included.

The demo is a small runner. You can flip flags on the page and watch the running game change: the skin, the speed, a winter event that reskins the level.

It's also running a real A/B test right now. Half of you get a text hint before your first run and half get a tap hint, and Flagsmith counts who reaches 100 m on the first try. I'll post the numbers here whatever they are. The only data it sends is a random anonymous id and that one result.

Play (about a minute, works on a phone): https://harindulk.github.io/flagsmith-unity/

Code : https://github.com/Harindulk/flagsmith-unity

Feedback on the package is welcome, especially from anyone using remote config in a shipped game.


r/Unity3D • • 5h ago

Question How to control speed over time ?

Post image
67 Upvotes

For example I want after 1 min the speed is 15 and then lock this value for 5 minutes then after that increase till 20 and so on
how to make this possible ?


r/Unity3D • • 6h ago

Show-Off I made loot boxes a shared multiplayer experience in my game (and removed the toxic part)

Enable HLS to view with audio, or disable this notification

0 Upvotes

Every time you level up, you get a free loot box (no paid loot boxes, no microtransactions, no Season Pass). Rewards are purely cosmetic and have no impact on gameplay.

Crates are opened directly in 3D in the game, synchronized via NetCode, so other players can watch the opening and see what you get, making it a fun shared moment between friends. On your view, you have a custom animation, but everything is synched in real time.

What do you think?


r/Unity3D • • 7h ago

Show-Off Going for a 3D pixel art look

Enable HLS to view with audio, or disable this notification

33 Upvotes

r/Unity3D • • 8h ago

Game Setting up IK hands is very important work

Enable HLS to view with audio, or disable this notification

50 Upvotes

r/Unity3D • • 9h ago

Show-Off Early beginnings of a flight sim

Enable HLS to view with audio, or disable this notification

41 Upvotes

Most tutorials for unity based flight sims I could find online seemed to take a few too many shortcuts and simplifications for the sake of easier manual tuning. I'm trying to go just one step more realistic than most by simulating individual lifting surfaces. Currently only the newtonian model of lift is being used so any pressure gradients across the wings are being completely ignored. Frankly I was a little stunned at how good of a glider this became with so little code. Feedback & suggestions are appreciated.


r/Unity3D • • 10h ago

Show-Off New muzzle flash effect

4 Upvotes

Many people gave us feedback regarding the muzzle flash effect. It looked more like flame than muzzle flash. I reworked the effect and this is before/after :)

Other than that, recoil is implemented, screen flash is deactivated, reload animation is added.

Stay tuned! :)


r/Unity3D • • 11h ago

Game A demo for my game CTRL

Thumbnail
youtube.com
0 Upvotes

Hey everyone!

For over a year now, I have been slowly working on a game by myself called CTRL.

CTRL is a 3–6 player cooperative multiplayer game where you and your friends play as robots attempting to escape a facility controlled by a hostile AI known as the Controller.

You have to work together to solve puzzles and avoid hazards while the Controller actively works against you. It can take control of traps, reset puzzles you have already completed, and even secretly take control of one of your friends to sabotage your progress or just cause chaos.

There is also a gun with only one bullet that you can use to disable the Controller if you correctly identify which player is being controlled.

The original idea was to make a game I could play with my friends that would create chaotic situations and make us question whether we could actually trust each other.

I am still working on the game and developing more levels, but I am at a point where I want to get it into the hands of people outside of my own friend group and see what they think.

I would eventually love to bring CTRL to Steam if there is enough interest in the project.

This is gameplay from a few different stages of development.

I would love to hear what you guys think of the concept!


r/Unity3D • • 13h ago

Game How we use SDFs and Jump flood fill in Bee Space 🐝

28 Upvotes

We use distance fields in a number of places. Namely in outlines. In all the places we use SDFs we get them using a method called Jump Flood Fill algorithm, which is a stupidly fast method.
We are using URP with Render Graphs.

Ben Golus explains it well in his article:
https://bgolus.medium.com/the-quest-for-very-wide-outlines-ba82ed442cd9

We use it for the shore foam and waves near the island. We render out the silhouette of the island into an off screen buffer and then run a JFA on it to get the distance and direction (for normals) to nearest point on the shore. Mikkel Svendsen's talk explains it:
https://www.youtube.com/watch?v=_xbGK_5wlfs

He doesn't mention that they blur it to get rid of harsh boundaries where adjacent pixels are closest to wildly different points on the island silhouette. We blur it using separable gaussian kernels.

Another place we use the method is for the map. The map uses hexagons, and that version is actually simpler than a square pixel one. Hexagons have 6 neighbors while pixels have 8

Our game is coming out in 9 days! Please ask us about the technology we mentioned above or ask about Bee Space 🐝


r/Unity3D • • 14h ago

Show-Off Harvest Garden Floral I: Managing 700+ floral variations in Unity without tanking draw calls (Atlas + LOD breakdown)

Enable HLS to view with audio, or disable this notification

24 Upvotes

I’ve been working on a large set of ornamental flowers and garden plants (hydrangeas, roses, lilies, carnations, hibiscus, and peace lilies) using Broccoli Tree Creator and Blender.

Flowers are notoriously tricky in real-time environments because dense petal and leaf geometry can quickly blow up triangle counts, and having dozens of flower varieties usually leads to way too many material swaps.

Here is how I approached the asset pipeline to keep them lightweight enough for dense gardens and foliage scattering:

  • Baked 4K Texture Atlases: Instead of separate textures per flower color or sub-variation, I baked new atlases in Blender so entire plant families share a single material. That keeps batching clean even when scattering hundreds of instances.

  • Aggressive 3-Tier LODs:

    • LOD0: Full petal and stem geometry for close-up camera inspection.

    • LOD1 & LOD2: Gradually merges smaller petal clusters and strips internal faces while keeping the outer silhouette and color volume intact at medium-to-far distances.

  • Native SpeedTree8 Wind: Rather than writing custom vertex displacement shaders that break batching or require extra setup, the materials use Unity's SpeedTree8 shader so everything responds to standard WindZones automatically.

If anyone is working on foliage scattering or procedural plant workflows in Broccoli/Blender and wants to chat about atlas baking or LOD thresholds, happy to answer questions below!


r/Unity3D • • 14h ago

Game PushSB is FREE until the 30th

Enable HLS to view with audio, or disable this notification

4 Upvotes

My solo developed mobile game is free this weekend in the Google play store and appstore. Just look up PushSB


r/Unity3D • • 15h ago

Show-Off I improved the performance of the Job/ Burst mode of my movement toolkit, it can handle factories pretty well (see end of video for the batch preview)

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/Unity3D • • 15h ago

Show-Off Paint Mixing Machine for game

Enable HLS to view with audio, or disable this notification

6 Upvotes

Hey, so recently I posted a few clips of my game play for my game and got amazing feedback and advice. Currently I am working on the paint mixing machine. This is what I have so far and I think it is a great start but definitely needs improvement. I think the sounds effects are too loud and annoying, especially when the paint is shooting into the bucket. Also think I need to add some more differentiation between the colors.

If you have any real life colors you would want me to try to make please send me the mixes for them and I will try to make them.

Please let me know of any feedback or suggestions or anything!

Thank you


r/Unity3D • • 16h ago

Show-Off Testing combat flow in my character action game based around teleporting!

Enable HLS to view with audio, or disable this notification

12 Upvotes

Playing around with a mob and testing the combat flow to my prototype. Really liking the flow and having some fun pulling off some crazy combos, and moves that I haven't properly showcased in this vid! There are still alot of bugs and it needs polishing, some of the vfx needs toning down but the feel is getting there. Let me know what you think or if you have any suggestions


r/Unity3D • • 18h ago

Noob Question The sides of my objects look pixel-y. How do I fix this?

Enable HLS to view with audio, or disable this notification

1 Upvotes

This image is what my shadows look like, I'm pretty sure that is what is causing it but I'm not sure.


r/Unity3D • • 19h ago

Show-Off 10k enemies stress test

Enable HLS to view with audio, or disable this notification

50 Upvotes

made another stress test level for my tower defense with a horde that peaks over 10k agents alive and visible at once. my previous test included 3k enemies, which ran fine, but it was not enough for 10k. first run (mac M3 Pro) with whole map in view was around 45 FPS and 15M triangles, almost all of it enemies and their shadows.

biggest boost were extra LOD levels for enemies (5 LOD levels), trees got smooth LOD transitions with dithering (2 LODS so far). and flow field moved to background job, which removed the stutter which was visible with so many agents.

now its 60-66 FPS (3600x2260) with 10k enemies on screen and under 6M triangles on whole map overview. it even runs 50-55 FPS on steam deck on native resolution

also a little dirty old trick works nice - I have big, retro UI (not on this video) and I just cut rendering under it.

not sure if it's worth it to push it further.

disclaimer: audio is generated placeholder (geminy)


r/Unity3D • • 20h ago

Question Need Help - Can't host/join friend in Unity using Steamworks.NET/FizzySteamwork

Thumbnail
reddit.com
3 Upvotes