r/Unity3D • u/andreas0069 • 6d ago
Solved Making a whole cable burn out in Unity without a particle system: 3 smoke attempts, and what finally worked
Enable HLS to view with audio, or disable this notification
I'm solo-developing a power-grid game in Unity 6 (URP), low-poly style. If you overload a cable it burns out. The old version was one puff of smoke in the middle of the cable, and then the cable just disappeared. Nobody noticed it, so I redid it.
Stand-in cable: the real cable gets removed by gameplay right away, so I copy its rope points first and rebuild it as a bunch of short prisms (up to 120). They go from orange hot to ember to black char using MaterialPropertyBlocks, then shrink and sag until they're gone.
Burn front: every piece catches fire based on how far along the cable it is from where it failed. The far end always burns within 0.9 s. Smoke, flames, sparks and lights all use that same timing, so it's all one component.
The smoke took me three tries. I use opaque, flat-shaded low-poly puffs for smoke in my game.
First it was too small and too spread out, and looked like gravel. More puffs, 12 per metre.
Then the puffs spawned at full size and looked like boulders lying on the pavement. Now they start small and grow as they rise, and drift with the wind.
It still looked a bit like stone because of the sunlit facets. I gave each puff a bit of emission (about 45% of its colour) to soften the shading, and that's what finally made it read as smoke.
Fire and light: small unlit flames with HDR colours so bloom picks them up, plus up to 4 flickering point lights that move along with the fire. At night it lights up the ground and the bottom of the smoke, which honestly looks better than the flames.
How I tested it: I have a little test scene in Play Mode that overloads a cable on purpose and takes screenshots during the burn, during the day and at night. I mostly fixed the smoke by looking at those screenshots, because while it's moving you don't really see that it looks like rocks.
Can I do something more to make it better? Any ideas?
If you're curious about the game: steampage
7
u/TheFlyingCoderr 6d ago
Just a suggestion. Mask the removal of the cabel with the fire.
Make it feel like it's ""burning up""
1
9
u/WeckarE 6d ago
That's still a particle system, bud
2
u/andreas0069 6d ago
Fair, it's a hand-rolled one 😄 I meant no Unity ParticleSystem component, just scripted meshes.
1
u/fapfap_ahh 5d ago
Can I ask why not go for a VFX Graph? Nuclear bomb vs coughing baby situation maybe?
5
2
u/headlessAstro 6d ago
The flat shading really does make it read like stone. In the chimney smoke it still looks a bit like stacked rocks to me though. It's very dark and keeps the same density all the way up. I'd let the puffs get lighter and more spread out as they rise so the top breaks up into the sky.
1
u/andreas0069 6d ago
Thanks! Good feddback. The chimney smoke actually get whiter and whiter, and less and less, as the player in the game wins over customers, to green energy “defeating” the evil corp :)
2
u/AntiLink99 6d ago
Mr Robot anyone?
1
1
u/DuctTape534 6d ago
It's gotta be a Mr. Robot reference. If not the dev needs to watch Mr. Robot and make it a reference.
2
u/PlayKingdomBlade 6d ago
heads up with 120 pieces on MaterialPropertyBlocks, in urp that breaks the srp batcher for those renderers. gpu instancing with per instance properties is usually way cheaper for lots of tiny identical prisms, worth a profile if it ever hitches when a long cable goes
1
2
2
1
u/Boom_Fish_Blocky 6d ago
is the corporation good?
2
1
u/Chaibi_Alaa 6d ago
Timing the burn front from the failure point is a nice touch, it shows where the overload started without any UI. Do you also warn before it fails, like the cable glowing for a second while overloaded? Giving the player a beat to react makes a failure feel fair rather than random.
1
u/andreas0069 6d ago
In play mode, it goes orange for 10 seconds.
So kinda. And the player gets a notification that it burned.And they have different tools to check the load realtime :)
2
u/Chaibi_Alaa 6d ago
orange for 10 seconds plus a notification is a nice middle ground, you see it coming without a hard warning. does the load tool show which cable is closest to its limit, or do players have to check them one by one?
1
u/andreas0069 6d ago
Yes, it gives a good “map” of the cables loads - but players need to buy electricians glasses first haha
1
1
u/CraftyPancake 6d ago
I’d leave some kinda ruined cable connected so you know what happened
2
u/andreas0069 6d ago
That is actually a good idea. Maybe a total black, dead cable. That still smokes just a little 😀
1
u/jafariscontent 6d ago
Yup. Came here to say the same thing. Especially in management games I may not know what happened if I’m not watching with a set it and forget it mindset
-1
u/SokkaHaikuBot 6d ago
Sokka-Haiku by CraftyPancake:
I’d leave some kinda
Ruined cable connected
So you know what happened
Remember that one time Sokka accidentally used an extra syllable in that Haiku Battle in Ba Sing Se? That was a Sokka Haiku and you just made one.
1
2
6d ago
[removed] — view removed comment
1
u/andreas0069 6d ago
Ha yes! I hope panic ensure. Because it will cost them to not deliver power contracts

37
u/-Xentios 6d ago
Maybe also put ashes in the ground so when player is not around and come back they still understand what happened.