Correcting levels in dark renders I've been experimenting with Blender for a while and am starting to get things looking how I want, but the renders are coming out too dark.  What's supposed to be white is coming out as light grey.  Adding more lighting just results in the output becoming more washed out.

(ignore the white outside the window, that's the result of losing the alpha channel when converting from PNG to JPEG)

The levels look like this in an image editor.  As you can see from the histogram the brightest colour is some way below white:

I can use the image editor to correct the levels to what I was expecting by dragging the right hand marker to the point where it's just to the right of the last peak.  This is what it looks like after correction (again, ignore the white outside the window, that's where the alpha channel was)

However I'd much rather have this done in Blender as I'd rather not have to manually correct every image it generates.

I know Blender has a compositor, and that it can probably be used to do level correction, but I know very little about how to actually use it.  I've experimented a bit but haven't really found anything like what I've done in the image editor I've been using.  Basically what I could really do with is a node that says "Treat the lightest shade of grey in the image as if it was white and adjust all other colours in the image in proportion to that".

Does something like that exist in Blender?  If so how can I apply it?

I'm using Blender 2.82 with Eevee as the rendering engine and Freestyle to add lines.  As you can see I'm not going for photorealism.

You can access the color management panel in the render properties. Check "Use Curves" and then you can modify either the contrast or each color channel independently


How do I make objects translucent but keep background images solid? First of all, new to Blender (about 2 months now) so if this seems like a basic question, I apologize.  Here is my situation..

When modeling, I am using the Background Image for referencing front, back, and sides.  I am able to set the opacity/transparency of the images and model with the objects, but I am trying to do the reverse.

I am trying to figure how to set the opacity of all the objects in my viewport to be translucent, while leaving the Background Images with full solid opacity.  This way, I can easily see my drawing even through my objects.

When I do the translucent images, the lines begin to get hard for me to see.

Welcome to Blender Stack Exchange!

In Blender 2.8 and on, there is an option to enable translucency in a scene, called X-Ray. It can be found in the shading options in the viewport.

Once that is enabled, everything in the scene goes translucent. Images may also go translucent depending on how you imported them. If you import your reference by going Shift+A, >Image >Reference they will stay fully opaque.


How to close a true hole in model? The model is closed, but has an edge loop that creates a hole throught it I have a 3D scan that I'm fixing in the Sculpt mode. My problem, I filled all holes that made the object unclosed.

But now I have a few actual holes, as in the geometry is "valid"? When I sculpt the edge loop always stays there, so I can only make the hole smaller.
I tried to add a sphere with a Boolean modifier to fill the space, but that resulted in some weird internal geometry that messed the model up. Any ideas on how to close this?

Thanks!

PS: Sorry if the answer is already here somewhere, I tried googling it, really!

Have you tried to fill the holes with ctrl F > Grid Fills?


Why Does My Object Not Show in Rendered Shading Mode? I have had this happen to me a few times prior but instead of just deleting the object and starting over I would like to know why it is that my objects appear in Solid Shade Mode and only a shadow appears in the Rendered Shade Mode?

I'm trying to UV Wrap the object and the wrapping never appears in the 3D viewport. I selected Textured Solid in the Shading Tab but image still does not show.

I presume you have some render layers set up. The option to to preview the active render layer in the 3D view header has been enabled:

This will mean that if an object isn't assigned to this render layer the object will not appear in the rendered view. Disable this button to view all objects in the rendered view regardless of their render layer.


In eevee, the soft shadows of the sun have circular pattern artifacts The angle value has been increased to get soft shadows with sun.
As the rendering progresses, the shadows appear to spread smoothly, but soon there are circular pattern artifacts.
This looks like a step phenomenon or constant interpolation.
I tried to manipulate all the values of the light and render properties, but couldn’t improve the artifacts.
How can I improve this problem?
I’ve attached two blend files that I set up to help you solve my problem.
Work was done in blender 2.81.

file01
file02

I think you're just seeing the difference in shadow rendering quality between preview and final render.  If I load your scene, the preview looks similar to the above:

but a true F12-initiated render looks far better:


Stripes over 3D objects using ColorRamp Basically my task is to generate Color Ramp over 3D model. My confusion is in term of 3D Texture Coordinate that does not rotate and also if I were to use MODULO, the modulation stays under 1 Blender Texture Coordinate Unit. Instead of nicely scaling.

I would use Object only if you have a good understanding of the applied scale of your mesh, and agree with the comment that for ease you can use Generated.

