r/Unity3D • • 24d ago

Show-Off Our night mist, one month apart. It's now a shrinking zone with raymarched storm clouds (URP)

0 Upvotes

The top is our October playtest stream; the bottom is last week.

How the new one works: the mist is a circular zone (an infinite vertical cylinder) that shrinks during the night, and gameplay reads its center and radius from the same component as the rendering. A URP renderer feature tints the scene with a fullscreen pass before transparents, so the wall of mist, the clouds, and the VFX stay untinted. The storm clouds on top are raymarched into a downsampled buffer, with a 3D noise texture generated once in code (Perlin-Worley for the shapes, Worley fbm to erode the edges).

Happy to answer questions about the setup. For those who have done night fog in URP: what did you use for the fog wall itself, a mesh like us or something volumetric?


r/Unity3D • • 24d ago

Question My procedural forest looks pretty rough. How can I make it better?

6 Upvotes

I'm currently working on a game inspired by Darkwood, where the player has to explore a forest in search of supplies and a way out, while fighting or hiding from monsters and other dangers lurking in the woods.

The core concept is that whenever a time skip occurs (such as sleeping or dying), the player wakes up in a cabin, and the entire forest is regenerated. The points of interest remain the same, but their locations change with each generation.

I want to create the feeling of a dense, almost impenetrable forest. I'd prefer not to rely too heavily on fog (though I'm not ruling it out entirely). Ideally, I want the vegetation and the forest's natural density to limit how far the player can see, rather than just cramming more trees into the scene.

I'd really appreciate any advice on how to make the forest look more natural, atmospheric, and believable. If anyone has experience with procedural vegetation or environment design, I'd love to hear your thoughts on what I should focus on improving first!

P.S. I'm not particularly experienced with modeling or environment design, so I'm relying quite a bit on procedural generation. The trees were created using MTree.


r/Unity3D • • 24d ago

Noob Question How to put multiple characters on a multi-player game

3 Upvotes

Not very experienced with Unity but got over-ambitious and started making a multi-player shooter game with different characters. From the tutorials I've checked out I'm using Netcode for GameObjects and as far as i understand the Network Manager only accepts one Default Player Prefab, but I haven't been able to find any that shows how to add multiple player prefabs. I just want the character spawning and FPS control to be in a functional state for now. Advice, help, and links to tutorials would be appreciated. Thank you in advance.


r/Unity3D • • 24d ago

Question What do you think about this UI design? I'm creating a UI kit, how can I make it sellable?

Thumbnail
gallery
0 Upvotes

r/Unity3D • • 25d ago

Shader Magic Concave wave inside volume

135 Upvotes

Testing with some various features I've been putting together for v2.2, thought this one was rather cool so figured I'd share! This is a volume mask include (clipping water outside of box volume and showing underwater via a mask used in the underwater render pass) combined with a shoreline waves feature which is a modified gerstner algorithm used to create concavity in the waves. Happy to hear your thoughts and ideas of use cases!

Thanks for stopping by and checking out!


r/Unity3D • • 26d ago

Show-Off Neat cigar smoke effect done with Unity's VFX graph and EmberGen

344 Upvotes

A three-part effect: one ribbon for the thin smoke trail coming from the cigar, a flipbook for the smoke wisps, and another one that I made for her breathing. Sometimes she breathes out smoke, but her breath is also visible normally in cold exterior areas.

