text:
Blender game controller using arduino not working properly
I have started learning blender game engine and arduino. Now I am trying to implement whatever I have learned in this simple game where I press a push button connected to arduino and Cube in blender game should move to left.
It is working but it is not smooth.
I want it like this: when I press the push button cube should start moving, when I release it should stop
What is happening: when I press the push button, cube doesn't move until move function finishes and then it moves suddenly my a large amount (amount depends upon for how much time I held down the button).
Python code is as follows:
import serial
import bge
from time import sleep

ser = serial.Serial('COM3', 9600)

movement = 0.1

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
    count = 1
    while count < 50:
        print("Count " + str(count))
        count += 1
        if (ser.inWaiting() > 0):
            var = ser.readline()
            print(var)
            var = str(var)
            var = var[2:-5]
            var = int(var)
            print('Int var : ' + str(var))
            print()
            movements = [var * movement * -1, 0, 0]
            local = False
            player.applyMovement(movements, local)
        sleep(0.1)
    ser.close()
    print("Serial port Closed.")

#left()

How should I write this to get desired output?

Arduino Code:

const int inputPin = 13;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(inputPin, INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  int var = digitalRead(inputPin);
  Serial.println(var);

}

It sends 0 if button is not pressed and 1 if it is pressed.

I'm voting to close this question because it seems to be an Arduino question, and not a Blender one. I suggest migrating the question to Arduino.Stackexchange.

i don't have arduino but this should work, the problem its that you have an always sensor true level triggering = false (see the img), this means that your script will runs once.

Make it TRUE and now your script will run every frame.

And now your script should be:
import serial
import bge
from time import sleep

ser = serial.Serial('COM3', 9600)

movement = 0.1

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
#    count = 1
#    while count < 50:
#        print("Count " + str(count))
#        count += 1
    if (ser.inWaiting() > 0):
        var = ser.readline()
        print(var)
        var = str(var)
        var = var[2:-5]
        var = int(var)
        print('Int var : ' + str(var))
        print()
        movements = [var * movement * -1, 0, 0]
        local = False
        player.applyMovement(movements, local)
#        sleep(0.1)
#    ser.close()
    print("Serial port Closed.")

Since i dont have arduino i tested with this script.
#import serial
import bge
#from time import sleep

#ser = serial.Serial('COM3', 9600)

movement = 0.001

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
#    count = 1
#    while count < 50:
#        print("Count " + str(count))
#        count += 1
    if True:
        var = '0.005564256'
        print(var)
        var = str(var)
        var = var[2:-5]
        var = int(var)
        print('Int var : ' + str(var))
        print()
        movements = [var * movement * -1, 0, 0]
        local = False
        player.applyMovement(movements, local)
#        sleep(0.1)
#    ser.close()
    print("Serial port Closed.")

#left()

You forgot to comment out ser.close() otherwise it will close the port after first run and will not work. btw Thank you, it worked for me as I wanted it to be.


text:
Lighting preview does not work in Blender 2.78?
It seems that the OpenGL light previews are not available in the material preview mode (neither cycles nor internal edit: only in cycles) with the most recent blender version.
Was this intended or is it a glitch on my side? I really miss this feature.
edit: here is an example of what I Mean:

It is not currently supported, it's a known limitation of the current system.
Cycles OpenGL material preview has vey limited functionality, until recently (before 2.78) it didn't even have proper texture preview
It is currently planned to be substancially improved for Blender 2.8 project with a new viewport rendering system supporting PBR and improved performance

Thanks for the info. However, it is strange that this functionality has vanished (it used to work in the previous version). I will keep waiting for 2.8 then.

It didn't vanish, it just never existed in the first place

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

authors: Денис Шабров

sort: votes


text:
How should I keep armature handles close to the actual mesh when posing the armature?
Using Blender 4.1
I'm currently learning how to rig and want to learn how to use bone constraints properly. Here is my WIP rig thus far:

When I move the root bone (the first spine bone, by the pelvis bones) it moves the entire armature as it should, and the limb IK bones point in the direction towards the IK handles (the red circles).