I believe that Modulo does not really help here (for your understanding's sake), as you are trying to segment the 0 TO 1 mapping that you are trying to achieve (You need to know how this works first).

When you take your Geometry, and get a mesh specific 0 (Lowest) & 1 (Highest), you want to keep that map, not destroy it with Modulo (Yet).

So for my first example I want to show you what that means to change it to an Add calculation instead, so you see what happens from 0 To 1.

Next You want to be sure when you introduce your Texture mapping node, that it connects to the vector inputs of all that would be affected by the rotation.

Now if you want to scale in a repeating striped way you could do this, and have the best of both worlds:

Just play with the B/W color ramp & the Brick Texture scale factor for preference, Or re-introduce your Modulo as you see fit (Now that you understand how the Texture Mapping is working).


Anton Balazh Ocean Material Anton Balazh has an amazing relief map with the best ocean material I have ever seen.  This link has several examples: http://unofficialnetworks.com/2014/06/detailed-relief-maps-show-worlds-mountain-ranges

I am close to recreating the land (although more than happy to accept recommendations on improving that as well!) but the ocean is well beyond my current capabilities.

I have found several tutorials on creating some good looking procedural ocean materials (some of my favorites include avoiding a tiled looking ocean simulation and Prevent ocean from behaving like a mirror) with one of the best being https://blenderartists.org/forum/showthread.php?320054-Test-Tutorial-Realistic-tropical-water-shader-in-Cycles

The challenge is I'm using images from NASA (http://visibleearth.nasa.gov/view_cat.php?categoryID=1484&p=1) to both texture the land and create the height field.  NASA has posted a bathymetry map and a ocean mask, but I can't figure out how to combine all of these to get the subtle ocean bathymetry effect and depth coloring effect.  To complicate matters even more, I prefer using the highly detailed images which don't have a premade ocean mask.

Any suggestions are greatly appreciated.  Thanks!

I think the simplest solution here is to use your ocean depth map as a transmission input on a principled shader node. Apply it also to Subsurface Strength. Then you can change the subsurface color to that pretty cyan shade. For additional depth, duplicate the node with the depth map only applied to transmission on the second one, and play with the strength slider and base color until you get that really dark blue you're after. Then mix the two together using the depth map again to drive the mix shader.

Alternately, if you don't have a separate depth map, you can come close enough for your purposes by making a black-and-white image based on the satellite information you have. You can always adjust the strength with a color ramp in Blender.


why are my meshes looking the way they do please help this is bugging me a ton it looks so weird and i need this for class tommorow.

there isnt any overlapping faces so i have no idea also its not in wireframe
it looks worse the farther i go out but even up close it looks really bad.

It looks like overlapping faces to me, I've had this a lot of times. Try going to the tools bar in Edit Mode and look for "Remove Doubles". If it doesn't help, I don't know what to do. ¯\_(ツ)_/¯


Fill mesh not working? So I make a cylinder, deleted a couple of vertices, and warped into this shape.

For some reason though when I try to go and fill in the missing faces, the fill tool doesn't for me. I tried the basic fill and grid fill but none of them fill in the faces.

you can use the "f" hotkey to fill in any edges or vertexes you have selected, you could try that and see if it works.


Image Texture Automatically packed bug For some wierd reason, my images, in a specific blender file, started to pack themself automatically. I cannot explain it very well, but I know something is wrong.

This only seem to happen in my latest .blend file. I always start a new file for each object, and append them afterwards. But because this happened for some wierd reason, I also append the packed files, and they stay packed in my main scene, so it takes much more memory etc.

As you can see below. this "packed" icon shows directlty after I open the image, that is not suppose to happen.

I made two Gif showing how it looks like, and how it is  suppose to look like

How it looks like:

How it is suppose to look like:

Make sure the option Automatically Pack Into .blend is unchecked, in the File > External Data menu.


Bend curve (With Animation Nodes) Is it possible to bend an existing curve with animation nodes?
I have created curves within animation nodes which are easily adjustable ofcourse.
But I now also have to work with existing curves.

In addition for the comment of Lemon:

You take an input curve, transform certain points and output that to another target object. With Spline Info Node you can get single points and check in a loop wether they should be transformed in relation to their index or location etc., then you can transform them and smooth the result for better handles.


How to create a thick border around lines? This is a cube and I have subdivided it. I want to delete all the faces and create a thick border around the lines. I am not too sure how to do that. Any suggestions?

You can achieve this using the Skin modifier as described in How to 'skin' an edge.

Start with a subdivided cube :

Add the Skin modifier. In Edit mode, select all the edges and adjust the Mean Radius for each edge to affect the distance (use the Ctrl+A sortcut (while in Edit mode) or adjust in the properties side-panel) :

Add a Subdivision Surface modifier to smooth the surface :

Use the Skin modifier Smooth Shading checkbox to affect shading of the resultant mesh.

Note that you don't need to delete the faces since the Skin modifier only uses the edges of the original mesh.


How to capture lighting in video shots? How do I best capture the lighting in a video shot so I can easily insert rendered objects into the scene that are correctly lit?

While there are many subtleties and nuances to your question, the following should deliver reasonable results with equipment you may very well have around you or possibly borrow.

Use a DSLR and use your widest lens. The Sigma 8mm fisheye and a full 35mm sensor allows one to capture edge to edge sphere shots, for example.
Do a bracketed exposure series of your set in enough directions to cover the scene. For example, with the 8mm above, it is three directions. If you require four photos to deliver your 360 degree view, you would require a set for each exposure. Depending on your scene's dynamic range, pan to your first position and take photos at exposure, several stops down, and several stops up. -3, -1.5, 0, +1.5, +3 stops might be required, or fewer. Shoot raw to preserve as great a range as possible for each image.
Merge each bracketed exposure set together into a spherical merged image. An example might be Hugin or other such tool.
Merge the stacks of exposures into a single HDR scene referred EXR image from the layers of stitches. An example might be Luminance HDR or other such tool.

A single exposure will fail to deliver upon the "correctly lit" aspect of your question.
It is important to understand the difference between a scene referred and a display referred image here. Where a typical JPEG or such image is a low dynamic range and being bent to fit the 0..1 range, a scene referred image attempts to maintain the original scene's ratios of light levels being cast from objects. This is stored in a linear fashion and the values can range from zero to a theoretical infinity.
When a series of bracketed photos are merged into a scene referred file format such as EXR, the original values of the scene are reconstructed. These values will much wider apart than the 2.5 stops of light a typical JPG or PNG can represent1.
Granted that the above will only deliver an accurate estimation of the lighting at the given point you photographed your HDRI images. If you seek more accuracy such as a CG element nears a wall or other object, you would need to attempt to project the light values upon a placebo object to correctly estimate the inverse square law of energy (1/d^2). Project from view with some tracking might be useful here.
For further reading:

The VES technology white paper discussing the differences between scene referred and display referred data.
A solid description of the differences of file formats and their ability to represent HDR data.
Hugin panoramic and spherical stitching application.
Luminance HDR: http://qtpfsgui.sourceforge.net/

1: A middle grey card photographed and converted to a JPEG will land at approximately 48.45% value in sRGB. This translates to a value of 0.2 when linearized to display linear. If we double this, we arrive at 0.4 for one stop. Doubled again to 0.8 for two stops. 1.0 therefore can't express any greater dynamic range than a little over two and a tenth stops of light. Further complicating this is the fact that a standard camera will hold a wider dynamic range and curve this into the resulting JPEG or display referred format. This ends up baking both the sRGB curve and the camera curve into the resulting image, and it cannot be reasonably undone from these formats.


Glitch on First Frame of Animation I'm having a problem with some of my animations. My main character is an ape climbing a building. On frame 1 of the animation, the left leg gets distorted (see image). Not sure why this is happening, I did not design it this way. As an easy fix, in the Timeline, when I click the button "jump to first frame in frame range," it always fixes the problem and the leg returns to the correct position as I designed it. However, when I export the model and armature as FBX and import into Unity, this glitch appears in Unity on the first frame of the animation.

Any advice on how to fix this would be greatly appreciated.

It looks like if you parent the knees pole targets to the toes it doesn't help to bend the right way. If you parent them to the feet controllers it seems to works:


Applying roof tilles on cone shaped roof in Blender? I have problem with applying roof tile texture on a conical roof in blender. I use this image as a reference

And when I try to unwrap the cone I got this circular shaped projection which is useless with horizontally aligned tile texture.

So Is there any other texturing method or any other option to solve this problem.

Thanks a lot.

I have not unwrapped anything (successfully) before, but here is an idea. In GIMP, open your image:

At the top choose filters>distorts>polar-coordinates and set it up as shown:

It will be easier to map to your cone, and the tiles will point towards the top, but they will be longer towards the bottom I think, so . . . You can try that if you want. :D


What is Clamp Direct/Indirect? What does the "Clamp Direct" and Indirect values mean? I may seem silly but i'm really new to blender. Could you please tell me what are they useful for? Thanks!

Clamp puts a limit to the intensity of light bounced directly and indirectly by surfaces.
It can be used to prevent the annoyoing "fireflies" (random intense pixels in your render) but it is advised to avoid using this feature as it harms the realism of the rendered scene.

It is a good advice to never ever use clamping on direct, and if you're going to use indirect, keep the value rather high (close to the clipping value of the view transform you use) so you don't lose too much energy in your render and bounces and reflections stay realistic.

Using such conservative values for clamping will reduce its efficiency at preventing fireflies, but keep in mind that if you're aiming to photorealism clamping should be your last resort.


TypeError: expected 'Depsgraph' type found 'Scene' instead I have found an awsome script by @Leander to do exactly what im trying to acheive here:
https://blender.stackexchange.com/a/109468/30363
which has two scripts, the first generates an object, the second script uses that generated object to extend its mesh until it hits another object in the scene, this then produces an object which looks like a laser plane scan.
I have managed to get the 1st script to run with blender 2.83.1 by updating the python code, using this https://blenderartists.org/t/2-80-cheat-sheet-for-updating-add-ons/1148974 as a guide,
import bpy
import bmesh
from mathutils.bvhtree import BVHTree
import mathutils
import math
import numpy as np

EPSILON = 0.00001
MAXIMUM_DISTANCE = 10

object_name = 'light_plane'
radius_start = math.pi*1/4
radius_end   = math.pi*3/4
radius_step  = math.pi/256

angles = [(math.cos(a), math.sin(a)) for a in np.arange(radius_start, radius_end + 0.00001, radius_step)]

def create_mesh_obj(bm, p_name = "from_bmesh"):
    scn = bpy.context
    me = bpy.data.meshes.new(name = p_name)
    bm.to_mesh(me)

    if (p_name not in bpy.data.objects):
        ob = bpy.data.objects.new(name = p_name, object_data = me)
        scn.collection.objects.link(ob)
    else:
        ob = bpy.data.objects[p_name]
        ob.data = me
    scn.view_layer.update()
    return ob

def create_vertice_shapes(angles):
    bm = bmesh.new()
    for a in angles:
        bm.verts.new((a[0], a[1], 0))
    bm.verts.new((0, 0, 0))
    ob = create_mesh_obj(bm)
    bm.free()
#    basis = ob.shape_key_add(from_mix=False)
#    basis.name = "basis"
    return ob

ob = create_vertice_shapes(angles)
ob.name = object_name

but i have had no such luck with the second script.
import bpy
import bmesh
from mathutils.bvhtree import BVHTree
import mathutils
import math
import numpy as np

EPSILON = 0.00001
MAXIMUM_DISTANCE = 5

object_name = 'light_plane'
radius_start = math.pi*1/4
radius_end   = math.pi*3/4
radius_step  = math.pi/256

angles = [(math.cos(a), math.sin(a)) for a in np.arange(radius_start, radius_end + 0.00001, radius_step)]
print(angles)

def set_positions(ob, angles, obstacles):
    trees = []
    for obstacle in obstacles:
        bm = bmesh.new()
        bm.from_object(obstacle, bpy.context.scene)
        bmesh.ops.transform(bm, matrix=obstacle.matrix_world, verts=bm.verts)
        trees.append(BVHTree.FromBMesh(bm, epsilon=EPSILON))

    for idx, a in enumerate(angles):
        min_dist = MAXIMUM_DISTANCE
        v_loc = mathutils.Vector((a[0], a[1], 0)) * MAXIMUM_DISTANCE
        for bvh in trees:
            v = (ob.matrix_world * mathutils.Vector((a[0], a[1], 0))) - ob.location
            loc, no, i, d = bvh.ray_cast(ob.location, v)
            if d is not None:
                if d < min_dist:
                    min_dist = d
                    v_loc = ob.matrix_world.inverted() * loc
        ob.data.vertices[idx].co = v_loc

def my_handler(scene):
    ob = bpy.data.objects[object_name]
    selection = [oo for oo in bpy.data.objects if oo != ob]
    print(ob.location)
    set_positions(ob, angles, selection)

for h in bpy.app.handlers.depsgraph_update_pre:
    bpy.app.handlers.scene_update_pre.remove(h)
for h in bpy.app.handlers.frame_change_pre:
    bpy.app.handlers.frame_change_pre.remove(h)
#bpy.app.handlers.scene_update_pre.append(my_handler)
#bpy.app.handlers.frame_change_pre.append(my_handler)
my_handler(bpy.context.scene)

The error i get is
"TypeError: expected 'Depsgraph' type found 'Scene' instead" highlighted on line 24
bm.from_object(obstacle, bpy.context.scene)

Can anyone offer some assistance?

Some API changes are newer than others
The bmesh from object method requires argument 2 to be a depsgraph, not a scene, as IIRC it was prior, circa when answer was written.
Consult more recent docs, however for this stuff highly recommend using the console's autocomplete feature
>>> bm.from_object(
from_object(object, depsgraph, deform=True, cage=False, face_normals=True)
.. method:: from_object(object, depsgraph, deform=True, cage=False, face_normals=True)
Initialize this bmesh from existing object datablock (currently only meshes are supported).
:arg object: The object data to load.
:type object: :class:`Object`
:arg deform: Apply deformation modifiers.
:type deform: boolean
:arg cage: Get the mesh as a deformed cage.
:type cage: boolean
:arg face_normals: Calculate face normals.
:type face_normals: boolean

will notice depsgraph doesn't make the doc string, clearly it is an argument.
Test clean up.  Have made minimal changes to get this to run as a frame change post handler. Have used a 256 vert  "Circle" as a test object, (giving it the requirement that it have at least as many verts as the number of angles.)
The script throws an index error for mesh with too few verts...
The method is hooked up to a frame change handler, so it will do "its thing" when the frame is changing.

_An example moving a couple of cubes with the animation playing, to call (handle) on a  frame change event the mesh update with the handler code.
import bpy
import bmesh
from mathutils.bvhtree import BVHTree
import mathutils
import math
import numpy as np

EPSILON = 0.00001
MAXIMUM_DISTANCE = 5

object_name = 'Circle' # change this to your object name
radius_start = math.pi*1/4
radius_end   = math.pi*3/4
radius_step  = math.pi/256

angles = [(math.cos(a), math.sin(a)) for a in np.arange(radius_start, radius_end + 0.00001, radius_step)]
print(angles)

def set_positions(scene, depsgraph, ob, angles, obstacles):
    trees = []
    for obstacle in obstacles:
        bm = bmesh.new()
        bm.from_object(obstacle, depsgraph)
        bmesh.ops.transform(bm, matrix=obstacle.matrix_world, verts=bm.verts)
        trees.append(BVHTree.FromBMesh(bm, epsilon=EPSILON))

    for idx, a in enumerate(angles):
        min_dist = MAXIMUM_DISTANCE
        v_loc = mathutils.Vector((a[0], a[1], 0)) * MAXIMUM_DISTANCE
        for bvh in trees:
            v = (ob.matrix_world @ mathutils.Vector((a[0], a[1], 0))) - ob.location
            loc, no, i, d = bvh.ray_cast(ob.location, v)
            if d is not None:
                if d < min_dist:
                    min_dist = d
                    v_loc = ob.matrix_world.inverted() @ loc
        ob.data.vertices[idx].co = v_loc

def my_handler(scene, depsgraph):
    ob = scene.objects[object_name]
    selection = [oo for oo in scene.objects if oo != ob and oo.type == 'MESH']
    print(ob.location)
    set_positions(scene, depsgraph, ob, angles, selection)

# to debug n test clear the lot.
bpy.app.handlers.frame_change_post.clear()
bpy.app.handlers.frame_change_post.append(my_handler)

TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector'
EDIT
See Scan plane "shadow" re my take on an update for 2.8.


How do I draw on an object in blender? Tips on creating resistor I am trying to create a 3D resistor with blender, and so far I have a pill shape object. But when I try to draw the color stripes of the resistor with the Grease Pencil the color just hangs in mid air. I want that color stripe to be on the pill shaped object.

Here is what I have so far.

I would like it to look something like this.

Also, if you guys can give me some tips on how to create the wires coming out of the resistor that would be great.

Thanks in advance.

Roughly,
I built your scene. I generally use Cycles so there may be a better way in Internal, but this works pretty well.

First, add a material by clicking the (+) button. You will be presented with this page.

Make the suggested edits, such as changing the diffuse and specular colors and increasing the specular intensity from 0.5 to 0.7. You can rename the material to something like pill or resistor body.

Next, click the other plus button, the one next to the light grey drop down menu. This will give you a new material slot. Change the diffuse, specular, and intensity values for your next color (red, green, or orange according the picture). Repeat this step for the next two colors. Don't worry that they are not yet showing up on your model.

Now, press tab to enter edit mode and use Ctrl+R to add loop cuts. Do not left or right click yet. Press (4) at the top of your keyboard and move your mouse around your object until the loop cuts are positioned around the main cylindrical body.

Now left click to confirm. Change into edge select mode and select only the loop cuts you just made. It might help to hold Alt and right click on the edge. Key Ctrl+B and drag your mouse outward to create strips. Just don't drag too far. Change to face select mode. Select the faces where you want a certain color to be (using Alt+loop again), select that material in the materials panel, and click assign. You should now see a colored stripe on your model. Repeat for the other stripes.

Now tab back to object mode and change the rotation so that it is only rotated 90 on the x axis (no Z rotation.) Tab back into edit mode and select the smallest loop of faces on either end where you want the wires to be. Key E, S, Y, and drag outward to desired length. Now extrude once more, but just a little bit. Rotate each end 45 degrees on the x axis so they are pointed half downwards. Now key E, Z, and drag down a bit beyond the desired length. Tab out of edit mode.

Almost there...

Shift+A, Mesh, plane. S to scale it up. Drag down on the z so that only the resistor and the part of the wire that you want visible is showing.

Rendering

Go into the tools panel, the tools section, and shade Smooth. Drag the light over the resistor so that the shadow will cast directly down. In the light's object data panel, up the samples to 5. Set up the camera to point where you want it, up the resolution on the render panel to 100% (in the dimensions box). Click Render!

My finished result:


How do I create uvmap in order to apply texture to bezier curve I have created a bezier curve to represent a fuel bowser hose. I would like to apply a texture to the hose  and export it as a part of my project but for some reason I am unable to generate a uvmap so I can create a texture for it.
I do know how to generate and apply uv texture maps for other objects such as cubes/cylinders etc.
I am also having the same issue generating a uvmap for a chain-link fence I created (from youtube video) so I am summizing that I must have to convert the bezier curves into something else before generating the uvmap. Obviously I am missing something!
Any help is greatly appreciated.!
Aus67

Curve objects create their own UV map.  These are polar-ish coords, where the V axis describes something roughly like angle from the curve and the U axis describes length along the curve.  While export functions have their own individual rules, any export function is likely to export a curve object as a bunch of mesh verts, edges, faces with the same UV as is used by Blender.  To access this UV in Blender, just make use a texture coordinate node and use the UV output.
If you want to edit this UV, it's necessary to convert the curve object to a mesh object, which can be done with a "convert to"-> mesh operation (alt c in object mode for me.)
For cases of export, where I don't know of any engine that's going to use Blender's curve objects, there's really no reason not to convert to mesh.  Your export functions are just going to be converting the curves to mesh in the end anyways.


Part of my object doesn't show it's texture in cycles Hello, I'm a beginner in Blender and i found this problemm while trying to preview my object's texture in cycles. Part of my object doesn't show it's texture. I have checked the normals and there is no problem in it. I tried Eevee rendering and the texture shows up, it also shows up in material preview.
Maybe you guys can find some solution. Thank you in Advance :)

The problem is that you've plugged your Image Texture into the Normal socket of your Principled BSDF. It's not the way it works, you need at least to put a Vector > Bump map between these 2 nodes, and ideally it's better to use a b&w height picture, created from your original picture with a software like CrazyBump or else...


Passing data from one running instance of script to the next I am looking for the most efficient way to save data from one run of a python script to the next. My script generates a list , say presentList . The list is made up of a number of integers. Next time the script runs I want to use that list again as previousList. I would prefer that this data be written and read from memory rather than disk since my script runs quite often and I don't want to write so often to my disk. Can I use pickle with BytesIO to accomplish this? I am also using Animation Nodes. Perhaps there is a way to send the list to and from Animation Nodes to make the data persistent? Thanks for any advice on this. Perhaps this would be better asked on a python forum.

Based on the comment Omar posted I found that I could simply use the python statements setattr() to save my list and getattr() to retrieve it. In this case I stored the list as an attribute in animation_nodes as shown in Omar's example however I assume I could have stored it in any object in my scene. This allowed me to have data persist between running instances of my python script,


no module called numpy I hit Shift+F4 to get the Blender Python console.

   PYTHON INTERACTIVE CONSOLE 3.2.3 (default, Sep 25 2013, 19:38:45)  [GCC 4.7.2]

>>> import numpy
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: No module named numpy

On the web, I found some instructions that might work, that involved copying my Python3 numpy into the Blender Folder.  http://blenderartists.org/forum/showthread.php?217270-How-to-install-numpy

Install python3.2
Install numpy for python3.2 using the python3.2 command instead of python
on my system numpy was located in /usr/local/lib/python3.2/dist-packages. Copy numpy from there to blender/2.57/scripts/modules

Looking around and with help from StackOverflow In my case, copied numPy to /usr/lib/blender/modules however it still cannot find.

I may have done some of these steps wrong or not represented them accurately. This is to the best of my memory.

You need to copy the numpy installation (or any other Python package) into:

..\Blender\2.69\python\lib\site-packages\

it works with no problem.

Practice: go to the above directory and create a sub-directory these. Go inside these and create a empty file __init__.py.

In Python console inside Blender now if you type: import these it works like a charm. This is the same story for any other package.


Problem with extrude along the local axis hotkeys tell me, I'm going through the lesson, the teacher at 2.82 turns out to extrude two faces symmetrically along the local Z axis through E-S-Z-Z, and for some reason, in my case, in 2.92, E-S-Z-Z extrudes along the normals, why, and how to fix it?

If you press a key for an axis like Z multiple times after activating a transformation like Scale (S), it will cycle through a few Transformation Orientations (Local, Normal, Global, ...).
You may have set a different value in the "Transformation Orientations" selection box than in the tutorial. Check the value of this box.
The selection box is located in the top center of the header of the viewport (or at the bottom of the viewport if the header is there). See screenshot here in Blender's documentation.


How is the normal direction determined when I use "Make Edge/Face"? Very often I'll delete faces, simplify things a bit (dissolving unnecessary vertices) and make faces again by selecting vertices and using the "Make Edge/Face" tool F. Sometimes the generated faces are in the wrong direction, i.e. normals pointing inward, so I need to check and flip them manually.

My question is, how is the normal direction determined when making a face? It doesn't seem to depend on the direction/order of selecting vertices and the result is quite random.

Are there any tips to make face normals point at the desired direction so that I don't need to flip them manually later?

If you create faces connecting to existing faces, they will be used to calculate the direction. Otherwise the direction is undefined at the moment.

If you have a file that you think is making faces pointing the wrong way, I'd be interested to know, however this is more of a bug report.

The possibility of making faces that point towards the view for example, or as you suggest, using the selection order is interesting and may be added but currently isn't supported.


Bone influencing on both sides I've created a rig and added "automatic weights" to the model. The thing is, the left side bones have influence on the right side, and the right side has no influence at all. I can't even correct it by weight painting, once the left side paints the right one at the same time. Why does it happen and how to fix it?
*The image shows what happens when I move the left arm.
Thank you!

Check and see if you have more than one armature modifier. Sometimes an extra one gets created accidently and when it does, it often leads to double transformations or other weirdness.


Group is linked to an invisible point i can't delete i'm having this problem for a couple of days and i have no idea how to solve it.

I have my meshed character (hot dog), i've created my rig and now i'd like to start my skinning.  When i try to group (CTRL-P), my character links to a remote point and i can't start skinning.

You can find the .blend file here:      http://dropcanvas.com/ief1p

Any idea would be welcome...  thanks for your help

You have 2-3 empty objects, objects which do not contain any vertices.

Out of those HotyDog_CH contains a shoe object which contains a HyperNURBS object which contains Cube1 which in turn contains the actual mesh data of your character:

Now first of all, maintain a clean workspace, delete the emptys, and generally check the outliner tab and check that there are no unwanted objects, also naming your objects will make your life easier.

Second is that you have some unapplied scales which will give you lots of headaches, so before deleting those empty containers or parenting to the armature apply your scale with ctrl+A.

After that you should be able to properly parent your mesh to your armature and begin skinning. Be sure to first select your mesh, then your armature and then press ctrl+P.

Off topic:

• check your hand rigging, as it has some faulty and missing connections.

• you have unmerged vertice data, this will cause shading artifacts, enter edit mode and remove doubles  W  -> Remove Doubles.


Armature with Spline IK Constraint animation problem I've created a track with skeletal animation. I have a bone, that has Spline IK constraint, which target is bezier curve. This bezier curve has curve modifier, which target is also bezier. All I need is export animation of this track working into fbx for UE4, but after inserting keyframes, nothing happens. I also notices, that locaton and translation of bones changes only visualy after I move the Spline IK's bezier curve. I' ve tried many of variations, but nothing helps.

And this is what I have in UE.
It has a gap and it is something like skewed. It is the best I have achieve

If the track is made from pieces parented to bones:

Select all track pieces
Object > Animation > Bake Action
Check all the boxes and hit OK
Now the animation is baked and should export without problems.

If the track is single piece deformed by Armature modifier:

You will have to bake the animation of bones (same as above but bake to Pose)
Or convert it into Shapekey animation with this script. This will also export fine.


How to combine a blurred emit pass with rest of render? I am compositing a candle and I want apply some effect to only the flame. So I activated the  Emit pass so it will only be affected, and I applied some glare effects to it.
My question is how can I combine this Emit pass with the rest of the image? Secondly what is the correct order of the glaring nodes I mean by types fog, ghosts, ect?

I would use add here.
When you set the glare nodes to a mix of 1, then they only output the glare, without the original image.

As for the order of the glare nodes, I would apply them all at once.
By applying them one after the other, the next one includes the effect of the previous one in it's calculation, making the result brighter than it should be (and potentially doing things like putting starbursts on the ghost images..).

Instead apply then all to the same source with a mix of 1, then add them together:

Result:


Tips for better image quality (Video Editing) So I'm trying to edit a video with Blender and I wanted to add images to it. The images that I'm using are created using GIMP. The problem I'm having is that when I add an image to the VSE, it appears on the video but the quality isn't good compared to the original image, which has high quality. Any tips on what I can do to improve it's quality in the video?

Blender uses a fast form of interpolation in the VSE preview, which can give a jagged result.

You don't really have to worry as this won't be in the final render, but it should also go away when you view the preview at 1:1 resolution so nothing needs to be interpolated. You can jump to 1:1 zoom by pressing Numpad 1 in the preview.

Not 1:1:

1:1:


Algorithm for random distribution of circles in a square I am searching for a concept to distribute circles in a square randomly, so that they dont overlap. All circles are of the same size. The area covered by the circles can be high, up to the theoretical maximum of ca. 90 % of the square (in which they are completely ordered). About 200 circles should be placed and I want to specify the number of circles exactly. (The distribution is needed as input for a model generation of a FE-analysis, btw).
Can you help me for generate the maximum with script
Example for the distribution:
https://zoada.com/html5/brute.html

This simple script to place a number of num_circles circles with radius radiusin a refined rectangle (aligned to global axes) speficied by xmin, xmax, ymin and ymax by trying random locations until it not colliding with an existing circle. This is certainly not the most efficient way of doing it, but it should be fine for smaller problems and if the relative area covered is not too high.

At some point the script will not find a free spot anymore and throw an error. If you increase max_tries, the algorithm is more likely to find free spots at the cost of additional computation time, but the needed time raises extremely fast if you need a higher covered area. It is hard to get much higher than 50%.

from mathutils import Vector
from mathutils.noise import random, seed_set
import bpy

# Specify parameters
seed = 0
xmin = -1
xmax = 1
ymin = -1
ymax = 1
radius = 0.1
num_circles = 68
max_tries = 10000

# Init
seed_set(seed)
sx = xmax-xmin-2*radius
sy = ymax-ymin-2*radius
xminm = xmin+radius
yminm = ymin+radius
existing_locations = []
sce = bpy.context.scene
bpy.ops.mesh.primitive_circle_add(location=(0,0,0), radius=radius)
ref_circle = bpy.context.object

# Loop
for i in range(num_circles):
    j = 0
    searchOn = True
    while searchOn:
        if j > max_tries:
            bpy.ops.object.select_all(action='DESELECT')
            ref_circle.select = True
            bpy.ops.object.delete()
            raise ValueError('Found no more room for another circle')
            break
        j += 1
        new_location = (xminm + random()*sx,
                        yminm + random()*sy,
                        0)
        for existing_location in existing_locations:
            if (Vector(existing_location)-Vector(new_location)).length < 2*radius:
                break
        else:
            new_circle = ref_circle.copy()
            new_circle.location = new_location
            sce.objects.link(new_circle)
            existing_locations.append(new_location)
            searchOn = False

ref_circle.select = True
bpy.ops.object.delete()
sce.update()


How do I reduce mesh complexity? I'm still new to blender and started modelling a star ship. its basic form is a sphere with a vertically cut torus around its equator.

On that torus it has 24 plasma engine exhausts facing north, 24 on the underside of the torus facing south.

Around its sphere it has about 120 hangars and more than a 100 weapon turrets. I had to spend a lot of time coming as far as the Sphere with the engine outlets and added 24 turrets, which took forever.

Having tried a lot of versions of where and torus, starting with 64 segments and 24 rings, I had to use  1024 segments at last and subdivision multiplier to finally come up with a sphere that really looked like the ship. But now I don't know how to reduce the complexity of the mesh - sphere and torus are already more than 38 million vertices and +37 mio. faces.

Every turret adds another 1.5 mio. I´m working on an older iMac from 2011, 16 GB 1333 MHz DDR3 and a 2,7 GHz Intel Core i5. Working comes more or less to a standstill and every now and then the mac completely crashes.

I am afraid all that work so far was for nothing, as I have neither completed the ship nor started on creating a scene and animation.

Help would be very welcomed!

If you are new to blender, then start with healthier habits before they turn into vices...

One common error new users make is subdividing too early and creating unnecessary dense topology.

Not only does it make editing way more complicated than what it should be, but will push your computer to its limits very quickly, then you will run out of resources for rigging, animating, doing simulations, particles, volumetrics and, finally, for rendering. Keep it real... Computing power is limited, use it wisely.

Start with simple shapes and work with the absolute minimum number of vertices that give you the shape you are after.

Read: common pitfalls of beginning modellers

Given that you've already put yourself on a bind... use (and apply) the decimate modifier, reduce unnecessary geometry with dissolve edges and faces, and try to keep the number of vertices in check.

For elements that are repeated, model only one and use instances, arrays, dupliverts, duplifaces and dupliframes, those require less resources (read: What techniques have been used to repeat geometry or other detail to the infinite horizon?)

Softer and rounder meshes can be accomplished with smooth shading, multires, smooth and subsurf modifiers. And speaking of subsurf modifiers, avoid using large values. Hardly ever you should need more than a value of 3. Read: Blender render crash when using subsurf modifiers..

If your quest for detail is part of an obsessive compulsive need to detail things, then create a dense mesh, a normal map and use that map to fake the detail on lower poly meshes.

3d is always a fine balance between artistic goals and the realities of the available computing power.

Sorry if I rain on your parade, but you won't be able to create the prequel to the sequel to the reboot of your favorite sci-fi blockbuster movie in 8K on your personal computer... But that doesn't mean that you can't do amazing work in blender and learn and have lots of fun in the meantime! If you maximize and use your resources in a smart way and keep your expectations on a realistic level, your experience will be more enjoyable.

Three pieces of unrequested advice:

1- Optimize.

2- Don't complicate what shouldn't be complex (optimize)

3- Use detail only in the places where there is no alternative way to cheat (optimize)


Animating Gravity in BGE (2.79) I'm looking to try and implement a feature in my game where a keyboard press sensor would reverse the gravity of the scene to -9.8 any ideas on how I could do this? I tried playing around with force fields which didn't work and material force fields which didn't have the desired effect. Is there someway that I could edit the gravity value with python scripting?

Welcome to Blender Stack Exchange!

I believe Python is the easiest way to achieve what you are looking for.

If I understand you correctly, you only need to switch the value once, not back and forth, which is quite easy to do. Simply write these two lines in the text editor and save it somewhere:

import bge
bge.constraints.setGravity(0, 0, 9.8)

Note that by default, gravity is set to negative 9.8, so positive 9.8 is actually inverted.

Then, go to whatever object you want, for example the player if you have one, and add a Keyboard sensor connected to a python controller. Choose the script you just wrote, and you should be good to go.

EDIT: While the code above will invert gravity, it can't switch it back. This will explain how to make gravity switchable as many times as you like.

This is my initial setup. As far as I am aware, Python is the only way to mess around with the value of Gravity, so that's what we'll use. Make a new text file in the text editor and call it whatever you want. Since it's python code, you can end it with .py to indicate that, but it's not necessary.

In the logic editor I added two sensors connected to a python controller. The script will only have access to the sensors and actuators connected to the python controller. Then I selected the script (which is currently blank) in the menu there.

On the always controller, enable the 3 raised dots icon. This will run the script every time the game updates (I think it's 60 times per second by default). For the keyboard sensor, make sure you know what it's named.  I called it "switch" since when that key is pressed gravity will switch directions. The reason the name is important is we'll have to reference this sensor by name later on. Also enable Tap, as this will prevent weird behavior when holding the button.

I also set the cube to be a rigid body, so that it would obey gravity and we can see whats going on.

Here's the script that we can now use to invert the gravity. Note that to work the keyboard sensor needs to be called "switch", or you have to change the name in line 4 to the name of your sensor. Either works just fine. Anything with a # symbol in front is a comment, and is only there to explain what's going on.

#Tell Python to get access to all the BGE commands that are built into Blender
import bge
#Tell Python to access the controller that is running the script.
cont = bge.logic.getCurrentController()

#Tell Python to look for a connected sensor named "switch"
switch = cont.sensors["switch"]

#If the "switch" sensor is activated, run the code after the colon.
if switch.positive:
    #Tell Python to get the current gravity values.
    grav = bge.logic.getCurrentScene().gravity
    #Tell Python to set the gravity to the same values that it just got
    #but make the z axis the negative of whatever it was.
    bge.constraints.setGravity(grav[0], grav[1], -grav[2])

You can stop here, but I explained how the script works a bit so you can figure out how to change gravity further in the future if you like.

This script waits for the space bar to be pressed. When the space bar is pressed, the bge.logic.getCurrentScene().gravity gets the current gravity values on all axes and stores it in the grav variable as an array. An array is simply a list. It would look something like this:

[0, 0, -9.8]

This means gravity will not move things on the x or y axes, but will on the z axis. Since we assigned this to a variable, whenever we now use this variable, it uses the array that we assigned to it instead.

Now all we have to do is set the gravity, but invert the z axis value. The bge.constraint.setGravity() lets us do this. We just need to tell it what values to use. We can tell python to use a value from a certain place in an array by giving it the array, then the index (the first number is at position 0).

We can plug these into the command above. grav[0] is the x value of gravity (0), grav[1] is the y value (also 0), and grav[2] is the z value (-9.8). Since we want to flip the gravity, we just tell Python to set the gravity to the opposite of what it currently is.


modeling repeating patterns onto a curved surface I'm in need of help. I am trying to create a curved object that needs to have a repeating honeycomb pattern modeled into it. I tried a lot of stuff already but I don't get anywhere near a good result. I have a picture of a very similar model (not by me obviously) that I am trying to recreate.

Any help would be greatly appreciated.

Create a Mesh Cylinder and set the number of Vertices to 6, then add a Solidify Modifier.

Then add an Array Modifier with Merge checked

Add a second Array Modifier and set the Constant offset (and Merge)

Add a Curve, here I have added a Bezier Circle, set to non-cyclic, rotated 90 on the X and scaled up.
Add a Curve Modifier to your Cylinder stack and use the new Curve as the Object.

Obviously you can set the curve relevant to your requirements but that shows the basics.


Node Setup to Adjust Colour And Distort Material On Object I have set up PBR materials of a wooden floor. I'm trying to connect 2 set of nodes, one which can manipulate the texture of the wood ( stretch it, distort it), and the other group which can affect the colour of the wood, ei make it Red, Green, etc etc. I'm confused how to get the noodles set up.
Thank you.

You can set it up like this. Start with the same texture coordinate (UV) for all of them, but use separate mapping nodes for the sections you want transformed (stretched, etc).

If you simply want to mix the original basecolor (of the image) with another color, use a MixRGB node. I often use "multiply", however try different mix settings to find one you like.


How to make emitted particles disappear when they hit a surface? I'm wondering, how to make emitted particles disappear when they hit a surface? Is it even possible? The Boolean modifier (Difference mode) doesn't seem to work...

My question came after watching a (nice) Dereck Elliott tutorial. He creates the boat splashes with particles, you can't see the particles going through the boat because the boat is closed, but if it was open, how to fix this?

Using the Lifetime can only work if the 2 surfaces are parallel.

Thanks in advance.

On the object that should make particles disappear when they come into contact with it, set the 'Kill Particles' option after enabling 'Collision' on the Physics tab of the Properties editor:


Can edge loops be aligned equidistant? In a situation where many gaps need to be aligned I wonder whether there is some function (or addon) which allows to align two edge loops equidistant or edge by edge in parallel?

The image below has a green line and the vertices opposite each other (y-axis) should have the same distance.

After double tapping G with an edge-ring selected, you enter edge-slide mode now press E to access a model operator that attempts to align the edge-ring with either of the neighboring edge-rings.  You can choose which parallel ring to align with by pressing the F key.

Note that that the header also shows the keys:

The same thing works for Loop Cut and Slide Ctrl+r, the only problem this function is that it works best for meshes that are uniform along all three axis.  If the object is really long along one axis; the edge-align tool will behave as if the Object has non-uniform scale even if it does not.


How do i have my fire simulation have a better framerate/ quality? I'm relatively new to blender, so I do not know entirely how to use it. I followed a fire simulation tutorial to a tea, however my frames would only go to 8 frames per second and the quality of the fire is very poor. How would I go across fixing it?

Depending on your GPU, the frame rate in the viewport will reduce when previewing a fire/smoke simulation.  To make the fire look better, you could turn on “noise” and increase the number by the render label but remember to keep the number in power of 2, that usually works for me


How to attach parts of one model to another i have a 3d model, i want to swap it's feet and head with another 3d model.
i imported both models, selected the parts, moved them to the desired position, pressed control + j to merge them.
but now it looks weird, it's so obvious that the feet doesn't belong to this body

i tried to fix this in sculpt mode but ended up making it look worse, so sculpting is either a wrong tool for this situation or i don't know how to use it currently.
can someone Please help me fix this problem?
thank you

In your case you can delete a lot of useless edge loops on your foot, you'll have the amount of vertices that will allow you to make the joint with your leg. As long as you choose the good edges it won't affect the shape of your foot. To do so you'll have to dissolve some edges, use the knife to create some edges between vertices, and at last merge the vertices of foot and leg. And don't forget to delete the face on the bottom of your leg.


Fac input in Blender I understand fac to represent the percentage of the second shader to be applied. I recall seeing examples where the fac value is set 1.0 and still there a node connected to the first shader input. With fac being 1.0 the first shader input should not be even considered, what is the use of doing this?

One of the big uses for this is for keyframing the Fac: value. In Blender, you cannot keyframe Node Tree Connections, so instead, you might have to fake it by keyframing a Fac: value.

Say that you have an animation, and you want your object to be there, be there, be there, and then suddenly be gone. Well, your first try might be having your shader connect to your Material Output and then keyframing a Transparent BSDF jumping to the Material Output connection at some point. That can't happen, though, so you can have your material and the Transparent BSDF fed into a Mix Shader, and keyframe (I while hovering over the Fac:) it to turn from 0.0 to 1.0 at a certain frame.


How to extrude from a square shape to a circle shape? This is roughly the shape I want to make but in 3D. I want to extrude some shape, e.g. a plane, into a circle. I tried using the Curves to Mesh plugin but it didn't work for me because I had an older version which doesn't have a "sweep to mesh" option.

I believe the tool you want is bridge edge loops, but you may have to subdivide the square loop first, so it has the same number versus as the circle loop.


camera orthographic/perspective How to make orthographic view to be constant (as in 2.78)? "num 1" turns the view into front orthographic position but after rotating with MMB the view is perspective again.

The behavior of the viewport, reverting to a perspective view from any of the set orthogonal views, is a User Preference, and can be set here:

The 2.7x system of layers and render layers has been entirely replaced with Collections and View Layers. which are much more flexible, and in the end, easier to use. Beyond the manual,  there are tutorials out there.. I hope this helps by giving you productive search terms.


How can I parent a plane to only the y-position of my camera? I have a sand dune scene with an image on a plane as the background. I'm ready to animate my camera with WASD controls, but in order to give the background the illusion that it is really far away, I need to pin it to the camera movement, kinda like what ducky3d did here with the sun in his scene.
The difference is I want to be able to more freely move the camera, but when I do it like the example in the video, the illusion doesn't work because the plane then becomes parented normal to the camera's movement in all degrees of freedom.
I want to be able to parent the plane only to the y-movement of my camera, while being able to move the camera in any way I want. Here are some pictures of my camera view and a screenshot of my scene.

Using the Copy Location constraint on the plane, selecting camera as the target, checking the box for Y and Offset! Works perfectly!


Move rigid body gear using particles So I was trying to make a particle simulation where the particles collide with a fixed gear that rotates when the particles collide with it.
The gear

As you can see I have locked the locations of the gear and limited the rotation to the Y axis only in the transform locks in the object settings, I also added rigid body active and collide physics to it (collide because I need the particle system to collide with it).
Without the particle system

The cubes are active rigid body objects that also have the same transformation lock settings as the gear, and the groundfloor is a passive rigid body. In this case we can clearly see that the gear rotates when colliding with the cubes
Now with the particle system

I added a plane and added a particle system to with the particles set to object (Cube), as you can see the particles surely collides with the gear but the gear doesnt rotate like it did previously when the same thing was done with cubes.
So how do I make the particles collide and rotate/move a rigid body object ?

I was just looking into this over the weekend. I believe a recent tutorial on Vit Prochazka's youtube channel has the answer you seek. I'd love to try and explain it here, bit it is quite convoluted and it requires the Animation Nodes add-on.

Seems an elegant solution though, I hope it helps:

https://www.youtube.com/watch?v=G1ysjPeLKSQ&t


Rendering with FFmpeg vs PNG formats I've noticed while rendering with FFmpeg format, the rendering gets finished a lot quicker than in PNG, but I might be wrong. Which format should I use?

FFmpeg is not a format.
It is a suite of libraries and programs used to create files using different containers and codecs, used mostly for video files.

PNG is a file format in which you can save images.

Which one to use depends on your needs.

Usually when creating animations or video it is recommended to render as an image sequence and encode to video later. That way, if the render stops or fails, you don't lose all of your work and you can try a different encoding and format until you find the one that works for you.


Remove reflection of one object from another object? I have a reflective object and I want it to reflect only light and not the surrounding objects.

I have moved it to Layer 2, but it still reflects the objects from layer 1. What should I do to prevent objects on Layer 1 from casting reflections on objects in Layer 2?

Cycles:

Set the renderlayer with the reflective object to Exclude layer one:

Now objects on layer 1 will not have any affect on layer 2.

Example .blend

Blender Internal:

In BI this is more complicated, because it appears to be impossible to separate reflections into separate layers with BI.

In other words, you can either reflect every object in the scene, or reflect nothing (no selective reflecting). You might be able to do something with the Material Index pass, but with even a simple scene it becomes complex quickly.

As a workaround, you can use multiple Scenes.

Create a new scene in the Info panel by pressing the +:

Select one of the options. You probably want Link Objects, but check the wiki for an explanation of each option.
In the new scene, setup a renderlayer that only renders objects on layer 1.
Back in the first scene, setup a renderlayer which has only the reflective object. Put objects you do want to reflect on a different layer, but in the same scene.
Mix the two scenes with an Alpha over node:

Example .blend


Can't change base color of icing following blender guru in his donut tutorial i found a problem with donut. i simply can't choose an ordinary color it shows me some options to choose from

You have plugged the Color output of an Object Info node into the Base Color of the Principled BSDF. I would suggest you switch to the Shading workspace to properly see the nodes in the Shader Editor. Then unplug the incorrect node connection and adjust the Base Color to your liking.
Alternatively, if you want to only use the Material Properties instead of the Shader Editor, click on the Base Color like in your screenshot and select Remove.


Restricted camera view Why is the rendered area (the red rectangle) in the pic below so small?

How do I resize it to fit the entire viewport?

CtrlAltB will remove the render border and render every part of the viewport. To set it again use CtrlB, but if you are in camera view, it will be constrained to the camera's view bounds.


Help with Axis Placement when extruding I am just learning Blender.
I am going through the second part of the coffee mug tutorial on YouTube.

The first part was good. I was able to follow it. Coming from SketchUp, it is taking some adjustment. But I am getting it.

I am just starting the second video. At the beginning, the instructor selects the top of the mug to extrude it. When he presses the E key and Enter, the red, green blue axis moves to the center of those vertices. That does not happen when I press the E key and Enter.

This is only 1:30 into the video.

How can I get the axis in the middle of this circle of vertices?
The next step is to scale. I need the reference point in the middle of this circle of vertices. I cannot left-click accurately enough to position the axis/reference point.

I am using 2.69. The video uses 2.64.

Make sure the Pivot point is set to Median Point (⎈ Ctrl,) or Bounding box center (,) in 3D view > Header:


Permanent Weight Paint [![Permanent Weight Paint][1]][1]

I have a human metarig on a playermodel

I am having problems removing weight paint errors -> I am moving the armature and then editing the weight paint, yet some points of contact still do not go away (while editing w/ weight 0.0). They show up blue but move with the armature, so my playermodel is deformed.

Also some parts of the playermodel have weight paint that I cannot change and these do also move with the armature. I have seen this with the playermodel's teeth and ribs (they have a color of pure red, weight 1.0) but attempting to change teeth and rib weight paints and\or moving the armature then attempting to re-do the weight paint doesn't remove the problem.

The problem is you have to edit your vertex group.

go into edit mode and hit the vertex groups tab.
then see all of you vertex group and experiment by means of randomly selecting vertex groups by clicking the 'select' tab while in the vertex groups sections in the properties window.
when you see a mesh that has vertices scattered and not in the location you want them to be, click 'remove' tab so blender will erase all vertices that were assigned to that group.
next group the vertices that you want to  be grouped(do it logically).

ex: hand vertices grouped, then called 'hand verts'. Head vertices grouped and called 'head verts'(or whatever you prefer).

now that your veticies are logically grouped, go into weight paint mode and commence weight painting again. (your problem should be fixed).

p.s update me if that doesn't work, or if your having issues.

happy blending!


Exporting .blend adds an "emissive" value even without emission shader When I export my object from Blender, it exports with an "emissive" property under materials with a value of [0.8,0.8,0.8]. I cannot for the life of me find how to set this value to 0. When I'm viewing the object in the 3D viewport, I am able to see it even with no light source, which sort of confirms that the object is somehow emissive. As seen below, the Emit property is 0, so I'm not sure if this is like a texture thing or what.

The problem exists regardless of Blender Render or Cycles Render.

Here's my .blend file: https://ufile.io/i5z2f

Here is a screenshot of my material properties:

Any ideas?

Here's a JSON version of the FBX with the problematic emissive value:

{
        "id": "Material.002",
        "ambient": [ 0.000000,  0.000000,  0.000000],
        "diffuse": [ 0.800000,  0.800000,  0.800000],
        "emissive": [ 0.800000,  0.800000,  0.800000], // needs to be 0,0,0!
        "opacity":  1.000000,
        "specular": [ 1.000000,  1.000000,  1.000000],
        "shininess":  0.000000,
        "textures": [
            {
                "id": "Texture.003",
                "filename": "FlakCannon_D.png",
                "type": "DIFFUSE"
            },
            {
                "id": "Texture.003",
                "filename": "FlakCannon_D.png",
                "type": "SPECULAR"
            },
            {
                "id": "Texture.003",
                "filename": "FlakCannon_D.png",
                "type": "REFLECTION"
            }
        ]
    }

Info:
Blender version: 2.79
FBX Export Addon: 3.7.17

Looking at the JSON file, it looks like you use LibGDX fbx-conv tool.

I'm facing the same issue and i can confirm it's not related to Blender FBX exporter. More information and workaround can be found here : https://github.com/libgdx/libgdx/issues/5529


Will additional lights make an object appear strangely colored? At one point during Blender Guru's lessons I became a little brave and added 3 point lights.  I added them because I could not see the extremely dark renderview and render.  When I brought back my donut to see how pretty it would be, the sprinkles are colorful but have a dark greyness to them, they look bad now.  Then, the pink icing was perfect.  Now it has kind of an orangish grey color to it and the donut itself looks orange.  Before I delete those lights to see if my pretty donut returns, would adding those lights change the color of my objects?  These 2 images are before and after.  It took me forever to get those lights into there.  I tried an experiment with just a cube and a bunch of lights but nothing happened, it stayed the same color.  Also, in the second pic I have the box in the overview unchecked and the eye unchecked on everything except the donut.  Everything gets rendered no matter how many hide buttons I use.
[

Yes, I think the additional lights are making the objects darker.  I moved everything to a different area, not moving the lights, and the color is coming back.  To me this makes no sense.  More lights should wash it out shouldn't it?


I want to smooth hard edges without effecting other in close proximity I want to smooth the edges in the red circle but I also want to keep the blue edge rough. I also want to smooth the blue edge along the horizontal line so the sharp cuts between the edges disappear.

Marking the hard edges as Creases solved the problem.


How do I change active grease pencil palette color via python? I am making script that makes new gpencil stroke and changes the color of it to colors that already exists in palette.

Problem I'm facing is that bpy.ops.gpencil.stroke_change_color() operator only changes color of selected strokes to selected color! And I have no way to select colors in palette by python script.

I don't want to make new colors because I want specific line color, fill color, opacity. Plus, I don't want to make piles of same colors in gpencil palette.

You can change the color of a specific color in a specific palette using this:

bpy.data.grease_pencil["GPencil"].palettes["GP_Palette"].colors["Color"].color = (1, 0, 0)


Find commands by name in blender 2.80 beta? Find commands by name

The question is very similar - where is this search popup in 2.80 beta and how to call it? Suggested Spacebar doesn't work

I opened Preferences and found a search popup in it with F3 keyboard button.

But this menu is different or I don't understand how it work...

Example

Loop Cut and Slide in Blender 2.74

Command "Loop Cut and Slide" exists but search menu called with F3 doesn't contain it (in other words I can't find a command from this picture). Or is it just a bug?

Are you sure you have the mesh selected and that you are in "edit mode"?
Otherwise the operator will not show up.


OBJ import disappears behind 'screen' when zoomed out I'm a newbie but am familiar with CAD and modeling.

I have a strange thing happening after I import a .OBJ file into Blender from IronCAD.There appears to be a vertical plane in the 3D modeling space that cuts through the model when I zoom in and out. I'm not able to see the whole model because I have to zoom in too close for the model to be in front of this strange plane...

Has anyone encountered this before, or know how to get rid of it?

Cheers,
Mike.

It might be because your object is extremely large, as far as Blender is concerned. Try scaling it down, applying the scale, and see if that fixes it.


Scripting the modeling of a plane world map I'm trying to achieve exactly the same as is described in this blog post, except that I need a world map with countries extruded. Unfortunately, it is not provided.

I'm new to blender and I'm really astonished by the result. However, I'm a bit surprised that one has to do all this by hand, map data being openly available with python support. Wouldn't it be possible to script all this?

I think the easiest way to do what you want is to find a map in SVG format that has the elements you need.

Import it into Blender.

(If you don't have the Imprt as SGV menu available you need to enable the addon in the UserPreferences CtrlU)

The map will be a series of curves that you can then extrude at will

using the controls for extrusion on the curve tab.

The naming for the curves is inherited from the naming of the curves in the original SVG file. You might want to edit that in Inkscape or Illustrator before bringing those over to Blender, or maybe you are lucky enough to find a SVG map that has the naming already done!


Texture Baking in Cycles, I'm getting no Colour I'm trying to bake some materials to use in Unity.

However the baked image textures do not capture the colour of the materials.

Plugging my procedural textures and image textures on to a diffuse shader node before mixing fixed the problem I was having.


Particles don't follow curve I'm trying to create a traffic simulation with the particle system. I want to create a lot of cars that walk along a path...I'm just following this tutorial :

The problem is that when I setup the force field type to curve guide,the particles don't follow the nurbspath,but in the tutorial they do. Can u tell me why ?

You can get the Blender file here

There is couple of thing you should do.
1. Switch direction of your path
Enter Edit mode and in N-panel find Curve Display -> Normals, make it bigger to see actual direction of the curve. You need to keep direction "from the particle system". So select every vertex and hit W -> Switch Direction
2. Participant elements of Particle Physics have to be on the same layer
Right now your Particle System and Curve guide force are placed on different layers. Move the Curve on the same layer where Particle System is.
3. Check "Path Animation" option in curve's settings
Curve guide force will not be working without enabling this thing


How to render a video with audio in Blender 2.80? When choosing AVI JPEG, the resulting video won’t have audio.
And when choosing FFmpeg video it only renders a black image file.
Can someone say how to have audio with AVI JPEG, or how to render an actual video file with FFmpeg video?

Thanks guys

I added a Speed Control effect modifier, and I synched the audio and the video strips, and that seemed to have done the trick. Now the video is rendering.


(BGE) Track To Actuator only works when crossing the track axis I have a game I am currently making, and I want to make enemies that will face my character then shoot. I was able to do this easily without even needing Python scripts, but I have one problem; My enemy will only face my character after passing the enemy's y-axis (That's what the track axis is set to.) I have a ray sensor to track the same axis as the Track To actuator's track axis (once again, Y). I would like to make the Track To actuator start tracking the moment the enemy is created (as of now it's when the game starts) rather than when the player passes in front of the enemy. Anyone got a non-complicated way of fixing this issue? Anyone got ANY resolve for this?

You want to start tracking when the object is created -> activate the TrackToActuator with an AlwaysSensor.

Be aware the ray sensor measures along local axis. This means it turns with the object. The Sensor will only evaluate positive when detecting an object (= must block the ray). In other words tracking starts after seeing an enemy.


how can I control undewater sunbeams in Blender Cycles? I'm trying to make an underwater render in Cycles and I was wondering if there's a way to control the sun rays, like the position, direction and quantity without affecting the overall lighting too much (the underwater objects need to be clear and not in dark spots).
I'm using a volumetric cube and a plane with the ocean modifier for the surface.
For lighting I want to use an hdri, and a light if it's necessary for the sun rays.

Sorry I forgot you used Cycles.
If you used Eevee, would this be of any help?

In my opinion, rendering Cycles volumetrics can be very time consuming. In some situations, it might make sense to composite Eevee volumetrics on top of Cycles renders.


ASCII FBX files are not supported When attempting to import an FBX file that is ASCII encoded, it produces an error "ASCII FBX files are not supported" requiring the files to be converted to hex before import.

The only solution I can find for this is to either get 3DS Max which has an FBX converter, or re-save the file in Visual Studio (which saves them in hex).

I don't have 3DS Max, I do have Visual Studio - but, I need to convert hundreds of FBX files which would take several hours to manually re-save them all through Visual Studio.

Is there any batch method?

You can use the free Autodesk Fbx Converter to batch convert multiple fbx files to various formats. It comes with a cli command which can be used to automate the conversion. I tried but couldn't find any FOSS alternatives to it.


Subdivisions View parameter using Multires or Subsurf modifiers no longer increases object resolution I can no longer augment the SUBDIVISIONS> VIEW parameter, to increase how the mesh looks on-screen, using the subsurf or multires modifiers beyond "2". Raising the parameter above 2 has no the object's representation. I do remember being able to raise this parameter to obtain perfectly smooth objects. What am I missing here? Is there a setting that's off? See the images below:

It looks like you may have enabled the 'Use Simplify' option found in the 'Scene' tab of the 'Properties' area:

This option works as a 'cap' on the number of subdivisions that objects in the scene can have if the simplify subdivision level is set lower than the subdivision level on your objects.

So a simplify subdivison level of '2' will mean that no subsurf modifiers will be able to subdivide objects higher than level 2. Setting it to zero would effectively turn all subdivisions off.

It can be useful when you have a very dense scene, with many subsurf modifiers and want to render it quickly as a test.


Can't Remove/Detatch Bones/Modifier/Vertex Group I'm trying to rig and god is it a nightmare.

I need to undo some bone attachments that I did because they pull the wrong part of the mesh except blender is not build with backtracking in mind. (ex : Ctrl-Z is not an undo shortcut it's a crash shortcut).

After giving up on undoing bone attach, I am instead deleting bones.
this is however proving to be another can of worms because I have to delete :

Bone per mesh
modifier per mesh
vertex group per mesh

the repetition I can deal with however I cannot for the life of me delete vertex groups.

I can't figure out how to use this script I downloaded :
https://gumroad.com/l/Gxkbp

I have it installed an enabled but I still can't find where the context menu for deleted vertex groups is.

I just need to delete those goddamn vertex groups so I can get on with my life and finish rigging this tank with 7 meager bones that I've been trying to rig for thee days straight.

You can either do it with a brush in Weight Paint mode, or in the Properties panel > Object Data > Vertex Groups, select the vertex group in the list, select the vertex you want to remove in the 3D view, click on Remove button under the list.

Note that on the right of the vertex groups list, under the + and -, you have a down arrow that gives you additional functions, like Remove From All Groups.


How to add edge in a cylinder so that only the end can be scaled? How can I split the cylinder so that I can scale only the end of the cylinder, like in the bottom image. (Not to scale all of the cylinder.)

What I have now:

I want it as such:

You can either add a loop cut, or cut the cylinder with the knife tool, or move your current end and extrude another edge to make it longer.

CtrlR is the keyboard shortcut for adding a loopcut.

To add a loop cut simply press CtrlR then LMB  (to confirm the count of one new edge) then move the edge down to the end and LMB  again to confirm the spot.

K is for the knife tool.

To use the knife tool you are going to want to press
Z after you started the knife tool, to enable "Cut through." Then after you made the cut press Enter or Space to confirm and leave the knife tool.

To extrude a new edge, first select your current end now press GG for the edge slide tool, move the end to where the taper starts.

A little trick to get the new extrusion along the same normal, press F to create a face. From that face blender will be able to continue the next extrusion along the exact same angle.

Now press E to extrude a new edge, simply LMB  when it is in the correct spot.


How to resume baking fluid simulation? It happens sometimes that after finishing bake (e.g., for fluid simulation) we wish we could continue the simulation for two more seconds :(

How to use the cached bake to continue the simulation?

We played with the settings, but with no success.

The domain simulation of doing bake can't be resumed, it always starts from 0. Offset is for holding or use the cached animation later.


Render a cut through a mesh I would like to render a cut through an object using Freestyle. Is there a neat way to cut away a part of the mesh in the rendering (not for real) without using

The cut tool (manipulating the mesh)
Cutting the mesh with the camera (placing an orthographic camera inside the mesh) but limiting view options
I got the boolean modifier to work with a remesh modifier as well, making things more complicated.

I was looking for something similar to the AltB option in the viewport. Or setting up a material on another object to render the intersection part invisible but leave the rest of the mesh visible.

One way of doing this without modifying the actual mesh at all is to use a texture to define the transparency of the mesh:

Cycles:

To create something similar to the AltB option, you could:

UV unwrap using U> project from view:

Use the UV coordinates to define the transparency of the mesh by using this nodegroup:

Blender Internal:

Enable Z transparency in Material settings → Transparency, and set alpha to 0:

To make the texture to affect the transparency of the material, enable Alpha in Texture settings → influence:

Another way to do this is by modifying the mesh only when rendered.

e.g with a boolean modifier:


Import After Effects Camera Motion into Blender? I just got Adobe After Effects CC with Cinema 4D lite.  I use Blender for 3d animation and I don't want to switch to C4D. Is there any way to export After Effects camera movement to Blender?

There is a script by Atom that uses Javascript to accomplish this. The full thread to download, and very clear instructions on how to use it are here in blenderartists.org


Blender won't finish rendering When i try to make my intro, my blender keeps on rendering and then when it's done, it starts all over repeatedly. I waited a while and it keeps on doing the same thing for like an hour.

As said by Bithur in the comments, it is quite possible that you are rendering an animation. Stop the current render with the Escape key. Then press F12 (make sure that you don't press Control+F12 by accident!), or go to Render -> Render Image from the toolbar.

If it continues to do the same, go into the render settings and make sure that Sampled motion blur is unchecked. If even this doesn't help make the render finish, uncheck Anti-Aliasing (I am not really sure this will help, but you can try...).


How to create a keyboard shortcut to call a custom menu in a floating window with Python? This is very simple script example from Blender templates:
import bpy

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

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

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

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

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

if __name__ == "__main__":
    register()

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

All I care about is the ability opening the menu in separate floating window without need to go thru menu all the time, as I have my own code (add-on) and trying to implement this (no success yet - I am still scripting newbie, so you know).
Thus merit of my question is: how can we make what line bpy.ops.wm.call_menu(name=SimpleCustomMenu.bl_idname) is doing with hardcoded keyboard shortcut right in the script itslef?
Like: when I press, let's say, Shift+Q it would open that small floating window with my menu - anyone with a working example script based on the code above?
I DID TRY several ways, but still I was unable making it work, that is reason why I would like to see actual working code, not just some kind of statement (I saw such statements already and they were of no help at all to me).
EDIT: I reformated my question so it would be clear to everyone what I mean (sorry, english is not my native language)

Just set the keymap item identifier to WindowManager.call_menu and assign bl_idname of the menu to the name property. Basic example on how create a shortcut to call a menu using CtrlW:

import bpy

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

    def draw(self, context):
        layout = self.layout
        layout.operator("wm.open_mainfile")
        layout.operator("wm.save_as_mainfile")

addon_keymaps = []

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

    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', ctrl=True, shift=False, alt=False)
        kmi.properties.name =  SimpleCustomMenu.bl_idname
        addon_keymaps.append((km, kmi))

def unregister():
    bpy.utils.unregister_class(SimpleCustomMenu)
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

if __name__ == "__main__":
    register()

Related: Create keyboard shortcut for an operator using python?


How do I get out of a Blender 2.77a Windows 10 infinite loop after setting a .jar default app setting by mistake? After some trubosquid downloads, I kept getting a "make default app" for .jar files notice. I clicked okay just to get it to go away. Now when I open Blender 2.77 on my Windows 10 machine the command prompt goes into an "invalid syntax" loop and opens blender window after blender window. It does not do that when I use 2.69 or older versions, but I tried uninstalling and reinstalling 2.77a and the problem persisted. Will changing the default app for .jar files work and how do I do that? What alternative solutions are there?

I just found a tutorial on getting into hidden files on Windows 10, like Appdata. From there I just manually deleted all the plugins and reinstalled Blender. It works now.


Cycles - Skybox using 6 projected images I have generated 6 images that are of a sky projected onto the faces of a cube from the viewpoint of the centre of the cube (ie. a hopefully seamless skybox).

However I am having issues adding this texture to the world material. I have tried adding the images to the background via an Environment Texture but am unable to get anything even remotely close to looking correct.

Here are my problems:

The world material seems to be applied to a sphere but I want it to be a box (the program I am using to generate the sky generates a box)
I don't know how to stitch my images together for use in the world material
I'm not sure I'm even going about this the right way

I have searched and searched trying different things for most of the day so far but am coming up blank.

Blender's environment texture in Cycles only supports Mirror Ball and Equirectangular image map types. You cannot use a skybox texture directly.

Some of your options are:

Convert the skybox image to one of the other 2 formats in a third party image convertor.
Set Blender native environment to pure black. Create a large cube object that surrounds your scene, UV unwrap and add the skybox image texture to that object.
Find a new sky image in Equirectangular or Mirrorball format and use that instead

Blender's internal render engine (BI) does seem to support additional mapping types (Object, Tube, Sphere, Global). Perhaps you could use the Object mode to base the mapping on a cube object but displayed as the world environment. I've not tried or tested that technique though.


Hair show face's normals my hair simulation shows what appears to be triangles over the surface which are, from what i assume, the face's mesh showing through the hair for some reason.

This is still visible with subdivision modifier, only way i can make them disappear is if i subdivide the actual mesh a couple times... which is not really performance friendly when animating stuff. What's the best way to not make these faces/edges "visible" ?

The subdivision modifier needs to be placed after the particle emitter in the modifier stack. Place it before, using the up arrow, and it should be fine:

Edit: Actually the object faces still influence the emitter even with a subsurface modifier.
But setting the object shading to smooth should do the trick:


Blender - solve this shading difference? Ok, I currently have a shading difference due to some bad topology and overlapping faces:

I don't want to change the topology if not necessary as I've already textured the mesh, but I need to know what the easiest solution is to minimize the difference in shading.

Is there something I change with normals/settings/etc?

Im in 2.8

Those look like two entirely separate objects with geometry overlapping. There is no way to fix non-continuous shading between different objects except for overly-elaborate normal maps. If they're part of the same object, hover over one mesh and press L in edit mode. If only whichever part of the body you've hovered over lights up orange (it's then selected), that means you can't fix it until all of the vertex points where the meshes intersect are joined, at which point you'll be able to smooth the normals.


What is going on with selection? New scene.
Enter edit mode.
Use the bisect tool to slice the Cube.
Only the new vertices appear to be selected.
Enter object mode.
In the console:
# check what vertices are selected in the Cube mesh
verts = bpy.data.meshes['Cube'].vertices
for v in verts:
    if v.select:
        print(v)

<bpy_struct, MeshVertex at 0x0000021439A0ABD8>
<bpy_struct, MeshVertex at 0x0000021439A0ABEC>
<bpy_struct, MeshVertex at 0x0000021439A0AC00>
<bpy_struct, MeshVertex at 0x0000021439A0AC14>

# de-select all verts in the Cube mesh
for v in verts:
    v.select = False

# check to make sure they're de-selected
for v in verts:
    if v.select:
         print(v)
# no vertices

# switch to edit mode
bpy.ops.object.editmode_toggle()
{'FINISHED'}

# something is strange. vertices appear to be selected now.

# switch back to object mode
bpy.ops.object.editmode_toggle()
{'FINISHED'}

# look through each vert to see if it is selected
for v in verts:
    if v.select:
        print(v)

<bpy_struct, MeshVertex at 0x0000021439A098D8>
<bpy_struct, MeshVertex at 0x0000021439A098EC>
<bpy_struct, MeshVertex at 0x0000021439A09900>
<bpy_struct, MeshVertex at 0x0000021439A09914>

It seems like switching to edit mode selected vertices.
Except these are different objects than they originally were,
despite being the same vertices.
Is this a bug?  If not...what is going on?  Why does selection get reported as one thing, and then revert to a prior state when switching to edit mode?  How can the vertices displayed on screen be different objects each time they're reported?  How can I prevent this?

4 edges are also selected.
Have noticed this too.
Remember that after the bisect as well as the four selected verts, there are 4 selected edges.  Even though you deselect the verts, the edges aren't picking this up, so when re-enter edit mode the verts of the selected edges are selected.
To make sure nothing is selected deselect the lot.
Bmesh has a select flush for this, and now a select_set to validate selection.
How does Blender know which faces and edges to automatically select when doing a multi-vert selection?
PS. A copy of sorts of the mesh is created when entering edit mode, and written back when exiting.. or calling
ob.update_from_editmode()

hence the different memory ref.
EDIT re edit and unaccept.

An answer below says that this is happening because there are edges
selected. And it doesn't happen if I use this same approach to select
edges. However,

which at the time of posting can assume is this answer... test on plane (no geom selected, in OBJECT mode)
>>> ob = C.object
>>> me = ob.data
>>> C.mode
'OBJECT'

if I start from having no components selected

>>> [v.select for v in me.vertices]
[False, False, False, False]

>>> [e.select for e in me.edges]
[False, False, False, False]

then select the same edges

Edge zero by way of example.

>>> me.edges[0].select = True
>>> [e.select for e in me.edges]
[True, False, False, False]

>>> [v.select for v in me.vertices]
[False, False, False, False]

then enter and exit edit mode,

>>> bpy.ops.object.editmode_toggle()
{'FINISHED'}

>>> C.mode
'EDIT_MESH'

>>> bpy.ops.object.editmode_toggle()
{'FINISHED'}

>>> C.mode
'OBJECT'

the vertices remain unselected.

>>> [e.select for e in me.edges]
[True, False, False, False]

>>> [v.select for v in me.vertices]
[True, False, True, False]

So it's not just about having the edges selected.

Sure appears to be the case to me.


Solidify thickness problems I have an outfit that I am trying to give thickness with solidify. There are 3 related problems I am running into:

1) Solidify size can be controlled by a vertex group, but if set to 0, it still makes the new layer of faces, just with no distance between them and the old. I need different amounts of thickness in different areas, and in some places, I need no thickness. In crumpled areas with very small or no thickness, the back faces of the new layer clip through.

2) I have a huge amount of unnecessary double verts in areas that don't need thickness.

3) In acute areas, the solidify makes split edges.

I cannot change any vertices, or split the object. This outfit is being imported from Marvelous Designer, and has associated .mdd animation caches that will break if anything is altered. I am using the Mesh Cache modifier to load them, so anything I do needs to be after the modifier. Importing the .mdd directly onto the mesh as shapekeys would allow more options, but that isn't viable as I need to be able to bring in different animations without it breaking. I can make changes to it in MD.

I see from looking around google that problem 1 is supposedly solved by making the material backfaces transparent. But that doesn't seem to work?

I have also found that triangulating the mesh (currently quads) solves 1, but is that the only way? If there is a way to access the verts created by solidify in a certain area, then they could be hidden, which would also solve 2.

It seems that 2 could be solved by something like a remove doubles modifier (which I see has been proposed in the past, but was rejected), and if that was done, then I wouldn't need to triangulate the mesh.

I have also tried using a deform cage based on an unaltered version of the outfit to control an altered version and so avoid the whole issue, but the results are inaccurate.

It turns out the problem was simply Fresnel's strange behavior on backfaces. Since Fresnel is dependent on facing, back faces become very reflective. If you invert the fresnel on backfaces, then everything works fine. See here for how to do that: backfaces give strange results with fresnel node in cycles.


Is it possible to get the file path to the .blend file that a linked object came from programmatically? I am trying to find a list of all file paths that are appended/linked in a .blend file through the Blender API, I need to run a script in each appended/linked file to change materials so in turn the material would be changed in the source file.

Thanks for any help in advance.

Yes it is possible:

obj.library.filepath

Additionnally, a not linked object has an empty obj.library.


How do I display a property in the viewport without using a modal operator? I want to display a property in the viewport without using a modal operator. is it possible? I found this, but I did not understand how I can use (I started with python).

Extending the code from Draw and update text in viewport without modal operator in blender

I suggest using a class to handle the handles, and pass context to the callback method.

import bpy
import blf

class DrawingClass:
    def __init__(self, context, prop):
        self.prop = prop
        self.handle = bpy.types.SpaceView3D.draw_handler_add(
                   self.draw_text_callback,(context,),
                   'WINDOW', 'POST_PIXEL')

    def draw_text_callback(self, context):
        font_id = 0  # XXX, need to find out how best to get this.

        # draw some text
        blf.position(font_id, 15, 50, 0)
        blf.size(font_id, 20, 72)
        blf.draw(font_id, "%s %s" % (context.scene.name, self.prop))

    def remove_handle(self):
         bpy.types.SpaceView3D.draw_handler_remove(self.handle, 'WINDOW')

context = bpy.context
dc = DrawingClass(context, "Draw This On Screen")

#dc.remove_handle()  # will remove the handle and stop drawing


Compositing Layers Have Halos I'm having a heck of a time compositing numerous layers using the Alpha Over nodes in the compositor. I have done this many times before without a problem.

All the objects on each layer are ending up with alpha halos around them. The saved image (Targa, TIFF, PNG,etc.) all have semi-transparent halos around each layer's contents.

I've tried checking Convert Premul at each stage along the node tree trying to get the alphas to work correctly together but the checkbox seems to be having no effect at all.

Can anyone tell me what's up with this?

(Unfortunately, I can't post a .blend because it contains purchased models)

Thanks.

I've uploaded a very simple .blend showing the same problem as well as a screen shot. The blend is here.

I understand what's happening (I think) in that each layer's edges are being anti-aliased against the black background, resulting in gray edges. But there must be a way to do what I'm trying to do here. I know I've done it before where the alphas are blended such that the gray halos aren't there.

Anyone know how I should be doing this?

You have that problem because the alphas of each plate are correlated, as the foreground doesn't overlap the background, it masks it out.

Solving it is not super straight-forward but it's quite easy:

Add add the alpha channels of each layer together. Use a mix node with the "add" mode.
Add RGB plates together, same as above: mix node, "Add".
Use the "set alpha" node to assign the result of the added alphas to the result of the added RGB plates.
Profit :-)

The result will be properly combined with no halos or holes.


How can I control the viewport without a mouse? Is there a way to specify the coordinates of the viewport and direction that the viewport faces without using a mouse or pointing device, in other words, by entering numbers somewhere.

You won't have fine-tuned control of the viewport without a mouse, but there are extensive options for controlling it via the keyboard:

You can rotate the viewport using 2, 4, 6, and 8. You can also change between "Perspective" and "Orthographic" views by pressing 5.
By holding ctrl and any of the above, you can pan the view.
You can press / to switch between local and global view.
You can use Shift 2 and Shift 6 to roll the view, as of Blender 2.69 (r59707).
You can centre the view on an object by pressing "." on the number pad.
You can zoom in and out of the view using + and -.
You can access the current camera view with 0.

  * Note: All of the number commands require that you either use your numberpad or enable "emulate numpad" in the preferences.