UI blocked until a mouse event when invoking modal operator from another operator When I invoke my modal operator from my other operator (invoked from a panel button) and the modal operator finishes, Blender's UI is blocked until the mouse moves (i.e. click on the same button has no effect unless the mouse is moved or clicked first).

Also, if the modal operator is invoked from a property update function then the UI is blocked until LMB click (moving or clicking other buttons has no effect).

However, occasionally blocking does not happen.

When looking at events in modal(), event.type/event.value for the first two events are:

UI blocked - MOUSMOVE/RELEASE, MOUSMOVE/RELEASE
UI not blocked - MOUSMOVE/RELEASE, NONE/NOTHING

An obvious question is why are there two MOUSMOVE/RELEASE events anyway ...

I am wondering why is this happening and even more is there a way to avoid this UI blocking?

(The reason I'm doing all this is in my other question.)

Example code:

import bpy
from bpy.types import Operator

class TheModalOperator(Operator):
    bl_idname = "my.themodaloperator"
    bl_label = "TheModalOperator Operator"

    # counter of calls to modal()
    countmodal = 0

    def __del__(self):
        print("TheModalOperator End")

    def invoke(self, context, event):
        print("TheModalOperator invoke")
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):
        self.countmodal += 1
        print("TheModalOperator modal", self.countmodal, event.type, event.value)
        if self.countmodal >= 2:
            print("---TheModalOperator modal finished")
            return {'FINISHED'}
        else:
            print("---TheModalOperator modal running")
            return {'RUNNING_MODAL'}

class MyOperator(Operator):
    """This is my operator"""
    bl_idname = "my.operator"
    bl_label = "My Operator"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        print("MyOperator execute")
        self.report({'INFO'}, "MyOperator executed")
        bpy.ops.my.themodaloperator('INVOKE_DEFAULT')
        return {'FINISHED'}

# button on the toolshelf
class MyTestPanel(bpy.types.Panel):
    bl_idname = "mytestpanel"
    bl_category = "My Stuff"
    bl_label = "My Test Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)
        col.label(text="This blocks UI until a mouse event:")
        col.operator("my.operator", text="Run my operator")

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

There are two fixes needed.

1. The modal() must return PASS_THROUGH instead of RUNNING_MODAL.
That allows Blender to process mouse events, however, fixes the problem only when invoked from property update function.

2. Using a timer instead of the counter.
I'm not clear why not just changing the counter limit to 3 does not work (that just requires another mouse event, i.e. need to move or click the mouse).
Nevertheless, the modal timer does fix the problem for invoking from other operator too.

Fixed code:

import bpy
from bpy.types import Operator

class TheModalOperator(Operator):
    bl_idname = "my.themodaloperator"
    bl_label = "TheModalOperator Operator"

    timer = None

    def invoke(self, context, event):
        print("TheModalOperator invoke")
        self.timer = context.window_manager.event_timer_add(0.1, context.window)
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):
        print("TheModalOperator modal", event.type, event.value)
        if event.type == 'TIMER':
            print("---TheModalOperator modal finished")
            context.window_manager.event_timer_remove(self.timer)
            return {'FINISHED'}
        else:
            print("---TheModalOperator modal pass-through")
            return {'PASS_THROUGH'}

class MyOperator(Operator):
    """This is my operator"""
    bl_idname = "my.operator"
    bl_label = "My Operator"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        print("MyOperator execute")
        self.report({'INFO'}, "MyOperator executed")
        bpy.ops.my.themodaloperator('INVOKE_DEFAULT')
        return {'FINISHED'}

# button on the toolshelf
class MyTestPanel(bpy.types.Panel):
    bl_idname = "mytestpanel"
    bl_category = "My Stuff"
    bl_label = "My Test Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)
        col.label(text="This blocks UI until a mouse event:")
        col.operator("my.operator", text="Run my operator")

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


How do I animate influence of follow path I Have been using blender to make/modify objects for 3D printing and now I thought I would try some animation.
I am trying to start the camera moving along a path starting at frame 40.  From frame 1 to 40 it moves via key frames with loc.  Starting at frame 40 I would like the camera to follow a circle path for a couple of iterations.
How do start / stop the influence of the path at specific frames.
I in my googling have seen mention of a start/stop but I am not seeing in properties/constraints.  I see noting to control the constraint in the dope sheet or the NLA editor. (Which I just discovered)

This can be done by animating the influence slider at the bottom the the constraint.

Most interface elements in blender can be keyframed by pressing I while hovering over them.


Displaying each Asian characters in their own fonts? Suppose I have these two texts:

고양이
学ぶ猫

(1) is Korean, and (2) is Japanese, but the first character is a Japanese-simplified Chinese, the second character is Hiragana (Japanese's own character), and the third is traditional Chinese. In Japan, Chinese letters are used, and many of them are the same as traditional Chinese like "猫" and some of them are simplified like "学".

Anyway, if I use them in an application like Krita (for layers), they are displayed correctly.

If I use them in Blender (for objects), by default they look like this:

If I change the interface font in the settings to a Japanese font like "Meiryo", it looks like below. The Japanese text is displayed correctly, but the Korean text is still boxes.

If I change the interface font in the settings to a Korean font like "Malgun gothic", it looks like below. The Korean text is displayed correctly, but the Japanese-simplified Chinese is a box. This is because Japanese-simplified Chinese is not usually used in Korea and probably the font does not contain them. Hiragana (the second letter, ぶ) is displayed, but is ugly. For some reason, the Korean code contains Japanese Kana's as special characters, but usually the Kana in Korean fonts are ugly and disproportionate. I do not want to see Kanas in a Korean font. The third letter 猫 is displayed correctly because Korean also uses traditional Chinese, but in my opinion, Japanese fonts usually have better-looking tradiontional Chinese letters than Korean fonts.

So, the ideal result for me is that the whole Japanese text is displayed in a Japanese font like Meiryo, and the the Korean font is displayed in a Korean font like Malgun Gothic like below (this is not a screen capture; I composited the two screen captures above). Is this possible with Blender?

I accidentally discovered this but, I could get the result I wanted by just checking the "Translation" checkbox in Interface in the Preference dialogue. Blender's version is 2.81a.

Even though "Translation" is checked, it did not change the UI language from English. I wonder why this option is turned on by default. Maybe there is some side effects like slow UI or something? I will add here if I later discover some problems with this, but so far, it seems working.

Update

There seems to be a big problem. When it is checked, Blender seems to be using "international fonts". But that makes zooming on the Shade Editor very slow. It is not unusably slow, but makes it unpleasant to use Blender. I tried to report it as a bug, but found an existing entry for this. The entry was closed because it is an "old known TODO", meaning the developers are currently do not have the time to fix this and will not fix this.

Blender is probably written in OpenGL, and I don't know why zooming of a few lines of texts should be this slow just because "international fonts" are used, because web browsers like Chrome zooms fine with Asian fonts, but anyway, I think I will only check the "Translation" when I have to open someone else's file that used Asian texts for the names of objects.


Way of seeing data as image anywhere in a Cycles nodes setup? I made a complicated nodes setup for a material using Cycles.  Is there an easy simple way to peek at the data passing through any node, to view it as an image?  I desire something like an oscilloscope, where I can touch a probe to any point of the circuit and see what kind of signal is there.

In Blender Internal, I could make many Output nodes and hook them up anywhere, and they'd show the data as a texture on a sphere, cube, Suzanne or whatever.  There doesn't seem to be anything like this for Cycles nodes.

Example of using Output to monitor textures along the "circutry".  (This is not any sensible texture; just messing around with BI nodes.)

Personally, I use a temporary Emission shader and connect it to whatever I want to look at. I also have a small viewport render open almost permanently.
The emission shader renders really quickly taking only a couple samples to converge, so it's nearly instantaneous, especially if you go into local view (Numpad /).

I've recently released an add-on that uses this method, but sets it all up for you so you simply have to Ctrl+Shift+Left Click a node to view it's result (just like the compositor).

[Update: The Node Wrangler add-on mentioned is included in Blender now, simply enable it in your user preferences]


Simple UV unwrap with unexpected results - 2.78 Pretty simple UV unwrap, not anything I'd consider complex but for the life of me I cannot understand the results. I have prepared a file with just the object in the state of unwrap - hopefully someone can figure out what I could have done? Not sure this is related to 2.78 but that is what I am using.

All doubles have been removed - just by the way, and scale was applied.

You have your vertices of the Uv Island pinned. Select the island with A in Uv Editor and press Alt+P or go to Uvs-->Unpin to unpin it. Then unwrap it (U-->Unwrap) and it's gona look fine.


Are Cycles particles less voluminous than Eevee particles? Does Cycles produce particles different from Eevee?

In Cycles
In Eevee

Unfortunately, the size of my .blend file is too large to upload to https://pasteall.org for posting the file.

I learned that inside the Particle System, changing the Children from 'None' to 'Interpolated' will add more hair.
If more thickness is wanted, in Hair Shape, the hair root and/or tip can be thickened, producing a similar effect.


How do I change the direction of my fire? I'm trying to make a fireball that's about to land on an island, but I can't seem to be able to change the direction of the fireball. I'm using a sphere, and I'm using version 2.79. Can you help me out?

You can use wind. Add it by pressing SHift + A > Force Field > Wind

Just place it at whichever direction you want fire to flow then simply increase strength of wind and you are done.


How to do "filter select" in an existing selection? just want to discuss the better way to filter certain object(s) (either by types or by names, etc) based on a rough selection. For example, I got a crowded downtown scene, there are meshes, lamps, cameras, speakers along the street, and I want to select all the lamps and cameras for further editing. Is there a better way to filter them after a rough selection?

PS: Some solutions are not ideal for the certain case:

1> Cannot use "Hide". This works with simple one, however, some things have been hidden before, and I don't want to show them back together after this.)

2> Cannot filter by moving to a single/empty scene, This works with simple projects, but all objects within the rough selection came from multiple scenes, it would be not easy to bring them back to their individual scenes after this.

3> Cannot use "Local View", since I'm already in it.

Use the Outliner area to filter by type:

Change the Outliner's display type to Same Types, to filter by type similar to last selected object,
Press A to highlight all items, or LMB on empty part of a line to highlight individual item.
Press RMB on the Outliner, then click Select to select all highlighted items. You can also directly select/deselect an item by clicking LMB or Shift-LMB on its icon.

Use the Outliner's live search feature to filter by name. Even though a little trickier because it also matches object data, vertex groups, etc., selection using it can still be made easier if combined with some Outliner display types like Visible Layers, Selected, or Same Types.

Use the Outliner's Selected display type to prune existing selections.

Maybe those solutions aren't quite what you're looking for, but it's easy enough to try and still very useful to manage complex scenes.


I want an arrayed object to be upright throughout a tapered spiral I want all of the objects to stay upright and un-distorted throughout the whole structure.

Also if you notice anything fucky with what I'm doing and have suggestions I'm all ears. I am new to this and need to learn the proper workflow the first time as to not spend a lot of time unlearning bad habits.

Thanks!

I have followed what you said and now I'm getting 180 degree rotation on the y axis.

Also there is only one object at the very top that has a random amount of rotation.

I don't think you're doing anything funky..

The simplest way I can think of to persuade Blender to  respect the Normal, but ignore the Tangents of your curve is as follows:

In its Data tab > Shape panel, set the curve's Twist Method to 'Z Up'
Just as you have already, make a planar object, and give it array and curve modifiers:

As before, it tilts, but we're going to use it as a particle emitter, so it won't matter
Give this placeholder/emitter a Particle System with settings as follows:

All particles are emitted on frame 1
The same number of particles as the array count, evenly distributed, 1 per face.

And: ( my rendered object is called 'Mount')...

... emitting instances of your actual object, aligned to the emitter's Normal (but not its tangent axes)
The emitter planes are not shown in the final render... In my build, the viewport display sometimes needs kicking to refresh.. moving the current frame off 1 and back again does the trick.

This picture of the result also shows the working orientation of the green rendered mesh, with respect to its own object's local axes.. (adjust in Edit Mode)


2.9.X Theme to for 2.76b... our lab pc can't run version upper from 2.76b 2.9.X Theme to for 2.76b... our lab pc can't run version upper from 2.76b ...
i am teacher and i want teach blender to our student
our lab is old becouse we in thired world country (poor country)
i check every version and seem the 2.76b i called blender for poor's
it's only upper version work in that pc's
but i want theme to look 2.76b like  new 2.9 blender
is this possible
and from where i get manual and tutorial for 2.76b exactly ?
Thanks

Here is a 2.8 theme from Blendswap
Here is a 2.8 theme from Blenderartists.org
Please keep in mind that Blender 2.8+ also has a new Collection system (instead of layers) - which can't be changed using a theme.
Good luck :-)


Can't select faces properly on blender 2.80 i'm using Blender 2.80 (fa9ab7b5a9a5).

In EDIT mode i can select Vertex or Edges just fine, but when trying to select FACE, blender selects some other face except the one i'm hovering my mouse.

It only works fine when enabling Scene Transparency.

This is happening in all Shading modes, with Center On/Off in the Overlays panel, with OpenGL Depth Picking On/Off in the preferences either with my mouse or pen tablet (wacom), with or without Gizmos.

I have loaded Factory Settings.

I have a Nvidia GeForce GTX 1080Ti with driver 430.86.

Thanks

I didn´t understand what was going on and i could not solve my problem.

So i made a clean install of Blender 2.80 (cc600de6695a) and the problem is now solved.

Thanks


Don't show hidden triangles in Object Mode In Edit Mode, I've hidden some triangles. But when I switch back to Object Mode, the entire mesh is rendered. Is there a way to not render hidden triangles when in Object Mode?

You could assign the vertices to a vertex group and then use a mask modifier to hide the vertices.

By adjusting the visibility settings of the modifier you can also use it to hide the vertices in edit mode or only hide them when rendering.


mask object spline points coordinates I'm trying to export mask spline points x and y data by using:

bpy.data.masks['Mask'].layers['0'].splines[0].points[0].co

but i get an x, y vector with an unknown coordinates like:

(0.40345168113708496, 0.4609205424785614)

i think they are a percentage of the image i made the mask on, i need to convert it to pixel format where it should show something like:

(402,503)

i tried to do some math, and multiplied it with image the resolution, but the resulting numbers are wrong!
i do not get the formula behind this vector after searching many posts, can some please point me to it or how to convert it to image space?

Strangely enough, Blender calculates the relativ dimensions with respect to the larger dimension.
These words are not very well choosen. Here is a graphic that show a large orange square. Blender gives us relativ coordinates in this reference frame. The green rectangle is our movie aspect ratio.

import bpy

render = bpy.context.scene.render

coordinate = bpy.data.masks[0].layers[0].splines[0].points[0].co.copy()
coordinate.x *= render.resolution_x
coordinate.y = coordinate.y * render.resolution_x - (render.resolution_x - render.resolution_y) / 2

# at 100%, this gives us the correct coordinate
print(coordinate)


How can I add a triangular shape with the thickness of my loop cuts? I'm trying to make a simple shape but can't seem to do it right.

It's basically a right-angle shape with edges. Hard to explain, here are the pics:

http://imgur.com/vB0sT16

This is where I'm stuck:

http://imgur.com/GrUy4G4

All I need to do now is add in the triangles on the sides with the thickness shown by my loop cuts.

Any ideas??

I would recommend the following for your workflow:

If you are planning on keeping both your angle, and your stiffeners as one mesh object, then delete your two faces that your triangular stiffener plate will be running over top of first.

To do this go into face mode, select your faces (Hold Shift to select more than one), X >> Only Faces.

Next go into Edge mode.

Next, select your two outer edges (Hold Shift to select more than one) and using W >> E(Bridge Edge Loops).

NOTE: Repeat this for both triangle loops that get created.

Next Select your triangle edge loop using Alt+Right-Click.

Next hit F to fill in the the loop.


Why is grass looking tilted? I was trying to follow CGMatter's tutorial of how to make realistic grass (Create Grass Fast Blender Tutorial). So far so good, but now it looks like there is a wind blowing all of the grass to one side. Is there any way to fix this or do I have too many subdivisions? If you have any suggestions, please let me know.

You need to select the mesh used as particles/hairs and go into edit mode.
Rotate and move the object (in edit mode) till the emitter emits the mesh correctly.


On Screen Display Xray mode I'm new to Python
I would like to display in the 3D viewport a better representation of the Xray mode. The header icon is not visible enough to me. Not always easy to see the difference between ON and OFF.
I have search for a potential addon or script without success.

Make some visual overlay
Could not help but see the link between this and Bug in addon to Change header color dynamically  The addon there was to remind user they are in automatic keyframe mode.
Remember at the time thinking would make an interesting addon if given a generic way to link a property toggle with toggling a setting.  However have not returned until now
Similarly an edit to change the behaviour to instead change the bg color of the 3d view if in xray mode.
Consider this a "proof of concept" test script, a more subtle indicator could be used.
paste into text editor click run script.
import blf
import bpy

bl_info = {
    "name": "New Object",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > Add > Mesh > New Object",
    "description": "Adds a new Mesh Object",
    "warning": "",
    "wiki_url": "",
    "category": "Add Mesh",
}

highlight_color = (0.4, 0, 0)

class DrawingClass:
    def __init__(self, prop):
        from bpy import context
        self.prop = prop
        self.col = context.preferences.themes[0].view_3d.space.gradients.high_gradient[:]
        self.handle = bpy.types.SpaceView3D.draw_handler_add(
            self.draw_text_callback, (), 'WINDOW', 'POST_PIXEL')

    def draw_text_callback(self):
        from bpy import context
        font_id = 0  # XXX, need to find out how best to get this.
        if not hasattr(context, "scene"):
            return None
        shading = context.space_data.shading
        if shading.show_xray:
            context.preferences.themes[0].view_3d.space.gradients.high_gradient = highlight_color
            # draw some text
            blf.position(font_id, 18, 50, 0)
            blf.size(font_id, 50, 72)
            blf.draw(font_id, f"{self.prop}")

        else:
            context.preferences.themes[0].view_3d.space.gradients.high_gradient = self.col

    def remove_handle(self):
        from bpy import context
        context.preferences.themes[0].view_3d.space.gradients.high_gradient = self.col
        bpy.types.SpaceView3D.draw_handler_remove(self.handle, 'WINDOW')

dc = None

def register():
    global dc
    dc = DrawingClass("XRay Mode")

def unregister():
    global dc
    if dc:
        dc.remove_handle()
        dc = None

if __name__ == "__main__":
    register()

Leads to more questions.
An issue could be since a draw handler is defined for type,  could be an issue with syncing  when more than 1 view 3d is being drawn on the screen. Also setting the theme bg color  of the viewport is blend file wide.

A quick test confirmed my fears. Notice the text is correct but the theme bg color is not.
What is interesting is having what is like two themes active at once


How to add a color to a generated cube within a python script I have tried several suggestions to create a cube and then apply color to it in a Python script.  One such way is describe in Random object color via python .  I am currently using python 2.9.  Essentially what I have is as follows:
import bpy
obj = bpy.ops.mesh.primitive_cube_add()
obj.color = (0,0,1,1)
I was trying to create a blue cube.  The system console states that there is no attribute for color.  This must be an old syntax but I am not able to find the appropriate syntax to perform this basic task.
I also tried to simply cut and paste the bpy statements as I executed them manually but that didn't work either.
Any suggestions would be very much appreciated. Thank you,

Objects still have a color (as indicated in the documentation).
Though, bpy.ops does not return what is created or done by the ops, but the result state of the operation.
if you print(obj)in your code, you should see {'FINISHED'}.
What you can do using ops is:
import bpy

bpy.ops.mesh.primitive_cube_add()
obj = bpy.context.object
obj.color = (0,0,1,1)

Because the operation links the object to the context.
So, this work, but the color won't be rendered except in workbench rendering. It is also visible in solid view when object is selected here:

To set this color to the material, you can complete the script by the following:
import bpy

bpy.ops.mesh.primitive_cube_add()

obj = bpy.context.object

obj.color = (0,0,1,1)

# Create a material
mat = bpy.data.materials.new("Blue")

# Activate its nodes
mat.use_nodes = True

# Get the principled BSDF (created by default)
principled = mat.node_tree.nodes['Principled BSDF']

# Assign the color
principled.inputs['Base Color'].default_value = (0,0,1,1)

# Assign the material to the object
obj.data.materials.append(mat)


Poliigon Question: What is the node setup required to overlay a Grunge Drips Overlay onto a Marble Material The question is in the title, I'll link images of the materials in question. Let me know if I should link the marble materials default node tree.

In my opinion the easiest way to do it is to give your dirt picture a transparent background (and save it as PNG) so that you'll be able to use the alpha channel in the factor socket of a Mix Shader.


Can custom nodes be written for the compositor? Is it possible to create a custom compositor node using python? I'd like to be create the following node:

Input sockets for Image and Z render results
Load the image into numpy arrays
Manipulate the numpy arrays in various ways
Output socket for resulting image.

I've been able to create a new node type and register it the with the CompositorNodeTree, but it doesn't actually do anything. Is there a method I can implement (e.g. process or something) that can trigger the node process the image?

While it is possible to define a pynode that can be added to existing node trees, they are considered unsupported and have limited functionality - mostly they don't get an event to automatically update. I don't think anything has changed since this previous answer.

The two main pynode projects are animation nodes and sverchok - both of these projects have implemented bpy.app.handlers that trigger an update of their node trees for various events. You will need to experiment to see if you are able to get some results using one of the render related handlers to update your node, but I don't think that any of the handlers fall between rendering and compositing.

Depending on your needs, you may be able to use a script that renders a frame, updates your node to get the result and then save the render result or viewer node output.

You may also want to try manipulating the render after it is completed instead of during compositing.

bpy.ops.render.render()
img = bpy.data.images['Viewer Node']
w = img.size[0]
h = img.size[1]
arr = np.array(img.pixels[:])
arr = arr.reshape((w,h,4))


Simple texture blurred in Cycles render but not in Eevee When I render my scene in Eevee, all works well. But in Cycles, my textures are blurred and some details disappear, even with 1500 samples and no denoising. Can you help me please ?
Thanks :) !

After several tests, I found the problem.

My file is a Sketchup import and the floor geometry is a bit special. As you can see the mesh has a thickness and a diagonal edge, and this one was like inside the mesh. By moving it up outside (I did it much more to illustrate on the picture), the mesh becomes more valid and the texture is correctly applied.


Object in the wrong position when rendered I have a "rendering" problem: the face of one of my characters appears in a wrong place (the empty's one) as I render the image (clicking f12). When I just switch to the rendered mode in the 3D view everything works perfectly.

I attach a screenshot of the rendered image.

Hope someone can help me!

You likely have a modifier on the head object, most likely an armature modifier that has the Render setting off. Enabling the render button on the modifier will solve the issue.


Changing an object size/rotation doesn't update information in Transform window I have downloaded an object file from the internet. The object imports fine except for when I try to change the scale/rotation of the object. I do not see the Transform window information update when I make a change.
Below rotation not being updated in in the Transformation Panel.

This situation can occur if you select 2 objects, and then hide the last selected one.
With the last selected object hidden the rotation will center around the only available one now and it looks exactly like this.

Here the procedure to get to the same situation:

Solution: Make sure the object you work on is the active selected one, yellow outline.


Way for delete all object inside an Collection "Mycoll" in blender 2.8 I find the bpy.ops, but not find the low level python way to get obj inside a collection and delete . Any idea?

Unlink an object to remove it from a collection.

Py console code, for example sake, creates a new collection that is a copy of "Collection 1".  It contains the default file objects "Cube" "Camera" and "Lamp", and like the original is a child of scene collection.

>>> mycol = D.collections['Collection 1'].copy()
>>> mycol.name
'Collection 1.002'

>>> mycol.objects[:]
[bpy.data.objects['Cube'], bpy.data.objects['Lamp'], bpy.data.objects['Camera']]

To get by name and remove the "Cube" object from collection. (If there is no object named "Cube" in collection get returns None)

>>> cube = mycol.objects.get("Cube")
>>> # remove it from collection
>>> mycol.objects.unlink(cube)
>>> mycol.objects[:]
[bpy.data.objects['Lamp'], bpy.data.objects['Camera']]

Loop thru and empty the whole collection.  Note mycol.objects is boolean False when emtpy.

>>> while mycol.objects:
...     mycol.objects.unlink(mycol.objects[0])
...
>>> mycol.objects[:]
[]

To remove the object ob  from file use bpy.data.objects.remove(ob, do_unlink=True)  Unlinking do_unlink=Trueis the default, and hence can be left out, will unlink from the collection, and all others containing this object, for you.


Grease pencil animation tweening When animating with the grease pencil, is it possible to create automatic inbetweens for the different shapes? You would for example create a keyframe at frame 1 and another keyframe at frame 10 and have Blender do the middle part. Or is it only possible to do frame-by-frame animations with the grease pencil?

Animating sketches which were created using Grease Pencil generally is being done with Dope Sheet Editor by creating / editing sketches for each frame of animation.

Animating with Dope Sheet

After first GP pencil layer is drawn, open Dope Sheet Editor and switch it to Grease Pencil mode.

Once opened you'll see several (depending on amount of GP layers in your scene) channels with keyframe/-s.  From wiki:

  The DopeSheet should now display a few “channels” with some “keyframes” on them. These “channels” are the layers, and the “keyframes” are the frames at which the layer has a sketch defined.

And because you have one frame created, go to the next frame and edit sketch as desired. Keep in mind that this is 1 frame of animation, so changes should be tiny. Continue creating frames as needed; very useful tools for making this easier are:

Enable Editing Strokes button in the 3D View > Toolshelf (lets edit already drawn strokes);
proportional editing (simple mode and Connected one for editing only current strokes);
grabbing, scaling, rotating.
duplicating sketches from one frame to another - select frame in Dope Sheet and in the window header choose Frame > Duplicate Keyframes; copy of the sketch will be created and placed atop of the existing one. Grab it where desired.

It's possible to preview animation at any time by pressing Alt+A. Once there is desired amount of keyframes the animation is ready:

The downside of this method is that you should create each frame by hand. All the color information, thickness of the stroke etc. will be preserved though.

See How to sketch animation in Blender

Converting Grease Pencil and animating with Shape Keys

This way is completely based on using Join as Shapes. It allows you to morph between two objects simply joining them with using this option. However, the objects must have the same vertex count (which can be quite difficult for Grease Pencil conversion). Also it doesn't provide any flexible way to preserve stroke thickness and color as first way does.

Sketch 1-st frame. There can be either 1 GP layer contaning both frames or 2 different layers.
Sketch last frame.
Place selection on the first keyframe in Dope Sheet (if sketches are stored as keyframes in Dope Sheet) or choose desired Grease Pencil layer (if sketches are stored on different GP layers).
In the Toolshelf choose Grease Pencil > Convert. Choose Path or Bezier Curve. In the options of the last operator uncheck Link Strokes.

This will make end of the strokes not to be connected and will preserve their overall shape.
After converting second sketch select both of them, create Basis shape key for it and choose Join as Shapes from dropdown menu in Shape Keys panel.

The disadvantages are that drawing thickness and color aren't saved. Hence this way, inspite of providing possibility to not draw middle frames of animation, is less flexible.
Although, you can preserve data about how fast the strokes were drawn which could be used for creating Evaluate Time F-Curve and reconstructing the thickness of strokes. The Timing mode options let the curves have different thickness (more complex way).


Problems updating the context within a loop? C.scene.update() I'm using these loops to change the location of an object (I need to see how this object interacts with other objects in the scene when it starts from different locations).

Anyway, based on what's printed, the object's location is not updated in every "loop" repetition. It wasn't updating the location at all, I added the bpy.context.scene.update() line, and now it's only updating it once, so the output is always the same two coordinates (x=3 and y=2).

for ix in np.arange (3,50,0.25):
    for iy in np.arange (2,50,0.25):
        bpy.data.objects["Ball.004"].location[0] = ix
        bpy.data.objects["Ball.004"].location[1] = iy

        bpy.context.scene.update()

        loc_ball=bpy.data.objects["Ball.004"].matrix_world.translation

        print(loc_ball.x, loc_ball.y)

How do I need to update the context (if that's the problem)?

Maybe use matrix_parent_inverse * location

Not sure what the issue is here.  The three values "np", "xx", and "tr" in test code below correlate.

Using mpw * mpi * ob.location avoids a scene update for each iter.

(of-course if our parent inverse isn't Identity only the "xx" and "tr" values will match)

import bpy
import numpy as np
from mathutils import Matrix
ball = bpy.context.object
mw = ball.matrix_world
mpi = ball.matrix_parent_inverse.copy()
mwp = ball.parent.matrix_world if ball.parent else Matrix()
for ix in np.arange (3, 50, 0.25):
    for iy in np.arange (2, 50, 0.25):
        #mw.translation = mw * Vector((ix, iy, ball.location.z))
        ball.location.xy = (ix, iy)
        print("np", ix, iy)
        xx = mwp * mpi * ball.location
        print("xx", xx.x, xx.y)
        # required or matrices don't update in loop
        bpy.context.scene.update()
        tr = mw.translation
        print("tr", tr.x, tr.y)

Last few results

np 49.75 49.0
xx 49.75 49.0
tr 49.75 49.0
np 49.75 49.25
xx 49.75 49.25
tr 49.75 49.25
np 49.75 49.5
xx 49.75 49.5
tr 49.75 49.5
np 49.75 49.75
xx 49.75 49.75
tr 49.75 49.75


My gpu doesn't supports cycles but it rendered succesfuly. How can it be? I had intel hd 4600 gpu which doesn't support Cycles rendering but, out of curiosity, l tried and it worked. How is this possible?
As I know my laptop only had one gpu.

Unless you specifically change it, Cycles will render with the CPU by default.  CPU will almost always work, but it will probably be slower due to not having the massive parallelization that GPU's have.

If you are using GPU and it is working, Blender not supporting a GPU specifically doesn't mean it won't work, it just isn't guaranteed to work well.


Image reference decreases in quality after opening it in Blender I decided to make a new car project from an image that would find myself.
After a  few searches, I found a picture: https://drawingdatabase.com/audi-a6-2018/
The picture is a hi-res one, however, when I import it to blender via the Properties shelf in the 3D View, the quality decreases to a point where it is nearly impossible to model. By default the site saves as GIF, i've tried saving it in other formats as well but to no avail. Help would be greatly aprreciated.

Convert the image to RVB and Jpeg
Answer submitted by moonboots
thank you


Weird cloth physics on bends I'm trying to make a cloth fall on an object (imagine a hook but on its side), and whenever the cloth tries to bend around it there are weird blocks that come up. The object has a decimate modifier (collapse) on it and the cloth has been subdivided multiple times and has smooth shading and has a subsurf mod on it. This weird blockyness of the cloth is causing it to tear as well so idk what to do.

How to prevent this??

First:
 I would apply modifiers before you run simulations, so you could try applying the decimate modifier and re-running the simulation.

Second:
You could subdivide the cloth some more, in edit mode. I'm not sure if you did this, but subdividing the cloth using the SubSurf modifier doesn't increase the resolution of the cloth in the calculations of the simulation.

Third:
Increase the "padding" of the object. By "padding", I mean the distance from the object that the cloth will colide with. I don't know what yours currently are, but hopefully tweaking this will help. The values 'Inner' and 'Outer' are what controlls this.


Fixing unclean Normal map on round shapes? This is more of a general 3D material question than a Blender issue but there seems to be no Stack Exchange forum for more general 3D design questions so I'm posting this here.

I'm trying to bake a normal map from a high poly model to a low poly model so that the normal map gives the impression of high detail (as used generally for low poly game 3D objects) but I can't figure out how to get it look smooth on round shapes like in my example here ...

This is a simple bucket model. The hi poly model cylinder has 24 sides vertically and looks very smooth in subdivision mode. The low poly model has 12 sides. You can see that the baked round edge doesn't help anything to make the low poly model more detailed. it just looks bad. So I wonder what are some good ways to improve this without increasing the polys on the low poly mesh?

The only way to improve the look here is to increase the low-poly polycount.

The normal map looks ok, but if you will face any problems in the future, you can find a massive amounts of good info here: http://wiki.polycount.com/wiki/Normal_map


wHow do i make the the sun lamp light pass throught this window? How do i make this spot lamp light go through this window? -The window in the wall is just a hole in a plane with some meshes in front of it.
Sorry for my bad english.

My sun lamp is pointed at the window like this:

Simply rotate the sun lamp until it's at the correct angle, so the light will come through. If you are using a spot lamp, make sure the lamp is outside of the window.


Baked normal map comes out transparent Blender 2.79
I'm trying to follow a Cycles workflow in baking out normals from a high poly mesh to low. Instead of a purple image with rainbow detail I'm getting nuthin.

I've checked both meshes' normals. They're all facing the right way.
A 2048 image was created for the normal bake and selected in the materials editor. It's not hooked up, but that shouldn't matter - so long as it's selected and targeted.
No modifiers are on either mesh. No subsurfs, nuthin.
Ray distance only seems to work on 0. Anything higher and the result is as the image shows.

What are your best guesses? I've had this happen before, and I found starting over again worked. I don't want to have to keep re-starting models.

EDIT 2: FIX

Ok After some crazy amount of testing I found the culprit :D

In the render layer section, you have to check in EVERY render layer "use Surfaces".
If unchecked, you will get this strange transparent section in GPU Mode.
And in CPU mode it will even cause a crash to desktop.

In my opinion this crash is even worth a bug report.


How do I pan the view in Blender? I'm trying to navigate in Blender, but I can't pan around the scene.

Hold ⇧ Shift MMB and drag the mouse to pan Blender 2.8 Release Candidate.


Clipping border doesn't work properly I'm doing a retopology of an object, which has vertical cracks. I used a clipping border (Alt+B) to display only one half of the mesh and tried to retopologize the crack, but all the vertices are snapping in a wrong way. How to fix it?

You got "Snap during transform" enabled (magnet icon) and when you're moving vertices with "G" it snaps them to the nearest surface (cause you have also Face as the type of element to snap to enabled) As this are edge vertices, and you're doing it from considerable distance, it snaps not to the edge faces but to back faces. I would suggest you to try disable first one and snap vertices with CTRL. It would also be helpful to decrease distance to increase accuracy or hide back faces of high poly model to avoid snapping to the wrong ones. You could do it with mask modifier for example.Options, which I'm talking about are selected in the image.


Wrapping geometry object animation I'm trying to animate wrapping a dodecahedron. I tried to use one object with shapekeys (rotate Y+Y with normal mode), but I can't parent the animations, any ideas?
Now I made separate objects but now I don't know how animate on a specific axis in object mode.

I suggest using an armature to animate the wrapping.

Animating a rotation with shape keys will lead to deformed faces during the animation as the shape key only considers the location of the vertices. Between two keyframes the location is interpolated on a straight line.
Displayed below are two planes which get rotated by 45 degrees. The red plane is rotated by entering the angle in the transformation field while the blue plane uses a shape key with rotated vertices.

By using an armature you can avoid this deformation.
The bones' heads should be placed at the dodecahedron's edges and the tails at the center of the faces. I assume the best way to achieve this is to alternate using Shift+S > Cursor to Selection and Selection to Cursor.

The default rotation mode for bones is Quaternion. You can switch to one of the Euler angle modes to get the correct rotation axis. Gimbal lock should be no problem in this case as you're rotating on only one axis.


How do I set two object locations to be exactly the same? I have sculpted a character and retopologized it. I wanted to place them at the same location, so I set both their origins to the 3D cursor and moved them by 'geometry to origin', but both of them are not perfectly aligned. May I know how to make them perfectly aligned with each other without moving their position manually?

Set origin point to a common feature in both meshes thats easily identifiable, example - tip of the nose.
Now place both objects at same location and they should line up


Mipmaps look terrible in BGE standalone player. Can this be fixed? *NOTE* All of the pictures, unless explicitly stated otherwise, are with mipmaps enabled.  Click to get the full-sized images to better see the problem. *NOTE*
It really seems self-explanatory here, but to put it simply, if I enable mipmaps and play the standalone player, the scene's textures have a horrible-looking down-sized effect placed on them.  It is noticeable in all resolutions, from 144p to 1080p.

On the other hand, in the embedded player, this doesn't happen at all, no matter what the resolution is:

I have tried turning off mipmaps, but if I do that creates a very grainy and noisy image that is totally undesired.
So to put it one last time, I need to get what I see in the viewport into the standalone player.
These are my settings:

Thanks to anyone that tries to help.

When you let the BGE automatically generate the mipmap-textures it will partially result in blurred images. I do not know if there are parameters that can help generate better mipmaps.

To avoid automatic generation you can create your own mipmap textures and provide it in a dds texture file. You can create them with GIMP (DDS plugin). The drawback is the additional work. The advantage is that you do not need to do that for all objects, just the objects where the automatic mipmap generation is not sufficient.


object shrinks whenever I give it rigidbody physics I am trying to make this helmet that you see here below, interact with the ground using rigidbody physics.  However, when I give it an active rigidbody and push play on the animation, the object immediately shrinks really small, and the only way to get it back to its regular size is to undo the rigidbody.
(before )

(After)

Does anyone know why it is doing this?  Any help is appreciated! :)
(PS, I will give the link to my file below)

The helmet shrinks because you have a keyframe on the scale of the helmet. Have a look at the orange block on the first screenshot. It scales down over time (2nd screenshot).
Remove the keyframes, reset the scale to 1 and it should be fine.


How to display a image texture only on the outside of a object (cylinder)? I am currently trying to texture a soda cup, but have some issues with the UV mapping I think, because the alpha image that I add on the cup is also visible on the inside of the cylinder. What I want is that it is only visible on the outside of the object. I modelled the cup only with a cylinder object.
Material details
I've added the texture using nodes and a RGBMixer to get the transparent image. As you can see, the image is also visible inside the cup.
I tried searching for it on the internet, but didn't find anything related. Hope some can help me out!

If the object has different surfaces for the inside and outside of the cup, just assign a white material to the inside.
If there is no thickness and you are seeing the backface of the object on the inside use the Geometry > Backfacing information to control the mix between two different shaders.

Read more about the Geometry node here:
https://docs.blender.org/manual/en/latest/render/shader_nodes/input/geometry.html?highlight=backfacing
how to use a texture on each side of the same face
If you are using a solidify modifier read this answer:
Add different textures to front and back of plane with solidify?


Convert blender shhader to unity/texture My question is about importing a shader into unity. I know the question was already asked, but for me it doesnt work. Here you can see, what I tried.

this is the original and my aim.

This is with they combined as you can see.

And this with the diffuse  bake.
I have no idea why this doesnt work. I also tried to delete the light. But this also doesnt work.
Do you have any Ideas?

I found the answer. You  have to set the light to 100 percent lit, then you get a good looking result. But the second problem i with the black color line  inthe center of the thsirt. Here you  have to bake both materials at the same time,on the same picture. Finally you  get the result as you  want. In my case it looks like:


Comfortable Working of Selection Tool After changing the hotkey "Selection" tool began to work by clicking the Left Mouse Button+Ctrl/Alt (Select/deselect). I'm just fine with that, but there is one catch:

If use the Border Selection outside the object (LMB+Ctrl or Alt) this tool is working correctly, but if using it  within a object, before created selection is cleared.

For example:
If I need to add additional polygons to the current selection

1)

2)

What I need to change or add to this tool works correctly within the current object and  active selection is not reset?

Current HotKey:

There is probably nothing wrong with your Border Select key definitions, its probably the Select/Activate operator that is resetting your selection.

Try change it to either to a Mouse Release event or to Extend Selection by default, so there's no conflict and starting a border select won't unintentionally trigger the colliding operator.


merge 2 objects in sculpt mode So I've been studying the anatomy for a couple of days and I made de legs separately from the upper body. I now want to merge those 2 but I don't know exactly how I've tried a Boolean tool but it's not really working. Can you guys help me pls.

Thanks in advance !

To merge the legs with the torso, select the two objects (the legs and the torso) in either order, and press CTRL-J key. The object you select first gets merged into the object you select last, so if the first object you select is the legs, and the second is the torso, the surviving object is the torso. If the first object you select is the torso, then the surviving object is the leg object.

But why do you want to merge the legs with the body? In blender, for one element of a character (like a leg or an arm) to articulate relative to another element (like a torso) the elements need to be separate objects. After merging (or "joining") the legs to the body, moving the legs relative to the body (or the body relative to the legs) becomes impossible with ordinary modeling and animation techniques. So, if you're modeling a non-movable statue, go ahead and join the objects. If the character is to be animated, leave them separate. In fact, if the character is to be animated, you probably want to separate the legs into four objects, one object for each of the lower legs and and one for each of the upper. Similarly, when you get there, if the feet and hand are to be able to articulate, each foot and hand will need to consist of multiple objects, depending upon how detailed you want the animation to be.

To preserve the ability to animate the character, you would use a different mechanism in Blender: you'd parent one object, for example an upper leg, to another object, the torso, and in turn, parent the lower leg to the upper. There are several tutorials available on Youtube easily located by using your favorite search engine with the parameters "Blender tutorial parent objects".


Object does cast shadow, but doesn't get physically darker I have modelled a stool, and textured it, however, when a light it shone onto the object, it casts a shadow as intended but the object itself doesn't get darker.
Here is a file with the stool I've made and the textures used:
https://drive.google.com/drive/folders/1Id3lPOutqwnDUSGzUA8RlaTLruxY6V7I?usp=sharing
And an image too:

Edit: Turns out the normal map is creating this issue, once disconnected in the node editor, the object darkens. Anyone know why this happens?

I'm not sure what's going on. I downloaded your files, I opened the file, I had to go to External Data - Find Missing Files, but that's just because I moved them, I think. Either way, without changing anything else, this is what I get:

So, I'm not sure if there's something wrong with your version of blender, or graphics drivers or whatnot, but it seems fine on my end.  For testing purposes, as well as easier shareability, I am including the .blend file in this post with the textures packed.
File is here -
If you're still having problems, one thing I can recommend is to swap the sun lamp for a large area light - I always find it casts better shadows and doesn't give such uniform brightness, but that's just me.
Hope this helps.
EDIT - Because you mentioned the normal being a problem, I looked closer at it and noticed your normal map is connected through a Normal node, as opposed to a Normal Map node as it should be.  I have included an image below of the correct node setup, for reference.


My model has a strange line on it and the mesh seems seperated I've started learning blender, and I'm trying to make a mug, but it has a line on the object mode view. It seems to be because part of the mesh is seperated, but I don't remember doing that. Help?

Select all vertices and in the search bar, (F3 or space) search "remove doubles." This will connect the vertices.


Why wind effect wont affect rigid body simulation in 2.8? I have a simple setup.

An active cube and a passive plane with rigid body physics activated.
An empty with wind physics activated and the strengh set to 1000.

When I play the animation, nothing happen except for the cube falling on the plane...

Did I miss something ?

yeah this is a weird bug. Try this workaround. Add a particle system to the cube and then delete it straight away without running the animation. Now run the animation and the cube is blown around as expected.


Is there a way to paint/remove part of this texture? So I have these road lines that I have created with a brick texture an mapping, ive repositioned in everyway and I have gotten the perfect size for them! but I would like more space between them, is there a way I can remove ''some'' of the lines without removing them all? like an Eraser tool of sorts?

You can use this Robin Betts' answer and limit the width of the stripes with a mask
Then you can adjust gap and stripe length independently :).


Increase Photo-realism in Final render I've been working on making some goalkeeper's gloves in blender 2.8 and I feel like I've got the shape and model pretty realistic but just can't the materials, especially the latex of the palm, to look real. I've attached some of my renders below and am hoping someone might have some tips for me. The last photo is the reference I've been using. Thanks for any and all help.

Use a better lighting, possibly with an HDRI in your scene. A part of the reason why the textures look unreal is that they are completely grey and flat.
Use image textures and include slight bump mapping for things like the fake leather and so on. What I like to do is get, for example, a leather texture that might be any colour just for the texture, then combine the colour input with a MixRGB node to what I want.


How can I uncomment "#" a line using python? I looking for this

#My line    <=== is commented

after running my python script

My line     <=== is uncommented

IS there any way to get an executable code by reading a commented line?

Yes it is possible, but not very useful. The following naive code attempts to change line 4 of its text block within Blender. The function modify takes 4 arguments.

name - the file name of the script
lineno - the line number to change (zero based)
orig - the original start of the string to change
repl - the replacement

So if you execute the script twice, the code will be commented again. The script will attempt to find its own file name in the last 2 lines. Only tested for Linux.

import bpy
import ntpath
#this is a comment
#print("Hello Blender!") # this is code

def modify(name, lineno, orig, repl):
    t = bpy.data.texts[name]
    s = t.as_string()
    l = s.splitlines()

    if l[lineno].startswith(orig):
        l[lineno] = l[lineno].replace(orig, repl, 1)
    elif l[lineno].startswith(repl):
        l[lineno] = l[lineno].replace(repl, orig, 1)

    t.from_string("\n".join(l))

head, tail = ntpath.split(__file__)
modify(tail or ntpath.basename(head),3,"#print","print")


Blender Python mesh.from_pydata? I want to generate a mesh with this command I found in the API:

mesh.from_pydata(verts,[],currentFace)

But this gives me an Error:

File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\modules\bpy_types.py", line 409, in from_pydata
self.loops.add(sum((len(f) for f in faces)))
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\modules\bpy_types.py", line 409, in <genexpr>
self.loops.add(sum((len(f) for f in faces)))
TypeError: object of type 'int' has no len()

I don't know why my script can not make a mesh from the variables verts and currentface, which are both lists. I also printed a line before to check their type again and whether they contain elements:

print(verts,currentFace)
>>>[[40.0, -10.0, 70.0], [40.0, 11.0, 80.0], [40.0, 11.0, 35.0], [40.0, -10.0, 30.0]]
>>>[0, 1, 2, 3]

Could someone help me out? Thanks.

Blender includes a sample template file that uses from_pydata() which you can get in blender's text editor from Templates->Python->Addon Add Object

The key portion is -

def add_object(self, context):
    scale_x = self.scale.x
    scale_y = self.scale.y

    verts = [Vector((-1 * scale_x, 1 * scale_y, 0)),
             Vector((1 * scale_x, 1 * scale_y, 0)),
             Vector((1 * scale_x, -1 * scale_y, 0)),
             Vector((-1 * scale_x, -1 * scale_y, 0)),
            ]

    edges = []
    faces = [[0, 1, 2, 3]]

    mesh = bpy.data.meshes.new(name="New Object Mesh")
    mesh.from_pydata(verts, edges, faces)
    # useful for development when the mesh may be invalid.
    # mesh.validate(verbose=True)
    object_data_add(context, mesh, operator=self)

Of note is that the vertex list is a list of Vector() items and the face list is a list containing items that are each a list of vertex indices (eg. a list of lists), multiple faces should be entered as [[0,1,2,3],[1,2,5,6],[0,1,7,8]] - this is most likely the source of the error you see.


How to Rig in easy and simple way I have finish my new character with material. Time to rig and pose the character.

I want to know is there any addon or tutorial which can help me to rig my character or pose. I want my character to hold a stick in hand. Any suggestion or help. Thanks

One easy way is to use the Rigify add-on.
Check the tutorial « Quick Rigging With Rigify in Blender » from CG Cookie.


How to distribute light equally on a surface? I have the following setup:

The black rectangle is my light source, the gray panel is the rendered panel.
How can I distribute the light in an equal mode on the panel?

I'm using Cycles in Blender 2.79

Use a sun lamp pointing directly downwards, and set a non-glossy material for your wooden plane, e.g. a simple diffuse one:


Simulating balls falling into a mesh. Why do I get different results each time? So basically I've an array of about 700-800 spheres that will fall into a box. What I am trying to do is, after the balls settle they spell out something. I did that,by going to the last frame of the animation and selected some of the balls and colored them differently so that I get my text. But when I went back to my first image and rendered the animation, the last frame is not the same as I had made it. Is there something I should try doing or is there a better way to do what I am doing?

You should bake your simulation before you colour them. This way they will keep the lock down your simulation so it wont change. This also helps speeding up the play back since it no longer needs to solve the simulation.


Animation Node 2.0 Object Instancer question we're trying to understand how Animation Node 2.0 work.
We usually use Cinema 4d and mograph, but we would like to try blender.

I've noticed that object instancer accept only a single object, and i cannot use a group as input, neither a object list or something else.

parenting object doesn't help too.

Join is not considered, because let's say that we want to animate all sphere with their center, and keep al as parametric as possible.

I'm sure i'm doing some mistake.

Someone can help us please?

Thanks in advance.

Max.

Animation Nodes is a powerful system, but it is bare bones in certain aspects. The best way to make something like your scene is by using procedural methods.

Lets say you have m number of polygons, you want n number of spheres to be sticking out of each face, then you should instance a sphere m*n number of times. To position the spheres we will need the polygons centers and normals. We will repeat the list of the centers and normals n number of times to match the number of spheres. All we have to do is to set the location of the sphere to the the center plus the normal multiplied by some factor, the problem is that there will be n number of sphere at each face. So to solve this, the factor will be constant for each layer of spheres but increases by each layer. From that reasoning, we can implement this like this (Let me know if you need a more detailed explanation):

This will result in:


Smooth out a concave edge Hey guys beginner user here.
I'm trying to model a skateboard to get the hand of using blender and I was able to get the basic shape down except I have an edge that is too sharp. I tried multiple technics but I was unable to get it to work.
This is what I have:

What I'm trying to smoothen out is the hard-line where the body meets the tail. make it look like a more round edge.
what am I missing here?

This is generally a result of the complexity of working with the subdivision surface modifier. The closer together your edge loops are, the more of a "crease" you will get.
To solve this, I would recommend individually selecting the edge loops on each side of the center edge loop where the crease is and edge sliding (double tap G) them away from each other until the "crease" is smoothed out. As an aside, you should consider if those three edge loops are even needed: is it possible to get away with only one?
Please edit your post to share your blend file too - it would really help!
You can use this site to share blend files: https://blend-exchange.giantcowfilms.com/


Macbook trackpad very slow scrolling/panning (disable acceleration?) I'm having issues scrolling in any toolbar or view in Blender on my Macbook Pro 15" (Late 2016).

If I use two fingers, and move them rather slow over the trackpad, almost nothing happens. I need to scroll at a rather high speed, and thus losing precision.

MacOS doesn't work at all like this normally, so it seems to be something with Blender.

Is it possible to completely disable acceleration, so it's 100% linear? That would help a lot!

I made a short GIF to show what it looks like, but it's hard to see how I move my fingers on the track pad, but in the beginning I move them slowly, across the entire pad:
http://i.giphy.com/l3q2GD57N6muCHh3W.gif

I have the same issue, I'd suggest using a mouse with a scroll wheel, makes life much more easier.


Insert new vertices into face using pyhton & bmesh I want to add vertices to a face. Can I only do this by redrawing the whole face with bmesh.faces.new(loop_vertices) or can I also just add some to an existing face? The documentation states that the BMVert sequence of a face is read-only.

Subdivide an edge or edges.
Just as with using the UI to add another vertex to a face would require subdividing an edge.
The loop vertices that define a face, will also be a part of another faces loop verts, if connected via an edge.  Bmesh gives us a quick API into  all the loops and linked geometry of each element. In most cases these are read only.
To add a single vert to an existing faces verts, requires subdividing one edge.  Using the bmesh subdivide edges operator will ensure that the links and loops are  correctly maintained.
Simple example, using active face and subdividing the zeroth edge.
f = bmesh.faces.active # the active face
bmesh.ops.subdivide_edges(
        bm, # the bmesh
        edges=[f.edges[0]] if f else [], # zeroth edge  if face
        )

This will ofcourse add an edge also.  If another face shares the edge it will also share the newly created geometry.
How to subdivide mesh with Python and Blender 2.8?
How to use "bmesh.ops.subdivide_edges" on selected edges
import bpy
import bmesh

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

f = bm.faces.active
e = f.edges[0]

bmesh.ops.subdivide_edges(
    bm,
    edges=[e],
    cuts=1,
    edge_percents={e : 0.33},
    )

bmesh.update_edit_mesh(me)


Attribute Randomize node is missing 'add' i am following a tutorial and the node is missing the add option.

I'm guessing you're talking about the Default Cube tutorial. He's using the 2.93 alpha build and you're probably using 2.92. Anytime you're not getting the same options in a feature, it's probably because of a version mismatch. I did however find a workaround in 2.92; here's what worked for me after a little experimentation:

I imagine there's a better way to do this, but it's my first time using geometry nodes. I'd love to hear constructive criticism about this setup.


Is there a way to Prevent Meshes from going through one another? I want to treat my individual meshes as solid objects where the other mesh is unable to pass through them. If I were to push the mesh into them for instance, it would stop at the border of the mesh instead of continuing through.

Is there a way to make these meshes have these "barriers" so to speak?

If you're referring to while you're editing the scene, this isn't really possible. For animations, you should research Blender's Physics Simulation capabilities.


UV unwrapping and efficient island packing? I have been trying to unwrap my model after following some online tutorials on this topic, in the tutorial, the instructor said that all sharp edges should be selected and then marked as seams for whatever hard surface models you are making, is what the instructor recommend right? Because right now there are tonnes of small islands as shown in the photo (mainly placed near the boundary after I unwrap the model w/ all sharp edges marked as seams)

On the other hand, what is the 'correct' workflow in packing islands to make the UV map user friendly? Should I place islands that are of the same object together in the UV map to make it more intuitive for users(for example all selected mesh of my model in photo packed together in certain area of the UV map)? Or no one cares about the positioning of these small islands actually (I plan on texturing the whole model later)?

I am just learning this myself, but since nobody else has jumped in, I'll chime in with my 2 cents... I certainly don't mark every "sharp edge". It is good to mark at a sharp edge, but not necessarily "every" sharp edge. I try to mark along lines where I expect the texture to change, and I try not to mark through areas where the texture will stay the same, especially places like the middle of a floor or wall or other large flat-ish surface. The more patterned the texture is, the more obvious it will be if you mark across it (imagine a tiled floor where the middle of the floor has a line through it where the tiles don't line up).

This way it is somewhat easier to texture, and once textured, the seams are not so visible. Of course, this is not always possible without severe stretching, so in cases where I MUST mark across an area where the texture doesn't change (to relieve stretching/squashing), I try to do it at a corner (or sharp edge, like where a wall meets the floor) or a place where it will seem less noticeable (with the grain for a wood pattern, behind an obstacle, in a dark area, etc...).

I don't worry much about where the "parts" land on the UV map. It would be ideal if everything with a matching texture were to land close to each other on the map, but I have tried and not yet found a way to do that without extensive effort after unwrapping (open to suggestions). It's easier to pick through it while texturing than to move things around beforehand.

Like I said, I'm just learning this myself, so let's hope someone with more experience will pipe in with some really good tips.


Blender 2.9, is there a way to select the collection in outliner when an object in that collection is selected? I'm working on a large scene, I organized the objects in collections and I need to duplicate some of these collections and transform them, the process so far is:
1- Select object in viewport that is included in the collection I need to duplicate.
2- Go to outliner, press . in Numpad to focus the object.
3- Scroll up or Page Up until I find the parent collection (some of these collections have a ton of objects).
4- Select the collection, right click, duplicate.
5- Select the duplicate collection, alt+RMB to select all objects ("I assigned that shortcut to do this functionality").
6- Transform the objects in the new collection.
That's a lot of moves just to get a collection duplicated and transformed. to make this easier, I'm trying to find a shortcut to select the collection by one of it's memebers (so remove steps 2 and 3).
What I know is that I can select all collection members using one selected member directly from viewport by Shift+G and choosing collection, but that wont select the collection itself, only the members, and if I duplicate these, the duplicates will be inside the same collection. In the Outliner itself, there seems to be no menu or shortcuts, aside from right click
My question is: Is there an operation or shortcut to save at least steps (3 and 4) above? Which is to select the collection in the outliner when I have one of its members selected?
To Elaborate More: In 3DS max, when you put all objects in a group, the group itself has priority, so in the viewport, when you click an object, you select the group that contains that object, when you duplicate, you duplicate the group, you can still amend that group, by opening the group or exploding it, the concept with collection is the same, but ergonomically in Blender, it is flipped, the collection system is tucked in the background with too many required steps to reach and tweak, so am I doing something wrong? Is there something that I'm overlooking or I don't know about that will make this process intuitive?

No solution, just a workaround: I sometimes use the fact that the collection which holds the selected object has got a highlighted object symbol. If there's too many levels of hierarchy visible in the Outliner I press A to select all, Home and Numpad - so everything is collapsed. Then it's easier to find the collection with the highlighted symbol.
If you want to transform all objects in a collection at once without using Shift+G in the viewport or RMB+Click in the Outliner it would be best to parent all objects to an empty per collection.
You can also instance a collection or create a linked duplicate. In the Outliner, RMB+Click on the collection you want to duplicate, then choose either Duplicate Linked or Instance to Scene from the context menu. Test both to decide what works best for your needs.


Subdividing causes details to "lift" off object Still learning my way around Blender, so I apologize for the newbie question.

This is the piece I am trying to work with before applying the subdivision modifier.
[![Unaltered mesh][1]][1]

Here I have altered the mesh a bit by dividing some faces and using extrude region to add some detail. I go and use the subdivide modifier. I want sharp creases on the extruded area, so I crease the areas to 1. Once I do that the corners lift off the base mesh.

How do I fix this? Is there a better way (different method) to use to add the detail?

Example Blender file: https://blend-exchange.giantcowfilms.com/b/2501

You can add detail using creases, loop cuts and extrusion without a problem.

The subdivision surface modifier does not work (well) with triangular faces or ngons. It works best with quads (faces with four vertices).

Subdiving can cause triangles to appear, be aware that you may have to alter your geometry.

Try joining the triangular faces to merge into quads by selecting all A and pressing ⎇ AltJ. The triangles to quads operation can also be found under Mesh > Faces > Tris to Quad.

Or do the convex hull operation. In edit mode under Mesh > Vertices > Convex Hull.

In your case there are two bad edge loop. Select them with ⎇ Alt RMB. Then delete them with X > Edges.
Then select all Aand press ⎇ AltJ to convert tris to quads.

Now you can crease the edge loops.

The topology still has a problematic edge, delete the two edges as shown in the following image. Subdivide the center edge, with W > S. Then fill in the missing four faces with F.

The vertical edge crease will work now. Read up on proper topology and edge loop flow.


How do you make objects not collide and pass through each other? In the game engine I'm trying to make the different types of enemies pass through each other, and only interact with either the player or the player's weapon. I've made them rigid body objects, and tried adding them to different collision groups but that doesn't seem to do anything.

Collision groups are the correct way to do this.

Set your "bad guys'" collision group and collision mask up like this.

Set the "good guy" up like this.

Now here is why. The Collision group is conceptually assigning a number to the object say 1-8. Your good guy has collision group one. The Collision Mask is what number collision group it can collide with.

So looking at your bad guy, it can only collide with other objects that are assigned to collision group 1. Itself is set to collision group two so it will not hit other bad guys. Your good guy is set to collision group one, and it can collides with all groups.

Blend file with bge collision demo.


OBJs not importing to Blender 2.8, is there a workaround? I've very quickly sculpted a few items for a scene I'd like to do a base render for in Blender - and I was hoping to take advantage of Eevee.

However, when I try to import the OBJs, I get the following error:

When I import into Blender 2.78, it's fine. Is there something simple I can correct here?
Exporting an OBJ of these models after importing to 2.78 will not open in 2.8.

Small OBJ available here as an example.
Mushroom OBJ

Thoughts and tips appreciated, as not having to pause for renders would help my art workflow. Thanks <3

Import it in 2.79, save it as a blend and open it in 2.8


How can I attach this hand? How do I successfully attach this hand I made to my forearm, without creating extra geometry. I just can not seem to connect them properly, and when I subdivide the surface or knife bisected the lines to create extra vertex points, it messed up my faces on the rest of my forearm and wrist area.

You need to reduce your topology to be able to make the joint. Try to avoid triangles because it can create ugly artefacts. Typically you can use the method above, but it won't work every time. Here a site about topology. Maybe share your file here so that we can test some solutions?


Is there a way to control children hairs so they don't cut through a mesh? I need to have the children hairs spread out so that it covers the hea, unfortunately this causes the problem of the children hairs not following the mesh it is on and cutting through the mesh, unrealistically.

Try using interpolated children instead of simple.

Interpolated children are interpolated across the surface of the mesh between the parents. Simple children, on the other hand, are just placed in space around the parents.

Here is a comparison of simple vs. interpolated (click to enlarge):

The left two planes are using simple children, the right two are using interpolated.  You can see how the simple children are hovering in mid-air, poking through the mesh, and not evenly spaced.  While the interpolated children stay on the surface of the mesh and are more evenly distributed.


Constraint the camera to look at an object In my scene I have a camera sitting at the origin. I would like to contraint it so that it always looks at the center of a given object. But the camera should not change its position.

I found some answers using a "TrackTo" or "LockedTrack" constraint but could not manage to make it work.

Could I probably use a Driver for this and if yes, how can I adjust it?

Thanks in advance!

Set the camera with a Track To constraint.

Select the "Target" object.
In the "To" section select -Z and in the "Up" section set it to Y
Use World Space

The camera will then point at the target object's origin.

To understand those settings you have to think of the LOCAL AXES for the camera: X is Horizontal, Y vertical and Z is depth. Negative Z is what is in front of the camera.

To maintain the object's Z axis aligned at all times enable Target Z.


Gradient colors ramp Shader Node - Vertical and static (animated object) I am trying to create an animation similar with this image:

and this is what I created:

using this node:

I'd like the colors to remain in same position while the helix spring is rotating.
This is my result, but I am not satisfied, the colors should be similar with first picture and remain in same position while the helix is rotating:

As @Allen Simpson has commented:
If you use a single cyclic Bezier curve, given thickness with its native Bevel, (set in its  Data tab > Geometry panel,) it is automatically mapped 0->1 in U along its length.
So a node arrangement like this can set the color-ramp's range of colors along its length:

The Add and Wrap nodes are optional: changing the 'Add' value shifts the whole range along the curve.


How to generate smooth vertex weights from edge/face selection? I am rigging a character for animation and am sick of manually "painting" the vertex weight corrections because I always get bad results. Is there a way to auto-generate weights based on a selected edge loop or face loop?

I have a problem transfering the vertex weights to the shirt, so now I have to touch it up again, and it is very difficult to do with the brush. Notice how the hem of the shirt doesn't have nearly enough weight (if any) applied to it (note: this goes for the ends of the sleeves and the collar too). I have to paint these weights in by hand, but if I do, it's going to look splotchy and I will not get a clean result.

What I would like to do, is just select all those faces and say "based on this face loop, generate new vertex weights with Smooth Falloff and an intensity of 1.00 (or whatever). Can this be done?

This could be it: Gradient fill. Blender's best-kept secret.

https://youtu.be/bQBlMTt8SrU


Adding blender cloths to a make human model I have added cloths in blender to a model imported from Make Human.
I linked it with the rig on the make human model using automatic weighting.

Normally it is alright:

But in some cases the model shows though the cloths:

Is there any way to prevent this from happening?

First you select the bone for the upper half of the arm, then edit the weightpaint map, in Weight Paint Mode (Ctrl + Tab, while in object mode), such that the parts that are not supposed to be affected by the bone are blue.


Where is the edit panel for SCA tree generator? After adding tree to scene there is no editing panel. Where can i find this?

It usually showed up in the bottom left corner.

You should hit that little plus button at the bottom. Or use F6.


There is a missing part at my object when I render in cycles This is my model in the solid view, we can see it is complete.

but in the render view or in the final render it is clipped :

here is my viewport clipping settings :

I have added a cube to the object in edit mode ; the render shows me all the form but not the cube!!!! as you can see

to clarify:

I added to the object (in edit form) a cube and move it far away. Now the render shows all the form as if the new mesh is moving some clipping plane...

I don't entirely understand what you were doing with the troubleshooting, but the problem may be the camera clipping.

In the Properties Panel (N while cursor is in 3D view) you can change the viewport clipping.
By selecting the camera and going to the camera properties you can change the camera clipping.

Increasing these values will allow more of the scene to be rendered.


Glitchy-looking transparent alpha channel PNG when imported as "Image as Plane" in Cycles I'm following this tutorial, and when I import the reference image I get a glitchy plane:

(the one on the right is the Image as Plane, while the one on the left is an Empty with an image)

I have made sure that the image, found online, was transparent, using Photoshop:

In trying to troubleshoot this, I have looked at this question, but it doesn't help me, as I can't reproduce the steps given in the answer.

Basically, I'm stuck looking for parameters for this object. There's nothing in the Object Data panel, I tweaked Viewport Alpha in the Material tab but still nothing...

When you click import images as planes and the file browser opens, in the lower right, under 'import images as planes', you need to check the  use alpha checkbox, or you will get bizarre alpha junk.  Why this isn't a default I have no idea.

As an alternative on the UV/image editor press N to bring up the options window and enable "Use Alpha"


Many models sharing the same animation sequence? I would like to share animations sequences between models (if possible).

There are currently several models and more will be added soon. All of the models need to execute the same animation sequences like walk, run, fight, etc. These animations will be seen from different camera angles since they will be used in an isometric game.

I would like to automate the build process. Is it possible to link an in-house 'standard' armature (set of bones) and make all of the artists bind different meshes to the same rig, and then animate the standard rig?

I know that it would limit the artists since they would be forced to fit the models they make to the rig, but I hope it would give us the ability create more animations quickly and at lower cost than using custom animations. Is this possible?

The key to sharing animations between objects is actions. An action is a sequence of animation keyframes that is linked to an object. The Action Editor is a sub-editor of the dopesheet.

When you have two or more objects that you want to share an action, select the new object then select the action in the action editor.

When you play the animation you will find that the two objects will now move in unison. There are two ways to adjust this, one is to make the animation unique to the object by clicking the number next to the Action Name. This duplicates the action, similar to duplicating a material etc. making it unique to the object allowing you to adjust the frames that the action is performed on.

Another option is to use the NLA Editor to adjust timing of the action.

Here you can see that metarig is playing action LiftLeg from frame 1, metarig.001 also has the LiftLeg action associated with it at frame 1. By clicking the down arrow icon (the arrow will be in 2.71, in earlier versions it looks like a snowflake) in line with metarig.001's LiftLeg action it will turn into an NLA track as seen with metarig. Now you will be able to adjust the action timing.

You can easily drag the action in the timeline to alter the start frame, but if you open the properties sidebar (press N) you also get access to more options like scale, repeat count and blend mode. Scaling allows a character to perform the action quicker or slower than other characters. You can have several actions for an object in the NLA at the same time and choose how they blend together, so you can have you character walking and then have a wave action override the arms at a given time.

Here the metarig repeats the walk cycle 5 times and just before the third time he starts waving.

If your using the game engine then you can use an Action actuator to play a specific action when you want it.


Revert to default scale when seed changed? So this is the problem. This is the node network I have (simplified). it just takes random list from objects and should change the scale to zero when value is animated. It works but, for instance if the animated scale gets to 0 and after that I want to change the seed of the random selection, those scaled down do not go back to scale 1, but stay scaled down, thus the effect is added. Any clue how to get them back to initial scale? Thanx in advance.

Your approach doesn't explicitly set the scale of all objects, some of which might have been scaled to zero at some point, so their scale never reset.

To fix that, generate a list that define the state of each object, then use that list to control the scale of objects in whichever way you want. It is clear to me that you want to control how many objects gets scaled to zero, so to implement that, we are going to generate a list that has a certain number of zeros, with ones for the rest of the list, such list can be generated using the Fill List node. To make sure it is randomized, we can shuffle it or shuffle the object list itself as follows:


My CPU is still faster than my GPU When I render something with blender my CPU is faster than my GPU. Why is that?
My GPU is Nvidia Geforce GT730 2gb  and my CPU is intel i5

Increase your tile size.

Your CPU is like Usain Bolt, and your GPU is a lot of turtles. Enough turtles will cover more total distance travelled than Usain Bolt going at full speed within the same time.

Likewise, your GPU will process more pixels at the same time, although slower, so increase the tile size.

You will need to experiment, though, with various values. You will need to find that sweet spot for your GPU and scene. If your values are too high, your GPU might not have enough cores to process an entire tile in one shot, so you might get that lag.

UPDATE

Your GPU has 96 cores running at 700 MHz. This explains why you may not be getting a very big GPU benefit no matter how you tweak the tile size.

In comparison, today's latest budget NVidia GPU is the GTX 950, which has 768 cores, running at a slightly higher 1024 MHz.

I advise you to upgrade your GPU.


Want to Reduce "shininess" of Model I am creating a poker chip model for Tabletop Simulator.  When I import it it's quite shiny, that is, it reflects light, and I don't want that.
My research indicates that I have to modify the node and do something with specularity.  However, when I change to node mode Blender tells me that no node is available.

In blender internal set the Specular Intensity value to a smaller (or Zero) value.


Carving openings in a terrain for already built subterrain structures I built a structure that is mostly underground but whose entrances (three) are partially above the surface.
.

I can duplicate the vertexes and edges where I want the openings on the terrain, but then I have to create the terrain and to sculpt it or modify someway to create something similar to this image.
 and the front view .

The problem I have is that when I try to sculpt, the opening gets deformed as well. Also that happens when I use proportional editing. Is there something I missing, or just a simpler way to do this in Blender?

Sculpt your terrain the way you want it too look. At this point do not worry about covering the entrance to your bunker. Just get the height along the sides and top where you want it.

In this picture I have my terrain set to be partially transparent so you can see the bunker entrance I covered.

Add a cube, transform it so that it sits inside the walls of the bunker entrance. Make sure that the cube extends a bit below the low point of the terrain, and above the high point. In this image my new cube is selected in orange, notice the bunker walls around it on every side.

Now select your terrain and add a boolean modifier. Set the Operation to Difference and set the Object to the cube you added in the last step.

Once you are sure that everything is set, you are not going to move the bunker entrance, and the cuter cube is in the right place, apply the boolean modifier. I always duplicate my object and move it to a different layer before applying modifiers like this

This is what it should look like after you apply the boolean modifier. The door will still be blocked off, but we will fix that next. (circled in red in the image below.)

Last step, Tab into edit mode with the terrain selected. Select all the faces the boolean modifier created, Bottom sides, and any little faces on the terrain that are completely inside the entrance's walls. (you don't need any of the sides, because they are in the entrance object). When you have your selection done, press X or Delete then choose Faces.


Object B's position to Object A as a controller for object A's animation The best way to describe what I'm trying to do is the example of a mickey mouse head. Facing the head from the front the ears are full circle, both on the same height. When viewed from the side though they retain the full circle while one sets lower than the other. (the object B in this case would be the camera)
I basically want to have certain movements to happen depending on where object B is in relation to it or its bones. Is this achievable in Blender?

If I correctly understood what you want, you could do it with a Track To constraint: Give your object A an armature, and give the bone that is supposed to move according to object B a Track To constraint, with the Camera as the Target. Now when your Camera moves, the bone will follow.


Mesh different objects uniformly I want the maximum polygon size to be the same for all my objects. I am using the remesh modifier to generate many faces, but I would like to specify how dense the mesh is globally, rather than relative to the object's size.

Example:

Here are the settings I'm using for all objects:

ob.modifiers["Remesh"].octree_depth = 5
ob.modifiers["Remesh"].scale = 0.99
ob.modifiers[0].mode = 'SHARP'

I was thinking I could play with the scale? How would I adjust scale appropriately to get polygons of the same size? Not sure how to go about this..

I do not currently have a Blender here to test my theory, however I am pretty sure, that applying scale would solve your problem. Check the three scale values in the properties panel. If they are not the same on the two objects, that could be the problem. hit ctrl + A and select apply scale so the scale is set to uniform one.


Shadow Detached from Object I'm very new to Blender. After creating this chair, I added a flat plain for the ground and have confirmed the my chair is snapped to the ground plain. When I added a light, I noticed the shadows are detached from the chair legs, as if it were hovering above the ground. Any idea what may be causing this?

Select the light you're using to light the scene, click the lightbulb on the properties panel, and go down to where it says "Shadow". Under that section, check the box that says "contact shadows"


Attempting to move Vertices in 2.80 creates new ones instead I have a model that is basically a cylinder.

Several vertices on the top are slightly raised, creating a 'bump' which I want to get rid of.

I've tried using Slide (Shift-V) to move them, and setting the position numerically (N), both individually and with several grouped, and either nothing happens at all, or it creates new vertices instead of moving the old one.

In the below screenshot, I selected every vertex on the top, then pressed S, Z, 0 which my Googling said would set them all to the exact same height. Again, it created new vertices (at the correct height) but didn't change the ones that are incorrect that I'm trying to move.

(Not very easy to see, sorry, but if you open the image full-size in a new tab you can see the new yellow selected vertices below the ones I want to move)

Clearly I am a complete noob when it comes to 3D modelling, still struggling with some of the basics, but this one has me completely stumped.

I don't know if this is significant or not (see noob above), but the lines connecting those vertices are black, while the lines connecting the other vertices around the top are grey.

Had a sudden flash of inspiration... there were multiple vertices on the same spot!

After selecting them all and doing S, Z, 0 I then selected what looked to be the old unmoved ones as well, and did S, Z, 0 again. And then added the 'unmoved' ones to the selection again and did S, Z, 0 yet again.

At that point, it became clear that that was the issue.

A couple more rounds, and the 'bump' is finally gone!

Wish I'd thought of that before bothering you all, but hopefully this'll help someone else in the same boat!


Cloth simulation acting weird I am following a tutorial for making a Christmas hat, and my 'hat' acts slightly weird. Actually it compresses very strangely while there is nothing really paranormal in my settings.

Does anybody know what causes the mesh to deform so weirdly?

Before the simulation:

After few seconds(2s) of simulation:

Simulation settings:

Tutorial: https://www.youtube.com/watch?v=xEp15H4AXfM

Since you dind't upload the .blend it is hard to tell what went wrong. I started with a circle extruded it and scaled the the tip before add some loop cuts.

Check the order of the modifiers

I also reduced the gravity and parented the hat to a sphere to see the deformation:

See the attached .blend for details and vertex groups


How do I get part flat on z axis? When I start blender the z axis is going through the center of my part. I need the bottom of the part to be flat with the z axis. I have watch dozens of videos and nobody covers this because when they start blender their part is the way its supposed to be.

If I understood correctly you want the bottom of the cube to be at z height zero.

You can edit the cube in edit mode (press tab), select all the vertecies (by pressing a) and then move them up by 1 (gz1).

After leaving edit mode again, you can set this scene to be the default scene when you open a new file by pressing Ctrl + u. If you open a new file now with Ctrl + n, you will find that the bottom of the cube is aligned to z=0.


How to make gravity respect the scale in Scene > Units? I need to assume 1 BU = 1 cm, for use with Unreal Engine. That's because I can't use the FBX exporter's "Scale" value - it's not recognized properly in Unreal.

In Scene's settings, I chose Metric and changed the unit scale to 0.01. Everything is correct expect for simulations :/ Object are falling slooowly...

I can't set gravity to -981.0 - Blender clamps all values above 200.0. So, what else can I do?

Oskar

Under the scene settings there are also settings for the Rigid Body world. Instead of increasing the gravity, you could just increase the simulation speed there. Setting the speed to 100 will make the simulation look like the gravity was -981.0 in Blender.


How to get better displacement result I'm drastically displacing a mesh (with procedural textures) and due to the displacement being rather big and practically "vertical" there aren't enough polygons and it starts to look very stretched:

Is there a way to get more polygons for these vertical walls? I know that Vector Displacement allows to move polygons in all directions, so I guess I could use the polygons on the bottom of these wholes to "line the walls" but how would I achieve this?

(PS: I'm creating this for Nodevember, that's why it's all on a simple sphere. Obviously, if it was for anything else, I would simply model this shape)

I don't think this is a polygon problem, you are just stretching the texture so much it just has nothing to put on this side of the brick, it has no information. It's just not possible to do this this way, you have to model it and texture it manually


Setting objects into edit mode often seems to fail in python script I am only just starting to learn/use python in blender.  I have the following script

import bpy

for obj in bpy.data.objects:

    if obj.name[0:4] == "Text" and obj.type == "MESH":

        bpy.context.scene.objects.active = obj
        bpy.ops.object.mode_set(mode = 'EDIT')
        print(bpy.context.mode)

        #bpy.ops.mesh.select_all(action = 'SELECT')
        #print(bpy.ops.mesh.remove_doubles(0.0001))
        bpy.ops.object.mode_set(mode = 'OBJECT')

I am trying to work out why I keep getting a context error for bpy.ops.mesh.select_all so I added the print(bpy.context.mode) line and commented out the line that was failing (plus the next line which takes action)

what I get in the console (this script is being run from the console rather than run in place) is a mixture of 'OBJECT' and 'EDIT_MESH' outputs.. suggesting that mode_set is failing a lot of the time.

What am I doing wrong?

I am using blender 2.68a on Windows 7.

Edit I discovered the actual cause of my issue (hinted at by Adhi's edit) and wanted to add it to my post so that others can take something away from this - the objects that were not being switched into edit mode were on another layer.  Once I made all layers active my script was able to switch all objects into edit mode.  So basically an object in an unselected layer cannot be set into edit mode.

I am also grateful for the other help and suggestions, they have been useful to help me learn python scripting within blender which is something I would love to use more extensively.

As mentioned by dimus, your problem is solved by adding keyword to the mesh.remove_doubles operator's first argument, meant as threshold property value. With that little bug fixed, your script works properly.

What causes the error is that, keyword arguments are used to set operator properties, and positional arguments to set how the operator is called (further explained in the API docs). By not using a keyword for the first argument, you're turning it into a positional argument, thus interpreted as operator execution context which is an error.

EDIT: Another possible error is iterating over bpy.data.objects, which comprises of all objects in every scene in a file. The script is bound to fail if there's more than one scene in a file containing a MESH object, because it'll try to make object from a different scene the active object of current scene which is contextually incorrect. You should iterate over bpy.context.scene.objects instead.

Here's the amended code, can't see any other bug:

import bpy

scene = bpy.context.scene
scene.layers = [True] * 20 # Show all layers

for obj in scene.objects:
    if obj.type == 'MESH':
        scene.objects.active = obj

        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.remove_doubles(threshold=0.0001)
        bpy.ops.object.mode_set(mode='OBJECT')


Problems with the Mirror modifier I'm trying to make mirror effect on the x axis, and using the Mirror Modifier,
where I have set the pivot point in the middle of the car but it doesn't make mirror effect.

I have tried to change the orientation global, local etc - I have tried to make it with or without clipping in mirror. I have also tried with or without bisect on, using the mesh mirror interactive mirror global and local. Nothing seems to work.

My mesh is a car made from 2 intersected meshes, vertices drawn mesh from the top, and one from the side, both intersected. This is why there is no edges on one of the axis.

Can that bee part of the problem?

What have I done wrong, and how can I made mirror effect possible? I have seen a couple of tutorials (working in Blender 2.81) but haven't found a solution

I can see that the pivot point you are talking about, is not at the center of the mesh.
The Pivot point is the orange dot with a black outline.

To center the pivot point, go to into Object mode, select the car mesh, right click, Set Origin -> Origin to Geometry.
Then the pivot point should be centered.

Also, try deselect the Bisect for the X axis in the modifier options.

Let me hear if it worked :)