Questions tagged [mathematics]

Use of maths inside blender.

Filter by
Sorted by
Tagged with
8
votes
2answers
3k views

How to find all objects in the Camera's view with Python?

I have a scene with a many objects and one camera. I would like to select the objects that the camera sees, even partially. Is there a way to do that in Python that accounts for the objects bounds? ...
9
votes
1answer
4k views

How can I make my procedural brick texture map correctly to both a cube and cylinder?

I've been experimenting with node-based procedural materials in Cycles lately, and after spending a few hours working out a brick material that works pretty well along walls, I noticed that it has a ...
17
votes
2answers
10k views

how are the math node operations in cycles calculated?

How does the math node do calculations with a specific operation: the usual operations of add,subtract, multiply and divide are quite understandable and are(empirically) very similar to some of the ...
6
votes
1answer
3k views

Graph in blender a function of two variables, [duplicate]

I would like to know if there is any way to be able to graph in blender a function of two variables, for example Sin (x y2) for the domain of x from -3 to 3, the domain of y from -2 to 2, to get ...
38
votes
2answers
13k views

Generate curve from equation

I've been trying to design a dynamic sculpture which I can only define with exactitude through mathematical equations. Now, the equations yield only lines, like you can see in the animation below: I ...
14
votes
1answer
3k views

How to: Exponential Fall Off for Volume Density?

I'm trying to create a photorealistic Earth Atmosphere. Several papers written on the topic of atmospheric scattering state that our atmosphere's density has an exponential fall off, with most of it ...
3
votes
4answers
3k views

Possible to use object speed/acceleration as driver variable?

If I have an animated moving object, is it possible to get its speed and/or acceleration vector into a driver variable? Some ideas I've thought of and haven't worked out: Obviously differentiating ...
27
votes
3answers
12k views

How can I generate an object from a mathematical function?

I have a formula that mathematically describes the heart surface in Cartesian coordinates: $$\left(x^2+\frac{9y^2}{4}+z^2-1\right)^3-x^2z^3-\frac{9y^2z^3}{80}=0$$ Unfortunately, I have no idea how ...
30
votes
1answer
2k views

Physical iridescence in Cycles?

Having recently seen the Siggraph paper A Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence, I of course said to myself "I have to have this in Blenderrrrr!" and started ...
25
votes
7answers
21k views

Fractals in Blender?

Is it possible to define a true mathematical fractal in Blender? For example, would it be possible to use a script or a Blender addon to procedurally generate 3D fractal objects. This could be ...
10
votes
1answer
1k views

IES-like lights in Cycles

I have been consistently trying and failing to recreate the techniques described in the links to create an IES like textured light effect with Cycles Spotlight lamps using a Color Ramp node. http://...
5
votes
2answers
1k views

How to delete all faces with distance to other object

I want to delete all faces (of "Mesh") with a distance > 0.5 to the nearest point of an other object ("Sphere"). Unfortunately it deletes the whole object. Thanks for helping! ...
67
votes
5answers
21k views

Is there a tool for scientific visualization using Blender?

Is there an interface or API that allows using Blender as a tool for mathematical and scientific visualization? It should allow Blender to read in data (a la gnuplot or matlab, perhaps using scipy) ...
11
votes
1answer
1k views

Recreating Mandelbulbs with math nodes

I'm trying to recreate a Mandelbulb using Volume and math nodes in blender. I have been able to create a Mandelbrot with math nodes but I am having problems making it 3d. I tried translating this ...
10
votes
2answers
851 views

Is there a way to calculate mean curvature of a triangular mesh?

So I've written a script which does this: Before: After: The code is: ...
2
votes
2answers
458 views

Calculate sphere's rotation for rolling

Let's say that there is a sphere whose x,y,z dimensions are d. So, the circumference is d*pi. Now, the sphere is rolling on a ...
12
votes
2answers
3k views

Create procedural spiral pattern

I'm trying to make a galaxy in blender. If I use an image of a galaxy to get the spiral shape it becomes a 2d image projected into the 3d volume. To avoid this I wanted to use a procedural method, but ...
26
votes
3answers
7k views

