Hot answers tagged

25

As far as I know, I don't think it is possible to drive a Color Ramp or Mapping nodes from another socket (but I am not super experienced in drivers). However I have managed to re-create the color ramp and mapping node with math nodes, which you can plug inputs into directly. Color Ramp Unfortunately there is no way to create a group node exactly like the ...


20

I think I know what you're talking about (cause I'm a huge fan of these kind of oldschool 3d-imitating games :)). You may use a Damped Track constraint. Select the plane, go to Constraints header, select a Damped Track constraint and set the Camera as a Target. Then select an axis you want a plane to lie on. If you move the plane in any direction it'll ...


19

There is no need for complicated trigonometry or drivers. You can do this with constraints. Constraints are faster than drivers and have no security problems (manual). The Cylinder Rig Create the following bones. (Side view. Note, that the orientations of the bones are all the same.) CTRL_cylinder has no parent or child. The other bones are in the ...


16

This might solve it, check here: https://www.blender.org/manual/advanced/scripting/python/security.html (Updated: https://www.blender.org/manual/advanced/scripting/security.html 10.23.16) Relevant text as follows: Setting Defaults In the File tab of the User Preferences, there is the toggle Auto Run Python Scripts. This means the Trusted Source option ...


14

You want to use Vertex Parent to parent the object to vertices in the wave mesh. To do this, select the Wave mesh and switch to Edit mode. Select the vertex you want. Note: I've actually found it better to select 3 vertices in a small triangle shape, because it will transfer lateral/tipping movement instead of pure vertical motion that you would get ...


13

AFAIK you can set up all but boolean by using that type in the property value field. Eg type in integer 1 and you will notice the slider moves by integers, even if min and max are displayed as reals. For vector floats, typing in (1.0, 0.0, 0.0, 0.0) gives a list usable for rgba values. >>> C.scene['prop'] <bpy id property array [4]> >&...


11

The problem is: The scene isn´t updated because the sequencer ignores the scene when it´s not visible in the final output. We might consider this a bug/limitation or a feature. I´ll talk to the core developers. So of course drivers that depend on the values of a hidden scene don´t work as expected. A workaround: If you don´t use the scene for output, ...


11

Cycles Sample 01 Cycles Sample 02 Consider a particle system and material shader nodes. Use the particle info node size [relative scale] value. Note the object particles with [size] set to 1 and [random size] set to 1 in the image below. We assume that your placement of spheres can use a particle system. Particles are emitted in 2 frames. Of course ...


10

A Python expression you can use is: valueIfTrue if isConditionTrue else valueIfFalse This is known as a ternary conditional operator see: https://stackoverflow.com/questions/394809/ternary-conditional-operator-in-python


10

Blender comes bundled with python. Malicious scripts written in python could potentially damage your computer. As a security measure the automatic running of python scripts has been disabled since version 2.6. What this most likely means is that there is a piece of python code that is controlling the driver. You can allow blender to auto run scripts by ...


9

Blender shaders or objetcs does not have this kind of output to use in drivers. You can use the Inverse square law. $$ I \propto \frac{1}{d^{2}} $$ Where $I$ is the intensity and $d$ is the distance. (Intensity is proportional to inverse of distance squared) You can use this in your driver multiplied with the lamp or emission-shader intensity. To ...


9

I'm not sure this is what you're looking for, but there is an add-on called Create camera image plane that creates a plane that always fills the frame, is always parallel to the camera and moves with it. Here's a link to the original thread on where you can download it in blenderartists. (login is required to download attachments)


9

