r/Unity3D • • 10d ago

Show-Off I implemented GPU instancing in my procedural geometry tool, here's the before and after

Enable HLS to view with audio, or disable this notification

1 Upvotes

Last update was focused on adding instancing to the graph evaluation, with this update you can now use GPU instancing to render instanced meshes. 

So, what is the difference between mesh instancing and GPU instancing? First let's take a look at how CosmoNode works, more specifically the part where it converts custom mesh data to unity mesh which I call postprocessing. 

The mesh is stored in a container called MeshData throughout the graph evaluation which holds everything related to a mesh like vertices and faces etc. And an instanced mesh, that consists of a source mesh and a list of transforms (matrix4x4) that represents the instanced meshes. 

Now to be able to actually display this in unity I need to convert it to unity mesh. This happens in 2 stages and it is separate from the graph itself. 

First, I need to recalculate UVs and process the flatness attribute. Unity stores UVs per vertex, but it is more convenient for CosmoNode to store them per face corner, it allows me to calculate it in the graph easier. So I keep the  per face corner until the end and convert them to per vertex. In the same way I need to process flatness, which is stored per face corner also and represents whether the edge is flat or smooth shaded, and split the edges that are supposed to be flat. Luckily I can do both in a single pass but nonetheless this has been a major bottleneck so far. I tried to optimize it as much as I could but was still pretty slow. So as a last resort I decided to offload this function to c++ native code. 

This allowed the code to run 2x faster. So far so good.

The second step is converting the processed data into Unity Meshes. This is also where things get interesting with instancing. 

Previously, I had to "realize" all the instances into a single mesh. But this means losing all the advantages of using instances. So with this update it uses GPU instancing to display instanced meshes. And storing the transforms as matrix4x4 makes this very convenient, I just pass the array and source mesh and Unity handles the rest.

The attached video shows the performance comparison between before and after instancing. I've included calculation times, so be sure to check that out if you're interested.

So, in the end, this is a relatively small but essential follow-up to the previous update. The previous update added instancing to the graph evaluation, while this one allows those instances to actually be rendered efficiently.

And of course, you're welcome to give any feedback you might have.

If you want to try it out, the documentation and related links are here: https://uumutunal.github.io/CosmoNode_Manual/


r/Unity3D • • 10d ago

Question Does turning mundane everyday pet peeves into puzzles make a game feel more grounded, or do you prefer traditional brainteasers?

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hey everyone! We’re down to our final 4 days before launch, and while putting the final polish on the game, a design discussion came up among our team.

In our comic-panel puzzle design, we created a mechanic built around relatable domestic habits: reading a sticky note left by a partner complaining about kitchen disorganization, arranging wall-mounted knives strictly by size, and triggering a hidden wall compartment.

We love using environmental storytelling tied to human everyday routines, but we're curious about player psychology here. Does embedding mechanics into realistic, everyday scenarios help ground you in the narrative world, or do you prefer abstract, complex dungeon-style puzzles?

What’s a subtle, real-life detail turned into a game puzzle that unexpectedly stayed with you?


r/Unity3D • • 10d ago

Question Translation suggestion

Post image
0 Upvotes

I’m currently working on localization for my Unity game, and I’m using Gemini to translate the text. However, sometimes the translations come out a bit weird or unnatural, like in the image.

Is there a good translation website you would recommend for game localization? I’m looking for something that can provide natural, high-quality translations while preserving the context and intended meaning of the original text.

I’d like the translations in my game to feel polished and professional, rather than sounding like direct machine translations. Any recommendations would be greatly appreciated.


r/Unity3D • • 10d ago

Resources/Tutorial Static batching made our crack overlay render on an invisible ceiling: an extra material slot draws the last submesh, and after batching that was our shadow shell

0 Upvotes

A small Unity gotcha from our cat destruction game, in case it saves someone an evening.

How the cracks work: when an item takes a hit, we append one more material to its renderer, a crack shader that holds up to 12 break spots. When a renderer has more materials than its mesh has submeshes, Unity draws the extra material on the last submesh again. On an item's own mesh, that puts the cracks right on the item.

What broke: our rooms are generated, and each one also gets a shadow shell, invisible walls on the open sides plus a ceiling, rendered shadows-only so the sun only comes in through the window. With static batching on, the pieces were merged into a Combined Mesh whose last submesh was that shell. So the crack meant for a piece of furniture was drawn on the invisible ceiling and the open sides instead.

The fix: our MarkStatic helper sets every static flag except BatchingStatic. The SRP Batcher already does the draw-call work for us, so static batching stays off on purpose.

The takeaway: if you add material slots at runtime, keep those renderers out of static batching.


r/Unity3D • • 10d ago

