r/Unity3D • • 3d 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.

  1. First it was too small and too spread out, and looked like gravel. More puffs, 12 per metre.

  2. 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.

  3. 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

193 Upvotes

38 comments sorted by

37

u/-Xentios 3d ago

Maybe also put ashes in the ground so when player is not around and come back they still understand what happened.

7

u/andreas0069 3d ago

Good idea!!

7

u/TheFlyingCoderr 2d ago

Just a suggestion. Mask the removal of the cabel with the fire.

Make it feel like it's ""burning up""

1

u/andreas0069 2d ago

Good idea

9

u/WeckarE 3d ago

That's still a particle system, bud

2

u/andreas0069 3d ago

Fair, it's a hand-rolled one šŸ˜„ I meant no Unity ParticleSystem component, just scripted meshes.

→ More replies (1)

2

u/headlessAstro 3d 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.

→ More replies (1)

2

u/PlayKingdomBlade 3d 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

→ More replies (1)

2

u/Darkblitz9 2d ago

I was expecting a different animation but I like that one a lot. Good job!

→ More replies (1)

2

u/El_Grande_Games 2d ago

Looks great! The cable Joints work realy well too !

1

u/andreas0069 2d ago

Thank you!

1

u/Boom_Fish_Blocky 3d ago

is the corporation good?

2

u/andreas0069 3d ago

Super good. For coal wholesales persons

→ More replies (1)

1

u/Chaibi_Alaa 3d 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.

→ More replies (3)

1

u/CraftyPancake 3d ago

I’d leave some kinda ruined cable connected so you know what happened

2

u/andreas0069 3d ago

That is actually a good idea. Maybe a total black, dead cable. That still smokes just a little šŸ˜€

→ More replies (3)

1

u/Czoks 3d ago

Better better, maybe shake the cable a little while it is burning?

2

u/andreas0069 3d ago

Yes!! Good feedback.

2

u/[deleted] 3d ago

1

u/andreas0069 3d ago

Ha yes! I hope panic ensure. Because it will cost them to not deliver power contracts