Weird invisible face issue Before we get started - I'm a total newbie to Blender.  So, take my terminology use with a grain of salt as I'm probably not using the correct words.

I'm trying to make a lantern.  I built one in Blender, sent off a .obj file to a friend to "proof-read", and they sent it back to me (I believe they use 3DS MAX).

Now my lantern looks like this:

The shading is weird, but since this project is for 3D printing, I don't really care too much about that.  However, I'm concerned that the apparently missing faces won't print properly.

I tried using the features to auto-create faces with the correct vertices selected, but nothing happened.  So I thought maybe it was a display issue.  But when I turned on face normal display, those two 'faces' are missing normals entirely, so I suspect that they're not there but the auto-create tool can't fill in the space for some reason.

Thoughts?

Edit:After repairing the lantern partially with lint, I'm getting a strange issue where the lint is repeatedly asking me to delete what seems to be working vertices.  See the left side for several deleted vertices, and the right for an untouched side.  The currently selected vertices are the ones it is describing as lint.

In this case, you have a simple problem of missing faces. One way to verify this is to install the MeshLint addon for Blender. Then use the "Check Non-manifold Elements" tool. This will find any holes in your mesh.

To fix the holes, select the edges around one hole and press F. And repeat for any remaining holes.

Other common mesh problems can be fixed by removing vertices that share the same space. Called doubles. To do so, press W and select Remove Doubles.


When adding a new object the rotation is random When i add a new object Shift A in object mode or in edit mode the rotation is zeroed out like it should be but the rotation is random like
X=78 Y=31 Z=100. It always disturbed me like about 3 months and could not find help on the web.

And it happened when i changed accounts on my laptop and started using blender on another account the preferences were reseted, of course, but when i started adding objects the rotation was always random.

Please help!! If I had not told you detailed please tell me what you don't understand, thanks.

As well when adding windows and stuff with the Archimed Add on the rotation as well is random but on the side where is transform, rotation etc... The rotation is zeroed out but in the 3d port view it is rotated in all directions. Please help me and give me some advice to solve this problem/

Thanks,
Anton Pogromskyy

Open User Preferences (Ctrl+Alt+U)

In the Editing page go to the New Objects: Align To: Option.

Change it from View to World.


Wind force not affecting hair particles I have made a field of wheat using hair particles and I added wind. My windmill is affected by the wind but the wheat is not! How can I fix this?
I am sharing my wind and particle system options. I want my all objects to be affected by the wind.
These are screenshots of the particle system settings:

And these are my wind settings:

What am I doing wrong?

Try changing the Initial Orientation under Rotation from  "Object Y" to "Velocity/Hair".

Keep your other numbers as they are; those in this image are for my particle system.

This will probably mean that your wheat will not stand up right. To fix that, select "Rotation" in the Render section. Then, if the wheat is still not standing up, try rotating your actual "Bugray" object by 90 degrees along first the X, then Y then Z axes.

Each time come back to your main layer with the particle system on it to check the effect, then if the wheat is still not upright, undo the previous rotation and try a different axis.

Eventually the wheat should stand up, and because it's rotation is following the hair, it should be affected by wind and other force fields.


Can't Subtract Paint From Part of Mesh Hey I have a mesh of a deer. I'm currently weight painting it. As you can see from the images below, if I select the left leg there is some paint on the right leg, which means when the left leg moves, a piece of the right leg moves too. If I try subtracting it off with the brush, all that happens is paint from the left leg gets subtracted and the right leg paint remains. I don't have x mirror on either.

Blend File:

How can I remove the paint from the right leg?

Apparently this happens when you start building your mesh with a mirror modifier and forget to apply the modifier BEFORE applying the armature to the mesh. Just go back to the point before applying the mesh, apply mirror modifier so you have only on mesh and try again.


Need help animating a collection instance with parented empty I am unable to animate Child Collection Instance with parent empty.
Here’s a short clip of what I mean: https://imgur.com/smMkQZu
Could anyone please help me to understand what’s the issue and how to fix it?
Also here's the blend file, in case anyone needs to inspect it :

You're messing up with the parentage. Actually object B and C are parented to object A. But object C is an instance of object B, so C is twice subject to the influence of A.
So you need to either deparent B, make it invisible and only use C objects, or don't use C and duplicate B.


Mirror and flip objects with mirror modifier I have a environment that is mirrored and flipped along the world origin. I placed an Empty object at the world origin and applied a Mirror modifier for the objects to get mirrored along the Y axis, but I can't get them to flip along the X axis too.

Here's what I'm looking for:

Here's what I'm getting:

How can I achieve this mirror + flip result?

What you actually are doing is rotating the object 180 deg in the Z axis.
You can do that procedurally with an array modifier and an empty rotated 180 degrees.


How can I fill up my toilet model with water? I have a toilet mesh here. I'm trying to find a way to fill up my toilet bowl with water. Any suggestions? I'll give two pictures of the mesh.

In Edit Mode select an Edge Loop at a location where you want the top of the water to be.

Duplicate it SHFT+D Then separate it by pressing P > Selection.

TAB into Object Mode and select the object you just created (I hid the other objects).

TAB  into Edit Mode and Extrude these vertices inward as in the imageE  SSHFTZ

Select all of the vertices except the outer edge and move them down a bit G Z This creates the "meniscus".

You will want a Subsurf Modifier and Smooth Shading.

Here is my Node Setup for the material.


Normal map baking doing something wrong I've been wondering around in several forums since yesterday trying to fix my issue, with no succes.

I am modeling a golem for a project and I'm having some normal baking problems with it.

I first did the low poly one (not a workflow I'm used to). Then, when the result was good enough, I rigged it, duplicated it and subdivided it to make some stone details via a normal map. But when I try to bake normals from the high poly to the low poly one the normal map seems wrong.

The two golems are pretty much the same, I did a simple subdivide to make sure I don't have to create many holding edges to keep the mesh straight and the only thing I changed are the sculpt you see in the down left corner. These changes are okay, but any ideas why I can see all of these edges? I repeat that only one thing has changed in the mesh. For those that are wondering, yes, I tried brute forcing the distance and bias parameters. But in order to see the changes I kind of must keep these where they are.

I would like to know if any one of you guys have any ideas about why is that hapenning and if you got any ideas for fixing it.

For information, i'm using the Blender Render and I stacked one mesh to another of course.

just smooth your low poly mesh before baking:

Edit mode -> 'A' to select everything -> 'T' for tools sidebar -> Go to 'shading/UVs' in the sidepanel -> Under faces press 'smooth'

Don't worry about edges being soft when you bake a normal map onto it, it will give it it's sharp look back when the normal map is applied :)


How do I change the count of an array? I used to be able to change the count - which I set to 30 - and I wanted to change it to 12, but I don't see an option for it anymore:

if you already applied your modifier, you cannot change it afterwards. As long as you don't apply the modifier you can change it.
e.g.:
green: not applied modifier
red : applied modifier


Why do the particles in my fluid sim move to the left with no added velocity? I was setting up a fluid sim and noticed that even with no added velocity or anything like that changed the particles fly to the left. Why is that and how can I fix it? The effectors don't seem to work either. All effectors have the same settings.
.blend file

After I baked the fluid data it worked fine.


Generate random segments I would like to have a guide to generate segments of length l distributed randomly without intersection in a defined square field. The end of the loop is fixed by the total length of the right generated. Grateful if someone could help me.

A quick hack is to run a rigid body simulation until you arrive at a frame which looks right. Writing a script to get what you need can be a bit of a puzzle...


How to combine various armatures? I put together an armature for a four legged creature, but I had to make each leg armature separate. I now want to combine them into one armature. Is there an easy way to do this?

Select all the leg armatures, in Object mode.
Go to the Object menu, >> Join (or Ctrl + J).

That said, I hope you didn't weight paint anything yet, because if so, you may have to rename some of your bones' VGs.


Adding a conical bevel/fillet to a mesh? Given this mesh: (assume 18mm x 18mm x 12mm approx.)

Is it possible to add a conical fillet (rounded bevel) to the vertical corners?

The cone of the fillet would be 1.85mm - 0.7mm from top to bottom.

Any pointers would be gratefully received.

This image below shows what I'm trying to model (I'm only modelling the outside faces, not the interior socket pieces):

Ideally, I'd also like to add a 0.7mm rounded bevel, which you can see running all along the top edge (as you see here)

Update: Mesh generated by openscad

The mesh shown in Blender:

The original geometry was generated as CSG in OpenSCAD

// SA Row 3
difference() {
     intersection_for(n = [1 : 4]) {
          rotate([0, 0, n * 90]) {
               translate([24, 0, 0])
                    sphere(r = 33, $fn = 90);
          }
     }
     translate([0,0,46]) sphere(r = 33, $fn = 90);
     translate([-33,-33,-64]) cube(66);
}

Just to give a clear indication that all the surfaces are (save for the base,) sections of a sphere. (note $fn is the resolution/polycount)

Blender doesn't currently (Nov 2015) have a fillet that does variable radii, but you could approach the same effect with the Subdivision surface modifier to some degree. If you guide the geometry the result will look quite good.

My approach would be to Shrink-wrap a Polysphere over the exported Object.

Below:

On the left is the original import,
in the middle is a polysphere (a Cube subdivided a few times and then vertices are transformed with a 'To Sphere' operation),
to the right is the result of a Shrink wrap from the Polysphere onto the Original geometry

With a bit of experimentation with the ShrinkWrap modifier and tweaking of the Polysphere, you could get very close to what is desired. Because Blender isn't a solid modelling CAD program it is bound by the underlying topology with respect to what can be filleted nicely.

Even on this mesh adding a Subdivision Surface modifier produces visually OK results, this probably doesn't meet tolerance requirements.

Tweak the polysphere (translating up/down mostly) and the offset value, till it approaches acceptable results.

The ShrinkWrap object's shape is important

You'll find that being more specific about the geometry of the Shrinkwrap object will help the eventual wrapped geometry. Here i started by making a copy of the 8 extreme vertices of the imported object, and make a Cube using those vertices. Subdivide the sides and scale extruded the top inwards.


Objects don't touch when they collide? I'm trying to get a couple asteroids to collide, however they collide without touching each other. How do I go about getting them to collide when closer together, or actually touching?

