Tag Info

40

Let's start with some definitions: Vector: A list of values that are all contained under the same "roof" so to speak. For instance, the location of an object in 3D space is a vector of 3 values (the $X$, $Y$ and $Z$ location of that object). All Vectors in blender are by definition lists of 3 values, since that's the most common and useful type in a 3D ...

38

Here is a list of the mathematical equivalents of each operation. Add: Out = Value1 + Value2. Subtract: Out = Value1 - Value2. Multiply: Out = Value1 * Value2. Divide: Out = Value1 / Value2. Sine: Out = Sin(Value1).† Cosine: Out = Cos(Value1).† Tangent: Out = Tan(Value1).† Arcsin: Out = Sin⁻¹(Value1).† Arccosine: Out = Cos⁻¹(Value1).† Arctangent: Out = Tan⁻¹...

33

The dot product of two vectors measures two things: how much are they "in the same direction" ? how large are they? Skipping the precise definition, we're usually interested in these properties: Vectors with the "same-ish" direction will have a positive product, a null one if they're orthogonal, and negative if they are in opposite directions If you ...

30

The dot product is a way of multiplying two vectors that produces a scalar (i.e. real number) value. Geometric Definition The dot product of vectors $\vec{V}$ and $\vec{U}$ can be thought of as multiplying $\vert\vert \vec{V}\vert\vert$ (the magnitude of $\vec{V}$) by the component of $\vec{U}$ that is parallel to $\vec{V}$. Notice how the vector $\vec{U}$...

23

You can use Vector maths and Maths nodes to calculate the 'altitude' above the planet and from there the atmospheric density and use this to control the density of the Volumetric Scatter. To achieve this, add a mesh around your planet to act as a domain for the scattering. The domain's centre should correspond with the centre of the spherical 'planet'. ...

22