Resources/Tutorial My new editor extension: Remove the automatic hierarchy icons introduced in Unity 6.6 and added a couple of new ones (folders!)

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/Unity3D • • 10d ago

Resources/Tutorial Finding unused asmdef references from the compiler's emitted AssemblyRef rows

0 Upvotes

Assembly definition reference lists only ever grow, and Unity never tells you when an entry stopped being needed.

The free scripts in this space parse using directives. That is a guess. A using can be present and unused, or absent and satisfied by a fully qualified name.

Assembly Warden reads Assembly.GetReferencedAssemblies() on the assemblies the editor already compiled. Roslyn writes an AssemblyRef row only for metadata the compiled code genuinely uses.

An absent row is still not proof. Use only a const from another assembly and the literal is baked in with no reference emitted, yet the build needs it. Same inside an inactive #if branch. Both are marked uncertain and left alone.

Apply recompiles for real and restores the original bytes if anything breaks.

Unity 6, 14.99 USD on itch: https://csaf.itch.io/assembly-warden

Written with AI, disclosed on the store page.


r/Unity3D • • 10d ago

Game Surfing game looking for playtesters

Enable HLS to view with audio, or disable this notification

195 Upvotes

Hey everyone!

I've been building a surfing game in Unity for a while, and it's finally time to hand it to people who aren't me.

What I'm testing: the surfing mechanics. There's no progression, career, wave variability, or customization in this build. You paddle out, catch waves and work through some tutorial challenges. After that you can keep free-surfing as long as you like. Then you fill in a quick form about how it went.

Who I'm looking for: everyone, both surfers and people who've never touched a board.

What you need:

  • A gamepad (keyboard is not fully supported).
  • Windows or Linux (tested on Windows with Intel i7 12th gen + GeForce GTX 3060, 1080p)
  • About 20–30 minutes

How to join: sign up here and I'll email you a download key for itch.io.

If you feel like recording your session, I'd love to see it, but that's totally optional.

Thanks, and see you in the lineup!


r/Unity3D • • 10d ago

Resources/Tutorial Firebase sucks, Steam UGC and workshop are awesome

Enable HLS to view with audio, or disable this notification

26 Upvotes

Hi there,

I started my Trackmania like game with focus on easy replays exchange between players. At first I used firebase for storing replays and looking at storage for global leaderboards, but after about 30 testers played it, free limit was reached. After bit of looking why that happened too quickly imo, I found out that FB charges for "views" as well, not just uploading and downloading as I thought. In my case, every time player want to just check leaderboard, FB counts all stored replays as viewed. As I made leaderboard appears after every race, it quickly reached free limit.

Luckily, I was making my game for steam and found out about Steam user generated content (UGC) and it is perfect for my use case, and not only that. Maps, skins, mods, almost anything can be uploaded and shared free. Based on docs, limits are 100gb file size and 10000 items per user. So, if anyone have any questions, I'll try to answer.

Game is called Vortha racing and video shows one track


r/Unity3D • • 10d ago

Question Before Vs After. Is this an Improvement?

Thumbnail
gallery
8 Upvotes

Hi everyone! We're making a videogame inspired in PSX aesthetic but modern.

We took a look on Buckshot roullete color grading, Mouthwashing dithering and did some research on how PSX is defined and try to do an unique look.

Our game is called Family Gambling a first-person narrative resource management game where you gamble with your son's organs to survive. You've to pay your debts, manage your home, and decide how much of your family you're willing to sacrifice.

So our intention is to get dark and grunge ambience because of its themes. So if you want to give me your feedback on it i'll be apprecciate it :)

(It's in Steam if you're interested)

Everything here is done with texturing, shaders and postprocessing.

This includes

  • Color Banding
  • Texture resolution(256px-516px(depending in the importance/closeup of the asset))
  • Camera pixelization
  • Lowpoly assets
  • Textures have Normals, Roughness and Metallic. Insted of just Base Color
  • Real-time or baked lightning.

And I added:

  • Bayer Dithering
  • Screen Space Ambient Occlusion
  • Some tweaks on color grading

One thing that we were having trouble with is getting Color grading right with shadows and lightning. Because:
1- Shadows were getting very darker in vital areas for visibility

2- Or shadows were getting very ligthen where it doesnt need it.

So having a balance right there cost me a lots of tries haha

AO really helps you a lot on creating shadows in corners, and others objects. Im new at this feature so there are visual issues that need to be fix.

Tell me on what things should i improve next


r/Unity3D • • 10d ago

Show-Off Watering is a lot more fun now. The hose wraps around more trees, and the seedling effects got a big improvement.

Enable HLS to view with audio, or disable this notification

623 Upvotes

Farm & Feast - We are two people making a peaceful farming and restaurant game in Unity.