Tried changing the collision margin to no effect.

To enable accurate object collision, in Physics tab change Collision Shape of the rigid body to Mesh instead of default Convex Hull.


Connecting Hand and Wrist Having a problem with connecting hand to wrist/arm. I've tried a few different methods, and so I've found the best one that looks the best, but there's still a clear divide where the two are connected. Looked for interior faces, doubled points, etc., but nothing of that sort. Is there an easy fix for this?

I fixed the problem by deleting the apparently corrupted points, re-extruding from the arm and then reconnecting the points. Dunno why or how the method I was using before was being troublesome. Thanks to all the help.


Is there a way to use the terminal to check if a mesh is watertight? Is there a way to use the terminal to check if a mesh is water tight?
I want to do something like:

if my_mesh_obj.water_tight == True:
    print('It is water tight')
else:
    print('It is not water tight')

In order to check if a mesh is watertight, we can test that the mesh is 2-manifold and no boundary edges exist [1].

The following definitions are loosely based on the quoted sources, some terminology and explanations were adjusted. This may not be up to standard for a scientific publication.

Definition: 2-manifold [1] [2]:

Each edge is incident to one or two faces.
For each vertex, if one where to remove that vertex, the remaining vertices from the fan would remain connected. A fan is the set of incident faces to the vertex.
No self-intersections occur.

Definition: Watertight [1]:

A mesh that is 2-manifold and has no boundary edges. Therefore each edge has two incident faces.

In layman terms, there shouldn't be any:

internal faces
two or more triangle fans connected only through a single vertex
disconnected islands
holes in the mesh / areas with no thickness

bpy.ops.mesh.select_non_manifold already performs these tests as batFINGER mentioned, except for the self-intersection check. This requires the use of a tree structure to efficiently determine intersections with itself, for instance a k-d tree, AABB tree, BVH tree or octree.

The script below selects only vertices that are non-manifold through bpy.ops.mesh.select_non_manifold(extend=False). The extend=False argument is important since the current vertex selection should be ignored. The is_watertight function then iterates over the vertices and checks if any vertex is selected. Once it finds a selected vertex, it's clear that the mesh is non-manifold and therefore not watertight.

The self-intersection test is performed using a BVH tree. In case you don't need the test because you can guarantee that the mesh doesn't have self-intersections, you can disable it by setting the check_self_intersection argument to False.

Please be aware that the BVH overlap computation in mathutils doesn't allow to exclude the comparison between the exact same face when comparing the tree with itself. Therefore a small but non-zero epsilon is used during the intersection calculation to avoid false positives, where each face would be considered to be intersecting itself. However this non-zero epsilon also allows slight intersections below the threshold to pass as watertight. Therefore a proper implementation would exclude the comparison of faces with themselves. Given that the example is supposed to be self-contained, only use modules readily available in Blender and  be reasonably efficient, I've used the mathutils BVH overlap function despite its shortcomings.

import bpy
import bmesh
import mathutils

def is_watertight(object: bpy.types.Object, check_self_intersection=True) -> bool:
    """
    Checks whether the given object is watertight or not
    :param object: Object the inspect
    :return: True if watertight, False otherwise
    """
    old_active_object = bpy.context.view_layer.objects.active
    old_mode = old_active_object.mode

    bpy.context.view_layer.objects.active = object

    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_non_manifold(extend=False)
    bm = bmesh.from_edit_mesh(object.data)

    is_watertight = True

    for v in bm.verts:
        if v.select:
            is_watertight = False
            break

    # Only check for self intersection if manifold
    if is_watertight and check_self_intersection:
        bvh_tree = mathutils.bvhtree.BVHTree.FromBMesh(bm, epsilon=0.000001)
        intersections = bvh_tree.overlap(bvh_tree)

        if intersections:
            is_watertight = False

    bpy.context.view_layer.objects.active = old_active_object
    bpy.ops.object.mode_set(mode=old_mode)

    return is_watertight

if __name__ == "__main__":
    object = bpy.context.view_layer.objects.active
    if is_watertight(object):
        print("It's watertight.")
    else:
        print("It's not watertight.")

References:

[1] David Stutz, A Formal Definition of Watertight Meshes, 2018. [Online]. Available:
https://davidstutz.de/a-formal-definition-of-watertight-meshes/. [Accessed: 2019-12-05]

[2] C.-K. Shene, Mesh Basics, 2010. [Online]. Available: https://pages.mtu.edu/~shene/COURSES/cs3621/SLIDES/Mesh.pdf. [Accessed: 2019-12-05]


Terrible VSE output performance when rending I use Blender as VSE.

I was going to edit some clips. my setting is in screenshot.

Blender version: 2.81a, download from Steam.

OS: Win7-64bit

My Hardware:

i7-4790k with 16G memory
Nvidia Geforce GTX1080

I just cut a video into 3 pieces, removed the middle one, and removed the gap. No other effects, nor anything else.

When I click Render Animation, the preview window pop out. It is terribly slow, like under 15fps. My outbut should be generated as 60fps, means a 5mins video needs 20mins to render. That performance is horrible to me.

I checked both my CPU usage and my GPU usage. CPU is used by 20%. None of GPU is used. Both of them are not decently used by rending.

(Drivers are correctly installed because I can use NVENC by using Avidemux, and also games)

What should I do to get a good performance when using Blender as VSE?

Install the Parallel Render add-on: https://github.com/elmopl/ktba/blob/master/scripts/addons/parallel_render.py

Use it like this way:
https://github.com/elmopl/ktba/wiki/Addons


Lights inside a semi-transparent object I'm trying to make a semi-opaque lamp for a designer. He wants the light sources inside the lamp and wants to be able to adjust how transparent the mesh is. When I place a lamp inside the object it casts light around the object but there isn't really any "proper" illumination.

As an example, say you had a cylinder with 50% opacity and you put a lamp inside, you should be able to see that light source - as you would if you put a bulb inside a paper lantern. How can I achieve this effect? I've tried Eevee and Cycles but I get awful renders with Cycles and in Eevee I have to fake the effect entirely and it just doesn't look convincing... any tips would be very welcome!

Add the lamp shader object. (I used the default cube.)
Add a solidify modifier to give the wall some thickness.
Add a shader: Translucent BSDF.

Add a lighting object and place it inside the cube. (I used a Sphere.)
Add a shader: Emission BSDF. Increase the strength.
Use a realistic color management like the filmic lookup.

First screenshot is pbr cycles, second is EEVEE.

For realism, mix the Translucent Shader with Diffuse, Glossy and Refraction and implement the fresnel effect to allow less light through when viewed at an angle.


Animation Nodes - How do I read the Particle Count with the Object Attribute Output node? I am currently trying to drive the particle count of various instances of an object (containing a particleSystem) dynamically for each instance.

I'm using a loop subprogram with an Object Attribute Output node.

The one thing I can't seem to get right is how to point to the particle count in the Attribute Output node.

What I need is basically a one-line version of this:

bpy.data.objects['Plane'].modifiers['ParticleSystem 1']
bpy.data.particles['ParticleSettings'].count = value

Any help would be much appreciated.

Update with Node-Setup:

The full python line to read that setting is:

bpy.data.objects['Plane'].particle_systems['ParticleSystem'].settings.count

According to the Animation Nodes documentation the attribute field of the Object Attribute Output node is relative to the object which would mean you would use:

particle_systems['ParticleSystem'].settings.count

or alternatively:

modifiers['ParticleSystem'].particle_system.settings.count

Whether this actually works is dependant on how the developer wrote the Animation Nodes addon.


Method to specify the Solidify thickness based on another surface I have a set of concentric spheres of varying radii, each a different color (material). I would like to use the SOLIDIFY modifier, and add a thickness to each such that it fills in the distance between the larger sphere and the smaller sphere.

I plan to put this in a script, so I have tried to build an algorithm based on their radii (and the difference of), but something's not working out. A visual example may help. Below is a 1-D model from the outside of the largest sphere (left) the center of the concentric spheres "(center)":

Crrnt:
1.......2...3......4.....5......(center)

Ideal:
1111111 2222 3333333 444444 5555555 (center)

You could add a driver to the Thickness value.

In this example, I've used the property dimension.x (it corresponds to the diameter).

If you need the value to change only at certain steps, you can set the interpolation mode to constant:

When you duplicate the sphere (alt +d), the driver will automatically update and it will mantain the reference to the proper diameter.

NOTE:
Remember to apply the scale transformation after scaling, otherwise the Thickness value will scale too.


Creating a 3D printable 2- part mold which are separable for a curved shell My Question is about creating a 3D printable negative mold for an irregular concave mesh/object which has an outer convex and inner matching concave surface with irregular outline/edge.

I have made a mesh surface solidified (using knife tool, boolean modifiers, solidify) which will cover a curved defect on a model (like a lid).

I want a mold (negative)for this object which is

2 part and separable
Which can be 3D printed

I read multiple tutorials on creating a 2-part mold for objects most of those objects are convex on both sides. They work like charm for something object like "()" but not for something that is like "((".

I am having troubles to have matching concave surface in one mold and convex surface in another mold and both when put together we will have a space between then matching the object attached.

These molds need to be 3D printable.

I will attach the blend file and the outline of the png (drawing of how I want the mold to be).

Blender file for the object:(for which I want to make a mold)
https://blend-exchange.giantcowfilms.com/b/5572/

The outline image file for the mold:  (The red and blue are two parts of the mold and the while space is an empty space matching perfectly the object above)
https://ibb.co/yp5LjGJ

I posted this similar query in another forum and got some pointers and so I am sharing it here for the benefit of other users. You can read the entire post here but I am summarising it below.

I used the edge vertices to make a land area and then extruded in opposite direction to make a mold. For the other side, I first  extruded the edges in upward direction and then translated the entire mold by same units and repeated the same in other direction.

I am not sure if the final result is printable. But I got close to what I was trying to achieve.


Generate realistic mountains I am looking to  generate realistic mountains, preferably using the addon ANT landscape generator. I am looking for a mountain like this.

CynicatPro to the rescue! You can actually download and import real world terrain data into Blender. This video shows you how. :)

