The cube on the left has flat shading and the cube on the right has smooth shading:
is there any way to create a node/block that has smooth shading? or is there some way to enable smooth shading for every block?
i know there is a smooth shading option but i think it does something different from what im asking?
i made a custom node whos normals are in the attached image
the normals face diagonally outward so i would expect the edges to appear round.
but even with smooth shading enabled you can still see the flat shading in the attached game image.
thanks!
is there a way to do smooth shading of single node?
is there a way to do smooth shading of single node?
- Attachments
-
- Capture2.PNG (40.8 KiB) Viewed 665 times
-
- Capture.PNG (298.35 KiB) Viewed 666 times
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: is there a way to do smooth shading of single node?
You could try using the 'mesh' drawtype:
https://github.com/minetest/minetest/bl ... .txt#L1232
But I am honestly not sure if Minetest supports this kind of smooth shading.
https://github.com/minetest/minetest/bl ... .txt#L1232
Code: Select all
* `mesh`
* Uses models for nodes.
* Tiles should hold model materials textures.
* Only static meshes are implemented.
Re: is there a way to do smooth shading of single node?
i forgot to mention i am using the mesh draw type
- Skamiz Kazzarch
- Member
- Posts: 618
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: is there a way to do smooth shading of single node?
Whelp that was all the advice I had on the topic.
I also don't recall ever seeing the effect you are going for in Minetest. So chances are that it just straight up isn't possible.
I also don't recall ever seeing the effect you are going for in Minetest. So chances are that it just straight up isn't possible.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: is there a way to do smooth shading of single node?
Similar I've played around a bit with the blender and mesh nodes and seen what the engine supports etc and Iikewise never been able to replicate that type of look. I even found the bump/normal maps to be of limited use to give the nodes a different look but you could give that a try - been 4+ years since I played with bump/normal and I think it was removed not sure as I stopped following that issue.
I would say be cautious of using mesh nodes for a whole map gen see my question here and explanation from Krock/SmallJoker
viewtopic.php?t=23262
Not sure this helps much though.....
I would say be cautious of using mesh nodes for a whole map gen see my question here and explanation from Krock/SmallJoker
viewtopic.php?t=23262
Not sure this helps much though.....
- Desour
- Member
- Posts: 1472
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: is there a way to do smooth shading of single node?
.obj has smoothing groups (see <https://en.wikipedia.org/wiki/Wavefront ... _materials>). Idk if minetest supports this.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- Blockhead
- Member
- Posts: 1678
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: is there a way to do smooth shading of single node?
Smooth shading data should be exported properly by Blender and usable by Minetest if you have a mesh node. If not, it seems like a bug.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: is there a way to do smooth shading of single node?
So there is a function in mesh.cpp called applyFacesShading
I changed it to this and it removed the shading
not sure why this function is manually shading faces...
I changed it to this and it removed the shading
Code: Select all
if (normal.Y < 0)
applyShadeFactor(color, 1.000000 * x2 + 1.0f * y2 + 1.000000 * z2);
else if ((x2 > 1e-3) || (z2 > 1e-3))
applyShadeFactor(color, 1.000000 * x2 + 1.000000f * y2 + 1.000000 * z2);
Who is online
Users browsing this forum: No registered users and 3 guests