Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-17Removing Blender Game Engine from Blender 2.8Dalai Felinto
Folders removed entirely: * //extern/recastnavigation * //intern/decklink * //intern/moto * //source/blender/editors/space_logic * //source/blenderplayer * //source/gameengine This includes DNA data and any reference to the BGE code in Blender itself. We are bumping the subversion. Pending tasks: * Tile/clamp code in image editor draw code. * Viewport drawing code (so much of this will go away because of BI removal that we can wait until then to remove this.
2018-03-30PyDoc: Merge manual docs for bge.textureAaron Carlisle
https://docs.blender.org/manual/en/dev/game_engine/python_api/videotexture.html Had a few things that this file did not while this file having things the other did not. To fix, I merged both documents into the python api.
2017-02-28Cleanup: Grey --> GrayAaron Carlisle
2016-06-22T48694: fix bge.texture.Texture.refresh() documentationBenoit Bolsee
first parameter is mandatory and must be a bool indicating if the image source should be refreshed after updating the texture.
2016-06-12Docs: Support out-of-source reference-API buildsCampbell Barton
This was originally supported, however relative links to examples & templates made it fail. Now files in the source tree are copied to the build-dir, with ".." replaced with "__" to avoid having to mirror Blender's source-layout in the Sphinx build-dir. Also skip uploading the built docs when an SSH user-name isn't passed to sphinx_doc_gen.sh instead of aborting (so people w/o SSH access to our servers can use the shell-script).
2016-06-12Cleanup: API docs (whitespace/line length)Campbell Barton
2016-06-11BGE: DeckLink card support for video capture and streaming.Benoit Bolsee
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.
2016-06-11BGE: Various render improvements.Benoit Bolsee
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)
2015-07-07Remove redundant lists, link insteadCampbell Barton
2015-07-07Remove unnecessary constant infoCampbell Barton
Noting every constant as an int isnt helping, this is only meant to be passed to only.
2015-07-06BGE: bge.texture API documentation enhancementQuentin Wenger
This patch attempts to improve and review the documentation of bge.texture, as requested in the [[ http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/GameEngine#Video_Texture | TODO list ]]. More specifically, it - fixes the rst syntax, including titles of the examples bge.texture.py and bge.texture.1.py; - adds, standardizes and reviews description of the API elements, particularly signatures, types, etc. - adds SOURCE_* constants to the doc - splits the doc into thematical parts (Video, Image, Texture, and Filter Classes, Functions, Constants). Notes: - The parameter "mode" of ImageBuff.plot has to be described better. Actually, the whole set of IMB_BLEND_* constants (from IMB_imbuf.h) should be exposed to Python. I'll do that in a future diff, and complete the doc at the same moment (adding those IMB_BLEND_* constants to the Constants part of this doc). - The option of using webcams in VideoFFmpeg is still particularly not well documented. I am planning to make a proposal about fixing T18634 (and its corresponding TODO in the list) by integrating OpenCV in the BGE (and Blender?). The idea would then probably be to add a new class, f.ex. ImageWebcam, making this functionnality more specialized. So for now I don't think it is worth to document that part much. This patch fixes T44284 too. Reviewers: moguri, kupoman, campbellbarton, panzergame, lordloki Reviewed By: panzergame, lordloki Subscribers: hg1 Projects: #game_engine, #game_python, #documentation Maniphest Tasks: T44284 Differential Revision: https://developer.blender.org/D1352
2015-06-16BGE: Fix for precision lost in setBackground/getBackground at Video TextureJorge Bernal
Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost. A check for int numbers is maintained to keep compatibility with old behaviour. Reviewers: ben2610, campbellbarton, moguri, hg1 Reviewed By: moguri, hg1 Subscribers: campbellbarton Projects: #game_engine Differential Revision: https://developer.blender.org/D1301
2012-10-21BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender.Benoit Bolsee
2 new attributes to ImageViewport and ImageRender object: depth: set to True to retrieve the depth buffer as an array of float (not suitable for texture source). zbuff: set to True to retrieve the depth buffer as a grey scale pixel array (suitable for texture source). A new mode 'F' is added to VideoTexture.imageToArray() to allow returning the image buffer as a one dimensional array of float. This mode should only be used to retrieve the depth buffer of ImageViewport and ImageRender objects. Example: viewport = VideoTexture.ImageViewport() viewport.depth = True depth = VideoTexture.imageToArray(viewport,'F') # show depth of bottom left pixel # 1.0 = infinite, 0.0 = on near clip plane. print(depth[0])
2012-01-23rst bge touch ups: making the title of the examples slightly more noticeableDalai Felinto
- it's still not correct, comparing to the other examples, but at least it looks okish. - fixed some small typos
2012-01-13bge api doc updateDalai Felinto
bge.texture materialId wasn't showing up bge.type was outdated (I removed the glew example, I hope no one mind)
2011-08-04rst API doc fixes: literalincluding bge.texture and bge.constraints examples ↵Dalai Felinto
+ bgl fixes
2011-07-31py api: sphinx doc corrections, pep8 cleanup and style edits, also added ↵Campbell Barton
__all__ to some modules which were missing it.
2011-07-31patch [#27909] Added constants in bge.constraints by Solano Felicio (solano) ↵Dalai Felinto
+ some changes in rst I named all the BGE modules with their actual names (e.g. Rasterizer, Video Texture, ...). so in the API index.html page they look more like the other Blender modules. I did the same for the bgl module. For bge.constraints this patch exposes the constants values for debug mode and createConstraints (they were hardcoded innts before). + making all the "todo" and #comments into rst comments (.. comments) Thanks Solano, it's great to get help to those tasks :)
2011-07-07bge.texture doc, needed whitespace to format correctly.Campbell Barton
2011-07-07some corrections to bge.texture docsCampbell Barton
2011-07-06moving bge.texture example to an external fileDalai Felinto
2011-07-06patch [#27871] bge.texture documentation from Solano Felício (+ changes ↵Dalai Felinto
from me) it still needs work ... and I can't test rst in windows so for now let's pretend it builds. If someone can generate the docs and see how it goes please let me know. (plus a small fix for bge.logic rst)