#normal_map
what I've learned so far about 3d #godot #gamedev:

In GLSL DO NOT
NORMAL = texture(NormalMap, UV).rgb;

assign your normal map to NORMAL_MAP NOT NORMAL.

When declaring your texture sampler2D INCLUDE THE HINT "source_color", it makes a HUGE difference.

USE REFLECTION PROBES for AMBIENT LIGHTING
December 3, 2024 at 8:35 AM
Quick question.
I already made a normal map once and then drew on the texture afterwards. Now I want to redo the normals and it comes out when baking through the Jbake addon 🤬🫠😵

#furry #furryartist #art #artwork #smallartist #3d #furryart #3dmodeling #blender #Jbake #normal_map
February 27, 2025 at 7:57 PM
Everything was fine until a problem with the normal map happened. Details in the last post.

I'm learning more and more and I'm still stumped on normals

🥺🫠🤨

#furry #furryartist #art #artwork #smallartist #3d #oc #furryart #3dmodeling #3dart #CGI #normal_map #blender
February 27, 2025 at 8:09 PM
For the ice I translated this shader tutorial to godot, it's pretty similar, except lerp is called mix. I tweaked my values differently, and also just used custom noise textures, with one set to normal_map. Also tried to bring out more of the screen_texture than his for the refraction part.
November 14, 2024 at 4:08 AM
Pixel perfect cell shading with normal maps
The main issue is likely that your UVs need to be quantized to match your sprite’s pixel grid. Add this function to snap the UV cords: shader_type canvas_item; uniform int cell_levels : hint_range(1, 10) = 3; uniform sampler2D normal_map : filter_nearest; uniform vec2 texture_size = vec2(64.0, 64.0); // Set this to your sprite's dimensions vec2 snap_to_pixel(vec2 uv) { return floor(uv * texture_size) / texture_size; } void light() { // Get pixel-perfect UV coordinates vec2 pixelated_uv = snap_to_pixel(UV); // Sample the normal map with pixelated UVs vec3 normal_map_value = texture(normal_map, pixelated_uv).rgb * 2.0 - 1.0; vec3 normal = normalize(normal_map_value); // Calculate the light direction vec3 light_dir = normalize(LIGHT_DIRECTION); // Calculate the light intensity using the dot product float light_intensity = max(dot(normal, light_dir), 0.0); // Posterize the light intensity for cell-shading float cell_light = floor(light_intensity * float(cell_levels)) / float(cell_levels - 1); // Apply the cell-shaded lighting to the light color LIGHT = LIGHT_COLOR * cell_light; } When working with pixel art and normal maps, getting the lighting to perfectly align with the sprite pixels can be tricky. I can find a few vids I like that can help you if you want? I normally write in another language so some of the built in functions might be a little funky just lmk if it works and i can check em when I get home
forum.godotengine.org
February 25, 2025 at 10:30 AM
Pixel perfect cell shading with normal maps
### Godot Version Godot 4.3 ### Question So I want to create a cell shaded effect for my sprites based on the Normal map. As you can hopefully see in the picture, I can not get my lights to snap to the pixels of the actual sprite. Shader code: shader_type canvas_item; // Number of cell-shading levels (adjust as needed) uniform int cell_levels : hint_range(1, 10) = 3; // Normal map texture (assign this in the Godot editor) uniform sampler2D normal_map : filter_nearest; void light() { // Sample the normal map and convert it to a world-space normal vec3 normal_map_value = texture(normal_map, UV).rgb * 2.0 - 1.0; vec3 normal = normalize(normal_map_value); // Calculate the light direction (from the fragment to the light source) vec3 light_dir = normalize(LIGHT_DIRECTION); // Flip the direction // Calculate the light intensity using the dot product float light_intensity = max(dot(normal, light_dir), 0.0); // Posterize the light intensity for cell-shading float cell_light = floor(light_intensity * float(cell_levels)) / float(cell_levels - 1); // Apply the cell-shaded lighting to the light color LIGHT = LIGHT_COLOR * cell_light; } I have everything set to filtering: Nearest. I am not great at shaders and am hoping that I am missing something obvious. Small recreation of the scene + shader: https://drive.google.com/file/d/1iivEYbMCtGv8orjQD48IXIuIgLXJ1Ftr/view?usp=drive_link
forum.godotengine.org
February 25, 2025 at 4:29 AM