How to remove the dark, sharp outlines in this water splash simulation?

As you can see in the screenshot, this happens for the drops that aren't round, but rather triangular. If you set the default cube to smooth and give it a glas material it will look similar. There is not enough geometry to support proper transmission behaviour. 3 solutions.
Set it to auto-smooth. This is a hack, while it will save you RAM it's bound to flicker in an animation and might cause strange artefacts, worth a shot though.
Use a subsurf modifier after the water, quick fix, will increase render times.
Increase the simulation detail. The latter will increase your simulation time and render time, but also will yield more precise results.


How can I remove sharp edges from the final render?

Delete the vertex of the defective area.  Examine for unwanted pixels.  Add back a new pixel.  Correct Seams if required.

Examine the troublesome area in question in Mesh Select Mode vertex, edge, and face view while in Edit mode and remove, adjust stray vertices.


This approach took a shortcut in that the individual cubes forming the letter 'b' were all joined as one object.  The explode modifier was used to break it up.  This avoids the physics problem.

The shards that result from the explosion modifier have been rendered invisible in favour of cube shaped particles to maintain the illusion that the cube-stack is what is breaking up.

The explosion modifier and the original 'b' was, at the appropriate frame, switched to a second emitter, (3D &'B' shaped) that emits the same sized and coloured cubes as used to form the letter.

Note - there is an invisible catch plane placed just above the visible ground in order to catch the cubes as they fall.

When particle objects sit on the ground, they do so at their origin points.  This would usually be at their center, so they 'sink into the mud'.  To keep their feet dry this catch plane is set up with the required physics and a little higher than the visible ground which becomes just a prop.

-======================

After some two days of experimentation and with your apparent leaning to use the original cubes for the break up, I came up with this...

To use the stacked cubes in your uploaded Blend file, the timeline was set to frame 1, then each and every cube had it's physics reset by switching the Rigid body button off then on again.  That restored the physics.

As there are some 1040+ cubes only a quarter were actually processed this way.

In order to hold them mid-air, the Animation box is ticked and Dynamic box unticked, and both keyframed, again for each and every cube.

At the impact frame these two tick-boxes have to be keyframed again but in reverse.  The cubes then fall to the ground.

(ignore the green bar)

Granted it looks good but of the two methods, the Explode modifier gives far better control over the break-up appearance, directional bias, and general cube behavior.  With the letter solid it's also a simple matter to manually animate it's lurch on impact.

-==============-

You can skip the reversing tick boxes step, by rendering the cubes dropping from frame 1.  Animate a solid duplicate of the letter in a separate video and mix the two in the VSE.


If you have just started blender the struggle is real hahaha.
Jokes aside probably your ray distance is really big. Try from .010 too .100
See if it works.

Also remember that both high and lowpoly meshes need to be in the exact space.
And remember you need to check the selected active check box. and select first the highpoly, and then the lowpoly. then pressed bake, but i assume you already know that.

Goodluck.


First of all, I would suggest using the letters A and B, instead of X and Y. Furthermore, you don't document what type they are; I assume those are matrices. You can call X.to_euler(...) to get the rotation from the matrix, and assign it to ob.rotation_euler.

For more info, see the mathutils API documentation.


How to find out the average dB value of a track?

To calculate the dB value of a strip, you can use the following code. I've described it in more detail in my attempt to update the VSE docs (see https://vse-docs.readthedocs.io/edit/sound/measuring/volume.html).
For calculating the average dB of a track, you'll have to repeat that code for each strip on the track.
Please also note that there is a difference between average dB and Peak dB. Maybe, it's better in your example to use the peak value (see the docs).
import bpy
import math

strip = bpy.context.scene.sequence_editor.active_strip
depsgraph = bpy.context.evaluated_depsgraph_get()
sound = strip.sound.evaluated_get(depsgraph).factory

samples = sound.data()
m = np.mean(samples**2)
rms =  np.sqrt(m)
db = 20 * math.log10(rms)


You can generate a wave on a shore using a combination of a Blender fluid physics simulation and moving geometry. The moving geometry will displace water like in a wave pool. An inclined shore will cause the waves to rise and crest. The fluid particle system will simulate a foam on the surface.

Step by step instructions (Blender 2.76):

Add a cube and size it. This will be the domain for the fluid simulation. In the physics tab, set this up as a fluid domain. To get the floating foam on the water, in the particles panel, select 5000 particles and set generate to 1. Specify the location for the fluid domain cache. This location is needed later in step 4, remember it.

Add a cylinder, scale it, rotate it, and move the origin away from the center. This cylinder will be animated to rotate and cause the water displacement. In the physics tab, set this up as a fluid obstacle.

Add a object which will be used to visualize the foam. A cube does this job nicely. Name this object 'fluid-particle-for-rendering'. Scale this object to the size desired for the foam particles. In general this will be very small. In this example a value of 0.01
Add a small cube to hold the physics for foam particle. Put this object off screen. In the physics tab, set this object as a fluid particle. Select floating. In the particles tab, select the 'FluidParticles'. Set the path for the cache to the same path used for the fluid domain in step 1. In the rendering panel, set the rendering to object and select 'fluid-particle-for-rendering' as the object.

Add a cube a scale to become a plane for the beach. Rotate the beach to have an incline like a shoreline. In the physics tab, select Fluid an in the Fluid panel, set the Type to Obstacle.

Add an object to the scene to initialize the water. This can be done by adding a large cube, then using Boolean operations to define a volume inside the fluid domain. In the phyics tab, select Fluid and set the Type to Fluid. Then select Volume for 'Volume Initialization'.

Select the cylinder and make sure the timeline is at 0. Set an animation keyframe. At a later time, use 100 frames for this demo, change the rotation  about the cylinder's axis to a new value like 360 degrees. Set an animation keyframe. Open the graph editor, and set the extrapolation type to linear (use the menu at the bottom of the panel: Channel -> Extrapolation Mode -> Linear Extrapolation). This will keep the cylinder rotating forever.

The fluid simulation requires baking to generate the meshes. Select the object used for the fluid domain. Hit 'Bake'. This may take several minutes to several hours depending on the Resolution of the fluid domain and the number of trace particles.

Now the mesh is ready, and renderings or animations can be generated. The animation may require some tweaking to get the desired effect. The fluid domain panel has several settings which can be experimented with. Also, the waves may take a few rotations of the cylinder to behave consistently.

Download the demo blend here:


The Blender default color pattern for weight painting is bad. Nearly not weighted vertices displays as blue. But not weighted vertices displays also as blue.

In the Viewport Overlay options in the Weight Paint section turn the Zero Weights display from None to Active. That way the not weighted vertices will display black. And so you can see the trouble geometry with minimal weighting much easier.


How to draw a circle hole by bmesh on the plane?

Round or square hole in round or square mesh.

Would be many ways to skin this cat.

Add a plane remove its one face. Size square_size
Subdivide the plane equally using cuts
Add a circle with 4 * (cuts + 1) segments, radius circle_radius
Bridge the loops from square to circle

Test script.
import bpy
import bmesh

cuts = 3
square_size = 1
circle_radius = 2

context = bpy.context
collection = context.collection
me = bpy.data.meshes.new("Hole")
bm = bmesh.new()

bmesh.ops.create_grid(
        bm,
        x_segments=2,
        y_segments=2,
        size=square_size,
        )

bm.faces.remove(bm.faces[:].pop())
bmesh.ops.subdivide_edges(
        bm,
        edges=bm.edges,
        cuts=cuts,
        )

bmesh.ops.create_circle(
        bm,
        segments=4 * (cuts + 1),
        radius=circle_radius,
        )

bmesh.ops.bridge_loops(
        bm,
        edges=bm.edges,
        )

bm.to_mesh(me)
ob = bpy.data.objects.new("Hole", me)
collection.objects.link(ob)

This makes one of each as mesh and hole. Circle in circle (Square in square) can be done as above, simply making one twice.
Could wire this up similarly to
Create Circle with Inner Radius
giving option of square / circle inner outer and ngon fill.
See also
How can I morph a flat plane to be a flat cirlce?  re morphing one to another.


How to use playAction() on libloaded objects in BGE?

the problem seems to be in the playAction arguments exactly in ipoFlags = 1 it should be ipoFlags = 0

I have no idea why but this is what got it working at least in my test file


You should prefer using an HDRI in this case for the background. Cycles is a bit sensitive to interior render scenes in terms of noise and therefore high render times. Only build a complete environment if you have very good reasons for it. In your case, all you need is the table as an object, the rest you're better off with a HDRI background.
You can create the blur effect via various methods, I personally find it most convenient to see the result while preview rendering already. If you plan on using Depth of Field in the camera, that would blur the background automatically already. If not, you can create a low res HDRI which is blurrend in an image editor of your choice, and use a node setup like this:

Plug the blurred version in the bottom image node, and the high res one in the top one. This way reflections on your object will be sharp, but the background will be blurred.


Difference operation on Boolean modifier not showing once applied

The simplest definition of Boolean with the Difference operation is that it eliminates the common region that is occupied by 2 geometries.

In your project, You may notice that both the geometries share a common region.

You added the modifier to the Cylinder with Choker as the target object.
Ultimately the some the Cylinder part will get removed as the modifier is for the Cylinder, not for the Choker. But you want a hole in the Choker.So the best solution is to add the Boolean modifier to the Choker, with Difference as the operation, and the target object as the Cylinder.

However there will still be some portion remaining in the bottom.

So you have to apply the modifier and delete it in Edit Mode. But you may have to apply the first 2 modifiers to get the desired result.

Hope this helped!


"'Context' object has no attribute 'active_object'" error when trying to use function as driver

You could enable Use Self in the driver editor to get access to the object that the driver is used on. Then you would need to modify the arguments passed into function and use self to check for the name instead of trying to get the active object. The modified script look like this:

import bpy

def driver_func(self, val):
    if self.name == "A":
        output = val * val
    else:
        output = val + 20

    return output

#add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func

Modify the expression to driver_func(self, var) or replace var with whatever your variable is called. Be aware that your current script increases the value very quickly.

