Questions tagged [mathematics]

Use of maths inside blender.

Filter by
Sorted by
Tagged with
12
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 ...
10
votes
1answer
2k views

Sine wave using only Math nodes?

For the purpose of animating materials, is there a way to construct a sine wave function out of Math nodes? A while back I asked about how to do something similar with scripted driver expressions. ...
16
votes
2answers
8k 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 ...
3
votes
1answer
729 views

Can a shape key be negative?

It seems shape keys can't manually be set to a negative number or a number larger than 1. I've even tried using a driver to drive the value of the shape key beyond either of these extremes with no ...
2
votes
1answer
435 views

Why does “sin(frame)” where frame is “1” set a shape key to 0.841 and not 0.017?

I am trying to animate a shape key oscillating between -1 and 1 by driving it with the expression "sin(frame)". I would expect that to result in the shape key value being "0" at frame 0 and 180, a ...
2
votes
2answers
5k views

What is the C# Mathf.Lerp equivalent in Python?

I have a basic menu script with a slider. The idea is that the slider will control the rotation of a bone. That bone will then rotate the object. I worked out the exact euler angles to rotate it by, ...
4
votes
1answer
466 views

Why can't I type simple formulas when using transforms? [duplicate]

what its happening here? i just want to rotate R 360/5 but if do that the math function turns in to something like R [1/(360)] ...
4
votes
1answer
304 views

How to mathematically define a torus in a volume

Using the node editor and Cycles, how can I define a material that looks like a torus? This is useful in order to render a really smooth torus, without needing to a bazillion vertices.
4
votes
1answer
327 views

Create a compositing node 2D Vector from individual x & y components

A node I want to use requires it's inputs to be Vectors. However, video tracking nodes output separate x & y components, not a Vector. I can't seem to find any node that allows me to create a ...
4
votes
1answer
191 views

What happens when you plug a BSDF into a value socket?

What happens when you plug a BSDF (shader) socket into a value (float/color/vector) socket, or vice-versa? Obviously there is no way to convert a function to a value, so what does blender do? From ...
2
votes
0answers
710 views

How to intersect two planes?

I am trying to use the geometry.intersect_plane_plane function, but I can't use the results properly. On this tryout, we have two points (...
2
votes
1answer
606 views

Particles and Random Numbers and Cycles Render

Goal. Have access to a random number in range [0-1] per particle per frame in a Cycles Render Node. Particle System is used. Multiple particles per frame. Question. How can Blender drivers/other ...
7
votes
2answers
489 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 ...
1
vote
4answers
603 views

Is it possible to extrude along a curved path like those made by a spirograph?

I was looking at spirograph drawings and I was wondering if Blender has any way of extruding along such a path so that it could be turned into a mesh object. Here's a link to some spirograph pictures: ...
4
votes
1answer
648 views

Hyperbolic Solids in Blender?

How can I construct hyperbolic solids (hyperbolic cube, tetrahedron, etc.) in Blender? Below is a picture of a hyperbolic cube: Here is some more information on hyperbolic solids. Just to be ...
37
votes
2answers
11k 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 ...
2
votes
1answer
483 views

How to make a F-curve with a constant and linear part?

As part of a problem I need to obtain a curve in the graph editor, that has a constant part , followed by a linear one. for instance: for the interval [0,100] the curve is y=0 for the ...
1
vote
0answers
75 views

How to display a number as output value in node-editor? [duplicate]

I would like to input a numeric value and output also a numeric value after it has gone through some nodes realizing a mathematical function. I know how to realize the mathematical function with ...
2
votes
0answers
418 views

Scripts: Converting Quaternions to Pre/Post Rotations

An issue that I've noticed while working on models for a specific game engine, is that when using exporting FBX models or BVH data comes the fact that you have two different rotations formats, with ...
2
votes
1answer
2k 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 ...
1
vote
0answers
142 views

Using matplotlib in python script to enable plotting in add-on

i would like to create an add-on that can plot graphs using matplotlib inside the add on frame. Does anyone have any experience with using matplotlib or any other python lib in blender? Is it ...
6
votes
1answer
499 views

Clarifying Blender skeleton animation and OpenGL

I'm looking into implememting skeleton animations. I use Blender to create the armatures, export them using the IQM file format (Inter Quake Model). My first steps are to make sure that I'm getting ...
2
votes
1answer
252 views

How calc value of translate with constraint_orientation=“VIEW”?

I want to translate some vertices in X axis with constraint_orientation="VIEW" but I dont' know how calc the values??... next code should work but I don´t know how calc the value in this parameters ...
2
votes
1answer
1k views

bisect plane normal (mesh and bmesh) how calc the 3th vector to mathutils.geometry?

UPDATE 1: how calc the 3th vector to mathutils.geometry.normal(vectors)?? After @Chebhou answer I tried my "bisector tool" again... with mesh and bmesh.. now the problem is the 3th vector to calc ...
1
vote
0answers
746 views

How to move an object to a particular position using a python script?

When I import a stl object it arrived like this (front view): I have to manually rotate it until I have the two lower points of my object at the same level on the Z axis(that's what the black line ...
1
vote
1answer
201 views

Diffuse color inheriting from background

No joke, I was in the middle of creating an example for another problem I was having when I stumbled onto some weird behavior. Can someone explain why this is doing this? It's in cycles by the way. ...
4
votes
2answers
233 views

Capsuling a tube shape in a volume

I have this node setup : I want to improve it a bit giving the cylinder light a capsule shape like that : This shape can be at any side, or both, you choose. The distance of the red circle to ...
2
votes
1answer
261 views

Visualize radioactive gamma rays & their absorption in materials using cycles

there is a very nice tutorial showing the mathematics behind light absorption - the amount of light is getting less during it's move through colored material. - following the law of Lambert & Beer....
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 ...
5
votes
2answers
628 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
1answer
330 views

Need normalized distance between geometry bounds

I would like to get a value between 0 and 1 of the distance between the mesh bounds in an axis (Y), depending on the X value. not sure this is crystal clear but the screenshot says more than words :) ...
1
vote
1answer
241 views

A rectangular-parallelepiped of light in a volume shader

(related to this and this) Well, I'm not yet (but not so far) ready for cylinders but still trying to learn! Now let's play with rectangular-parallelepipeds and do the same thing : A shape of light ...

1 2 3 4
5