5 Commits

Author SHA1 Message Date
Ma Nan
66aafb41bd Merge pull request #50 from OmooLab/feature/dev
Feature/dev
2024-10-30 13:32:19 +08:00
2c844c01ec Merge branch 'main' of https://github.com/OmooLab/BioxelNodes into feature/dev 2024-10-30 13:30:50 +08:00
e5be3ad5db feat: better shader in eevee
feat: add more control to transform node
feat: add env light to reduse volume shadow in eevee
2024-10-30 13:29:53 +08:00
Ma Nan
29b302531b Merge pull request #49 from OmooLab/feature/dev
feat: improve eevee render
2024-10-29 15:15:14 +08:00
3ca7c2ac5a feat: improve eevee render 2024-10-29 15:14:31 +08:00
7 changed files with 46 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
schema_version = "1.0.0" schema_version = "1.0.0"
id = "bioxelnodes" id = "bioxelnodes"
version = "1.0.4" version = "1.0.6"
name = "Bioxel Nodes" name = "Bioxel Nodes"
tagline = "For scientific volumetric data visualization in Blender" tagline = "For scientific volumetric data visualization in Blender"
maintainer = "Ma Nan <icrdr2010@outlook.com>" maintainer = "Ma Nan <icrdr2010@outlook.com>"

View File

@@ -1,6 +1,6 @@
from pathlib import Path from pathlib import Path
VERSIONS = [{"label": "Latest", "node_version": (1, 0, 4)}, VERSIONS = [{"label": "Latest", "node_version": (1, 0, 6)},
{"label": "v0.3.x", "node_version": (0, 3, 3)}, {"label": "v0.3.x", "node_version": (0, 3, 3)},
{"label": "v0.2.x", "node_version": (0, 2, 9)}] {"label": "v0.2.x", "node_version": (0, 2, 9)}]

View File

@@ -19,7 +19,7 @@ from .operators.container import (AddLocator, AddSlicer, ContainerProps,
ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeShapeWire) ExtractNodeMesh, ExtractNodeBboxWire, ExtractNodeShapeWire)
from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor) from .operators.io import (ImportAsLabel, ImportAsScalar, ImportAsColor)
from .operators.misc import (CleanTemp, Help, from .operators.misc import (AddEeveeEnv, CleanTemp, Help,
ReLinkNodeLib, RemoveAllMissingLayers, ReLinkNodeLib, RemoveAllMissingLayers,
RenderSettingPreset, SaveAllLayersCache, RenderSettingPreset, SaveAllLayersCache,
SaveNodeLib, SliceViewer) SaveNodeLib, SliceViewer)
@@ -212,6 +212,7 @@ class BioxelNodesTopbarMenu(bpy.types.Menu):
layout.menu(DangerZoneMenu.bl_idname) layout.menu(DangerZoneMenu.bl_idname)
layout.separator() layout.separator()
layout.operator(AddEeveeEnv.bl_idname)
layout.menu(RenderSettingMenu.bl_idname) layout.menu(RenderSettingMenu.bl_idname)
layout.separator() layout.separator()

View File

@@ -854,6 +854,7 @@ class ImportVolumetricDataDialog(bpy.types.Operator):
bpy.ops.bioxelnodes.render_setting_preset('EXEC_DEFAULT', bpy.ops.bioxelnodes.render_setting_preset('EXEC_DEFAULT',
preset="balance") preset="balance")
bpy.context.scene.render.engine = 'CYCLES' bpy.context.scene.render.engine = 'CYCLES'
bpy.ops.bioxelnodes.slice_viewer('EXEC_DEFAULT')
self.report({"INFO"}, "Successfully Imported") self.report({"INFO"}, "Successfully Imported")
return {'FINISHED'} return {'FINISHED'}

View File