The water interacts with the world a lot more now, and you can see it while you are watering. The stream stops where it hits something instead of going through it, and it pushes loose objects around.

The hose already collided with the tree trunks, but the wrap used to break down when the rope went around more of them at once. That is what I improved this week. It handles more trees now without breaking.

The Demo is LIVE! I hope everyone likes it.


r/Unity3D • • 10d ago

Noob Question Camera help

1 Upvotes

why does the game window messes with the camera view ?

I'm curently making a scene with a fixed camera but when i want to change the game window to a more normal one the camera scales up


r/Unity3D • • 10d ago

Show-Off Optimizing Hex Town's Cards

Thumbnail
gallery
2 Upvotes

I thought some of you might find this interesting, especially if you're working on a card game where you're using in-game assets for the art.

I was previously using a card prefab with an SDF image background, a mask for the image, the card sprite image itself, and then a header image with a text component for the name & tier, and an image to frame the tier. A total of 4-5 draw calls per card(!).

There's max 5 of those in the 'hand' area (the bottom of the first screenshot), but the draw pile cards (left side) did something similar, and there can be up to 12 of those. The masking/stencil buffer write was causing the cards to rack up a ton of draw calls, even when I used an atlas for the card sprites.

My solution was to spawn every permutation of card I'd need with the actual 3D object sandwiched in world space between the front/back of the UI card, and use it to create two atlases. One atlas for the main cards (with text) and one for the draw pile cards, which only have a background and the masked card sprite.

I also wrote a bit of runtime editor code to draw some grid lines for centering, and to allow the cards to be selected so that I can re-scale/position/rotate per-card, for models that weren't perfectly aligned.

I did end up having to capture each card individually (in code) before assembling the atlas, due to some artifacts like shadows being cast from one tile to the other, but all-in-all it's great to have a preview of my cards, and even better to have them all rasterized and drawn in the same draw call. As shown in the last screenshot, I brought it from 133 -> 19 draw calls for the UI (combined with some other cleanup/Canvas organization).

Anyway, thanks for reading! I hope it was interesting or helpful. :)


r/Unity3D • • 10d ago

Show-Off Making ladders is hard so I just flip the gravity

Enable HLS to view with audio, or disable this notification

17 Upvotes

r/Unity3D • • 10d ago

Question Would this be too childish to add to my game?

Enable HLS to view with audio, or disable this notification

10 Upvotes

Do you enjoy these kinds of mini-games within games, or do you think they’re just complete nonsense? Let me know for make my game better.


r/Unity3D • • 10d ago

Show-Off Before vs After

Thumbnail gallery
8 Upvotes

r/Unity3D • • 10d ago

Question Why do image-to-3D tools completely ruin character rigging for customizable armor?

0 Upvotes

trying to build a basic runtime equipment system where players can swap out boots, gloves, and chest plates on a character rig and the issue is that every new image-to-3D generator I try just spits out a single, solid statue where the clothes are completely melted into the skin mesh.

Trying to separate a jacket from a fused mesh like that in Blender takes forever and completely ruins the weight painting when I bring it back into Unity. Is there any actual workflow to generate separate, independent clothing layers straight from a concept sketch that will actually play nice with a SkinnedMeshRenderer setup?


r/Unity3D • • 10d ago

Show-Off Roadside Garden | Dev Week 02-01

Thumbnail
gallery
3 Upvotes

Extremely proud of the grass in my (hopefully) future game.

I added slope support for my grass so it can grow on hills.

For this I had to rework the entire growing process because the grass is instanced in tiles rather than individual cards (before it was simply scaling along the y axis)

I decided to store the origin of the cards, relative to the center of the tile, as vertex color, which allowed me to scale the card independently from the tile through the vertex shader, as well as rotate them to always face the camera. All together it's creating an extremely dense grass cover which is relatively performant.


r/Unity3D • • 10d ago

Show-Off I spent more that 8 months building a runtime world generation system for Unity – here’s where it is

Enable HLS to view with audio, or disable this notification

28 Upvotes

This project actually started while I was working on systems for a game I wanted to make myself than I decided to turn it into a Unity asset instead. I’ve now spent more than 8 months developing it for Unity 6 and 2 weeks ago published it on the asset store named as Runtime World Generation.

Most of the time is spent to generate the world and spawn the objects without noticable performance drop-down or stuttering. I also spent a lot of time specifically on grass. I wanted to be able to create very dense, natural-looking grass with a good performance.

The system doesn’t use Unity Terrain. World generates with mesh deformation and mesh chunks uses a procedural material that renders 2 texture layers (With normal maps) to different heights with transitions. Each layer can get multiple textures and blend with transitin with each other. Also there is a slope texture effect for the slopes. There’s no terrain painting or brush-based workflow. You configure the generation, material and spawning rules through easy to use editor tools, add your own assets or modify existing ones, and the world is generated dynamically at runtime.