https://www.youtube.com/watch?annotation_id=annotation_615645983&feature=iv&src_vid=A-OfeO7H0Mk&v=cZxyN7esQkY


How to render specific frame ranges of an animation in batch mode? I have an animation of which I want to render specific frame ranges, such as frames 100 through 340 and frames 765 through 1092.

I saw on another Blender StackExchange question that you can render specific individual frames with the command line, but I need to render frame ranges.

Is there any way to do this?

Command line render options

Remder options  displayed by running blender --help in the system console

Render Options:
-b or --background
    Run in background (often used for UI-less rendering).

-a or --render-anim
    Render frames from start to end (inclusive).

-S or --scene <name>
    Set the active scene <name> for rendering.

-f or --render-frame <frame>
    Render frame <frame> and save it.

    * +<frame> start frame relative, -<frame> end frame relative.
    * A comma separated list of frames can also be used (no spaces).
    * A range of frames can be expressed using '..' separator between the first and last frames (inclusive).

-s or --frame-start <frame>
    Set start to frame <frame>, supports +/- for relative frames too.

-e or --frame-end <frame>
    Set end to frame <frame>, supports +/- for relative frames too.

-j or --frame-jump <frames>
    Set number of frames to step forward after each rendered frame.

-o or --render-output <path>
    Set the render path and file name.
    Use '//' at the start of the path to render relative to the blend-file.

    The '#' characters are replaced by the frame number, and used to define zero padding.

    * 'ani_##_test.png' becomes 'ani_01_test.png'
    * 'test-######.png' becomes 'test-000001.png'

    When the filename does not contain '#', The suffix '####' is added to the filename.

    The frame number will be added at the end of the filename, eg:
    # blender -b foobar.blend -o //render_ -F PNG -x 1 -a
    '//render_' becomes '//render_####', writing frames as '//render_0001.png'

-E or --engine <engine>
    Specify the render engine.
    Use -E help to list available engines.

-t or --threads <threads>
    Use amount of <threads> for rendering and other operations
    [1-1024], 0 for systems processor count.

The following command renders (render animation) frames 1 to 4, then 10 to 11 of file scripttest.blend

blender -b  some.blend -s 1 -e 4 -a -s 10 -e 11 -a

To render every nth frame set the jump value. Following command renders every second frame of first hundred, every third frame of second hundred frams

blender -b some.blend -s 1 -e 100 -j 2 -a -s 101 -e 200 -j 3 -a


How to decrease the poly count in blender? I dont have a really powerful operation system so is there any way through which I could decrease the polycount?
I have already removed doubles from my meshes and un subdivided.

You can use a Decimate modifier, setting it in “unsubdivide” mode and slightly increase the iterations (1 is normally fine).
This will drastically reduce the poly count of your mesh, but at the same time it won’t be noticeable! As the quality of the model remains almost intact (that is, if you don’t exaggerate with the iterations, of course)!


Is it possible to make the default scene fill two monitors at startup? I know how to set up the default scene by pressing Ctrl+U, but whenever I startup Blender it always fills only one of my screens, even if I set it to fill both before setting the default scene. I end up having to resize it every time I start it up. Is there a way to set this to happen by default?

You can use the menu Window -> Duplicate Window(Ctrl-Alt-W) - to add a second Blender window, then put one one each monitor. The windows will by "synchronized" as in that changes will be reflected in real time. Ctrl-U will now work to save the setup.


Inverse kinematics bone doesn't stick to its source When I grab the footIK.L bone in the below image, everything seems to be working except for movement of the footIK.L bone. In tutorials, duplicated bone (footIK.L) stciks to its source bone (foot.L) and when grabbed they move together.

How can I stick the footIK.L bone to the foot.L bone?

Blender file

I think that

your IK could be too short. The video you are following use another bone above that with the IK constraint.
this does not allow you to replicate what he's doing in the video: he grabs the IK target but he doesn't moves it too far from the chain.

To find out, try to

remove the IK constraint from the bone "bone"
select the bone "bone", and subdivide it (press "w" > subdvide)
now you have 2 bones above the IK target bone
select the new bone, that is now directly attached to the IK target (it should be named "bone.001"
reapply the same IK constraint to the IK target as it was before
now grab the IK target and move it around: it stays with the constrained bone.
however, if you move the IK target too far, the constrained bone can't "stay" with it and they separate until the IK target is too far...


I can not install manuelbastionilab from file I downloaded it to desktop, Opened Blender,User Preference,Addons, Open from file,select manuelbastionilab file, and it just isnt working.I have been trying off and on for two days now with no luck.Can some one help please?
Here are a few screen shots on some out comes.

"Install from file" expects the downloaded ZIP file.


How to change objects texture using python in BGE? What i want to do:

If player/ avatar is close to an object, objects texture changes to a higher rez one/ object changes material.

How to get distance between two objects using script?
How to apply/change texture to an object using script?

You don't even need to write python code, you can change the material with level of detail (LOD)

Create different objects (or duplicate the same mesh Shift-D if don't want lower polygon count)

Assign the textures to the objects -
And all to the highest resolution object as LOD objects.
Adjust the distance for where they should be displayed.
Move all but the highest resolution object to an invisble layer.

The effect is visible in the viewport:

A python soultion would be to combine snippets from:

Python - Set material to material slot
How to get the distance between two objects in the game engine?


Does the vertex count of a mesh affect the size of the normal mapit generates? I would like to understand a thing related to a question I asked a few days ago.

How can you create detailed low poly meshes?

In the answer the user hawkenfox tell me 5 steps from high poly mesh and low detailed poly mesh.

In the third point he writes "Unwrap the low poly mesh, and bake the high poly model's normal onto the low poly model. - affectionately known as "texture baking"."

My question is: will the number of vertex of the high poly affect the weight of my normal map? In other words: more vertices will be and more Mb will have my normal map or these things doesnt affect at all?

No, the vertex count of the mesh you're baking has no effect on the size of the baked texture. The only thing affecting this is the target texture (the one you create in the process of baking) size.


Default skinning for vertices with no assigned vertex group I am trying to fix a problem with the FBX exporter. Two vertices in my test model don't seem to have bones/weights assigned to them. This is confirmed by printing vertex.groups to the console during export for those vertices, and by checking the vertex in the Blender UI, so it is not just an exporter or API problem.

Blender still seems to skin these vertices correctly in the UI when I move the skeleton.

Now a simple fix for the model would be to assign the vertices to appropriate vertex groups. But I am curious how Blender calculates the weights/influences for those vertices. Is it a hack based on neighbouring vertices, or does it go through bone envelopes?

A test model is at opengameart.org/content/dwarf-fixed . If you lift either boot in Blender it looks fine, if you import this into Unity the vertices that are reported as having 0 weights by the exporter are stuck to the floor. These vertices are in no group, but they still skin fine in Blender.

There is no system based on neighbouring vertices.

Most likely it is bone envelopes, you can look at the Armature modifier to see if they are enabled. If they are, disable them and see if that stops the vertices moving along with the armature.


How to attach a texture to the first object of an array? I seem to have the opposite problem to others:

I created an object (cuboid).
Mapped an image (png) as texture (mapping=repeat, coord=generated, proj=cube).

Now I make multiple copies of my object (arrays), the problem is that the texture repeats as if the whole array was mapped by a repeated pattern of my image in world coordinates.

Instead, I would like the image to map each copy of the object in the arrays in its local coordinates, i.e. I want to see the same image on each copy of the object.

Any help appreciated.

Here are the viewport and render screenshots:

In the texture properties, you will find an Image Mapping panel as well as a Mapping panel. In the Mapping panel, you want to select UV as the coordinates value.

You can then get better results by properly UV unwrapping your object to control which part of the image is used.


Program keyboard input? I need to run some basic physics simulations on a headless machine and I'd like to program agent movements based on function outputs (e.g. "move left")-I have some code that programs WASD to move a cube that I'd like to modify such that it doesn't actually require me to press any keys but rather, if the program receives "Wkey" as an input (from another function) it's able to move the agent in the desired direction. Is this possible? (I also want to try to avoid using the logic editor to run the script if possible, any help on that would also be appreciated)

Current code below:

import bge

def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner

    keyboard = bge.logic.keyboard

    wKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]
    sKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]
    aKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]
    dKey = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]

    if wKey:
        own.applyMovement([0,0.2,0],True)

    if sKey:
        own.applyMovement([0,-0.2,0],True)

    if aKey:
        own.applyMovement([-0.2,0,0],True)

    if dKey:
        own.applyMovement([0.2,0,0],True)

main()

Here is a simple script that will create a keyboard object ( an empty )that have properties act as keys, this objects read the keys states from a file (inside blender or on the system ) and set them according to it.
the script will also create a player object (a cube) which will read the keys properties of the keyboard object and use it as real keyboard input. ( I added the keyboard object to keep the players scripts simple and they will be easy to convert to use a real keyboard )

this script will automate the whole process : create objects, set the logic bricks, load the scripts' files and start the game engine.

To test the script start blender and paste the script and hit Run Script you'll see the game engine start and the cube start moving. or you can start blender from the command line with this script to avoid using the GUI

#key strokes for each logic tic

keys_str="""w,w,w,w d,w d,w,w,w,w,w,w,a,a,
a,a w,a w,a w,w,w,w,w d,w d,w,w,w,w,w,
w,a,a,a,a w,a w,a w,w,w,w,w d,w d,w,w,
w,w,w,w,a,a,a,a w,a w,a w,w,w,w,w d,w
d,w,w,w,w,w,w,a,a,a,a w,a w,a w,w,w,w,
w d,w d,w,w,w,w,w,w,a,a,a,a w,a w,a w,
w,w,w,w d,w d,w,w,w,w,w,w,a,a,a,a w,a
w,a w,w,w,w,w d,w d,w,w,w,w,w,w,a,a,a,
a w,a w,a w,w,w,w,w d,w d,w,w,w,w,w,w,
a,a,a,a w,a w,a w,w,w,w,w d,w d,w,w,w,
w,w,w,a,a,a,a w,a w,a w,""".replace('\n','')

