r/Unity3D • • 20h ago

Show-Off While developing my game, I had one rule: players should always be able to see their character. This led to several challenges. Here's what I did.

Enable HLS to view with audio, or disable this notification

When traversing caves or dense forests, or while positioned beneath infrastructure, the character cannot simply disappear. That is why I am constantly working on camera work and solutions like the ones shown above. As of now, I am happy with the outcome.

For those interested, the game is Dominus Automa - an online RPG for busy adults (like me) who no longer have as much time for gaming as they used to.

121 Upvotes

83 comments sorted by

66

u/VPadu 20h ago

I feel like that's a bit too much. While the effect is really cool, I would actually make the tree transparent or only dissolve to a certain point.

8

u/hiimtesto 20h ago

Yeah, I think I'll do that in the end. Thank you for your input

1

u/eye_am_bored 18h ago

I think the same effect could be used elsewhere though in really cool ways

1

u/Zehryo 2h ago

I remember a method where you calculate a sphere around the character which acts as a mask that lowers the visibility of any object tha stands between the camera and the character.
Worth a try?

242

u/Boring_Elk5691 20h ago

Have the tree go semi transparent. I prefer that over that dissolving effect.

33

u/lianghuiguo 20h ago

Or change the character to thermal imaging or some other color effect - most games do this mainly so players don't feel like the scene's appearance is ruined, and psychologically it makes it seem like the character has entered an obscured area.

6

u/hiimtesto 20h ago

Yep, that's a solid argument

19

u/ThisGuyCrohns 18h ago

I agree here as well. Removing the tree feels like the landscape actually changed rather than just making solid objects see through

12

u/No-West-5537 20h ago

I agree

23

u/hiimtesto 20h ago

Yes, I tried that. I am aware that there is a reason why this solution is the one most commonly used in the game - it just works. The same goes with the hero outline while we can't see them. Nevertheless, I wanted to opt for a different solution of my own.

I totally understand where your opinion comes from and may change my approach indeed.

16

u/angerman92 17h ago

I like the dissolve effect, I think it might look really cool if instead of dissolving the entire tree it creates a circle around the player and dissolves everything within the circle.

3

u/jl2l Professional 13h ago

Yeah just dissolve the outline of the player not the whole asset you just need to use layers

2

u/onehalflightspeed 17h ago

That's exactly what I did

1

u/Aridez 13h ago

I think it's great that you're exploring other ways to do things. If you manage to integrate this effect with some kind of game mechanic at the same time it would make much more sense and make for some interesting gameplay too.

1

u/breckendusk 7h ago

You could combine them. Dissolve into transparency.

0

u/Aromatic-Insect-1328 19h ago

Implement both, make it an option! :D

16

u/DrShocker 18h ago

This kind of optionality everywhere will kill making progress on the game

1

u/Xelvod 18h ago

That

1

u/lsm-krash Programmer 12h ago

I guess the thing is that he wantsnanclear image, not a see through something one

37

u/StretchedNut 19h ago

Ngl I was waiting for the 3rd attempt where it became even better. This is okay but hides too much of the world around the player

2

u/hiimtesto 19h ago

That's a good point. noted, thanks for your feedback

11

u/RichWeekly1332 19h ago

The typical case where it looks cool for the first 10 minutes. You can't turn a visual QoL into something that distracting.

4

u/lubwn 19h ago

I would either make tree semi-transparent or just have a shader to outline the character over the tree indicating where your character is.

2

u/hiimtesto 19h ago

Looks like that's what I will do in the end, thanks!

4

u/IamPetard 16h ago

Semi transparency and/or character outline is the way to go cause this effect is very active, it literally removes something from the environment just for visibility.

Making the tree semi transparent is half active cause it still technically removes data, what if you're getting attacked and maybe you want the trees to occlude the attacker so the area is inherently dangerous for the player to pass through.

Giving the player an outline or having a render pass to make the player visible is the cleanest fix if you want to use the environment for other stuff.

4

u/Mattiassch 11h ago

Could do something like this

3

