Skip to content

Commit

Permalink
1_7_5
Browse files Browse the repository at this point in the history
Merged commits by @chri11g6 (Thank You) that add optional height texture and fix node locations so the node layout looks better.
  • Loading branch information
DigiKrafting committed Jul 21, 2019
1 parent 0f8d171 commit 4b46d8c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Pipeline/Workflow import/export for Substance Painter.
- Autosave before export option.
- Use Relative Paths option.
- Creates nodes for Unreal Engine Textures. * (On detection of OcclusionRoughnessMetallic texture)
- Optional Height Maps (Combines Height and Normal maps using the Bump Node, use with care, see screenshots below)

## Selected Mesh

Expand Down Expand Up @@ -64,4 +65,10 @@ Installing an Addon in Blender

![alt](/screenshots/sp_prefs.png)

## Normal Map (* Eevee with Ambient Occlusion enabled)

![alt](/screenshots/sp_Map_Normal.png)

## Height Map combined with Normal Map (* Eevee with Ambient Occlusion enabled)

![alt](/screenshots/sp_Map_Normal_Height.png)
14 changes: 10 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"name": "DKS Substance Painter",
"description": "Substance Painter Pipeline",
"author": "DigiKrafting.Studio",
"version": (1, 7, 2),
"version": (1, 7, 5),
"blender": (2, 80, 0),
"location": "Info Toolbar, File -> Import, File -> Export, Menu",
"wiki_url": "https://github.com/DigiKrafting/blender_addon_substance_painter/wiki",
Expand Down Expand Up @@ -79,13 +79,18 @@ class dks_sp_addon_prefs(bpy.types.AddonPreferences):
option_relative : bpy.props.BoolProperty(
name="Relative Paths",
description="Use Relative Paths for images.",
default = True
default=True
)
option_no_new : bpy.props.BoolProperty(
name="2018.0.1-2018.3.0 Project File Fix",
description="Exclude from path for SP 2018.0.1-2018.3.0 to avoid it being added to the textures path.",
default = False
)
default=False
)
option_use_height_maps : bpy.props.BoolProperty(
name="Use Height Maps",
description="Combines Height and Normal maps using the Bump Node.",
default=False,
)
def draw(self, context):

layout = self.layout
Expand All @@ -104,6 +109,7 @@ def draw(self, context):
box.prop(self, 'option_relative')
box.prop(self, 'option_no_new')
box.prop(self, 'option_save_before_export')
box.prop(self, 'option_use_height_maps')

class dks_sp_menu(bpy.types.Menu):

Expand Down
5 changes: 4 additions & 1 deletion dks_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ def execute(self, context):
node.image.colorspace_settings.name = 'Non-Color'

# Height
if _file_Height:

if bpy.context.preferences.addons[__package__].preferences.option_use_height_maps and _file_Height:

frame_1= _nodes.new('NodeFrame')
frame_1.location = -390, -837
Expand Down Expand Up @@ -365,7 +366,9 @@ def execute(self, context):
node.image.colorspace_settings.name = 'Non-Color'

else:

# Normal

node_map=_nodes.new('ShaderNodeNormalMap')
node_map.location = 200,-700
node_map.name='dks_pbr_normal_map'
Expand Down
Binary file added screenshots/sp_Map_Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/sp_Map_Normal_Height.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b46d8c

Please sign in to comment.