#### script for the player object
ob_txt="""
import bge, bge.logic

scene = bge.logic.getCurrentScene()

kb = scene.objects["keyboard"]
keys = ["shift", "ctrl", "space", "w", "s", "a", "d"]

cont = bge.logic.getCurrentController()
own = cont.owner

if kb["w"] :
        own.applyMovement([0,0.2,0],True)
if kb["s"] :
        own.applyMovement([0,-0.2,0],True)
if kb["d"] :
        own.applyRotation([0,0,10],True)
if kb["a"] :
        own.applyRotation([0,0,-10],True)
"""

### script for the keyboard object
kb_txt="""

import bge, bge.logic
import bpy

keys = ["shift", "ctrl", "space", "w", "s", "a", "d"]
scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()
own = cont.owner

def reset_keys():
        for key in keys:
            if own[key]:
                own[key] = False

def read_keys():
      i = own['line']
      # with open(r'C:\path\to\myfile', 'r') as file:
      #       line = file.read().split(',')[i]
      line = bpy.data.texts['keys'].as_string().split(',')[i]
      cmds = line.split(' ')
      for key in cmds :
            if key in keys:
                  own[key] =True
      own['line'] += 1

reset_keys()
read_keys()
"""

### setup script

import bpy

context = bpy.context
data = bpy.data
scene = context.scene

##### scripts' texts ####
kb_script_txt = bpy.data.texts.new('kb_script')
kb_script_txt.write(kb_txt)

ob_script_txt = bpy.data.texts.new('ob_script')
ob_script_txt.write(ob_txt)

keys_txt = bpy.data.texts.new('keys')
keys_txt.write(keys_str)

##### keyboard object #######
bpy.ops.object.empty_add()
bpy.context.object.name="keyboard"

####### properties  ########
keys = ["shift", "ctrl", "space", "w", "s", "a", "d"]
for key in keys:
    bpy.ops.object.game_property_new(type='BOOL', name=key)
bpy.ops.object.game_property_new(type='INT', name='line')

######## logicBricks ######
actuators = bpy.context.object.game.actuators
controllers = bpy.context.object.game.controllers
sensors = bpy.context.object.game.sensors
#always sensor
bpy.ops.logic.sensor_add(type='ALWAYS')
always = sensors['Always']
always.use_pulse_true_level = True
always.frequency = 24
#script controller
bpy.ops.logic.controller_add(type='PYTHON', name="script_cont")
script_cont = controllers["script_cont"]
script_cont.text = kb_script_txt
#link them
always.link(script_cont)

##### player object #######
bpy.ops.mesh.primitive_cube_add()
bpy.context.object.name="player"

######## logicBricks ######
actuators = bpy.context.object.game.actuators
controllers = bpy.context.object.game.controllers
sensors = bpy.context.object.game.sensors
#always sensor
bpy.ops.logic.sensor_add(type='ALWAYS')
always = sensors['Always']
always.use_pulse_true_level = True
always.frequency = 24
#script controller
bpy.ops.logic.controller_add(type='PYTHON', name="script_cont")
script_cont = controllers["script_cont"]
script_cont.text = ob_script_txt
#link them
always.link(script_cont)

##### start game engine ######

bpy.context.scene.render.engine = 'BLENDER_GAME'
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.game_start()
        break


How to choose 1 vertex, change its coordinates, and have its mesh move along intact with it? I'm in edit mode for this. I don't think I need an image for this question.

I just want to move a mesh by selecting ONE of its vertices and typing in the new (x,y,z) coordinates. Selecting the G (Grab) tool doesn't do the job.

Also, while at it, how do you select ONE edge of a mesh, type in a new length for that selected edge, and the rest of the mesh would scale accordingly?

I'm not having any luck finding an add-on for what I need.

If you move the object in Object Mode, it moves all at once, but if you want to use Edit Mode for whatever reason, you could:

Turn on Proportional Editing (either press O or select it at the bottom of the 3D view) move the vertex by using the 'Grab Tool' (G) and then typing In the coordinates into the 'options panel' of the Toolshelf (T)
Once the vertex is where you want it to be, scroll down in the same
panel to the proportional editing section, and increase the
'Proportional Size' until the entire mesh moves to the desired location


How to make it so that objects don't pass through each other? How to make it so that objects don't pass through each other?
For example, when a character picks up an object, when a character rests on the wall, etc.
Here is an example of the wrong animation:

How to fix it?

Generally, this kind of actions are made using Inverse Kinematics:
when the hand reaches the table you switch the arm from FK to IK, put the IK hand controller in the same position as reached by the FK hand controller so, in the following frames, the hand stays still as the arm is moving.


Transfer selected objects to a collection doesn't work The M button does not work and does not allow me to transfer the selected objects to the collection

If several objects are selected via lasso or box and not one object at a time using the Shift key, the M button does not work and does not allow transferring the selected objects to the collection or create a collection.

Dragging and dropping from one collection to another works well on any tests with new files, but with my level of some problems. Maybe some objects have invalid connections or properties.

You can't transfer because there is no active object.

Pasting objects also lasso/border selecting doesn't set any object as active, and most operators in Blender use active object as reference for settings, since there isn't one some operations may fail.

Solve this by Shift-clicking any of the selected objects so it is set as active without deselecting others.


How to activate ANOTHER object's actuator (Python)? Really! This question has already been asked, but not really answered:
How to activate ANOTHER object's actuator (Python)?

So regardless if I'm supposed to:

I've got following objects parented (simplified):

Cube "Hero" (invisible,actor) [always:player.py]
  > Armature "Skel"     [Walk.action, Jump.action, ...]
      > Mesh "Skin"

"Hero" is my player object. Here I have my Always > player.py script.

Depending on stuff I want my script to activate animations on "Skel".

Currently I'm doing this using playAction while using the settings taken from the Action from Skel.

Now I'd like to use the Action Actuator directly via cont.activate(Walk.action).

The problem is I don't have a controller to activate it with.