I'm not an expert at Blender's drivers, so if somebody more experienced has a better solution, feel free to add another answer.

Alternatively you can access the active object through bpy.context.view_layer.objects.active as you've pointed out in the comments. Then the script would look like this:

import bpy

def driver_func(val):
    active_obj = bpy.context.view_layer.objects.active

    if active_obj.name == "A":
        output = val * val
    else:
        output = val + 20

    return output

#add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func


How I can change the object properties after I add it in the scene and move it?

Short answer:

You can't.

Long answer:

Blender doesn't create parametric objects out of the box. Once a mesh has been modified after initial creation (including translate, rotate, or scale) you cannot modify it further with the original tool creation parameters. Blender no longer considers the object a "torus", but it becomes a bunch of vertices, edges and faces instead, like any other mesh.

In the case of a torus you could use a curve to describe the basic profile and then use that as a bevel object on a circle curve.

https://www.youtube.com/watch?v=v9CXeprYW1M

There is an addon to create parametric objects https://www.blendernation.com/2019/12/04/blender-2-8x-add-on-review-parametric-objects-wmesh-free/ you might want to try it.


Why can't I find any keyframes for location in the Blender animation window?

Actually it turns out that I had to zoom right out to see those keyframes XD So if you're having the same issue, scroll with your mouse wheel to zoom right out and you should see the keyframes for the model's location and be able to edit them from there :)


How to flip the mirror modifier? So I may edit the mirrored side

You can have the mirror modifier allow editing of both sides in edit mode by clicking the triangle icon in the modifier:

However, moving the mirrored side may be confusing, as it will always behave as if you are editing the corresponding selection on the non-mirrored side.
Flipping the model manually
There a few was to do this, but the fastest way I know of is pressing CtrlMX (or Y or Z, depending on your mirror axis) in object mode, making sure the pivot point is at the same spot as the mirror point.


The boolean flag is the simple part here. As you already assumed, those PropertyGroups are designed to hold Blender Properties only. So instead of

enabled = False

you should use

enabled = BoolProperty(default = False)  // which is anyways the default

The state property is more difficult. There are no Dictionary properties available to you, but maybe you can work around your issue by using a CollectionProperty instead?

Create a class first to hold your collection, for example:

class MyCollection(PropertyGroup):
    val1 = StringProperty()
    val2 = IntProperty(min = 0, max = 999)
    // etc etc

Then, in your Settings class, reference it like this:

variableCollection = CollectionProperty(type = MyCollection)

To add items to the collection, use this in your operator code:

x = context.object.my_settings.variableCollection.add()
x.val1 = 'This works'
x.val2 = 34

Alternatively, you can also nest PropertyGroups of course. That would be

nestedProperties = PointerProperty(type = MyCollection)

That would allow you to do:

context.object.my_settings.nestedProperties.val1 = 'This is nested'
context.object.my_settings.nestedProperties.val2 = 33

It depends on your situation in terms of what works best. But keep in mind that Blender's own property types are the only ones it can store with the file.

One last way to store Python data - but this does not save that data with the file - is simply using a key - value approach on the object. You can always use something like:

x = bpy.context.object
x['myCustomKey'] = myDesiredValue

The resulting data can then even be viewed in the viewport:


Everytime i load my project, the material is missing

You can "pack" the image into the .blend file so that you don't have to worry about the external files moving around. You do do this from the image editor, under the "image" dropdown menu (pack is the last option).

Keep in mind that it will actually save the image into the blend file, so if you did this with, say, a 10mb png file, and you save multiple versions of the blend file, they will all include the 10mb png as well.


Is it possible to animate a soft body object?

Yes this is possible

First create a floor cube large wide but not that high.
Make it a Passive rigid body.  (so it wont fall down its the floor)

Next a bit above it add a cube, subdivide it a few times.
First add rigid body collision (convex hull, source deform).
Next add softbody to this cube.

It will drop and woble on the floor.

oh and for better results use damping on soft body.
such cubes can bounche on eachother as well if you copy them shift D


Blender won't let me set the path to Mcell or Python

Try removing the extra .gz extension in your gunzip mcell-3-3_osx_intel.gz command. It looks like gunzip is trying to find your file by appending a .gz extension after you specify the filename.

That being said, the permissions error you're getting is probably not the same thing that's preventing you from using gunzip in the terminal. You can actually change the permissions of the file using the chmod command, but it might be easier to just follow the change file permissions instructions on a Mac that's a little less risky if you're not how to use chmod in the terminal just yet. Make sure you're setting the permissions to "Read & Write".


How can I create a toggle 'view to selected' hotkey?

Use the "forward slash (/)"  in the number pad on your keyboard to toggle 'View Selected'

View to Selected

Goto>Tool Shelf
Look for "Display Tab" at the corners where there are other Tabs. You will see "View to Selected" in the display tab options.!

Click here to view image illustration


The Subdivide tool has its own parameters which can be acceseed either via F6 or Last Operator panel located in Toolshelf (shortcut T). When activated, you will find option Fractal:


This is caused by the Subdivision modifier.
It interpolates the spacing between edges, and the subdivided geometry is slightly moved.
The same thing is causing the distortion when adding cuts with knife-project. You're effectivelly adding loopcuts, which limits the stretching.
These are your options:

Add a crease to the edge
Make the geometry evenly spaced on the object
Add a loopcut on both sides of the edge
Split the edge using Edge split modifier


How to get average z location of selected vertices in python?

Bmesh module solutions for both tasks (edit-mode only so far):

import bpy
import bmesh

ob = bpy.context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)

loc = [v.co.z for v in bm.verts if v.select]
if loc:
    avg = sum(loc) / len(loc)
    print(avg)

bpy.ops.mesh.select_all(action='DESELECT')

for v in bm.verts:
    if v.co.x < 2 and v.co.x > 1:
        v.select = True
bm.select_flush(True)


What shader do I use to have a shadeless cartoony look on my model?

The typical setup for a toon shader is as follows:

Although, your image does seem to have SOME shading, so maybe something more like this?


Shorten video with speed control effect strip already applied

The UI of the Speed Strips are super unintuitive. I've tried to address the subject matter here without any success: https://developer.blender.org/D6110
There are four ways to change the speed of the strip, using the speed strip options. I hope listing them here will help you and others out:
"Stretch to input strip length"

The "Use as Speed" does exactly the same as the Multiply Speed:

If "Scale to Length" is selected the strip duration goes from 0%(first frame) to 100%(last frame) and those values needs to be animated:

When "Scale to Length" is unselected, and behaves like the previous setting, but in frame numbers.


"another installation is already running"

Difficult to solve the problem - not enough data.

But there is no reason to install Blender, just download and install zip archive in preferred directory!

You can use several versions:

User folders used automatically:


Here are the steps to do that.

Open Blender.
Change the Render Engine to Cycles in the pull down menu (top center)
Then go to File - Save Startup File.

Thats it. Next time you start with a new file, it is gonna be Cycles Engine by default.


just apply the mirror modifier. Then it is a "real" mesh on both sides and you can modify it asymetrically.


One way to solve it would be by moving the cursor out of the panel temporarily, like so:
def close_panel(event):
    x, y = event.mouse_x, event.mouse_y
    bpy.context.window.cursor_warp(10, 10)

    move_back = lambda: bpy.context.window.cursor_warp(x, y)
    bpy.app.timers.register(move_back, first_interval=0.001)

