http://www.miikahweb.com/feed.php MiikaHweb - Blender Temp-decklink Branch http://www.miikahweb.com/ MiikaHweb - Blender Temp-decklink Branch fi Fri, 06 Dec 19 16:21:23 +0000 MiikaHweb RSS contact at miikahweb.com <![CDATA[[a8809e3]: Decklink: remove old versions headers]]> http://www.miikahweb.com/en/blender/git-logs/commit/a8809e3ab54f8d19dc0ee72021fcdf894442249e a8809e3
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
Decklink: remove old versions headers

----------------------------------------
12 Paths Changed]]>
Fri, 10 Jun 2016 11:44:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/a8809e3ab54f8d19dc0ee72021fcdf894442249eBenoit Bolsee
<![CDATA[[d20fe9a]: VideoTexture: remove C++11 warning]]> http://www.miikahweb.com/en/blender/git-logs/commit/d20fe9a9bc932e99ce56ec3c7109d8fafeaa1fbe d20fe9a
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
VideoTexture: remove C++11 warning

Throwing in a destructor in c++11 would cause immediate crash of blender.
Replaced the throw with a message on the console.

----------------------------------------
1 Path Changed]]>
Fri, 10 Jun 2016 11:31:48 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/d20fe9a9bc932e99ce56ec3c7109d8fafeaa1fbeBenoit Bolsee
<![CDATA[[cb10fca]: Cleanup: strip ws]]> http://www.miikahweb.com/en/blender/git-logs/commit/cb10fcaed46c2583cd3daffdff12f6283c85598b cb10fca
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
Cleanup: strip ws

----------------------------------------
1 Path Changed]]>
Fri, 10 Jun 2016 10:25:06 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/cb10fcaed46c2583cd3daffdff12f6283c85598bCampbell Barton
<![CDATA[[9b76dd1]: CMake: rename WITH_DECKLINK -> WITH_GAMEENGINE_DECKLINK]]> http://www.miikahweb.com/en/blender/git-logs/commit/9b76dd10858313a9c6ca4733cd8ddc21d2d93842 9b76dd1
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
CMake: rename WITH_DECKLINK -> WITH_GAMEENGINE_DECKLINK

----------------------------------------
11 Paths Changed]]>
Fri, 10 Jun 2016 10:07:44 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/9b76dd10858313a9c6ca4733cd8ddc21d2d93842Campbell Barton
<![CDATA[[9853ecf]: Cleanup: indentation & minor formatting]]> http://www.miikahweb.com/en/blender/git-logs/commit/9853ecfd54b74d885384f8fb5ffd4c1b5dded25a 9853ecf
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
Cleanup: indentation & minor formatting

----------------------------------------
9 Paths Changed]]>
Fri, 10 Jun 2016 09:59:52 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/9853ecfd54b74d885384f8fb5ffd4c1b5dded25aCampbell Barton
<![CDATA[[80009d1]: Minor fixes for RST docs]]> http://www.miikahweb.com/en/blender/git-logs/commit/80009d1766ae84c1a0ee3065d95221e5abb75f5a 80009d1
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
Minor fixes for RST docs

----------------------------------------
1 Path Changed]]>
Fri, 10 Jun 2016 09:26:05 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/80009d1766ae84c1a0ee3065d95221e5abb75f5aCampbell Barton
<![CDATA[[1b6067b]: Correct hasattr for code using item access]]> http://www.miikahweb.com/en/blender/git-logs/commit/1b6067b5678a37fc1aec7016300f8453b1984995 1b6067b
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
Correct hasattr for code using item access

Also minor cleanup

----------------------------------------
1 Path Changed]]>
Fri, 10 Jun 2016 08:48:54 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/1b6067b5678a37fc1aec7016300f8453b1984995Campbell Barton
<![CDATA[[26b1114]: BGE: DeckLink card support for video capture and streaming.]]> http://www.miikahweb.com/en/blender/git-logs/commit/26b11140ada2994fd8846fb903e1f6bc90fbe8f6 26b1114
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
BGE: DeckLink card support for video capture and streaming.