What do glossy distribution models do?

In Cycles, the glossy (and anisotropic) shaders have a Distribution option. Since I don't really know the difference, I have always left it at it's default (GGX). So what is a distribution model, ...
16
votes
1answer
4k views

Using Blender for plotting graphs?

While gnuplot is serviceable and matplotlib is a popular choice for Python developers, I wanted to use Python for plotting some simple graphs (matplotlib had some issues installing on my system, with ...
13
votes
4answers
2k views

Cycles node editor - Map gray scale value map to extremes

I have a value map that is black and white, but it covers a very small range of that spectrum, having the brightest value at 90% grey, and the darkest somewhere around 80% grey. What I need to do is ...
10
votes
1answer
3k views

Build color ramp out of math nodes?

I want to use color ramps or RGB curve effects in my node groups. This runs into the problem that the only sockets these nodes have is their input image and factor. This means if I have them in a ...
10
votes
1answer
3k views

Make “gaussian laser beam” (object with variable radial emission profile)

Laser beams are usually not cylinders of light, but instead they have a smooth beam profile, where they are brighter in the center of the beam and dimmer towards the sides. The cross section typically ...
10
votes
4answers
1k views

Precision of Math Node?

To normalize the position coordinates of particles for an Image Texture node, I have to divide 1 by a very large number (119,617). After running some tests, I see that the colors of my image texture ...
5
votes
2answers
716 views

A tube of light in a volume shader

As I had much fun with this (thx Chebhou) but gaussian functions are a bit too complex for me, i want my volume scatter cylinder to have simply a smaller cylinder emitting light inside it, from the ...
5
votes
2answers
642 views

Trying to convert a DXT5NM Normal Map for use in my scene

I have a handful of these strange normal maps I need to use in my scene that store X in the Alpha channel, Y in the green channel, and require you to calculate Z with the following formula: Z = sqrt(...
2
votes
1answer
3k views

Python: Calculate angle between vertices

What should I do to determine the angle on XYZ between two vertices? I then have to rotate a mesh accordingly, but I guess that's a basic task to achieve. I'm new to bpy and I should have payed more ...
2
votes
2answers
446 views

How to make variable transparency hole in a plane with a math function using nodes?

One way to make a transparent hole in a plane with graded transparency is to uv-map a solid, monochrome image with graded alpha (I assume). But can I do this with nodes? I've used the Error Function ...
10
votes
1answer
2k views

HSV to RGB conversion

let's take the hsv color 0.4, 0.8, 1.0 everywhere I looked this converted to Hex 33FF85 - even in Blender when I convert it to RGB(using python colorsys, python ...
4
votes
1answer
914 views

Vertex colors are wrong value?

I am using a renderlayer with some vertex colors to render some masks. I have an object with a vertex color layer. The entire object is set to RGB values of .25 each (using set vertex colors command.) ...
3
votes
3answers
4k views

How to calculate the direction and up vector of a camera?

I'm trying to implement a prototype for a custom render engine using blender as content creation tool. One remaining questions is: How can we calculate the direction and up vector of the camera by its ...
4
votes
1answer
246 views

Blender Cycle's z-coordinate vs. camera-centered z-coordinate (orthogonal distance)

Rendering a scene and writing the 'Z-buffer' into an EXR file using 'Blender Cycles', I get a depth map. That depth map differs from the depth map which is produced by 'Blender Render'. Given its ...
3
votes
1answer
466 views

How can I add/subtract/multiply/divide properties in the Game Engine?

I am creating a Random Math Engine using the BGE and I am wondering how I can do mathematical operations between two properties. Example: "Property 1 + Property 2" and then it would output the answer ...
3
votes
2answers
1k views

Animating z surface math functions

I would like to use the z-math-surface add-on to animate a function with a free parameter like sin(x+a) where the effect of different values of "a" should become clear to the viewer. I am quite new ...
3
votes
1answer
202 views

Plotting 3D Regions

How can I plot a simple 3D region such as $$x^2+y^2+z^2<16$$ in Blender? If I can't do that directly, how can I turn it into $$x=\dots$$ $$y=\dots$$ $$z=\dots$$ So I can use Mesh --> Math ...
1
vote
3answers
187 views

Updating objects parameters using python creates multiple objects

I can update a text curve object when I change the frame and it doesn't create multiple objects but how can I do the same with a mesh object. Code: ...
28
votes
3answers
10k views

What is Dot Product?

I am doing this Blenderguru tutorial on Making Fire and at some point he is adding the Vector Math node Dot Product to his material. And he says that he does not understand what he is doing but this ...
26
votes
1answer
1k views

Closing “Fibonacci's Hole”

Creating a sphere using the points defined by Spherical Fibonacci Mapping. For the most part it is easy to "skin" by using two consecutive fibonacci numbers as steps to loop on the index. And get ...
6
votes
3answers
2k views

how to change a mesh given by mathematical function with time i.e. how to include the time parameter in the mathematical equation?

I am trying to make an animation in which a mathematical function changes as a function of time. Given below are two images which are z math surfaces(from the "extra objects" add on) whose equations ...
7
votes
2answers
604 views

Show banding on object

I'd like to emphasisze the '3d-ness' of my object, by applying a rectangular mesh to it, as if it were a white object in a black room illuminated only by a (far away) laser that scans horizontal and ...
5
votes
2answers
1k views

creating mesh on an isosurface

I have a function like $f(x,y,z)=\text{constant}$. It is not straightforward to solve $z$ as a function of $x$, $y$, and $\text{constant}$ analytically. So, I want to choose a Constant value, draw ...
12
votes
1answer
8k views

What are the benefits of Quaternion rotation over Eulerian rotation?

What are some practical uses for the Quaternion? Why not just use the Euler X, Y, and Z axis rotation values? It's not intuitive how one should manipulate Quaternions. Can someone explain this?
6
votes
2answers
2k views

What does the fraction math node do?

I am trying to learn some procedural basics. Could you tell me what the fraction math node does? Is the result similar to modulo?
5
votes
1answer
2k views

Mathematical functions for mesh in Blender 2.8 beta [closed]

Does somebody know if it is already possible in the beta 2.8 to use mathematical functions for the mesh? I could not find the Addon "Add Mesh: Extra Objects", which I uses in 2.79. Any other solution ...
13
votes
1answer
3k views

How can I create 3D surface of sine waves?

I would like to make a surface that obeys the equation: z = Asin(x) + Asin(y), 0<=z<=1; 0<=x<=2npi; 0<=y<=2npi Where I would like to be able to change n to increase/decrease the ...
5
votes
2answers
88 views

How to convert HSV to RGB using shader nodes?

I am trying to implement the following function that converts HSV to RGB: ...
4
votes
1answer
925 views

Spiral array but with fibonacci sequence

I am trying to make a sunflower. The seeds in a flower grow in a spiral. Whenever I add an array spiral and make it follow the curve, it doesn't seem to look quite right. This is because it doesn't ...
1
vote
1answer
601 views

Obtain normal map from specific camera and transformation

This may be a long shot, but after researching fruitlessly for about two weeks, I wanted to ask here in the hopes that someone who is a bit more knowledgeable about Blender and computer vision can ...
1
vote
1answer
53 views

Converting bottle threads from diagram to a 3D model

Goal: I'm trying to model the threads of a polar springs 500ml bottle in Blender 2.8x so I can 3D print an adapter for it. Issue: I'm having issues converting what Blender 2.8x calls Screw and what ...
-2
votes
3answers
1k views

How to simulate blustery hot air & cold air in Blender

I want to see the behaviour of hot & cold airs against each each other. In one experiment, please try cloud particles with hot & cold airs. In another experiment without clouds, please use ...
6
votes
1answer
353 views

Converting the Clifford Attractor equation into python to animate it in blender 2.8

I'm trying to re-create and animate a "Whispy Clifford Attractors" this http://paulbourke.net/fractals/clifford/5.jpg from this site http://paulbourke.net/fractals/clifford/ I can create the ...