I tried to make 3d models of these shapes using blender in order to import them into my game (Unity) : . Here is what I have been able to do using UV unwrapping : and here is my uv map : . But this is not good looking... Is there any way to improve it ?
-
$\begingroup$ If you want to use a texture, which is a wrong approach, then you need to have a texture with all variants of a cell: empty (white), full (black), top (edge on top), left, right, bottom, top-left, top-right, bottom-left, bottom-right, top-bottom, left-right, all-but-left, all-but-right, all-but-top, all-but-bottom, corner-top-left, corner-top-right, corner-bottom-left, corner-bottom-right, corners-top-left-top-right... You get the idea... Then you need to assign the cells (faces) of the mesh to the texture (UV map) either manually or procedurally. $\endgroup$– Markus von BroadyCommented Jul 8, 2021 at 12:42
2 Answers
Maybe better off using Freestyle, with EEVEE.
Lighting:
- Switch off the world's contribution to lighting, while giving yourself something convenient to work to. (The Freestyle outlines will only show up in a render.) This is the World shader:
.. and light with a single, (parallel) Sun lamp.
Material:
- Make use of EEVEE's Shader to RGB node to put a black/white threshold between areas facing toward, and away from the light-source.
- Set the material to cast no shadow in its settings.
Freestyle:
- Enable Freestyle in the render settings.
- In the 'View Layer' tab, 'Freestyle' panels, configure the Line Set to catch contours and creases.
Render & Compositing:
- I've chosen to render onto transparent film, so I can see what I'm doing, and composite over white with a simple Mix, post-render..
Of course, there are other approaches.. you may not want to be constrained by real lighting, and shade the faces by hand. Or, you may want to select the Freestyle edges manually, by marking them 'Freestyle', and selecting for those in the line-set.
-
3
-
1$\begingroup$ Thanks for answering me ! But I want to use these models in a game (sorry for not mentioning it before). I think freestyle only works in render mode. Is there any way other than UV mapping... $\endgroup$– m4thus4nCommented Jul 8, 2021 at 6:40
-
$\begingroup$ @m4thus4n You're right, there.This answer is ng for you. Are you painting the shading in by hand, or do the surfaces have to respond to light? And.. are they dynamic? Do the shapes change? $\endgroup$– Robin Betts ♦Commented Jul 8, 2021 at 8:17
-
$\begingroup$ @m4thus4n That would depend on the game $\endgroup$ Commented Jul 8, 2021 at 9:23
-
$\begingroup$ The shape would change : for example, a cube could be flatten vertically and become a rectangular parallelepiped through mesh editing in game. $\endgroup$– m4thus4nCommented Jul 9, 2021 at 6:47
I presume your trying to achieve the results through the texture you shared.
Since you have just have a constant texture, I would suggest you to hook up the image texture directly to the material output or through a emission node instead of principled bsdf.
Now if your colors look a bit off, try to change it a standard instead of filmic.
Lastly, you can try to change the world background to a white color. you can tweak the strength accordingly.