r/Unity3D – Telegram
r/Unity3D
265 subscribers
12.7K photos
15.6K videos
14 files
48K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
I modernized a Stochastic Shader so you don't have to. (Package Included)

I originally found this reddit post a long time ago regarding stochastic shading, but I couldn't seem to get it working. I had also seen that Unity had an official release of the same approach, but I simply couldn't get it to work whatsoever.

With the release of Unity 6, I decided to try and create this shader with the modern shadergraph and got it operating with even more functionality than previously outlined in the original posts. Since it's originally someone else's work that they released for free, I decided to do the same.

All information is in the readme of this Github Repo.

As a caveat, I do not know if it will work in Unity versions < Unity6, and I don't know if it'll work with any other pipeline than HDRP. Please read the ReadMe on the github repo!

I use the same calculation methods that the original creator(s) used, but converted it to Shadergraph for easier use. I also implemented mask map input as well as correct smoothness/metallic remapping capability. As you can see, the comparison between my adaptation and the original HDRP/Lit shader is identical.


# Default Lit vs Stochastic Comparison

Here are 2 planes using the same Base, Normal and Mask textures. The left is the default HDRP/Lit Shader, the right is the Stochastic shader.

https://preview.redd.it/xuod7cz1ia2e1.png?width=2105&format=png&auto=webp&s=71ab0983d8ee331c198cf48f6616bb0daf3c4090

# Examples

Same Planes with each material tiled to 6x6 and Stochastics Disabled

https://preview.redd.it/wg6ka8ixia2e1.png?width=2105&format=png&auto=webp&s=f0b02eb384e9c73e3de82f5b369cba3fac5d22af

Same Planes with each material tiled to 6x6 and Stochastics Enabled

https://preview.redd.it/hyjg0lmzia2e1.png?width=2105&format=png&auto=webp&s=129be20b78549fa844bb869dcf0e11104d999d59



# Closer Stochastic Allocated Plane Comparison

Stochastics Disabled

6x6 Tile - Stochastic Disabled


Stochastics Enabled

Stochastics Disabled



https://redd.it/1gwl8b5
@r_Unity3D
Optimizing collider dense areas

Hello, I have a top down game which is grid based and has caves in it. Each cave wall is it's own object with its own physics collider. The floors are also objects, meaning you can have an upwards of around 900 tiles, and 700 walls each with one collider on them. Staying too long around caves eventually breaks the game and I suspect it's in the enormous garbage collection overhead my game has. That or it doesn't like so many physics colliders onscreen at once.

Does anyone have potential solutions or optimizations for this? I'm not using a tile map but maybe I should be. I've just been so long with this system that changing it means rewriting half the codebase. Everything is build are this loading /destroying/pooling gameobject system. I don't know anything about dynamic colliders or things like that. I really don't know what I don't know, so I'm hoping someone here does. I'm mostly only familiar with circle and box colliders, trigger or not.


If I had to solve it myself right now I guess I would try to work out some kind of line of sight system that doesn't load cave walls that are hidden behind other cave walls anyway, to reduce the objects onscreen. That might work (not that I have a plan for how to do it), but maybe someone else has something better

https://redd.it/1gwub8v
@r_Unity3D
Help!

https://preview.redd.it/l2dh0ja1mc2e1.png?width=833&format=png&auto=webp&s=8c4b52846ea8ab1a11c0f852e0b023f57e90ac49

Why did my screen just fell after colliding with an object. It look likes this. Help please. I'm new.

https://redd.it/1gwuztt
@r_Unity3D
Need Ideas For A Mechanic

My question - What would be a good mechanic (in your opinion) to revive the monster when the player has no way of getting an item to revive it?

-Context-

The game I'm working on is a top down monster catching cozy game. Player does not fight monsters, monsters fight monsters.

Player can have 1 active monster at a time.
If players monster dies, player gets sent to a safe zone/base.
Player cannot leave base without an active monster.

When the player has 1 monster, and said monster dies, if the player doesn't have an item to resurrect the dead monster, they are basically stuck and cannot continue.

https://redd.it/1gwx6o2
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
With feedback from this sub, I've improved my gun's muzzle flash and animations :)

https://redd.it/1gwnpuq
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
1.5 years in Unity, and now in Playtest! We are working on Whisper of the House, a pixel-style placement game. Let us know what you think!
https://redd.it/1gx0xg4
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
After watching tutorials just created my first basic game, what do you think?

https://redd.it/1gx52i2
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Unity 6 makes volumetric particle lighting easy in URP (+📸 Shader Graph nodes).

https://redd.it/1gx6j1q
@r_Unity3D
Optimization techniques that I've wrote long time ago, are they still valid and would you like to add any?
https://redd.it/1gxay9h
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
How about a perfect breakfast in beautiful sunny Italy? I'm working on creating a café simulator with no time-limited tasks. Just a cozy atmosphere, a detailed system for crafting culinary masterpieces, and plenty of opportunities to customize your little slice of paradise.

https://redd.it/1gxdbz8
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
Working on a Rope Swing System in Unity inspired by Uncharted. What do you think?

https://redd.it/1gxa7rf
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Been working on my spider-mech controller to add into my open world mech game. Legs and Turret are independent of each other.

https://redd.it/1gxe379
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Flat navmesh trick - Is anyone else doing this? (details in 1st comment)

https://redd.it/1gxghsn
@r_Unity3D
Should I work on my game backwards?

Not sure how to word this, but I have an assignment for my game design course and only have 2-3 months to finish it. In order to make sure the best parts of the game arent rushed, should I start working on the final levels then make my way to the beginning? Or do the opposite?

https://redd.it/1gxp8pv
@r_Unity3D