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
2020-07-21Particles: initial object socket and emitter node supportJacques Lucke
Object sockets work now, but only the new Object Transforms and the Particle Mesh Emitter node use it. The emitter does not actually use the mesh surface yet. Instead, new particles are just emitted around the origin of the object. Internally, handles to object data blocks are passed around in the network, instead of raw object pointers. Using handles has a couple of benefits: * The caller of the function has control over which handles can be resolved and therefore limit access to specific data. The set of data blocks that is accessed by a node tree should be known statically. This is necessary for a proper integration with the dependency graph. * When the pointer to an object changes (e.g. after restarting Blender), all handles are still valid. * When an object is deleted, the handle is invalidated without causing crashes. * The handle is just an integer that can be stored per particle and can be cached easily. The mapping between handles and their corresponding data blocks is stored in the Simulation data block.
2020-07-20Cycles: adjust Sky texture intensity to follow physical unitsBrecht Van Lommel
The sky will appear brighter than before by default. To compensate for this, lower exposure in the Film panel. The default altitude was also changed from 90 to 15 degrees. Patch contributed by Marco with the help of Ryan Jones. Differential Revision: https://developer.blender.org/D8285
2020-07-20Refactor: Update integer type usageJacques Lucke
This updates the usage of integer types in code I wrote according to our new style guides. Major changes: * Use signed instead of unsigned integers in many places. * C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`). * Hash values for C++ containers are 64 bit wide now (instead of 32 bit). I do hope that I broke no builds, but it is quite likely that some compiler reports slightly different errors. Please let me know when there are any errors. If the fix is small, feel free to commit it yourself. I compiled successfully on linux with gcc and on windows.
2020-07-17Simulation: move initial simulation code from bf_blenkernel to bf_simulationJacques Lucke
I removed bf_blenkernel from `nodes/CMakeLists.txt` again (added it yesterday), because now this was causing me unresolved symbol errors... Without it, cmake seems to link the libraries bf_simulation, bf_blenkernel and bf_nodes in the right order. Not sure if that is just luck or if it is guaranteed. It was possible to fix the issue by using cmakes `LINK_INTERFACE_MULTIPLICITY`, but that is probably bad style.
2020-07-17BLI: add StringRefNull.c_str() methodJacques Lucke
This should be used whenever you rely on the fact, that the returned pointer points to the beginning of a null-terminated array.
2020-07-17Nodes: move some code from blenkernel directory to nodesJacques Lucke
This also introduces the `blender::nodes` namespace. Eventually, we want to move most/all of the node implementation files into this namespace. The reason for this file-move is that the code fits much better into the `nodes` directory than in the `blenkernel` directory.
2020-07-16Fix link error in bf_nodesJacques Lucke
I got undefined reference errors on the `NodeMFNetworkBuilder::get_default_fn` function under some circumstances. This symbol is definitely defined in bf_blenkernel. The error seemed a bit undeterministic and was probably caused by some incorrect link order. I don't get the error with this change.
2020-07-16Particles: support Separate/Combine RGB nodesJacques Lucke
2020-07-16Particles: simplify Combine XYZ nodeJacques Lucke
2020-07-16Particles: support Color Ramp nodeJacques Lucke
2020-07-16Particles: support Map Range nodeJacques Lucke
Only linear interpolation mode is supported for now.
2020-07-16Particles: implement more vector math operationsJacques Lucke
2020-07-16Particles: support for most math node operationsJacques Lucke
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-13Cycles: Add control for sun intensity in Sky Texture and change altitude to kmLukas Stockner
Differential Revision: https://developer.blender.org/D8091
2020-07-13Cycles: Remove Vector input on Sky texture when using the included sunLukas Stockner
When using the sun, we need to sun sampling logic to avoid excessive sampling map resolution, but that logic assumes that the Vector input comes from the view direction. That is the case in the vast majority of cases anyways, so the easiest solution is to just remove the input for that case. Differential Revision: https://developer.blender.org/D8091
2020-07-11Nodes: support vector math node in simulation node treeJacques Lucke
2020-07-11Nodes: support math node in simulation node treeJacques Lucke
2020-07-11Nodes: support Value node in simulation node treeJacques Lucke
2020-07-11Nodes: move Math, Vector Math and Value shader nodes to c++ filesJacques Lucke
This required a little bit of refactoring, because we were using c-only syntax for the gpu shader names. All tests are still passing.
2020-07-09Sculpt: Make Sculpt Vertex Colors features experimentalPablo Dobarro
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
2020-07-09EEVEE: Implement the missing Sky textureSzymon Ulatowski
I'm not sure if the Sky was deliberately left out or was just waiting for a better moment, but so many I was disappointed that Sky in EEVEE is completely white. There are already 2 implementations (osl and gpu) so this is the third one. Looking at other cases it seems that we are not supposed to share sources between cycles and the rest? So the new util_sky_model files are just copies of what is already in cycles, except that the data file uses the RGB variant of the Hosek/Wilkie model, because we output RGB anyway (but can be easily changed to XYZ if desired - the results are nearly identical). I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I wanted to use mat3 but it does not work). Also, should I cache the sky model data between renders if the parameters do not change? Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D7108
2020-07-07Cleanup: fix typoJacques Lucke
2020-07-07Nodes: Generate multi-function network from node treeJacques Lucke
This adds new callbacks to `bNodeSocketType` and `bNodeType`. Those are used to generate a multi-function network from a node tree. Later, this network is evaluated on e.g. particle data. Reviewers: brecht Differential Revision: https://developer.blender.org/D8169
2020-07-01Cleanup: spellingCampbell Barton
2020-06-30Cleanup: add missing extern "C"Jacques Lucke
2020-06-29Nodes: rename node_socket.c to node_socket.ccJacques Lucke
I have to add some C++ code in callbacks for socket types for the new particle system.
2020-06-29Cleanup: make some type casts explicitJacques Lucke
Doing this so that I turn this into a .cc file.
2020-06-24Fix T78080: group node has incorrect sockets after changing groupJacques Lucke
It was only checking for the identifier, but the type has to be equivalent as well. Reviewers: mano-wii, brecht Differential Revision: https://developer.blender.org/D8101
2020-06-17Cycles: Add new Sky Texture method including direct sunlightLukas Stockner
This commit adds a new model to the Sky Texture node, which is based on a method by Nishita et al. and works by basically simulating volumetric scattering in the atmosphere. By making some approximations (such as only considering single scattering), we get a fairly simple and fast simulation code that takes into account Rayleigh and Mie scattering as well as Ozone absorption. This code is used to precompute a 512x128 texture which is then looked up during render time, and is fast enough to allow real-time tweaking in the viewport. Due to the nature of the simulation, it exposes several parameters that allow for lots of flexibility in choosing the look and matching real-world conditions (such as Air/Dust/Ozone density and altitude). Additionally, the same volumetric approach can be used to compute absorption of the direct sunlight, so the model also supports adding direct sunlight. This makes it significantly easier to set up Sun+Sky illumination where the direction, intensity and color of the sun actually matches the sky. In order to support properly sampling the direct sun component, the commit also adds logic for sampling a specific area to the kernel light sampling code. This is combined with portal and background map sampling using MIS. This sampling logic works for the common case of having one Sky texture going into the Background shader, but if a custom input to the Vector node is used or if there are multiple Sky textures, it falls back to using only background map sampling (while automatically setting the resolution to 4096x2048 if auto resolution is used). More infos and preview can be found here: https://docs.google.com/document/d/1gQta0ygFWXTrl5Pmvl_nZRgUw0mWg0FJeRuNKS36m08/view Underlying model, implementation and documentation by Marco (@nacioss). Improvements, cleanup and sun sampling by @lukasstockner. Differential Revision: https://developer.blender.org/D7896
2020-06-09Fix T76984: Normal node not drawing properly in compositorEvan Wilson
Differential Revision: https://developer.blender.org/D7827
2020-06-03GPUMaterial: Fix shader compilation when using UDIM texturesClément Foucault
2020-06-03GPUMaterial: Rework/simplify image texture filteringClément Foucault
This use the latest GPUTexture change to use the sampler state to avoid the pole issues instead of using GLSL hacks. This should fix T73942: Eevee mipmaps not respecting border mode. Note that this also fix some discrepencies between cycles and eevee (like boxmapping + clip).
2020-06-03GPUMaterial: Rework/simplify environment texture filteringClément Foucault
This use the latest GPUTexture change to use the sampler state to avoid the pole issues instead of using GLSL hacks.
2020-06-03GPUMaterial: Add support for different sampler state per image samplerClément Foucault
This bridge between the new sampler state support from GPUTexture and draw material handling. The Sampler State is just the one from the texture for now. No change in logic.
2020-06-02EEVEE: Refactor of eevee_material.cClément Foucault
These are the modifications: -With DRW modification we reduce the number of passes we need to populate. -Rename passes for consistent naming. -Reduce complexity in code compilation -Cleanup how renderpass accumulation passes are setup, using pass instances. -Make sculpt mode compatible with shadows -Make hair passes compatible with SSS -Error shader and lookdev materials now use standalone materials. -Support default shader (world and material) using a default nodetree internally. -Change BLEND_CLIP to be emulated by gpu nodetree. Making less shader variations. -Use BLI_memblock for cache memory allocation. -Renderpasses are handled by switching a UBO ref bind. One major hack in this patch is the use of modified pointer as ghash keys. This rely on the assumption that the keys will never overlap because the number of options per key will never be bigger than the pointed struct. The use of one single nodetree to support default material is also a bit hacky since it won't support concurent usage of this nodetree. (see EEVEE_shader_default_surface_nodetree) Another change is that objects with shader errors now appear solid magenta instead of shaded magenta. This is only because of code reuse purpose but could be changed if really needed. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7642
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix T76780: Freestyle pass for one scene not accessible in compositor in ↵Jeroen Bakker
other scenes Current implementation would update the nodetree of the freestyle scene not the composite scene. Reviewed By: Dalai Felinto Differential Revision: https://developer.blender.org/D7770
2020-05-14Merge branch 'blender-v2.83-release'Antonio Vazquez
2020-05-14Fix T76476 EEVEE: Invalid Vector to Float conversion for nodegroupsClément Foucault
The previous code only handled the RGBA socket case. For vectors, we simply use the average of the 3 compoments. This is done using a temp Vector Math node using the dot operation.
2020-05-04Nodes: add Combine Strings and Group Instance ID node UIsJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7494
2020-05-02Merge branch 'blender-v2.83-release'Brecht Van Lommel
2020-05-02Fix T76309: changing AOV type does not update compositor socketBrecht Van Lommel
2020-05-01Cleanup: pass const arguments to texture functionsCampbell Barton
2020-04-22Cleanup: comment and semicolonsJacques Lucke
2020-04-20Simulations: Add Boolean Math, Switch and Float Compare node UIJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7424
2020-04-20Simulations: Use some shader nodes in simulation node treesJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7422
2020-04-20Simulations: UI for core particle nodesJacques Lucke
This commit adds the initial set of particles nodes. These are fairly low level and are expected to be put into groups that we ship with Blender. See D7384 for a description of the individual nodes. Reviewers: brecht Differential Revision: https://developer.blender.org/D7384
2020-04-20Nodes: Add emitters, events, forces and control flow socket typesJacques Lucke
These socket types will be necessary for particle nodes. The way these sockets are drawn can be changed separately. Reviewers: brecht Differential Revision: https://developer.blender.org/D7349
2020-04-20Nodes: New Object and Image socket typesJacques Lucke
Those new socket types will be necessary for particle nodes. The main difficulty with adding these socket types is that they are the first that reference ID data in their `value`. Therefore, user counting code had to be added in a couple new places. Reviewers: brecht, mont29 Differential Revision: https://developer.blender.org/D7347