Skip to content

Commit

Permalink
new color management fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IASpaceAdmin committed Aug 6, 2021
1 parent 74c0c40 commit 49a20a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Spout addon for Blender
# Spout addon V1.3 for Blender 3.0.0

Spout for Blender allows to stream [spout](http://spout.zeal.co/) streams from blender.

This works only for Windows 10 64 bit.

## Installation

Please make sure you have the most current Blender 3.0.0 installed.

my personal preference to install addons:

1. create a folder called 'blender' inside documents (or any other name at a suitable location) and create the following folder structure inside:
Expand All @@ -16,7 +18,9 @@ my personal preference to install addons:

2. [download](https://github.com/maybites/blender.script.spout/releases) the addon, unzip it and drop the 'spout' folder inside the addons-folder

3. [download](https://github.com/maybites/blender.script.spout/releases/tag/Python_3.9) the Python SpoutSDK-library and drop it inside the modules-folder. ([download for blender < 2.93](https://github.com/maybites/Spout-for-Python/blob/master/Library/SpoutSDK.pyd))
3. [download](https://github.com/maybites/blender.script.spout/releases/tag/Python_3.9) the Python SpoutSDK-library and drop it inside the modules-folder.

4. Make sure the current python version is installed and added to the Path environment variable. (Checkbox during the installation)

(if somebody knows a better way to deal with the library, please let me know, but putting it next to the _init__ files doesn't work)

Expand Down Expand Up @@ -47,11 +51,6 @@ You should be able to create as many Cameras with streams as you wish.

The render settings are currently taken from the main 3d View settings.

## Issues

* Some Nvdia GFX-cards have a rendering problem in EEVEE when the render method is set to 'LookDev' and 'Rendered'. There is a [bug report](https://developer.blender.org/T61768) open where you can add your hardware specs if you encounter this issue.


## Syphon

No, this addon is unable to stream [syphon](http://syphon.v002.info/) on OSX. But I had a chat with the syphon developers and it is feasible to make it happen, too. The only thing that is needed is an Objective-C -> Python wrapper, which is doable. But unfortunately this is beyond my development abilities. If you think you have the necessary skills, please contact me. I would like to see Syphon for Blender happening, too.
Expand All @@ -61,4 +60,4 @@ No, this addon is unable to stream [syphon](http://syphon.v002.info/) on OSX. Bu
Blender Plugin by Martin Froehlich.

### Special Thanks:
Obviously Lyn Jarvis for developing Spout in the first place. And without the [Spout for Python library](https://github.com/maybites/Spout-for-Python) developed by Ryan Walker and the valuable [hint](https://docs.blender.org/api/blender2.8/gpu.html#rendering-the-3d-view-into-a-texture) from Jonas Dichelle I would still dab in darkness...
Obviously Lyn Jarvis for developing Spout in the first place. And without the [Spout for Python library](https://github.com/maybites/Spout-for-Python) developed by Ryan Walker and the valuable [hint](https://docs.blender.org/api/master/gpu.html#rendering-the-3d-view-into-a-texture) from Jonas Dichelle I would still dab in darkness...
16 changes: 12 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"name" : "Spout",
"author" : "Martin Froehlich",
"description" : "Streaming Spout from Blender",
"blender" : (2, 80, 0),
"version" : (1, 0),
"blender" : (3, 0, 0),
"version" : (1, 3),
"location" : "Properties > Camera > Camera data",
"warning" : "This plugin works only if the SpoutSDK.pyd is inside '~/scripts/modules'",
"warning" : "This plugin works only if the SpoutSDK.pyd is inside '~/scripts/modules' and Python39 is in the 'Path' user environment variable",
"category" : "Render",
"wiki_url" : "https://github.com/maybites/blender.script.spout",
"tracker_url" : "https://github.com/maybites/blender.script.spout/issues",
Expand All @@ -43,6 +43,7 @@ def texshare_capture(self, context, camera, object, offscreen, spoutSender):
scene = context.scene
dWIDTH = camera.texshare.capture_width
dHEIGHT = camera.texshare.capture_height
applyCM = camera.texshare.applyColorManagmentSettings

view_matrix = object.matrix_world.inverted()

Expand All @@ -55,7 +56,8 @@ def texshare_capture(self, context, camera, object, offscreen, spoutSender):
context.space_data,
context.region,
view_matrix,
projection_matrix)
projection_matrix,
applyCM)

bgl.glDisable(bgl.GL_DEPTH_TEST)
draw_texture_2d(offscreen.color_texture, (10, 10), 40, 40)
Expand Down Expand Up @@ -124,6 +126,11 @@ class TEXS_PG_camera_texshare_settings(bpy.types.PropertyGroup):
default = 0,
description = "inidicates if streaming is active"
)
applyColorManagmentSettings : bpy.props.BoolProperty(
name = "applyColorManagmentSettings",
default = 0,
description = "applies the current scenes color management settings"
)
capture_width : bpy.props.IntProperty(
name = "capture width",
default = 1280,
Expand Down Expand Up @@ -171,6 +178,7 @@ def draw(self, context):

row = layout.row(align=True)
row.prop(ob.data, "name", text="server name")
row.prop(camera.texshare, "applyColorManagmentSettings", text="apply color managment")

col = layout.column()

Expand Down

0 comments on commit 49a20a2

Please sign in to comment.