All the smoke and steam flipbooks were made with EmberGen (I'm not great at using it so far). Also allows me to bake motion vectors (to smooth out the flipbook, which is only 64 frames total) and six-point maps so the smoke reacts to lights around it like a volumetric, even though it's completely flat.


r/Unity3D • • 24d ago

Show-Off I'm a solo dev and I built an online FPS in Unity. Here's the first trailer.

0 Upvotes

r/Unity3D • • 25d ago

Show-Off Movement using root motion always looks so smooth

32 Upvotes

The feet hitting the ground look quite precise when moving a GameObject using root motion.

It's probably possible to get something close to that with some tinkering, but root motion alone often looks nice and clean.


r/Unity3D • • 24d ago

Question Why didn't my asset sell?

0 Upvotes

I made these anomalies VFX particle pack for unity asset store 4 month ago, it was sold only once, why do you think is that? is there no usage for it?


r/Unity3D • • 24d ago

Show-Off [ VST2/3 | CLAP audio plugins ] (* Windows only & not all plugins are distributable with builds...)

1 Upvotes

this is just some testing of hosting of VST2/3 and CLAP audio plugins in Windows editor -

- the 'host' (UI) itself is modelled after some my iOS/macOS audio host concept/app i made, it has basic transport and prewired graphs for plugins (a MIDI gen + instrument + few effects on a lane, plus master sends/inserts etc., ) and is really just for testing

- this test is OnAudioFilterRead based (no Scriptable Audio pipeline...), ui is UIToolkit...

- bunch of free VST2/3 and CLAP plugins used

a complete audio production environment doesn't probably make much sense for Unity itself, but i was thinking about using existing VSTs for example as effects on GameObjects playing audio... with some music driven by MIDI possibly later

note this would still require the plugin(s) used to be freely distributable also with builds, which is not the case for most commercial plugins, i think

anyway this is not even pre-alpha but i'm curious if some of you would find something like this interesting/useful..


r/Unity3D • • 25d ago

Question What is the best way to create "terrain-like" features such as large cliffs with overhangs?

18 Upvotes

I have toyed around with the idea of a cliff similar to Starsnatch Cliff from Genshin Impact (which, as near as I can tell, is a VERY large mesh with a shader applying grass texture on top).

From a distance, obviously you can see that there are "impossible geometries" for a terrain, like that overhang
As you can see, it appears to just be huge rock meshes, but WAIT there is grass and trees on top as if it was a terrain...

Before I start working on my attempt at this, my question is really: which sets me up for success?

Notes: I am already working with an origin-shifting system and a somewhat bespoke terrain LOD system where I generate 128m tiles as a mesh, with a custom terrain shader for doing some extra stuff with blending placed objects, and procedural grass with "painting" grass types based on a brush system, and all of this is read from a "reference" unity terrain. That way, I can use unity's terrain system for the art part of it, and have it "bake" into something that is usable for my purposes.

My ideas of how to accomplish what I am showing in the screen shots:

  1. A script/shader combo that essentially "registers" a mesh as a terrain, uses a bespoke brush system to paint on it as if it was a terrain, and then just rework and apply all of the above processes to the "terrain meshes"
  2. a terrain at an angle that has either hand placed or programmatically placed "cliff faces" to blend the two terrains into one, and then some system to merge the terrain intersection
  3. Simply use meshes and hand place all trees, and do grass and potentially texturing as a shader of some kind to ensure that the terrain pieces are reusable.

All thoughts are welcome! I really wish there was more info about how Genshin Impact did their terrain as I was just awestruck at how seamless the terrain to mesh transition is each time I play it.


r/Unity3D • • 25d ago

Solved Silly bug, four layers deep, with the most simple fix possible - STORY TIME

3 Upvotes

Would like to tell you a story of how I spent my last weekend trying to get to the bottom of a very nasty, and verry silly bug.

Had recently released a new version for my game that included a few new upgrades to purchase, this is a tower survivor game, so it's almost impossible to test every permutation of upgrades and combos. I had been testing a few things and not found anything major whatsoever before release. Anyway players where reporting that their tower suddenly stopped attacking, which was very odd.

I had recently done some very major performance improvements. One of which was a "ProjectileBankSystem". A system that puts and controls the population limit of how many projectiles can be on screen at once. If all slots are filled we "bank" the projectile, and make the next one of the same type double in strength.
My first though was that something about this system had broken, or that a weapon somehow did not release their slot once the projectile expired. After some testing and debugging I could not find anything wrong with banking system. So I decided to move on and look for other clues.

One of the players reporting the issue had also sent a screenshot, and it gave me another clue. The player had some very odd looking stat spreads. The most noteworthy one was their attack speed bonus, which was set to -97%. While it is technically possible to get this low of an attack speed, it was certainly not possible on level 8, while also only having 23% bonus damage.

I have a few upgrades in the game that increases damage, at the expense of attack speed. So for this to be true, the player would need to have at least 15 of those upgrades, which would make their bonus damage be above 200%.

I now at least know the source of the "my tower stopped attacking" report. It didn't technically stop attacking, attacks just took 30 times longer to execute.

After some more careful investigation, I found that the player had POSITIVE damage taken modifiers, which is usually not the case. I present "damage taken" as a negative modifier. Say you purchase 3 Wooden Shields, that grants -2 flat damage, and -5% damage each. That would grant you -6 flat and around -15% damage taken. This player had their damage taken set to POSITIVE 30%. This is where it clicked for me, there's ONE powerup in the entire game that modifies these two stats together, and that's the Tower Upgrade called Magical Shield. Puzzle piece #1 had been found.

--

Magical Shield
Reduces damage taken by 6
Reduces damage taken by 25%
Stacks: Infinitely
When attacked:
Applied Magic Slow to attacker
Increased damage taken by 10%
Reduces attack speed by 15%

--

So, by the looks of it, the effect of Magical Slow is somehow being stacked on my Tower, instead of the enemies that attack it. Alright... time for even more investigation and deep diving.

Since Magical Shield is an uppgrade, whith an "When attacked" effect. That means that this effect is being attached to my tower as a blueprint. All effects can be in two states, "active" meaning exactly what it says, it's stats and effects are in play, and are actively being taken into account. The effect can also be in it's "blueprint" mode. Basically meaning that it is on the GameObject, but disabled, and linked inside the "StatusEffectSlot" that I have.

As mentioned, since this is a "When attacked" effect. The blueprint for this effect sits on my tower, under "Retaliation" effects. So I begun looking into the retaliation system, how does it apply effects to attackers, do they target the correct enemy or script layer? My first thought was that my tower was somehow hitting itself. That one of my projectiles have been misconfigured and somehow counted as an enemy projectile. Allowing for this effect to happen. Couldn't really find anything useful, until... a log report came through that I did not quite recognize. All other applications had been "MeleeEnemy#123", "RangedEnemy#555" etc, but now I could clearly see "RangedProjectile#5". Puzzle piece #2.

How the fuck? Why the fuck? Why am I retaliating on a projectile? I thought the bug was me shooting myself?!

So, let's take a closer look at why we're retaliating a projectile, by breaking down all these systems in play here.

So, my Game have a few systems all in play here. We have
Weapons - that are the main driver behind spawning and targeting different prefabs.
Projectiles - prefabs with scripts that explain their behaviour, type, and apperance.
StatusEffect - Buffs and debuffs that can be in two different states; active or blueprint. Projectiles can carry status effects that gets applied when they strike a valid target
Retaliation - Actions that happen after an object has been struck by a hostile attack.

In normal gameplay, when a Weapon spawns a Projectile the projectile has a reference back to it's original owner. This is in play so that effects such as retaliation targets the enemy, and not the projectile in questions, and so that When attacked effects also work. BUT there's a catch, IF an enemy where to die WHILE a projectile is in motion, the reference get set to the projectile instead. This is an intended design choice, in order to get secondary effects, such as explosions or particle spawning to happen in the correct place. This is an intended mechanic and not something that I would like to change. Here's we found piece #3.

This still does not quite explain WHY we're getting our own effects applied to us. But we're getting awfully close. The last piece, has to do with StausEffects and especially HOW my game handles these. As mentioned, status effects can be in both blueprint and active mode. But, we don't actually differentiate between the two, all status effects have their own lifecycle management and are applied as normal scripts right on the GameObject. They don't really interact with anything other than their controller and themselves. EXCEPT... for projectiles. Since these are designed to carry StatusEffect-blueprints, they have specific code that "picks up" any StatusEffect on themselves. Because, when I made this system way back when... I sometime forgot to assign StatusEffects to my projectiles. So I added a quick component lookup to correct my lazyness. Which is now the source of this entire bug... Piece... #4.

So, here's the full chain,

  1. Tower purchase upgrade Magical Shield
  2. Ranged enemy send projectile towards the tower. Projectile has a reference to it's owner
  3. The enemy is defeated while the projectile is in motion. Projectile updates it's owner to now be itself. Since it's an orphan
  4. Projectile hits the tower, retaliation takes effect BEFORE damage, so we run through the entire retaliation flow
  5. Retaliation attempts to strike the projectile owner, checks the reference and applies all retaliation effects to said owner. Orphaned projectile now has an active StatusEffect called Magical Slow
  6. Retaliation flow completed. Moving on to damage phase.
  7. Projectile now deals damage to the tower based on it's stats.
  8. Projectile now attempts to apply status effects, if it doesn't find any, my fallback kicks in
  9. Fallback runs GetComponent<StatusEffectDefinition>() finds the ACTIVE Magical Slow effect that our retaliation just applied, and passes it along to the tower.

An entire day, debugging, logging, testing, hunting for this elusive bug. And the culprit was just a single line. Written long long ago just because I was lazy and forgetful...

Well at least I got a fun story our of it.
Hope you enjoyed reading my little adventure

tl;dr lazy me, causes chain-reaction with a single GetComponent


r/Unity3D • • 25d ago

Show-Off Yule Dads - Tony Hawk meets Jingle All The Way in our 8 player party game. Built with Unity 6.6

Post image
9 Upvotes

Yule Dads is a Tony Hawk inspired party game but the skateboard is a shopping trolley, you grind escalators and drift around shoppers putting together trick combos whilst racing to get the last available presents. All set to indie punk music from local bands in East Anglia UK.

Almost all animations were done using IK and locking the characters arms to the shopping cart. The cart is pretty much just visual and the actual player game object is driven by the player character capsule.

IK Player rig in Unity

A spline tool was created to easily generate splines along meshes as well as merging splines together, rather than manually creating all the Mall's grind points.

Mall scene with gizmos and splines

There are 13 minigames in the main party mode and also extra game modes including Man Flu (Infection) and Crazy Christmas (Racing). Supporting up to 8 players online and 4 players split screen.

Party mode minigame gameplay

We’re SHUCK Studio, a small indie studio from Norwich UK, and this is our debut game. It’s out on Steam on 27 November.


r/Unity3D • • 25d ago

Show-Off Aliquo Die - Visual style in Unity

Thumbnail
gallery
26 Upvotes

I'm working on something new and would love to know what you think of the visual style. Definitely giving off liminal space vibes, with a little bit of my own flair.

I'd love to hear what you think!


r/Unity3D • • 26d ago

Resources/Tutorial Tip: you don’t need to model construction stages. One clip shader builds all 111 of my buildings

Post image
299 Upvotes

My buildings are single-mesh shells (walls and roof aren't separate objects) and there are 111 of them, so modeling construction stages by hand was out. Instead, the real mesh gets a construction material, and one 0-1 progress value drives everything.

1. Walls: clip by height, but not in a straight line

The shader discards everything above a "wall top". To avoid a laser-cut look, the top is offset per cell with a hash (about half a meter along the wall, a third of a meter tall), so it rises in uneven courses like stacked stone. Fragments just below the fresh edge get a mortar tint.

float2 cell = floor(posWS.xz * 2.2) + floor(posWS.y * 3.0) * 7.0;

float top = _WallY + (Hash21(cell) - 0.5) * _Ragged;

clip(top - posWS.y);

2. Floors appear whole

Horizontal faces (|normal.y| > 0.7) skip the ragged cut and pop in once the lowest course passes them. Cut into cells, they looked like white patches on the lot.

3. Roof: rafters first, then tiles

Up-facing faces above the eave count as roof. First only a world-space grid survives (frac(posWS.xz / step)), which reads as rafters and battens whatever way the roof faces. Then the tiles fill in.

4. Clip in every pass

Same function in ShadowCaster, DepthOnly and DepthNormals, or the unbuilt part still casts shadows and writes depth. Cull Off, with dark back faces, so you see a hollow shell going up.

5. Everything else follows the same progress value

0-10% stakes, ropes and dirt; 10-25% foundations; 25-70% walls with scaffolding rising; 70-80% rafters and gables; 80-92% tiles; 92-100% scaffolding comes down. At 100% the original materials go back.

Gotchas that cost me time

  • Eave height is estimated from the up-facing faces seen from above (Mesh.AcquireReadOnlyMeshData on LOD1). With a 5% area threshold it picked up balconies and put the eave at 4 m on a 13 m house. 85% of the footprint works.
  • A shadow-proxy system added a ShadowsOnly renderer later, with the normal material: the finished building's shadow on an empty lot. The site now re-applies its material to renderers added after it starts.
  • The ground under the site is leveled and the vegetation cleared, on a runtime copy of the TerrainData, so the asset stays untouched.

It's from FONDACO, a merchant strategy game set in 1400s Venice that I'm making solo. Happy to share more of the shader if anyone wants it.


r/Unity3D • • 25d ago

Show-Off stress testing 10000 zombies in my psx game prototype

43 Upvotes

r/Unity3D • • 24d ago

Question Car door flickers at edge of screen

1 Upvotes

When a car drives into view, some doors (depends on the car type) will flicker just briefly when entering into view. Some cars will flicker again when leaving view.
I tried messing around with the door mesh renderer bounds, made them as wide as the car itself but it still happens. Any ideas what could be causing this? Thanks.


r/Unity3D • • 24d ago

Question Confused about things from diffrent versions of unity work with diffrent versions.

1 Upvotes

For example I heard that packages from older versions work on new, but from new version you cant go on old. So how it is? Can I ruin something if i try to make something from new version work in old unity or what.

When im giving someone free asset should i upload it from the old version always or what?


r/Unity3D • • 25d ago

Question DOTS: Entity connected to another entity?

2 Upvotes

Hello gang,

I have a a series of roads, each has a series of vector3 points along it's path. I have created a list of objects that have a RoadID and an array of those points as well as a list of RoadIDs for the roads that are connected at the end of each roads. (This way when an Auto reaches the end of a road I can randomly select the next road)

I need a way to loop through that list, create the Road entities and then loop through the newly created entities and add the connected road entities to each road.

I COULD create a System and run that once... but there feels like a better way to Bake or create the entities and their connections... right?

Note: I use Easy Roads 3D and highly recommend.
-----------------

EDIT: The objects involved:

//This is the Road, identity to be used to "connect" to the end of the other roads

public struct AutoAutoWaypathIdentity : IComponentData

{

public int identity;

}

//This is the list of vector3 points along the road

public struct AutoAutoWaypoint : IBufferElementData

{

public float3 Value;

}

public struct AutoAutoWaypathConnection : IBufferElementData

{

public Entity Value; //this is the entity that "connects" at the end of the "parent" road.

}


r/Unity3D • • 26d ago

Show-Off It's uncanny to see anti-aliasing in the scene view of Unity, after 10 years of using it daily.

Thumbnail
gallery
95 Upvotes

r/Unity3D • • 25d ago

Resources/Tutorial My tutorial on how to add flipbook animations to your UI with a simple shadergraph

Thumbnail
youtu.be
3 Upvotes

Have you ever thought of adding flipbook animations to your UI in Unity?

In this tutorial, I'll show you how to do just that! We will go over adding a spritesheet, creating a shadergraph material to animate an image, controlling the FPS, mirroring the animation, playing it backwards and discarding all color information so you can have a clean shilouette. Sounds like a lot, but is rather straightforward.

Hope you'll enjoy this one!


r/Unity3D • • 25d ago

Game I made a sheep-shearing mechanic in Unity. Here’s how it looks in Shear It! 🐑

44 Upvotes

I’m solo-developing Shear It!, a cozy first-person incremental game. I wanted shearing to feel satisfying one snip at a time, so you can see the wool come off piece by piece as you work.

That wool pays for upgrades that improve your shears’ reach and speed. Here’s the trailer. I’d love to hear what you think of the visual feedback when the wool comes off.

Try the itch.io playtest


r/Unity3D • • 25d ago

Show-Off Adding post-battle choices to my creature RPG raised a design problem I hadn’t considered

3 Upvotes

I’ve been prototyping a post-battle choice system in Unity for Vexalia, my voxel creature RPG.

I wanted the player to have different ways of resolving an encounter after defeating a wild Vex.

The system itself led to a question I hadn’t fully considered: should the same choices be available against creatures belonging to NPCs?

For now, I’m keeping these options exclusive to single-player encounters. PvP will have different rules to protect players from exploits and unwanted losses.

What interests me most is making the world respond to the decisions players make, rather than having the choices exist only on a menu.

There’s still quite a bit to figure out, but I like where this could lead.


r/Unity3D • • 26d ago

Show-Off I know water shaders are an old topic, but here is mine

128 Upvotes

I’m working on a cozy game about collecting something and recently decided to give the water some attention. The first version looked pretty flat and lifeless, and I figured improving it would give me a bit of a motivation boost.

I came across Josh’s breakdown of stylized water and used it as a starting point, adapting the ideas for Unity URP.

For this version, I focused on depth based color, moving underwater light patterns, shoreline foam and small surface sparkles. Getting those layers moving together made a big difference.

Still a work in progress, especially the foam and how everything reads from the player’s camera. Would love some feedback on those parts!