Skip to content

Commit

Permalink
RGBD update
Browse files Browse the repository at this point in the history
  • Loading branch information
Naxela committed Oct 19, 2020
1 parent 137b279 commit f6b0477
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Binary file modified addon/assets/tlm_data.blend
Binary file not shown.
2 changes: 1 addition & 1 deletion addon/properties/scene.py
Expand Up @@ -196,7 +196,7 @@ class TLM_SceneProperties(bpy.types.PropertyGroup):
default='CPU')

encoding_modes_1 = [('RGBM', 'RGBM', '8-bit HDR encoding. Good for compatibility, good for memory but has banding issues.'),
('RGBD', 'RGBD', '8-bit HDR encoding. Similar to RGBM.'),
#('RGBD', 'RGBD', '8-bit HDR encoding. Similar to RGBM.'),
('HDR', 'HDR', '32-bit HDR encoding. Best quality, but high memory usage and not compatible with all devices.')]

encoding_modes_2 = [('RGBM', 'RGBM', '8-bit HDR encoding. Good for compatibility, good for memory but has banding issues.'),
Expand Down
1 change: 0 additions & 1 deletion addon/utility/build.py
Expand Up @@ -657,7 +657,6 @@ def manage_build(background_pass=False):

if bpy.context.scene.TLM_EngineProperties.tlm_bake_mode == "Background":
pass
#bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath + "baked") #Crashes Blender

if scene.TLM_EngineProperties.tlm_setting_supersample == "2x":
supersampling_scale = 2
Expand Down
8 changes: 5 additions & 3 deletions addon/utility/encoding.py
Expand Up @@ -422,9 +422,11 @@ def encodeImageRGBDCPU(image, maxRange, outDir, quality):
d = max(maxRange / m, 1)
d = saturate(math.floor(d) / 255 )

result_pixel[i] = result_pixel[i] * d * 255 / maxRange
result_pixel[i+1] = result_pixel[i+1] * d * 255 / maxRange
result_pixel[i+2] = result_pixel[i+2] * d * 255 / maxRange
#TODO TO GAMMA SPACE

result_pixel[i] = math.pow(result_pixel[i] * d * 255 / maxRange, 1/2.2)
result_pixel[i+1] = math.pow(result_pixel[i+1] * d * 255 / maxRange, 1/2.2)
result_pixel[i+2] = math.pow(result_pixel[i+2] * d * 255 / maxRange, 1/2.2)
result_pixel[i+3] = d

target_image.pixels = result_pixel
Expand Down

0 comments on commit f6b0477

Please sign in to comment.