@@ -146,7 +146,7 @@ class RenderSettingPreset(bpy.types.Operator):
def execute(self, context): def execute(self, context):
if self.preset == "performance": if self.preset == "performance":
# EEVEE # EEVEE
bpy.context.scene.eevee.use_taa_reprojection = False # bpy.context.scene.eevee.use_taa_reprojection = False
bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_tile_size = '2'
bpy.context.scene.eevee.volumetric_shadow_samples = 32 bpy.context.scene.eevee.volumetric_shadow_samples = 32
bpy.context.scene.eevee.volumetric_samples = 64 bpy.context.scene.eevee.volumetric_samples = 64
@@ -162,7 +162,7 @@ class RenderSettingPreset(bpy.types.Operator):
elif self.preset == "balance": elif self.preset == "balance":
# EEVEE # EEVEE
bpy.context.scene.eevee.use_taa_reprojection = False # bpy.context.scene.eevee.use_taa_reprojection = False
bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_tile_size = '2'
bpy.context.scene.eevee.volumetric_shadow_samples = 64 bpy.context.scene.eevee.volumetric_shadow_samples = 64
bpy.context.scene.eevee.volumetric_samples = 128 bpy.context.scene.eevee.volumetric_samples = 128
@@ -178,7 +178,7 @@ class RenderSettingPreset(bpy.types.Operator):
elif self.preset == "quality": elif self.preset == "quality":
# EEVEE # EEVEE
bpy.context.scene.eevee.use_taa_reprojection = False # bpy.context.scene.eevee.use_taa_reprojection = False
bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_tile_size = '2'
bpy.context.scene.eevee.volumetric_shadow_samples = 128 bpy.context.scene.eevee.volumetric_shadow_samples = 128
bpy.context.scene.eevee.volumetric_samples = 256 bpy.context.scene.eevee.volumetric_samples = 256
@@ -202,7 +202,7 @@ class SliceViewer(bpy.types.Operator):
bl_icon = "FILE_VOLUME" bl_icon = "FILE_VOLUME"
def execute(self, context): def execute(self, context):
bpy.context.scene.eevee.use_taa_reprojection = False # bpy.context.scene.eevee.use_taa_reprojection = False
bpy.context.scene.eevee.volumetric_tile_size = '2' bpy.context.scene.eevee.volumetric_tile_size = '2'
bpy.context.scene.eevee.volumetric_shadow_samples = 128 bpy.context.scene.eevee.volumetric_shadow_samples = 128
bpy.context.scene.eevee.volumetric_samples = 128 bpy.context.scene.eevee.volumetric_samples = 128
@@ -274,3 +274,37 @@ class Help(bpy.types.Operator):
'https://omoolab.github.io/BioxelNodes/latest/', new=2) 'https://omoolab.github.io/BioxelNodes/latest/', new=2)
return {'FINISHED'} return {'FINISHED'}
class AddEeveeEnv(bpy.types.Operator):
bl_idname = "bioxelnodes.add_eevee_env"
bl_label = "Add EEVEE Env Light"
bl_description = "To make volume shadow less dark"
def execute(self, context):
bpy.ops.object.light_add(
type='POINT', align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
light_obj = bpy.context.active_object
light_obj.name = "EeveeEnv"
light_obj.data.shadow_soft_size = 100
light_obj.data.energy = 1e+06
light_obj.data.color = (0.1, 0.1, 0.1)
light_obj.data.use_shadow = False
light_obj.data.diffuse_factor = 0
light_obj.data.specular_factor = 0
light_obj.data.transmission_factor = 0
light_obj.hide_select = True
light_obj.lock_location[0] = True
light_obj.lock_location[1] = True
light_obj.lock_location[2] = True
light_obj.lock_rotation[0] = True
light_obj.lock_rotation[1] = True
light_obj.lock_rotation[2] = True
light_obj.lock_scale[0] = True
light_obj.lock_scale[1] = True
light_obj.lock_scale[2] = True
bpy.context.scene.eevee.use_volumetric_shadows = True
return {'FINISHED'}

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "bioxelnodes" name = "bioxelnodes"
version = "1.0.4" version = "1.0.6"
description = "" description = ""
authors = ["Ma Nan <icrdr2010@outlook.com>"] authors = ["Ma Nan <icrdr2010@outlook.com>"]
license = "MIT" license = "MIT"