You can capture and stream video in the BGE using the DeckLink video
cards from Black Magic Design. You need a card and Desktop Video software
version 10.4 or above to use these features in the BGE.
Many thanks to Nuno Estanquiero who tested the patch extensively
on a variety of Decklink products, it wouldn't have been possible without
his help.
You can find a brief summary of the decklink features here: https://wiki.blender.org/index.php/Dev:Source/GameEngine/Decklink
The full API details and samples are in the Python API documentation.

bge.texture.VideoDeckLink(format, capture=0):

Use this object to capture a video stream. the format argument describes
the video and pixel formats and the capture argument the card number.
This object can be used as a source for bge.texture.Texture so that the frame
is sent to the GPU, or by itself using the new refresh method to get the video
frame in a buffer.
The frames are usually not in RGB but in YUV format (8bit or 10bit); they
require a shader to extract the RGB components in the GPU. Details and sample
shaders in the documentation.
3D video capture is supported: the frames are double height with left and right
eyes in top-bottom order. The 'eye' uniform (see setUniformEyef) can be used to
sample the 3D frame when the BGE is also in stereo mode. This allows to composite
a 3D video stream with a 3D scene and render it in stereo.
In Windows, and if you have a nVidia Quadro GPU, you can benefit of an additional
performance boost by using 'GPUDirect': a method to send a video frame to the GPU
without going through the OGL driver. The 'pinned memory' OGL extension is also
supported (only on high-end AMD GPU) with the same effect.

bge.texture.DeckLink(cardIdx=0, format=""):

Use this object to send video frame to a DeckLink card. Only the immediate mode
is supported, the scheduled mode is not implemented.
This object is similar to bge.texture.Texture: you need to attach a image source
and call refresh() to compute and send the frame to the card.
This object is best suited for video keying: a video stream (not captured) flows
through the card and the frame you send to the card are displayed above it (the
card does the compositing automatically based on the alpha channel).
At the time of this commit, 3D video keying is supported in the BGE but not in the
DeckLink card due to a color space issue.

----------------------------------------
42 Paths Changed]]>
Fri, 10 Jun 2016 08:09:26 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/26b11140ada2994fd8846fb903e1f6bc90fbe8f6Benoit Bolsee
<![CDATA[[0120e30]: Cleanup: formatting, also add header guards]]> http://www.miikahweb.com/en/blender/git-logs/commit/0120e30406a8bcb6c403f5f00d1de51c03187826 0120e30
Branches : temp-decklink
Author : Campbell Barton (campbellbarton)
----------------------------------------
Cleanup: formatting, also add header guards

----------------------------------------
20 Paths Changed]]>
Thu, 09 Jun 2016 23:00:59 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/0120e30406a8bcb6c403f5f00d1de51c03187826Campbell Barton
<![CDATA[[88de57a]: BL_Shader.setUniformEyef(name)]]> http://www.miikahweb.com/en/blender/git-logs/commit/88de57a9e134993ec1ad98c8f29b63e9395dfa4c 88de57a
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
BL_Shader.setUniformEyef(name)

defines a uniform that reflects the eye being rendered in stereo mode:
0.0 for the left eye, 0.5 for the right eye.
In non stereo mode, the value of the uniform is fixed to 0.0.
The typical use of this uniform is in stereo mode to sample stereo textures
containing the left and right eye images in a top-bottom order.

python:
shader = obj.meshes[0].materials[mat].getShader()
shader.setUniformEyef("eye")

shader:
uniform float eye;
uniform sampler2D tex;
void main(void)
{
vec4 color;
float ty, tx;
tx = gl_TexCoord[0].x;
ty = eye+gl_TexCoord[0].y*0.5;
// ty will be between 0 and 0.5 for the left eye render
// and 0.5 and 1.0 for the right eye render.
color = texture(tex, vec2(tx, ty));
...
}

----------------------------------------
3 Paths Changed]]>
Thu, 09 Jun 2016 22:28:19 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/88de57a9e134993ec1ad98c8f29b63e9395dfa4cBenoit Bolsee
<![CDATA[[901d33e]: Atomic ops: Fix atomic_add_uint32 and atomic_sub_uint32 in...]]> http://www.miikahweb.com/en/blender/git-logs/commit/901d33ed0cc9df98173f4e955212497fc871f118 901d33e
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
Atomic ops: Fix atomic_add_uint32 and atomic_sub_uint32 in Windows