However, I want the IK handles to be constrained by distance so that it sticks near the parts it is meant to control (so the IK handles near the hands will always stay near the hands until the mesh cannot stretch any further).
After the above example, I added the 'Limit Distance' constraint to the handle bones but this provided very unstable results (the rig would not go back to its original position after right-clicking to cancel a transformation, when distance is set to 0 it won't allow me to move the handles, when I want to reset the rig to rest position I had to repeat that operation several times as the limit distance constraint kept applying, etc.)

Here are the settings for the deformation bones controlled by the handle, in case that helps.

I feel like I'm running into an order or operations problem, as I'm sure the Limit Distance bone constraint is what I need but I can't seem to get it to work right. Can anyone point me in the right direction on how to properly create rig handles that help with IK efficiency?
Thanks!

Hello, I'm not sure to understand your setup, maybe share your file, generally there's a root bone that is a big bone under the feet, parent the spine bone and all the IK target and pole target bones to it.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How should I improve my Retopology? Having trouble with creating proper edge loops
Using Blender 4.1 and Retopoflow 3.4
I'm beginning to learn retopology for better mesh deformation in animation and have given it a few goes now, but am feeling a little stuck. I'm especially having issues determining proper edge loop amount based on mesh area (for instance the torso doesn't need as many as the hands, etc). I also end up accidentally creating triangles when I want to maintain a quad  focused retopology.

Here is my in-progress retopology of a basic human sculpt I made, and I'm aware it has several issues. I was wondering if anyone has any advice on where to go from here? I'll attach a few more images of problem areas below as well.

Thanks in advance!

Maybe choose this topology for the hand:

And you can clean the body this way:

Thanks moonboots, but I feel like this gets rid of proper edge flow which is what I’m looking for.

could you please elaborate?

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Making wheels spin as car moves on local Y axis
I'd like to know how to make my car wheels rotate when a vehicle is moved forward in the local Y axis, regardless of what rotations on other axes the car may possess. This should specifically work with an armature.

Normally or most often, people do this with simple drivers.

create a empty-cube over your car.
Make the empty the parent of the car and wheels.
on the wheels object X-rotation insert driver, "manually create later".
in the grapheditor (in animation mode), at bottem set drivers.
in graph editor Select the wheel
expand right side of grapheditor screen go to tab drivers
under variable, select your object (defaults to transformation) notice that you can select the channel you like to transform this gets into the variable var, and a little bit higher in the screen you put in a little math to use "var * 2" or less or more (speed) positive/negative for direction.

Eventually using these principles a car might look like this then
And one could rotate the z axis of the wheel using a modifier (copy from z rot of the small (green) bones above it) so inner wheel would turn more as compared to the outer wheel. In Below a simple car with 4 wheels and a armature to stear it all have the empty cube as parent.
In the below example i let the small bones "track to" the front bones to get more realistic stearing Using bone constrains, but you might also just take rotation from a single bone armature.

The constrain on the wheel to copy its Z rotation from an armature bone
The armature has not been bound to the mesh itself with automatic weightpaint, its a simple setup. As everything is parented to the empty cube wheels will stay in place.

oh and when you do this, you could still use a modifier to copy the wheels z rotations based upon a bone (steering). forgot to mention.

But does this work with an armature?

Yes I extended the answer

great! so easy but yet difficult to solve it by myself....

You cannot easily do this, because it is impossible. @Nathan is right, but I'll add here my explanation:
When moving the car in the scene, you want the wheels to correctly follow - let's move the car 2 different ways:

In first example the wheels traveled longer distance, yet the end car position is the same.
Without Blender accessing and knowing what the path was, it is impossible to compute the wheels rotation, because it can be anything based on how the car was manipulated. When you interactively move objects in the viewport, Blender does not store your moves. The bones only remember their rest and their final (pose) position.
Blender can access what the path was from:

animation keyframes
from defined path the car is traveling (follow path constraint)
from simulation that treats the movement on frame-by-frame basis (you can have a little python script running in background as app.handler and turning the wheels, it could look similar to this, or you can implement this with nodes in Animation Nodes addon)

The easiest and most common method would be to use the path. How to setup a driver that rotates the wheel is here:
How can we animate a ball rolling over a path?
It's convenient to offset the curve for left and right wheels and setup both sides separately, so they rotate correctly when turning.

Does this work with an armature?

@Legoman If you know the path the car traveled, then sure.

This is actually one of those problems that sounds simple but is very tricky and poorly defined.  And understanding why that is is very important.
Here I have a bone that I have moved in its local Y axis from the origin.  How far has it moved in that axis?

I've provided two choices for you.  One is the smallest distance from the bone to its original position.  The other is its distance from the origin along its current Y axis.  Which is the correct distance?
Don't bother, they're both wrong.

Check it out.  Here's the same bone, rotated to be run parallel to its undeformed XZ plane.  How far has it traveled in its local Y axis?  For the second option, the projection to the origin along its local axis, it has traveled an infinite distance.
Maybe the first option, the sheer distance from the origin, sounds ok.  But did it move in its local Y axis and then rotate, or did it rotate and then move in its local X axis?
When it comes to the way Blender stores bone transformations, it always takes the attitude that the bone first moved and then rotated.  (That's probably because of some of the details of the math involved.)  Because of this, when the bone rotates, the axis of its motion changes.
I saved the closest answer for last, because I wanted you to think about how this problem gets defined.

In this case, what we have is the projection along the local Y axis to the plane with the same rotation as the bone itself.  This still might not be what you want.  Because check out what happens when we rotate the bone:

The distance that the bone has moved along the Y axis changed.  Even though the bone itself didn't move.  That means that what's going to happen if you use this measurement of local Y translation is that your wheels aren't just going to rotate when you move in the local Y axis (although they will do that reliably), they will also rotate when you rotate the bone-- because rotating the bone changes the distance that the bone has moved.  At least in this measurement.  (The only conceivable one where it doesn't, that's the first option way back at the beginning.)
Now, maybe that's what you want.  So I'll explain how I made this model.
You have three bones.  You have your main control bone, to which your car body might be weighted.  It's a root bone, no constraints.  You have a floor bone, establishing the plane to which to measure distance.  This is also a root bone, but it uses a copy rotation constraint in world space, targeting the main control bone.  Finally, you have a bone that measures the distance to the main control bone.  In order to acquire the proper orientation, it is parented to the main control bone.  In order to be constrained to its particular plane, it has two floor constraints targeting the floor bone, in both Y and -Y axes, with rotation enabled.  In order to measure the distance to the main control, it has a stretch-to-constraint.
Now, you can use a transformation constraint that translates the Y scale of this bone into the rotation of another bone.
Caveat: Transformation constraints don't play nicely with negative scales, so if you move your control bone below the plane, the wheels will spin in the wrong direction.
These issues are basically why you don't want to do this without using a follow path constraint.  Use a follow path constraint instead, and drive both the offset and your wheels' rotation with the same value.  That's the right way to do it.


text:
Emission based on volume
I have a principled shader with the transmission set to 1.0 plugged into the surface input of my material output. I have an emission shader plugged into the volume input. I'd like the material to grow brighter the deeper into the mesh it is, somewhat akin to the image below.
How would I make my emission be stronger on the inside of a mesh based upon volume? This preferably would not need to include any custom scripts.
EDIT This has absolutely nothing to do with the "duplicate question" candidate. I'm speaking of mesh volume, not the loudness of an audio file.

Nope. No it's not.

I apologize. I misread.

@Legoman Are you animating or using the game engine?

@TechTornado I'm using Cycles.

Please can you better define “based on volume”? How should the emission vary based on volume? Eg, Is it a single emission value for the whole volume that varies based on the overall volume (so that the total amount of light emitted could be kept constant, just spread over a larger volume) or should the emission vary based on depth below the surface (such as https://blender.stackexchange.com/a/89262/29586)?

@RichSedman Sorry, I totally should have clarified that earlier. It should vary on depth below the surface.

@Legoman I'm still having trouble visualizing that. Can you find an image that demonstrates what you are trying to do?

@ScottMilner Done.

I don't think this is possible with just nodes - there are no facilities to determine the depth below a surface. One solution is to use OSL to add a new node that can 'probe out' the surrounding geometry as in this answer as follows :
Enable Open Shader Language in the Render settings, open a Text Editor window, click New to create a new text block, set the name to something like 'mesh_proximity.osl' and paste the following code :
shader volume_meshproximity(
    vector Point = P,
    int Iterations = 1,
    output float Min_Distance = 0.0,
    output float Max_Distance = 0.0,
    output float Avg_Distance = 0.0
    ) {

    float x;
    float y;
    float z;
    vector rand;
    float scale = 5000.0;
    float sum_dist = 0.0;
    float max_dist = 0.0;
    float min_dist = 0.0;
    float Distance = 0.0;

    for (int loop = 0; loop < Iterations; loop++)
    {

        rand = noise(Point*scale,loop*scale);
        x = rand[0] - 0.5;
        y = rand[1] - 0.5;
        z = rand[2] - 0.5;

        if(trace(Point,normalize(vector(x,y,z))))
        {
            getmessage("trace", "hitdist", Distance);
            //getmessage("trace", "N", Normal);
            //getmessage("trace", "hit", Hit);
        }

        if (loop == 0)
        {
            sum_dist = Distance;
            max_dist = Distance;
            min_dist = Distance;
        }
        else
        {
            sum_dist = sum_dist + Distance;

            if (Distance > max_dist)
            {
                max_dist = Distance;
            }

            if (Distance < min_dist)
            {
                min_dist = Distance;
            }
        }
    }

    Max_Distance = max_dist;
    Min_Distance = min_dist;
    Avg_Distance = sum_dist / Iterations;
}

In the node editor add a Script node and set it to the text block you have just created. If all is well the OSL node will be compiled and you should have a new node that can be used in a Volume shader and provides Min, Max, and Average distance. This can be used as in the following material :

The new node projects rays from the sample point in the volume, determining how far they have travelled until they hit a surface. The number of rays is controlled by the Iterations - more rays results in less noise but takes longer to calculate. The Min_Distance returns the shortest distance for any of those rays, the Max_Distance the longest distance for any of those rays, and the Avg_Distance the average distance for all of those probe rays. Adjust the Divide node to scale the gradient and adjust the color ramp to adjust how the emission changes below the surface - similar can be done to control emission strength as well as color.
Here's my final render using the depth to control emission strength :

Blend file included
I have tried other solutions, without resorting to OSL (since OSL is not GPU compatible - you'll only be able to render on CPU) - such as using a smoke simulation to diffuse smoke out of the volume to achieve a gradient - but so far without success.

One promising alternative solution is to use a Point Density texture acting on a large number of particles distributed evenly over the surface using Grid distribution. However, you do need to increase the resolution quite high.
To achive this, add a Particle System to the mesh and set it to Emit From Faces with Grid enabled and Hexagonal Grid. Increase the particle grid Resolution until you have enough particles to give a dense enough covering (you might need to click in the field and type a values as the 'soft' limit is only 50. Then add the create the following nodes for the material :

Set the Object to your mesh and select the Particle System with Space set to 'World Space'. You can vary the Radius and Resolution to vary the effect. The Divide node can be used to vary the distance of the effect of the Color Ramp.

Am I right in thinking we have absolutely no access to the (number/length of sampling steps taken so far) by the volume-rendering algorithm? Naively, you would have thought they would be quite easy to expose in the Light Path node..

@RobinBetts It would certainly be nice to have but, no, I don't believe we have access to those. For volumes any of the potentially useful Light Path values are unaffected. However, even if we did have them it would only partly help - for a ray passing through a volume we'd be able to tell how far into a volume it had travelled but not how far out it had left to go.

My previous answer was based on scale, however I found a driver-based (not script) answer that should solve your problem.
However you need to Enable Autorun if you have not already done so in order for that answer to work.
Here are some screenshots of my setup. The blend file is below them.

The driver paths for the dimensions are as follows:
X:dimensions[0]
Y:dimensions[1]
Z:dimensions[2]

And here is my finished setup (note that you can edit drivers in the Drivers view of the Graph Editor):

Here, have a code block. Copy and paste it into notepad and save it as "emission-scaler.py". Load it into the text editor in Blender and then press the "Run Script" button whenever you change the scale and voila, the emission is set.
import bpy

#The object part
#Set object name in the quotes
obj_name = "Cube"

#Get object
obj = bpy.data.objects.get(obj_name)

#Get object scale
n = obj.scale.xyz

#Doing some math
e = sum(n)/len(n)

#Now to slave the emission shader to the mean volume (scale)
bpy.context.active_object.active_material.node_tree.nodes['Emission'].inputs['Strength'].default_value = e

Here is a screenshot of the script at work. Also the last line of that code came from here.

have to love comments like #Doing some math

Given the image you post and the explanation about increasing the emission strength based on the mesh volume I created this Node Setup:

So how does it work?
Hacking the mesh volume
Altough is true that in the center of the cylinder the volume is greater than in the borders, the difference is almost null

Then we can use a gradient texture to increase the volume only in the center of the cylinder

It can seems like cheating and no physically accurate, but it's not far from reality, since in neon lights the halogen gas is not evenly distributed

Yeah volumetrics can only alter density of emission based on a texture, not geometry.

Add a Layer Weight influence to this, to make tangential faces darker, and you've got an efficient simulation of neon tubes, the way I remember doing it before volume shaders were practical.


text:
Billboard to scene camera?
Most of the various tips I've seen on constructing billboards (at least, without the use of the old legacy particle system) involves constraining them to the camera. This works fine for a scene with a single camera, but oftentimes, particularly in animations, you'll want multiple, and they can be easily switched using markers.
However, to the best of my understanding, this sort of breaks the "constrain to object" method of creating billboards.
Ideally, somehow tracking the object to whatever the active scene camera is would solve this problem. How could this be done? Geometry nodes? Some sort of driver-and-constraint wizardry?
EDIT: Here's a very basic example .blend file.

So it doesn't work if you add a child of constraint, or even parenting? I'm not sure, but maybe it's possible to animate parents? Or what you could do is animate the influence of each child of modifier? For example, the influence is 1 on the child of constraint on a camera. Then animate the value to be 0 when the second child of comes, then add another child of and animate the values, and on and on and on.

I'm not currently posting an answer since I may turn out to be wrong, and you would have probably tried this. Have you?

Yes, this is also possible (at least partially) with Geometry Nodes (in combination with drivers). Do you have a blend file for us to try this on your concrete example?

@quellenform added a .blend file.

@YousufChaudhry that technically would achieve the same result, but it's an enormous amount of tedium and incredibly impractical, especially if you have a lot of billboards, a lot of cameras, and want to have the freedom to change the timing later on.

Geometry Nodes could be helpful here.

If you put a driver into a Group Input, and enter the euler rotation of the active camera there, you can transfer this rotation directly to your object.

Create a Group Input of type Vector.
Choose Single Value for the driver, select the current scene, and enter camera.rotation_euler.x as path. Repeat this for the other axes.
In the Geometry Nodes you can then transfer this rotation directly to your instance by first converting the object with the node Geometry to Instance, and then using the node Rotate Instances.

PS, just to be clear: Geometry Nodes are NOT necessary here, because you can also control the rotation of an object directly with the driver or constraints. It was just fun to answer the question with Geometry Nodes as well. But who knows what else you could do here ...?

What? Why don't you just drive rotation values instead of using geonodes without reason?

@Crantisz Simply because here was (also) asked for Geometry Nodes, and that would be the solution with Geometry Nodes ...besides I like Geometry Nodes :D

Also avoid using scripted expressions in drivers. They used python to operate, which should be slower. I know you can't even notice the difference in this case, but then you  start using plenty of drivers it does make sense.

@Crantisz Good point! As always, a very useful hint!

Works perfectly in the scene the driver was created in--can't figure out how to append, link, or otherwise transfer it into any other scene, though, which really limits its utility...any advice?

@Legoman You could just select a different scene in the Driver Properties.

you can use the object info node instead of drivers.

@shmuel No, unfortunately not in this case, because these are switchable cameras, and with Object Info alone it is not possible to determine which camera is currently active.


text:
Self-excluding Transparency Material in Cycles
I'm trying to create a Cycles material that allows a material to be transparent, but not show its backside or any intersecting meshes that use the same material, despite which direction their normals face. (See the attached image created in the Internal engine for some sort of idea of what I mean.)
Preferably this could be mixed with the opaque, "default" version of the material (such as a Principles BSDF) to allow the final material to have a more interesting material with various colors, roughness, and normals.
Is there any way to achieve this effect in Cycles?

Related https://blender.stackexchange.com/questions/2082/how-can-i-make-a-material-only-apply-to-a-side-of-a-plane

Possible duplicate of Striped Sphere - hide backfaces

Correct, I misread and missed that detail

Transparent Bounces from the Light Path node should get you somewhere, though I could not achieve the exact same result

@DuarteFarrajotaRamos Interesting. Would you mind giving me some more of your node setup so that I can continue experimenting with it?

I found using Transparent Depth from the Light Path gets the job done. It works in reflections as well, but of course any other kind of transparency also occludes objects using this node setup as the ray depth will be more than 0.

Another possible solution depending on your exact case is to use multiple passes and to add transparency to the objects pass in compositing.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How can I create a large amount of ragdolls (a collection consisting of many rigidbodies and constraints) more conveniently?
Using Blender 4.0.
I'm trying to experiment with Ragdoll physics in Blender and I'm curious as to how I can create a large amount of them without tediously selecting objects and marking visibility and all that.
Is there a method to where I can easily create a unique clone of a collection that has its own physics?
Here is the collection that I want to clone, named "Ragdoll1".

Ideally I would also like to be able to have the 'Ragdoll1Rigidbodies' and 'Ragdoll1Constraints' collections be invisible in the viewport and the render.
Thanks!

Create a new collection, put inside it all collections and objects you need to clone, then right click > Duplicate collection.
The whole collections can be set Visible/Invisible.

Thanks, that did work! However, it seems that duplicating a collection of Rigidbodies and Constraints does not add the duplicated ones to the Rigid Body World, and I can't work out how to add them back conveniently. Any tips?


text:
Can I create a physics simulation with a set outcome?
Using Blender 4.0.
In a project I'm doing, I'm trying to have several different physics objects move around the scene but end up on top of each other. For instance:

I want to have the bedframe slide in, then have the mattress and ragdoll person be launched simultaneously so that they all stack on top in a way you would expect.
I'm purely using rigidbody physics right now so I'm just getting results like this:

I'm wondering if there is a way to have a rigidbody already have a goal in mind that it is drawn to, so that I can create more of a satisfying animation? I suppose I could just keep iterating with forces and friction, but I feel like there must be a better way.
Thanks in advance!

Well, no real goal you could give them - because it's a simulation, you could only try to tweak the settings to get it to work like you want. But: it depends on how much the objects relate to each other and their simulation builds up on one another. For example, I once saw a tutorial how to create a logo by each character falling on the floor separately. You do the physics, then bake the animation to keyframes, parent the animated object to an empty and move the empty so that the character ends in the desired location. But this becomes more difficult if objects fall on top of each other.

@GordonBrinkmann: i think we saw the same tutorial ;) But you just have to move the empty to the location you want, so i don't think it is "that more" difficult.

As Gordon wrote:
Just make your rigid body simulation as you like.
Then bake the animation to keyframes.
Parent each object to an empty (at the end of the simulation).
Move the empty where you want it to be.
Enjoy your animation.
The tutorial which i think Gordon talked about, is here: https://youtu.be/ySL4KG2dunQ?si=GngIGJcGyJ8mDC3p
Which by the way is a great channel with very high quality videos, from which i learnt a lot.

But if you have interaction between rigid body objects, the problem is if you move the animation with an empty so that the end position fits your goal, then the way to reach this end position changes as well and can make interactions different or for example make objects move through other objects. It depends on the specific animation of course. That's what I meant in my comment above. But yep, it is the same tutorial ;)

ah ok, yes, the problem of course always exists, if you move the empty - the collision will be wrong, so you have to avoid (visible) collision ;) but he spokes about that in the tutorial as well ;)

I know, I just mentioned it above to hint on the limitations of this method... because the question does not look like it would be easy to avoid collisions ;) Even in the example of the video - the characters are quite close together, there it can easily come to (apparently) incorrect behaviour.

Thanks for the info! I think I might be able to make it work with what the video says… :-)

There's more than one technique.
Sometimes, running your physics backwards is what makes sense:

On the bottom, I'm starting with the letter in my desired position; it has a unrealistic bounciness of 3.0, and no damping, so rather than losing energy, it gains energy.  After baking to keyframes and then reversing those keyframes, I end up with the top text: the letter appears to fall into the exact place I want it to be.
This method gives perfect control over the "final" position of the object, and it reacts just fine with other rigid bodies (provided those rigid bodies are also running backwards through time.)  It has some disadvantages: there's no such thing as negative damping, and out-of-range bounciness is hard to tune.  And while you gain control over the final position, you lose all control over the initial position.
You can also use animated physics to give it a nudge.  You can make animated non-rendering collision objects, that exist just so you can invisibly push rigid bodies into place; you can use rigid body constraints linking your body to animated, non-rendering rigid bodies; you can use animated force fields.  These are not quite as natural looking as running it backwards, and they're not likely to get you exactly where you want to be, but these allow you to have control over any time period of your rigid body simulation.
Finally, you can just outright cheat: as your rigid body physics start to settle down, you can animate the influence of a copy transforms constraint targeting some other object.  (Note that rigid bodies don't actually respect constraints, but you can bake to keyframes, or use a different rendering object.)
These techniques can even be combined.


text:
Is there a way to easily add all Rigid Body objects and Constraints in a scene to the Rigid Body World?
Using Blender 4.0.
Upon duplicating my collection, the operation seems to work, but the duplicated rigidbodies are not automatically added to the Rigid Body World, which is the basic behavior whenever a rigidbody is created.
Is there a fix for this like a script that adds all rigidbodies in the scene to the Rigid Body World? For what I'm trying to do, painstakingly adding every single duplicated collection to the RBW would be a nightmare.
Based off of my previous question ( How can I create a large amount of ragdolls (a collection consisting of many rigidbodies and constraints) more conveniently? )
Thanks!

I guess the main problem will be to get all duplicated rigid bodies selected. Perhaps you could do this by disabling all collections without rigid bodies and then pressing A in the 3D Viewport or the Outliner to select all that are left. Or create a new collection, put all collections containing rigid bodies inside the new collection and right-click on it and choose Select Objects.
But for making the physics work again for these objects: There is a way to link all selected objects to the Rigid Body World. By default the collection called "RigidBodyWorld" is not linked to the scene. However, you can change that:
The Display Mode for the Outliner is usually View Layer. In this mode you can only see collections that are linked to the scene. If you switch this to Blender File, there you will the "RigidBodyWorld" under Collections:

If you now right-click on "RigidBodyWorld" you can choose Link to Scene from the context menu. This will link the collection to the scene so that it becomes visible when you switch the Outliner back to View Layer. Just be aware that it will be put inside whatever collection was selected before you changed to Blender File. Therefore you might want to make sure before switching that you have selected the top level Scene Collection.

Result:

Now, I forgot to do this before, but anyway: the collection "objects" holds some rigid body objects. After duplicating the collection like you noticed, the duplicated objects are still rigid bodies but not inside the "RigidBodyWorld" collection.
What you can do now is either select all objects in the duplicated collection in the Outliner and drag them onto the "RigidBodyWorld" collection - if you hold Ctrl while doing so, as the tooltip says this will link the objects to the collection so that they are not removed from their original collection:

Another option would be after selecting all duplicated objects in either Outliner or 3D Viewport to link them while you are in the viewport. Press Shift+M to open the Link to Collection menu and select the "RigidBodyWorld" collection there:

By the way, just pressing M to move them inside the collection is the same as not holding Ctrl when moving the objects in the Outliner: this way they are taken out of their original collection and only be inside the "RigidBodyWorld". The physics will work with this as well, it is just a question of keeping them inside a separate collection for organization or if the collection is used somewhere else as well.
Furthermore you could now right-click the "RigidBodyWorld" and choose Unlink to no longer have it displayed in the Outliner. The rigid body simulation will keep working on all objects now linked to it. The only problem is, if you moved the objects there and they are no longer in any other collection, they disappear from the scene when you unlink the "RigidBodyWorld".


text:
Extrude cylinder into complex shape
I know this probably an easy thing, still learning basics of Blender. I have a 3D-scanned object and am trying to create a base for it. I've simplified the scanned mesh as much as I can without losing the important definition i need to keep.
I want to just extrude the top face of the cylinder so it snaps to the underneath complex shape of the scanned model and doesn't poke out of the top.

In Fusion360 I would use 'Extrude to object' to automatically snap the top face of the cylinder to the bottom faces of the scanned model. I just can't work this out right in blender.
The closest I've got is using the Snapping tool to 'Face nearest' but it still leaves weird holes and some created faces stuck up out of the top of the base and in general the mesh is a mess:

I need the model watertight to 3d print it. I've also tried boolean modifiers, but I struggle to get them to work with some of the 3D scanned meshes I have on both 'exact' and 'fast' solvers. I know it's something easy but I just keep making a mess.
Any kind advice greatly appreciated.

1-Selecting the outer edges of the bottom part of your 3D scan, extrude them downwards.
2-Keeping these selected, press S to scale, Z for the vertical axis, and type 0.
3-With the looptools add-on enabled, go to the looptools functions and select “Circle”.
4-Resize and rotate this new circle to your liking
5-Select the top edge of the cylinder, press ctrl+e and bridge edge loops.


text:
Incomplete rendering
Blender 2.76 is rendering only a portion of the scene.

OS: Ubuntu 16.04.1 LTS; kernel: 4.4.0-51-generic; video card: Nvidia GeForce 6600 GT; Nouveau driver.
No alterations to Blender's default configuration were made: I simply started Blender up and clicked on the render button so it would render the default cube scene. Although the on-screen rendering was incomplete, the rendered scene was complete as a saved image.
I will try the Nvidia driver with it; however, I have been unable to get an efficiently usable desktop environment using that driver (incorrect resolution with screen badly offset).

Please provide more information so we can diagnose the problem, like scene properties and render settings. Also check if you have Render Border enabled

I had a similar problem that was related to a diver issue where only the first few tiles were being drawn on the screen but the actual render written to disk (and passed on to the compositor) was fine. Does the output written out to disk match what you're seeing on screen?

I have installed the Nvidia driver, version 304.132. When run as a normal user, a window border is created for it but it immediately then segfaults; when run as root, it runs okay, apart from a 'connect failed' error (as per normal user error below)) and renders the default scene completely.
Normal user error:
connect failed: No such file or directory Ignoring Xlib error: error code 2 request code 155 Writing: /tmp/blender.crash.txt Segmentation fault

Did you use the file for different renderings before? I had that issue when using one file for rendering several images one after another. Try opening a new file, then append all stuff from the current file into a new one.
On the screenshot I see that you are using Blender 2.76. I had that trouble also with 2.76, but with 2.78 it did not happen until now.


text:
Multiple stacked planes image distortion (Noisey Images effect)
The youtuber Noisey Images does this really cool effect where tiles that slightly distort still images as they and the camera moves through space.
Here's his newest video, he uses the effect with two photos at 1:03-1:10.
This is a still of the effect

Now i've got a couple of ideas of how to do the effect but not sure how to go about doing them:
One being applying a texture that produce large squares and apply it to the image. Then using a displace node to shift the large squares (multiple stacked planes) around. This is going off a tutorial I followed by PartnersInCrime youtuber: https://www.youtube.com/watch?v=F7rHopldBPI
However this was done in Cycles and since I'm more comfortable with the Blender Render layout i'd preferably want to do it in that.
If that doesn't work then I was thinking of adding lots of planes in the 3D view with the image behind in the background. Then add a texture that magnifies the image behind it sort of like a magnifying glass.
Again, I don't if any of this is at all possible as i'm still pretty new to everything blender but I'm sure that with the help of you guys and gals out there i'll make something half decent!
Cheers for any help.
So far I've tried UV mapping the desired part of the image using a plane but it just highlights the whole of the image in the UV/Image editor:

I've yet to try the UV project modifier to see if it works but i'll append images if that doesn't work as well.

You may even be able to get away with doing this with the OpenGL viewport renderer alone, check out the UV Warp modifier, it may help you achieve what you want

UV project modifier can help too... but yes, you should use planes moving between the base plane (corresponding to the background image) and the camera. These planes may use the UV project modifier or simply have an UV map corresponding to the wanted part of the image

From your last image in the question, simply scale and/or move the vertices in the UV map part. To do that: in the 3D view in edit mode, select all the vertices. Then in the UV editor, select the wanted vertices and use G to grab and S to scale (same principle as in the 3D view)

A way to achieve a similar effect is the following:

Use several planes or parts of planes
One on background with the full image
Others with marks or dust and an alpha transparency
Others which cover only a part of the original image and moving between the background and the camera

low quality gif here...

The animation is the following. Planes are simply moving and/or scaling in face of the camera.

Two materials are used:

A simple texture on one plane

A texture with transparency for others

The plane UV are adapted to cut parts of the images where needed (you can adapt depending on what you want):

Cheers for the detailed fast reply. One question though, how do you make those squares that dictate where the cuts are on the image (the 3 squares that move the man and dust)?

That's visible on the last image above. On the right add/make the figure you want (plane or other). Enter edit mode, hit U to unwrap, then in UV/Image view (one on the left), place the UV map where you need.

I've tried what you said but it doesn't seem to have worked. Instead of highlighting the area of the picture where I placed the plane, it's just highlighted the whole image in the UV image mapping window (on the left). I'll add what my set up looks like and maybe that'll illustrate better what i've mucked up. If i'm not clued up on UV Mapping to get what you mean then if you could link me a helpful tutorial or explanation then that might save us both a lot of time. Cheers!

Using the compositor you can use a transform node to move the image and combine part of it over the original image, a mask can be used to define the part of the altered image that is visible.
If you animate the transform node values you can make the distorted section move, while animating the mask location allows you to move the position it is visible.

You can also use multiple input nodes, with a different offset for each so you see the same video just that sections are offset in time.


text:
How to cast the shadow of the texture's alpha channel and not the actual geometry of the plane?
So i have a simple bush scene in the blender render engine with a basic lamp and ground plane and i have also switched to material shading mode.
The Bushes

The bushes are basically alpha planes with a leaf texture on it, i duplicated and bunched them up together. The leaf textures was imported into blender using the "Import images as planes" addon so the alpha transparency showed up in the viewport.
The Shadows
As you can see the shadows that are being casted on the groundplane are of the actual geometry and there is no affect of the transparency in it.
The Lamp settings

Here are the lamp settings.
The Material settings of the bush

The Question
The shadows that are being casted on the groundplane are of the actual geometry and not of the alpha, how do i make it cast the shadow of the alpha and not the actual geometry of the alpha planes ?
Edit: My main goal is to produce the shadows in the material view mode and not the rendered view mode because i have to switch to blender game engine later.

What do your material nodes look like or can you post an image?

Lovely plants. That shadow gives them addition effect btw, like freestyle. Screenshot of the material settings related to alpha would be nice

I have edited the question with the material of the bush


text:
Slow parent rotation issue
SlowParent.gif (the upload from external links isn't working for me it says "File format unsupported")
The Method

I parented the circle to an empty and rotated the empty a complete 360, then I selected the circle, then I ticked the slow parent option in the relation extras tab and set the value to 7.

The Question

As you see in the gif image, while rotating the scale of the circle changes, which is surprising since I didn't animate the scale. How do I fix it ?

The BlendFile:

Edit:

I tried using Crantisz's solution but unfortunately a whole new problem shows up, the entire circle reverses it's animation at the end if I add a limit scale constraint.

I don't know why the 'Slow Parent' is causing a change in scale - intuitively that just doesn't make sense. Perhaps it's worth logging it as a bug report.
However, you can achieve the same effect using Drivers, using a Scripted Expression to define the relationship between the two objects.
To set this up, right-click the Rotation field in the properties panel (N) and 'Add Driver'. This should make the field turn purple to indicate the presence of the driver.
Swap to a Graph Editor window and change the mode to 'Drivers'.
Select your driver and you should see a variable ('var'). Add a second variable and set each variable to the relevant property in each object. In my example I have each set to 'rotation_euler1' for each of Cube and Empty.
Set the scripted expression to '(var * 6 + var_001)/7 if frame>1 else var_001'. This expression uses a conditional ('if .... else') to set the property to the value of 'var_001' on frame 1 or to the weighted average of 'var' and 'var_001' for any subsequent frame.

NOTE : You may need to set the 'Auto Run Python Scripts' in the User Preferences to enable 'Scripted Expressions' in Drivers if not already set.

This produces the following result :

To get the child to follow the parent more or less closely you can adjust the values in the weighted average. For example, '(var + var_001)/2 is an 'unweighted average', '(var * 2 + var_001)/3' is more weighted towards 'var', (var * 3 + var_001)/4' is even more weighted towards 'var'. To generalise, set it to '(var * A + var_001 * B)/(A+B)' and adjust A and B as desired.
Blend file :

Hmm, seems like a painful solution for a simple problem, but well, as long as it works, thank you. Where exactly do I report the bug ? I have never done it before.

Yeah - it’s a lot more complicated than just clicking a checkbox - but does provide more control since you can use the same technique for driving other properties. If you go to http://www.blender.org/support you should see a “Report a Bug” link. You’ll need to register a new account before you can raise it as an issue.

Adding limit scale constraint will fix the problem, but not slow parent itself.

Slow parent is outdated feature, if you want more control, try something near Animation Nodes.

Add the constraint to the circle or the empty ?

circle of course. Object name on screenshot

Sorry it doesn't work, I update the question again.

Oh sorry, so stupid of me, I forgot to set all the values to one. But nevertheless it produces weird artefacts. I'll update the question again

Hm. Clear scale from empty.

Still doesn't work.


text:
Make Bgl 2d drawing coordinates stay relative to viewport
So i drew a 2d polygon and some blf text using a modal operator. But a problem arised. The 2d shape and text wouldnt stay relavant to the screen size of the 3d viewport. I would seem as if the vertex coordinates are static to the screen coordinates and not to the 3d viewport. As you can see in the gif that dragging the screen completely hides the drawing. so my question is,
How do i make the 2d drawing coordinates stay relative to the 3d viewport so that resizing the window doesnt hide the 2d drawing ?

The code:-
def draw_poly(points):
  for i in range(len(points)):
        bgl.glVertex2f(points[i][0],points[i][1])

def draw_callback_px(self, context):
  panel_points = [[10.0, 550.0],  #[x, y]
                 [10.0, 685.0],  #[x, y]
                 [150.0, 685.0], #[x, y]
                 [150.0, 550.0], #[x, y]
                 [120, 500],
                 [80, 490],
                 [40, 500],
                 ]

# draw poly
  bgl.glColor4f(1.0, 0.085, 0.0, 0.2)
  bgl.glEnable(bgl.GL_BLEND)
  bgl.glBegin(bgl.GL_POLYGON)
  draw_poly(panel_points)
  bgl.glEnd()

# draw outline
  bgl.glColor4f(0.1, 0.1, 0.1, 1.0)
  bgl.glLineWidth(4)
  bgl.glBegin(bgl.GL_LINE_LOOP)
  draw_poly(panel_points)
  bgl.glEnd()

  font_id = 0
# draw some text
  bgl.glColor4f(1.0, 1.0, 1.0, 0.8)
  blf.position(font_id, 15, 620, 0)
  blf.size(font_id, 50, 100)
  blf.draw(font_id, "BGL")

  blf.position(font_id, 15, 580, 0)
  blf.size(font_id, 30, 100)
  blf.draw(font_id, "Widget")

# restore opengl defaults
  bgl.glLineWidth(1)
  bgl.glDisable(bgl.GL_BLEND)
  bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

Look at example pointed out here

If anything is static in example above it's your coordinates.  The screen has a resolution of how many pixels by pixels.  Each area region has a width and height in pixels  The origin is the bottom left corner. If you statically draw a "widget" at y=550 do you expect to see it when the area height is less than 550?   Have a nice day.

That's why I asked the question, I want the widget to be relative to the window size and move or resize dynamically every time the window is resized. I am completely lost here because of the lack of documentation.

Doubt it's the lack of docs that has you lost. Do you really need documentation to scale  into a region context.region.width by context.region.height ?  I understand what you want, here is your last question on this I answered .. what incentive do I have to answer another... some other kind soul on bse will I'm sure.


text:
Blender Rendering in F12, But Not in Final Render
As the title said, I am working on rendering objects in Blender 2.76b on Mac OSX. In F12, the objects render properly, however, they do not show up in the final render. Ideas? This is for a performance that is coming up soon, any help would be appreciated.
ALSO:
Yes, we checked for hidden objects. None hidden.
No, the issue isn't that objects are overlapping- We have put them on different layers, it didn't help.
Lamps are irrelevant, they are all emission objects.
This is in Cycles Render.
All layers are active.
To clarify, when I pressed F12 the image would come out fine. However, when the final render went through, there was only black.
EDIT:
Good news, for some reason we had to move the entire piece to another scene, for some reason.

Could you clarify as for what do you mean "final render" ? The F12 shortcut invokes final rendering of the image with compositing nodes and / or sequencer clips applied (if any). How does your situation differ ?

Since we are all shooting in the dark here, here are some thoughts, make sure All layers are active '[` / ~] Key' (Jest to the left of the '1' key on the qwerty NOT the numpad), make sure that you don't have any mask layers active in your layer tab under any render layer, make sure all of your render layer entries are checked (The List of named Render Layers in the top part of the panel), and make sure none of your normals are flipped.


text:
unable to use renderman in 2.77
I was using Renderman in 2.76, but am unable to use it in 2.77. When I try to enable it in the user prefs it can't find the DLL but it's there.

You are using PR-Man-for-Blender Add-on, right? If so, please report this issue on github instead. Also it seems that this is solved already: https://github.com/bsavery/PRMan-for-Blender/issues/216


text:
render layers for photoshop matte painting
I'm trying to render layers suitable for output to photoshop for matte painting. I've made an example scene to illustrate the problem I'm having. The meshes composite correctly in blenders compositor, but when layered in photoshop the occluded parts are black instead of empty so they don't layer properly. How can I render layers so that they'll composite properly in photoshop? In the image below I have the layers across the top, and on the bottom left the compositor output as desired, and on the right the layers composited in photoshop.
the goundplane, cube and sphere are rendered to separate layers as shown in the compositor and output through a File Output node as RGBA .png files.

They are saved as RGBA .png files and here's the compositor setup. I'll add a .blend file as soon as I can figure out how.

These are .png files saved from the render layer output

Do you actually mean the black part on the sphere?

yes, I'm actually trying to layer together a complex environment set of meshes for matte painting. This is an example of the problems I'm having. The meshes are rendered like this and fit together well when composited in blender, but don't layer well in photoshop unless they are completely in front of or behind another mesh. if they have parts both in front and behind they come out as I've shown. I'm trying to see if I'm missing something and if there's a way to get the layers rendered such that they can behave properly in photoshop.

authors: ПКашный Евген


text:
Object made of large number of spheres
i have a file containing ~ 10thousands coordinates
and I need to create an object that is 1 gold sphere for each coordinate.
I realized that if I do something like:
def createsphere(name, position, size):
    #bpy.ops.mesh.primitive_uv_sphere_add( location=position, size=size )
    bpy.ops.surface.primitive_nurbs_surface_sphere_add( location=position, size=size )

    ob = bpy.context.object
    ob.name = name
    ob.show_name = False
    me = ob.data
    me.name = name+'Mesh'
    return ob

p=read("/home/cpi/BLENDER/terrazze.xyz")

for i in p:

    if i.symbol == "C"  :
        createsphere('C', i.position,0.4)
        setMaterial(bpy.context.object, rubber)
    elif i.symbol == "H" :
        createsphere('H', i.position,0.2)
        setMaterial(bpy.context.object, gold)
    elif i.symbol == "Au" :
        createsphere('Au', i.position,1.2)
        setMaterial(bpy.context.object, gold)

I can hanlde max ~100 spheres...
What should I do to create my terraces made of gold spheres?
Thanks for your help
Carlo
Dear all,
i found something that works although I am not sure to understand all details:
 def qsphere( position, size):
   bpy.ops.mesh.primitive_uv_sphere_add( location=position, size=size )

   ob = bpy.context.active_object
   return ob

 def returnScene (passedIndex = 0):
  try:
   return bpy.data.scenes[passedIndex]
  except:
  return None

 p=read(filei)

 ob = qsphere(p[0].position,1.4) # NOTE: We only mess with the context one time.
 ob.name = geoname
 me = ob.data
  me.name = geoname
 print(me.name)
localScene = returnScene()

 for i in p[1:]:

    if i.symbol == "C"  :
       createsphere('C', i.position,0.4)
       bpy.ops.object.shade_smooth()
       setMaterial(bpy.context.object, rubber)
    elif i.symbol == "H" :
       createsphere('H', i.position,0.2)
       bpy.ops.object.shade_smooth()
      setMaterial(bpy.context.object, gold)
   elif i.symbol == "Au" :
       tempObjectName = i.symbol + returnNameForNumber(i)
      ob_temp = bpy.data.objects.new(tempObjectName, me)
       ob_temp.location=i.position
     localScene.objects.link(ob_temp)

do you run out of memory?

I don't know the Python for it, but you it sounds like you should make all the spheres instances of each other (i.e. use the same mesh data), rather than creating whole new spheres.

Somewhat related http://blender.stackexchange.com/questions/39721/how-can-i-create-many-objects-quickly

dera all, thank you very much. I found a solution that work and I added it to my original post. I definitely do not run out of memory, I have plnety. However something funny happens now: if i work in (RENDERED" mode (SHIFT + Z) I can easily rotate the scene. If I work in "SOLID" mode it is very very slow when rotating. Which settings can I change in the GUI to speedup transformations in the "SOLID" mode?

Maybe activate MATCAP, see if that helps?

Blender can handle a million vertices in one object better than it can handle 10,000 objects in one scene. This means you should get better performance if you create all the vertices in one object instead of many individual objects.
Using blender 2.7x -
import bpy
import bmesh
import mathutils

# create the materials used
# simple BI materials used
MatAu = bpy.data.materials.new('Mat.Au')
MatAu.diffuse_color = Color((0.8,0.7,0.2))
MatC  = bpy.data.materials.new('Mat.C')
MatC.diffuse_color = Color((0.1,0.1,0.1))
MatH  = bpy.data.materials.new('Mat.H')
MatH.diffuse_color = Color((0.8,0.7,0.2))

# create an empty mesh object and add it to the scene
sphereMesh = bpy.data.meshes.new('AllSpheres')
sphereObj  = bpy.data.objects.new('AllSpheres', sphereMesh)
bpy.context.scene.objects.link(sphereObj)
bpy.context.scene.objects.active = sphereObj

# create slots for each material then add each material to the object
while len(sphereObj.material_slots) < 3:
    bpy.ops.object.material_slot_add()
sphereObj.material_slots[0].material = MatAu
sphereObj.material_slots[1].material = MatC
sphereObj.material_slots[2].material = MatH

# test data to be swapped for data in file
# type, location, scale
data = [('C', (1.0, 1.0, 1.0), 0.2),
        ('H', (2.0, 2.0, 2.0), 0.4),
        ('Au',(3.0, 3.0, 3.0), 0.8),
        ('C', (4.0, 4.0, 4.0), 1.2),
        ('H', (5.0, 5.0, 5.0), 0.2),
        ('Au',(6.0, 6.0, 6.0), 0.8),
        ('C', (7.0, 7.0, 7.0), 0.4),
        ('H', (8.0, 8.0, 8.0), 0.8),
        ('Au',(9.0, 9.0, 9.0), 1.2),
]

bm = bmesh.new()
for i in data:
    locMatrix = mathutils.Matrix.Translation(i[1])
    scaleMatrix = mathutils.Matrix.Scale(i[2], 4)
    mesh = bmesh.ops.create_uvsphere(bm, u_segments=8, v_segments=8,
                    diameter=1.0, matrix=locMatrix*scaleMatrix)
    for v in mesh['verts']:
        for f in v.link_faces:
            if i[0] == 'Au':
                f.material_index = 0 # material_index matches material_slots[x]
            elif i[0] == 'C':
                f.material_index = 1
            elif i[0] == 'H':
                f.material_index = 2

bm.to_mesh(sphereMesh)
bm.free()

For 2.80+ some small changes are needed
import bpy
import bmesh
import mathutils

# create the materials used
# simple BI materials used
MatAu = bpy.data.materials.new('Mat.Au')
MatAu.diffuse_color = (0.8,0.7,0.2,1.0)
MatC  = bpy.data.materials.new('Mat.C')
MatC.diffuse_color = (0.1,0.1,0.1,1.0)
MatH  = bpy.data.materials.new('Mat.H')
MatH.diffuse_color = (0.8,0.7,0.2,1.0)

# create an empty mesh object and add it to the scene
sphereMesh = bpy.data.meshes.new('AllSpheres')
sphereObj  = bpy.data.objects.new('AllSpheres', sphereMesh)
bpy.context.collection.objects.link(sphereObj)
bpy.context.view_layer.objects.active = sphereObj

# create slots for each material then add each material to the object
while len(sphereObj.material_slots) < 3:
    bpy.ops.object.material_slot_add()
sphereObj.material_slots[0].material = MatAu
sphereObj.material_slots[1].material = MatC
sphereObj.material_slots[2].material = MatH

# test data to be swapped for data in file
# type, location, scale
data = [('C', (1.0, 1.0, 1.0), 0.2),
        ('H', (2.0, 2.0, 2.0), 0.4),
        ('Au',(3.0, 3.0, 3.0), 0.8),
        ('C', (4.0, 4.0, 4.0), 1.2),
        ('H', (5.0, 5.0, 5.0), 0.2),
        ('Au',(6.0, 6.0, 6.0), 0.8),
        ('C', (7.0, 7.0, 7.0), 0.4),
        ('H', (8.0, 8.0, 8.0), 0.8),
        ('Au',(9.0, 9.0, 9.0), 1.2),
]

bm = bmesh.new()
for i in data:
    locMatrix = mathutils.Matrix.Translation(i[1])
    scaleMatrix = mathutils.Matrix.Scale(i[2], 4)
    mesh = bmesh.ops.create_uvsphere(bm, u_segments=8, v_segments=8,
                    diameter=1.0, matrix=locMatrix @ scaleMatrix)
    for v in mesh['verts']:
        for f in v.link_faces:
            if i[0] == 'Au':
                f.material_index = 0 # material_index matches material_slots[x]
            elif i[0] == 'C':
                f.material_index = 1
            elif i[0] == 'H':
                f.material_index = 2

bm.to_mesh(sphereMesh)
bm.free()


text:
Image or Movie inside Text?
I'm trying to get an image or movie inside some text to achieve something like this :
HOWEVER I'm aiming for the the text to be on a transparent background so i can re-purpose the text for any project.
I've found a tutorial on BlenderDiplom's channel that shows you how to add animated fire in the 3D view and then use the compositor to have it become the text- this is achieved in Cycles. The link to the video is here:
https://www.youtube.com/watch?v=5xQ4ppukCHE
But my problem with this method is that 1. The black background is present when rendered out and 2. I prefer working within Blender Render engine.
Now I know i can add an colour key node in the compositor to get rid of the black background but it also removes the any black in the image that's 'inside' the text.
I'm sure there's a super simple solution but I can't seem to crack it.
Any help will be much appreciated!
So i'm following Edgel's answer and tried to unwrap the text with the Smart UV Unwrap and Project from View and entered render view and the text remains white instead of showing the image inside the text:

And here is the text in the 3D view in edit mode:

Most common video formats don't generally support alpha channels (transparency) you will have to render it as an image sequence. See http://blender.stackexchange.com/questions/2050/any-video-formats-that-render-with-alpha-channel

This is remarkably easy to achieve in Blender.

The text & font, once decided is typed in, converted to Mesh with ALT-C, given a Material slot and coloured white.
It's shading is set to "Shadeless", no Specular, and best rendered using a Hemi Lamp, not a Sun.
If you use a Sun,  set it to "No shadows" as a precaution, or remove the shadowing in the text's material properties at bottom.
Give the text a texture slot and use your video or image.
If it's video, in the image tab tick on the "Auto Refresh" box.  Tick the "Cyclic" box also when looping is necessary.
Edit: (15/4/2017)
At this point we come to a choice -
If you want a kalidascope effect, do a UV unwrap and select the top choice "Unwrap".  i.e. you select "Unwrap" twice, or press U from Edit Mode and select "Unwrap".
If however you want the video to be spread across the text normally and without distortion, in the texture Properties (at right) open the "Mapping" tab and select "Generate".  (it's usually defaulted to UV)
The video should now appear in the text and play. (Press CTL-A)
-=====-
The choice as to whether to use the Blend file to lay the text over another video, or store it as it stands in a bunch of single frame image files (.png) will decide what you do from here.
For example, you can simply load your background video into the "Background Image" panel and drag it's opacity to full - OR - add a 'plane' under the text in the 3D window and texture that with the background.
This would avoid filling a folder up with single frame png image files.  Choose the output as say - H264 with RGB highlited.  One single, good quality file.
This was my choice here and rendered out using "OpenGL".  (Top left of 3D window - "Render-->OpenGL render animation")
-=====-
If it's deemed desirable to store this as an alpha layered video, then read on those who don't know how...
In the Render properties, open the "Shadings" tab and select "Transparent" at the right.
Make sure the Post Processing panel boxes are both unticked.  (No nodes are used)
The text can now be rendered out on a transparent background by setting the render output to a folder of your choice and  the format  set to PNG (images),  it's RGBA button clicked at far right.
Back in the 3D window press "N" and open the display tab, tick the "Only Render" box, untick "World Background".
You should be ready to render now.  I did this in OpenGL and also checked that it worked using Blender Render.
A lot of single framed images will be produced.  (These can be zipped and bundled into a single file for storage)
You can test to see if the transparency is there by loading one of the images into Gimp or the VSE.  A checkered pattern should be under the text.

Cheers for the detailed speedy explanation. I'm working through your answer right now but being the newbie I am I'm pretty lost when it comes to UV Wrapping.
How do I smart UV unwrap, is there a button or keyboard shortcut?
I understand UV Wrapping is marking 'seams' and smart UV Wrapping means blender marks the seams itself...i think. But I don't know why you even UV Wrap in the first place!
Anyway, if you can link me a good resource to understanding UV unwrapping (it's purpose and the process) then I'd eat my hat!

EDIT: found the unwrap options box- go into edit mode then hit  the U button then select the option.

Right, i've clicked the Smart UV unwrap and tried the Project from View unwrap option and when I go into the rendered mode to see the image inside the text it's not there. I'll put the screenshot in the question above.

@user33287, chances are you're viewing in Object mode but using "Solid" texture.   Bottom center of window - click on the little ball to expand it's menu and then choose "Material".

Further to the above...  Your first pic appears to be taken after rendering.  Looks like you haven't textured the image.  I did a detailed answer somewhere in here some time back on how to place textures on surfaces.  If you can find that, you'll see a step by step procedure.  Also, try OpenGL rendering.

That texturing link is: http://blender.stackexchange.com/questions/71513/what-order-to-texture-a-3d-object/71603#71603 note that you should follow that answer by using a cube, not this project.

@User33287, Have edited my answer 15/4/2017.   (USA - 04/15/2017)  Note it could make things a lot easier with your UV unwrapping.


text:
Can't manage to succesfully UV unwrap house to get aligned brick textured walls
I've started learning blender a few weeks ago and my desire is to model and render a brick house. I've followed a lot of tutorials on modelling and texturing. However, I can't manage to successfully line up the the brick texturing at the corners of the walls and at the windows as you might be able to see in the images I've added. I've tried to look up as much tutorials on UV-unwrapping but I keep bumping into the problem of lining up the bricks the right way.
I have added my blender model as well, I guess I have made mistakes with the seams and such. Could anyone help me and show me what I'm doing wrong? I'm very eager to learn :)
Kind regards,
Tomas
Blender file

I would show you if you re-upload your file but before you save it go to File->External Data->Pack into.blend.
That way I dont get missing textures when I download the file.

you sure? still getting missing textures.

Found that wrapping the UV map around the edge is the easiest way to get the bricks to line up. You just need to concentrate on the sides. Generally a sill covers the bottom layer and on the top - you can cheat more.

The image above shows the normal map which is used later to bump the texture...

...and this shows another building with rounded brick corners.
Some textures I made from baking walls of mesh bricks. Others I drew and composed in Gimp. You can see some of the trials here on the BlenderArtists thread.
Update: First step is to make sure your seams are marked for the unwrap - CTRLE if you haven't done that already. (You can see them marked red and just in the corners.) Then U to unwrap. I use Project from View as I think it's the quickest to get neat UV's, and then just scale ...

Select the recessed edges and scale them on the X axis in the UV editor...

These are the active buttons in the UV editor...

Thank you for your reply. I read both the topic you linked and the locked topic. From those topics I understood that you first tried the approach of making buildings brick by brick instead of planes which were texturised later on, because you found that using a texture didn't give enough dept on and in between the bricks. Later on you did use textures, how did you manage to get enough dept in the end?
Furthermore, I don't fully understand your answer above, though it is what I'm looking for. Especially how the vertical Sill (I believe it's called?) lines the bricks up perfectly.

Updated above - hope that makes it clearer. Depth in texture is created with bump maps - like the purplish bricks in the first image. It fakes depth but does not work well everywhere - like corner edges. That is maybe a topic for a new question though...


text:
What might make a boolean modifier add unwanted edges?
I'm working on a topological map animation.  It involves a map downloaded with GIS, a plane -> array modifier -> boolean modifier with world map.
The boolean modifier is occasionally creating strange edges in places it doesn't make sense.  It mostly works, but not all the way.  I'm trying to figure out what I can change to make the boolean modifier between a plane and a topographical map work more consistently.
Below I have pictures of two frames (11 & 12) that illustrate the issue.  The topo layers are moved slightly between the two, and the unexpected edges appear.  I've been looking at differences between these two frames and can't figure out what makes one boolean work and the other fail.
Link to file here (blend-exchange didn't work for some reason):  https://drive.google.com/file/d/1vgJ-8wpymfBoCh9OWKpnlMZ3PKlXqZs2/view?usp=sharing
Right now my best guess is that there's something strange about the world map.  Maybe it's broken up into chunks or something.  It is probably not coincidence that some of the unwanted edges appear to follow an axis.
EDIT: I've narrowed down the issue some.  It has to do with pockets in the layers.  Like lakes, ponds, or other divets (you can see a tiny one in frame 12 too).  They seem to break the booleaned plane into multiple pieces.  Hopefully there's a modifier that can put them back together..

These edges are a product of there being "holes" in the plane.  Blender can draw solid N-agons faces, without holes.  If there is a hole, the plane needs to be split into two in order to create the gap.  It's working exactly as would be expected.


text:
Blender rendering video sequence instead of scene
This is an embarrassing basic problem, but I can't find the option to render my scene instead of what I'm working on in the video editor.
Every time I try to render my scene, it just renders what ever key frame I'm on in my video timeline.
Where is the option to switch between the two?
EDIT:  I found a Q/A for this.  https://blender.stackexchange.com/a/81087/33487
In short Properties Panel > Render > Post Processing > Sequencer

If you solved your problem, go ahead and add an answer to your question to help others with the same issue

I was hoping someone would just mark it as a duplicate so it would forward when found.


text:
How can I remove jump lines created by boolean modifiers?
After applying a boolean modifier, I'm getting these jump lines that connect a cut out to the outer perimeter.  In other contexts I've made an object that has an inner and outer set of edges without needing jump lines, so I know they aren't required.
Things I've tried:

Decimate: doesn't do anything, not sure why
Geometry node to delete any edge touching more than one face: doesn't work either
Array modifier with merge: if they were separate objects, thought it might connect them.

Why aren't any of these things working?  Are they two separate objects?  Or are these edges required for some reason?
Link to project: https://drive.google.com/file/d/1bwJPsTbevJnwmZHqWX0w--ps08eraqHK/view?usp=sharing

Edit:  I did find this similar question and the answer states you can't have holes in a face in blender.  I have an object in my project (linked above) that seems to have a hole in the face:

EDIT 2:  This is me applying the same wireframe geometry node modifier to each face.  One of them is creating jump lines and the other is not.  Both faces are totally flat.

Yes there is a trilion answers for this topic https://blender.stackexchange.com/a/211249/2214

I think it's reasonable to call this a duplicate.. Blender's faces do not support holes, or even a single edge used twice in the same face, so 2 connecting edges are required.

@RobinBetts For the main question I'd call this duplicate, too. For what is shown in the end (holes without connecting edges), I wrote an answer which might be the solution but I wouldn't mind closing this question as duplicate.

Hello, @GordonBrinkmann and Seph,  fair enough.... agreed. Sorry, I hadn't read into the second part the way you have, I'll re-open.

Thanks for keeping it open.  I did find people saying it's impossible, but I've managed to achieve a wireframe that acts on edges and somehow allows a hole in a face.  So something is possible, not sure what.

... any hole in face (surface) is connected by two edges. Your "cubish" object is not generating them in final stage, because you delete them by geometry nodes.
To answer your Q in title ... basicly you have a node tree that removes them already, but from your node tree it seems to me you are not sure what these nodes do.
For your second "spherical" object you can use just this simplified node-tree ... where the selection for Delete Geo node is based on Edge Neighbors which is limited by Greater Than node to select any edge belongs to more than one face.

"it seems to me you are not sure what these nodes do" the project file name is "learn-geometry-nodes" :p. This is my first time.

The answer linked in the commentary to your post is correct, faces cannot have holes within them, so each hole needs a minimum of two faces around it or put differently: a hole needs at least two connecting edges to surrounding geometry.
You say you have an object that "seems" to have a hole in the face. At first glance, without seeing more of the viewport I could not even tell if this is Wireframe mode or Solid and there simply are no faces, just edges.
But I suppose you have seen it in Solid mode and know there are faces. Did you go into Edit Mode? Are there really no connecting edges?
For Object Mode, there is a Wireframe setting in the Overlays. Behind the checkbox there is also a slider where you can change the value from 1 down to 0. All the way up to 1 it shows all edges in, decreasing the value lets edges disappear where the angle between the adjacent faces is below a certain threshold. The lower the value, the higher angled edges are hidden.
On a completely flat object, even the slightest bit lower than 1 makes all inner edges disappear, compare the left side with 1 to the right side with 0.999:

//EDIT: Regarding the additional information in your question: Sorry, but you did not create holes in faces without connecting edges. If you disable the Geometry Nodes modifiers and look at the base geometry in Edit Mode, there are lots of connecting edges around the hole:

You are not even using any kind of Mesh Boolean node inside the nodetree or any Boolean modifier outside and no Wireframe modifier either to achieve the result.
The only reason you don't have connecting edges in the "wire" is that you delete all geometry that you don't want to have a wire in the second Geometry Nodes modifier.
So if you would do something like that with the other object in your question instead of simply cutting holes with a Boolean modifier and throwing a Wireframe modifier on it afterwards, you could achieve the same result without connecting edges.

...I find it funny that everyone says "Blender can't create faces with holes without connecting them with edges". Geometry Nodes can do that: two curve circles with different radii > Fill Curve.

@quellenform Would you mind showing how you do this? When I fill the curve between two curve circles with different radii it looks like this in Wireframe mode: https://i.sstatic.net/eVlyR.jpg

Uh, no, unfortunately I can't because I just realized that you caught me and that it was only in my stray memory that it was possible :D ...so you can be wrong (embarrassing)

Both of the objects are completely flat to my knowledge.  Also, when putting both through the node modifier to add cylinders to each edge, it does not create them for the boxy one.  Somehow it is possible to ignore those jump lines, and it doesn't seem to just be flatness.

I added an edit to the original post to show the wireframe modifier ignoring those jump cuts in one object, then using them in another.

Both of them had the same modifier on at that end.  The issue was that something got disconnected in the modifier at one point.   Thank you so much for the help!


text:
Why am I getting black splotches in my Eevee render?
I'm currently using Eevee in Blender 3.6.  There's weird black bands that are happening in my renders, but not in render view.  I've tried changing every variable I can find in:

Volumetrics
Shadows
Indirect Lighting
Subsurface Scattering
And every other tab that seemed related to shadows or light

The only thing I can think of that's strange about my setup is that it's very, very big.  Kilometers wide.
Link to file:  https://drive.google.com/file/d/1JFtX_77d0vf2_7e_8m7dX6yPpY5XxPGN/view?usp=sharing
Render:

Viewport Shading - Rendered:

Hello could you please share your file? Make it as simple as possible...

Could be a modifier issue, are they all turned on the same for render as viewport?

@moonboots I added a link to the file.  Blend-exchange doesn't work for me, so it's gdrive.

@3pointedit Great thinking!  I checked and that's not the issue, but it's a really good suggestion.

You have some objects that are disabled for preview but enabled for render, one of them overlaps with the visible object, disable them for render:


text:
How can I highlight the hard edges on a very large (10+ km) model?
I'm modeling a topographic map, imported by GIS Blender.
I'd like to create edge lines, similar to topographic maps. Things I've tried and reasons I think that they haven't worked:

Use bevels to find the difference between normals and highlight when the difference is large:  doesn't work because even a maxed out bevel radius is tiny compared to mountains.

Use cel shading or anime outlines: don't seem to show lines on front of objects, only towards back.  Maybe I'm doing things wrong.

Use ambient occlusion differences: once again, distance is too large

How can I highlight my edges when my model is so big?  I'd rather not reduce the size because I value the accurate measurements.

Also, I'm pretty sure my model is huge.  But I am confused because my layers have an offset of 0.1m while my model has a height of 1600m.

This was so much harder of a project than expected.  Bottom line up front, the solution:

(only one solidify)

Now to explain.  Firstly, the array -> array -> solidify -> boolean section.  Having solidify makes boolean work better (it should be set to something greater than zero).  The second array exists to clean up issues with the "fast" boolean.  Sometimes it just doesn't work at very specific points, so having a second face offset by a small amount will usually lead to at least one of the boolean operations working.  Setting boolean to exact will solve this issue as well, but render times are much longer.
After that, there are two steps: the first is do delete all faces except the topmost one (boolean doesn't work on planes, but we want to get back to there).  The second is to extrude the plane and also draw a wireframe.
In the "Top Face Only" modifier, it is deleting all faces with a Z-normal other than 1 (upwards)
In the solidify and wireframe modifier, there are two paths.  The top one outputs both the current plane and an offset of it.  The offset distance is driven by (use drivers) the array offset.
On the bottom path, the first step is to delete all edges that touch two faces.  The reason for this is that "jump lines" exist in faces because no face is supposed to have a hole.   Once those jump lines are deleted, adding the wireframe is done with the Curve to Mesh node.
Final product:


text:
How to affect particle size over time?
I'd like to spawn particles that change size over time. It would be nice if I could have complete control over how big they are at each percentage of their lifetime, but that is not a necessary feature. (I'm rendering the particles as objects.)

you can find a method to increase or decrease their size here: https://www.youtube.com/watch?v=67024UyCZ6A

Works perfectly! Thank you! Please feel free to write that up as an answer so I can officially accept it.

Here is the method to increase the particles size through time, as explained by BlenderShortTests in one of his tutorials:

Select your emitter and go to Properties > Particles, click New.
In Properties > Particles > Render, click Object and choose the object that will be emitted as particles and its size.
Go to your 3D view and press alt A to launch a preview of your emission animation, then stop it somewhere in its course.
In Properties > Particles > Textures, add New and give it a name.
In Properties > Textures > Type, choose Blend.
In Properties > Textures > Colors, enable Color Ramp.
In Properties > Textures > Mapping > Coordinate > choose Strand/Particles.
In Properties > Textures > Influences, unclick Time and enable Size.
In Properties > Textures > Colors, play with the Ramp controller to increase or decrease the size of your emitted object through time.

The video also explains how to make a fade out effect on the particles: https://www.youtube.com/watch?v=67024UyCZ6A


text:
2.80 Subdivision Surface issues?
I use creases and subsurf modifiers a good deal for (more or less) hard-surface modeling projects.
This always worked great in 2.7x, but in 2.80 there seems to be a good deal of issues. Creased edges have some remarkable unsightly jaggedy areas that very much detract from the appearance of the model. I believe (though potentially fallibly) that this is due to Blender switching over to PIXAR's OpenSubdiv.
(The attached .blend shows off the problem well enough, but it can look exponentially worse depending on the situation.)
How might I avoid this issue in 2.8x, at least replicating the level of not-as-ghastly-looking-ness of 2.79b?
(The attached image shows the desired result.)

A screenshot of the desired result would help. I can see what you mean in the 2.80 sample you provided, but creases can also produce funky results in 2.79, or at least they can yield different results depending on certain values.

Added a screenshot.

The mesh and its normals are the same, what changed in 2.8 is lighting. It now better reveals what was the problem with your mesh all along, it only seems it worked better in 2.7x. You need to better define edges with bevels or fix the normals in the mesh (auto smooth with 60° threshold, split edges modifier, custom normals, etc.)

The problem is also appearing in the final render...

@JaroslavJerrynoNovotny All normal types seem to be ok in the provided model (judging from the respective overlays in Blender 2.80). There's nothing in it that would justify the extreme shading artefacts that appear. It's also kind of suspicious that the artifacts appear / disappear exactly at X0 position. I still believe this might be a shading bug in 2.80, worth reporting to the bug tracker.

@aliasguru yep, I agree, you are right. It's a shading issue. There should be some shadowing, but not as crazy as there is..

@JaroslavJerrynoNovotny Just found two reports regarding this issue: https://developer.blender.org/T58410 and, more interestingly, https://developer.blender.org/T58994 which states that artifacts disappear when the crease is set to 0.9999. Just tried that and it works, will update my answer

This was a bug (at the time of writing this answer), which got fixed in https://developer.blender.org/T58994
Basically the rest of the answer is redundant now, as 2.80 shows the same crease behavior as 2.79 since the bug was fixed. Automated builds will be updated starting from 24. 01. 2019.
Old answer
This is a bug still in the beta of Blender 2.8. The switch to OpenSubdiv could have caused the problem, but on the other hand, nightly builds of Blender 2.79 can also use the OpenSubdiv implementation in the SubSurf modifier, and don't show the described behavior / look. There are two bug reports available currently, see https://developer.blender.org/T58410 and https://developer.blender.org/T58994 - the latter one also providing a solution.
Potential Solutions until a fix appears
One option is to set the crease values to 0.9999 instead of 1.0. To do that, go to Edit Mode, select one creased edge, and press Shift + G. In the Upcoming Select Similar menu, choose Crease. This will select all edges you creased. Now, in the Properties Panel (N - Key), type in 0.9999 to the Mean Crease field:

A second option is the new modifier that was introduced in Blender 2.80, which allows for nice control over normals on more difficult geometry elements. A use case are extruded and beveled text objects with smooth shading turned on, but in your case this also serves as a solution.
Add the Weighted Normal modifier from the Modifier Stack / Modify section. This should immediately fix your problem, even though a warning is printed at the bottom of the modifier:

I have also increased the number of subdivisions and turned off Cavity from the Shading popover menu for clarity's sake. The warning itself might be interesting for you as well: It says that AutoSmooth should be enabled for this modifier to expose its full power. Once you do that here:

...your model should look even more refined:

But the best part is this: If you only use AutoSmooth without the Weighted Normals Modifier, you get entirely sharp edges:

So, depending on the look you're going for, choose your way to go.

Phenomenal answer! Thank you so much! :-D


text:
Making a shadeless card
How do you make a shadeless billboard/card sort of material (with working alpha) in Blender Cycles? I just need to make the image/movie file show up shadelessly on a flat plane, specifically with an effect from the alpha channel.

Possible duplicate of Node for setting render colour, regardless of lighting

What kind of problems with the setup exposed in the related question do you face while dealing with alpha?

I simply am unable to make the alpha channel affect the transparency of the final material.

Emission Shader + Alpha masking
Shadeless material in cycles can be obtained by using the Emission shader. For further instruction on how to handle all the interactions with other objects in the scene and dealing with shadow casting, I'll suggest to read:
Read Node for setting render colour, regardless of lighting
The alpha of the image can be used to control the shading property of the object by using as an input of a Mix Shader that mix the Emission shader and a trasparent shader.
Here's a possible node setup.


text:
Creating a delayed blur effect?
I would like to recreate an effect similar to that seen at this timestamp in the following video of Zelda: Majora's Mask 3d: https://www.youtube.com/watch?v=M-FoQ1XNoGM&t=462
I believe this was accomplished by having each frame fade slowly away (and travel northeast) after it played.
Is there any simple way to achieve this in Blender? I'd prefer this to be accomplished in the VSE, without any custom scripts (if possible).

There's probably a way you could import the video into the compositor, blur a delayed one, and mix it with the original.

I don't have an elegant solution but it seems to work. Instead of fading a frame, I just use 8 or more strips with the same image sequence and move them each one frame to the right.
Each of the strips (except the bottom one) gets a transform strip. There I lower the opacity and move the strip a bit with the position fields.
You might need to use a gaussian blur strip, too.
It looks a bit better if the Blend type is set to 'add'

Could you share your .blend file? I'm extremely unfamiliar with the VSE, and so don't completely follow.

http://pasteall.org/blend/index.php?id=50755 Here it is. Blender is really bad for trying stuff out without learning the background. Just like an airplane cockpit. Bumpy road ahead.

Did some testing with this method. Works extremely well and gives me an effect extremely similar to what I'm going for, except for the excessive visibility of the transformed frames. That's a issue for another question, though. Thank you! :-)


text:
Ocean modifier color and foam
I'd like to know how to do two things with materials related to the Ocean Modifier:
1) Change the color depending on the depth of the water, and
2) Create some believable foam.
Both of these features should change as the ocean modifier plays back.
The attached image shows what I mean pretty well, methinks—you can see how the water changes to a darker blue where the water is a bit deeper, a lighter blue where it's shallower, and blends to a white where the foam should be. I also believe that this image was made with Blender's ocean modifier [EDIT apparently it's not, but the point still remains]. I'd like this to be possible regardless of lighting conditions.
Does anybody know how to create these effects with materials that use the ocean modifier?

You could go to this tutorial and follow the material setup, adding the desired colors for the "foam" https://www.youtube.com/watch?v=6G1W3iRitjA, or you could use a texture

The image is not from Blender, it is a Houdini simulation by the looks of it. A bit more searching led me to the Houdini Ocean Toolkit for Cinema 4D v0.3. The image is an Ocean Test 01 by Helge Kiehl

The part with " how the water changes to a darker blue where the water is a bit deeper, a lighter blue where it's shallower" depends on material and lighting, Ocean modifier has nothing to do with that. Volumetric material and proper lighting should give that effect.

I meant all this to be done with a material anyway—the article is clarified to make that clearer.

Final.

I've exaggerated a bit difference between deep and shallow water to present it better.
Node setup and overview.
Water.
Most important thing here is to separate generated texture coordinates on Z axis and assigned to it Color Ramp with our colors of choice representing deep and shallow water. You can add here more colors, not only two of them and/or change interpolation between color stops - I've used default (Linear).
Foam.
First of all you will need to choose Foam Data Layer Name. I used... 'foam' and use it in Attribute node. I've also added a Math node with Power to fine tune mix between water and foam shader.
Mix.
You can now mix shaders by 'foam' factor and use any other shader for materials. I've used simple Glossy for water and Diffuse for foam.
Nodes and Ocean setup.

thanks for this,  was wondering how to do this the last little while to get nice ocean/waves without having to do a fluid sim


text:
Animations not working
Our pipeline is to create an anim in 3ds max (anim works when scrubbing timeline), export as an fbx to blender (anim still works), then export from blender to spatial.io. However something goes wrong with our animations 50% of the time and they stop working in Spatial. I'm really keen to know what it is that causes this! I know theres not a lot to go on here but just in case it is something common and obvious we're doing wrong! We've checked animation tick boxes so that's always included. Sometimes an animation will work successfully. But when we go back and adjust something small and re-export, it stops working. Could it be something happening with parenting associations in Blender?


text:
Adding mesh to armature object that has the same bones

I have two armature objects. the bone structure is the same on both (the 5 extra in arm_lower_r are the bones for the gun, everything else is the same). The weapon_and_bones object has animations that I want applied to the arms as well.
I have tried pasting the keyframes from the weapon_and_bones animation onto the arms, but it doesn't seem to work right. Is there an easy way that I can apply the arms mesh to the weapons_and_bones object since they use the same bone layout?


text:
Rigify error for simple Human
I am trying to RIGIFY a human model with a BASIC HUMAN (META-RIG). When I select RIGIFY, the RIG becomes incredible small and it is not even a proper rig. I do receive the attached error. I have not deleted any bones.

Does anyone how to fix this please?
Thank you very much.

Did you apply the scale to the armature after scaling it to fit your model? - In Object mode, select the armature and hit Ctrl-A > Scale.

EDIT
It seems that you get the same error as Rigify Generate Rig Error Index 0 Out of Range 2.83.
blr's answer should help you

This worked. Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

If it worked for you, don't hesitate to accept my answer and marked the question as solved.

@user2770097 Hello and welcome. This site is not a regular forum, please don't reply "Thanks" as an answer or comment, instead upvote the post that helped you. If you feel it completely solved your issue consider marking it as accepted.

@Squelletton Please don't quote other users answers to avoid duplication and scattering information


text:
More Viewport windows = slower switching back from Full Screen?
I finally upgraded from 3.6 to 4.0 and immediately noticed a huge impact to my workflow speed when switching back-and-forth between a 4-pane viewport setup and Full Screen.  I'm seeing about 3 seconds of delay when I'm in Full-Screen and hit CNTRL-SPACE to return back to the 4-panes.
I did a little experiment and can see the delay increases with the number of Viewport panes:

Base Blender with 1 Viewport and 1 cube:  ~ 0.5 second delay going Full Screen and back
Add 1 vertical split (2 viewports):  1.5 seconds delay returning from Full Screen
Add 1 horizontal split (3 viewports):  2.5 seconds delay returning from Full Screen
Add 1 horizontal split (4 viewports):  >3 seconds delay returning from Full Screen

It should be noted there's a slight increasing delay when entering Full Screen but I can tolerate it.  It's the 3 seconds every time I come back from Full Screen that's slowing me down.
I don't have a graphics card in my computer and would be willing to juice up my hardware but only if it helps this problem?  I'd appreciate any insight from the community before I get a new machine?
(BTW I've been using Blender for about 25 years back to the 1998 first public release.  It's remarkable to see how powerful it's become with the user community support over the years.  Let's keep it going and create amazing things together!)

If you think you've found a bug you should report it. See https://blender.stackexchange.com/questions/1377/best-place-to-put-bug-reports


text:
Compositor won't load image!

The viewer node just shows a black picture. I've checked "Compositing" in render settings. Neither inputting the render result directly nor inputting an external image file seem to work. I'm just learning how to use the compositor and I don't know what to do. Help!
Edit: I'm using Blender 2.76.

Your image isn't packed in the .blend file. However, it's seen that "Use Nodes" checkbox in the bottom of the Node Editor is turned off. Enable it and the nodes should work.

To make composite nodes up and running, check two things:

Ensure the Compositing option under Post processing in the Render tab is checked.
Ensure the Compositing nodes are enabled. In the Node Editor, Compositing Nodes tab check Use Nodes:


text:
Bones make objects scale and shrink
I created a simple Stick Figure, and I intended to rig it and make a animation resembling a 2D drawing. But I am not very good at rigging, and I cannot figure out why after an object is attatched to a bone, when I rotate it, the object shrinks as it rotates. The object also does not move exactly with the bones. I have no clue how to fix this, and the tutorials I use don't have any explanation.

The Blue is about how it should be positioned, and the red it what it actually does.

It looks like your weight painting isn't correct, could you please post your .blend here?  Or at least show some screenshots of the weight painting.

Added, @PGmath. I forget that that is available sometimes.

This is (probably) because your mesh isn't correctly assigned to your rig.
Each vertex needs to know which bone(s) to follow, and how much. If you've got one vertex assigned to two bones, then that vertex will do a combination of what both bones are doing. If you've got a vertex that's only assigned to one bone, but only at 50%, then it'll only move/rotate/scale half as much as the bone does.
To check this, go into pose mode and then from there directly into weight paint mode and check the colors of the mesh as you select each bone. Blue is zero, red is one. Zero means that vertex will not follow the selected bone at all. Red means it'll follow that bone 100%. Somewhere in between will do some combination.
You can use the painting tools to modify this, but they are also just vertex groups. You can use normal vertex group assignments to assign vertices to a given bone. With a mesh as simple as yours, that might actually be easier.
Hope that helps!

It still is not following the bone 100%, even when all vertices I want are red, and all those I don't are blue. It gets pulled toward it, but not right on it... I thought I followed the tutorial exactly, but this always happens to me.

Aha! I found one of the bones had been selected for the whole thing. That was throwing the whole thing out of wack. You were right. Thanks!