Final result One method is to create a volumetric cylinder and distort it by rotating it around the origin by an amount that varies based on the distance from the origin. First, create a volumetric cylinder. This is achieved by calculating the distance from the origin in just two of the three dimensions (it's effectively a circle projected along the ...

20

Have used the equations found here http://www.econym.demon.co.uk/isotut/real.htm#heart1 The first can be crunched into XYZ surface. Notice the use of fabs(...) in the A helper function. The abs(...) method is not in the list of allowable methods and creates an error. Here is some code for the second. Which required a mapping from spherical coordinates. ...

17

Sine Wave Producing a sine wave is easy as Sine is one of the math functions in the Blender Internal Converter --> Math node. However, a normal sine is no good as a direct factor for a mix node, since a sine wave produces values between -1 and 1, and the node expects a value between 0-1. To produce sine-like oscillating values between 0 and 1 I used the ...

17

I don't think there's currently a way to add surfaces, but if you are okay with using meshes, you can use the Extra objects addon (it's not enabled by default). To enable the addon, open the User Preferences, by pressing Ctrl + Alt + U; then, switch to the Add-ons, search for "extra" and enable the one that reads "Add Mesh: Extra Objects", by checking the ...

16

tl;dr: Always use GGX, set your roughness map to Non-color Data and square it with a math node before plugging it into the Glossy BSDF. Different microfacet distributions will have differently shaped specular highlights. Beckmann and Ashikhmin-Shirley are both similar to a Blinn-Phong specular highlight that you might find in a game engine or Blender ...

15

Quaternion has the advantage that it gives better interpolation between keyframes for arbitrary rotations, compared to euler or axis-angle, this is often used for character animation and why its default for armatures. It also avoids the gimbal lock problem. You make a good point that the f-curves are hard to control. Typically you wont manipulate each axis ...

15

Here is how I would do it Wrap your expression inside a LaTeX document \documentclass{standalone} \usepackage{lmodern} %or whatever you like \usepackage[intlimits]{amsmath} \usepackage{amsthm, amssymb, amsfonts} %Useful stuff \begin{document} $<your expression>$ \end{document} Pipe that to pdflatex, or save it to expression.tex If you used a pipe:...

15

Fract returns the fractional part of a floating-point value, as described by @Merlin, but its treatment of negative fractional parts is not actually the same as Blender's implementaion of Modulo. If you want to see what a mathematical chunk of your shader tree is doing, it can be quite handy to make it generate a graph. Fract: This plane is 8x8 units, with ...

14

The RGB values in Blender use a linear color model while the Hex values use gamma corrected non-linear color model. To convert between these two, you would have to manually do the gamma calculations using the transfer function of your color profile, wich is set in the Color Management section of your Scene – set to sRGB by default. The excact conversion is ...

14

I think one issue with your original solution was due to lack of 'absolute' on your tests on the Normal - it's allowing for > 0.5 but not for `< -0.5'. Also, 'mixing' the individual channels before combining could be causing a problem. Try a material similar to the following : This can produce the following effect : EDIT - Here's another alternative ...

13

Oh gosh, I spent ages with it. On the pictures you posted it looks particularly nice because of lines are actually spirals. If they were straight it won't look nice. On your picture pole doesn't have quads and also has a lot of adjacent edges. So if you don't want this, maybe you can just stop (I would stop earlier) and connect the rest of the points using a ...

13

Computing a real mathematical set given implicitly by function(s) f1(x,y,z,...)=0, f2(x,y,z,...)=0, ... is really hard. Here's how I do what you want: The implicit function theorem tell us that, off a set of measure 0, an analytic set can be locally parameterized by a number of parameters equal to the dimension of the set. Your heart is a two-dimensional ...

12

To supplement PGmath's answer: It is worth noting that the math is calculated a bit differently than you might think. It has to do with limitations of storing and representing floating point numbers (reals) in a computer (in binary format). For the same reasons you cannot represent 1/3 in decimal exactly (it is 0.333...) you cannot represent exactly (for ...

12

There is an addon shipped by default with Blender called Add Mesh: Extra Objects capable of doing this. It is disabled by default and can be activated from the User Preferences dialog. Start by opening File > User Preferences > Addons then search for Extra and activate the Add Mesh: Extra Objects addon. Then in the 3D View press Shift+A > Add > Mesh > Math ...

12

Original answer (edit addressing the question clarification below) If you look at how the Catmull-Clark subdivision algorithm does it, you can see it creates a five-pointed star: Before: After: When you surround it with quad geometry, it still works the same: Before: After: With Catmull-Clark smoothing: If we look at this, we can see that this redirects ...

12

You can create a face-type Custom Orientation from any 3 points: Edit Mode: Select the 3 points you want the plane to be aligned to and create a Custom Orientation from them.. ensure it's being used. Object Mode: Select the plane, and Object > Transform > 'Align to Orientation'.

11

Unfortunately there is no way to create a group node exactly like the Color Ramp, where you can add and remove color swatches at will. To get around this I have created a node with two movable swatches, you can then combine multiple of these nodes together to have the functionality of multiple swatches. The theory: The two input colors are plugged ...

11

We can take Sharp off the list right away as the entry in the manual states: Distribution: Microfacet distribution to use. Sharp results in perfectly sharp reflections like a mirror, while Beckmann, GGX and Ashikhmin-Shirley can use the Roughness input for blurry reflections. You may find this article to be a big help in visualizing the differences ...

11

It's impossible to tell what's going wrong in your particular case as there just isn't enough information in your question - you've only partially shown the 'internal' node tree (many of the nodes are hidden, meaning it's impossible to verify that they aren't marked as 'Clamped' and left assuming that, say, 'Root' is raising to the power of 0.5) and you don'...

11

Here is the simple scene that I made using animation nodes: I made 2 arrows, and duplicated it 5*8 times: Each arrow is sent to the node program, which determines the position in the space and the rotation: First, I divided the index by 5 and took the remainder of the division to get the coordinates (x and y index) of the arrow: Next, I just multiplied ...

11

Quite an easy thing to do procedurally, since radial gradient is already there in the Gradient Texture node, just select Radial mode and use Object space for the centre of the texture to be at the origin of the plane.

10

Since asking this question, I've made a small (single script) plotting utility. This could be made into an add-on however I find it useful as-is. Usage: Paste this script into a text-block named blend_plot.py and press "Run Script". Running the script will create a blend_plot_func.py text-block containing an initial plotting template (if you don't have ...

10

This is an answer based on this Computer Graphics SE indicated in the comments (the one by Nathan Reed). The math is described in this answer, but in short the curvature is calculated by vertex so: Get all edges from this vertex And for each edge compare the projection along the edge of the normals at it extremities Take the mean of all that Now, as didn'...

10

To rotate the plane so that it is exactly perpendicular to the long diagonal of the cube, one can use either a constraint or a little bit of trigonometry. Constraint With the plane centered on one of the corners, Add a Track To constraint and set the target to the cube. Trigonometry Alternatively, one can use a short python expression to find the correct ...

9

2.8x import bpy from mathutils import Vector cam = bpy.data.objects['Camera'] up = cam.matrix_world.to_quaternion() @ Vector((0.0, 1.0, 0.0)) cam_direction = cam.matrix_world.to_quaternion() @ Vector((0.0, 0.0, -1.0)) 2.7x import bpy from mathutils import Vector cam = bpy.data.objects['Camera'] up = cam.matrix_world.to_quaternion() * Vector((0.0, 1.0, 0....

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