This is a general function I use in many of my scripts for adding drivers. You're welcome to implement it in your own script. It's pretty general and supports inverse relationships between properties (if one property goes up, the driven property goes down by the same amount), and also adding functions to the scripted expression (such as sin, cos, max, round, ...


9

Size ratio from Texture coordinate (Object) comparison Concept: The idea is to compare the Object's texture coordinates type of each object with the ones of a "fixed" size object (e.g. an empty). By dividing the corrisponding values of each field, you'll get the same value for each surfaces's point, which is also the size's ratio between the considerd ...


9

This could be a math question, but since we are using Blender we could use drivers tools, f-curve tools and empties. Analysis Even though the objects center is at XZ (0, 0) the center of the first half rotation is at (1, -1). We will need the trigonometric functions sinus and cosinus to get points on a circle. Note that the object center and the center ...


9

So I found out what it was. Odly enough, the driver bone has to be in a separate armature from the bone that you are driving. Annoyingly you can not use 'Whole Character' key framing properly anymore, but it works nonetheless. Edit: Thanks to aliasguru, I found out to solve this you can: 1. Create a blender shortcut 2. Go to its properties 3. After the ...


8

Select the object and press Bake Action in 3D view > Header > Object (or Pose if you are baking an armature from pose mode) > Animation:


8

Although the expression is one line you can call a complex function in that line, you have to define and add this function to the driver's namespace before using it. here's an example function and how it's added to the Driver's namespace ( from the DOC ) : import bpy def driverFunc(val): return val * val # return val squared bpy.app....


8

Turns out this is pretty easy to do. "Easy" as in "you're deprived of doing all the fun math manually" ;) Add three Value nodes (or a single Combine XYZ node) into which drivers can be added. I prefer the three value node approach in case you want to access individual axes later on. Add drivers to each of the value nodes by right clicking on each and ...


8

The driver namespace Can add functions and constants to the driver namespace import bpy def func(a, b, c): return a * b * c m = 9.4443299912 bpy.app.driver_namespace["f"] = func bpy.app.driver_namespace["m"] = m Run the script above, (copy & paste into text editor hit Run Script button,) to make the new members available to the driver ...


7

If you want the driver on the mapping node to work correctly you need to add it via the outliner, not the node editor as you might expect. See this tutorial http://vimeo.com/40389198 starting at ~18:30 for directions on how to make it work. It don't know if this is considered a bug but the behavior certainly isn't very user friendly.


7

I assume you mean that you want a "convex combination" of the angles, so that: 0 will return an angle that is just BeginAngle 0.5 will return an angle halfway between BeginAngle and EndAngle 0.33 will return an angle that is closer to BeginAngle than EndAngle In that case, you can use the scripted expression: (1.0 - 0.33) * BeginAngle + (0.33) * EndAngle


7

You could also add Shape Keys and animate the influence, either by adding keyframes directly or by a driver.


7

Since this property cannot be animated or driven, the only thing left is to control it with script: import bpy import math def function(frame): # modify this function if you want return math.pow(4.75, (frame-30)/50) - 0.75 def my_handler(scene): # this code will be run on every frame change scene.render.motion_blur_shutter = function(scene....


7

A driver is a Python expression that is used to control the value of some field, generally depending on some external variable. They're generally limited to one line, but can actually span many. Drivers can use properties, numbers, transformations, and scripts, to control the values of properties. Using a F-Curve, the driver reads the value of the ...


7

Your custom driver must add itself to the list of drivers BPY is aware of. See the example here: https://docs.blender.org/manual/en/dev/animation/drivers/workflow_examples.html#driver-namespace import bpy def driverFunc(val): return val * val # return val squared bpy.app.driver_namespace['driverFunc'] = driverFunc # add function to ...


7

The best way is to completely avoid drivers inside node groups. They do not update correctly and are only trouble. You should make your own custom Rotate node with the angle value accessible. You can make almost any spacial transformation using the correct math put together with Math nodes. Rotating a 3d vector around Z axis θ degrees looks like this: x' = ...


7

As Sambler said, Animation Nodes is your best option. Here are some examples: Controlling the size of individual particles based on time (They get bigger as time passes): Controlling the rotation of individual particles based on a random vector. Wiggling the size of instances cube:


Only top voted, non community-wiki answers of a minimum length are eligible