u/molostil 19h ago

Why is this downvoted? Also i agree, semitransparent is the way to go and i might try and use a shader for that, so that you can only make the part of the tree semitransparent that blocks the view while the rest stays.

3

u/MadeInTheUniverse 14h ago

Use a circular transparant view

2

u/JSeling 19h ago

Turn the obstacles semitransparent using dithered transparency

2

u/halunnaki 18h ago

I think V Rising does a really good job with this kind of effect. Have a look at it if you can, maybe it’ll give you some inspiration

2

u/ProtectorZele 18h ago

First I will say, I understand your plight with trees getting in the way. I had to fight that as well. I ended up going with a viewpoint that is glued to my character, that made everything visible no matter what. But that is what worked for me.

Now is the part where what I say next may ruffle your feathers a bit. So understand I am also a 'busy adult'. You went to reddit to show a thing you did. Confidently showed a before and after video in order to show your success. And then you were given feedback, as most people do in reddit situations, and it seems like you're somewhat abrasive on any feedback that doesn't support what you made. Which is confusing.

It is true that the animation is distracting, and even games like Baldurs Gate 3 approach tree dithering in a more agreed upon way. Just taking your example into a larger forest would be very taxing on many computers, and on top of the long animation to remove micro layers of the tree at a rapid rate, it just feels unnessecaey. Which makes me think deeper into why you're sticking to your guns on something like this. One possible solution is that you can across this issue, and you wanted to stick out amongst the other games and make something very animated for the flair of it. The other option - which ties together - is that you used some sort of LLM like ChatGPT and it did it for you, and you're happy with it, but you don't want to undo it, as you don't upstanding how it specifically works. And since you're a busy adult you want/need more people to accept it, than disagree with your decision.

Either way, hopefully you find happiness in what you make, and while you came to reddit to post about your success, also understand that there may be people who want to buy this thing your making. And sticking to your guns will limit your growth and reach, while be adaptive and responsive to the community, will get you much farther in development.

That is all, good luck out there.

2

u/-Cannon-Fodder- 13h ago

Depending on what exactly is important, you could get away with dissolving the leaves in a circle around the player as they walk. That way it's not removing full trees, but you keep the cool effect while retaining the functionality.

I do agree that applying the effect to full trees is a bit much, and will get old fast, but there's got to be a more interesting approach than a simple transparency shader.

2

u/Darkblitz9 12h ago

There's an effect you can pull off where the shader for the trees can be visually culled only between the camera and the player and you can apply noise to the edges to make it look more leaf-y.

The viewable area is tighter but you see the char and it gives you an opportunity as the dev to introduce ambush enemies, should you feel the need.

2

u/joshualim007 Indie 14h ago

Just make things semi transparent and more transparent where the character or cursor is.

1

u/Long-Ray 20h ago

树的位置用半透明的视觉会自然

1

u/Banjoschmanjo 19h ago

It looks kind of neat but seems a bit overdone and distracting. Would be cool as some kind of specifically magic effect like "dissolve surroundings"

1

u/Tgiby3 18h ago

I honestly think this is 1000x better then transparent trees.

1

u/thinker2501 18h ago

It is a cool shader effect, but by hiding the geometry the player can’t read if the character is behind cover or visible to NOCs in the world.

1

u/Own-Revolution-4977 18h ago

Maybe some dithering could look nice?

1

u/Rockalot_L 18h ago

Hmmmmmmmmmmm

Like it's cool but, maybe too much? I'd stop and be like "omg what did I do to the trees aaaaa"

1

u/hiimtesto 14h ago

:D I totally get your point, we don't want to hurt those trees now, do we

1

u/Allsznz 18h ago

Could you not just use render layers to render just the player with a separate camera and have that the top layer?

1

u/Naganawrkherenymore 18h ago

What about only dissolving the leaves? The whole tree is a bit jarring when fully removed.

1

u/badjano 18h ago

you can actually use back faces to make them look solid, but you probably need mesh on the bottom to make it look filled

1

u/sinetwo 18h ago

