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
path: root/intern
AgeCommit message (Collapse)Author
2016-06-13Cycles: Fix unhandled enumerator in OSL switchSergey Sharybin
Unsigned int is not supported by OSL as far as i concerned, so should not really matter here. However, might be wrong and perhaps more proper idea would be so set it as regular int?
2016-06-12Fix build error with GCC 6.1.Brecht Van Lommel
2016-06-12Fix Cycles debug build assert on some platforms, tighten checks to avoid ↵Brecht Van Lommel
this in the future.
2016-06-12Cleanup, remove unneeded variable.Thomas Dinges
2016-06-12Fix compiler warning for unused variables.Thomas Dinges
2016-06-12Cycles: make shader node enums consistently lower case, update OSL shaders ↵Brecht Van Lommel
accordingly.
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-11Atomic ops: Fix atomic_add_uint32 and atomic_sub_uint32 in WindowsBenoit Bolsee
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.
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)
2016-06-11Fix Gradient Texture and OSL after refactor.Thomas Dinges
2016-06-11Attempted fix for T48625: tablet button configured to right click not ↵Brecht Van Lommel
working on OS X.
2016-06-11Cycles: nodify shader nodesBrecht Van Lommel
Differential Revision: https://developer.blender.org/D2038
2016-06-10Cleanup: brace-placementCampbell Barton
2016-06-09BGE: alpha on frame buffer and precedence of MSAA over swap.Benoit Bolsee
A new option '-a' can be passed to the blenderplayer. It forces the framebuffer to have an alpha channel. This can be used in VideoTexture to return a image with alpha channel with ImageViewport (provided alpha is set to True on the ImageViewport object and that the background color alpha channel is 0, which is the default). Without the -a option, the frame buffer has no alpha channel and ImageViewport always returns an opaque image, no matter what. In Linux, the player window will be rendered transparently over the desktop. In Windows, the player window is still rendered opaque because transparency of the window is only possible using the 'compositing' functions of Windows. The code is there but not enabled (look for WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires a DLL that is only available on Vista and up. give precedence to AA over Swap copy: Certain GPU (intel) will not allow MSAA together with swap copy. Previously, swap copy had priority over MSAA: fewer AA samples would be chosen if it was the condition to get swap copy. This patch reverse the logic: swap copy will be abandonned if another swap method (undefined or exchange) will provide the number of AA samples requested. If no AA samples is requested, swap copy still has the priority of course.
2016-06-08Cycles: Fix crash after recent zero scale instance optimizationSergey Sharybin
2016-06-08Cycles: Fix two numerical issues in the volume codeLukas Stockner
This hopefully fixes T48383 by avoiding two numerical problems that I found in the volume code. Reviewers: sergey, dingto, brecht Reviewed By: sergey, dingto, brecht Maniphest Tasks: T48383 Differential Revision: https://developer.blender.org/D2051
2016-06-07Cycles: Limit degenerated triangle check got CUDA onlySergey Sharybin
OpenCL seems to work fine here, and for some reason that comparison was giving compilation error on OpenCL here. Better to compile OpenCL kernel than to be fully robust to weird corner cases.
2016-06-07Cycles: Fix regression introduced in c96a4c8Mai Lavelle
A few places still needed to be updated to use the new Mesh::num_triangles() method; wrong number from triangles.size() was causing crashes.
2016-06-07Cycles: Use faster ray-quad-intersection testLukas Stockner
The original quad intersection test works by just testing against the two triangles that define the quad. However, in this case it's actually faster to use the same test that's also used for portals: Determining the distance to the plane in which the quad lies, calculating the hitpoint and checking whether it's in the quad by projecting onto the sides. Reviewers: brecht, sergey, dingto Reviewed By: dingto Differential Revision: https://developer.blender.org/D2045
2016-06-06Fix T48571: Cycles/GPU - A lot of fireflies on SSS+VolumeSergey Sharybin
Was some accumulated precision error happening.
2016-06-06Fix compilation error on 32 bit WindowsSergey Sharybin
2016-06-06Cycles: Fix compilation error on OSXSergey Sharybin
2016-06-06Cycles: Ignore zero size instances in BVHSergey Sharybin
In certain types of animation it's possible to have some objects scaling to zero. In this case we can save render times by avoid traversing such instances. Better to do ti ahead of a time, so traversal stays simple. Reviewers: lukasstockner97, dingto, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D2048
2016-06-06Cycles: Add support of processor groupsSergey Sharybin
Currently for windows only, this is an initial commit towards native support of NUMA. Current commit makes it so Cycles will use all logical processors on Windows running on system with more than 64 threads. Reviewers: juicyfruit, dingto, lukasstockner97, maiself, brecht Subscribers: LazyDodo Differential Revision: https://developer.blender.org/D2049
2016-06-05Fix T48580: path / branched path UI grayed out with OpenCL device that is ↵Brecht Van Lommel
not used.
2016-06-04Fix T48587, constant fold should only be done for Mix Type.Thomas Dinges
2016-06-04CMake, minor changes to make Visual studio 2015 use a compatible numpy andMartijn Berger
the standard cmake CUDA/NVCC arguments flag allowing 2015 build to use msvc 2013 for cuda
2016-06-03Cycles: Mark which CUDA device is used for displaySergey Sharybin
It is really handy to know which one is display when having two cards of same type in the machine.
2016-06-03Cycles: Simplify check for degenerated faces on GPUSergey Sharybin
Still not sure how to properly solve the issue, needs some trickery to get actual optimized values from intersection function (using printf() avoids some optimization and makes stuff render correct). For the time being let's just simplify check.
2016-06-01Usual UI/i18n message cleanup (get rid of last remaining 'addon' too).Bastien Montagne
2016-05-31Fix T46207: Slow OpenCL GPU bake and blown out baking Cycles renderSergey Sharybin
2016-05-31Cycles: Fixes for recent refactorSergey Sharybin
- add_vertex() can be called from split_vertex() which does not guarantee to have properly pre-allocate arrays. - Need to check whether Cycles is compiled with OSL in XML reader.
2016-05-31Cycles: Add human readable sizes to debug outputMai Lavelle
Some of these values can get quite large and are hard to read, adding this makes it easy to read them at a glance. Reviewed By: sergey Differential Revision: https://developer.blender.org/D2039
2016-05-31Fix T48556: Missing transparent shadows on AMD OpenCLSergey Sharybin
We had transparent shadows disabled for some time because they were causing drivers to crash. Can't reproduce that issue anymore with current drivers, so will enable them and see how it goes.
2016-05-31Fix broken Cycles curve motion radius after recent refactor, and fix warnings.Brecht Van Lommel
2016-05-30Depsgraph: Fix wrong layers flush form children to parentSergey Sharybin
It was possible to have issues in cases when several child dependencies goes to IDs with different layers. In this case order of flushing was not really well defined, which could lead to cases when indirect dependency via invisible object wouldn't work. Need some sort of barrier to prevent scheduling of parent nodes for until all children are done, but that's becoming quite nasty thing to implement. Added a temp field to component for now. maybe it's not so crazy actually and we might use it for evaluation as well, so we wouldn't flush updates to components which does not affect visible stuff.
2016-05-29Code refactor: store ShaderNode enums as enum rather than ustring.Brecht Van Lommel
2016-05-29Code refactor: centralize OSL node creation in shader manager.Brecht Van Lommel
2016-05-29Code refactor: pass ShaderInput to constant_fold, so it supports arbitrary ↵Brecht Van Lommel
types.
2016-05-29Code refactor: add separate RGB to BW node and rename some sockets.Brecht Van Lommel
2016-05-29Code refactor: minor node and node type utility functions and changes.Brecht Van Lommel
2016-05-29Fix debug mode assert in subd code after recent refactoring.Brecht Van Lommel
2016-05-28Code refactor: nodify object and mesh, but not used for XML yet.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-28Code refactor: modify mesh storage to use arrays rather than vectors, ↵Brecht Van Lommel
separate some arrays. Differential Revision: https://developer.blender.org/D2016
2016-05-28Code refactor: make ShaderNode match Node a bit more, reusing types and enums.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-28Code refactor: nodify Cycles camera and fix some mistakes in XML node read.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D2016
2016-05-28Fix T48526: Cycles viewport render incorrectly influenced by pixel aspect ratio.Brecht Van Lommel
This reverts 72592cfb, needs more refactoring to do that cleanup.
2016-05-28Cleanup: Further tweaks for consistency and simplifications.Thomas Dinges
Now I can start adding half float without adding even bigger mess to all these functions. ;)
2016-05-28Cleanup: Simplify and de-duplicate assignements in the ImageManager constructor.Thomas Dinges
2016-05-27Cleanup: Shorten texture variables, tex and image was kinda redundant.Thomas Dinges
Also make prefix consistent, so it starts with either TEX_NUM or TEX_START, followed by texture type and architecture.