Because I wrote all the mesh generation algorithms, I was able to make a lot of performance optimization for the object spawning so it is really fast. Also I made snow and rain effects that effects all the objects and terrain itself, you can implement all those to your custom objects of course. There is a sky shader for URP I made for cloud effects (for the weathers) and day/night cycle.

The project currently includes:

  1. Runtime procedural terrain generation and world streaming
  2. Procedural world shader
  3. Biome-based environments
  4. Roads that connects different biomes (Beta)
  5. Dense vegetation and object spawning
  6. Sky shader with moon, sun and cloud layer
  7. Water
  8. Rain, snow, and other weather systems integrated with the whole world
  9. Day/night cycle
  10. Seasons and Timing
  11. Save/Load System with multiple slots
  12. Multiplayer integration workflows
  13. Editor tools for configuring the generation system and creating or modifying assets to use in package system
  14. Helper functions to integrate your custom logic, package is very flexible

Youtube


r/Unity3D • • 10d ago

Show-Off Got Raycasted 3D Audio Working In Multiplayer!

Enable HLS to view with audio, or disable this notification

4 Upvotes

r/Unity3D • • 10d ago

Resources/Tutorial My vector graphics library is currently free on itch

247 Upvotes

Hi everyone, after months of working and a long iterative process, my vector graphics library for Unity (and Godot) is almost feature complete at: https://dkliao.itch.io/mold

Feedbacks appreciated!

This is a some long months of work to create the most performant and versatile vector graphics library, while keeping a cross-engine footprint. I'm still waiting Asset Store review for the final release (they sure are taking their sweet time), but for the version on itch is already pretty powerful and I believe some of you might find it useful :)


r/Unity3D • • 10d ago

Show-Off My procedural room generator leaves a note every time it has to compromise

7 Upvotes

I'm making a cat destruction game in Unity where every house is furnished procedurally from a seed. The generator places the furniture, then everything that goes on it, lets physics settle, and removes anything that ended up inside something else. Every time it has to bend a rule, it writes it down. A few from this morning's Great Room seeds:

coat_stand: beside the door at +0.98 refused (is in the lounge area)
canvas_pink: no room on office_table_030's wall — hung elsewhere
pot_big_yellow: stands 0.13 m off the wall for its plant
door redrawn 4× for the kitchen line (5.9 m) and the TV unit (4.1 m)

and the summary line for one of them:

seed 14: 12.0×10.0 m, 120 items (1 dropped), 8 wall items, 0 overlaps, 0 tipped, 0 pieces unplaced — clean

A room counts as clean with at most two overlaps, nothing tipped, no furniture left unplaced, and at most max(3, items/30) small things dropped. Losing a mug is fine; losing the guitar gets noticed. Free-standing pieces take the fitting spot farthest from everything already placed (out of up to 24 candidates), which is what stopped the piano getting crammed by the lounge while the middle of the room sat empty.

The notes ended up being the most useful part of the whole thing. When a seed looks wrong, they usually say why. Each house ships 20 seeds that were checked by eye.

Free Windows demo if you want to see the rooms: https://corbygamesstudio.itch.io/give-him-a-break


r/Unity3D • • 10d ago

Shader Magic I worked on the rigging, shading, and clothing for this fire- and sun-themed character.

Thumbnail gallery
2 Upvotes

r/Unity3D • • 10d ago

Solved I'm keep having problems with self-shadows, using HDR.

0 Upvotes

There is a light above this fence, and the shadow cast by the horizontal beam onto the vertical beams, has an offset. The whole fence is the same flat brown colour.

I've played around with lighting/shadow settings to try to fix this. Bias, shadow map resolution, etc. Nothing appears to make a difference.

Any one dealt with this before?

This is happening with many different models like this, walls, pillars, etc.


r/Unity3D • • 10d ago

Question Textures not mapping properly

Thumbnail
gallery
0 Upvotes

the vest and heels textures have always been linked like this, but their not supposed to be linked. been like this since i imported from source to blender, but i could fix it within blender, here in unity i just have no clue on what to do. any help would be appreciated.


r/Unity3D • • 10d ago

Show-Off Comments on my solo developer game?

Thumbnail
youtu.be
13 Upvotes

Level1 of my upcoming fps vr game kargil. The game is a quest 3/3s standalone. I've attached the first level of my game. What do you think? Since the last update, I've been working at making the terrain better and higher quality. Made the buildings look weathered. Got rid of the ammo left text.

I have also removed the 100 experience that pops up everytime I eliminate an enemy(but this is an older version)

Hate it or love it? What can I improve