feat: improved normal maps

This commit is contained in:
Sara 2025-06-10 00:10:15 +02:00
parent b9afbad80d
commit 4ef4212d26
15 changed files with 559 additions and 95 deletions

View file

@ -72,17 +72,35 @@
"to": "splatter_color_4",
"to_port": 0
},
{
"from": "normal_map2",
"from_port": 0,
"to": "Material",
"to_port": 4
},
{
"from": "splatter_color_4",
"from_port": 0,
"to": "math",
"to_port": 1
},
{
"from": "math",
"from_port": 0,
"to": "normal_map2",
"to_port": 0
},
{
"from": "normal_map2",
"from": "fbm2",
"from_port": 0,
"to": "Material",
"to_port": 4
"to": "math_2",
"to_port": 0
},
{
"from": "math_2",
"from_port": 0,
"to": "math",
"to_port": 0
}
],
"label": "Graph",
@ -118,7 +136,7 @@
"flags_transparent": true,
"metallic": 0.5,
"normal": 1,
"roughness": 1,
"roughness": 0.99,
"size": 11,
"sss": 1
},
@ -128,8 +146,8 @@
{
"name": "splatter_color",
"node_position": {
"x": -791.793091,
"y": 317.725281
"x": -1112.913086,
"y": 327.805267
},
"parameters": {
"count": 91,
@ -296,8 +314,8 @@
"longdesc": "",
"name": "graph",
"node_position": {
"x": -1546.436768,
"y": 284.510437
"x": -1867.556885,
"y": 294.590454
},
"nodes": [
{
@ -773,16 +791,16 @@
{
"name": "splatter_color_2",
"node_position": {
"x": -1339.98645,
"y": 306.279388
"x": -1661.106567,
"y": 316.359406
},
"parameters": {
"count": 100,
"count": 25,
"opacity": 0,
"rotate": 180,
"scale": 0,
"scale_x": 0.05,
"scale_y": 0.05,
"scale_x": 0.1,
"scale_y": 0.1,
"select_inputs": 0,
"variations": false
},
@ -793,8 +811,8 @@
{
"name": "buffer_2",
"node_position": {
"x": -1043.768799,
"y": 313.091156
"x": -1364.888794,
"y": 323.171173
},
"parameters": {
"size": 11
@ -806,8 +824,8 @@
{
"name": "shape_2",
"node_position": {
"x": -1585.778931,
"y": 408.345734
"x": -1906.898926,
"y": 418.425751
},
"parameters": {
"edge": 0,
@ -830,17 +848,17 @@
"points": [
{
"a": 1,
"b": 0.031738,
"g": 0.104694,
"b": 0.131104,
"g": 0.164148,
"pos": 0,
"r": 0.15625
"r": 0.1875
},
{
"a": 1,
"b": 0.038681,
"g": 0.114346,
"b": 0.153458,
"g": 0.221731,
"pos": 1,
"r": 0.253906
"r": 0.347656
}
],
"type": "Gradient"
@ -852,34 +870,34 @@
{
"name": "fbm2",
"node_position": {
"x": -1060.343384,
"y": 59.759666
"x": -1106.343384,
"y": 60.759666
},
"parameters": {
"folds": 0,
"iterations": 5,
"noise": 0,
"offset": 0,
"persistence": 0.5,
"scale_x": 10,
"scale_y": 10
"persistence": 0.8,
"scale_x": 56,
"scale_y": 56
},
"seed_int": 1560802304,
"seed_int": 2835422720,
"type": "fbm2"
},
{
"name": "splatter_color_3",
"node_position": {
"x": -1343.273438,
"y": 560.172607
"x": -1664.393433,
"y": 570.252563
},
"parameters": {
"count": 100,
"count": 25,
"opacity": 0,
"rotate": 180,
"scale": 0,
"scale_x": 0.05,
"scale_y": 0.05,
"scale_x": 0.1,
"scale_y": 0.1,
"select_inputs": 0,
"variations": false
},
@ -890,8 +908,8 @@
{
"name": "splatter_color_4",
"node_position": {
"x": -786.262329,
"y": 577.464539
"x": -1107.382324,
"y": 587.544556
},
"parameters": {
"count": 91,
@ -910,8 +928,8 @@
{
"name": "buffer_3",
"node_position": {
"x": -1041.671997,
"y": 569.661011
"x": -1362.791992,
"y": 579.741028
},
"parameters": {
"size": 11
@ -923,17 +941,47 @@
{
"name": "normal_map2",
"node_position": {
"x": -492.839508,
"y": 579.223999
"x": -413.839508,
"y": 359.223999
},
"parameters": {
"buffer": 1,
"param2": 0,
"size": 11,
"strength": 0.04
"strength": 0.99
},
"seed_int": 0,
"type": "normal_map2"
},
{
"name": "math",
"node_position": {
"x": -626.700562,
"y": 374.685303
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 0
},
"seed_int": 0,
"type": "math"
},
{
"name": "math_2",
"node_position": {
"x": -863.68103,
"y": 361.024048
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0.89,
"op": 2
},
"seed_int": 0,
"type": "math"
}
],
"parameters": {

View file

@ -72,17 +72,35 @@
"to": "splatter_color_4",
"to_port": 0
},
{
"from": "normal_map2",
"from_port": 0,
"to": "Material",
"to_port": 4
},
{
"from": "splatter_color_4",
"from_port": 0,
"to": "math",
"to_port": 1
},
{
"from": "math",
"from_port": 0,
"to": "normal_map2",
"to_port": 0
},
{
"from": "normal_map2",
"from": "fbm2",
"from_port": 0,
"to": "Material",
"to_port": 4
"to": "math_2",
"to_port": 0
},
{
"from": "math_2",
"from_port": 0,
"to": "math",
"to_port": 0
}
],
"label": "Graph",
@ -101,8 +119,8 @@
},
"name": "Material",
"node_position": {
"x": -198.423416,
"y": 226.924652
"x": -386.841217,
"y": 292.341339
},
"parameters": {
"albedo_color": {
@ -128,8 +146,8 @@
{
"name": "splatter_color",
"node_position": {
"x": -791.793091,
"y": 317.725281
"x": -1425.793091,
"y": 318.725281
},
"parameters": {
"count": 91,
@ -296,8 +314,8 @@
"longdesc": "",
"name": "graph",
"node_position": {
"x": -1546.436768,
"y": 284.510437
"x": -2180.436768,
"y": 285.510437
},
"nodes": [
{
@ -760,8 +778,8 @@
"generic_size": 1,
"name": "blend2_2",
"node_position": {
"x": -489.832764,
"y": 229.591202
"x": -948.806091,
"y": 292.396759
},
"parameters": {
"amount1": 1,
@ -773,8 +791,8 @@
{
"name": "splatter_color_2",
"node_position": {
"x": -1339.98645,
"y": 306.279388
"x": -1973.98645,
"y": 307.279388
},
"parameters": {
"count": 10,
@ -793,8 +811,8 @@
{
"name": "buffer_2",
"node_position": {
"x": -1043.768799,
"y": 313.091156
"x": -1677.768799,
"y": 314.091156
},
"parameters": {
"size": 11
@ -806,8 +824,8 @@
{
"name": "shape_2",
"node_position": {
"x": -1585.778931,
"y": 408.345734
"x": -2219.778809,
"y": 409.345734
},
"parameters": {
"edge": 0,
@ -821,8 +839,8 @@
{
"name": "colorize",
"node_position": {
"x": -747.389404,
"y": 224.760132
"x": -1161.668335,
"y": 71.621239
},
"parameters": {
"gradient": {
@ -837,10 +855,10 @@
},
{
"a": 1,
"b": 0.069809,
"g": 0.292969,
"b": 0.031906,
"g": 0.199219,
"pos": 1,
"r": 0.181389
"r": 0.115562
}
],
"type": "Gradient"
@ -852,17 +870,17 @@
{
"name": "fbm2",
"node_position": {
"x": -1094.343384,
"y": 44.759666
"x": -1420.343384,
"y": 75.759666
},
"parameters": {
"folds": 0,
"iterations": 5,
"iterations": 4,
"noise": 0,
"offset": 0,
"persistence": 1,
"scale_x": 30,
"scale_y": 30
"scale_x": 100,
"scale_y": 100
},
"seed_int": 1560802304,
"type": "fbm2"
@ -870,8 +888,8 @@
{
"name": "splatter_color_3",
"node_position": {
"x": -1343.273438,
"y": 560.172607
"x": -1977.273438,
"y": 561.172607
},
"parameters": {
"count": 10,
@ -890,8 +908,8 @@
{
"name": "splatter_color_4",
"node_position": {
"x": -786.262329,
"y": 577.464539
"x": -1420.262329,
"y": 578.464539
},
"parameters": {
"count": 91,
@ -910,8 +928,8 @@
{
"name": "buffer_3",
"node_position": {
"x": -1041.671997,
"y": 569.661011
"x": -1675.671997,
"y": 570.661011
},
"parameters": {
"size": 11
@ -923,8 +941,8 @@
{
"name": "normal_map2",
"node_position": {
"x": -492.839508,
"y": 579.223999
"x": -600.17395,
"y": 524.835083
},
"parameters": {
"buffer": 1,
@ -934,6 +952,36 @@
},
"seed_int": 0,
"type": "normal_map2"
},
{
"name": "math",
"node_position": {
"x": -880.893921,
"y": 525.385376
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 0
},
"seed_int": 0,
"type": "math"
},
{
"name": "math_2",
"node_position": {
"x": -1123.893921,
"y": 467.385376
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 0
},
"seed_int": 0,
"type": "math"
}
],
"parameters": {

View file

@ -37,10 +37,28 @@
"to_port": 0
},
{
"from": "blend2",
"from": "fbm2_2",
"from_port": 0,
"to": "math",
"to_port": 0
},
{
"from": "math",
"from_port": 0,
"to": "normal_map2",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "decompose",
"to_port": 0
},
{
"from": "decompose",
"from_port": 3,
"to": "math",
"to_port": 1
}
],
"label": "Graph",
@ -52,9 +70,9 @@
},
"nodes": [
{
"export_last_target": "Godot/Godot 4 Standard",
"export_last_target": "Blender",
"export_paths": {
"Blender": "/home/sara/Documents/gd-projects/going/project/materials/leaves",
"Blender": "/home/sara/Documents/gd-projects/going/project/materials/forest_path",
"Godot/Godot 4 Standard": "/home/sara/Documents/gd-projects/going/project/materials/forest_background"
},
"name": "Material",
@ -86,14 +104,14 @@
{
"name": "normal_map2",
"node_position": {
"x": -26.293844,
"y": 770.812927
"x": -1.449733,
"y": 389.164001
},
"parameters": {
"buffer": 1,
"param2": 0,
"size": 11,
"strength": 0.04
"strength": 1
},
"seed_int": 0,
"type": "normal_map2"
@ -101,14 +119,14 @@
{
"name": "voronoi2",
"node_position": {
"x": -1831.151123,
"y": 801.731445
"x": -920.193176,
"y": 453.709656
},
"parameters": {
"intensity": 1,
"randomness": 0.85,
"scale_x": 20,
"scale_y": 20,
"scale_x": 10,
"scale_y": 10,
"stretch_x": 1,
"stretch_y": 1
},
@ -118,8 +136,8 @@
{
"name": "colorize_2",
"node_position": {
"x": -1529.762695,
"y": 784.490662
"x": -478.693665,
"y": 303.052216
},
"parameters": {
"gradient": {
@ -156,8 +174,8 @@
{
"name": "fbm2_2",
"node_position": {
"x": -1852.425293,
"y": 567.349365
"x": -913.745178,
"y": 232.883148
},
"parameters": {
"folds": 0,
@ -174,8 +192,8 @@
{
"name": "colorize_3",
"node_position": {
"x": -1512.30957,
"y": 564.000488
"x": -479.851654,
"y": 232.562012
},
"parameters": {
"gradient": {
@ -213,8 +231,8 @@
"generic_size": 2,
"name": "blend2",
"node_position": {
"x": -898.559509,
"y": 193.264801
"x": -80.948402,
"y": 210.959229
},
"parameters": {
"amount1": 1,
@ -224,6 +242,33 @@
},
"seed_int": 0,
"type": "blend2"
},
{
"name": "math",
"node_position": {
"x": -257.925568,
"y": 386.996735
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 14
},
"seed_int": 0,
"type": "math"
},
{
"name": "decompose",
"node_position": {
"x": -509.314453,
"y": 458.830078
},
"parameters": {
},
"seed_int": 0,
"type": "decompose"
}
],
"parameters": {

253
materials/stone.ptex Normal file
View file

@ -0,0 +1,253 @@
{
"connections": [
{
"from": "voronoi2",
"from_port": 1,
"to": "math",
"to_port": 0
},
{
"from": "voronoi2_2",
"from_port": 1,
"to": "math",
"to_port": 1
},
{
"from": "math",
"from_port": 0,
"to": "math_2",
"to_port": 0
},
{
"from": "math_2",
"from_port": 0,
"to": "math_3",
"to_port": 0
},
{
"from": "math_3",
"from_port": 0,
"to": "colorize",
"to_port": 0
},
{
"from": "fbm2",
"from_port": 0,
"to": "math_3",
"to_port": 1
},
{
"from": "colorize",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "math_3",
"from_port": 0,
"to": "normal_map2",
"to_port": 0
},
{
"from": "normal_map2",
"from_port": 0,
"to": "Material",
"to_port": 4
}
],
"label": "Graph",
"longdesc": "",
"name": "@@457",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"export_paths": {
},
"name": "Material",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao": 1,
"depth_scale": 0.5,
"emission_energy": 1,
"flags_transparent": true,
"metallic": 0.18,
"normal": 1,
"roughness": 0.75,
"size": 11,
"sss": 1
},
"seed_int": 0,
"type": "material"
},
{
"name": "voronoi2",
"node_position": {
"x": -1558.648071,
"y": 43.027004
},
"parameters": {
"intensity": 1,
"randomness": 0.85,
"scale_x": 5,
"scale_y": 5,
"stretch_x": 1,
"stretch_y": 1
},
"seed_int": 3400064256,
"type": "voronoi2"
},
{
"name": "voronoi2_2",
"node_position": {
"x": -1545.386719,
"y": 266.722321
},
"parameters": {
"intensity": 1,
"randomness": 0.85,
"scale_x": 8,
"scale_y": 8,
"stretch_x": 1,
"stretch_y": 1
},
"seed_int": 805130240,
"type": "voronoi2"
},
{
"name": "math",
"node_position": {
"x": -1213.068115,
"y": 39.681469
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 2
},
"seed_int": 0,
"type": "math"
},
{
"name": "math_2",
"node_position": {
"x": -899.603638,
"y": 8.817272
},
"parameters": {
"clamp": true,
"default_in1": 0,
"default_in2": 6.23,
"op": 2
},
"seed_int": 0,
"type": "math"
},
{
"name": "colorize",
"node_position": {
"x": -367.710571,
"y": -1.664642
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0.355469,
"g": 0.382843,
"pos": 0,
"r": 0.40625
},
{
"a": 1,
"b": 0.254562,
"g": 0.277418,
"pos": 0.725558,
"r": 0.324219
},
{
"a": 1,
"b": 0.265625,
"g": 0.265625,
"pos": 1,
"r": 0.265625
}
],
"type": "Gradient"
}
},
"seed_int": 0,
"type": "colorize"
},
{
"name": "fbm2",
"node_position": {
"x": -916.424316,
"y": 197.811035
},
"parameters": {
"folds": 0,
"iterations": 5,
"noise": 0,
"offset": 0,
"persistence": 0.68,
"scale_x": 12,
"scale_y": 10
},
"seed_int": 3145071360,
"type": "fbm2"
},
{
"name": "math_3",
"node_position": {
"x": -631.64917,
"y": -25.611832
},
"parameters": {
"clamp": false,
"default_in1": 0,
"default_in2": 0,
"op": 0
},
"seed_int": 0,
"type": "math"
},
{
"name": "normal_map2",
"node_position": {
"x": -344.217163,
"y": 215.993896
},
"parameters": {
"buffer": 1,
"param2": 0,
"size": 11,
"strength": 1
},
"seed_int": 0,
"type": "normal_map2"
}
],
"parameters": {
},
"seed_int": 0,
"shortdesc": "",
"type": "graph"
}

View file

@ -5,7 +5,7 @@
albedo_color = Color(1, 1, 1, 1)
albedo_texture = ExtResource( 1 )
metallic = 0.5
roughness = 1
roughness = 0.99
normal_enabled = true
normal_scale = 1
normal_texture = ExtResource( 3 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 MiB

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 MiB

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fj0r2x60obxu"
path.s3tc="res://.godot/imported/rock_albedo.png-3db7a3d807031a181dd8b984567e86c6.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/rock_albedo.png"
dest_files=["res://.godot/imported/rock_albedo.png-3db7a3d807031a181dd8b984567e86c6.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3libaaq2jrrh"
path.s3tc="res://.godot/imported/rock_normal.png-0e8750e3e66835c61e06f50b7544661c.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/rock_normal.png"
dest_files=["res://.godot/imported/rock_normal.png-0e8750e3e66835c61e06f50b7544661c.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://materials/rock_normal.png"
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0