The assembler version in Windows used to return the previous value
of the variable while all the other versions return the new value.
This is now fixed for consistency.
Note: this bug had no effect on blender because no part of the code
use the return value of these functions, but the future BGE DeckLink
module makes use of it to implement reference counter.

----------------------------------------
1 Path Changed]]>
Thu, 09 Jun 2016 22:00:33 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/901d33ed0cc9df98173f4e955212497fc871f118Benoit Bolsee
<![CDATA[[8089876]: BGE: Various render improvements.]]> http://www.miikahweb.com/en/blender/git-logs/commit/808987680452f6b14610ca030411dbbce4aff70c 8089876
Branches : temp-decklink
Author : Benoit Bolsee (ben2610)
----------------------------------------
BGE: Various render improvements.

bge.logic.setRender(flag) to enable/disable render.
The render pass is enabled by default but it can be disabled with
bge.logic.setRender(False).
Once disabled, the render pass is skipped and a new logic frame starts
immediately. Note that VSync no longer limits the fps when render is off
but the 'Use Frame Rate' option in the Render Properties still does.
To run as many frames as possible, untick the option
This function is useful when you don't need the default render, e.g.
when doing offscreen render to an alternate device than the monitor.
Note that without VSync, you must limit the frame rate by other means.

fbo = bge.render.offScreenCreate(width,height,[,samples=0][,target=bge.render.RAS_OFS_RENDER_BUFFER])
Use this method to create an offscreen buffer of given size, with given MSAA
samples and targetting either a render buffer (bge.render.RAS_OFS_RENDER_BUFFER)
or a texture (bge.render.RAS_OFS_RENDER_TEXTURE). Use the former if you want to
retrieve the frame buffer on the host and the latter if you want to pass the render
to another context (texture are proper OGL object, render buffers aren't)
The object created by this function can only be used as a parameter of the
bge.texture.ImageRender() constructor to send the the render to the FBO rather
than to the frame buffer. This is best suited when you want to create a render
of specific size, or if you need an image with an alpha channel.

bge.texture.<imagetype>.refresh(buffer=None, format="RGBA", ts=-1.0)
Without arg, the refresh method of the image objects is pretty much a no-op, it
simply invalidates the image so that on next texture refresh, the image will
be recalculated.
It is now possible to pass an optional buffer object to transfer the image (and
recalculate it if it was invalid) to an external object. The object must implement
the 'buffer protocol'. The image will be transfered as "RGBA" or "BGRA" pixels
depending on format argument (only those 2 formats are supported) and ts is an
optional timestamp in the image depends on it (e.g. VideoFFmpeg playing a video file).
With this function you don't need anymore to link the image object to a Texture
object to use: the image object is self-sufficient.

bge.texture.ImageRender(scene, camera, fbo=None)
Render to buffer is possible by passing a FBO object (see offScreenCreate).

bge.texture.ImageRender.render()
Allows asynchronous render: call this method to render the scene but without
extracting the pixels yet. The function returns as soon as the render commands
have been send to the GPU. The render will proceed asynchronously in the GPU
while the host can perform other tasks.
To complete the render, you can either call refresh() directly of refresh the texture
to which this object is the source. Asynchronous render is useful to achieve optimal
performance: call render() on frame N and refresh() on frame N+1 to give as much as
time as possible to the GPU to render the frame while the game engine can perform other tasks.

Support negative scale on camera.
Camera scale was previously ignored in the BGE.
It is now injected in the modelview matrix as a vertical or horizontal flip
of the scene (respectively if scaleY<0 and scaleX<0).
Note that the actual value of the scale is not used, only the sign.
This allows to flip the image produced by ImageRender() without any performance
degradation: the flip is integrated in the render itself.

Optimized image transfer from ImageRender to buffer.
Previously, images that were transferred to the host were always going through
buffers in VideoTexture. It is now possible to transfer ImageRender
images to external buffer without intermediate copy (i.e. directly from OGL to buffer)
if the attributes of the ImageRender objects are set as follow:
flip=False, alpha=True, scale=False, depth=False, zbuff=False.
(if you need to flip the image, use camera negative scale)

----------------------------------------
39 Paths Changed]]>
Thu, 09 Jun 2016 21:56:45 +0000 http://www.miikahweb.com/en/blender/git-logs/commit/808987680452f6b14610ca030411dbbce4aff70cBenoit Bolsee