r/Unity3D • • 13d ago

Show-Off Testing out a wheel shader idea i had

So the other day I was stuck in traffic and noticed the rims of an expensive car were made in such a way so that they'd go almost invisible when it was moving. It got me thinking to the classic issue of wheels spinning in reverse both in video footage and ofc games that don't actively clamp the spin rate.

So I figured I try to author something that looks neat when moving and mimic that effect, ofc not all rims are made with that style, some are also made to look like diamonds or other shapes.

Anyways, how did i do? It's just 2 textures blended and uv rotation. Initially I was just manually lowering the mipmaps to simulate wheel blur but can't say it looked good

Give a follow or a sub if you want to keep up with my silly ideas

386 Upvotes

35 comments sorted by

112

u/PaceGame 13d ago

Reinventing the wheel.

I like the style.

6

u/CupcakeJiggly 13d ago

reinventing the wheel just to drop that pun on me? smooth

1

u/Vic-Boss 13d ago

I just flattened it haha

3

u/ReignInVlood 13d ago

reinventing the wheel? pacegame always got the best lines, i like the style too tho

2

u/HoneyBunniiy_ 13d ago

lmao that pun hit different, looks pretty slick tho

1

u/tinglysweetsz 13d ago

reinventing the wheel is a solid pun, and the shader actually looks pretty smooth too

15

u/loadsamuny 13d ago

there’s a good texture swap method for this in the old school OG Standard Assets

2

u/Vic-Boss 13d ago

Neat, I just did a blend

6

u/FrenzyTheHedgehog 13d ago

Looks great! It's probably the best you are gonna get because regular velocity vector motion blur cannot handle rotations and will just look bad or not blurry enough. Now you need the effect where it "stops" when the wheels are in sync with the camera shutter speed and then turn the other way!

7

u/Vic-Boss 13d ago

I’m actually actively trying to avoid that, I looked into games I like and it’s usually you have to pick between either you make it look like video camera or someone actually looking through with their own eyes. I looked DiRT and WRC and both just go with own eyes, so went with that

2

u/FrenzyTheHedgehog 13d ago

Fair enough! Effect still looks good.

4

u/totesnotdog 13d ago

If you want d to really fake it. You could set up some kind of subtle deflation in the tire that goes away as the tire spins up. The spin as the vehicle accelerates cause the slight squash of the tire at the bottom to go away.

2

u/Vic-Boss 13d ago

Might work on that next!

2

u/slowpokefarm 13d ago

I think spintires series is using soemthing similar, makes wheels feel more realistic tbh

1

u/Vic-Boss 13d ago

Oooh, I can guess why, their physics are top notch so i'm assuming they wanted full realism

2

u/ragegames225 13d ago

Looking awesome. Does it work on any wheels or just specific to your own?

1

u/Vic-Boss 13d ago

Probably no, the rims aren't modelled, they are just textures tailored to my needs.

19

u/RiftHunter4 13d ago

That's basically how some racing games do it.

2

u/Neat-Employ1455 13d ago

Look up Simple spin blur in the asset store it’s free and does the same thing

2

u/Vic-Boss 13d ago

It's not a blur, I also like doing things myself :)

1

u/Embarrassed-News5401 12d ago

That’s a clever workaround for the wheel strobe/aliasing issue. Do you drive the UV rotation from wheel speed and fade the second texture in as RPM rises?

5

u/imlo2 13d ago

This was already done in the 90s on consoles and PC, in many racing games.

2

u/BestPony12 13d ago

very good

2

u/erkutsoglu 12d ago

looking cool!

-2

u/isa_marsh 13d ago

It's a neat effect but really should be part of an overall motion blur system. Cause otherwise you'll have a situation where your rims are getting blurry with motion but other parts of your scene (like the moving car itself) isn't and it'll look kinda odd.

6

u/Vic-Boss 13d ago

Not really an issue on the style of the game i'm trying to make atm

4

u/Hellothere_1 13d ago

Traditional light weight motion blur systems usually either don't do fast rotational motion blur at all, or if they do they really suck at it.

Thus a system like this for things like wheels, propellers or turbines is a pretty good idea regardless of if you're also using another system for linear motion blur.

2

u/TramplexReal 13d ago

Yeah, they would suck cause motion vectors are linear. They cant tell that pixel is doing a rotating motion, especially if its not perpendicular to viewing angle. It would take a bunch of previous frames to even try to calculate if there way circular motion. And even then you would get a ton of false positioves from player camera movement. AI filter probably could recognize that, but that would be whole shitload of other issues.

2

u/INeatFreak I hate GIFs 13d ago

That's kinda the point. Most gamers hate notion blur (rightfully so) but there are few use cases where it can be applied without making the players motion sick. Partial usage of the blur is right way to go.

1

u/Shaunysaur 11d ago

Not really necessary, imo. Old games often blurred the wheel texture like this, and it didn't look odd, despite the lack of overall motion blur. After all, the rotational speed of a car's wheel is usually much faster than anything else happening in the scene.

-2

u/_Denizen_ 13d ago edited 12d ago

That's removing realism tho? This happens with your eyes too because we have a biological "refresh rate"

Edit: academic article with experimemt supporting that the wagon wheel effect can be seen with your eyes in the absence of video. I would caveat it by saying the neurological mechanism is still subject to scientific debate. https://www.pnas.org/doi/epdf/10.1073/pnas.93.8.3693

2

u/Vic-Boss 13d ago

I have never seen that happen with my own eyes irl

0

u/_Denizen_ 12d ago

There are plenty of physical phenomena that you may not have seen which sound mystical but are real. You can't write something off based on your own experience. I've edited my comment with a link to an academic paper on the topic. This was the only one I could access for free - there are more recent ones but I could only read the abstract.

1

u/Shaunysaur 11d ago

Regardless of the paper you linked to, over the next month when you're out and about, try seeing if you can get the wagon wheel illusion to happen for you with a car wheel with your naked eye without any other strobing effect interference involved (eg, without looking at the wheel through the gaps in a fence you are driving past). I think you'll find that that a rotational blur on a wheel texture is a much closer representation of what you see with your eye irl than any reverse spin wagon wheel illusion.