How this works is: first, we grab the X and Y values of the current mouse position, because in the next line the event is updated, and we lose the original coordinates.
Next, we move the cursor way over to the bottom left corner of the screen (not 0, 0 though because that doesn't close the panel for some reason).
Then, we prepare a function which moves the cursor back to where it was originally.
And finally, we use bpy.app.timers to delay starting our function by 1 millisecond, to give Blender time to realize the cursor is no longer on the panel, and close it.


Is it possible to change sRGB/Non-Color color space procedurally?

You can switch between Linear/sRGB color space with a Gamma node.
I learned it from this Andy Burrows' article. No idea how it works though :)

Use Gamma: 0,454 to transform sRGB to Non-Color
Use Gamma: 2,200 to transform Non-Color to sRGB


You don't need much. A single large light source (the less sources the easier it is to deal with multiple shadows), and a semi-refletive surface for the ground.

Larger sources will create less defined shadows.

Why?

Do a search online the concepts of Umbra and Penumbra.

Larger sources will make the umbra be smaller than the penumbra.

(imgage source: http://www.viz.tamu.edu/faculty/parke/ends375f04/notes/sec7_5.html)

So in this case just make a large area light and let it do the magic.

For a nicer tonal reproduction use the Filmic Blender OCIO Confuguration, you can read more about it here:Render with a wider dynamic range in cycles to produce photorealistic looking images


The gaps are quantization gaps. If your image is deeper bit depth, you will have fewer gaps. Compare against a Cycles render at 32 bits float stored as an EXR versus say, an 8 bit TIFF.

Some 8 bit manipulations will squeeze values together or pull them apart, making the combing more obvious.


Water Not Being Emitted and the Domain Stays a Cube when Baked in Water Simulator

Share the file just to make sure, but you can try to set the volume initialization on all the objects to both, and make the domain object larger.


Using python, how do I delete all text in a text block, without using cut?

Text blocks have a clear() method which will clear all lines:

import bpy
bpy.data.texts['Text Block Name'].clear()

Alternatively, if you need to access each line individually, Text blocks have a lines property which you can loop over, setting the body property of each line to a blank string (""):

import bpy
t = bpy.data.texts['Text Block Name']

for line in t.lines:
    line.body = ""


Automatically dissolving edges in quad faces that share same normals

A partial solution that lower the mesh vertices but does not keep the quads.

Join the two shapes (to work both on 'Marco' and 'Aries'). For that select them both in object mode, then CtrlJ
Go to edit mode and delete the bottom faces vertices, so that you keep only the top faces

At this step you have the exact same shape, except it is flat :

Go to object mode
Convert to curve AltC, then "curve from mesh/text"

You obtain this (no faces) :

Go to the properties panel and in the curve tab, then click on 2D

This makes the faces reappear :

Now to regive volume. Convert again to mesh (AltC then "Mesh from curve/.../text")

The inner mesh is the following :

You can now extrude it again to regive the original volume.

So no quads. But starting with 41 402 vertices, you now have 8 080. And the shape is the same.


The curve modifier is not aimed for this. And Bevel tool doesn't work like this, either. The best way to control planar curvature is by using curves, which may not well benefit topology, however.

I recommend to use Subsurf modifier + edge creases. Add some loop cuts first, then with a few tweaks on the vertex position (G) and adjust crease weight (ShiftE) on some edges, you can make whatever you want with nice topology. I'm sure you also want to bend it later, so topology is important to consider in advance.


How to remove a hole from a solid plane?

Select the faces around the holes that you dont want press x and then select the edge loop and press f for fill the place again.


Can modifiers, in Blender 2.78, be applied as shape keys?

Yes, for modifiers that don't change the objects topology.  For example, the displacement modifier has an option to apply it as a shape key.

Other modifiers such as subdivision surface can not be applied as shape keys, presumably because the vertex count changes. Shape keys cannot interpolate between the two shapes that have different topology.


A bump node is not possible to reproduce via component nodes.  The reason for this is that a bump node doesn't just lookup the bump value of the sample being evaluated, but the bump values of adjacent samples, in order to generate a slope for the sample, which then gets translated into rotation of the normal.  That hard part is, how far should those adjacent lookups be?  You can't look by just shifting 1 UV pixel, because that could be a huge distance or a tiny distance, depending on distance, FOV, and on UV scale.  (Not to mention filtering.)  You need to figure out how far to look, and doing that requires something like screen space derivatives (which are probably used for Eevee, but Cycles probably does something different) to see how much UV changes with respect to world position.
Unfortunately, Blender does not expose screen space derivatives to its nodes.  (Which is honestly too bad, because there are other cool things you can do with screen space derivatives as well.)
However, even though these can't be recreated using only Blender's nodes, there exist plenty of environments where you can play with exactly how bump mapping works.  If you're interested in this kind of stuff, Unity is a great place to learn about (rasterizer) rendering, and there are plenty of public shaders available to study.
Normal mapping is a little bit different, because it doesn't require any screen space derivatives (except to determine the UV tangent, if you aren't providing that as vertex data, but Blender kindly provides you a tangent node, so you don't have to worry about that.)  The basic way that it works is by rotating the normal toward or away from the tangent on the basis of + or - red, and toward or away from the binormal (a unit vector perpendicular to both the tangent and the "raw" normal) on the basis of + or - green.  (What is minus green?  The colors of a normal map are actually remapped unit vectors, which exist in the -1 to 1 space for all channels, remapped into the 0 to 1 space so they'll fit in typical image formats.  That's why the base color of a tangent space normal map is that lilac: 0.5,0.5 red green actually maps to 0,0 x,y, and the 1.0 blue maps to 1.0 z.)
If you had a bake of UV stretch, you could do a bump procedurally, with other nodes, assuming your mesh didn't deform, which would change the UV stretch.  However, the whole reason why we use tangent space normal maps is to support deforming meshes.  If you were working with a mesh that didn't deform, you may as well use an object space normal map.
Object space normal maps are extremely simple-- you can just remap these to -1,1 space and vector transform from object to world.
Should be said, there's nothing to gain from recreating any of these in nodes, except understanding, and that understanding could be gained much more easily by reading shaders that implement bump mapping.


Align empty to normal with object matrix world rotation?

import bpy
from bpy import context
from mathutils import Matrix, Vector
import bmesh

obj=context.object
mw = obj.matrix_world
me=obj.data
m = mw.copy()
mi = m.inverted()

def create_rotation_matrix_from_face(mx, face):
    normal = (mx.to_3x3() @ face.normal)
    tangent = (mx.to_3x3() @ face.calc_tangent_edge_pair())
    binormal = normal.cross(tangent)
    rot = Matrix()
    rot[0].xyz = binormal
    rot[1].xyz = normal
    rot[2].xyz = tangent
    return rot.transposed()

#apply all transforms
me.transform(mw) #Transform mesh vertices by a matrix
mw = Matrix()

bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.from_edit_mesh(obj.data)
for face in bm.faces:
    if face.select:
        mat_rot=create_rotation_matrix_from_face(mw, face)
        loc=mw @ face.calc_center_median() # > vector
        mat_trans = Matrix.Translation(loc)
        break

mat=mat_trans @ mat_rot
bpy.ops.object.mode_set(mode='OBJECT')
empty=bpy.ops.object.empty_add(type='ARROWS', radius=1)

scale_empty=context.object.scale.copy() #scale will change after the matrix modification (next line)
context.object.matrix_world @= mat
#empty size
context.object.scale=scale_empty #original size
#or
#context.object.scale=obj.scale #size of the object x,y,z

#apply all modif back
me.transform(mi) #all zero loc rot scale
mw = m #back to start matrix
me.update()


Water Material Not Working the Same in Eevee as it Does in Cycles

Eevee works differently than cycles and does not have all the same capabilities. You can try compositing cycles and eevee renders for different parts of your scene using the Holdout shader, but because the water has those reflections, you might just have to do the whole thing in Cycles.


Adding Borders to a Video (Letterbox Effect)

I figured it out - I just needed to whip out a pen and notepad to write down the general idea of the instructions I was getting and then improv with what I had available.

For those interested in creating a letterbox effect for their video in Blender, follow these steps and you'll achieve your goal.

If you haven't done so already, drag and drop your video onto the timeline.
Select your video clip
Select the Strip option (should be on the top or bottom of your timeline, depending how your UI looks).
When you click Strip, you'll see a menu. Look for an option to Set Render Size. For me, it was hidden behind the Movie Strip menu.
Look for a menu that shows your video's dimensions (for me it was to the right of the video preview box)
Add however many pixels you'd like to the X and/or Y axis (I personally went with 60 for both sides)
Now look for a menu that shows an option for Offset (for me, that menu was directly beneath the menu where we just punched in our resolutions).
Click the checkbox for Offset and add HALF of the number of pixels you added to each axis in the previous menu. For example, if you added 60 pixels to your resolution on the x-axis, add 30 to your offset.

Congratulations, you should now have a letterbox effect on your video! The checkerbox image you see around the video should default to black once you publish your project. If you'd like a different color than black, you can select Add, which should be near Strip, and then simply click the color option. Expand the color block to equal the length of your video and place it on a lower channel of the timeline so that it doesn't overlap with the video. Select your video and find the Blend option to switch it to Alpha Over so that the video rests above the color.

(By default the color will be black. Simply select it on the timeline and find the Color option in the same menu you found the offset option for the previous steps. Change to a color of your desire).

Thanks and hope this was helpful.


How to move using precision at a random angle?

You can select a face, turn the transform orientation to "normal", then click the plus button: this will create a new set of trasform orientation that you can use to manipulate your vertices, edges and faces along the three normal vectors of the first face you selected.

Then in the overlays section you can activate the measurement function, to get infos of edges lenghts and faces areas.


You need the UV Project Modifier.

Make a Material with your Texture
In the Object Data Tab of the Properties create a new UV Map
In the Modifier Tab add the UV Project Modifier, select your Image and your UV and check Override Image.
Add a new Camera to the Scene and put it in the UV Project Modifier Tab as Projector
Go into Textured Mode (AltZ)


make sure that you didn't disable render for the domain.


How to draw a flat ellipse surface in Blender with the following known dimensions?

I found a solution!
Use this code in the blender text editor:

import bpy
import math

#IMPORTANT : set 3d cursor to world origin
bpy.context.area.spaces[1].cursor_location = (0.0, 0.0, 0.0)

#Add circle curve
bpy.ops.curve.primitive_bezier_circle_add(view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))

#define variables
a = 10
b = 2
c = 3 # I use the half of c
d = 5

#Calculate width
width = a + b   #or width = a + d + b?

#Calculate horizontal distance from world origin of c
distance = b / 2

#Calculate height c for the circle
#x^2 + y^2 = 1, see Unit Circle
x = (distance / (width / 2)) * math.pi * 0.5

cCircle = math.sqrt(1 - x**2)

#now we have to scale the height of the circle, so cCircle becomes c. And give its width.
factor = c / cCircle

bpy.ops.transform.resize(value=((width)/2, factor, 1), constraint_axis=(True, True, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)

#Calculate location origin
originX = -((width) / 2 ) + b
originY = 0
originZ = 0

#Set 3d Cursor at Origin location
bpy.context.area.spaces[1].cursor_location = (originX, originY, originZ)

#Set origin to 3d cursor
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')

#Move object to world origin
bpy.ops.transform.translate(value=((width/2) - b, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

#Voila

I hope this helps!


I have had a similar problem. My fix was to make the pipe after I simulated the fluid. This works pretty realistically. Hope this works for you!


How to speed up the OpenGL (viewport) rendering?

Firstly I would like to state that OpenGL viewport rendering has nothing to do with Cycles rendering.

Speed of OpenGL viewport rendering depends heavily on your GPU and in some cases (particle/physics/modifier heavy scenes) also on your CPU. There are certain borders that GPU can't get across whatever the setting may be.

Here are two solutions that might help you though, altough I am not certain what kind of result are you looking for. Both are diminishing the actual result but the speedup is considerable in certain situations.

Disabling the Anti-Aliasing would improve the speed of the OpenGL rendering greatly.

You may also think about using Bounding boxes only, if you are trying camera movement or animating a lot of objects and you want to see how their general location and rotation change over time.


BlenderGIS import call from python script

Have a look at the operator name when you mouse over it, in this case bpy.ops.importgis.shapefile()

Now in the python console type in command and using autocomplete ctrl-space

>> bpy.ops.importgis.shapefile(
shapefile()
bpy.ops.importgis.shapefile(filepath="", filter_glob="*.shp", useFieldElev=False, fieldElevName="", useFieldExtrude=False, fieldExtrudeName="", extrusionAxis='Z', angCoords=False, separateObjects=False, useFieldName=False, fieldObjName="")

You get the operator call and the parameters.  Testing with a local filepath

>>> bpy.ops.importgis.shapefile(filepath="/mnt/.../GDAL/contour.shp")
Read shapefile...
Feature type : PolyLine
DBF fields : ['id', 'elev']
0%
10%
20%
...
90%
100%
Imported mesh had some problem, check the result!
{'FINISHED'}

>>>


Note - this Blend file was from Version 2.77a.   The same principle applies for later versions.

Once the rotation is set up, it often looks more convincing to fade in a semmi-transparent disc whilst also fading out the propeller to semmi- transparency, reversing the procedure as it slows down.

In this example the Material slot's 'Alpha' slider was keyframed for both the prop & disc.

Layer 2 is a turbine propeller whereas Layer 7 is a piston engine with compression.  The compression kick-back is done in the graph editor.
(see the green 'Y rotation' f-curve where the prop stops)


You could create a default smoke material and save it in your default Blender starting scene if you find yourself doing smoke sims really often. Or you could write a small python script that create a domain with the right material and node setup. At the end of the day it's just a few extra clicks, I wouldn't bother with it. Principled BSDF is just the default setup for all Blender materials (remember that materials are completely independent data from objects).


Your problem is that you can see the body beneath the coat. The easiest method to make it invisible is to use a Mask modifier: Select the vertex group you want to hide, give it a name, give your object a Mask modifier, in the Vertex Group field of the modifier, select the group you've created, then use the arrow on its right to switch (<->). Now your body will be invisible.


I would model the reddish smoke as a solid object, parented with the ship, move it in it's own layer, set to a new render layer.

In the compositor you can blur it, make it transparent, add some noise texture to bring some life, mask some parts to animate it .....

Fast rendering and effective results


How to apply a hair particle effect to a specific material

You could use weigth painting. Select your object and go to the Data tab (triangle) in the Properties window. There is a section called Vertex Groups. Click the + icon to create a new vertex group and give it a name. Now you can switch from Object Mode to Weight Paint mode and paint the verts where you want your particles to appear. Blue = no particles, red = 100% of particles.
Afterwards go to your Particles tab, scroll down and open the Vertex Groups section. Click next to Density and select the vertex group you just painted.

(can't provide pics right now, sorry)


How do I attach a Hair piece to mesh so it moves with armature

Have you tried the Boolean "UNION" Modifier?
Add Modifier, Boolean. In the drop down select Union, then eye dropper the Hair Mesh


The edges of the door arc aren't marked sharp like the other edges that are colored light blue. You can either mark these edges as well (select the edges then Ctrl+E > Mark Sharp) or set the shading to flat for the entire mesh.


Duplicating object aligned with and on faces

If this didn't change in the 2.8 (I use the 2.79), choose align to view on the editing preference

Then in edit mode choose the face you want your object to be aligned to
Hit shitf + 7 to get your view parallel to that face and shift D to duplicate the face (now extrude it and you have your cube.

If you need to extrude a face and have it's size to increase with the distance, do it with option + S (on mac)


Cannot deselect edge loops in blender 2.8 with Shift+Alt+LMB

I had the same problem back in 2.82.
I unchecked Emulate 3 Button Mouse in the Input tab on User Preferences which is unfortunate because although I have a three button mouse, I prefer to use the Alt + LMB.


API / Script - Remove all selected vertices from all Vertex-Groups

Script version of @ElliotThomas answer

These two scripts have to be run in edit mode.

To remove all selected verts from all vertex groups

import bpy
context = bpy.context
ob = context.edit_object

bpy.ops.object.vertex_group_remove_from(use_all_groups=True)

Alternatively can iterate through vertex groups and use the operator on the active group.  This example does as above,  can be adjusted to skip certain groups.

import bpy
context = bpy.context
ob = context.edit_object

avg = ob.vertex_groups.active
for vg in ob.vertex_groups:
    ob.vertex_groups.active = vg
    bpy.ops.object.vertex_group_remove_from()
ob.vertex_groups.active = avg

Can also use the api method vg.remove(), for example: to remove verts with indices 0, 1 and 11 from group "Group"

C.object.vertex_groups["Group"].remove([0, 1, 11])

this has to be run in object mode, or will throw an error.


Is it possible to make light pass through only a part of the texture

You can use a mix shader connected to a transparency and diffuse nodes, the texture is the one that controls the mix:

Then just use volume scattering in the world volume.

Usually the default density for volume scatter is way to high, so play with the values until you find the right one for your needs.

keep in mind also that the emitter object inside might need to be quite bright.


How can I duplicate an object with independent meshes?

You should copy object data.
obj1 = bpy.data.objects['Cube']
data = obj1.data.copy()
obj2 = obj1.copy()
obj2.data = data
bpy.context.collection.objects.link(obj2)
obj1.location = Vector((3,0,0))
obj2.animation_data_clear()
ve = obj2.data.vertices[0]
ve.co = ve.co*2


How to snap to a face with axis constraints?

I can't get snap-to-face to work the way I would expect in 2.83beta, either..

The shipped TinyCAD add-on is one option, for this one..

Activate TinyCAD
(Assuming source and target are part of the same object) Select 1 face, 1 edge
Use TinyCad's Extend Edge to Face
(Maybe with Automerge switched on) GG slide the source vertex down the extended edge, all the way, onto the projected vertex.

I agree, the snap system could be improved.. important to keep it quick and minimal, though, IMO.. hunting through the snap options in some apps is not fun.


When I render an image it comes out different than what I see in the viewport. How can i fix this?

Do you have any modifiers (e.g. subdivision), which have different parameter settings for "Viewport" and "Render"?

If so, setting the number to the same value should give you a consistent result!


Soft Bodies Merge Together During Animation

after testing it out a bit more, I realized it had to do with how I set up the cube. I removed the rigid body physics, kept the collision physics and decreased both the inner and outer thicknesses. That stopped it from pushing the balls together.


How the Normal Map baking works, what is the ray direction

So first, let's make sure we define what "inwards" means.  I'm going to say it means in the opposite direction of your low poly's normals.  So if we were to draw your low poly's normals on your graphs above, the normals would be pointing upwards.
As of 2.91.0-ish, rays are shot in the opposite direction of the low poly's normals-- that is, inward.  Rays that fail to intersect cause 0.5,0.5,1.0 to be written (which is the same thing as saying, using the low poly's own normals.)
My memory of this in earlier versions (like 2.79, 2.80) was that rays were shot in both directions, but you would still want an enclosed high poly, because rays shot in the direction of the low poly's normals would hit the backfaces of the high poly rather than the front faces, and you'd get screwed up normals.
"Ray distance", just a version or two ago, referred to what is now "Extrusion."  This means to start the rays offset in the direction of the low poly's normals.  It is exactly the same as baking from a displaced low poly, or baking from a cage with a numeric shrink/fatten operation applied to all vertices.  To be explict, this does change the origin of the rays.
"Max ray distance", as implemented a version or two ago, means that Blender will just discard results that arise from intersections greater than a certain distance.  I'm not really sure what the intended use for this is, although it can be useful for some texture baking situations that are selected-to-active bakes but couldn't reasonably be described as high-to-low bakes, like baking text objects to a texture or something.  This does not change the origin of the rays.


FBX export group instances to unity issue

You could try removing that empty object, in blender you use empty objects to avoid those z-axis issues between blender and unity. Also when exporting to FBX you could set what is your up-axis

EDITED:
From your shared file I exported one by one to FBX and them imported into Unity, without that axis issue, try that, BTW don't forget to set your forward and up axis... If it doesn't work let's go chat


You don't just have a Mirror and Subsurf modifier on your mesh, you also have a Particle System. The dot you are seeing is one of the emitted particles.

To remove the particle system (as it sounds like you didn't intend to have one) first click the highlighted button below to go to the particle system settings:

Then click the minus button to remove the particle system from your object:


How to output a color ramp node in a material to it's own compositor pass? (2.79b)

You could try duplicating the entire scene. (Full copy) Then in the new scene change the material duplicate to an emission type, with the output being the grayscale of the color ramp. The new scene is also set to only render an emission pass.

Then in compositing output you can use the main scene for the render, and the duplicate scene's emission output as the masking pass. Not exactly what it's intended for (likely to need some adjustment), but I think this may be workable.

Also on the new scene, you can turn samples way down to speed it up a bit, since it's only being used as a mask.


How to keep projects of previous blender versions when installing new versions?

First off, reinstalling Blender won't delete any blend file.
Second, there is a portable version for each release, which means you don't necessarily have to uninstall anything and can have multiple versions at the same time. Moreover, the 2.79 RC1 only has a portable version, no installer yet. So in fact you can't even replace your 2.78 installation.

To use the portable version, unzip it and open Blender.exe, very simply.


How to colour faces produced by a Boolean modifier

You need to have both materials on the Object with the boolean modifier (but of course only one of those is assigned to that mesh). Here the blue cube (the cube with the boolean modifier) has both materials: the blue and the red material. The red cube only has the red material.


How to give Tepig its tail? (Sculpting a curly tail)

This methods seems to work fine!
1.create base tail using curve modifier !

2.Convert the curve to a mesh!

3.Add a iso-sphere and join it to curve mesh using boolean modifier.

4.now join the tail to the sculpt mesh using boolean modifier!

Now you have a tail and can add more detail to it with sculpting.


The simple answer is start with a cube, but really, I think you're asking how to model. There are a lot of great tutorials on YouTube. Grant Abbitt has a great series on beginning modeling. You should start here: https://www.youtube.com/watch?v=7MRonzqYJgw&list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri. But there are many ways to learn Blender, and many excellent tutorials (Blender Guru's Doughnut series, etc.). Good luck, and don't get discouraged.


Is there a way to resize multiple objects with different sizes, to the same dimensions?

press TAB
select all by pressing "A"
press S to scale
now without touching anykey/mouse.. press X
and now move your mouse ... it will start scaling in X direction.


Blender wouldn't paint neither face sets not the mask anymore

The problem is the Armature. Modifiers prevent Hide, Mask, and Facesets in Sculpt mode. Usually, you get a warning like this:

Armature, Cloth, and Hair/Particles, and all the other physics are also Modifiers. It's probably a bug that Blender doesn't warn you if you have one of these 3 activated. (Dynamic Paint gives you a warning.)
To see your Facesets and Mask in Sculpt Mode again you just have to disable the Armature modifier in viewport render by clicking the little icon that looks like a monitor.

Make sure your Faceset overlays are enabled. It's not enabled in the uploaded blend file ;-)


Third Person: Rotate camera around player

It is the same principle as with first person view:

parent the camera to the character you want to follow
use the mouse actuator (or any other method) to turn the camera according to you needs

The difference is:

you do not place the camera around the (virtual) eyes - but somewhere behind the character.


Bone heat weighting: failed to find solution for one or more bones

I also faced this message, the reason was that the model wasn't symmetric (after twiddling with an already applied mirror modifier). In this case you could try to cut off one half and mirror it again. After that the parenting with automatic weights should work.

See also this thread on BA Bone-heat-weighting-failed-to-find-solution-for-one-or-more-bones


Blender's Manual gives you the answer:

Bounding Box Center: ,
3D Cursor: .
Individual Origins: Ctrl.
Median Point: Ctrl,
Active Element: Alt.


Designing an UI or Add-on is basically a combination of supplying Properties and the inheritance of built-in Type classes (Panel, Operator, Menu etc.).

Properties
Start by defining your Properties first. Properties are basically 'data types' and can be displayed in the UI for basic user interaction. Note that you can access the value of each property from almost everywhere. To populate a complete list in the console use python's dir() method on bpy.props :

Click to enlarge
Property Appearance

Define a BoolProperty for a 'Checkbox'
Define a FloatProperty or IntProperty to get a 'Slider'
Define a StringProperty for all different kinds of 'Character Input' or 'File Paths'
Define an EnumProperty to get a 'Dropdown Menu'
Define a FloatVectorProperty or IntVectorProperty for compound values eg. 'Color Pickers', 'Location Coordinates', 'Velocity Vectors', 'Matrices' etc.
...

Property Definition
from bpy.props import (StringProperty,
                       BoolProperty,
                       IntProperty,
                       FloatProperty,
                       EnumProperty,
                       )

my_bool : BoolProperty(
    name="Enable or Disable",
    description="A bool property",
    default = False
    )

my_int : IntProperty(
    name = "Set a value",
    description="A integer property",
    default = 23,
    min = 10,
    max = 100
    )
...

Note that as of Blender 2.8x, properties should be assigned to variables using a single colon : instead of the usual assignment operator = like in Blender 2.7x or older versions of Blender.

Types
The contents of bpy.types are class templates built for inheritance.
Panel
Panels are everywhere in Blender so it's the most basic element of the user interface. Where the panel is going to be used is defined by bl_space_type. Blenders interface is 'context sensitive' so you can define bl_context to get the Panel in one respective Mode (Object Mode, Edit Mode etc.).

class HelloWorldPanel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_hello_world"
    bl_label = "Hello World"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        self.layout.label(text="Hello World")

bpy.utils.register_class(HelloWorldPanel)

Sub Panels

As of Blender 2.8x we can have sub panels by assigning a certain panel (parent) to bl_parent_id:
import bpy

class HelloWorldPanel:
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_options = {"DEFAULT_CLOSED"}

class HELLO_PT_World1(HelloWorldPanel, bpy.types.Panel):
    bl_idname = "HELLO_PT_World1"
    bl_label = "Panel 1"

    def draw(self, context):
        layout = self.layout
        layout.label(text="This is the main panel.")

class HELLO_PT_World2(HelloWorldPanel, bpy.types.Panel):
    bl_parent_id = "HELLO_PT_World1"
    bl_label = "Panel 2"

    def draw(self, context):
        layout = self.layout
        layout.label(text="First Sub Panel of Panel 1.")

class HELLO_PT_World3(HelloWorldPanel, bpy.types.Panel):
    bl_parent_id = "HELLO_PT_World1"
    bl_label = "Panel 3"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Second Sub Panel of Panel 1.")

classes = (
    HELLO_PT_World1,
    HELLO_PT_World2,
    HELLO_PT_World3
)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)

if __name__ == "__main__":
    register()

See also: Text Editor > Templates > Python > UI Panel.
Operator
The Operator is the most important bit to understand. You can display 'operators' as Buttons and once registered and you can call it from everywhere via bpy.ops.IDNAME(). That's also the way blender is designed, all real Buttons are 'operators' under the hood, mostly written in C but then exposed to python. See also: Text Editor > Templates > Python > Operator....

class HelloWorldMinimal(bpy.types.Operator):
    bl_idname = "wm.hello_world"
    bl_label = "Minimal Operator"

    def execute(self, context):
        # Report "Hello World" to the Info Area
        self.report({'INFO'}, "Hello World")

        return {'FINISHED'}

bpy.utils.register_class(HelloWorldMinimal)

# test call the operator
bpy.ops.wm.hello_world()

The Operator class template comes with predefined methods, in fact poll, invoke, execute, draw, modal, and cancel which can be used along custom properties for all different kinds of operations and also to provide user interaction. More complete example of an operator:
class HelloWorld(bpy.types.Operator):
    bl_idname = "wm.hello_world"
    bl_label = "Minimal Operator"
    bl_options = {'REGISTER'}

    # Operator user properties, should be assigned using a single colon :
    # instead of using an equal sign = in Blender 2.8
    report_flag: bpy.props.BoolProperty(
        name = "Report",
        default = True)

    @classmethod # Will never run when poll returns false
    def poll(cls, context):
        return context.object

    def invoke(self, context, event): # Used for user interaction
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

    def draw(self, context): # Draw options (typically displayed in the tool-bar)
        row = self.layout
        row.prop(self, "report_flag", text="Report Hello World")

    def execute(self, context): # Runs by default
        if self.report_flag:
            self.report({'INFO'}, "Hello World")
        else:
            print ("Hello World")
        return {'FINISHED'}

bpy.utils.register_class(HelloWorld)

# For interaction, pass 'INVOKE_DEFAULT' when calling
# the operator, this way invoke runs before execute method
bpy.ops.wm.hello_world('INVOKE_DEFAULT')

Further reading: How to call a confirmation dialog box? (for tremendously dangerous operators).
Menu
For a custom menu define/inherit a Menu Class. Add your operators and properties to the draw() function properly (see also: Text Editor > Templates > Python > UI Menu templates).

class SimpleCustomMenu(bpy.types.Menu):
    bl_label = "Simple Custom Menu"
    bl_idname = "OBJECT_MT_simple_custom_menu"

    def draw(self, context):
        layout = self.layout

        layout.operator("wm.open_mainfile")
        layout.operator("wm.save_as_mainfile")

# The menu can also be called from scripts
bpy.ops.wm.call_menu(name=SimpleCustomMenu.bl_idname)

You can also draw a button to call the menu without declaring any extra operator by layout.operator("wm.call_menu").name="bl_idname"
Submenu
To get a submenu, call the second one within the parent menu via layout.menu(bl_idname).

class MyCustomMenu(bpy.types.Menu):
    bl_label = "First Menu"
    bl_idname = "OBJECT_MT_custom_menu"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Hello First Menu!", icon='WORLD_DATA')

         # call the second custom menu
        layout.menu("OBJECT_MT_sub_menu", icon="COLLAPSEMENU")

class MyCustomSubMenu(bpy.types.Menu):
    bl_label = "Sub Menu"
    bl_idname = "OBJECT_MT_sub_menu"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Hello Second Menu!", icon='WORLD_DATA')

        # call another predefined menu
        layout.operator("wm.call_menu", text="Unwrap").name = "VIEW3D_MT_uv_map"

# draw a button within the panel to call the first menu
class OBJECT_PT_my_panel(bpy.types.Panel):
    ...
    def draw(self, context):
        layout.operator("wm.call_menu", text="Call My Menu").name = "OBJECT_MT_custom_menu"
        ...

All in One
When creating an Add-on, usually a lot of properties are requiered. For a better organisation you can create a 'settings class' by using a PropertyGroup.Note that as of Blender 2.8x, properties should be assigned using a single colon : instead of the usual assignment operator =.
2.7x
class MySettings(PropertyGroup):

    my_bool = BoolProperty()
    my_int = IntProperty()
    my_float = FloatProperty()
    ...

2.8x
class MySettings(PropertyGroup):

    my_bool: BoolProperty()
    my_int: IntProperty()
    my_float: FloatProperty()
    ...

Also, as of Blender 2.8x module/class registration has changed to prevent name conflicts. bpy.utils.register_module(__name__) isn't available anymore so you basically have to register/unregister each class separately or within a loop (best practice):
classes = (
    WM_OT_HelloWorld,
    OBJECT_PT_CustomPanel,
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

Note that in addition to the old naming conventions you also have to add a seperator like _OT_, _MT_ or _PT_ to the name of your class based on the inherited class type (Operator, Menu, Panel).

Add-On Template
The following Add-on appends a custom panel to the Tool Shelf of the 3D View and prints the current 'user values' of all custom properties to the console:

Blender 2.7x
    bl_info = {
    "name": "Add-on Template",
    "description": "",
    "author": "",
    "version": (0, 0, 2),
    "blender": (2, 70, 0),
    "location": "3D View > Tools",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

import bpy

from bpy.props import (StringProperty,
                       BoolProperty,
                       IntProperty,
                       FloatProperty,
                       EnumProperty,
                       PointerProperty,
                       )
from bpy.types import (Panel,
                       Operator,
                       PropertyGroup,
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MySettings(PropertyGroup):

    my_bool = BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False
        )

    my_int = IntProperty(
        name = "Int Value",
        description="A integer property",
        default = 23,
        min = 10,
        max = 100
        )

    my_float = FloatProperty(
        name = "Float Value",
        description = "A float property",
        default = 23.7,
        min = 0.01,
        max = 30.0
        )

    my_string = StringProperty(
        name="User Input",
        description=":",
        default="",
        maxlen=1024,
        )

    my_enum = EnumProperty(
        name="Dropdown:",
        description="Apply Data to attribute.",
        items=[ ('OP1', "Option 1", ""),
                ('OP2', "Option 2", ""),
                ('OP3', "Option 3", ""),
               ]
        )

# ------------------------------------------------------------------------
#    Operators
# ------------------------------------------------------------------------

class WM_OT_HelloWorld(bpy.types.Operator):
    bl_idname = "wm.hello_world"
    bl_label = "Print Values Operator"

    def execute(self, context):
        scene = context.scene
        mytool = scene.my_tool

        # print the values to the console
        print("Hello World")
        print("bool state:", mytool.my_bool)
        print("int value:", mytool.my_int)
        print("float value:", mytool.my_float)
        print("string value:", mytool.my_string)
        print("enum state:", mytool.my_enum)

        return {'FINISHED'}

# ------------------------------------------------------------------------
#    Menus
# ------------------------------------------------------------------------

class OBJECT_MT_CustomMenu(bpy.types.Menu):
    bl_idname = "object.custom_menu"
    bl_label = "Select"

    def draw(self, context):
        layout = self.layout

        # Built-in example operators
        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
        layout.operator("object.select_random", text="Random")

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_idname = "object.custom_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_category = "Tools"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool

        layout.prop(mytool, "my_bool")
        layout.prop(mytool, "my_enum", text="")
        layout.prop(mytool, "my_int")
        layout.prop(mytool, "my_float")
        layout.prop(mytool, "my_string")
        layout.operator("wm.hello_world")
        layout.menu(OBJECT_MT_CustomMenu.bl_idname, text="Presets", icon="SCENE")
        layout.separator()

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_tool = PointerProperty(type=MySettings)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

Gist: https://gist.github.com/p2or/a00bdde9f2751940717a404cf977dd01
Blender 2.8x
bl_info = {
    "name": "Add-on Template",
    "description": "",
    "author": "p2or",
    "version": (0, 0, 3),
    "blender": (2, 80, 0),
    "location": "3D View > Tools",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

import bpy

from bpy.props import (StringProperty,
                       BoolProperty,
                       IntProperty,
                       FloatProperty,
                       FloatVectorProperty,
                       EnumProperty,
                       PointerProperty,
                       )
from bpy.types import (Panel,
                       Menu,
                       Operator,
                       PropertyGroup,
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MyProperties(PropertyGroup):

    my_bool: BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False
        )

    my_int: IntProperty(
        name = "Int Value",
        description="A integer property",
        default = 23,
        min = 10,
        max = 100
        )

    my_float: FloatProperty(
        name = "Float Value",
        description = "A float property",
        default = 23.7,
        min = 0.01,
        max = 30.0
        )

    my_float_vector: FloatVectorProperty(
        name = "Float Vector Value",
        description="Something",
        default=(0.0, 0.0, 0.0),
        min= 0.0, # float
        max = 0.1
    )

    my_string: StringProperty(
        name="User Input",
        description=":",
        default="",
        maxlen=1024,
        )

    my_path: StringProperty(
        name = "Directory",
        description="Choose a directory:",
        default="",
        maxlen=1024,
        subtype='DIR_PATH'
        )

    my_enum: EnumProperty(
        name="Dropdown:",
        description="Apply Data to attribute.",
        items=[ ('OP1', "Option 1", ""),
                ('OP2', "Option 2", ""),
                ('OP3', "Option 3", ""),
               ]
        )

# ------------------------------------------------------------------------
#    Operators
# ------------------------------------------------------------------------

class WM_OT_HelloWorld(Operator):
    bl_label = "Print Values Operator"
    bl_idname = "wm.hello_world"

    def execute(self, context):
        scene = context.scene
        mytool = scene.my_tool

        # print the values to the console
        print("Hello World")
        print("bool state:", mytool.my_bool)
        print("int value:", mytool.my_int)
        print("float value:", mytool.my_float)
        print("string value:", mytool.my_string)
        print("enum state:", mytool.my_enum)

        return {'FINISHED'}

# ------------------------------------------------------------------------
#    Menus
# ------------------------------------------------------------------------

class OBJECT_MT_CustomMenu(bpy.types.Menu):
    bl_label = "Select"
    bl_idname = "OBJECT_MT_custom_menu"

    def draw(self, context):
        layout = self.layout

        # Built-in operators
        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
        layout.operator("object.select_random", text="Random")

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool

        layout.prop(mytool, "my_bool")
        layout.prop(mytool, "my_enum", text="")
        layout.prop(mytool, "my_int")
        layout.prop(mytool, "my_float")
        layout.prop(mytool, "my_float_vector", text="")
        layout.prop(mytool, "my_string")
        layout.prop(mytool, "my_path")
        layout.operator("wm.hello_world")
        layout.menu(OBJECT_MT_CustomMenu.bl_idname, text="Presets", icon="SCENE")
        layout.separator()

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MyProperties,
    WM_OT_HelloWorld,
    OBJECT_MT_CustomMenu,
    OBJECT_PT_CustomPanel
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

Gist: https://gist.github.com/p2or/2947b1aa89141caae182526a8fc2bc5a

More complex examples

What ui would work for choosing from a long, long list?
script custom previews in a menu
Create an interface which is similar to the material list box


Get material and color of material on a face of an object in Python

import bpy

context = bpy.context
obj = context.object
mesh = obj.data

for f in mesh.polygons:  # iterate over faces
    print("face", f.index, "material_index", f.material_index)
    slot = obj.material_slots[f.material_index]
    mat = slot.material
    if mat is not None:
        print(mat.name)
        print(mat.diffuse_color)
    else:
        print("No mat in slot", f.material_index)


Blender 2.8 Eevee. Can't find Material Blend mode option

Your screen looks like you have set Cycles as Render Engine not Eevee.

When you switch to Eevee render engine in Render Properties Editor ...

... than you will have available Blend mode from properties panel

(Shader Editor > Properties > Options)

Also availaible from Material Properties Editor > Settings > Blend Mode


You can use the manipulate center points option for this. It works best with a pivot set to the 3D cursor so select the center cube, and Shift+S>Cursor to selected to send the cursor there. Then hit . to set the pivot to the 3D cursor.

Enable the manipulate center points option by clicking the arrow with the dots over it. Now simply scale the all the objects to send them further away. (S


I figured it out. I also added the basis name, shape key name and shape key index:
import bpy

#Defines the selected shape key index.
selected_shape_key_index = bpy.context.object.active_shape_key_index
print("The selected shape key index is",selected_shape_key_index)

#Defines the selected shape key name.
selected_shape_key_name = bpy.context.object.active_shape_key.name
print("The selected shape key name is",selected_shape_key_name)

#Defines the selected shape key collection.
selected_shape_key_collection = bpy.context.object.active_shape_key.id_data.name
print("The selected shape key collection is called",selected_shape_key_collection)

#Defines the Basis name
basis_name = bpy.data.shape_keys[selected_shape_key_collection].key_blocks[0].name
print("The basis name is",basis_name)


Setting parent to armature with automatic weights deforms the mesh

First of all try to align your bone. It can help a lot for a better rig. For doing that follow this step : show the axes of your bones, enter in the edit mode of your rig and align your bone with the roll property on the right pannel of the 3D view. You can see an exemple in the screen below!

Now you can do your automatic weight.
I looked a bit on your rig and apparently you played a bit with it. You have to reset all the roation of your bone in pose mode.

Go in pose mode, select all bones with a and types alt+r.

And now you have to play a bit with the pole angle of your IK modifier for align all your bone.

Normally with this 3 tips your armature has a better set up.


How to solve camera for only part of footage?

It helps if you understand a bit deeper how tracking and 3d reconstruction work.
When you track points in the video and solve the camera you get two different kinds of information: Camera intrinsics and extrinsic parameters.
Camera intrinsics are the camera lens, lens center and distortion. Intrinsics are unique for a combination of sensor size and a specific lens. So all shots done with the same lens on the same camera will behave the same.
Once you have the camera intrinsics, then you can calculate the extrinsics, which are the correspondenc of the placement of points in an image, with coordinates in 3d space.
pff.... got that out.
So what does that mean in this case? You just need to solve a small portion of the scene to determine the camera intrinsics (lens field of vies, optical center and distortion coefficients). With that information you can solve other segments of the shot as well.
At the very least you need 2 images that show parallax and have 8 accurate trackers to solve the scene, but it helps if you have a few more and  more frames to evaluate more precisely.
The segment to use can be defined in the keyframe section, the range of frames between frame A and B will be the one used to solve the scene.

But setting that range doesn't mean that only that segment of the video clip will be solved. Blender will still try to solve the whole thing, but by setting the range means that you don't need 8 trackers on every frame.
And now for the grand finale:
Yes! you need to add trackers for the whole shot if you want to solve it. Don't be lazy or try to take a shortcut: It's only a minute of footage, a limited number of frames and blender is doing most of the work! But remember that not all of the tracking needs to be wonderful, just the segments used between keyframes. Bottom line is: unless you add trackers blender will never guess any motion for you.


Finding the closest point on a line defined by two points

You can use the Dot Product for this. Passing a normalized direction vector into the Dot Product along with another vector will resurn a scalar value representing the element of the vector that is in the direction of the direction vector. Multiplying the normalized direction vector by the acalar value will give you your closest point.

Consider 3 points - O (the origin), A (the end point of the line), and B (the point you want to get closest to along the line). You want the point on the line that is closest to B - lets call thay C.

Start with the vector OA and normalize it (make it 1 unit length. The result defines the direction of the line.

Calculate the Dot Product of that Direction Vector with the vector OB to produce the scalar distance to the closest point.

Multiply the Direction Vector by the scalar distance to produce the vector to the closest point - ie, OC.

EDIT : Thanks to @batFINGER for the following example Python code :

from mathutils import Vector
# two points define the line
a, b = Vector((0.0,0.0,0.0)), Vector((1.0,1.0,1.0))
p = Vector((0.0,0.2,0.5))
n = (b - a).normalized()

ap = p - a
t = ap.dot(n)
x =  a + t * n #  x is a point on line
print("point on line  :", x)
print("distance from p:", (p - x).length)

# cross product for distance
d = ap.cross(n).length
print("dist cross prod:", d)

Also see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Vector_formulation


How can I scale map texture relative to each oriented faces?

If you want to have the vertical lines using a noise texture on both sides of the wall, this can be done simply with mapping nodes. Simply add a noise texture connected to a color ramp.  then add a texture coordinate node attached to a mapping node.  Scale up the material the same amount on both the x and y axes to get the desired result.  I will show you may node setup:
using this setup, I got this result:
you can adjust the color ramp and other settings as needed


This is easy to setup with the UV Warp modifier. This will allow you to change the UV mapping and map the face to different places on the texture, where you will have all the facial expressions:

These expressions can be part of your other textures. UV unwrap the face to the first expression:

Add the modifier to the character. Create a vertex group for the face and setup 2 objects that will define the UV warping transformation. If your character is rigged, you can have 2 bones inside the rig for this purpose:

Animate an Action for the To object with keyframe on each facial expression. This way your expressions could be randomly placed in the UV where there happens to be space for them. When you move the current frame number in the Timeline, your character should swap faces now.

To control this from the rig, you just have to put an Action constraint on the object/bone that is responsible for transforming the UVs. We will drive this Action constraint from another object/bone, let's call it Control. Now moving this Control on single axis on integer values should show all the expressions (keep the Max and End parameters the same):

Now you can set an integer property on your head object or bone, that will drive the Control location:


Is there a way to numerically position sun in sky texture?

I'm not sure it can help you anymore, but I recently found this Addon.
It sets the Sun according to the geographical position of your model, day and month of the year, time of the day, and Utc zone!

https://www.youtube.com/watch?v=fAJeML3A60I&t=87s


Why do eye poses not record in the animation?

Thank you for all your comments. Before posting the question I closed down the file deciding to 'sleep on it'. On opening it up this morning I find that the eye animations had saved and are now working as desired. Unfortunately that means that whatever was happening yesterday has not been identified and will probably return to bite my backside in the near future.
Thanks for help.


Can Vertex Paint Normalize Color Channels?

I've managed to script myself a solution:

import bpy
import random
import math
from mathutils import Color, Vector

bl_info = {
  "name": "Vertex Color Normalizer",
  "description": "Allows the vertex colors of a mesh to be normalized (useful if colors control texture splatting).",
  "author": "Markus Ewald",
  "version": (1, 0),
  "blender": (2, 65, 0),
  "location": "View3D > Add > Mesh",
  "warning": "", # used for warning icon and text in addons panel
  "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
              "Scripts/VertexColorNormalizer",
  "category": "Paint"
}

class VertexColorNormalizer(bpy.types.Operator):
    bl_idname = "object.normalize_vertex_colors"
    bl_label = "Normalize Vertex Colors"
    bl_description = "Normalize vertex colors to enable additive texture splatting"

    def execute(self, context):

        # What I want to do:
        # - Iterate over the colors of all the vertices in active mesh
        # - Normalize each color (divide by sqrt(r *r + g * g + b * b))
        # - Assign it back to the vertex

        for i in context.active_object.data.vertex_colors[0].data:
            r = i.color[0]
            g = i.color[1]
            b = i.color[2]

            magnitude = math.sqrt(r * r + g * g + b * b)
            if magnitude > 1:
                normalized_color = (r / magnitude, g / magnitude, b / magnitude)
                i.color = Color((normalized_color))

        return {'FINISHED'}

def register():
    bpy.utils.register_class(VertexColorNormalizer)

if __name__ == "__main__":
    register()

Save as C:\Users\<Login>\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\NormalizeVertexColors.py
Start Blender, activate Preferences, Addons, Paint, "Vertex Color Normalizer"
Select target mesh, spacebar, type 'normalize' and pick the "Normalize Vertex Colors" entry

My knowledge of Python or the Blender object model are too limited to let this happen automatically when painting vertices, but it's better than nothing, I guess :)


Is there any advantage in keeping dual video cards?

Yes leave it! You can render with both cards, and the CPU too, all at once. Just make sure you go into Blender parameters and turn them on under Cycles render parameters.


How can I increase the length of the node editor's "name" input field?

I only know how to do it by modifying the source.
Right-click on the input field in the Shader Editor and select "Edit Source".

In the status bar, Blender should tell you something like See 'space_node.py' in the text editor. Open the Text Editor and switch to the file it told you to. The cursor should appear near the end of this section. Add the highlighted line.

(Increase 18 if you want to make it even longer.)
Run the script (with the arrow button to the right of the input field). You should see the change take effect in the Shader Editor immediately. When you've found a number you like, save the script (Text > Save) to persist your changes.


You can do this with Render Layers using the Layer Mask option.

In my example below I've created 3 objects, a plane, a monkey, and a cube. The plane is in front of both. The plane is on Layer 1, the monkey on Layer 2 and the Cube on Layer 3. There is a Render Layer set up for each object. The crucial part is that the Render Layer for the monkey has Layer 2 enabled, and also Mask Layer 1 enabled, which makes the plane mask out the monkey on this layer.

You can see in the rendered layers in the top panel, that the monkey layer is masked out, and that the cube is not masked out.


Is there a way to create a list of all available trackers of a scene?

This will add a panel in your Properties Window --> Scene Tab called "Layout Demo", which will enable you to select a track if one exists for the 1st Movie Clip added to your scene.

import bpy

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label       = "Layout Demo"
    bl_idname      = "SCENE_PT_layout"
    bl_space_type  = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context     = "scene"

    def draw(self, context):
        layout = self.layout

        scene       = context.scene
        showProp    = False
        tracks      = None
        trackingCam = None

        # Only show this property if there is at least 1 movie clip that has trackers
        if len( bpy.data.movieclips ) > 0:
            mc = bpy.data.movieclips[0] # First movie clip
            if 'Camera' in mc.tracking.objects:
                trackingCam = mc.tracking.objects['Camera']
                tracks      = trackingCam.tracks
                if len( tracks ) > 0:
                    showProp = True

        if showProp and trackingCam and tracks:
            props = context.scene.myprops # Reference property group
            row   = layout.row()
            row.prop_search(props, "tracks", trackingCam, "tracks")

class propsGrp( bpy.types.PropertyGroup ):
    ''' Property group that contains your tracks custom property  '''
    tracks = bpy.props.StringProperty()

def register():
    bpy.utils.register_module(__name__)
    # Add property group to scene to make it persistent and accessible to panel
    bpy.types.Scene.myprops = bpy.props.PointerProperty(
        type = propsGrp
    )

def unregister():
    bpy.utils.unregister_module(__name__)
    # Remove property group from scene when panel is unregistered
    del bpy.types.Scene.props

if __name__ == "__main__":
    register()

More about how to use property search.


How do you sculpt a texture into a 3D Model (i.e. stencil overlay)

Load your texture in Properties panel > Texture.

Switch your 3D view to Sculpt mode.
On the left (tools panel), choose the Draw brush.
Open the N panel on the right of your 3D view and click on the Tool tab. Open your texture so that the brush will use it, choose Mapping > Stencil.

The texture should be displayed on the bottom left corner of your 3D view, it might be very transparent for the moment. In the same panel as before, under Display, increase the Texture Alpha if necessary. Enable Dyntopo if your object is not high poly enough and choose the adequate Detail Size, or give your object a Multiresolution modifier.

Move your texture in the 3D view: RMB to move, Shift RMB to scale, Ctrl RMB to rotate. Paint on your object.


Unfortunately groups (even instanced) can not have an array modifier.

Your best bet will be to add the array to one object, then select the other, shift select the object with the array and press Ctrl + C and select Copy Modifiers.

Make sure you use Constant Offset or Object Offset and not Relative Offset.

By request, I will add an explanation how to create the target for the array with circular symmetry

Snap an empty to the object, which has the array modifier: arrayTarget
Snap an empty to the center of the circle: circlePivot
Set the object Array Offset to: arrayTarget
Parent arrayTarget to circlePivot
Rotate the circlePivot the desired amount.


It is because your mode is set to sculpt. Change your preview/render to object mode instead of sculpt mode.


how can i control starting point of particles?

Particle-duplicated objects will be centered on their origin points, also known as pivot points. You can move an object's vertices with respect to the origin point in edit mode by selecting all vertices and moving them until you have them where you want them in relation to the pivot.

Another option in object mode is to move the pivot with the options shown in Object > Transform > ... (I frequently use "Origin to 3D Cursor" and "Origin to Geometry.")


Tool already edits when using shortcut keys

For the shortcuts, that is always how blender worked. Since clicking on the tools on the left is just switching the mode, or what will happen when you click/drag (look at the select tool, then switch to the 3D cursor tool), you have to activate it to work. Hope this helps :)


How to make an object from basic volumes?

It's not really automatic but this can be done with the array modifier. Take your object that you want to make a cube out of and then apply three array modifiers. The result:

Going from here we can fill more complex things with the Boolean modifier. Take the mesh you want to fill with stuff and enclose it in the arrayed object. It will look something like this:

Then we use the Boolean modifier to cut out the shape. Giving this:

From here we apply the stack. It't not perfect / ideal / fast, but hopefully this is enough to get you somewhere until someone else has a better idea.

Final:


How to extract this one frame from simulation?

Just hit the APPLY button to the cloth modifier on the object. Then the operator stack will freeze your desired frame.


Is knowing the Blender internal renderer settings for materials and textures important for using the Cycles renderer?

Short answer: nope.

Cycles and BI work very differently, consequently materials are completely different for the two, both in the way they are defined and calculated.  I think learning BI first often does more damage than good when switching to Cycles.

I should note that some people do say new users should start with BI since it is (arguably) simpler than Cycles.  I heartily disagree with this view though.  Cycles may be a little more complex to some people due to it's much greater flexibility, but I don't see any reason why starting with BI would help one learn Cycles.

I think the idea that BI is "simpler" is a misnomer though, it's just different.  Personally, I find Cycles's nodes to be a much more intuitive way of defining materials than BI's wall of settings for everything under the sun.  Which one really is simpler is a matter of opinion, so neither one comparatively blows the other out of the water and should.


How to animate a mask with interval steps and not consecutive flow animation

At last, a use for the Build modifier?
Create a fan-filled circle-mask with the same number of segments as you have LEDs, rotate in Z to the desired start-point. Give it a Build modifier, set to the appropriate frame start/end, and 'Reverse'.

Segments are made visible one at a time.
@blender breath Thanks for the comment.. 'mask' is a bit vague - it could be so many things..

For a 3D mask, as you have done, assign a Solidify modifier to the circle, to get a cylinder disappearing in chunks, which can be used in a Boolean to cut away the LEDs
2D, a perfectly black Diffuse BSDF mask in a black world,
Or, as here, 2D, a Holdout mask through to transparent film, composited against a coloured background -

or, I'm sure, many other possibilities, for use in compositing, or as a texture.


Since I can't yet comment, I have to reply as an "awnser."

You could maybe try rendering the username on a different scene with less light sources.


This is due to the extra edge you have on the top surface.

You can enable clamp (hold Alt or press C) after sliding the edge far away from it, but it's not perfect. Removing the edge works best, if you don't need it:

To get an edge where you've indicated, you might find it easier to use the knife tool, at least in this case:

Line up the view with the orientation you want the edge to be in (and ensure you're in orthographic view, numpad 5)
Start the knife tool with K
Click the top vertex, enable angle constrain (C)
Click the bottom edge:

Note that there are many ways you can go about doing this, for example vertex snapping combined with axis constraints can solve this and many similar puzzles:

Set the snapping type to Vertex
Grab (G) the top vertex and hold Ctrl to snap it to other vertices.
Grab the bottom vertex, constrain to the the X Y plane (ShiftZ), and hold Ctrl while hovering over the top vertex.


What add-on license when license is not written in source code?

To begin with, an add-on you find aren't different from any other code snippet you find online. So these general Q&A's apply:

What is the “default” software license?
Reusing open-source code that doesn’t specify a license

To answer the question:

When its not explicitly stated, you can't assume anything regarding the license of code you find.
(Blender related or not).

Contact the author and ask them to either...

include a license header of the source code(convention for all Blender's code).
include LICENSE file in the source code repository.(also valid but can make tracking down the license harder if files are re-arranged or re-used between projects).

Doing so will save others this hassle in the future.

Note that even in the case where the license is open-source and compatible with Blender, you may want to know the copyright holder(s) later on, especially if this ends up being used in larger projects.


I'd see two potential ways:

use an intermediate empty, plus parenting and constraints, which is a little finnicky to set up, or
use a group instance

Method 1

The idea is to use an empty, and first parent the circle (your already working path) to it. Then add a child of constraint to the main bone of your armature, and make sure to click set inverse right after that. Now both the armature and the curve follow the empty. move the empty to the scene origin, and the second curve as well. Use the follow path constraint on the empty to target the second curve and set the parameters as you like.

Method 2

Select every object which the pendulum is made of - that includes the armature object and the curve - and hit Ctrl + G to create a group around it. Name it appropriately (I chose Pendulum). Make sure to also use the Offset from Cursor function like in the GIF. Basically, this allows you to define the Origin Point of the instance relative to the current cursor position. Then, use Shift + A and add a group instance of Pendulum to the scene. Use the follow path constraint on this new instance.

Personally, I find method number 2 far less convoluted and error-prone, but what fits your situation best is up to you.


Baking Normals

You could try baking the bevel to normal maps.


In the Properties panel > Data > Skeleton, display all the layers so that you can see all the bones, now you can check the influence of the different bones, for example the head bone has an influence on the lids so of course the lid bones won't influence them 100%.

Also, if the bones in Pose mode have a different position, it's because they are influenced by some constraints like Copy Rotation or IK. To get exactly the same position as in Edit mode it may need some small bone readjustments.


Copying animation keyframes from one bone to another with flipping

Figured out how to mirror the same animation keyframes to the other bone hand, without any re-work or manual labor required.

With the animated hand's bone rig selected, select all the keyframes in the Timeline (Shift+F12 to get the Timeline view and use your mouse to box-select them all or press Ctrl+A) and copying them with Ctrl+C.

Then proceeded to select the other hand's bone rig (the non-animated one). With the non-animated bone, first setup at least one initial keyframe in the timeline. I did this with hitting i to put in an initial keyframe.

Lastly, the trick to get the animation pasted and flipped for this other hand bone is to have the Graph Editor open (Shift+F6) and right click in it and press Paste_Flipped (or alternatively press Shift+Ctrl+V).

Done! Now the other previously non-animated hand bone rig is now animated with the exact same keyframes as the other hand, just flipped so it looks correct!
This was all done whilst in Pose Mode.


How do I maintain the road's texture after applying the curve modifier to make the road a single object?

You have used object coordinates for the texture placement. You want to use UV, in the texture properties window make sure you are using UV for mapping. Before applying the modifiers go into edit mode and hit U->Reset. If this doesn't map the faces correctly to the texture, open image editor screen along the 3d view and adjust the UVs, most likely you just need to rotate by 90 degrees.


How can I add sharp edges at the end of semicircle's vertices?

This solution seems to work fine, with almost no pinching:


Edit mode Toggle and select faces in one shortcut. How possible is it?

To perform two steps from one shortcut, you will need to make your own operator, by putting it into your own addon you can make it active every time you start blender.

Combining two existing steps is simple, you just need to call both existing operators from yours. You can then add a shortcut by using the bl_idname from the operator in the input settings.

To be able to cycle through the selection modes, you look at what the current mode is.

bl_info = {
    "name": "Edit mode with face select", "author": "sambler",
    "version": (1, 0), "blender": (2, 75, 0),
    "location": "blender", "category": "Object",
    "description": "Enter edit mode and set selection type to face.",
    }

import bpy

class EditSelectOperator(bpy.types.Operator):
    bl_idname = 'object.edit_face_select'
    bl_label = 'Enter edit mode and set face selection.'

    def execute(self, context):
        if context.object.mode != 'EDIT':
            # if we aren't in edit mode goto edit and set face select
            bpy.ops.object.mode_set(mode='EDIT', toggle=False)
            bpy.ops.mesh.select_mode(type='FACE')
        else:
            # if we are editing cycle through selection modes
            sel_mode = context.tool_settings.mesh_select_mode
            if sel_mode[0]: # vertex
                bpy.ops.mesh.select_mode(type='EDGE')
            elif sel_mode[1]: # edge
                bpy.ops.mesh.select_mode(type='FACE')
            else: # face
                bpy.ops.mesh.select_mode(type='VERT')
        return {'FINISHED'}

def register():
    bpy.utils.register_class(EditSelectOperator)

def unregister():
    bpy.utils.unregister_class(EditSelectOperator)

if __name__ == "__main__":
    register()


You have changed the manipulator widget to rotate mode, to return to the default (translate) mode, select the pointer icon as selected below.

There are many options for using the widget, detailed documentation can be found about its usage on the Blender Wiki.

http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Transform_Control/Manipulators#Manipulators


is there a way to lock everything so settings won't get changed between rendering sessions?

Transformation Locks is what you need to use to lock down everything that needs to be locked. Each object has its own LOCKS for LOCKING it down to prevent it from moving.


You can create reflective materials by lowering the Roughness and increasing the Metallic properties.


Is there a list of all nodes in blender?

Yes there is. However the list is much too long for an answer here. I have included a list of all the node types. There are many more nodes under each type classification. Click on the type you want to learn about. Or click the title for the section to view the index on the wiki.
Compositor Node Types:

Inputs
Outputs
Color
Vector
Filters
Converters
Mattes
Distortion
Groups

Material Node Types:

Input
Output
Color
Vector
Convertors
Groups
Dynamic
(PyNodes)

As for getting used to working with them, explore and experiment! You will stumble across all sorts of goodies. You can also try an online shading tutorial. Once you get better with nodes, I would suggest you try reaching a specific result, i.e. a Wood material, a Galvanized Steel material, etc.


Why would a displacement with a periodic image not tile smoothly?

The problem is in the smoothing function. As one surface get's near one edge, it doesn't know how the curvature will continue on the other side and the smoothing function sets it as if the object ends there, using no interpolation between the disconnected edges. This happens from both sides of the common edge, and therefore it's quite noticeable.

To correct this, one must edit the vertex normals from each side, to include the derivation from one surface's normal to the other.
However this might be very tedious to do by hand, so I advise a good normal editor addon. For example, Y.A.V.N.E. has one function for this (the merge normals), and all one need is to join the meshes (if in different objects), select the edge vertices, merge the normals and separate the meshes again (if needed).


Basics! How to get rid of protruding face that overlaps another object

If you want to make a box with a roof, you can simply

add a cube
loop cut and slide it in the half like this:

select the middle top edge and move it upward


I guess you're using "Look Dev" Shading while using a dark Material/bad lighting. Press Z and switch to "Solid"


This is how you do it:
# This is how you make a static enum prop for the scene
enum_items = (('0','Cube',''),('1','Pyramid',''))
bpy.types.Scene.obj_type = bpy.props.EnumProperty(items = enum_items)

# This is how you display it in panel
def draw(self, context):
    layout = self.layout
    layout.label(text="Select Original Form")

    layout.prop(context.scene, 'obj_type', expand=True)


Simply add the mouselook to the armature instead. After doing this, you will realize that the ENTIRE rig points to the center of the screen. Quite obviously, this would be undesirable.

To fix, go into edit mode, select the top half of the armature, and hit Ctrl+Alt+P. Then Tab out of edit-mode and Parent>Bone the top armature to the top bone in the lower armature. see this answer to do that if you can't figure it out.

Remove the mouselook from the bottom armature, or add it just too the top if you don't have it yet.