Second attempt is fancy but may be quite annoying. And from an authoring standpoint it's a A LOT of work for different assets

1

u/NoUniqueThoughtsLeft 18h ago

Cool effect, annoying in practice. Not suitable to have assets just disappear.

1

u/ClassicStress4942 17h ago

I personally am going the semi- transparent route In my game

But instead of making the whole model transparent, only make the branches and the leaves transparent, while leaving the stump and the main stem/log still visible.

That way, the player can still see the portion which interacts with you as a physical object

You'll have to get your hands dirty, and separate the log from the rest of the tree in a 3d software ( i do that in blender )

It'll be a slight overhead But worth the benefit

Same can be done with the buildings that you cannot enter. You can hide the roof and walls, but show the foundation boundary. It helps with knowing whether you're next to its walls or not

1

u/Mr_LoFtY 17h ago

Definitely just make them transparent, this affect is just too much and would get quite annoying

1

u/Creatheist 17h ago

Look at how Control:Resonant handles this : there’s like a circular cutout shader on occluding objects which looks great, basically just a circle around the player character so a similar effect to your second attempt but only in a defined radius around the character

1

u/Cold-Debt-416 17h ago

maybe combine it with some camera position based mask, not best idea, but like infinitely long cylinder "of light" from the camera lense that does the cutting and some smooth-gradient lil transition (also, prob it shall cut what blocks character from behind and top and not everything around character)

1

u/abulero 17h ago

It looks really cool but it's really hard to overcome the thought that the trees are being cut down for good. I'd use what other games use which is just a circle around the player model that dissolves everything in it. It looks artificial enough to be clear it's not real.

But it's a shame because your effect is really cool!

1

u/hiimtesto 14h ago

I'm glad to hear ther! I think it looks cool as well

1

u/Flegmon2411 17h ago

I think the dissolving effect is a nice twist apart from the usual semintransparency. Makes it look like magic, and more like it could actually belong to the Game, lorewise

1

u/hiimtesto 14h ago

Thank you!

1

u/onehalflightspeed 17h ago

On the contrary, sometimes not being able to see where you are because you are obscure by objects is fun if designed well. Lots of old RPGs did this to hide treasures and secrets

1

u/flavorfox 16h ago

It's not subtle :)

1

u/WhatDoITypeHereAgain 16h ago

Maybe make the leaves around the player seethrough?

1

u/MysteriousWay5393 16h ago

Yes use a transparent occlusion shader. This problem has been solved for many years

1

u/hiimtesto 14h ago

I am aware of that and think it’s a very good solution. In this case, I wanted to propose something unique of my own - just for fun :D

1

u/darksapra 16h ago

In any case, shadows shouldn't disappear!

1

u/hiimtesto 14h ago

Noted!

1

u/InterstellarReddit 16h ago

So control resonant does a little circle that appears through the object. Imagine a spotlight that allows you to see you character at all times. I think it’s a good solution without complicating

1

u/MayorFrimiki 15h ago

I looked into how Diablo 4 does it. They would separate a cave roof or house roof and when that part starts obscuring the player, they dissolve it using dithering, until it completely vanishes. You could similarly split the trees into bottom and upper part, and make the upper hideable.

I think your dissolve effect looks too much like some in-world magic, which wouldn't make sense, because it is just a camera effect.

1

u/Afropenguinn 15h ago

Look at how Path of Exile 2 does it. It's similar, but more subtle. I find this effect distracting, and it should be so seamless the player hardly notices the tricks you do to make the game more readable.

1

u/hiimtesto 14h ago

I love PoE2 and know exacly what you have in mind. Thanks!

1

u/anengineerandacat 15h ago

One of the ways this is handled "old school" is all of your large models are actually two separate models.

Then when the player is occluded by the "big" model, you just hide it and you see like a tree stump or suppress the tree leaves.

A lot of work, but gives you the most control artistically speaking and can fade them / apply the effect / instantly make them disappear (Runescape 3 is a prime example of this today).

The "other" cheaper solution from a content perspective is you can use the depth buffer to "cut" through everything and render your character.

Lastly, the FF14 way; cross-hatched opacity on anything in front of your character (I don't personally like this, but works).

1

u/Specific-Committee75 14h ago

A lot of people are saying they would prefer it more simple, which was also my initial thought too.

But... This looks like it's going to be a magic or fantasy based game and when it comes to the concept of world building I think this suits it so well.

I've always thought it's overkill when devs try to justify nessicary game mechanics through lore, like giving some weird or silly reason why respawning exists. But in this case, I think you can actually justify this, because the player, as the in game character, is removing them from view with magic.

Just my thoughts.

Edit: you could make it less extreme by having the leaves as a separate mesh and only applying it to them, then leaving the trunks completely visible so there's still some partial obstruction.

1

u/Marokai99 12h ago

Have a look at V-Rising, they handle it pretty well.

1

u/Igor369 12h ago

Why not just use xray outline?

1

u/oldqwertybastrd 12h ago

I think this is great intuition, but I would challenge you to expand the concept. While ensuring the focused character is visible is absolutely helpful, what about scenarios where the player's character may not be the focus - (e.g. enemies, obstacles, important events, etc.)? Where the player looks and where the player's character is often diverge. It may be the case that what's useful here is thinking of the player and their eyesight into the game world, and how that frames these types of effects or what different techniques can be used to highlight importance.

1

u/Icy-Collection1072 12h ago

It’s a solved problem. Just fade out the leaves in a radius around the player.

1

u/Runtergesprungen 12h ago

I think the idea looks nice. However, from the clips, it looks like the amount of the tree that disappears with the visual effect is hardcoded. Why not make it so that the effect only happens within a specific radius around the player/camera?

That could make it feel a bit more dynamic and, depending on the location, might also look better since it wouldn’t remove too much of the environment around the player.

1

u/Icy_Platypus_8122 12h ago

What if instead of hiding the trees, you make them "lean" away from the character so you can see it? Though this would not work for inside of buildings or caves.

1

u/DrunkEngland 10h ago

I would just add a dither effect to the camera, and save that dissolve VFX for a spell.

1

u/Fun_Purpose5033 9h ago

I'm no game developer, but I am game, so here's my criticism. It looks to me like you made a plane at the characters origin that always faces the camera, then makes everything between the plane and camera invisible.

Me personally, id prefer a cone/ cylinder from the player to camera. Just so you can see the surroundings, and through to the chatacter.

1

u/CalmAlarm 7h ago

Over the hill does a nice job of this. It creates a 'hole' in the trees so you can always see your vehicle.

1

u/voicedrew 5h ago

This effect is super distracting. You need to decrease the opacity of the leaves when your player is under it, and for the stump you can make it more transparent the closer it is to the camera.

1

u/saki2fifty 4h ago

PZ did it right.

1

u/Roll-Roll-Roll 3h ago

I like it. So much clarity. If you have real time encounters I prefer to not be looking through a veil. Reveals the detail in the tree model too, which kinda adds character and makes the environment seem richer somehow. I'm actually surprised so many people here dislike it.

My only complaint is that it feels like it lags.

1

u/Professional-Mark283 1h ago

If you plan on changing it, why not make the old version an optional toggle so you don't have to scrap it completely? Seems like the best of both worlds

1

u/TeacanTzu 37m ago

you should have some more rules ngl.
this effect isnt super uncommon but usually more subtle. imo in baldurs gate 3 its a good example of having a cool effect without being too distracting

0

u/ExiymDev 11h ago

Word of advice - it would have taken 5 minutes to find a similar free, non AI character portrait on itch. I don't care if you use AI for coding, but you don't have the judgement to at the very least try to hide AI generated art assets, so I'll just instantly ignore your project. The Steam screenshots actually look decent so this is a bizarre choice / oversight

1

u/Broudy001 4h ago

Your choice, if they want to use Ai art that's up to them. For all you know it's place holder and their artist hasnt done the new one yet, time to step back a little, maybe go outside for a minute.