How can I do this nevertheless? (And yes, I'm interested in alternatives, too, but I really really would like to have an direct approach first.)

Thanks in advance

from bge import logic

cont = logic.getCurrentController() #Camera
cube = logic.getCurrentScene().objects['Cube']
print(cube.controllers)
print(cube.actuators)
cube.controllers[0].activate(cube.actuators[0]) #AttributeError: 'SCA_ANDController' object has no attribute 'activate'
cont.activate(cube.actuators[0]) #ValueError: Motion not in this python controllers actuator list

The solution: Send a message to trigguer a message sensor to trigger the and controller to trigger the action actuator

In your script:

from bge import logic

cont = logic.getCurrentController()

cont.owner.sendMessage('anySubject')

or just:

from bge import logic

logic.sendMessage('anySubject')

Also you can connect multiple objects logic bricks take a look at blender-game-engine-logics-sensors-and-python-script


Bake sound to F Curve giving square curves? Just working my way through this tutorial . . . Got to about 5.55 in the video and hit a snag.

My soundfile loads into the graph editor, but instead of appearing as a series of curves, it shows up as collection of squared-off straight lines.

Here are the import settings:

. . . and .blend file.

Anybody know what gives?

The issue was that in setting up the custom property 'Sound'. In the video, the tutor enters '0.0' into the Property Value. I didn't notice the decimal and entered '0', thus switching the property to 'integer' instead of the desired 'float'.

I removed the keyframes from the Sound property, edited the Property Value to '0.0', added a keyframe and reimported the sound (bake sound to fcurve).


Explicitly setting object name to "X" actually sets it to "X.001"? I am using a python script to create and import some objects.

After creating an object I set it's name like so:

bpy.context.object.data.name = "MyObject"

and the new object is now named "MyObject"

However if I run the script again, the new object is now "MyObject.001" and the old object remains as "MyObject".

Even though I explicitly told python to name it to "MyObject" (and the rest of the script relies on that name) - but it's changing it anyways.

My scrip is unaware of the fact that Blender is forcing the name to change.

How do I force Blender to change the name of the object to exactly what I set it to. I don't care if it indexes the old objects.

Just seems like bad default behavior in the first place.

Thanks.

Blender uses the name to uniquely reference the object - so if an objects already exists with that name it cannot allow you to create another one. Instead, it creates the object and adds the ‘.001’ suffix to make it unique (or 002, 003, etc until it finds an unused name).

One solution to your problem is for your script to first check whether that object already exists and if it does to either rename or delete the old object before creating the new one - this way your object should always be created with the name you specify.


Is "value" Blend mode same as "luminosity" Blending mode from Photoshop? I tried for so long to look info for this problem and found basically nothing. I am trying to adopt a technique from Photoshop to Blender to match the colors of 2 different scenes, but end up in the problem, that in Blender we don't have "luminosity".

In photoshop the technique in a nutshell: You have 2 scenes with a mask mixed together. Then you add over them a 50% gray layer with luminosity. That way you will get a color map of all the colors you have in the scene.

If you now add saturation to that output, you can clearly see the color differences from the different scenes and it is very easy to fix the colors from the other scene to match it with the other one. Then you can delete the neutral and saturation layers.

So I tried to do this in Blender and found out that we don't have "luminosity", so I am trying to look something that works a similar way.

Here is the technique in Photoshop explained very clearly:

https://youtu.be/2SBgHDwt16s?t=57s

TL;DR is that there is no canonical method to derive "value", and it is up to the various applications to determine how it derives it within the constraints, using arbitrary formulas.

While luminance has a very strict definition and varies from RGB colour space to RGB colour space, rarely does bad software handle it properly. The Y in YCbCr also varies based on the coefficients used.

  In photoshop the technique in a nutshell: You have 2 scenes with a
  mask mixed together. Then you add over them a 50% gray layer with
  luminosity. That way you will get a color map of all the colors you
  have in the scene.

Photoshop's handling isn't a reference. This is because it is a display referred application and handles colour in a hacky kludgy manner based on the limitations of the display referred model. The formulas Photoshop uses are mostly strictly display referred and can not work in a scene referred environment such as Blender. To see the display referred formulas, you can research the Adobe PDF specification that outlines the various blend modes. Specifically, in a scene referred model, colour energy values extend from potentially zero to potentially infinity, subject to quantisation limits.

The notion of 50% grey varies from implementation to implementation based on the models used.

  So I tried to do this in Blender and found out that we don't have "luminosity", so I am trying to look something that works a similar way.

To apply a colour to greyscale image, you'd have to reverse the average luminance to the colour you have chosen. This is a non-trivial problem in a scene referred application such as Blender because of the variables involved. For the record, the proper luminance weights for a REC.709 / sRGB based reference space are:

(0.2126 * R) + (0.7152 * G) + (0.0722 * B) = Average Luminance

This works for both display referred and scene referred values, and as of the most recent master branch of Blender, should be what the RGB to BW node delivers.


Controlling smoke/fire emision amount It is possible to animate the emission of the smoke in smoke sim? I tried to insert keyframes in the fuelAmmount propierty in the flow object but it didn't work.
Thanks.

Controlling the amount of fire by keyframing the Flame Rate works for me:

However it doesn't affect the smoke.

To affect the smoke as well, you could try animating the Volume Factor:


Turn Character Into a Sketch I have a model of a man. I wanted to render it in some way so that it can turn into this "This" is a pencil and paper animation, with each frame drawn, photographed, and archived.

I have seen someone else do this in Blender.

Any thoughts?

The Compositing Method

First, you could go for a cartoon render of your model. This effect uses advanced Compositing with the goal of creating a comic style look. You can read about it here. It can create results like this...

...but you'll have to deal with stuff like this.

OpenGL

There is a way to render in Blender that uses grease-pencil. You can look into it here.


Is it Possible to Dynamically Change Object Materals? For example, make an object glossier after touching another mesh, to make it look wet (dynamic paint?)

Or make it appear burned after being close to a flame simulation? (particles + dynamic paint?)

I know it's possible to change the object color with dynamic paint, but is it possible to do the same sort of thing with a material?

(Perhaps some complex system that uses dynamic paint generated image sequences to mix several shaders and node groups?)

Dynamic paint is basically an automated painting system, you define a canvas and brush and together they generate an image (unless saved into vertex data such as vertex colour or group). This image can be used just like any other image within blender.

As shown in Miika's documentation you can use the generated image to adjust various texture settings within the blender internal materials. One example that appears to be omitted is the stencil setting (in the influence panel), this enables the texture layer to be a mask between higher and lower texture layers.

Within cycles you can use an image as input for the Fac value of a mix shader. As the final mix in a material you effectively choose between two different materials. You could also use it at any stage to mix any part of the node setup or input any specific value of a single node, like noise scale or emission strength.

Using nodes with the blender internal render you would input into a MixRGB node instead of a MixShader node to get a similar result.


2.8 UV editing, can't box select polygons in 3D viewport anymore I am UV mapping a low poly model and my workflow involves a lot of box-select, select linked and moving the polys in the UV window. Until recently this worked fine. Now I can't box-select in the right hand 3D viewport (see below). I've been through all the menus and I can't find anything obvious.

If I go to the modeling workspace, then it works fine but skipping back and forth is not an option.

Thanks in advance.

The answer is to delete the UV Editing workspace and make a new one.

Big thanks to Jachym Michal for the solution in a comment.

Steps

On the tabs across the top of the window (these are Workspaces), right click on UV Editing
Select delete

Click the [+] icon on the right of the workspace tabs
Navigate to General ➡ UV Editing

You'll have a new UV Editing Workspace. You might need to zoom in on your UV and re-apply any 3D viewport settings you had.


Creating a simple bicycle pedal motion I am trying out the various bone constraints in Blender. To further my understanding I am attempting to create the motion of a leg following the pedal of a bicycle. Please refer the image of the simple setup I am attempting.

I have parented the 'Pedal' to the 'Disc' and have animated a rotation of the 'Disc' in the direction of the Blue arrow.

I am now trying to make the 'Feet' (oops! must be 'Foot') bone to follow the path of the 'Pedal' with an offset. I believe that after achieving this, adding an IK constraint to the 'Feet' bone and affecting all the way to 'Thigh' will give me the necessary motion. However, I am unable to achieve this. I am using Blender 2.7 on Linux.

Attempting to 'Copy Location' constraint on the 'Feet' object while specifying the target as 'Pedal' does not work.

the bone is connected to its parent which constraint its location also leaving it parented will create some problems when using it as IK terget :

in edit mode select the last bone and remove parent and clear connected

you can use the copy location constraint on the bone now and set it as IK target


How to stuff and coat a shark with licorice for biting? I need my shark stuffed and coated with licorice in order to almost bite off it's head:

How do I stuff it pink and coat it with an irregular black coat, like this?

For the final bitemarks I intend to subtract these teeth:

I've coloured the model and subtracted a thin cylinder to get a feeling where I'm directing to:

Model your shark
Duplicate your model with Ctrl+D to make the inner portion
Go to sculpting tab, use the tools to deflate and change the inner portion (turn off symmetry)
Go to Addons -> Search for Bool tool -> Activate Bool Tool
Make your "teeth" object
5.5 Duplicate your teeth object
Select the teeth object, intersect it with your shark
Select the Teeth object first then the shark, and choose Booltool -> Slice
Select the cut out portion and delete it
Repeat the same with the inner portion
Scale the inner portion a tiny bit to prevent z-fighting
Apply different materials to the inner portion and the shark
Done


Partial transparency with node editor ignores other objects behind (draws world background) How to combine nodes-editor transparency with uv-mapped textures in Blender Render?
This question here is strongly related to the one that came up whilst I worked with that problem there.
Same situation as before;
An object that shall act as a partly transparent mane.
The object below the mane shouldn't be affected by the mane's transparency. (In general no other object).

 As you can see, the result is not as wished. I honestly have no clue what to do since I'm pretty new to nodes editor.
If anyone knows how to fix this, I'd be happy for any help.
If needed, I will try to put up a file with those two objects. Just might take some time until I got all files sorted.

What I now found out thanks to this video (https://www.youtube.com/watch?v=BKxUKzpx--s), which showed me a slightly different way to get my transparency problem fixed, might be just a solution that was fine for me, because I will stick to game mode anyways.  So others who have the same problem and have no use for 'Blender game' might be dissapointed. It only helps in that direction. (Means, if anyone else has got a concrete solution for nodes editor in blender render, shall feel free to share their knowledge^^)
 ---
After I switched into Blender Game, I went to the materials-tab.  There showed up an option that I desperately needed. It's called "Game Settings" and I just needed to scroll through the options to select 'blend alpha'. This made the texture show up with a blended alpha that worked fine.
When I switched to texture view, the texture still looked wrong; not transparent. I checked the transparency-panel in materials-tab, selected raytrace and set alpha to 0. Now the whole object appeared almost invisible.
After I then switched to texture-tab and selected full alpha control by the texture, the surface acted like expected.
Here the screenshots of the told settings:
Materials Tab Texture Tab


Weight paint strength problem Some one please help me. I am creating a character for my unity game but the problem is that when i do weight paint of strength of 0.1 it act like 1.0 strength. It solved by adding corrective smooth modifier but unity does not support corrective smooth modifier so some one please help me. [THANKS IN ADVANCE].help me please I will very thankful.

In Unity vertex weights are normalized, meaning the sum of all weights for each vertex has to be 1. (It might also be the blender converter/exporter that does that, I don't know)

So if the 0.1 weight is the only weight applied, it will become 1.
You should add 0.9 weight to another bone (probably the root-bone) to fix it.


Cannot open user preferences menu anymore I'm getting some error and cannot open my User Preferences window anymore.

I was doing some Python addon development (nothing fancy, just iterating through objects), loading and unloading my addon and at some point I must have killed the User Preferences window.  Now when I try to open it by selecting File > User Preferences, a popup displays "Failed to open window!".  The console displays:

Win32 Error# (3221692624): <no system message>

I've tried restarting my computer, but that didn't help.  I've also tried deleting my script from C:\Users\&lt;user&gt;\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons.

What can I do to restore my User Preferences window?

Okay, I just did a full uninstall followed by a reinstall and toasting my Blender user directory.  The User Preferences will open now.


How to read excel file and use as coordinates in python code? Currently this is the excel file:

How do I use python to import the file and get it to read it so that it effectively reads it as:

x, y, z, l, m, n, p, q, r = 5000, 300, 2700, 0.2, -1, 0.1, 0, 0, 0

And is it possible to read more than one line as shown in the image and create another set of coordinates?

Alternatively, you could use the pandas library. (How to install - see here: Using 3rd party Python modules)

With pandas, you can then use the pandas.read_excel() to import your worksheet into a DataFrame, which is basically an array but with named columns to make indexing easier.


shift alt left click for loop select doesn't work in 2.8 anymore. What did they change now? The title says it all. This is so incredibly, unbearably annoying.

mesh.loop_select doesn't work now... and I can't figure out that they've made it into. Even when reset to default settings I can no longer loop select... so what's up here?

In Edit > Preference > Input part if you have Emulate 3 Button Mouse in this case the Alt key serves as the third button so the shortcuts do not all work.

Just remove the check mark in the Emulate 3 Button Mouse box.


Help replicating sci-fi texture I'm trying to procedurally replicate the white fabric-like texture on this spaceship:

So far, this is what my render looks like:

And here is my node setup:

Basically, it's two sets of overlapping wave textures with distortion, subtracted against each other to make the "stippling" effect. Then I apply that to a bump node and combine that with a burlap texture normal map to give it that "fabric" look.

But it still doesn't look as good as the source image. I'm still struggling to get that randomized and grunge-y look that I see in the source photo. Any tips on how I might get my texture to look more like the source image? Thanks!

Edit: my blend file as requested:

Edit2: Added a better test render image, for comparison.

I solved this by using a displacement map. Using Blender 2.8, I used a space shuttle thermal tile texture to influence the height of a displacement node and plugged that into the Material Output displacement. You also need to enable "Displacement and Bump" in the Material Settings -> Surface -> Displacement settings.

I realize this isn't procedural, as I originally asked, and it's not the exact texture shown above, but it solves what I was trying to do in a relatively simple way.

Here's the texture I created, in case anyone wants to use it in their work. It's made from several images of NASA's Space Shuttle thermal blankets.


Animation of Selected Object Not Show Showing in Editors I have been having a problem recently (could it be 2.83?) whereby the animations are not showing the selected armature.

Initially they do show but as I work more and more, the editor will only show the selected bones, until finally none of them will show. Also if the NLA is used at all, it's very difficult to get the dope sheet and the graph editor to show again. Usually by switching to and from various bone groups after selecting the animation icon in the Scene Collection.

How do you get the graph editor back after using the NLA? I have attached the Blend file and a screen shot showing the selected elements resolutely refusing to show in the dope sheet. My work around atm is to export an FBX and reimport it into a fresh Blend file.

Blend file not showing animation

I don't see any problem with your file but I'm not playing it with the latest version.

For the moment the armature is playing the animation that you've pushed down into the NLA editor. To see or edit this action you can select the strip and press Tab, the strip will turn green and the keyframes will be displayed in the Dope Sheet.

If you want to load any other action, switch the Dope Sheet to its Action Editor mode and choose whatever action you want in the dropdown menu (now the Dope Sheet will play over the NLA, to come back to the NLA actions you'll need to close the actions you've opened in the Dope Sheet).

To switch directly from Dope Sheet to the Graph Editor you can press CtrlTab.

Also, the Only Include options may be useful sometimes to only see the keyframes of the selected bone(s) but don't forget to disable it if necessary:


When should N-Gons be used, and when shouldn't they? Support for N-Gons (polygons consisting of more than 4 vertices) has been in Blender for a while now, but many of us still may not know when to use them, and how to do so effectively.

In what situations do N-Gons really come in handy? When should they be just plain left out? Do they have any place in finished models?

Honestly in my opinion, NGons should never be present in a final model. Every artist will have slightly different opinions on this but here is my take.

When NGons are okay

On completely flat surfaces.
Hidden areas of models that will never be seen or used for any reason (but this still sloppy and not desirable)
As a temporary holding surface that will later be replaced with clean quads.

When NGons are not okay

On any model that will be exported to another artist or engine
On a model that will deform through animation
On a model with SubD (unless that area is completely flat, and surrounded by a quad-loop)

There's many different reasons for each of the above, but here's a few:

NGons should not be used on deforming models as you want to have absolute control over how the surface is generated and how it appears at render time.
NGons should never be used on a model that is being exported as you don't necessarily know if the importer on the other side will support NGons or if the next artist will treat them as you intended.
NGons should never be used on real-time models as you won't know how they'll be triagulated.

In general, I like to use NGons as a temporary topology block. But I never keep them in my final models.


How to make a perfectly flat bottom for 3D-printing topographic relief? I'm trying to print a topographic relief, I'm close to the end but I can't find a way to have the back of my object perfectly flat without changing the top.
(I tried to SY 0. didn't worked)

The solidify modifier can be removed, if you need to do this kind of thing a few times do this instead:

Select your Mesh, go to Edit Mode, Select All geometry.
Hit E to Extrude, Then Z followed by Z again to constrain the direction
Then move the mouse to the right, and the newly extruded geometry will start to move down. You can see by exactly how much in the bottom left (by default the contrast between the text and the panel make this unnecessarily hard to read (April 2015). But it looks like this

You can use the mouse, or left / right keys, or even type the number you want directly with the num keys.

then to flatten the new geometry, hit S, Z, follwed by number 0.

Here's a view from the underneath before and after the flatten.

Cons:

there are all kinds of factors that can interfere with how straightford this is, the location of the reliefs Object origin being one of them. If I had to do this repeatedly, it would be something to write a small python script for.

The recipe for such a script might be:

find lowest z coordinate of the original mesh
extrude all faces a little bit
replace all z values of the newly geometry with the lowest z of the original mesh minus the desired thickness.

This would produce a mesh with a minimum thickness.


Facial Motion Capture in Blender with Depth Sensors and/or Multiple Camera setups hypothetical question here. I've been playing a lot with various animation methods over the past few days here, and have had a lot of successful results with clean full body motion capture (here)

So I have four playstation eyes and 2 kinects at my disposal. Is there a way to do a multi camera, depth based facial track, a multi video track, or just depth inside of blender's existing tools, or is there a scriptable workaround?

I realize there are some problems inherent in a multi camera setup, such as:

1: assuring the cameras are properly aligned within the software to the real world setup, and I'm aware Blender probably doesn't solve that for you. I'm okay with creating a precise measured setup though and replicating the camera orientations in blender.

2:  removal of head movement within the frame of video, but retaining gimbal. I feel like this is something that should be able to be tracked out though, if you define a root somewhere on the head.

3 standard distortion/fov inconsitencies between cameras.

4: controller input? I know with Ipisoft it can only do 2 kinects or 8 pseyes (on a standard motherboard without external controllers, which can only bring your number to 3 without custom hardware. I'm unsure about the compatibility of running both kinects and cameras/pseyes simultaneously.

I've seen a few methods for deriving facial based capture in Blender, both through faceshift export, or Blazraidrs method here: (here) These are both interesting methods. I prefer Blazraidr's, but I see problems with both. First off, I'm not adverse to using marker based tracking, and I feel like faceshift loses out on some qualities because it doesn't take advantage of that on top of the depth sensor.

anyway, I suppose it's an open ended discussion. Curious to see what people have to say, if you read all of this thanks. TL;DR: how does multi camera facial capture in teh open source softwures

It's not possible yet as Blender has no Multicam Support. There is a GSoC project currently and it seems to be possible later this year.


Artifacts with boolean modifier Here is a car brake disc Im working on:

so I decided to use boolean mdifier to make the samll holes(one side),but it just caused the other half to disappear:

after some experiment，it seems that boolean mod doesnt support unclosed mesh or seperated mesh,and also cant treat closed mesh as holow instead of solid,and when applys to smooth surface it looks like this:

only way I thought to make hole on cured smooth surface without too much subdivision is to use edge split,and then I find out edge split doesnt support vertex gruop which is kind of inconvenient.
So is it possible to ask developer to add these feather or is there better ways?

I expand my comments above, to post some example image. I still think it's a matter of mesh density:

To better visually describe I exagerated size of the diff meshes, but this is the overall setup:

this is how a subdiv level of 2 on a standard UV sphere, in boolean diff with a cube, enough subdivided and extruded, then hidden. Still, you see some artifact on the hole edge.

I tried a gif animation showing the effect of changing settings, but due to color banding it gets lost... so here is a rendered comparison with subdiv 0,1,2, and 4 (enough in this example)

As said above I can't show you here, but even "moving around" the sphere doesn't show artifacts (or they are much more subtle) in the viewport, and the same goes in the render.

I don't know how better you can solve this, but using much higher resolution on the edges of the subctraction, at least, will help blender to find a "smooth" setup for normals of geometry around that area...


What is the number in corner of the 3D view? At the bottom-left corner of the 3D view there is some white text with the name of the selected object, preceded by a number in parentheses.  What does this number mean?

It shows what frame on a timeline you already are. It is very useful if you e.g. maximized the window with View -> Toggle Maximize Area (Shift+Space) and don't see your time cursor (the green vertical line) on the Timeline. Please see how to navigate it btw (What are the hotkeys to navigate the timeline?).

It's also very helpful as it shows what frame on a timeline the animation keyframe is inserted (the number changes the color from white to orange then).


How do I remove the UV grid from this image? I'm a beginner and just tried texture painting using this tutorial: Youtube video
At some point, I must have messed up. I applied the material and this is what I'm getting in render mode:

This is the png file used in texture painting:

How do I remove the grid thing? I want to have a metallic material and show these lines on top of it. So how can I remove the UV grid and show the lines on top of a new material?

This solution was provided by a user on irc channel #Blender named JA12.
Also, please read Mr Zak's comments on the question.


"Limit selection to visible" not working I just downloaded Blender 2.79 after about 8 months of not using the software. I noticed that the "selection visible" function isn't working. I expect it to make the mesh partially transparent, but as of now, it does nothing. I am not sure what is going on. Thanks in advance for the help:)

Oh that was a tricky one...

it's just because you have collapsed the actual horizontal bottom bar of your 3D window, and the one we see is actually from another 3D window that you also have collapsed

so grip the bottom of your 3D windows and pull it up, them display its real bottom menu bar with the small "+" on the bottom right

and now you can activate the Limit Selection to Visible button


Is there any way to override UILayout.prop tooltip? I have a collection on boolean properties I want to display in a node. BoolVectorProperty isn't really applicable because I want to be able to change the size of the array dynamically.

My issue is that when displaying a compact grid, there's no way to tell the user the index of a button. That is, I would like to override the tooltip of a UILayout.prop widget. If I set the text-kwarg to something nonempty, icon_only seems to be ignored.

My current code:

class SequencerPosition(bpy.types.PropertyGroup):
    value: bpy.props.BoolProperty(name="Value")

class TriggerSequencer(Node):
    bl_idname = 'TriggerSequencerNode'
    bl_label = 'Trigger Sequencer'
    bl_width_min = 70.0

    sequence: bpy.props.CollectionProperty(type=SequencerPosition, name="Sequence")

    def init(self, context):
        for i in range(16):
            self.sequence.add()

    def draw_buttons(self, context, layout):
        grid = layout.grid_flow(row_major=True)
        for i, pg in enumerate(self.sequence):
            grid.prop(pg, 'value', icon_only=True)

results in this node:

The tooltips are rather unhelpful, just saying "Value."

Dynamically re-annotate a pointer property

I forgot to select one

Example below.  Note I've used Scene properties to illustrate the concept, as it's simpler to put together using simple panel template code and column flow to layout, than making custom nodes.  Pretty sure the same concepts apply.

The Scene.foo_int property unregisters re-annotates and re registers the propertygroup class.  The init call is emulated by calling the rereg update method.

import bpy
from bpy.props import BoolProperty, PointerProperty, IntProperty

class SequencerPosition(bpy.types.PropertyGroup):
    __annotations__ = {}
    pass

def rereg(self, context):
    if getattr(SequencerPosition, "is_registered", False):
        bpy.utils.unregister_class(SequencerPosition)
    SequencerPosition.__annotations__.clear()
    for i in range(self.foo_int):

        SequencerPosition.__annotations__[f"value{i}"] = BoolProperty(
            name=f"Value{i}",
            description=f"Do something with value {i}")

    bpy.utils.register_class(SequencerPosition)
    bpy.types.Scene.foo = PointerProperty(type=SequencerPosition)

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        layout.prop(scene, "foo_int")
        grid = layout.column_flow(columns=8)
        for anno in SequencerPosition.__annotations__.keys():
            grid.prop(scene.foo, anno, icon_only=True)

def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.types.Scene.foo_int = IntProperty(min=0, max=32, update=rereg)

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

if __name__ == "__main__":
    rereg(bpy.context.scene, bpy.context)
    register()

  Oh, and this won't really work if I have multiple instances of the
  node, right?

Yes that's a catch on the dynamic registering, however can annotate the node with a maximum number, and only display so many based on a node int property

to demonstrate:

I've annotated the CustomNode with a max of 32 and used the int to set the layout

def draw_buttons(self, context, layout):
    layout.label(text="Node settings")
    layout.prop(self, "my_int_prop")
    grid = layout.grid_flow(row_major=True, columns=4)
    for i in range(self.my_int_prop):
        grid.prop(self, f'value{i}', icon_only=True)


Any reliable and comprehensive GPU/CPU cycles rendering study OK, I'm a 10 year+ user and about to upgrade GPU. Having tested my previous builds I know the following:

the CPU can bottleneck the GPU rendering at some point If I Overclock my CPU my gtx970s gets a slight boost and if I underclock it the GPUs dont even throttle to maximum frequency.
I know each gpu needs a single thread while rendering, at least that process is single threaded.

However I have no idea what the CPU does exactly and how much a certain GPU power is bottlenecked by a certain CPU power. It would be nice to have a study that relates CPUs to GPU power, at least in terms of modern CPU frequency and teraflops.

Anyone done something similar or thinking about it?

Thanks

I don't think the GPU power is bottlenecked by CPU in any way. You either render using CPU or GPU. If you're using a CPU you need to set the tile size to some small number like 16 x 16 or 20 x 20 so that each CPU thread will be responsible for one of these tiles and the process becomes more efficient this way. When using a GPU for rendering you need to set the tile size to a higher number such as 224 x 224 and so on so that you can benefit from using a GPU.

Blender OpenData might give you some ideas on what GPUs/CPUs are better for rendering.


BGE Animated Fireball Group In my game I have an Empty that adds my object magicfbgroup to the scene.

Magicfbgroup is a fireball I made by using several spheres with the same image texture that spin in different directions. It also has 3 planes for x,y,z in the middle that spin as well. All are at about .2 alpha to make a pretty cool fireball... I like it anyways.

I originally had an object that was made by joining several planes then using property to add/kill each plane. In the object I was using always + location to make the fireball shoot forward. This was working, but I like my new fireball wayyy better.

I couldn't make all of my spheres and planes a single object because it messes it up. Seems somethings happening in the difference between Group and Object. When I play the animation now it either goes in a pretty cool orbital loop that i may use later. As the objects are rotating in the animation they are then moving +1. So instead of spinning in place and shooting forward it goes into orbit. Or I can get it to play the animation once, then shoot forward, but the animation stops. Doing LoopStop causes the orbit.

I need the fireball to move forward and end if it collides.

I tried making a stationary sphere in the middle of my fireball and parenting the group objects to it. Still happening.

I think I have screwed up something with location/rotation some where or I need to lock the direction it can move some how and I'm just missing it.

Any ideas? This a dumb way to make a cool fire ball?

Groups within the BGE

Typically you do not work with groups as the BGE does not support groups.

The BGE supports group instances, but a bit differently than Blender.

An instance typically consists of

the instance members (copies of the objects assigned to the group) and
the dupli group objects (typically an empty)

While in Blender you can move the dupli group object around and the members will follow within the BGE they have no relationship. When you move the dupli group object the instance member will remain where they are.

I just tell you that to explain why I think your issue has nothing to do with groups.

Orbiting animation

Orbiting usually occurs when you move an object forward along a local axis and rotate at a local axis. You basically change the direction of your forward move. In natural words: you move in a curve

Spinning is orbiting without moving.

But how to move along a path and still spin around yourself? You do not move forward at you local axis, but at another axis that is not local. Example: you do a step towards your target without caring your local orientation.

This can be hard as you need to compensate your local orientation.

What if you do not move at all? You let you move and just focus on orbiting.

A simple way is you parent the spinning object to another object (e.g. an empty). This way the spinning object does not move (relative to the parent). Then you can move the parent as you like. The motion will not influence the rotation and vice versa. Make sure you move the parent and turn the child.


How do I create and set the depth of a cube in blender 2.80? In edit mode I click on add cube, I click on the screen to set the location of the 3d cursor. Then I click and drag to create a rectangle shaped cube.
But how do I set the depth to be the same as one of the other sides ? Or how do I define the depth at all?
I am not seeing any properties relating to the size of the cube being created. The cube created for me is very thin rectangle like a plank of laminate flooring and I cant work out how to make it thicker and square like a wooden post.
Creating a square cube or post seems such a basic thing and yet it stumps me.

If you are using the Edit Mode "Add Cube" tool, you should get handles that you can use to modify your cube visually:

After creating the cube (by dragging the left mouse button), orbit around the cube by holding down the MMB middle mouse button, then just grab a face and pull it in the desired direction. I'm not aware of a way to use these handles with exact numbers.

However, if you want to create a new cube and set its dimensions, I suggest adding it in Object Mode with Add > Mesh > Cube. In the "number" panel (N) you will be able to set its dimensions precisely.


Render not being saved When I render my image, it renders perfectly fine, but it doesn't save out.

Can anyone explain how to get my image to save after rendering?

After you render out your image, press F3 in the UV image editor for the Save Image As function. You can also go to Image -> Save As Image.

I recommend checking out this answer by gandalf3 which provides more detail as well as solutions.


Make fresnel visible only from a side of the mesh in eevee I used this fresnel setup on top of my shader to create a artificial rim light effect

But of course fresnel is applied around the entire object, is there a way to control the sides of the object it is applied so I can emulate a rim light effect comming only from the left?

For those interested, I have achieved what I wanted with a matcap setup, the problem is that its not easily editable and I have to put a new image file every time I want to make adjustments, I'm still open to now if theres a way to do it with a fresnel node
[


How do I transform two objects to the same frame of reference I have two objects, a cube and a second object which I created from a bezier curve.
They are sitting above a plane.

For the object on the left

The Y Dimension is dictating its width (left to right measurement) as seen from this perspective.

For the object on the Right (created from a curve),
the Y Dimension is dictating its height (top to bottom measurement) as seen from this perspective.
I know the terms Width, Height and Length depend on a particular context. I know by rotating the object on the left I can try and make it match the object on the left so that its height equates to the Y dimension, but ....
Is there some way of reassigning or changing the designation of these things so that I am not always rotating objects.

Another extension of this is to consider the respective rotation of the objects.
The object on the left has a rotation shown above, but on the right, we have the rotation shown below.
Before I begin designing anything I would like to re-reference these objects so that in this view both their rotations are 0.
I hope this makes sense. I am very new to blender, so perhaps I am missing something obvious here.

As suggested by @MarkusvonBroady. I positioned both objects in the desired starting position. Then I selected both objects and pressed Ctrl + A, and then selected Apply all transforms. After that, the objects both had the same frame of reference, same angles of rotation etc.
We can also select individual transforms to apply, for example, we could just apply rotation.


The render result is just the transparent texture? I rendered a 1200x800 image, but it's just the transparent texture thing:

I used Cycles for this image. In a test in Blender Render, it worked perfectly, although the materials were made in Cycles so you obviously couldn't see them as you were supposed to.

you need to create a cycles material for visible your render because cycles engine needs nodes tree for render  you can't render blender internal  material into cycles render


Eevee to Cycles Render Issue: Some meshes render in a different location Does anyone know why some meshes would render in a different location than it should when switching between render engines? (Specifically: Eevee to Cycles) When the overlays are toggled on, you can see that the mesh is still where it should be, and hasn't physically moved. Only where the mesh is rendered. (See pic.)

I've tried copying the model and placing it into a different file. It still does the same thing.

I've also tried relocating the center point.

Nathan, thank you! It was the displacement node in the material. It's strange though... This seems to happen randomly. Every other asset that I am rebuilding has a full texture set, complete with displacement and this isn't happening. If anyone has any reason as to why this would only happen on occasion (and could be avoided), I would appreciate it. Thanks!


Why does Skin modifier give No valid root vertex error when placed after Decimate modifier? I've built a 2D shape by tweaking a heavily subdivided plane, and I want to create an 'outline' of it by using the Skin modifier. To avoid having all the internal lines also get thickened by the Skin modifier, I added a Decimate modifier (set to Planar, other modifier's values left on defaults) to turn it all into one large face. The Skin modifier now no longer works, error message stating

  No valid root vertex (you need one per mesh you want to skin)".

Is there anything I can do to combine the two modifiers?

Using blender 2.77a

This behaviour is based on the modifieirs' stack order. The error Skin modifier provided means that Decimate modifier which most likely is placed above in the stack already deleted the vertex used by Skin modifier as a root one (it doesn't mean that all the vertices of the mesh were deleted; it's just that vertex marked as root one was so lucky to be decimated). From manual about the Skin modifier:

  Marking a vertex as root causes that vertex to be used for calculating rotations for connected limbs. [...] Each set of connected vertices should have one root node.

So Skin needs one vertex to be marked as root one.

There are some ways to workaround this.

Enter Edit mode of the mesh with both modifiers added, select one of the vertices and mark it as root manually; chances are that it will be the vertex which won't be decimated. If it isn't really important for your mesh to have some certain vertex to be as root one for calculations this should work.
Place the Decimate below the Skin (but this means that the result will change quite a bit, i.e. all the internal faces will be skinned).
Decrease amount of faces to be deleted by Decimate modifier. This is done in different way depending on the modifier's mode, if using Planar you will decrease Angle setting. The less vertices will be decimated, the more chances that one needed for the Skin will remain untouched.


Why does my mesh change when i render it? I'v created an animation with a simple displace modifier and textures and it looks just fine in rendered view, but as soon as I hit "render" it deforms to this low poly mess. What am I doing wrong?

Modifiers can be disabled in viewport and/or render. The subsurf and multires modifiers also have different settings for render and viewport.

The camera icon controls the render view and the eye icon controls the viewport.


Difference in rendering result vs viewport in v.2.8.0 I have a problem with final rendering, which is different from what I can see in the viewport. Previous replies to similar topics don't help, nothing changes. It shows some addidional noise and looks totally awful, I have checked the color management settings and everything seems to be ok, but I'm completely new to blender so I may have sth checked or unchecked, no idea. I'm using v. 2.8.0. No idea whatsoever where the problem may be.. Thanks!

render problem

There is overlapping geometry:

This button does not mean the mesh won't be rendered:

To disable things to be rendered, you need to use "disable in renders" buttons:


Molecular Script Add-on: Why does this simple particle system blow up? This particle system with Molecular Add-on blows up even though there seems to be more than enough space between the particles. Any idea why is this happening? I'm using Blender v2.81.16.

Here is the file

Frame 1:

Frame 2:

Particle System rendering settings:

Issue comes from particles self collision (so boundaries).
In your case if you Display as Circles, you can see they are overlapping, set Render size to 0.02. Particles stops to explode.

To see particle's collision boundaries switch Viewport display > Display as Rendered to Circle.
Adjust Size value, so circles doesn't overlap.
The same value set in Render > Render as Object > Scale panel.
Then you can switch back Display > Display as Rendered.
Scale object (Sphere) in 3Dview (Object or Edit mode) to desired size.

What matters - Render Scale (viewport size is only for reference)
What confuse - Object Scale in 3D view does not affect self collision
The goal is to keep not overlapped "Display as Circles" with the same value for "Render as Object" ... Than if you scale object (Sphere) in 3Dview via Object mode or Edit mode doesn't matter. A size of object doesn't matter here, object can overlap each other or be a micro, its size doesn't affect behaviour of particles.
Render Scale 0.05

Render Scale 0.1

To see real boundary with Rendered as Object - add a new Sphere (by default Scale 1 / Dimension 2) and set Render Scale to 0.02, same set for selected Sphere in 3Dview Properties > Item > Transform > Scale. To see it right, uncheck in Particles Properties > Render > Object >  Object Scale. Now you can change only Render Scale value and have a control over real boundary at the same time (don't change Scale in 3D view from now).

Note: Object Scale means - use object scale value on top of particle scale. If particle will be size 2 and object scale 0.5 rendered particle (Sphere) will be size 1, but size of collision boundary stay 2. And "Render Scale" value matters :)


Automatic text from file Do you know how I can create text objects from a file or list like this?

Text           x        y       z
abc            876      232     12
bcb            365      345     23

etc

Thanks,

Owen

yes then maybe drag it to the location by hand to where you want it at..

or try to read the code... i mean the following line seems to be pretty much self explanatory and the author of the article mentioned above (duplicate) also tells you that you can easily offset the position to your liking using his code ;)

bpy.ops.object.text_add(location=(0,idx*2,0), rotation=(0,0,0))


How To Change Camera Field Of View From Python Script I'm trying to change the camera FOV by script. I've already seen different questions like this, but the answers doesn't work for me... This is my code:
import bpy
import math

a = 'hello'
bpy.ops.object.camera_add(enter_editmode=False, align='VIEW', location=(50,0,0), rotation=(1.57057,0.00174533,1.57057))
bpy.data.objects["Camera"].name = a
bpy.data.cameras[a].lens_unit = 'FOV'
bpy.data.cameras[a].angle= math.radians(10)

bpy.data.cameras gives access to the camera data. And camera data is not renamed (stays 'camera.xxx') when you set the object name.
So, access the camera via objects and use its data:
import bpy
import math

a = 'hello'
bpy.ops.object.camera_add(enter_editmode=False, align='VIEW', location=(50,0,0), rotation=(1.57057,0.00174533,1.57057))
bpy.data.objects["Camera"].name = a
bpy.data.objects[a].data.lens_unit = 'FOV' #Access it by its object name
bpy.data.objects[a].data.angle= math.radians(10)

Additionally, you should not rely on the fact the created object is named "Camera" (because it won't if such a camera already exists).
You can:
import bpy
import math
from mathutils import Euler

a = 'hello'
camera_data = bpy.data.cameras.new(a)
camera = bpy.data.objects.new(a, camera_data)
bpy.context.collection.objects.link(camera)
camera.location = (50,0,0)
camera.rotation_euler = Euler((1.57057,0.00174533,1.57057))
camera.data.lens_unit = 'FOV'
camera.data.angle = math.radians(10)


Volumetric shader not showing up in render So, I have a problem using the Volumetric shaders in cycles. When I am viewing them in the viewport, they seem to be coming out perfectly fine, whereas when I render them, only the glass surface is visible and no light scattering/absorption occurs.

The Preview in the Viewport

The Rendered Image

(Sorry I have used a very low resolution, but the difference hopefully is clear)

[Edit] You can find my blend file here.

You have a Solidify Modifier on your pawn(s) of -0.011 thickness that is set to take effect in the render, but not in the viewport. This is causing your pawns to be hollow inside during the final render, but not when seen in the viewport. This is also why your Material Preview looks much denser and darker than your final render. Since when rendered the material is paper-thin, there is not enough geometry for the volumetric properties to show. I think you either didn't mean to be using that modifier, or didn't mean to make it that thin.

General good advice:

always look at the Material Preview to see what Blender "thinks" your material is supposed to look like in its raw state.
Always consider what's happening in your Modifier stack.

Happy blending.


Prevent legs from coming out of socks I imported makehuman model with stockings to Blender, cut the stockings and made socks out of them. My problem is that the legs are coming out of the socks in some of the animation frames.

For now, I am making the socks really large so the knee would not stick out, but this is not the solution I wish to move forward with.

I posted the picture showing the problem and the .blend file here:
http://blenderartists.org/forum/showthread.php?304725-Legs-coming-out-of-socks

There are four main solutions of varying complexity... you may choose to do all three:

Put a lot of love into weight painting on both the leg and the sock so you don't get intersections on deformation.
Use a mesh deform modifier as part of your rig. If the leg and the sock are both deformed by the mesh deform modifier, there's less likelihood that you'll have intersections.
Use corrective shape keys... if the intersection happens reliably and predictably as the knee bends, you can make a shape key that fixes the intersection. You can then drive the influence of that shape key using the knee's rotation.
Put the sock and the leg on different render layers and make sure the sock layer is always over the leg layer. This may require some clever masking for the back of the, but it's doable.


Where to place origin when exporting to UE4? Is there some rule of where the origin should be placed on a mesh when exporting to FBX for use in a game engine, should it be placed anywhere specifically?

In my experience I have found prefered origin placement. Dependant on desired result and/or alignment on a per-piece basis. However as a basic default it's best to place the origin centered at the bottom. It's also good practice to keep the bottom aligned to 0 on your vertical axis.

I am unsure about the Unreal Engine. But in Unity the Y axis is used for vertical instead of Z. As such in order to import properly I have found the mesh needs to be oriented with -Y as bottom & +Y as top.

Also, likely most importantly, be sure to apply Rotation & Scale. ( Ctrl + A )


Lock face surfaces to each other? I Want to run this along the surface of a face and then rotate it on the Y and X axis how can I achieve this?

You can "snap to face" :

Then move each vertice to the face :

And have this result :

But it wont automatically rotate or anything.
For "rotation" or other smoothing effects on the shape, this is to be done manually (I am quite sure there is no other way to do it, except if the rotation aspect is clarified in the question).


Seams for use in cloth model I have found a conflict in how I want to UV unwrap my model for cloth modeling:

For material patches, it seems natural to make use of the seams the real thing would have (easier to paint the texture correctly).

For making seams look like seams I need to be able to paint over the real seam, making it hard if I use the real seam as UV seam.

How are such cases usually handled?

You can use two UV maps. One UV map laid out how ever is best for your model with the main texture. Then a second UV map unwrapped so the cloth seams come out better for painting.

You can unwrap your model with UV seams and all, make a second UV map then mark all new UV seams and unwrap again.

Here is an old blender nerd tutorial explaining the process. (for people that like video tutorials)

To use your two textures, and two UV maps in cycles, all you need are two UV Map nodes and two Image Texture nodes. Mix the two images together based on the "seams" image's alpha. The image below is a full node setup for using two image and two UV maps.


IK control bone not rotating linked bone when behind it I have an IK controller bone. It works quite well behind its rest position, moving and rotating both the linked bones. However, when I move the IK controller bone in front of the body, it only rotates the top bone, without modifying the bottom one.

Link to my .blend file is here.

The movements are limited by the IK settings for the lower leg bones. That is the IK settings not the IK Constraint settings. While in pose mode select the lower leg bone and you will find an Inverse Kinematics panel under bone properties.

There you have enabled a limit and set it to 0-90 degrees for the x-axis. While this does seem like a reasonable setting, it is causing the upper bone to take the rotation when the rotation of the lower leg could be negative.


node help: how to make a curve with linear and module How do I do it node in curve?
image 2: curve but i used modifier

You can do this with a Vector Math node.
Start with the horizontal band texture that you want to warp (I used a wave texture cut with a ColorRamp as an example).

Pick another texture to use as a "warp factor". I used a wave texture set on the Y axis. I didn't use a ColorRamp, because the natural gradient of the texture will help make the wave "curve" smoothly.

Then, use a Vector Math node to add the Color output of the "warp factor" texture to the original input vector. Use the result as a vector for your initial horizontal band texture. I added a MixRGB Node between the warp factor texture and the Vector Math node, because it lets you control the strength (and therefore the warp factor) of the texture output by changing the mix factor.


2.81 - Key frames not working? Shader emission settings? I have just been seeing if I could do a tutorial on a title animation, but the keyframes in 2.81 seem to not work properly? I set a keyframe in the shader editor and it sometimes sets and sometimes doesn't, then sometimes I can't see the frames at all.
The emission shader is what I am trying to set for animation. The other non-shader lights on a circle path, animate fine.  Is this a bug?

By default, the items in the Dope Sheet are filtered to only show the selected keys.

To change this you can uncheck Only Selected in the Dope Sheet filter as shown: