How can I fix broken linked dupligroups when the source file/directory has changed? (Using Blender 2.76) I have some object groups from one file (source) linked as dupligroups in another file (target). I had to change the name of the subdirectory containing the source file, and the name of the source file itself, so the links in the target file broke (as expected; even relative file paths wouldn't have helped with the renamed file/directory). So now when I open the target I get the error messages stating missing data, and all the dupligroups are just empties (empty empties that is) showing no mesh that they did before the name changes.

I think it will be easier to split this into two questions:

How do you fix a broken dupligroup link when the path to the source
file (directory name/s) has changed? Like this:
//directoryA/source.blend changed to //directoryB/source.blend
How do you fix a broken dupligroup link when filename of the source
.blend file has changed? Like this //directoryA/oldSource.blend
changed to //directoryA/newSource.blend

But of course I have to fix both of these things.

The reason I split that into two questions is because I did some tests and had different results depending on whether the intermediate directories names had changed (changed path) or whether the actual source filename had changed (changed filename). I had two ideas that both failed:

Idea 1 (failed):

Go to file/External Data
Find Missing Files

Changed Path: For the changed path this got the error message about missing data to stop displaying upon .blend file opening and when using File/External Data/Report Missing Files, but the dupligroups were still empty!

Changed Filename: For the changed source filename this did not get rid of the error messages or fix the dupligroups.

Idea 2 (failed):

Go to the outliner
Select "Datablocks" in the pulldown
Expand the "Libraries/lib" item
Change the "File Path" field to reflect the new
subdirectory/filename (For this selecting the file path input box in
the menu does not open a file selector or anything, so I just typed
in the new path/filename manually and hit enter. Maybe I'm doing
that wrong?)

Changed Path/Changed Filename: It failed for both. The dupligroups were still empty. I did try restarting the file to see if they needed to be restarted to show the dupligroup mesh, but it didn't help.

However, it's interesting to note that when trying Idea 1 (Fix Missing Files) and then trying Idea 2 (Libraries/Lib) the Fix Missing Files option did fix the path in Libraries/Lib so it appeared correct, it just didn't fix the dupligroups.

I'm using Using 2.76b, but I know I had this same problem with an older version of Blender. That was a while ago and I just gave up and re-linked the dupligroup. That's okay for a couple dupligroups, but in a big scene with dozens of dupligroups that have all been moved/rotated to specific positions this becomes a big deal.

I get the feeling I must be missing something really obvious because I'm sure this is a common problem. Any ideas would be appreciated. Thank you.

This has been fixed in Blender 2.77

To fix broken dupligroup links when the path to the source file (directory name/s) has changed; (//directoryA/source.blend changed to //directoryB/source.blend):

Go to File/External Data
Select "Find Missing Data"
Navigate to the new location, click Find Missing Files
Save, then close and re-open file.

To fix a broken dupligroup link when the filename of the source .blend file has changed (//directoryA/oldName.blend changed to //directoryA/newName.blend)

Go the Outliner
In the pulldown box that by default says "All Scenes" select "Data-Blocks"

Expand the "Libaries" section
Expand the "Lib" section for whichever linked Dupligroup you're fixing

In the "File Path" field remove the old path/filename and type in the new path/filename. (it should start with // if you're using relative paths)

Save, then close and re-open file.

The last option will also work for changed file name and path; just manually type in the full new path and filename.

This was information given in the Blender 2.77 release notes. It says that "In case of missing libraries on load, empty placeholder datablocks get added, which allows to restore or relink." and in the Datablocks and Libraries Management section of the release notes it says that this allows the user to "Edit missing libs paths in the Outliner, save & reload main .blend file, and get missing linked datablocks back."

Awesome! Thanks Blender developers! :)


How to remove this distinct line in my texture? I know it is something to do with uv unwrapping but I am unsure as how to fix it. Any help?

I'm not very good at texturing myself, but it's hard to tell what's wrong without seeing a picture of the unwrap.

That said, if there are texture lines in the middle of your object, you likely a) have a UV island or extra mesh face(s) in the middle of your table surface, or b) a non-tileable texture.

a) This could be because you've accidentally created an additional mesh face in the middle  of your table, or you've somehow double-mapped the texture to the face(s) in the middle.
 - go to Edit mode (tab), then wireframe viewport mode (z), then Face select mode (3)
 -  one at a time, select each face around the discontinuity, them move them out of place (g)
     - you should see the surrounding mesh stretch to the face location, Escape to cancel, go on to the next one
     - if you move a face out of place and there's still a face in the same place, you have a duplicated mesh. Escape to cancel
       - you can probably select all faces (a) and then go to Vertex > Remove Duplicates. Or just delete the excess vertices.

if the mesh is fine, then there's an issue with your texture or unwrap

So, how big is the texture?

If it is big enough to completely cover the unwrap island of the table surface without resizing, that's great.
Otherwise, you MUST have a texture which is tileable or else you have to scale up the texture/scale down the UVs (same effect).
I.e. a texture is tilieable if each side visually matches up with the opposite side - think wallpaper. (Again, can't tell what the texture is like without the unwrap view).

If the texture is bigger than the unwrapped table meshes, you can shrink it down if you want, but not if it's smaller, without some loss in quality. Obviously better if the texture and islands are not resized at all. It's a bit difficult to tell how it will look without doing it.

If the texture is tileable or it's at least as big as the UVs then maybe you have duplicate UV faces attached to the same mesh face. I'm not sure if this is possible though. Try selecting each face in the 3d view and seeing what UVs are selected. There may be multiple UV faces that get highlighted if this is the case. But again, not sure if this is even possible.

The "line" looks to me to be a narrow strip of faces that is not attached contiguously to the surrounding mesh, i.e. the wrong texture is applied to the faces. It lines up with the table legs. I'm going to guess that you split the table top in line with the legs and extruded them from there. You probably accidentally created an extra strip and assigned the wrong texture.


Assymetrical model with same number of vertices in each side - how to transfwer weights? The idea: a Python script that looks at the left side, then looks at the right side group with same root name but ending with ".R", then process all vertices and copy the weights to the vertex closest to the ideal mirrored position.

My attempt: a somewhat ugly loop that assumes the model axis of symmetry is at [0, ?, ?] and then just multiply x by -1. This is assumed to be the ideal mirrored position for that vertex. Then iterate all vertices in the group ending with ".R" and apply weights to the one closest to the ideal position.

The problem: when I finally try to get the weight using vertex_groups[GROUP_NAME].weight(VERTEX_INDEX) I get RuntimeError: Error: Vertex not in group

This should not happen, as VERTEX_INDEX is taken from an array collected from a selection of the source group. I know the group is not externally changed while the script is running. There is no way a wrong VERTEX_INDEX is passed to the weight() function.

I already checked for bad indentation, that may results in statements running outside the intended blocks of code.

More info: before the expected "apply your weights before applying the deformation to the right side of the model". I'm not the one doing the model and I cannot edit it in a destructive way. The mesh is already provided, I have to weight it. I know that the numbers of vertices in both sides are the same, it's just that some parts of the model aren't perfectly symmetrical (like the artist did everything without the mirror modifier).

The script, a lot of hardcoded stuff, look for # conflictive line:

import bpy
import mathutils

# ensure we are in edit mode
bpy.ops.object.mode_set(mode="EDIT")

# configurable parameters
# We take weights from vertices in groups ending with src_group_part
# and transfer them to vertices in the group with the same root name
# but ending with dst_group_part.
# The closest possible vertex will be the one receiving the weights
src_group_part = ".L"
dst_group_part = ".R"

obj = bpy.context.edit_object

mesh = obj.data

#bpy.ops.object.mode_set(mode="OBJECT")

print("Working")

for v_group in obj.vertex_groups:
    # TODO: .L may not be at end of string, write more robust code
    is_src = v_group.name.find(src_group_part)
    if is_src == -1:
        continue
    mirrored_name = v_group.name.split(src_group_part)[0] + dst_group_part
    if not mirrored_name in obj.vertex_groups:
        continue
    target_group = obj.vertex_groups[mirrored_name]
    bpy.ops.mesh.select_all(action="DESELECT")
    bpy.context.edit_object.vertex_groups.active_index = v_group.index
    bpy.ops.object.vertex_group_select()
    src_sel_verts_ig = [[v.index, [g.group for g in v.groups], v.co] for v in mesh.vertices if v.select]
    bpy.ops.mesh.select_all(action="DESELECT")
    bpy.context.edit_object.vertex_groups.active_index = target_group.index
    bpy.ops.object.vertex_group_select()
    target_sel_verts_ig = [[v.index, [g.group for g in v.groups], v.co] for v in mesh.vertices if v.select]
    for src_v in src_sel_verts_ig:
        min_dist_v_index = -1
        min_dist = 1000000
        for dst_v in target_sel_verts_ig:
            mirrored_v = dst_v[2].copy()
            mirrored_v.x *= -1
            dist = (mirrored_v - dst_v[2]).length
            if min_dist > dist:
                min_dist_v_index = dst_v[0]
                min_dist = dist
        if min_dist_v_index > -1:
            new_weight = obj.vertex_groups[v_group.name].weight(src_v[0]) # conflictive line
            obj.vertex_groups[mirrored_name].add([min_dist_v_index], new_weight, 'REPLACE')

print("Finished")

Any alternative to get this script to work is also appreciated. Like, has Blender a tool for these cases?

Object Mode Version

Here is a test script to run in object mode. It looks for all vertex groups on active object that end with ".L", finds a matching group ending with ".R" (or None).

Then using the list comprehension methods from Python - Finding Vertices in a Vertex Group check if there are the same number in each.

If so, for each left group vert,  sort the verts in the right group by the distance from the x mirrored location left group vert. Pop off the closest and set to mirrored pos of left.

Requires no operators and no edit mode.

import bpy
import re

context = bpy.context
ob = context.object
# get the mirrored name
def get_mirror(g):
    return ob.vertex_groups.get(re.sub(r'(.*)L', r'\1R', g.name))

mirror_groups = [(vg, get_mirror(vg)) for vg in ob.vertex_groups
        if vg.name.endswith(".L")]

for lg, rg in mirror_groups:
    if rg is None:
        print(lg.name, "has no mirror group")
        continue

    print(lg.name, rg.name)

    lverts = [v for v in ob.data.vertices
            if lg.index in [vg.group for vg in v.groups]]
    rverts = [v for v in ob.data.vertices
            if rg.index in [vg.group for vg in v.groups]]

    if len(lverts) != len(rverts):
        print("mismatching vert counts", len(lverts), len(rverts))
        continue

    for lv in lverts:
        vec = lv.co.copy()
        vec.x *= -1
        # sort rverts by distance from lvert
        rverts.sort(key=lambda v: (vec - v.co).length)
        # pop and set the rvert
        rv = rverts.pop(0)
        rv.co = vec
        rg.add([rv.index], lg.weight(lv.index), 'REPLACE')


How do I merge along a single axis? I'm trying to model a custom guitar pick. To create the curvature along the top of it, I created a series of edge loops and used proportional editing to pull the middle up.

Now, I'm aware that I can simply use the same loops to repeat the process at the tip, but as a beginner, I'm curious - is it possible to merge all the edges so the preserve the width of the pick along the y-axis, creating a single edge rather than averaging all the vertices along both the x and y resulting in a single point?

The picture below probably better conveys what I'm trying to ask. Thanks in advance!

There are two ways to go about doing this.

Method one is to merge the front edges first, then the back ones. If the vertices you are merging have no depth on a certain axis (the Y axis in your case) then merging them will not move them on that axis. Simply select the from ones, merge them, then the back, and merge them.

The second Method is to select all the vertices that you want to merge and scale them to 0 on whatever axis you want to merge the vertices along. In this case, you would press S then X and finally 0 to completely flatten the vertices along the X axis. If the vertices you have selected had some variations along the Z axis, you could instead use Shift+Y instead of X to scale on all axes but the Y, so that they would be perfectly flat. Confirm the scale operation, and then, with all of the vertices still selected, press W and select remove doubles. This will merge together any vertices that are in the exact same position.

One other thing I should mention is that blender has a feature called Auto merge editing that will automatically merge vertices that are in the exact same place. This could be used to save a step in method two. The feature can be found at the bottom of the 3D view on the right side of the toolbar there. It is the little button with the two arrows pointing to the center.

Method two sounds longer when I describe it here, but in practce, once you become familiar with the shortcuts it is quicker that way.


How to assign material to solify modifier With the default sphere and bool tool addon. I applied difference operation on it. And a solidify modifier to the cutter. It has created 3 mesh. Without apply modifiers, I want to apply material on to the solidify.

I tried the material index offset. Still the material is not assign to it.

How to assign material on solidify.

What we see here is not the rim created by the Solidify modifier, but the thickness created by your Boolean object (here I made it visible, the solidify just make your object thicker but its rim is not visible).


How to use specific color from an image texture as factor/mask in cycles mix node? I want to use all red pixels of my image texture as mask . I know how to do this in compositor but I dont know how to do this in shader editor.
I saw someone doing it on twitter but I cant find that tweet now.
Thank you.


Model appears to have visible polygons rather than being smooth? In the image, you can see how parts of the models don't look very smooth, in fact it looks more like a model  when you set the shading to flat.

This is after subdividing and converting tris to quads.

Any advice on how I can get the model to look smooth without using a modifier?

If you subdivide an object, it won't automatically appear rounder. It can create angles and ugly surfaces. For example if I have a sphere and decide to W > Subdivide it, as it will create edge loops in the strict middle of existing edges, it will tend to create flat surfaces.

If I W > Subdivide Smooth, though, I won't have this problem as it will try to respect the existing shape.

That said, you don't always get benefit from subdividing an object, except if you need to export for games or other 3D softwares I guess, can't you leave it as it is, keep a simple mesh and don't apply your Subsurf?


Python - absolute position of face How can I get the absolute position in 3d space of a face using python. I can get the position relative to the object origin using face.calc_center_median() this is not the absolute 3d position.

Here is how I got the relative position:

import bpy
import bmesh

# get current mesh
current_mesh = bpy.context.object.data

# create empty bmesh, add current mesh into empty bmesh
current_bm = bmesh.new()
current_bm.from_mesh(current_mesh)

# TODO: get absolute position
# get location of face (atm it relative to object origin)
for face in current_bm.faces:
    face_location = face.calc_center_median()
    normal = face.normal
    x = face_location[0]
    y = face_location[1]
    z = face_location[2]
    print('index: '+str(face.index), x, y, z)  # DEBUG

# current_bmesh back to mesh
current_bm.to_mesh(current_mesh)
current_bm.free()

In this scene for example the cube is a good distance from the world origin, the absolute 3d shall reflect this.

These are the reported coordinates of each face (they are relative to the origin of the object)

Multiply it with the object's world matrix.

loc_world_space = obj.matrix_world * loc_obj_space

where loc_obj_space is a 3d mathutils.Vector

There is an addon View3D-> Math Vis(Console) available to visualize vectors and matrices directly in the viewport.

I.e. paste the following lines to the interactive console

obj = bpy.context.active_object
lobj = [vertex.co for vertex in obj.data.vertices]
lworld = [obj.matrix_world * vector for vector in lobj]


Character motion moving script Im making a script for replace all my logic bricks used for moving, runing and jumping.

I using "Character" Physics type for my player, and i using "Character motion" motion type:

Here is my script, i encounter some problems for making the motion correctly:

import bge
from bge import logic, events

def mouvements():

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

keyboard = cont.sensors["Keyboard"]

VitesseMarche = 0.2 #Walking speed
VitesseCourrir = 0.5 #Runing speed

for key,status in keyboard.events:

    if status == logic.KX_INPUT_ACTIVE:

        # Avancer
        if key == events.UPARROWKEY:
            #Go forward
            print("Avancer")

        # Reculer
        if key == events.DOWNARROWKEY:
            #Go backward
            print("Reculer")

        # Gauche
        if key == events.LEFTARROWKEY:
            #Go left
            print("Gauche")

        # Droite
        if key == events.RIGHTARROWKEY:
            #Go right
            print("Droite")

    if status == logic.KX_INPUT_JUST_ACTIVATED:

        # Sauter
        if key == events.RIGHTCTRLKEY:
            #Jump
            print("Sauter")

mouvements()

The script need also Run and Diagonals functions (and mid-air moving if possible).

I have already tested some things, but there is always a problem.

-Or the movement still continue after the key no longer pressed.

-Or the moving are not local.

-Or the diagonals not working...

I have tried this:

own.orientation*Vector((0, 0.2, 0))

Found at: How to use KX_CharacterWrapper.walkDirection. But i may be bad.

This script must be the lighter as possible.

I have a last thing, it is possible to make the inputs (UPARROW, DOWNARROW, LEFTARROW...) changeable, easyly, and in-game?

Thank you and have a nice day (I will include the name of the guy who help me in the credits of the script)!

[FR-EN] Advanced Moving Script for the BGE V2.0 by Hack0re.

Warning, this script only work with Character Physics Type.

It does not work with Dynamic Physics Type.

The script include 95% of the instructions, in French and in English (142 Lines Header).

I will add more improvements in the near future...

Its my first real script, i just started in python, please be indulgent.

Features:

-Perfect for a FPS game.

-5 minutes needed to set in place (and even then).

-Moving in all directions, Diagonals and Running working perfectly.

-No pass through Walls or Sliding on ground.

-Walk speed and Running speed can be easyly edited in-game (Properties).

-Jump function with number of jumps can be changed in real time (You just unlocked the double jump).

/The jump hight not working for in-game, im sorry (if someone know how to do...).

-If the properties are not added, the script automatically use the default values.

-All the keyboard inputs can be "easyly" changed in-game , for making all the players happy .

-All the necessary instructions are include in the script (in French and English).

Downloads:

V2 (17/09/2015): https://mega.nz/#!m1cRlDIC!wrD1ovEznhxLGssZY26sndRUFv9amtsu_wVg_8VZ60Y

Please dont remove the Top Header.

Original link:
http://blenderartists.org/forum/showthread.php?381505-FR-EN-Advanced-Moving-Script-for-the-BGE-V2-0


Clear Custom Split Normals Data on all objects I am cleaning up a large file imported from another program with 500+ objects. All of these objects have Custom split normals that need to be cleared, and then Auto Smooth turned on. I know I can make changes to all selected objects at once by holding down Alt while changing a value or checking a box. However, this does not seem to work for pushing buttons, which is what you need to do to Clear Custom Split Normals Data.

Any ideas on how to do it to all my objects at once?

import bpy

selection = bpy.context.selected_objects

for o in selection:
    bpy.context.view_layer.objects.active = o
    bpy.ops.mesh.customdata_custom_splitnormals_clear()

This is the new code as the coding has changed a bit in 2.8


How can you access/open principled BSDF editor? Blender Version:2.79b
Cycles Render enabled

I have looked everywhere and I can't seem to figure out how to get the shader mixing editor (principled BSDF) to open.

I would really like to use it. Maybe I overlooked something simple. Please help. Thank you.

This is all I'm able to get. But I don't see shade mixer nor do I see principled bsdf.

Split your screen and make one window into a Node Editor. Then use Shift + A to bring a menu from the pointer and go to Shader -> Principled BDSF. You can also click on 'Search' once you've called the many via Shift+A and type 'principled' and it will be displayed on the results.


sparkling shadow sun glass shader thanks for support in advance.
while rendering in cycles the SHADOW of GLASS material is sparkling. Setting sun, but always the shadow looks like thousand stars.
How do I create a black shadow and stop sparkling from GLASS material?

Give this a try in the cycles node editor and see if it works for you.

This was taken from the following forum which should give you some assistance

Blend Artist Glass


Alpha over compositor problem I'm trying to add a fog glow to the blue circles behind Susan using the compositor but so far not being able to make it, the fog glow is applied to all the image but no the blue circles or sometimes the blue circles appear on top of Susan lol
Thanks guys for your help, I'm new to the compositing world of Blender.
Blender file attached*

Either separate by render layers or use a separate RGB in the compositor to create a mask that only select the blue.


Is there an alternative to the Geometry -> Normal Output? This is the matte I need, created from the mesh with this ring displacement using the "normal" output. I will be using a different displacement in the end but I need this specific information. I am making a fully procedural material and want to avoid baking this texture. I could just manually make circles where they are here but I'd rather use this idea so I don't have to manually change them later if I need too. Is there some way of locking this texture to stay how it is now or is there an alternative node with a similar effect? I just want a matte that's white where the outside and inside wall of this displaced ring would be.

Taking the dot-product of the Normal output of the Texture Coordinate node with (0,0,1) will return the Z component of the surface normals, in Object space.

This ring has a curved profile on the inside, and is tapered on the outside.
This discrimination is good.. if you had displacements on the curved surfaces which resulted in |Z| = 1 normals, you could further discriminate by absolute Z location in Generated texture space...

Either way.. or both ?


2.8 evee - can I "mask" a mesh/material outside of a container (like a domain)? Is there a way to easily define a volume where an object is visible, and hide it elsewhere ?
Thanks.

This sound like a boolean modifier could help you.

Simplified setup, with a cube and a VolumeMesh.

Add a boolean modifier to the object which needs to be invisible outside of the volume. Choose the Intersect operation (default) and choose the VolumeMesh as the object of the modifier.


Unwrap UV map proportionally to object size Is there any way to automatically unwrap UV map proportionally to object or "world" size?

For example:

I've made two cubes, one is two times bigger than other (scale is applied). Then I unwrapped texture with Smart UV project which will try to span all faces on whole texture space(0 to 1) so bricks on left cube will be bigger than bricks on right cube.

But what I want to achieve is this:

In broader context:

When I import model from Archicad (in form of OBJ) all objects have UV's in some scale (so all bricks have the same size on every imported object). And when I want to create custom object in scene I have to manually scale UV's to adjust bricks size for every new object (instead of scaling to one constant parameter).

UV-mapping defines a vertex on the model to a corresponding point on an image. When you have an image fit to a single face, then you make the model bigger the same vertex still maps to the same point on the image.

Using the same material for two objects with uv coordinates you get the size variation, unless you unwrap each object and adjust the uv's to match the texture size to it.

If we change that to object coordinates the image size remains constant between models, you may also want to set the projection from flat to box.

In Blender Internal you have the same settings under mapping -

In cycles you can add a mapping node after the texture coordinates to adjust the size and position of the texture, while BI has the scale and offset right next to the coordinate mapping setting.


How to share my 3d model made using blender? I have made a 3d model in blender and want to share it with my friend. My friend does not have blender and wants to see the model on his mobile. Is there any function in blender that helps me to make a shareable 3d model with a transparent background?

Upload the model to sketchfab. The model can then be viewed and rotated as a 3d object with no special software, on a web browser.


Animation Nodes - Object ID keys - Additional influence for a selected objects? again,

I am still battling with Object ID keys (OIk). And this time I am trying to mask out or add an additional motion to the selected group of bojects from an already animated matrix.
I am using OIk because I need to have precise states in matrices.

So my attempt was as shown in an image bellow. To create a group of objects and offset their position along +x axis with a help of a driver. But In addition I need part of that group to be offset in different direction (-x for example).

(Object controlled falloff) node with several object inputs does not suite me in this case, because I need a specific few from that group to have an additional or different kind of offset. And falloff will bleed its effect on an undesired cubes.

This setup that I did kinda work, but kinda don't some of the cubes loose their positions other don't react at all..

I tried to use second loop, but it cuts of the part of the matrix permanently And I cannot influence it with previous drivers anymore.

Again, I hope my explanation at least some what understandble..

p.s. I'm using a 2.79b

If you want the objects to stop at a certain height that may be computed as an offset of the object's location, simply overwrite the used falloff by taking the maximum or the minimum of it with a custom falloff that represents the state of the object. Here is an example:

This offsets the matrices by the maximum amount if their x location is larger than 2.


Blender Cycles Lightmap Baking I've got a scene in Blender (simple house) where I want to bake the lightmap of certain objects (e.g. the floor). My goal is to export the whole model in the .gltf format to use it with three js. I already applied various texture maps but when it comes to baking the shadows, I'm not sure how to do this the right way. I know how to bake the actual lightmap by baking "shadows" (if that's even the right approach) but when overlaying it with the textures (I found some solutions on stackexchange) in the node editor, the result doesn't look appealing and realistic at all. Baking the "combined" texture leads me to the best result but the rendering time takes ages and I've read a lot that it's better to apply the lightmap as a seperate layer and leave the texture set as it is - but whats the best way to do that? I need to have the lightmap already implemented in the final .gltf model.

Thanks in advance

Yea, I face similar trouble, but all that I have now - the combined texture is a gives you the best image. But you also can try to bake Ambient Occlusion, and add it with a combination of Color ramp - so maybe it gives you the correct result. But I'm sure that when you convert it on a gtlf format, It's not saving as ambient occlusion "slot" for material - ambient becomes a part of a texture. You can see it clearly on three.js editor - on material props, and read an answer on
Ambient occlusion in Principled BSDF


How can I connect a side with many vertices to a side with much fewer to produce a clean looking topology? I'm trying to learn topology by modeling difficult shapes, in this case a gaming mouse. I'm getting stuck with two problems with this model.

The first one is that I have no idea how to connect two sides with much different number of vertices. As you can see below, I try to reduce the vertices on one side but it ends up messy as hell.

The second issue I'm facing is the unexpected pinch when I try to pull along the z axis the middle line in the left click & right click shape.

How can I solve these problems? I've watched some topology videos from CG Cookie and understood some topology concepts, but I still struggle to get all the decisions right when connecting the vertices. What do you base your decisions on when connecting the remaining parts after finishing setting up all the main loops that support the main features?

My Blender file: Logitech_G600.blend

Updated: I've just reworked the model and come up with this:

Edit: English

You are doing the correct thing - trying to reduce the amount of vertices on one side. That should work. The idea is to have as little of geometry as possible that would still hold the forms you need, because the fewer points and lines you have to worry about, the easier it is to work with them. You can see the opposite on the unexpected pinch where you have too much geometry so it's not that easy to smooth or correct. You have way too much unnecessary geometry there. I would delete a lot.

In this particular situation it seems you might already have too much geometry to be able to replicate the forms. It is different from the reference object and you already have so many lines and vertices that it would be difficult to move them into places.

These shapes needed to be addressed earlier in the modelling process. It might be easier to start over then to fix it. That might be frustrating, but I think everyone goes trough a lot of redoing when learning this. I certainly did. With this kind of object it may be hard to understand what the forms are, so I would start by establishing all the lines that I understand from the start(in 3d). I would only make a vertex and extrude it into lines and check the position looking from multiple sides, like from top and side views. Then I would try to connect them and this way I could add or remove points as needed while connecting the lines.  I would aim to use only as many vertices as it is needed and not one more carefully observing if the forms generated by Subsurf modifier are matching the reference. I cannot advise any further without actually modelling the thing I am afraid.


How to make something similar to rigid body joint in Cycles? So I made a ragdoll horse in the Game engine using an armature and some hitboxes. I connected these hitboxes with Rigid Body Joints. Now I want to use this rig for animation. However, I animate with Cycles. I know that the Rigid Body Joint does not work in Cycles, and the Rigid Body Constraint set on Hinge in the physics tab doesn't do the same thing- it just stays rigid and doesn't swivel. Is there any way to get the same effect that I get with Rigid Body Joint, but in Cycles?

The game engine rigid body joints do not work outside the game engine. For similar behaviour in Cycles you should use Rigid Body Constraints - these can be created by selecting two or more rigid bodies and clicking Connect in the Physics Toolbox panel (T). When a rigid body constraint is first added it defaults to ‘Disable Collision’ - to enable collision between linked objects you should untick the checkbox in the Rigid Body Constraint physics properties.


How to pass variables in the game engine to a newly loaded .blend? I have two blend files, a.blend and b.blend.

I open a.blend, and run the game engine P. A script is then run that uses the function bge.logic.startGame("b.blend"), which starts running the game setup in b.blend.

In b.blend, another script runs. This one needs a value that is in a script in a.blend. How can I pass a var from a script in a.blend to the script in b.blend?

You could dump it to a file.

a.blend

with open('/tmp/mydata', 'w') as f:
    f.write(a_setting)

b.blend

with open('/tmp/mydata', 'r') as f:
    b_setting = f.read()


mtree as a particle effect I've been using Mtree, and I would like to use my output tree as an instance in a particle effect.  Normally I would take the leaf particles on the tree, convert them, apply them to the trunk and then use that, but for whatever reason that isn't working.
What I end up with is a forest with no leaves (depressing)
Any advice is greatly appreciated - I've been through a lot of tutorials and haven;t found more information than how to make a single tree.

So, I am back with another Mtree answer, I guess.
I will tell you my way of doing it, may not be the best one.
What I do, is I first join the leaves with the trunk.
How?
Well, First, I take the leaves and in edit mode, I assign all their vertices to a single Vertex group. Why I do this? I will answer in a moment.
Then, I join the leaves object to the trunk (Ctrl + J). You will see that the leaves are gone. But why? Well, the leaves object is just vertices, emitting hair. So, by joining them in the trunk, they lose their modifiers. And particle systems are modifiers, so now the particle system is gone. That's why, I go to the particle system settings, add a new particle system, from the drop down menu I choose "leaf"(that's the one that was on the leaves object) and then, down there, at Vertex group section, I set the density to be that one group I created before.
Now, I can add the hair system on the terrain object. If a hair instance object has his own hair, it will  be displayed, but only is its from type "Path"(default streams of hair), it will not if its an object. So, that's why, now I convert the trees into meshes(before that I hide the Leaf particle system so my pc doesn't crash). So, now its working! But, there is one thing you will notice- if the hair system on the terrain had the trees smaller, than their original size, they will look like bushes- because the leaves didn't change in size. So, now we have to it. We go to the particle system of the plane and we see what is the scale of the instance object- if it was 1:1, it will be exactly 0.25. So, if yours is smaller/bigger, we need to find how much. If we divide the 1:1 scale(.25) by the current scale(lets say its .05), we get 5. So, this means that the trees are 5 times smaller. If you get a value of, say .5, that means that you actually scaled them up(in the case of .5 its twice bigger). So, now we have to change the scale of the leaves with that ratio. So, if we get that the trees are 5 times smaller, then we also scale the leaves down 5 times. We do this from the hair particle system settings, same as from where we got the tree scale.
And now, you should be set.


How can I remove a prop that is used in an action but not needed in another? Sorry if this is a newbie question, or maybe I'm not using the right search terms.

I have different action strips for a character, and I'm using props in the first action strip, that are no longer needed in subsequent actions. However I can't seem to remove them without affecting the first strip too.

Is there something obvious I'm missing?

Thanks in advance!

Found something even better! Mentalist gave me much better search terms and I've now found the best answer to the solution. I didn't even know the eye (visibility) icon in the Outliner could be keyframed before =P

Thanks all for the help!

Animate the Viewport Visibility of an Object within the Timeline?


Cloud Generator No More? New to blender here.
I see some really cool images and tutorials showing a cloud generator add-on that looks volumetric.
Apparently it used to come with Blender though I see it is no longer in add-ons.
I can try to install it, and it shows up in add-ons, but then the tutorials show it being used through the Tools shelf which no longer looks anything like it used to.
Does the changes to the tool shelf mean this addon is no longer functional?

The cloud generator has been removed from the Blender Add-ons Contrib repository by commit rBACf439379cf637af05bec87e2ee0273dd2b2b43d6b because it wasn't maintained and therefore not updated for Blender 2.8x.


Separate a part without holes It's my first question on Stackexchange :)
I've been using Blender for a long time now, but I'm still a big noob about it. I use it to create or modify future 3D prints for my personal use.
I'm facing a problem : I would like to separate a part from a model. I did this a lot of times : I select all the vertices and I click on "separate". But as you well know, when you disconnect a part from a model, you only get the outside of this part, because the faces sticking directly to the model simply didn't even exist.
Is there a way to disconnect a part from a model, but without those holes ? You know, a "closed" disconnected part, with the shape of where it was attached...
I did a simple example in those pictures,

See ? I know it makes sense in Blender because all models are "empty", but is there any way to keep those parts "full" ? Thanks !

Simply use an object with almost-zero thickness for a Boolean difference.
That will get you a clear cut, with 'filled' holes.
Using a 0,01mm thick plane for a Boolean difference


How to set any material via python Hello I want to change the material of some objects, since it is not applied the material, I want you to apply via code in python, is a group of three materials that is just an object, I want wif the cube gets a material a sphere with another material different from the cube, and a cone with another material different from the sphere and cube.

You need a reference to the material and the object.

import bpy

# alias as D because we'll use it alot.
D = bpy.data

red_material = D.materials["Red_Material"]
cube = D.objects['Cube']
cube.active_material = red_material


Cannot Replicate Shallow Lake Shoreline in 2.8 Have vested an unruly number of hours trying to learn Blender. Tried replicating the tutorial on:
https://www.youtube.com/watch?v=WgFJ5ER-elg
Seems that Evee was unavailable at the time when this Tut was published. That alone took me 3-days to figure out. We now have the "Principled BSDF" which is throwing off all possible Node translations from previous versions out the window.
Any assistance would be greatly appreciated.
Kindest Regards
Nino

Though it seems rather over-complicated (or over-simplified, depending on how you look at it), the Principled BSDF can be used to make your task rather simple. See the simplicity of the setup below. Note that I changed the Blend Modes to play nice with the alpha. I also took advantage of the Principled BSDF to add a small amount of subsurface color.

If, however, you want to do it the "old fashioned" way, I think you'll find this node arrangement satisfactory. Notice I had to add the normal data in the form of a displacement input in this example.

EDIT - Here are some images of a working setup done in the file you posted.
EEVEE

CYCLES


Creating new vertices with Ctrl + Click not working I'm having this odd problem where blender isn't letting me hold Ctrl and left click to draw my points as I have done before. I deleted my cubes vertices in edit mode and I'm trying to draw from the view point of num7, I'm holding down my Ctrl, its a very simple thing to do but but the points aren't drawing. Any ideas what might wrong?

I too had the same problem. I noticed that I had was using face select instead of vertex select. Changing that might help you. Good luck!


How do I get pixel by pixel depth data out of a .exr file? I have been trying to get pixel by pixel depth data out of a .exr file.  I am using blender and rendering with Lux Render.  I need to get pixel by pixel depth data, and have read that if I use the z-buffer in blender and render, then save it as a .exr file from Lux Render, there should be pixel by pixel depth data in the .exr file.  However, I have not been able to read the .exr.  I have access to Matlab.  Can anyone help me with this?

Enable the Z buffer on the output settings:

To check if the Z buffer is correctly rendered, you can load the OpenEXR file in the compositor and add a normalize node to visualize the Z-channel:


Blender on Thinkpad x61 Good/Bad? What would peoples thoughts be, running blender on a Thinkpad  x60 / x61 if I went ahead and bought one?
the screen shot shows some specs.

Please see minimum Blender requirements:

https://www.blender.org/download/requirements/

Your spec does not pass them. There you can also find the optimal/recommended configuration.


Blender - HDR makes objects too bright I started to use blender 3 weeks ago and I am currently trying to do an outdoor scene.
I wanted to use an hdr image fot lighting, as blender guru does -> https://www.youtube.com/watch?v=fI_FMa-8w50&t=117s

But all of my objects keep over exposing, even if I a set the values of the math converter almost to zero

This is the scene with a sun lamp (strenght 1)

This is the same scene but using one of blender gurus free hdr and with the sun lamp hided

I believe I`m using filmic color correctly:

I also tried with simple objects (like blender gurus tutorial) and ended up with the same wrong result :(

Hope someone could help!
Thanks (:

You can change the brightness of the environment texture in the world section by modifiying the Strength value for the HDR.

Read:

How can I create a silhouette using HDR in cycles?

and

Increase brightness of HDR to light the scene, but keeping the background at a lower exposure

and

How do I adjust for overexposure using physically based lighting?

and

How to scale properly HDRI image, to be used in ASC-CDL HDR render?


Texture-less/colourless .obj file when opened I have an MMD model which i exported from PMD/PMX editor in .obj format, but when I import it into blender (ver. 2.75a), it's missing it's textures, same thing happens when I open it in Keyshot, anyway to fix this/re-colour textures?

Obj files do not store color/texture information. However, it can contain a reference to an *.mtl file.

You can check the obj file content and look if it contains a reference to an mtl file - which itself stores the colors of points/textures
Or maybe you can use another format when exporting (ply does store color information for each point for example).


Mixamo missing a parent or master bone I downloaded an animation from mixamo and made a repeating action of the walk cycle. But I can't find a master bone or parent bone to move the model along a path. It is just walking in place. When I try to add a new bone, parent it to the rest of the bones, and key frame it to move forward it deforms the animation. How do I add or find the master bone so I can keyframe its location and make the model actually walk forward. I've linked to the blender file I'm working on. Thanks for the help in advance for this newbie question!

https://www.dropbox.com/s/cog8matnnie6lg9/MixamoTest.blend?dl=0

You can easily find in the outliner which bone is the highest in the hierarchy. It is the Hips. But if you want to make it move you better animate the whole armature in object mode instead of moving the root bone far away from the object's origin.


Force Blender to Select rig instead of geometry I made a very simple ball rig in Blender. Nothing special. I have noticed, however, that it is difficult to select the rig without zooming in, and selecting and moving the geometry can cause issues. Is there a way to make blender detect when I try to select the geometry, and then redirect it to select the rig?

For cases like this, I just switch to wireframe shading with Z, select the armature (which is now visable) then switch back to solid shading, again with Z.

Or you can turn off viewport selection, then you will not be able to select the mesh in the 3D view (you can still select it from the outliner).

Another option is to select the armature differently. AltRMB  on your armature, that will bring up a list of objects that is below the mouse. You can pick your armature from that list.


CPU vs CUDA performance differ in render and rendered display Blender 2.78a on archlinux (FX-8320 @ 4.4GHz, GTX1060)

Rendering times for RyzenGraphic_27.blend from amd website:

CPU - 0:58
CUDA - 1:20

Live rendering times when switch "Viewport Shading" to "Rendered":

CPU - 0:22.28
CUDA - 0:04.54

I expected one to be faster than other in both cases, but this is strange, why is this happening?

If you are rendering with a CPU smaller tile values like 16x16 ( keep them square ) will be fastest. With a GPU larger ones like 256x256 work better. This is due to the way they make calculations. So just ticking the box and set it to GPU without changing this value will make it slower than it can be. Since viewport render is the whole screen the GPU will be faster because the "tile" is bigger


Set Shadeless As Default Shading I use Blender mostly for 2D design and animation. I import svg vectors and spend a lot of time setting the material shading to shadeless. I was wondering is there anyway in Blender to set Shadeless as a default shading to save myself time?

This won't set a default.. IMO, storing a base shadeless material in a startup file is a good way to go, as Timaroberts suggested...

import bpy
for mat in bpy.data.materials:
    mat.use_shadeless = True

But it will clobber all the materials in your Blend file, and make them shadeless, if they can be.


Box Select Error: Active Object is Not a Selected Mesh I'm trying to use the box select to select multiple objects in Object Mode, then Click "CTRL-J" to join the objects. Sometimes doing this results in the error message: "Active Object is not a selected mesh". It seems to be intermittent. I verified that the selected objects are meshes. It works by selecting objects individually and doing the "CTRL-J", but not always using the box select tool.

What could the problem be?
Using Blender 2.75a

EDIT: After looking at this more, I think the problem is that the error message is reversed. I think it should say: "Selected Object is not an active mesh", instead of "Active Object is not a selected mesh".

No, the message is right. And happens also selecting by hand, I just did it (blender 2.74 on this pc)

In blender, the "active object" is the last one selected.

But. suppose you have 3 objects and

You start selecting obj1: that is the active object, and is also selected
then you shift select obj2 and obj 3: now obj1,2,3 are all selected but obj3 is the active (last selected)
then you (eg: by mistake), click again on obj1: now obj2,3 are selected, obj1 is not BUT it is the last you selected (and then deselected) so, to blender obj1 is still the "active" object, but is not selected

exactly what the message says...

In your image, I see that in the outliner this is visible. the active object (not selected) is backpole.003 (its text is highlighted but the triangle icon has no circle background) while backpole.009 and backpole.019 are selected (the triangle icon has a circle purple background)

If you ask me, it could be a bug in the selection behaviour, but... this explains the message you get. It could be that box selection replicates this behaviour or something similar with the same effect


Python - Writing a custom image / texture importer I've been working with Blender 2.79 for some time now, and I'm in the process of writing a plugin for it. I've mostly figured out writing a custom Operator class that adds itself to the "File > Import" list of model importers.

Now I need to add a custom image file importer to load a custom texture format. Is this something I can script for Blender? And if so, does anyone have any pointers as to where I should start?

Thanks to @CraigDJones's comment on the Planes addon, and lots of digging around, I've narrowed down how to custom-import images.

First, as with any extension importing anything, it's necessary to write an Operator class for handling the file windows. As I am extremely new, this is something I'm still in the process of figuring out. However, operators do seem to be pretty general, as they do a large number of things. For starters, Here's Blender's Operators - bpy.ops reference.

For importing images, I discovered it's possible to instantiate a new image via the bpy.data.images.new(name,width,height) method. Then from there, pixels can be easily accessed and changed via the image_object.pixels[] array, which indexes the pixels data from left to right, then bottom to top as clamp (0.0 to 1.0) values. Each pixel has four values in this array: R, G, B, and A. Here's a simple example:

image_object = bpy.data.images.new("New image",1024,1024)
image_object.pixels[0:3] = (0.5,0.5,0.5) # R,G,B - changes bottom left pixel

# makes entire image half-transparent red
for i in range(0,len(image_object.pixels), 4):
    image_object.pixels[i:i+4] = (1,0,0,0.5)

EDIT:
A note of caution: So after a little effort, I was able to write a script for importing the image type I'm working with. For those doing the same, though, pixel operations on the image pixel data itself, e.g. image_object.pixels[...] = ..., are very slow. My script took about 20mins to import an image because it was directly copying each pixel to the image_object's pixel data. But after I made it copy to a separate buffer, and then dump everything over, e.g. image_object.pixels[0:] = another_buffer it went lightning fast.


How would I vary the emitted color of a 'window' (face) on a mesh? I am attempting to create a city-scape. Along the way, I want to create some variation in the Glass material so that, when instanced, aspects of the mesh's appearance will naturally vary. In the current exercise, I am attempting to add further variety to the 'lights' visible in the glass textures found in the two (lower right) buildings in the image below:

You can see that I've included a musgrave texture in order to create the illusion of patchwork-illumination in each of the windows. In fact, here is my current node setup:

What I am trying to do:
You see that constantified-color ramp? Well, what I was starting to develop was an idea that a particular window (not just the musgrave pattern on top of the window), would be a different color (simulating the slightly different light shades used by bulbs). Any ideas how I would actually make this happen?
Clarification based on comment feedback: I am attempting to achieve this for a single mesh, not separate objects.
Many thanks for your attention.
BIG thanks to Jachym for their help. Here is a demo of the finished product:

The final material (below) is a far simpler collection of nodes than I started with:

There is still an outstanding issue (minimized by the current composition) where glass that is not emissive (due to being in the 'black' part of the musgrave texture) renders out some artifacts; I will post a separate thread to address that. When fixed, I will update this thread.

You can use the Random output with a ColorRamp.

Start with the Object Info > Random output
Add a ColorRamp with specified colors (mine is also set to Constant)
Use the result as a window tint color...


How to trigger script once? How can i limit the script trigger to once per pulse ex. i want to  sub  1 from INT from OBJ  once when BOOL is true and RAY(sensor) is generating true pulse(with OBJ detected via RAY).It just keeps subtracting 1 from INT every tick. I tried to give RAY false pulse mode, but when RAY is detecting OBJ and after 1 sec BOOL becomes True ,it wont work.

I have added another variable  to save the state and toggle it every time, 'Done' indicates whether you have subtracted or not during this pulse :

def main():
    cont = bge.logic.getCurrentController()
    own = cont.owner
    Ray = cont.sensors["Ray"]
    Bool = own["Bool"]
    Done = own["Done"]

    if Ray.positive and Bool and not Done:

        own["Done"] = True
        print("have nothing to do")
    elif not Bool :
        own["Done"] = False

main()


How to create a Pacman-esque clock icon I'm trying to create a flat plane icon of a clock that can start full and over the course of time have it's outer edge swing 360 degrees around it's center point and then terminate when it's gotten back to it's starting point. An example would be this image of a clock but with just the green portion visible: http://cdn.vectorstock.com/i/composite/93,19/time-steps-icon-vector-749319.jpg

I really just started using Blender last week so I feel like I'm pretty in over my head. What I've seen so far suggest that Shape Keys could be a solution, but I'm not sure how to get a flat shape to link to a circle. An array modifier could also be a solution, but I'm not sure it'll work on a solid object.

Does anyone have a solution to this?

Update:

The original method did not work due to a limitation of blender's interaction with the Carve library (used for boolean operations). Here is an updated technique.

Example file

You can do this using Boolean modifiers:

Add a cylinder and a cube, then move the cube 1 BU on the X and -1 on the Y. With the cube selected, enter edit node and delete one edge:

Then select one of the remaining two face and press P> Selection:

With the 3D cursor in the middle, select each cubeface/plane object and press CtrlShiftAltC to snap the object origin to the 3D cursor:

Add a Union boolean modifier to plane 1 (it doesn't matter which plane is plane 1 and which is plane 2, but once you decide you shouldn't switch) and select plane 2 as the target object:

Add a Difference boolean modifier to the cylinder and select plane 1 as the target object:

Optionally add an Edge Split modifier to get rid of the dark shadows (only visible when the mesh is smooth shaded) caused by the poor topology produced by the boolean operation.
Insert Rotation keyframes (I> Rotation) to animate the rotation of either plane:

For example:

On frame 1 with one plane selected insert a rotation keyframe (I> Rotation)
Go to a later frame and rotate 360° on the Z (RZ360)
Insert another rotation keyframe (I> Rotation)


Face shading differs for adjacent faces in same object Although it may seem that there are many posts related to that, I couldn't find any tangible solution to my problem, based on the following images, I couldn't get the smooth surface for bronze arm rest curved support. I have tried followings modifications w/o success. This discrepancy also affects the light map creation.

Edge splitting,
Recalulate Normals
Change Auto smooth to 30d

AFTER THE MODIFICATIONS

The problem is that your faces are triangles. Triangles are notoriously difficult to smooth-shade.

The short answer is that you need to convert your triangles to rectangles (quads).

To do that, you can take advantage of a built-in Blender tool: "Tris to Quads." Select all the faces that you're having trouble with. Then press space and type "tris to quads" and then select the matching command. This will automatically combine triangles into quads, where possible.

But this might not quite work the way you want it to. If it makes awkward quads, you might have to undo that and try something slightly different. Try changing to "face select mode" and then select two triangles that would make a tidy quad. Then press space to run the command again. You might have to this for each pair of triangles, but it'll make the shading much more smooth.

So, avoid triangles where you can. Use quads as often as possible.


Bone Drivers to Copy Rotation Can I set up a Driver for the bone on the left to slightly copy the rotation of the selected one when rotating clockwise on its Z axis, and to copy the rotation with higher influence when rotated counter clockwise on its Z axis?

you could do this by putting a simple condition in your driver's code block:
zrot / 2 if zrot < 0 else zrot * 5

which gives this:

⚠ Note that you can just map the range(-180,180) to something else. it means that if you rotate counterclockwise when zRotation is currently greater than zero this doesn't work. if that's what you really need you can animate your reference bones and using f-curves you can do the rest.


What does the "make screencast" button do? In the info view header, under Window there is an option to "Make Screencast".

It's tooltip says

  Capture a video of the active area or whole Blender window.

When I click it a circle appears over my mouse and an option to stop the capture appears on the right of the header.  When I click the button everything goes back to normal and nothing happens.

So what does this button do?  If it really made a video of what I did where did it save it?

The Make Screencast button allows you to save all actions you make in the Blender window to a video file.

From the doc:

  Screencasts will record your actions over time either as a video or sequence of image files. The type and location of the output is determined by the settings in the Output panel of the Render context window.

So the screencast video is saved to wherever you set under the Render tab > Output rollout.  It will also use whatever settings you set there for video output format as well.


Parent two objects, without the child getting moved by the parent Is there a way to parent an object to another, such that the parent does not move the child when it moves? I thought of adding a "negative" Child-of constraint to compensate for movement by parent, but sadly that does not exist since constraint influence can't be set below 0. Any other suggestions?

This can be done fairly quickly; what you need to do is and an empty to the location of the child, and then make the child copy the location of the empty, using a constraint — now you can safely parent both objects and the child won't move.

You can do this by:

While in Edit mode, and with the child selected, pressing Shift + S > Cursor to selected
Pressing Shift + A > Empty > Plain Axis
Selecting the child, going to the Constraints tab of the Properties window and adding a  Copy Location constraint, with the target set to the empty created earlier


Sky Texture not rendered properly I'm using the default World Sky texture settings for my scene. There's a dark bluish rectangle positioned at the middle of the sky texture when rendered as compared to its appearance in the 3D viewport.

How do I fix the issue?

Turns out the End Clipping of the camera (Max viewing distance) was the one causing the issue. I down-scaled all the objects in my scene and set the clipping distance of my camera from 1500 down to 100 and that fixed the problem.

Do not set your render distance past 200 as it will most likely give you clipping issues.


Pivot point not working in Python script I'm making a script that takes the selected object (a curve) and:

Moves the cursor to it's origin
Gets the rotation of the object
Enters edit move
Rotates all the points of the curve the amount 'n' (the rotation of the object) around the 3d cursor
Exits edit mode
Eliminates rotation of the object.

Here's the code:

import bpy

scr = bpy.context.window.screen
v3d = [area for area in scr.areas if area.type == 'VIEW_3D'][0]
v3d.spaces[0].pivot_point = 'CURSOR'

bpy.context.scene.cursor_location = bpy.context.active_object.location

n = bpy.context.object.rotation_euler[2]

bpy.ops.object.mode_set(mode='EDIT', toggle=False)

bpy.ops.curve.reveal()
bpy.ops.curve.select_all(action='SELECT')

bpy.ops.transform.rotate(value=n, axis=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
bpy.ops.object.rotation_clear()

However, it doesn't rotate around the cursor but an arbitrary point. Any ideas?

EDIT: Updated the code, still not working. Here's my blend file: http://pasteall.org/blend/40360

You will want to set the pivot point to use the 3D cursor. As the pivot_point is a property of SpaceView3D, you will want to find the 3DView in the current screen areas, then change it's pivot_point to CURSOR

scr = bpy.context.window.screen
v3d = [area for area in scr.areas if area.type == 'VIEW_3D'][0]
v3d.spaces[0].pivot_point = 'CURSOR'


Result of rendering is a black screen I have read a couple of answers on this topic, but they didn't helped me.
I have light and camera, but the result of rendering is always black. Rendered 3D-view is OK, but in Material view my model is black. What shall I do?

You have turned off rendering of the text objects. In the outliner, click on the greyed out camera icons next to the names of the text objects, to activate.

Now it should render just fine.


Question about smoothing issues to the model I imported a tank model from a game, extracted with Ninja Ripper. The model has some smoothing issues while even if I tried select the mesh and soft all verts, faces and edges in shading panel, the mesh still looks weird.
Also tried the auto smooth option. I'm not quite sure the faces are in this look due to only smoothing or also the flips or something inverted. With ⌃ Ctrl + N I did found some of the faces on the turret turns different while some are not.

I don't know if it has something to do with flipped normals so I recalculated the normal with ⌃ Ctrl + N or ⌃ Ctrl + ⇧ Shift + N and this is the output:

You need to do 3 things to get a clean shading:

You have sharp edges, so, in Edit mode, CtrlE > Clear Sharp
You have overlapping vertices, so, Edit mode, select all and (in 2.79) W > Remove Doubles
As I said, in the Properties panel > Object Data > Geometry > Clear Custom Split Normals Data


Blender 2.76b Depth of Field doesn't work Blender 2.76b Depth of Field doesn't work. Any idea why?

Make sure the camera at the top of window containing the Depth of Field tab is actually set to your active camera. I had the exact same problem.


Video background change by difference How to remove background in video if i have background picture?

I use node editor. Image is clickable 1280x720. Video screenshot + background

I tried to use mask and chromakey, but result is bad

First I have to say, that key background is not very good. It needs to be  a very separate colour to skin and foreground (blue or green is best) and it should have NO shadows. Either from folds or from the foreground objects. An even flat plane of color is best.
You could try the Keying screen Node derived by tracking marker samples or you could mix multiple keys to try and build a better key.
Here are a couple chroma keys added together with some erode node added to clean the mask up. Notice that I am using the colours of the foreground object, then I invert the matte to generate a key.

I only have your sample frame to work with so it may fail during animation.

You would still have to use a tracked mask to clean up the holes in the foreground element. Good luck, you're really going to need it.


Blender and Linux, Which Linux distrubution is best for Blender 2.81 I just bought parts to build a computer for Blender, a Ryzen 7 3800m and RTX 2070 and 32 gb 3200 ram. I want the best OS for running Blender with that system. I understand Linux is the OS that allows blender to work the best. There are so many different Linux distributions though. Which one is best for Blender 2.81?

If you are new to Linux then go for one with the best support.  That would, without doubt, be Ubuntu ... the user base is so large that it is really easy to find help.
There is a dedicated Stack Exchange site at https://askubuntu.com/ if you like to search these Q&A sites.
I believe they use(d) Ubuntu at the blender institute, certainly I have have seen it in some of their videos.
It is also popular among blender users.  This screenshot comes from https://snapcraft.io ( Snaps are an app package format, which is officially supported by Blender).

While these stats may be biased (more Ubuntu users will use Snap than other distros), it does show that you would at least have some company.
Once you are comfortable with it, you will find it easier to migrate to other variants many of which are based on Ubuntu, so it is hard to avoid.
Reading this article on best linux distributions for everyone, all but one are based on Ubuntu.
DISCLAIMER: I don't currently use Ubuntu
... but then again I have 20+ yrs experience with linux and like to edit text files.  I have used Ubuntu for long periods, over the years.  It is probably your best start point.


How to create actions that animate texture uv offsets? I'm trying to create a simple animation for water in a stream.  The idea is to have a repeating texture and then animate it's offset along the x so that over time the image scrolls to the right.

This partly works.  While I can set the animation keys and while it does show the correct results when I render the image, there is no visual feedback in the 3DView when I play the timeline which makes it very difficult to tweak the animation.

Even worse, if I try to encapsulate this in an action, none of the keys that I set on the image offset show up in the action editor.  I'd like to export this for a game which means that I need to have the keys in the action, but for some reason blender isn't doing this.  (I can set keys for location, rotation etc of the object just fine.  It's just the UV offset that isn't showing up there.)

I created a simple .blend file using Blender Render (BI) and put a texture on the default cube and animated the offset X of the texture.  I set the viewport to Material (between Texture and Render).

While the Material view shows me the texture, and is updated if I alter the Offset X manually, it utterly fails to draw correctly when that Offset X is altered by the animation system.

I am inclined to say this is a bug in blender, and you are mildly doomed.  I say mildly, because when I change the viewport scheme from Material to Render, then I can click around in the timeline and it updates the view correctly.  Unforunately, that version of the view is incapable of animating on my laptop (and maybe all computers).

As for the dope sheet, it only shows keyframes for the ACTIVE action.  Once you have "encapsulated" the keyframes (probably using the double chevron in the NLA editor) that action is now a strip and you have to select it and Tab into it to make it the active action.  It is also important to remember that these keyframes are in the action on your MATERIAL datablock, not your object datablock.


Grass Particle System is Sideways Whenever I do Grass tutorials, or try to make grass in Blender, I always have a problem with the Grass Orientation.
The Grass particles are always rotated sideways. I try to change the Rotation Orientation Axis, but it never works very well. Usually global Y or X works ok, but the problem with using those, is that it doesn't let the grass particles be rotated on the Z axis. So I can't really rotate them around, to make them look more realistic. Please See Photo below.
Thanks!

Select the whole particle object (the one you used to make the particles) in edit mode, and rotate it by 90deg (or -90deg) on one of the axes (whichever one points it "upright"). From here, make sure "Advanced" is checked at the top of your particle settings (so "rotate" becomes an option), and under rotate, move the phase away from the default value. This will rotate them on the z axis, and also allows "randomize phase" to have an effect. Increase the random to get random z rotations.


Snapshot of object mesh as shaped by armiture I've got an object that I have animated with bones and when it gets to a certain pose I want to smash it using rigid body dynamics.  Is it possible to make a static copy of a mesh while it is deformed by bones?

Aha! I found it. Just like every other modifier :).  To to it, first pose your armature, then go to the WRENCH icon (modifier tab) and select Apply. Presto! Awesome.


How to select vertices on the left side of a plane using python? I would like to select only the vertices on the left side of my plane using Python (like on the screeenshot), does anybody have an idea how to do it ?

I try the following to get all vertices but i'm unable to isolate those on the left.

My actual code to get all the vertices:

bpy.ops.import_image.to_plane(
  files=[{'name': os.path.basename(file)}],
  directory=os.path.dirname(file)
)
obj = bpy.context.object
group = obj.vertex_groups.new(name = 'Group' + str(number))
index = 0
verts = []
for v in obj.data.vertices:
    verts += [index]
    index = index + 1
    print(v.co)
group.add(verts, 1.0, 'REPLACE')

You need to somehow define what is 'on the left side'. Is it global space, is it local, which way you are looking from?.. Anyway, you can compare the coordinates to something. Let's say you are looking from the top as in the screenshot and left is the most negative X point of the object in global space plus 0.5 units:

import bpy

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

the_matrix = obj.matrix_world

on_the_left_side = (the_matrix @ obj.data.vertices[0].co).x # have to start somewhere

for v in data.vertices:
    co = the_matrix @ v.co #Let's say "on the left" is in global space
    if co.x < on_the_left_side:
        on_the_left_side = co.x

offset = 0.5

#Element selection is a bit weird in bpy - you can select faces,
#but not vertices for example like user cannot, so let's deselect
for e in data.edges:
    e.select = False
for f in data.polygons:
    f.select = False

for v in data.vertices:
    co = the_matrix @ v.co
    if co.x < on_the_left_side + offset:
        v.select = True
    else:
        v.select = False


How can render a video skipping frames based on any arbitrary rule? Say I want to render every other frame in the first minute and only every third frame in the second etc?

Edit:
I need the output to be one video.
Best way for me would be to generate an array of frame numbers and use only them in the rendered video.

I think it should work like this

import bpy
#configure the startframe, endframe and the step size
render_list = [
#startframe, stopframe, step
[0, 50, 1] # Frame 0 to 50 with stepsize 1
[50, 100, 2] # Frame 50 to 100 with stepsize 2
]
for config in render_list:
     bpy.context.scene.frame_start = config[0]
     bpy.context.scene.frame_end = config[1]
     bpy.context.scene.frame_step = config[2]
     bpy.ops.render.render(animation = True) #execute animation with current settings


Apple pie box model and animation What is the best way to animate apple pie box folding from die form to folded view?

I need rather technic then solution. In my case I should be able to fold abstract apple pie box from die form, not vice versa.

These type of box seems to be pretty easy, but on close view no so... I spent whole day and still have no idea how to start folding...

Does blender has any tools to fold and bend faces keeping it's UV geometry constant?

UPD: moonboots thank you for the answer, but...
I think it's a bit dirty and tricky way... I would like (if it's possible) to make it more realistic way...
First of all, applie pie box is not trivial geometry. It's a cross section of bunch of cilinders, you can see them on the gif:

Actually I created that cross section, and applied bones. Going try to unfold it (at least):

For now I have problem to pose bone in parralel to XY-plane (the goal is to unfold box). I think I tested all kinds of snapping, but has no luck (
I would be very grateful if someone would explain to me how to rotate a bone parallel to the XY plane?

UPD2: here is my version, pure bones, as much real as possible, but not strict real... It can be used for cartoon-like animation, but not for packaging production visualization and preview...

Finaly it seems there are should be more dedicated software for package modeling. Paper and folding cardboard physics should be considered much more precisely...

note that box flaps has arc form when box is folded:

So 2 solutions:

I've tried with B-Bones, it works fine. Don't forget to put the Subdivision Surface under the Armature modifier, otherwise you'll have bad shading:

You could also use both bones + shapekeys:

Create your flat object. Give it 3 bones, one main, one for each face hinge:

Give your object a basis shapekey and a second shapekey, modify the object:

Mix both shapekeys and bones animations, use the bones to move and close the object:


Cycles diffuse color bake texture atlas bake is way brighter Not sure what is really going on.  But every time i try and bake the texture atlas it is much brighter then the material view.
here is before material/texture view:

And here is the baked atlas view:

All material nodes are just an image

texture color > diffuse color

diffuse bdsf to > material output surface
And my bake is just literally diffuse and color.  Anyone ever experience anything like this before?

Added my bake options:

So the reason being was the mirror modifier on the spaceship... caused a lighter tone.  Not sure why but after I removed all mirror modifiers from the scene the color stayed the same.  Thanks @Brenticus for suggesting an issue with the spaceship it lead to the fix!

Also:   I was baking into an image with the wrong color space... Whenever you generate an image for an atlas its color space is sRGB by default. I switched it to raw and that worked like a charm.  Leaving the above because somehow that did work one round.


Connect edges of array? I created a shape out of a single mesh/edge.

I added an array modifier and a curve modifier to create the rough shape of a banana.

Is there a way to add a "skin" to the result in Blender 2.8 in a non-destructive way, e.g. by using a modifier or some other technique?

Blender file

You can extrude your cross section by a small amount on the Y axis, then adjust the "Merge distance" parameter of the Array Modifier :


Baking mocap animation to constraint re-target armature I have an armature with motion capture animation on it and I am applying it to a target armature using several Inverse Kinematics constraints and some Copy rotation constraints, can I then apply that animation from the first armature to the second similar to how you can bake other stuff

Ultimately i want a easy way of transferring the mocap data from the .bvh file rig to the end program Unity.

Use the 'Bake animation' button in the animation tab when your target rig is active and in pose mode.
This should bake every movement to a new animation.


Removing internal surfaces from overlapping spheres I have a WRL model generated by a chemistry visualization program. In consists of many overlapping spheres. I would like to remove the parts of the spheres that are internal to other spheres.

A workflow to do this has already been proposed here:

How can I merge these two spherical objects into a single smooth mesh?

However, the models I am working with has almost 5000 spheres. Replicating the above workflow at that scale would be infeasible. I was wondering if it would be possible to do this automatically

Model here for reference:

In the end, I didn't end up going with a blender solution at all. I tried to implement the solution @batFINGER suggested, but my model wasn't properly formatted; the spheres in my model were not separate objects. When I tried to separate all the spheres into separate shells, blender crashed on me.

What did work for me was to load my object into Meshmixer and using Edit > Make Solid. Doing this created a solid object, filling in the entire shape. Using 'Preserve sharp edges' mode and maximizing 'Solid Accuracy' and 'Mesh Density' prevented too much detail from being lost. After this, I used Edit > Hollow. The final result was a shell containing only the visible surfaces of the overlapping spheres.


Problems with Curve Modifier Every time I think I have the curve modifier mastered, it throws me a another curve ball (no pun intended).

Why in this blend file can I not get the lights to follow the spiral curve? When the modifier is activated, the lights are stretched and distorted along the curve.

I created the curve by converting it from a mesh (string of verts). Why does it not display like a normal Bezier? Is that related to my problem?

I am following all the "rules" that I am aware of, as detailed here: Understanding the Curve Modifier. The curve seems to run in the correct direction. The origin point is at the first point of the curve. The curve modifier on the lights is set to -Y which is the local orientation of the curve's direction.

What am I missing?

General Tips
A few general tips regarding Bezier Objects and the Curve modifier.

For an easier time set curve origin to one of its ends, preferably its starting point.
If necessary under Edit Mode invert spline direction so the start point is at the same end as the origin
Place both the curve and the deformed object at the same location in the scene so that both center match in world coordinates
Make sure both objects have matching rotations on all axis. Clear rotations beforehand, correctly orient your mesh, and then apply all rotations in Object Mode. After adjust as necessary, rotating both curve and mesh in tandem.
Apply scale on both objects. Having uneven or unmatching scale factor will lead to issues.
Make sure curve bevel radius is uniform and at a value of $1$, anything else will introduce distortions.
If you scale your curve in object mode, even if you apply the scale, clear your bevel radius by setting them all back to $1$ in edit mode. Applying scale doesn't clear the bevel radius.
Make sure your mesh extends in the same direction the curve object, growling along its side, otherwise it may produce no visible results.

Non of these steps are strictly necessary, but they certainly help get more predictable results. Unless you know what you are doing these will help get started.
After a workable starting point you can adjust as necessary, breaking any of the above points you deem necessary yo get the desired results.
In your particular case
First you should sanitize both your curve and your lights object. Correctly place your lamps exactly at the origin of the curve, clear its rotation, and then rotate it again so it faces the desired direction. After that apply the rotation.

There are a few types of different curve objects in Blender, Bezier Curves, NURBS Curves, or Poly Type curves. Since you converted from a mesh object it is by default a Poly type curve, which has no curvature and hence no handles. It can only contain straight "poly line-like" segments.
This has absolutely no influence in your curve modifier bad results, and can easily be fixed by changing curve types. Under curve edit mode use the button on the toolbar that reads Set Spline Type > Bezier.

After that make sure you then change all handle types to Automatic or something other than vector to get a smooth curve.
Then you can finally activate the curve modifier. Switch its direction to Xaxis.
Anyway, the root cause of the weird results you are getting in this particular case are caused by having your curve vertex with a very small Radius factor, causing the mesh to be scaled along the curve. You can fix this by entering edit mode on the curve, in the Properties Shelf > Transform > Radius set it to 1 on all vertex. You can quickly override all selected vertex with the operator Set Curve Radius.


How do I use python to hook control points of a bezier curve to bones of an armature without inexplicably deforming the bezier curve? I have the following code to construct a bezier curve, an armature, and then hook them together, unfortunately it does not accomplish my mission

import bpy

def create_armed_spline(scn, resolution):

    curve = bpy.data.curves.new("dingus", 'CURVE')
    spline = curve.splines.new('BEZIER')

    spline.bezier_points.add((resolution+1)*2)

    half_thick = 0.1
    for i in range(resolution+1):
        p1 = spline.bezier_points[i]
        x1 = i / (resolution)
        p1.co = [x1, half_thick, 0]
        p2 = spline.bezier_points[2 * resolution + 1 - i]
        p2.co = [x1, -half_thick, 0]

        if (i>0):
            x2 = (i - 1 / 3) / (resolution)
            p1.handle_left = [x2, half_thick, 0]
            p2.handle_right = [x2, -half_thick, 0]
        else:
            p1.handle_left = [x1, half_thick/3, 0]
            p2.handle_right = [x1, -half_thick/3, 0]
        if i<resolution:
            x3 = (i + 1 / 3) / resolution
            p1.handle_right = [x3, half_thick, 0]
            p2.handle_left = [x3, -half_thick, 0]
        else:
            p1.handle_right = [ x1, half_thick/3, 0]
            p2.handle_left = [ x1, -half_thick, 0 ]

    spline.use_cyclic_u=True

    co = bpy.data.objects.new("dingus", curve)

    #

    arm = bpy.data.armatures.new("dingus")
    ao = bpy.data.objects.new("dingus armature", arm)

    co.parent = ao

    scn.objects.link(ao)
    scn.objects.link(co)

    #

    if 'OBJECT'!=bpy.context.mode:
        bpy.ops.object.mode_set(mode='OBJECT')

    scn.objects.active = ao

    bpy.ops.object.mode_set(mode='EDIT')

    bone_size = 0.1

    for i in range(resolution+1):
        x1 = i/resolution

        add_bone_set(arm, "%d"%i, [x1, half_thick])

        if (i>0):
            x2 = (i - 1 / 3) / resolution
            #add_bone_set(arm, "lh%d"%i, [x2, half_thick])

        if (i<resolution):
            x3 = (i+1/3)/resolution
            #add_bone_set(arm, "rh%d"%i, [x3, half_thick])

    bpy.ops.object.mode_set(mode='OBJECT')

    for i in range(2):
        hook_spline_to_armature(scn, co, ao, i, [0,1,0], "left %d"%i)
        hook_spline_to_armature(scn, co, ao, 2*resolution+1-i, [0, 1, 0], "right %d"%i)

    #

    return co, ao

def hook_spline_to_armature(scn, curve, ao, idx, parts, bone_name):
    mod = curve.modifiers.new("hook %d %r%r%r"%(idx,parts[0], parts[1], parts[2]), 'HOOK')
    mod.object = ao
    mod.subtarget = bone_name
    mod.falloff_type='NONE'

    scn.objects.active = curve
    bpy.ops.object.mode_set(mode='EDIT')
    for k in range(len(curve.data.splines[0].bezier_points)):
        bp = curve.data.splines[0].bezier_points[k]

        bp.select_control_point = (k==idx) and parts[1] != 0
        bp.select_left_handle = (k==idx) and parts[0] != 0
        bp.select_right_handle = (k==idx) and parts[2] != 0

    bpy.ops.object.hook_assign(modifier=mod.name)

    bpy.ops.object.mode_set(mode='OBJECT')

def add_bone_set(arm, idx, co):
    bone_size = 0.1

    b0 = arm.edit_bones.new("center %s" % idx)
    b0.head = [co[0], 0, 0]
    b0.tail = [co[0], 0, bone_size]

    b1 = arm.edit_bones.new("right %s" % idx)
    b1.head = [co[0], -co[1], 0]
    b1.tail = [co[0], -co[1], bone_size]
    b1.parent = b0

    b2 = arm.edit_bones.new("left %s" % idx)
    b2.head = [co[0], co[1], 0]
    b2.tail = [co[0], co[1], bone_size]
    b2.parent = b0

    return b0, b1, b2

def maybe_purge(scn, name):
    obj = bpy.data.objects.get(name)
    if obj is None:
        return

    obj.name = "discard"
    try:
        scn.objects.unlink(obj)
    except:
        pass

def mission1(scn):

    if 'OBJECT'!=bpy.context.mode:
        bpy.ops.object.mode_set(mode='OBJECT')

    maybe_purge(scn, "dingus")
    maybe_purge(scn, "dingus armature")
    spline, arm = create_armed_spline(scn, 1)

#
mission1(bpy.context.scene)

What I do get is a deformed bezier curve which appears to have no mathematical relationship to the armature it is hooked to.

How do I fix my python code so it properly hooks the bezier control points to the bones of the armature?

It appears that hook modifiers are not truly initialized when you create them.  They need a bpy.ops.object.hook_reset(modifier=mod.name) to clear out some hidden state that might be leftover garbage from the heap.


BKE_bpath_absolute_convert: basedir='', this is a bug I am getting this error in the terminal after running my script(2.79b). What am I supposed to do?

This is basically my script

import bpy
import os
import glob
import time
import tempfile

fname = bpy.path.basename(bpy.context.blend_data.filepath)

 fname = os.path.splitext(filename)[0]

 tempFolder=tempfile.gettempdir()

 finalpath=os.path.join(tempfolder,fname)

 bpy.ops.wm.save_as_mainfile(filepath=finalpath, copy=True)

thanks

You're assigning to fname but then you're using filename in the next line. Same for tempFolder and tempfolder. This runs without error:

import bpy
import os
import tempfile

filename = bpy.path.basename(bpy.context.blend_data.filepath)
fname = os.path.splitext(filename)[0]
tempfolder = tempfile.gettempdir()
finalpath = os.path.join(tempfolder, fname)
bpy.ops.wm.save_as_mainfile(filepath=finalpath, copy=True)


extrude and grab problem Basically, how to I get an edge, or any piece of geometry back to where you can grab it around and the rest og the mesh stays connected like in fig 1

Hit X > Vertices, then select the original edge.


Particles are clumping on each frame I have tried using the Subframes option. It hasn't done a thing.

So I have an object which gives off 3 particles into the air.  I have an Icosphere object on a different layer with a particle instance modifier on it.  That allows me to add a particle system to the Icosphere to create some awesome particle trails

But the particle system that is attached to the Icosphere creates clumps of particles on each frame.  I am wanting a nice, smooth stream of particles being emitted from the main particles.

Is there a way to fix this, or does the Subframes option not work with the Particle Instance modifier.

Here is my .blend file: https://db.tt/DhdNlo3h
I am using Blender 2.72

To increase the accuracy and smoothness of simulations it can sometimes be helpful to scale the time up.

Here a simple way of approximately stretching the time by 10. For every Particlesystem (3 in your example) multiply the End and the Lifetime of the emission by 10.

and divide the Timestep of the physics by 10.

In render settings multiply the End Frame and Frame Step by the same amount (10).

And render the frames as images. For videos you can reimport the frames in the VSE as image strip and render with the desired fps.


How do I bake my texture for animation? I am working on my first ever animation, and I have realised if I turn off the material for my "ship" it drops the render time per frame by 50% for me, which is huge as they are around 1hr10min per frame at the moment.

I have tried to follow some tutorials, but they all seem to assmume I want to bake the light in, which I assume I dont want to, with an object thats going to be animated as its lighting will change?

So my questions are:
1) Is this the right thing to do at all?
2) If so what bakes do I do, and with what settings?

Here is the node tree, and blend file The material is called glowing grebble and is applied to the ship hull.

Thanks so much.

Indirected Bounces in closed rooms are heavy in general. But simplifying your Material could help a bit.

When your goal is to simplify the shader and to do the hole material with one Principled Shader you have to pool all the shader channels and bake masks separately (emission, roughness, color, etc.)
Add-On Node Wrangler and its "Viewer Node" does help a lot (Ctrl + Shift Click to Get a Emission Output of the clicked node) You want to always bake via emission channel to not get shadows in your bake. (Maby im wrong on that part and it would be easier to just bake the passes via the bake menue instead of pooling them in the shader editor, have to test it tomorrow)

as an example I put all the emissions as absolute white to get a mask that produces 100% emission at the needed areas.
Create a Image Texture Node in your material. Doesn’t have to be connected, but has to be selected! Because of your procedural textures you have to use a huge resolution to get the details. The example pic has only 1k texture for reasons of baking speed..
Cycles Render Panel > Bake > emmission pass: uncheck selected to active, set margin low or 0, hit bake with image texture node in node editor selected.
Image Editor > Save Image! Otherwise you will loose the data.

For your other channels (color, roughness etc.) just pool them together and route them to the viewer node.
After Baking all the Maps plug then In your principled shader and you should save the calculation time for the 4d procedural noise textures.


How to curve a cube mesh around a circle perimeter I have a simple cube mesh that I want to modify so it will wrap around my circle's perimeter by 90 degrees like I have drawn here acting like a curved wall piece:

I looked in modifiers and tried Curve modifier but was not sure how to use it, does any one know how to do it ?

You can use the "spin tool".
Start with a plane section.
Place the 3d cursor at the center of the circle.
Use the spin tool which will be placed at the 3D cursor location (thanks for the information, Robin). By default, the tool will rotate around the Z axis.

Once the operation validated you can tune the values, such as the number of extrusions and the angle.


Why is my texture showing pink in render view when the image path is correct and cycles is the render engine? I am having the exact same issue as discussed in this thread:
 Why does this texture appear fine in material view but appears pink in rendered view?

The image file is not missing - I have used "find missing files", as well as assigning and unwrapping again. The image shows up in the 3D view but is only visible as pink in the render view. I have exported the file from PS as a TIFF with alpha. Is this a bug or am I and Sarsha W doing something wrong?

I'm running Blender 2.78a on a PC.

BTW, I've been going step by step from this tutorial, and the alpha channel texture is the only one with this problem

Rick Riggs suggestion to pack the image file:

Blender-> File -> External Data -> Automatically pack into .blend

worked like a charm. Once I checked that, the texture was applied to the surface.

For help packing images: Packing Texture Files In a Single Blend File


how to use addObject I have the object I am spawning on a separate layer from what I read that is correct, but I am having errors that the key is not in the list...double checked names and everything. Can anyone maybe see something I do not?

here is the error
KeyError: "CList[key]: ''breadcrumb'' key not in list"
I assume it thinks there is no object with that name

and the code I used below

import bge

def main():

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

node = scene.objects['breadcrumb']
life_time = 5
#scene.addObject(object,loc,duration) *duration is in frames
if own['nodeSpawnTimer'] >= 5 and own['nodeCount'] <= 20:
    scene.addObject(node,own.worldPosition, life_time)
    own['nodeCount'] += 1
    own['nodeSpawnTimer'] = 0

main()

To addObject() the object has to be in an inactive layer.

you need to use:

import bge
def main():

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

node = scene.objectsInactive['breadcrumb']
life_time = 15
#scene.addObject(object,loc,duration) *duration is in frames
if own['nodeSpawnTimer'] >= 5 and own['nodeCount'] <= 20:
    obj =scene.addObject(node,own, life_time)
    own['nodeCount'] += 1
    own['nodeSpawnTimer'] = 0

Related Documentation


How can I model a spread cylinder type of shape? I want to model this kind of spread cylinder type of shape and after multiple tries I can't figure out how.

I've tried using a primitive cylinder and then to spread its edges but that just resulted in a glitched cylinder, then I tried making my own cylinder from a primitive cube and spread the edges again and it just resulted in a glitched edge for the cube. How can I do this?

The aim is to construct edge loops along the curve.

A way to do it:

Start with an open cylinder, cut it in half and mirror it. Then extrude the bottom half part.

Add a circle (or the curve shape you want) with a high resolution. Then manually snap the top part of the cylinder so that it fits the curve.

Add two vertical knife cuts: one on the right to delimitate horizontal and vertical sections, the second on its left to give more precision to the curvature. For this last one adjust its top vertex (or vertice as some say) to the curve.

Extrude all the edge except the top 3 vertices, horizontaly to the cylinder center.

Add 3 loop cuts and fill the open faces, so that the first loop is now done.

Add two loop cuts to the exterior part, like so:

Use X 'dissolve egdes' and 'dissolve vertices' and also knife cuts K to adjust the geometry.
On left here an intermediate step, final step on the right.

Adjust vertices positions mainly using GG to slide along edges.

Add a subdivision surface.

The blend file includes this construction step by step:


Get all custom properties of an object It's clear how to set and retrieve custom properties from an object with python, but how do you get all the custom properties that were set to an object ?

UI defined custom properties.
If you mean those defined by the UI

Example, two custom properties on default object
Iterate over custom properties without searching?
Their names via keys
>>> C.object.keys()
['prop', '_RNA_UI', 'prop1']

or via items to get key, value pairs
>>> for k, v in C.object.items():
...     print(f'ob["{k}"] = {repr(v)}')
...
ob["prop"] = 1.0
ob["_RNA_UI"] = <bpy id prop: owner="OBCube", name="_RNA_UI", address=0x7fa661ad48c8>
ob["prop1"] = 1.0

The _RNA_UI member holds all the info re min, max, description for layout, when not defined with a bpy.props. (If defined via bpy.props and non default the data is saved as a custom prop of same name)
Finding the source for "API Defined" custom properties
When should custom-properties be used instead of 'bpy.props'?


Grease pencil stroke wont show while the pen is down Edit: Ok so actually I just noticed the stokes wont show up when its over any kind of 3d object. So like if I have a monkey on screen and im trying to outline the face the stokes wont show up until after I let go, but in open space its fine. Does anyone know how to fix this? Its not the way the GP line is layered its in front of the object

The Grease pencil in 2.8 seems to not show itself when using my drawing tablet until after I lift my pen but with the mouse the stroke is normal

So ill draw a line and not know where its going because of it being invisible which throws my lines off.

Anyone know whats going on?

I faced the same problem as well. It is quiet annoying. The solution I found is :
Install the latest blender 2.8 version and try drawing over the 3D object. If the problem persists add a new stroke or grease pencil from object mode and draw on that new stroke/ grease pencil. Adding a new stroke/greasepencil worked for me.


connecting these two meshes together I want to neatly connect these two meshes together (the spokes on the rim)?
How can I do this?
Hi everyone, I made a new rim and did what you say, but if I want to bridge the short sides it will be somehow crossed (see photo). Tried everything but couldn't get it done. What am I not doing right?

First, join your 2 objects with CtrlJ.
Then you can use the LoopTools > Bridge. First thing, open the Preferences panel and activate the addon called LoopTools, then:

Bevel the inner edge loop, cut a hole:

Select the edges that you want to bridge, right click > LoopTools > Bridge:

Tweak the factors in the Operator box (Segments and Strength):


No Option for Smooth/Flat Shading I'm trying to create some objects in blender and I just installed it, but for some reason I have no option for smooth/flat shading in the tools? Im new to blender so I dont know where else to find it.

Any help is greatly appreciated

If the active object isn't a mesh, curve, or surface these options won't be available (thanks @Carlo).
Right click on an object to make it active. Use ⇧ Shift RMB to make an object active while maintaining the rest of the selection.

It's somewhat rare that you end up completely without an active object, but it can happen e.g. when switching between layers.