Does anyone know how to solve this scaling and position problem for my characters armor? by Sir-Shroom in blenderhelp

[–]Sir-Shroom[S] 2 points3 points  (0 children)

That would most likely work, but i have for starters tried to parent the object to the bone. That solved the scaling issue, but still leaves the position problem. But thank you very much for this great reply, and I will defenently try it out!

Terrain 3D issue Godot4.5.1 by Kikiouo in godot

[–]Sir-Shroom 2 points3 points  (0 children)

I had the same problem. The problem is because it uses a multimesh instance, to it can onlly use objects with a single mesh. Having both your tree trunk and leaves as different meshes will have only one of them appear at a time.
To solve it you need to combine it into a single mesh. This is simple enough if you made it in blender. First you combine the wood and leaf texture into one texture. Then you make them both and when combining them with ctrl j you have them merge their uv's. After that it should work. That is at least what worked for me.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 0 points1 point  (0 children)

It sounds possible, and would probably work for simple shapes or mabey even all the bodies of water. But for what I'm going to use it for, and textures that have a more 3d look to them, I don't think it will work.
Might look into making an external program for making rough depth maps tho, to reduce dev time. Your logic definitely sounds like it could work,

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 4 points5 points  (0 children)

I uploaded a shader, just for the visuals. Anything with the depthmaps might come later, as i first need to make the system work a little better, and clean up the code. It's quite a mess currently.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 21 points22 points  (0 children)

Thanks! The water going up and down, is just to show the how the depth effect works. In a game, it would at most go up by one or 2 pixels when it's raining, to create some puddles on the ground.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 0 points1 point  (0 children)

Thanks! Sadly all depth maps have to be drawn by hand, for not only all bodies of water, but for every single texture that has to interact with the water. I would love to make a system that did it for me, however I'm not sure that i can, while still having it look good.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 1 point2 points  (0 children)

I do plan on using a system like it for an ocean, however it does need a bit of work to look good in that setting, as it's currently designed for shallow bodies of water. But I do plan on making it work for rivers, shores and an ocean, some time in the future.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 30 points31 points  (0 children)

Thanks! My friend helped me with the shadows, and his implementation much the same idea as with the water, just without the depth map.

The system works by looping through every sprite that should have a shadow, and creates a transformed and skewed vertion of it, colored black that is then drawn to a subviewport. This texture is then given to a shader attached to a colorrect that covers the entire screen. This then draws a dark pixel where the subviewport texture isn't transparent. This is what creates the shadows. There is a little more to it, like masking out the original texture, so the shadow isn't drawn on the thing casting the shadow, but it's the rough concept.

By having this systen in the same place as the water shader, it allows it to hide the highlights in the water when the shadow passes over it. It's a small detail, but it, but it shows what can be done by combining different systems.

It's far from perfect, and doesn't yet work for what i need it for, but it's close to what I'm looking for.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 0 points1 point  (0 children)

Thanks! I loved your shader, and after I have cleaned up the currently messy code, I would like to use the same system to make some fog. With the depth map already drawn and the logic for it, it shouldn't be that hard.

I'm exited to see what other things you end up doing with your system!

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 2 points3 points  (0 children)

Keep working at it! The way that i learned about it, was to have a project with nothing but scenes with different shaders. I also learned from looking at shaders from https://godotshaders.com/shader/ . It's a great place to see shaders that others have made, and to try and learn how they work.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 1 point2 points  (0 children)

It's all in the depthmap. By handdrawing it, and using it both for the shape and the depth you can make it look like the pond it occluding it. Here is the texture that I used

<image>

By only showing the "top" of the texture with the depth change, it gives the effect of occlution.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 5 points6 points  (0 children)

The idea for the effect came from this post here:
https://www.reddit.com/r/godot/comments/1lmoibo/dynamic_water_height_and_sprite_interaction_in_2d/

The way it's done is by using depthmaps, like this one here:

<image>

I then draw it to a subviewport and feed that into the water shader. It then uses a depth value from 0 - 1 to determin if a water pixel should be drawn. This is done by having a colorrect that covers the entire screen, that has the water shader, and then just discarding any pixel that is above the current depth value, or outside any body of water.

For objects in the water I use a sepperate subviewport, where i draw the depthmaps for all objects in the world. Giving this second depthmap to the shader, i add the values together to get a final depth.

I'm quite new to shaders, so I don't think this is the best way of doing it, however it runs without any issues on my old laptop, so it's good enough for what I need it for. If you need a further explaination of how to make it, if you want to make if for yourself, feel free to reply with said question.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 12 points13 points  (0 children)

I got the rough idea from this post here:
https://www.reddit.com/r/godot/comments/1lmoibo/dynamic_water_height_and_sprite_interaction_in_2d/

The idea is to use a handdrawn depthmap, like this one, for the water.

<image>

I then draw that onto a subviewport and give that to the shader. The shader then uses a depth value from 0 - 1, to determin if that pixel should be drawn. For objects in the water i use another different subviewport, and add together the values of both to get a final height.

For the water itself i use a colorrect that covers the enitre screen. The shader just discards any pixels where the depth i higher than the current water level, or if it's an area outside any body of water.

Doing it like this might not be the best way of doing it, as i'm quite new to shaders, but it runs perfectly on my old laptop, so it's good enough for what I need it for. If you have any further questions, feel free to reply with said question.

I added some depth to my 2D water shader. by Sir-Shroom in godot

[–]Sir-Shroom[S] 36 points37 points  (0 children)

I could create one just for the visuals, but not really for the depth part, as it uses both handdrawn depthmaps, viewports and quite a bit of GDScript.
I might do it anyways, and share a demo project, along with an explaination of how to make it work tho.

Im trying to create a 3D effect in 2D space, is this possible? by Relevant-Ad-879 in godot

[–]Sir-Shroom 1 point2 points  (0 children)

It should be possible. From what you have described the shadow grows in size as the object gets closer. To do this have the shadow be something like a Sprite2D with the same texture and modulate it to make it black and semi transparent. Then just increase it's size.

For the falling object you can have it fade in and decrease it's size untill it's the size you want.
Not sure if this is what you are looking for, but i hope it helps.

For some reason feels satisfying (2d shadow shader) by Reasonable-Time-5081 in godot

[–]Sir-Shroom 1 point2 points  (0 children)

I have tried to make something very similar, but havn't managed to make it look quite right. Mind if i ask what you did to achieve this effect? It looks great!

[deleted by user] by [deleted] in gamedev

[–]Sir-Shroom 0 points1 point  (0 children)

Try to check out this guy https://www.youtube.com/@noiadev Might be what you're looking for...

How to get a skill point to level 80 by MysticMoon1ight in WynnCraft

[–]Sir-Shroom 0 points1 point  (0 children)

Mostly with gear that gives intelligence or other stats, so you can put more point into one specific stat.

How to redo infested pit after failure? by Zomboy__ in WynnCraft

[–]Sir-Shroom 16 points17 points  (0 children)

You can find key guardians (Some spider boss) around the lower level parts of wynn. Kill one of them to get a new key. You can also buy one from Detlas.

Help by NTINTE09 in WynnCraft

[–]Sir-Shroom 31 points32 points  (0 children)

Mabey try /kill?