Procedural square shape in Cycles (with similar effect to Gaussian blur) Desired result:

Basically what I want to achieve is procedural square shape with ability to blur edges with similar effect to Gaussian blur.

I'm aware of Cycles limitations regarding blur nodes, and also I'm familiar with method to blur texture by noise. This case could be different as I want to use this shape further in my node setup.

What I have so far:

Results:

Node setup for the first example:

Overview and problems:

This is desired result for "blur" effect. Problem with this one is if I change Color Ramp to Constant shape has still rounded corners. Also with bigger scale (Scale - 2 and Color Ramp Black position - 1)  it looks like this:

Sadly shapes on edges aren't tiles, after scaling (and applying) mesh they are just white stripes.

Another problem is control over size of this shape.

This is just ok result. Nothing to add. Maybe only painful control.
This is Box blur effect, only upside of it is that it could be achieved only by changing Color Ramp interpolation to Linear from Constant (pt. 2).

The biggest problem here is that despite I can have the shape/effect I want, control over them (and the fact that they are separated setups) is horrible. For example - scaling from really small square to big one touching edges involves changing Scale in every Mapping node and also correcting Color Ramp.

Blend file:

Here's an alternative solution using maths nodes to calculate distance from the square and the Gaussian distribution function.

The key here is for any point in the shader to calculate the closest point to the square. The square is defined by 4 boundary values - X-Min, X-Max, Y-Min, Y-Max.

To calculate the closest point that is still within the square we can simply use the Max and Min functions. ie,

closest-X = Min( Max(X, X-Min), X-Max)
closest-Y = Min( Max(Y, Y-Min), Y-Max)

To calculate the distance to this point (ie, the closest distance to the square) we can use Pythagoras

distance^2 = X^2 + Y^2

ie,

distance = sqrt(X^2 + Y^2)

For the Gaussian falloff we use the equation :

 intensity = 1 / (2^dist)

Bringing it all together produces the following material (note that I've omitted the 'sqrt' of the distance calculation - this gives a more pronounced falloff based on the square of the distance, rather than the plain distance) :

Adjusting the input nodes (X-Min, X-Max, Y-Min, Y-Max, Focus) will adjust the size and 'blurriness' of the square. Note that the Gaussian blur starts from the edge of the square - so the square is always maximum intensity with the falloff starting at its boundary. This means that the blur will always make it appear larger - adjust the boundary values to compensate whilst adjusting the Focus if this is not desired.

To tile multiple squares you can simply use a Mapping node and Modulo nodes to repeat the range multiple times :

Animating the mapping and various inputs can produce the following result :

Blend file attached

This can be used to generate procedural tiles as shown by this sample image provided by @cgslav :


I cannot get correct scale on bevel for nurbs curve Im trying to get a 2mm bezier circle to bevel onto a curve .The circle is not appearing in the correct scale on the curve.

How do I fix this?

I've just seen your blend file and i've found why you get this problem (and how to fix it) :)

Select your curve
Edit mode
Select All vertices
In the properties tab (N key), change the Mean Radius value (your actual value is 0.008) to 1.

That's all ;)


LuxBlend light groups I just installed LuxBlend, LuxRender for Blender, in order to test it, and I'm very new to using it. I made a simple scene with a couple of mesh lights "plane objects", and assigned emitting materials to them. I'm trying to get two Light Groups, one for each mesh light, but it looks like something is missing. The Light Groups panel in Render Layers tab is empty. I tried to add it in the light material with no luck, for light materials, I chose Null, for material type, and checked LuxRender Light Emission check box, "as I've seen in a tutorial." There's a tutorial on the Luxrender website that explains how to do it, but I'm sure it's for a different version, because there's a Material Type called "Light", which makes sense. Why choose "Null" for a light? But in the version I have, there's no such material type! I'm using Blender 2.77a, LuxBlend 27.

After fiddling with this issue, I found out this is a bug. I uninstalled Luxrender, removed the add-on from Blender, restarted my machine and installed a different version. Using Luxrender 1.6 test version No OpenCL, I have the Light Groups available in Render Layers panel. The Materials Panel preview is still black. I couldn't find a Group Node (maybe just because I'm unfamiliar with Lux), but if I don't use Nodes, I can create Light Groups in Render Layers panel and assign light materials to the Light Groups.


How to find the number of loose parts with Blender's Python API? I want to find out how many loose parts a mesh has using Python, i.e. write a function that takes a mesh object as an argument and returns an int. So far I haven't found a way to access this information from within Blender.

I know I could do this by separating by loose parts and then count the number of objects created, but that seems quite inefficient. I want to know how many loose parts there are without separating.

Recursive Bmesh version

Similarly to the way  other bmesh operators, BMesh.Ops are used,

get_islands(bm, verts=[])

bm the bmesh.
verts  iterarable of any or all of the verts in the bmesh.
 returns -> dict(islands=[])

A dictionary is returned with each island as a list of BMVerts, within  the "islands" key list.

It's Quick
Uses BMVert.tag so doesn't naff up prior selections.
Works in both edit and object mode
Requires no operators.

.
Test code: Run in object mode, checks for all islands in all meshes in file.

import bpy
import bmesh

def walk_island(vert):
    ''' walk all un-tagged linked verts '''
    vert.tag = True
    yield(vert)
    linked_verts = [e.other_vert(vert) for e in vert.link_edges
            if not e.other_vert(vert).tag]

    for v in linked_verts:
        if v.tag:
            continue
        yield from walk_island(v)

def get_islands(bm, verts=[]):
    def tag(verts, switch):
        for v in verts:
            v.tag = switch
    tag(bm.verts, True)
    tag(verts, False)
    ret = {"islands" : []}
    verts = set(verts)
    while verts:
        v = verts.pop()
        verts.add(v)
        island = set(walk_island(v))
        ret["islands"].append(list(island))
        tag(island, False) # remove tag = True
        verts -= island
    return ret

#test code
context = bpy.context
ob = context.object
me = ob.data
bm = bmesh.new()
from time import time
t = time()
for me in bpy.data.meshes:
    bm.from_mesh(me)
    islands = [island for island in get_islands(bm, verts=bm.verts)["islands"]]
    print(me.name, "Islands:", len(islands))
    print([len(i) for i in islands])
    bm.clear()

bm.free()
print(len(bpy.data.meshes), "meshes processed in", time() - t, "seconds")

Given the new answers, thought I'd time them.  Simple 10 x 10 x 10 applied array on default cube.

This

Cube Islands: 1000
0.0809781551361084 seconds

@Денис Колесников

1000
0.11966490745544434

@lemon

islands 1000
0.18735790252685547

@zebus_3d  (note leaves the object in edit mode)

# by faces
total islands:  1000
total time (seconds):  6.521913093005423
# by verts
total islands:  1000
total time (seconds):  10.745814517998951

JakeD

1000
18.090813398361206  seconds


Proportional editing on mesh doesn't work I saw this video on YouTube > https://www.youtube.com/watch?v=dz2ws7CAkgU and was quite interested. From 0:09 till 0:10 you can see that the uploader is moving the verts with proportional editing. I tried this myself but it doesn't work. It doesn't show the proportional editing ring either.

Can someone help me a little?

Proportional editing works with transform operations like move, rotate and scale. Try clicking G to grab and use mouse wheel to set the influence higher and see if that works.


Find out if layers are empty Is there a better way, other than looping every object, of finding out if a range of layers are empty?

import bpy

layer_range = [1,2,3,4,11,12,13,14]
print("---------")
layer_range_break = False
for obj in bpy.context.scene.objects:
    for layer_number in layer_range:
        if obj.layers[layer_number]:
            print("Object on bad layer")
            layer_range_break = True
            break
        else:
            print(obj.name)

    if layer_range_break:
        break

Using pythons's any and all

In general, code like in your question can be shortened considerably using ptython's any or all methods. any is True if any item in a list is True, and all returns True if all are True.

In this case using any to determine if any object in the scene is on a designated layer.  any(o.layers[l] for l in layer_range) emulates your inner loop break.

import bpy
context = bpy.context
scene = context.scene
layer_range = [1,2,3,4,11,12,13,14]

dirty = any(any(o.layers[l] for l in layer_range)
            for o in scene.objects)

print("Layer Range is dirty:", dirty)

PS: not sure this is "better", it is IMO more readable.


Is it possible to mimic nuts and bolts in blender using Normal maps? I've been wondering whether it is  possible to have fake nuts and bolts using Normal maps.

I know it is possible, but is there a way to just paint bolts wherever I want. I couldn't find any article regarding this.

This video shows how to sort out normal maps to paint "bump".  If you use a an alpha brush/stencil you could paint "bump" bolts etc using texture paint, adding an extra "bump layer" (video etc). If you can find the free IK-brush kit for blender that's free online somewhere, it has bolts/screws heads etc in the brushes.  It may be wise to look up "normal map painting with alpha brushes" also.

https://youtu.be/svzKoq3vew0


What ui would work for choosing from a long, long list? I need the user to choose from a huge list of items. This is ugly and useless for lists longer than 100 items.  I'm happy with the rest of the code. I just want a scrollable listbox really.

class my_panel(Panel):
      bl_label = "MYPANEL"
      bl_idname = "SCENE_PT_mypanel"
      bl_space_type = 'PROPERTIES'
      bl_context = 'scene'

      def draw(self,context):
           props = context.scene.myAddon
           self.layout.prop(props, 'jlist', text='jlist')

def updateJlist(self,context):
     t = []
     for i,v in enumerate(master_jlist):
          t.append((v.name,v.name,'',i)

     return t

jlist  = EnumProperty( items=updateJList)
bpy.types.Scene.myAddon = jlist

I would also be happy with something like the material list. I can't seem to get UILayout.template_list, or UILayout.template_ID to work. Examples on the web refer to IDPropertyGroup which seems to be missing in recent blender builds.

To let the user explicitly select an item from a large set, I discourage a template_list - although there's a search filter.

1. Instead, I recommend the search popup:

import bpy

def item_cb(self, context):
    return [(str(i), "Item %i" % i, "") for i in range(100)]

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
    bl_property = "my_enum"

    my_enum = bpy.props.EnumProperty(items=item_cb)

    def execute(self, context):
        self.report({'INFO'}, "Selected: %s" % self.my_enum)
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        wm.invoke_search_popup(self)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator('INVOKE_DEFAULT')

2. Or nested menus if there's some kind of hierarical structure in your data. The example uses dynamically-created menus:

import bpy

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.report"
    bl_label = "Report"

    text = bpy.props.StringProperty()

    def execute(self, context):
        self.report({'INFO'}, self.text)
        return {'FINISHED'}

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

    def draw(self, context):
        layout = self.layout
        for i in range(6):
            layout.menu("OBJECT_MT_dyn_%d" % i)

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

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

if __name__ == "__main__":
    register()

    for i in range(6):
        idname = "OBJECT_MT_dyn_%d" % i

        def func(self, context):
            self.layout.label("Parent: " + self.bl_label)
            for j in range(10):
                option_text = "Option %i" % j
                props = self.layout.operator(SimpleOperator.bl_idname, text=option_text)
                props.text = "%s > %s" % (self.bl_label, option_text)

        opclass = type("OBJECT_MT_dyn_%d" % i,
                       (bpy.types.Menu, ),
                       {"bl_idname": idname, "bl_label": "Test %i" % i, "draw": func},
                       )
        bpy.utils.register_class(opclass)

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

3. A template_list() can be used to show a single line:

layout.template_list(..., rows=1)

You can force the built-in filter options to always show in the UIList subclass:

def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
    self.use_filter_show = True

4. Something hand-crafted: a StringProperty for a search phrase and as many buttons as there are matches. The number of matches should be limited (hard-limited in below code), you could implement pagination if necessary. You make make the layout adapt to the panel width if you want:

import bpy
import random

vowels = ["a", "e", "i", "o", "u"]

def fake_words():
    words = []
    for w in range(random.randint(1, 3)):
        for i, l in enumerate(range(random.randint(2, 7))):
            if i % 2 == 0:
                words.append(vowels[random.randrange(len(vowels))])
            else:
                words.append(chr(random.randint(97, 122)))
        words.append(" ")
    return "".join(words).title()

wordlist = [fake_words() for i in range(1000)]

class ReportSelected(bpy.types.Operator):
    bl_label = "Report"
    bl_idname = "wm.report_selected"

    text = bpy.props.StringProperty()

    def execute(self, context):
        self.report({'INFO'}, self.text)
        return {'FINISHED'}

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

    def draw(self, context):
        layout = self.layout
        wm = context.window_manager
        search_phrase = wm.custom_search
        cols = context.region.width // 100
        matches_per_col = 10
        matches_max = matches_per_col * cols

        layout.prop(context.window_manager, "custom_search", text="", icon="VIEWZOOM")

        matches = [w for w in wordlist if search_phrase.lower() in w.lower()]

        col = layout.column(True)

        for i, w in enumerate(matches):
            if i >= matches_max:
                break

            if i % cols == 0:
                row = col.row(True)

            row.operator("wm.report_selected", text=w).text = w

        matches_more = len(matches) - matches_max
        if matches_more > 0:
            layout.label("+ %i matches" % matches_more)

def register():
    bpy.types.WindowManager.custom_search = bpy.props.StringProperty()
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_class(ReportSelected)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    bpy.utils.unregister_class(ReportSelected)
    del bpy.types.WindowManager.custom_search

if __name__ == "__main__":
    register()

I can think of many more solutions, like a grid of buttons with a letter of the alphabet each as a first step, and in the second, show only strings that start with the chosen letter (probably as buttons).

Or multiple dropdown menus, select a letter or category first, and let the second update based on the first, to show only the relevant entries.


Trying to make a menu using multiple modules It's not giving any erros when installing it, also tested the operators before and and they were working fin but i can't make the menu show up. I was trying to call it using "DC_MT_macro_menu" in a shortcut.
Mainly use this post as reference, though he is using panel instead of menu.
The init file
bl_info = {
    "name": "Popup Macro",
    "author": "",
    "version": (1, 0),
    "blender": (2, 83, 0),
    "location": "DC_MT_macro_menu",
    "description": "",
    "warning": "",
    "doc_url": "",
    "category": "",
}

}

import bpy
from . macro_menu import DC_MT_macro_menu
from . macro_classes import DC_OT_bevel_subdiv, DC_OT_bevel_second

classes = (
    DC_MT_macro_menu,
    DC_OT_bevel_subdiv,
    DC_OT_bevel_second,

)
register, unregister = bpy.utils.register_classes_factory(classes)

if __name__ == "__main__":
    register()

The menu "macro_menu"
import bpy

class DC_MT_macro_menu(bpy.types.Menu):
    bl_idname = "DC_MT_macro_menu"
    bl_label = "Macro"

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

        layout.operator("3dview.bevel_subdiv")
        layout.operator("3dview.bevel_second")

And the operators "macro_classes"
import bpy

class DC_OT_bevel_subdiv(bpy.types.Operator):
    bl_idname = "3dview.bevel_subdiv"
    bl_label = "Subdivision Workflow"
    def execute(self, context):
        ob = context.object
        bm = ob.modifiers.get("Bevel")

        bm = ob.modifiers.new(name="Bevel", type='BEVEL')
        bm.segments = 2
        bm.profile = 1
        bm.limit_method = 'WEIGHT'
        bm.miter_outer = 'MITER_ARC'
        bm.use_clamp_overlap = False

        return {'FINISHED'}

class DC_OT_bevel_second(bpy.types.Operator):
    bl_idname = "3dview.bevel_second"
    bl_label = "Second Bevel"
    def execute(self, context):
        ob = context.object
        bm = ob.modifiers.get("Bevel")

        bm = ob.modifiers.new(name="secBevel", type='BEVEL')
        bm.limit_method = 'ANGLE'
        bm.miter_outer = 'MITER_ARC'
        bm.use_clamp_overlap = False

        return {'FINISHED'}

Modularise your modules
IMO rather than importing and cherry picking classes from submodules, instead can import the module and call its register method.
For testing have placed the addon in a  testing_testing folder, and given it the "Testing" category... will of-coarse need to rename to something more suitable.
Notice the submodules are imported from testing_testing rather than from current folder . which requires the addon must have the name specified by folder. This makes the imports viable when run from main thread. (eg tested in text editor).
Can alter the submodules by adding removing other classes without the need to edit init file. Only need to edit again for a new submodule.  Can use something like pkgutils.list_modules to look for modules in root folder and automate the imports of each, hence never needing to touch init to have any module placed in folder registered.
Reworked code.
testing_testing/__init__.py
bl_info = {
    "name": "Popup Macro",
    "author": "",
    "version": (1, 0),
    "blender": (2, 83, 0),
    "location": "DC_MT_macro_menu",
    "description": "",
    "warning": "",
    "doc_url": "",
    "category": "Testing",
}

# can use importlib.reload here instead
import bpy
from testing_testing import operators, menus

modules = (operators, menus)

def register():
    for m in modules:
        m.register()

def unregister():
    for m in modules:
        m.unregister()

if __name__ == "__main__":
    register()

testing_testing/operators.py
import bpy

class DC_OT_bevel_subdiv(bpy.types.Operator):
    bl_idname = "3dview.bevel_subdiv"
    bl_label = "Subdivision Workflow"

    def execute(self, context):
        ob = context.object
        bm = ob.modifiers.get("Bevel")

        bm = ob.modifiers.new(name="Bevel", type='BEVEL')
        bm.segments = 2
        bm.profile = 1
        bm.limit_method = 'WEIGHT'
        bm.miter_outer = 'MITER_ARC'
        bm.use_clamp_overlap = False

        return {'FINISHED'}

class DC_OT_bevel_second(bpy.types.Operator):
    bl_idname = "3dview.bevel_second"
    bl_label = "Second Bevel"

    def execute(self, context):
        ob = context.object
        bm = ob.modifiers.get("Bevel")

        bm = ob.modifiers.new(name="secBevel", type='BEVEL')
        bm.limit_method = 'ANGLE'
        bm.miter_outer = 'MITER_ARC'
        bm.use_clamp_overlap = False

        return {'FINISHED'}

classes = (DC_OT_bevel_second, DC_OT_bevel_subdiv,)

register, unregister = bpy.utils.register_classes_factory(classes)

if __name__ == "__main__":
    register()

testing_testing/menus.py
import bpy

class DC_MT_macro_menu(bpy.types.Menu):
    bl_idname = "DC_MT_macro_menu"
    bl_label = "Macro"

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

        layout.operator("3dview.bevel_subdiv")
        layout.operator("3dview.bevel_second")

classes = (DC_MT_macro_menu,)

register, unregister = bpy.utils.register_classes_factory(classes)

if __name__ == "__main__":
    register()
    # test call
    bpy.ops.wm.call_menu(name=DC_MT_macro_menu.bl_idname)

Note can test if a module has a register method using
if hasattr(m, "register"):
    m.register()

On linux can select the folder and compress

A zip file that follows convention recommended here Addons: Only some .zips will install
Note: look for the error if it is saying the folder already exists then choose overwrite option, remove previous installation (delete folder, or hit remove button on addon)
The enabled addon,

after which the menu can be called from  for instance the python console

Running menus.py in text editor will also make the menu popup via a test call.
To hang your menu onto another during register, recommend writing your own register and unregister methods instead of using the factory generated methods.
Finally to make a shortcut to popup your menu, as displayed above the operator is "wm.call_menu" and set its name property to the bl_idname of your menu.


Rendering a tracked scene without background I've tracked a scene in Blender so that I could animate and adjust material lighting to an object placed in the scene. Once the footage was tracked, I set up a tracking scene and set the background.

Once I was happy with my animation I wanted to render with Cycles just the object animated without the footage in the background. Where can I disable the rendering of the footage?

Unchecking Compositing in the Properties editor > Render tab > Post Processing rollout did solve the problem.
Side note: you can go to the compositing nodes in the Node editor (or choose "Compositing" screen layout) and change/remove the Source Movie to remove video from render.


How do I composite render layers in 2.69 using Cycles? I'm using 2.69 Cycles and I have a plane on one render layer and a cube on a second render layer. Also, under Render -> Film, I have Transparent selected so both layers have no background color.

I want the final image to be the cube and the plane, but I can't figure out which nodes to use to do that.

If I use a Mix node with Factor set to 0.5, the composited image only shows where the plane and cube visually overlap.

How can I get the final composite to show the full cube and the full plane?

Here is the link to the blend file:
https://drive.google.com/file/d/0B_yQeQQ8ImENSmZaOGJMaGhxczQ/edit?usp=sharing

And here is my Compositing screen:

Try using an Alpha Over node (ShiftA>Add node > Color > Alpha Over):


Render object with only shadow I have this image (the background is transparent):

I was wondering if there is a way to only render the shadow of the ball, while rendering the rest of the ball transparent?

You can't do this directly in the 3D scene as far as I know. You are probably looking for a "Shadow Catcher" type of material, but this is currently not supported in Blender Cycles yet. There are plans to add it in the future but nothing that works currently.

The only way I know to achieve this currently, is in post production through compositing, using the image you show as a mask to mix it over another image in the Blender Compositor
Use it as an inverted mask where dark areas are more opaque as opposed to white areas being more transparent as shown bellow.


Sound playback issues in Kubuntu 20.04? It seems that Blender 2.82.7 can not use my sound sub-system, only in exclusive mode.
If browser is running, Blender cannot play sound in VSE. If I close the browser, re-run Blender (or choose same audio device in settings) sound is on.

But if I run browser again, it cannot play videos until I close Blender. Error message is:

  ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Device or resource busy

Note: I tried all audio devices in Blender. Just downloaded Blender 2.79b - it works fine.

Upd1.

Added "options snd_hda_intel index=1" to /etc/modprobe.d/default.conf

Now I see:

  ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
  ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
  ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
  ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
  ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
  ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
  ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
  AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory

Upd2.

This is known bug of snap version.
Version downloaded from official site works.

Link to bug - https://developer.blender.org/T72920


How to save an image created from python script including the alpha channel? I have tried the following, and the resulting image file, when opened in GIMP, never contains an alpha channel, only R, G and B.

import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.filepath = "//Sprite.png"
image.file_format = 'PNG'
image.save()

Result: no alpha channel in png

import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.colorspace_settings.name = 'sRGB'
image.use_alpha = True
image.alpha_mode = 'STRAIGHT'
image.filepath = "//Sprite.png"
image.file_format = 'PNG'
image.save()

Result: no alpha channel in png file.

This is a bug in Blender, I've reported it on your behalf.

Setting image.colorspace_settings.name changes the alpha at the moment, reported (now fixed!)

This script works, notice it sets filepath_raw, which prevents reloading to the new path.

import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.use_alpha = True
image.alpha_mode = 'STRAIGHT'
image.filepath_raw = "//Sprite.png"
image.file_format = 'PNG'
image.save()


Check how many trackers are selected I'm writing a script for scaling in the movie clip editor. I need a way to check if there are two trackers selected, or if there are not. Is there something in the API to check how many trackers are in the bundle?

import bpy

context = bpy.context

# choose from data
tracks = bpy.data.movieclips["clip_name"].tracking.objects

# choose from context
tracks = context.scene.active_clip.tracking.objects

# selected camera tracks
selected_camera_tracks = [t for t in tracks['Camera'].tracks if t.select]

# selected object_tracks
selected_object_tracks = [t for t in tracks['Object'].tracks if t.select]

# toggle selected object tracks
for t in tracks['Object'].tracks:
    t.select = not t.select


How to shear a ellipse I am working on a scientiic illustration and I need your help. :)

I want to make an ellipse with left end at (0, 0 , 0) and the right end at (1, 1, 1) where the middle point is at (0.5, 0.5, 0.5). All I have to do is to shear the ellipse shown in the figure in such a way that right end should be at (1,1,1) and the middle point at (0.5, 0.5, 0.5) and left end remain at zero.

How to shear it....?

I tried propotional editing by moving the right end vertice point but it gives non symmetrical ellipse.

Here are two ways to do it: Shear tool or Mesh Deform modifier


How to Join All the Trees Together? My object consist of many trees. So if I "bake" any of the tree at the end I have many pieces and I have to use Ctrl+J to join them. Is there a way to join all the trees together into one big tree and to get a united polygonal shape?

I see solution in using viewer bmesh and than operate in separate tree by object in and joining them
https://yadi.sk/d/Y0755AytIfALnQ
try this file as example


Use texture + color ramp to set density vertex group for particle system I created a landscape of diffuse shaders, e.g. for meadow and rock and combine them with a Noise Texture + ColorRamp as factor of a Mix Shader:

Now I want to apply objects, e.g. trees to the area where the meadow is. Therefore, I would create a hair particle system with a density vertex group. This vertex group can be created by weight painting, but the information about the density is already there, in the output of ColorRamp in the material setup.

How can I use this directly to control the particle system without weight painting manually? Or in other words: How to convert the ColorRamp to a Vertex Group?

Vertex groups are one method of controlling where particles generate, but there are also particle textures.
Create a texture from your color ramp (one way is to connect the color ramp node direct to material output, then bake). This should be an image that is full black where you don't want particles and full white where you do.
Then in the Textures panel of your particle system menu, press the + to add a texture. In the settings for the texture, under the Influence tab, check the box for Density.


Where to put external Python Blender scripts when Blender was installed from Snap? I wrote a Python script which uses Blender API and outputs render scene frame range. I want to execute it over a few files with no GUI/in the background. I found this thread which explains that I can put my script in path_to_blender/version/scripts/addons and later execute using blender.exe --background myFile.blend --python ./version/scripts/addons/superScript.py
The issue I'm having is that I don't know where to put my script as I installed Blender from Snap and so the file structure looks different. I found /snap/blender/current/2.83/scripts/addons but when trying to copy anything into it, it returns cp: cannot create regular file './get_scene_framerange.py': Read-only file system I also checked the following directories:

/var/snap/
/var/lib/snapd/
/home/username/snap/

but only /snap/ has dir called addons/
Ideas?

After talking to the guys on the official Blender forum #python it turned out the scrip can be located pretty much anywhere and it doesn't need to be in a special directory, as I thought before. To run it I used a command i.e: blender --background monkey_test.blend --python ./get_scene_framerange.py where the last bit is a path to the script located anywhere


Linked Objects, Drivers and Animation of custom Properties I have created an Object with some Shape Keys. To simplify the planned Animation, I have created four custom Properties on that object and connected some drivers, so that the change of one Property effects multiple values of the Key Shapes.

That does all work as expected is seems to be pretty nice! But I would like to use that object in an Animation where it should appear two times. So I created a new Blender File and linked that object two times and made a proxy out of each.

In Summary: One File, containing two proxies, linking to one Object in another file.

When I try to animate these properties, It happens that no matter which of both I select, all the key frames are created for the second object I have linked. Except for one Property.

In Curve Editor (Animation View), the curves to edit are always the ones of the Object that is not selected.

Am I facing an error here, or do I have anything missed? Is it possible to do what I would like to, or can't that be done with linking?

Any Help appreciated! Thanks in ahead!

It seems like this is not supported yet in blender. to bring in the same object multiple times you need to save the object again as another copy and import that separately...

people have answered this here:
multiple copys of character with rig linked in the same file


Get position of Focus Point of Camera I am working on a Python script on Blender and I need the location of the focus point of the active camera. I know we can display the limits of a camera but I can't manage to get the exact position of the focus point using Python.
Could you help me to find it ?

Here is an illustration with point of focus display (Yellow cross) :

The following script calculates the clip start, end and dof distance locations and visualizes them in the viewport (like the Limits option for cameras), the rotation mode does not matter:

import bpy
import bgl
from mathutils import Vector
from mathutils.geometry import intersect_point_line

def is_camera(ob):
    return ob is not None and ob.type == 'CAMERA'

def draw_callback_px(self, context):

    sce = context.scene

    if is_camera(context.object):
        cam_ob = context.object
    elif is_camera(sce.camera):
        cam_ob = sce.camera
    else:
        return

    mat = cam_ob.matrix_world
    cam = cam_ob.data
    start = mat * Vector((0, 0, -cam.clip_start))
    end = mat * Vector((0, 0, -cam.clip_end))
    if cam.dof_object is None:
        dof_loc = mat * Vector((0, 0, -cam.dof_distance))
    else:
        pt = cam.dof_object.matrix_world.translation
        line_p1 = mat.translation
        line_p2 = mat * Vector((0, 0, -1))
        loc = intersect_point_line(pt, line_p1, line_p2)
        dof_loc = loc[0]

    # 80% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glLineWidth(2)

    #sce.cursor_location = dof_loc

    def line(color, start, end):
        bgl.glColor4f(*color)
        bgl.glBegin(bgl.GL_LINES)
        bgl.glVertex3f(*start)
        bgl.glVertex3f(*end)
        bgl.glEnd()

    line((1.0, 0.0, 0.0, 0.8), start, dof_loc)
    line((0.0, 0.0, 1.0, 0.8), dof_loc, end)

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'ESC':
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        if context.area.type == 'VIEW_3D':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        bpy.ops.view3d.modal_operator({'area': area}, 'INVOKE_DEFAULT')
        break


Blender wrongly thinks I clicks a scale-cage manipulator that closest to camera - which is not the closest to mouse I want to click the green manipulator, not the red one.

However, if two manipulator (red & green) appear moderately close together from the camera, Blender will think that I click the one that is near camera (red).
The below dot-gif image shows my clicks.
All of 3 scaling tests were done by clicking the green.

In the first two tests, Blender wrongly think I click the red manipulator.

In the last test, before I clicked, I rotated camera a bit and get the expected correct result.

How to reduce the distance threshold that Blender use?

^ To make testing convenient, I wish for an answer that works when I click the yellow zone.
Currently, if I click the yellow zone, Blender will wrongly think I click the red manipulator.
However, if I click the cyan zone, Blender will correctly think I click the green manipulator.
Environment :

Blender 2.81 & 2.83 & 2.90 & 2.91(experimental) in Windows 10.
Blender : switching because Industrial and Blender-default keymap doesn't help.
Windows : It can't be fixed by Display>Scale and layout>Advanced scaling settings> = 100%.

Environment that there is no issue:

Blender 2.81 in Windows 7.
Blender 2.81 in the problematic computer.  It needs factory reset.
The trick has no effect on Blender 2.90.

Bounty Reason (old)

HikariTW's answer is a good attempt, but sadly, for my case, it isn't useful at all.

Jachym Michal's is very insightful, but it
doesn't provide any solution except (bug) reporting.

Increality's provides a doable solution.  However, for me, it is (very) inconvenient.

Yudaka's argues that there is no such issue in his machine, and I confirm later that there is actually no issue in one of my computers.

This is due to Perspective view.
I seems that closer control points have larger "active area" around them. because reasons...?
In Orthographic view, the active area around all points is the same :).

Active areas highlighted. When cursor is in 'active area' it changes from a cross ✛ into arrows ✥

This doesn't make much sense from the UI standpoint, the 'active area' shouldn't change due to perspective.
 It would also be nice if the 'active' point was highlighted when the cursor gets close enough.

Possible solution:
Suggest improvements on devtalk.blender.org or rightclickselect.com and wait until they're implemented.


Rigify Mesh twisting weird at elbow of arm I'm using Rigify to make my character poses and animations.

But I have this issue.

For some reason when ever I pull my forearm over my upper arm.
It begins twisting from the point where my characters elbow should be. Why is it doing this?

It's totally fine until I pull it over my upper arm. Kind of annoying.

Here's a picture of how it looks messed up.

But I also noticed that when ever I move my Elbow IK it tends to rotate my mesh a bit.
So I'm getting the idea that it has something to do with rotating but I don't know how to come about it.

Here's how it looks with me moving the Elbow IK + A closer screen shot.
I also noticed that only my arm's bone connected to the Elbow point is moving. Hmm. Any help would be appreciated.

When you move the arm, you have to also move the elbow IK bone. The elbow IK works to compensate for the twisting that happens from the IK movements you make. This takes some getting used to. I had to work for some time on my elbow IKs before I felt I had a decent understanding of them and I still am not 100% on it.


How can I improve this UV-Mapping? I'm very noob in Blender as a result I'm struggling to unwrap a M24 grenade 3D-Mesh properly.

My first attempt to improve the UV-Mapping was making the irregular polygons as squares or rectangles using a Python plugin so that I could apply textures easily on Gimp. The result is this one:

Despite doing this I'm still not happy with the changes as the trial texture's squares are not well distributed. As you can see in the photos those parts divided by the seams have like a "cut" in the texture and I don't know if that will affect the texture added with Gimp.

Could you provide me with some tips to improve my UV-Mapping?

Thank you very much for your help.
Héctor

to change the size of these squares, you should scale uv-islands. this time it is y-scale. after you are happy with squares, you can scale island on x and y simultaneously to occupy most of available texture space. the biggest island should be the island that will show lot's of texture details. and you can also rotate the islands by 90 degrees.


Create a mesh ellipse How do I draw an ellipse in Blender? I am a new user (actually VERY old user) and need a simple question like the one above answered.

Add a sphere and scale it in a single axis.


Camera track to constraint in the game engine I have tracked camera to track a ball. When I move the ball manually, the camera tracks it. But when I apply motion using w,a,s,d keys to move it top, left,down and right, the camera stops tracking the ball. Why is this happening?

how did you do the constraint?

In BGE look on the "node logic" > "actuator" > "camera".

Send the .blend file if you need more help or video.


Double rounded corner As I can rounded the corner to fit both sides?

You may use the Bridge Edge Loops option. The subsurfed result'll be similar to the one achieved with beveling.

Select the same amount of vertices laying on the oposite sides, press Spacebar, type Bridge and click this option. In the Tool Shelf options (T) change the number of cuts to fit the edge loops' number. Then unselect the top vertices (C, hold Mouse Wheel) and select only bottom ones (C). Hit W-->Remove Doubles and increase the merge distance. Fill the hole with diamond quads (select vertices and press F).


Remove Taper from object Somehow in my adventures of creating this thread, I tapered the whole object. Is there a way to straighten it out again? I can't find any solutions to this issue.

I am sure re-designing it would be faster, but I want to learn.

Here's my approach showing how you can achieve it using the Cast Modifier (Cylinder) and shrink/flatten tool.

Add the Cast Modifier and set its mode to Cylinder. Set Factor and Radius values to 1.000. Apply modifier. Next enter the Edit Mode, select all the inner faces with Alt+RMB, then press Alt+S to scale them down. Finally in Object Mode press S,Shift+Z to scale the whole object fitting the original mesh's parameters.


Part of Mesh turns white in Render Mode This is my first time using blender, and I am trying to create an animation for a phone.

When I am in object mode in material view, the image looks fine, but when rendering a frame (in cycles) part of the matte black is white instead. When I remove the subsurface modifier it looks fine, but I want to keep the modifier.

Any ideas what is causing this? I have included a screenshot of one area where this is happening but this isn't the only place.

I think it could be that you used the Glossy Shader in the material. This causes the world background to be reflected in some parts of the mesh.


Tidy up mesh topography I'm working with a mesh generated by an advanced photogrammetry technique http://ir-ltd.net/

The topography is not pretty; here is an example screenshot:

As you can see, the triangle density does not conform to the smoothness of the surface.

I'm guessing this is due to the way the algorithm determines likely candidates for points of interest -- I shave my head myself and the result was uneven; patches of hair probably generate more candidates and hence great a triangle bunch.

Anyway, is there some technique for tidying it up?

Decimation is the only way I can think of. And I will be decimating anyway. So I almost didn't ask the question.

But I am thinking maybe if I first reduce the mesh to a clean evenly distributed mesh, the decimation tool may produce cleaner output.

So, is there any process I can perform to tidy up the mesh topology?

PS This is the 100 K mesh.   I also have 500 K and 2 M.

Perhaps you can be helped by the remesh modifier:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.62/Remesh_Modifier

It uses the shape of the original mesh but builds it from scratch with even quads. The setting octtree depth controls how detailed the new mesh becomes.

Here I have made a little example. Because I started with a icosphere, there are visible edges of the original mesh. As you can see, there are some more settings to tweak, especially the mode operator can be experimented with.

Start mesh:

With modified:

Modified applied (mode sharp), in edit mode to show even topology:

Modifier applied (mode smooth):


Why will Blender render the transparent area with shadow catcher on? One thing that puzzled me a lot is when I add shadow catcher to the ground floor, and render it, Blender will treat that transparent area as opaque one and render it as well, this causes extra render time waste, especially in the situation when batch rendering.

Here is the image demo:

Does any one know how to avoid that extra render?

Or is this a Blender bug?

As far as I know Cycles still does not have adaptive sampling, so this is how it is for now. I believe this feature is always 'coming to Blender any time now' for a few years now. You can use border rendering to only render part of the frame.


How to bake normal map if the models intersect? I'm trying to bake normal map (highpoly to lowpoly).

I made a test scene with a simple high poly and low poly cube, but after baking I didn't see any details on the normal map, here is the screenshot:

However, after I reduced the size of the high poly cube so that only pieces with sculpting were outside the low poly cube it worked fine!

My question is: After sculpting, my model was slightly deformed. And when I am placing together the low poly and high poly models, the high poly model is slightly shifted outside of the low poly model. How can I get a normal map of the high poly model in this case (and not to get an empty normal map where the meshes intersect?)

I need to figure it out before Monday, so I would be very super for your help!

To bake from an object with is slightly outer of your lowpoly mesh, you need to increase the ray distance option in the bake panel:

Blender bake using a ray casting. If the ray distance is 0, the ray starts from the lowpoly surface. So, if this surface is inside the highpoly mesh, the ray meets nothing.

With a higher value for the ray distance the ray starts farther to the outside of the lowpoly so that it can hit the highpoly surface.

Practically speaking you may need to tune this value (not too high, not to low) so that the ray does not hit unwanted surfaces of the highpoly mesh.


Editing collada file with built-in UVs I recently purchased some basic terrain assets, and when I import them to Unity, they look nicely textured.

My plan is to create several variations on this terrain (creating paths etc.) and I figured it would be a matter of importing them into Blender, then painting it, or exporting the UVs and creating a texture in Photoshop or something.

However, when I import the .dae file into Blender, all I get is a grey, untextured version of the mesh.  I can see there's a UV map listed in the file, but I have no idea how I'd go about accessing it or editing it.

Anyone have any suggestions?

Look Honestly because i would post a comment but because i don't have enough rep i have to answer, but with blender try to go into the material properties and hopefully if you got the mesh of the internet it should have different materials, just change those separate materials and modify them to suit you since they should of been already made from the owner.

As seen above, there should be multiple textures for that one model.

I hope this helps and i don't quite know if i completely answered your question. If you don't see the extra materials i would say it wasn't made to be compatible with blender.


Grease Pencil - How do I hide the system cursor? How do I hide the system cursor while sketching with Blender in Grease Pencil mode?

Under the overlays tab (top right of the viewport screen) press the dropdown arrow and uncheck 3D cursor


Why is my mirror only reflecting things that are close to it? I am trying to render out a scene of a bathroom. I am attempting to make a mirror material. It doesn't reflect anything that isn't very very close to it. I made a cube and put an array modifier on it and colored it blue to see how far the falloff went. As you can see it doesn't render all the cubes. Also for some reason, it reflects the front face on the cube closest to it as grey.
My node set up is not convoluted. It is simply the Principled Shader, but with adjusted settings, as you can see below. I would like the mirror to act as a mirror in real life as much as possible. I am using Eevee and I need to stay in Eevee for my purposes.

Eevee has its limitations, thankfully there is an easy solution:

Shift + A -> Light Probe -> Reflection Plane
Move and scale the Reflection Plane to fit the mirrored surface
Center the Reflection Plane on the mirror, then nudge it forward slightly

That's it. Enjoy!


Texture Painting mode: Missing data warning I try to do a projection painting and I followed a tutorial, but I get a 'Missing Data' warning in the tool shelf:

How do I solve this? This is what I want to achieve (picture of the tutorial):

Thank you

To paint on the model you need to create a texture in the material.

Click on Add Paint Slot and select Diffuse Color.
This will create a texture that will have Color influence on the material in Blender Internal, and if you are in Cycles Render it will add a texture node on the material.


Extrude Faces along Local Normals I am trying to extrude faces of a cylinder along local normals. 3dsmax can do it easy, couldn't find how to do it in blender.

The extrude region option extrudes it as shown in the first example. I want it done like the 2nd example.

It looks like you want the Extrude menu (AltE).

For example 1:

There are several ways to activate the Extrude region operator:

Press E
Press AltE for the Extrude menu and select it
Press the button in 3D view > Tool shelf (N) > Tools > Mesh tools > Add > Extrude Region

For example 2:

There are two ways to get this result:

Press AltE and select Region (Vertex normals)
Select Extrude region (Vertex Normals) from the extrude drop down at the top of the Add section in the Tool Shelf

You can also two operators to get the same result:

Press E (Extrude), Esc (confirm extrude, cancel transform) and then Alt+S (Scale along normals).

For example 3:

There are a couple ways to activate the Extrude Individual operator:

Press Alt+E > Extrude individual faces.
Press the button in 3D view > Tool shelf (N) > Tools > Mesh tools > Add > Extrude Individual

Local orientation

Note that in blender, the Local orientation is based on the rotation of the object. The above methods use the normals of the extruded geometry, however if you want to extrude along the objects' local orientation you must do something slightly different:

Set the transform orientation to Local in 3D view > Header:

With the geometry you want to extrude selected, press E and then Esc to cancel the transform. If you are in face select mode you will notice you can see the indicators for faces where the new faces have been created:

Press SShiftZShiftZ and move the mouse:

Shift locks the axis that is specified, so if the other key pressed is Z, it will scale only on the X and Y axes.

Pressing ShiftZ twice ensures that the objects' local orientation is being used. Global orientation is always used by default (first keypress), and then the orientation specified in the header is used after the same axis constraints are specified again (second keypress).

Note that you can also use this technique for extruding along the Normals the same as the first methods, just select Normal as the orientation in the header instead of Local.


how to match deinterlaced video to audio using Blender VSE I have a single audio-video strip in VSE which has video part 2x longer than audio. I can not deinterlace it and have proper av-sync. Here is a more detailed description:

I'm using last Blender 2.73 and I'm working on linux (having 10+ years of linux and blender exp.).
The video is recorded by Panasonic HC V750 camera in default 1080i mode. The ffmpeg -i shows the following info about this recording:

ffmpeg version 0.8.13-6:0.8.13-0ubuntu0.13.10.1, Copyright (c) 2000-2014 the Libav developers
  built on Jul 15 2014 13:48:35 with gcc 4.8.1
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 50.00 (50/1)
Input #0, mpegts, from '00000.MTS':
  Duration: 00:00:55.75, start: 0.848900, bitrate: 12290 kb/s
  Program 1
    Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Stream #0.2[0x1200]: Subtitle: pgssub

I've set up Blender properly to have 1920x1080 100% resolution, and I've selected 25fps, PAR 1:1, time mapping 100:100 (everything fairly standard).

Of course the video strip is twice as long. I've checked [x] deinterlace checkbox for the video strip. Now I want to have 25fps deinterlaced video, but I'm unable to set this.

Things I've tried on deinterlaced strip:
- cutting it by moving right video strip handle to the length of audio doesn't work (video is just trimmed in about half)
- rescaling speed of video strip using Effect->Speed control doesn't work (video is too fast).

How to make the deinterlaced video synced with audio and how to force the deinterlaced video strip to be of the same length as audio strip (which is timed in real seconds)? Another way: how to convert 1080i50 to 1080p25 using Blender only?

please help, thanks in advance

Sorry but the bottom line is that Blender doesn't like the formatting of this media. Sorry. It is frame segmented instead of strictly interlaced and just confuses the ffmpeg that Blender uses. I have the same problem with media from my Sony P&S camera.


Mark faces to use different textures I'm traying to make a material for the leaves of an ivy, and i got 2 different images of leaves.

I would like to keep all the leaves as a one object, with one, material, and somehow mark the faces to use different images and get a better result.
Is it possible, or do I have to select random faces, separate in a new object, and use a different material?

I could use the same material and object id to switch texture, but if possible, as said, i'd prefer keep al the leaves in a single object.

You can use different material settings in 1 shader and mix them.

Here you have 2 diffuse shaders using different textures. The mix shader uses as factor a random objet info to choose wich one to use. the color ramp, set on constant, allows to use only 1 one them, not a random mix of the 2 (constant) and the Position at 0.5 allows a 50% mix, but you can have more or less of a material moving the slider left or right.


How can I make a flat, spiralled surface? I'm a bit new to Blender so I apologize if this is a really simple thing.
I'm trying to make a peppermint candy in Blender (like this:

,

one of those red ones that looks swirled. So I'm extruding a circle, slightly rounding the edge, then there's a flat surface, and there are equal cuts of the disc that alternate red and white. Is there a way to basically twist the whole thing around the centerpoint such that the bands curve like that?
Thanks very much!

In Object Mode add Shift-A a circle (Mesh/Circle)

Change to Edit Mode Tab make sure you're in vertex select mode.
Extrude and Scale E,S,0
Change to Face select (see image below)
Click a random face, select all A
From the menu pick Select/ Checker Deselect

Create another material and assign it to the selection
Add loop cuts Ctrl-R RMB

With the inner faces select you're there
Set proprtional editing O and rotate R

You might want to select the outer edges and extrude them to add the on colored border as in the reference image.

Result with some tweaking:


Wrap cylinder around sphere As you can see on the picture below, I have this object shaped like a complex tube (selected in picture) that I want to wrap around this other object which looks like a flattened low-poly sphere (inactive object in picture).

As you may see, the center of the tube is flat on the Z axis. I need to wrap the "tube" around the "sphere" so that a line of faces on the bottom of the tube snap to the faces of the sphere. If I try to do it manually with "snap to faces", only the selected face of the tube moves and the rests stays in place, which distorts the object. I need to bend the tube withtout changing its general geometry. The result intended is what you can see on this picture:

I tried the shrinkwrap mod but it flattens all the vertices of the tube on the surface of the sphere (like it were intended for wrapping objects without thickness). Should I use physics to make them solid and use bones in my tube so I can articulate it like an arm? I haven't done any rigging/animation so far. Or is there another efficient way of doing this? Another mod? I read a bit about cast, curve and deform modifiers but none them will make the object snap to the other without passing through it. Also, if I skipped a step and there was a more efficient way to do this from the beginning, don't hesitate to tell me. Thanks in advance!

I think the quickest way to deal with this issue would be to load the reference image behind the mesh, tab into Edit mode with Proportional editing on and quickly move the tube into place in sections. With proportional editing on you won't have to move every vertices. If you find the proportional editing is distorting your tube shape just decrease the strength/area of the tool's effect.

Also, I don't think you're going to be able to have a perfectly curved innner edge on the curve and have it snapped exactly to the sphere's surface because of the hard angles of the sphere (see screen shot). This is because you still want the curve to be smooth which will require some subsurf to be applied.


Problems with vehicle weight painting - some blue parts I've been following the following tutorial to build a vehicle:
https://www.youtube.com/watch?v=q0IYcsNXY7M&t=8s

It's been great but when I test the weighting of all the parts, I get 3 red wheels but the parts shown below are blue, and, blue-ish!

I know this is going to cause me issues as I've already tested it in Unreal Engine using my previous model that only had one red wheel, and that was the only wheel that worked.

Any help to get everything showing as red would be much appreciated, as I feel like I've tried everything!

Thanks in advance

Select your car, enter edit mode, select all vertices belonging to the chassis, go to properties/vertex tab, select the appropriate vertex group, which has the same name of the controlling bone, click assign.

Then do the same for the wheel.


How to create an exact non uniform bevel Relatively new to Blender, using version 2.69 to model a cone shaped grip of a door handle to be 3d printed later. Took a photo and measurements for reference. Scale: 1 blend unit = 1 mm.

The shape was pretty easy to model with a cone with straight extrude region on the top and bottom. Used a cylinder to cut the hole with a boolean difference.

All done in a few minutes...
Only needed to do the bevel on the bottom to be finished. Hours later not done yet, because the bevel must be a non uniform bevel and mesh | edges | bevel only seem to do uniform bevels. Taking the above right ortho view, it should simplified have an offset of 0.4 on the z axis but an offset of 0.275 on the y axis.

I would like to set a different offset per local axis of an edge bevel. So in one axis 0.275 and the other 0.4.

I read that some people have this as a bug due to the fact that they scaled in object mode and did a bevel later. I would like it as a feature without the scaling in object mode.

Any ideas how to do this?

  I currently did a workaround by making a profile of the grip in svg.
  Imported it, converted it to mesh and spin it.
  Still knowing how to do an non uniform bevel would be appreciated.

Those triangles at the end of your mesh are going to make it very difficult to bevel.

Instead I'd add a circle and extrude it to avoid creating tris in the first place:

Add circle (ShiftA > Add > Mesh > Circle).
Extrude upwards (E) and scale (S) to create the basic shape.
Extrude each end circle without moving the vertices (EEsc), then scale (S).
Select the inner end circles and press W > Bridge Edge loops.
Bevel (CtrlB)

You can change the profile of the bevel in the Redo panel after beveling:


Set resting length for a generic spring constraint I have a generic spring constraint between two objects. I am able to set the stiffness and damping of the spring, but I would also need to set what length the spring initial was.

Blender now wrongly assumes that the current position is the original length, but in my world the spring should now be stretched some.

Here is an example. Two boxes connected with a spring constraint that only allows movement in the Z direction. When playing this animation, the lower cube will fall down. What I want, however, is that Blender consider the spring now already stretched, so it will have some more force acting upwards.

How can I achieve this?

The spring constraint is anchored by the Empty that it lives on.  You may be forced to start the objects in the pre-gravity position, and then animate them to move from that position to the stretched rest position in frame 2.  Then you can deactivate the Animated checkbox with another keyframe and let the simulation take over.

[editing to address questions in the comments:]

The Animated checkbox can be found in the Rigid Body subsection of the Physics section of the Properties view for the object.  The Animated checkbox can have keyframes (so you can give it a keyframe at frame=1 to start it out checked, and then give it another keyframe to uncheck it whenever you need it to switch over to physics simulation).

As for the multi-spring scenario, you may have an incontrovertible point.  I consider it possible to construct a set of spring linkages which could have no zero-tension rest position, and can only be expressed using a baseline tension parameter which blender appears to lack.

Although now that I think about it more, I am imagining a scenario where the spring tensions are set for empties that start out unattached, but then are bound to the target object later in the animation (using the Enabled checkbox in the rigid body constraint in the physics section).  My physics demo catalog contains several examples where constraints are temporarily disabled.  This would still require considerable ingenuity and a non-trivial amount of math to arrange.


How to enter the interior spaces for render I have imported a 3d model from Archicad to Blender. I want to render interior but I'm not able to enter the interior spaces.

Here is a screenshot of the 3d model.

You can place a camera inside your mesh and use the 'Lock Camera to View' in the view tab (N). Then go to camera view (Numpad 0) and navigate with camera locked to view. You can deactivate lock once you get the right view for render.
You can also separate parts of the mesh and then you will be able to hide the parts you want in Object Mode. In Edit Mode, Select all > P > Separate by Loose Parts.
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/mesh/separate.html


move transform gizmo to selected vertex in edit mode I am having the hardest time just moving one vertex.
The transform gizmo is where the cursor is not the vertex I want to move.
Please help me make it so the gizmo is at the selected point.
Thank you,
J

If you hit Shift + S in Edit Mode, you can "snap (the crosshairs 3D) cursor to selected". Then change the center of your rotation to "3D Cursor" using the little figure eight-like icon near the magnet towards the top of your screen. (You can also reach "snap cursor" via Object > Snap > "Cursor to Selected" in Object Mode.) If that doesn't put the gizmo in the middle of all your selected vertices, then you can try Object > Set Origin > Origin to 3D Cursor in Object Mode.
Incidentally, it looks like you have a mass of vertices selected. Try zooming in really close to select just one vertex.


Why the same variable works differently based on location in the code? I'm sorry if it's silly question.I'm noob in Python. If it is, please direct me to a tutorial or something, cause I don't even know how to phrase the question to find something useful in google. Here is my 2 code examples, that I use in Blender to get obj Real World position for each frame of an animation:

#Example P1
import bpy
obj = bpy.data.objects["Empty"]
objWorldPosition = obj.matrix_world.to_translation()
sce = bpy.data.scenes[0]
for i in range(0, 150):
    sce.frame_set(i)
    print(objWorldPosition)

#Example P2
import bpy
obj = bpy.data.objects["Empty"]
objWorldPosition = obj.matrix_world.to_translation()
sce = bpy.data.scenes[0]
for i in range(0, 150):
    sce.frame_set(i)
    print(obj.matrix_world.to_translation())

obj is moving, so it has different objWorldPosition each frame. P1, for all frames prints the same position.P2 prints new position for each frame. Why is that? Isn't objWorldPosition the same as obj.matrix_world.to_translation() in this code?

In example P1, you are assigning the result of obj.matrix_world.to_translation() to a variable named objWorldPosition and then loop over all the frames. This does not change the value of the variable.
In the second example, you are asking the system, after each frame change, what is its position, which is different.
The equivalent between you and another human would be, for P1:

You: How far away are you from the tree?
Human: 5 steps.
You: Please walk 150 steps and for each step answer the question: "what was the number you just told me?"

P2:

You: How far away are you from the tree?
Human: 5 steps.
You: Please walk 150 steps and for each step answer the question: "how far are you from the tree?"

It's very logical to get the same answer each time in the first place, and a different one in the second.
This allows for example doing this
print(objWorldPosition - obj.matrix_world.to_translation())

to find how much your human moved from the time it started moving, that wouldn't be possible if objWorldPosition didn't store the variable.
That said, there is a way to do what you are trying to do, i.e. not having to call obj.matrix_world.to_translation() each time. You can assign a function to a variable instead of it's result (like telling your human,

Please walk 150 steps and for each step answer the question I just asked you

). This code does that:
#Example P2
import bpy
obj = bpy.data.objects["Empty"]
objWorldPosition = obj.matrix_world.to_translation
sce = bpy.data.scenes[0]
for i in range(0, 150):
    sce.frame_set(i)
    print(objWorldPosition())

Notice the missing () in line 4 and the extra () in the last line. This means that the actual question (the "call") is performed inside the loop, not before it.


Bevel and Resolution Multiple Selected Curves I imported an SVG Character and grouped/parented it in an empty object for easier positioning.

I selected all (A+shift left click method) the character objects (hair, eyes, pants, etc:) However, when I try to bevel it only bevels what was first selected.

Is there a way in Blender to "Bevel and Resolution Multiple Selected Curves" without having to do it individually?

Either press the Alt key while clicking a property to assign it to all selected objects; or assign the bevel object to one of the curves, then right click over the property and choose Copy to Selected option.


A bad quality render while it took over 12 hours to render After 12 hours of rendering, I got a very bad result.

Can anyone suggest ways to improve both the render time and the final result? I used 225 samples (square samples enabled) on a 580 by 884 pixels image with the resolution set to 100%. The tiles were set to 128 and I rendered on my GPU. Other setting:

min.8-max.128 transparency bounces
min.1-max.8 light
diffuse: 2 bounces
glossy: 2
transmission:12
volume:30
denoising enabled

bounces

I think denoising might be the issue here. It looks like too much of it. I would turn it off. It's best to test rendering small regions in areas that you suspect might be more noisy before the final render(ctrl+b to define a region, ctrl+alt+b to clear). You may find that you do not need that many samples if you test it. 20 000 - 30 000(not squared) is usually enough even for scenes with difficult mostly indirect lighting. You might need a lot less than that to get your scene noise free. I would also check the camera's Depth of Field settings and make sure everything you wish in focus is actually in focus. The resolution is also quite low - some might consider the resolution of 580 by 884 pixels 'bad quality'. That's only slightly bigger image than passport photos usually are if you think about it.


Boolean Modifier fails or makes object disappear I cant seem to Cut a hole in Any objects with the Difference operation while using the Boolean Modifier, All it does make Objects Disappear or Instead give me an Error(Unable to perform Boolean Operation)

It appears that your mesh with the Boolean modifier is a 2-dimensional plane, this will cause some issues with your Boolean operations. I noticed some very unusual behavior when trying to perform a Boolean operation on a 2-dimensional mesh (final result, difference mesh  has been deleted):

However if I extruded the plane a small amount, the result was completely normal:

I think you will have to add some thickness to your mesh before using the Boolean modifier if you want to achieve expected results.

Also see this answer to a very similar question.


Particle emission from a verts fixed locations over time I have created a particle system that spawns from an object over time.

Here is the .blend file http://blenderartists.org/forum/showthread.php?352210-3Pointedit-Sketchbook&p=2827061&viewfull=1#post2827061

But to spawn cubes from vertices over time I have to use a gradient texture on an object that is UV unwrapped. Which means that i have to use a plane as the particle emitter. This creates problems when I emit from another particle system to create the red balls. I end up emitting from both of the vertices at that location, creating 2 red balls in one spot (to fix this I reduce the balls but there aren't enough to fill the emitter length).

Can I apply a texture to a mesh that has no faces (thus eliminating extra verts I don't want)?
Are there any other ways to emit a particle system over time?

I want to keep the system simple and attached to one emitter object, so that it can scale easily.

Instead of trying to get one particle system to emit in the right places you can add a new red sphere in the place and animate the visibility of it. The particle system on each sphere can also be set to emit at a specific frame. You can then add one curve object with a hook to animate the line linking each node together.

You can automate this task with a python script, with a list of data setup at the start you can easily adjust where the points are created. The script I created is a bit longer than expected so I will leave the whole thing available on gist.github.

The key points in the script are starting with a list of data for each point

mainpoints = [
    [  1,  8, (-2.605,  0.796,  2.531)],
    [ 29, 10, (-1.228, -1.007, -0.235)],
    [ 58,  8, ( 1.917,  0.060,  1.495)],
    [ 75,  8, ( 3.430, -2.621,  1.495)],
    [ 92, 10, ( 1.296, -6.226,  2.644)],
    [110,  8, (-2.013, -4.600,  0.311)],
]

Each line is an array containing the frame, number of particles and location of each red sphere you want to generate. This can easily be altered or expanded for each project you do.

Next we setup a few variables that define what object gets replicated at each point and used for particles, then some particles options that you may want to adjust each time.

The rest of the script simply loops through each item in the mainpoints array and creates each item and adds the particle systems for each one. Then it creates a curve and animates the hook to travel to the next location. Along the way locations are keyframed so things are in the right position when they need to be.

Any settings for the particle system can be added to the script and some variables can be set at the top of the script as I have done for easy adjustment.

Edit:

I just revised the script. In revision 3 the script scans objects with a name starting with 'data-' and then takes two numbers from the name, the first is the frame to show and the second is the number of particles to emit. This replaces the rigid list of data and allows a visual placement of each point. The earlier revision can be accessed at the above link if it is desired.


Force a Blender operator to always start with default values I'm writing an operator for which it is crucial that every time it gets called all the properties are set to their default values.

The ops.object.delete has 1 param. use_global. It is always false, no matter what the user put in last time it got called. I would like to replicate exactly that.

(For example: I want to modify delta scale. The default val for my_factor is 1, so nothing happens until the user alters that number. If the user calls the operator again, it will have stored whatever number the user has used last, however I want it to always start with 1.)

Add 'SKIP_SAVE' to the blender property option set.

When defining properties for the operator, any with 'SKIP_SAVE' in their property definition options set, will (like the name suggests) not be saved, and revert to their default value the next time the operator is invoked.

    scale_factor = bpy.props.FloatProperty(name="Scale Factor",
            default=1,
            options={'SKIP_SAVE'})


How to reset all properties to their default values in a custom made User Interface Panel I have created a UI Panel with some properties of type IntProperty().

bpy.types.Scene.myint = bpy.props.IntProperty(name="My Int Prop", default=9)

How can I reset this value to default value '9' on each run script. So, when I change this value in UI Panel to some other value (let's say 10, for example). It remains a changed value (i.e. 10), if I re run the script.

To return a property to its default value,  use property_unset(propname)

Python console code

>>> bpy.types.Scene.x = bpy.props.IntProperty(default=3)
>>> C.scene.x
3

>>> C.scene.x = 4
>>> C.scene.x
4

>>> C.scene.property_unset(
property_unset(property)
.. method:: property_unset(property)
Unset a property, will use default value afterward.
>>> C.scene.property_unset("x")
>>> C.scene.x
3


What is this kind of material? I'm trying to recreate an image on 3D (As you can see on the picture) but the material doesn't ''shine'' on the borders like the original picture.
I was thinking on adding textures but this is for an animation, so maybe a better setup for a material could help more than just a plain texture (which is no problem, i have Zbrush software too)
What's the kind of material that i could use to get some kind of 'texture' or 'ilumination' like the original/real picture?

Or if you have any other idea, what can you recommend? I'm starting with cycles rendering...

The top image seems to be the rods and cones that line your retina. The image is likely from a scanning electron microscope, then manually colored. (SEM can't see color)

Fresnel is the easiest way to accomplish the effect.


Shortcut for "disable object in the viewport" (DOV) Blender 2.8 I'd like to use the Collections like layers early versions of Blender. It is working well. But.
I use procedural boolean objects and need to hide the boolean parts. I created a part in a collection. But when I switch to another collection and back then all hidden elements are visible again.
I use the disable object in the viewport (DOV) and it's great.
BUT
There is a shortcut for hide (H, ALT H) and I can work fast, but I can't figure out: HOW I SWITCH DOV WITH SHORTCUT for fast developing.

Need a shortcut for DOV.
Please help...
Gabor

I know your question was asked many months ago, but in case you never found an answer, you can assign a shortcut for 'Disable In Viewports' by rightclicking the 'Disable In Viewports' icon in the outliner and clicking the 'Assign Shortcut' submenu

1 enable DIV icon in outliner

2 rightclick DIV to assign shortcut


How to place a .png texture with transparency over a material I am trying to create a low poly face with a face from a .png file. The issue is I already have material placed for hair and skin, as shown in the picture below.

I have created a .png file with a face which I would like to overlay over the skin material on the front of the head.

All examples I searched so far assume I also want the color of the material from the .png texture.

Update:

I added UVMapping, changed view to texture, made sure one face is on the eye but nothing is displayed..... see image... I don't know what is going on.

The image texture node has two outputs, the color data and the alpha (transparency channel) data of the image.  The color data only holds the red, green, and blue of each pixel.  So if you plug it into a shader's color you will probably just get black where there is supposed to to transparency because those pixels are really black, but invisible.  You need to use the alpha output as a mask for placing the face over the skin shader.

To do this take whatever shaders you are using for the blank skin and mix them with a diffuse (or whatever other shader[s] you want for the facial features) based on the alpha output of the image texture.


2.83: assign same materials for objects created by array modifier How do I assign same materials for objects created by array modifier? I created three houses by the modifier and want to assign a same color to their roof.

If your house base model is a continuous mesh (no loose parts), once the modifier is applied, go into edit mode, select everything and press P > By Loose Parts.
Go back into object mode with TAB.
With everything still selected, Right click > Set Origin > To geometry.
Press CTRL+ L > Object Data. Now when you modify one object's materials, they will all update.
In the end, while everything is still selected, go to Object > Relations > Make Single User > Object & Data and then you will be able to tweak each individual house separately.
Obviously it is better to do it before applying the modifier to avoid any of this.
PS, next time please take more time to write your question so there is less back and forth in the comments :)


How to stop objects from second layer createing themselves I have a script that adds an object at a random choice of predefined coordinates.  The script works just fine, but as with the other objects that are being added by the empty that contains this script, another instance of the object is created in the same place as the first enemy and health objects.  I can't find anywhere in my code where it says to add these objects from the second layer.  My question is how can I either make the first instances of these objects automatically delete themselves, or, make the objects not appear in the first place.  Here is the .blend (to see the problem, view from the top middle of the map.  Thanks!

I figured out the problem.  I just handled the problem locally in the Icosphere rather than controlling it with the Empty.  Thanks!


Issue: EEVEE unexpected long initialization time while rendering I am rendering a scene that I have been working on for days. It has not a lot of detail, just a few not complex materials. It rendered in EEVEE fine with 1.1s per frame. I just changed some animations and scaled some objects but did not edit rendering settings.
Suddenly EEVEE is taking forever to initialize the render as well as to close it and open the next frame. When it actually renders, it takes only a second to render.
Is there any way to profile the rendering process?
I would like to try to find out:
What data containers where loaded,
how long did what process take
Where there any internal errors that are not shown in console
Are there maybe sudden driver issues
I have had this problem three times now on different scenes. It happens randomly but sticks with the file no matter what I do.
My System info:
64GB Ram
2x Nvidia RTX 2070 blower edition
AMD Ryzen CPU

I had the same issue yesterday, when trying to render scene from animation in EEVE. It took about 25 second for it to start. It was the same with Cycles and Workbench render. There's no automatic update on blender so in my case it could be Windows or GPU driver issue. Tried previous blender release, same thing happended


Transforms moving around the 3D cursor? I think I accidentally pressed something to make it like this:

See how the XYZ arrows are at the 3D cursor instead of those vertexes I've selected?

How do I fix that? Whenever I select on a vertex or something, those blue, red, green arrows would always be where I selected, now it just keeps going to the 3D cursor.

Pivot point is a very important thing to learn. Also, yes, median is what you are looking for.


Partycle system's labels error? I'm following this Gleb Alexandrov tutorial :

Blender tutorial: How to Create a City, Covered with Fog

Go to minute 4:52,under the particle system/render tab,you will see that he chosen as Dupli Group "Group.001". Where/when he took/created this label ? I don't have it on my side. He also has 2 others label : g_antenna and group. I imagine that g_antenna is related to the mesh of the antenna that he got somewhere,but I'm not able to understand where,and the other label,that's group,I don't know what is this.

I add two screens. The first is what I see on my side and the other one is what I see on the particle system/render tab of the Gleb Tutorial.

1)

2)

Mate, Gleb created roof details meshes (antennas, chimneys and stuff) himself and grouped them to use in the particle system. You won't find them in your .blend file. You can try to find similar objects online, but if I were you, I'd just create them myself. It would be nice exercise for a beginner.

To group objects, you need to select them and press Ctrl+G. On the left bar (under T key) group name field will appear. You can leave the name as Group or change it to your liking. Highlight of grouped objects should turn green. Check this image to see an example:

The group name will appear in particle settings.


move a vertex to the position of another vertex (different object) in python? i basically need this:
How do I snap one vertex to the position of another vertex in a different object?
to be done by a python script.

i've managed to move a single vertex along one axis so far..
my problem is, that i struggle with the orientation options in blender.
i would like to select vertices from object2 via index (no problems so far) and copy their location and save these values to the selected vertices of object1.
why is it, that for example bpy.data.meshes['Cube'].vertices[0].co doesn't give you coordinates from 0,0,0? sorry for my noobishness..

I wrote this example script for you. Mind the comments.

import bpy
import bmesh

# Get the coordinates of the first vertices of 'Plane' object
firstObjData = bpy.context.scene.objects['Plane'].data
bm1 = bmesh.new()
bm1.from_mesh(firstObjData)

bm1.verts.ensure_lookup_table()

# Convert local coorinates to world coordinates before assignment
vertCoordinates = bpy.data.objects['Plane'].matrix_world * bm1.verts[0].co.xyz

print(vertCoordinates)

# Set the coordinates of the first vertices of 'Cube' object
secondObjData = bpy.context.scene.objects['Cube'].data
bm2 = bmesh.new()
bm2.from_mesh(secondObjData)

bm2.verts.ensure_lookup_table()

# Convert world coorinates to local coordinates before assignment
bm2.verts[0].co.xyz = bpy.data.objects['Cube'].matrix_world.inverted() * vertCoordinates

bm2.to_mesh(secondObjData)


Regions in my scene seem to render with less illumination I have a simple problem in my scene:
I have 4 lights, but only central lights are working in my render.

More info:

I tried more lights or planes, more emission strength, but the illumination don't penetrate inside of cylinder, the cylinder is cutted in half.. only the central  illumination(Normal illumination) is working good.

My goal is a illumination equal to the object's center (normal illumination) for all parts of the object

This render will be used for texture of another object, but is still a draft, ignore the number of polygons ...

Since you have stated you are new to Blender, sometimes deleting objects, lights and other items removes subtle mistakes. Archive your file under a new name, so this operation is very little risk.  The second time you model these objects will be faster than the first.
Delete all the lights and add them back. Logic stated in bullet 1.
Delete the whole scene and start from scratch.  Logic stated in bullet 1.
I assume you want brightness everywhere.
Add more lights or raise your lights higher along the z axis.  Increase the strength.
Add a more distant larger plane. Orient its face towards your scene. Select the emission shader. See image below.

If desired select Cycles Ray Visiblity Camera to FALSE unchecked. This will prevent the render from showing a bright rectangle.  See image below.

Verify you are satisfied with the render results.


How do I triangulate a quad along the alternate diagonal direction? Quite often I come across a mesh where I have a quad I want to triangulate, however upon pressing CtrlT, it triangulates in the opposite direction I want it to. I'm only dealing with a single quad within the entire mesh, so I don't want to use the triangulate modifier here.

Is there an way to have more control when triangulating a single quad within a mesh?

You can choose Fixed or Fixed alternate in the redo panel after triangulating:

If you prefer an all keyboard shortcut method, you can press CtrlE, R after triangulating to rotate the edge.

However if you are only triangulating a single quad, you can also select the verts you want to create the edge between and press J:


Crash when selecting GPU or clicking System in settings with RX5700XT Blender was working fine for me recently, but now I'm observing a problem.
Blender 2.81a and 2.79 seem to have the same issue. using cycles I get a crash as soon as I select GPU from the list of rendering devices. I don't even start rendering, it crashes just by selecting GPU. I went to check settings (do not recall if its set to GPU or GPU+CPU) only to find that clicking the System tab in settings also causes an instant crash. The computer is updated regularly, but I don't know when the issue showed up. How can I troubleshoot this?

on the console the only piece of information it seems to give me is "segmentation fault"

OS is Ubuntu 18.04LTS

In the event that it helps someone else out, I think the issue was an incompatibility with a kernel update. It's unfortunate but it appears that AMDGPU lags behind Ubuntu in kernel compatibility.

The machine recently updated to Kernel version 5.3. reverted it to 5.0 which was the previous version, reinstalled amdgpu and everything is fine again.
I installed amdgpu (pro version this time) 19.50, which is the latest version as of Jan 2020.


Making particles grow while sticking to an object I've already got the grow part down, where the particles will grow independently (using a particle texture). I need these particles to stick to my object while it moves.
Using the "No" option for physics on particles will make them stick to the object, but only the Newtonion, Boids, and Fluid options will allow the particles to grow separately over time. But with any of those 3 options selected, the particles are then separated from the object, making them sit still and disconnect from the object as it moves. I need the particles to act like bubbles on the surface of the object. Haven't found a good solution so far.

Use Hair type instead of Emitter in Particle settings (suits all kinds of mesh deformations including armatures), it also provides object instancing.

Or stay with Newtone option, but use Lattice + Hook combo (for simple scale/rotate/locate animation).

Prepare Lattice

Add Lattice object, scale it in object mode a bit bigger than your mesh Cube. Change interpolation to Linear.

Hooking

Go into Lattice edit mode, select all vertices and press Ctrl H, select Hook to new object (Empty will be added)

Setting emitter object

Add Lattice modifier after Particle system and select your lattice object.

Animating

Now if you try to move Empty, it will engage movement for Lattice and also emitter as it is cotrolled by lattice object. So instead of animating emitter object, animate Empty.


Can't select vertices/faces/edges? For some reason I am not able to select the vertices/edges/faces on Blender. I also cannot join the objects in Blender. When I try joining them it says "Active object is not a selected mesh," despite the fact that I have both of the meshes highlighted. Here is a gif of what I mean when it won't let me select vertices, and yes I am in vertex select mode. Also, it won't even let me select all of the vertices when I press A on the keyboard.

Thanks,

Best regards,

Idealist Developer

try this.. I think u accidentally press some shortcut keys ;)


how to get the a value of the resolution of an image in blender compositor? I am creating a node group and this node group required the value of the X resolution of the image that the user will put so the user should put half the value of the X resolution but I want to make this automatic so the user should only put the image and half the value of X resolution will automatically generated,so how can I get the value of X resolution of the image that the user will put.

You can use a driver to easily get the render resolution from the scene, for a user selected image it gets tricky as you will need to know the name of the image or the image node to reference it's resolution.

I think you could achieve that with a custom python node but at this stage they don't integrate well, they don't update when a connected node changes so need manual updating which can lead to errors.


How to get proxy_render_size via python? I need to get the value of the Proxy Render Size using python, but I can't seem to figure out how to do it.

When I mouse over, this is what I see:

bpy.context.space_data.proxy_render_size

The context must be correct for this to work.


Is there a way to lock a bone axis? rigging i wan't to make some of my bones like the elbow to just move in one axis for better animation, is there a way? I'm searching but i can't find an answer

You have two options, while in pose mode you will find a Transform Locks panel in the bone properties, these are also available in the 3D viewports properties region N. This can prevent a user transforming specific axes.

A more rigid approach is to use constraints, There are several limit transform constraints that will prevent bones being moved or rotated outside of your settings. Here you can also set limits, so you can allow a bone to rotate 30 degrees on one axis.

The transform locks only apply to the viewport, an fcurve or driver can move a bone with these locks enabled. Constraints are applied after fcurves so can prevent an extrapolated fcurve from going outside your settings.

Update for 2.8x

From 2.80 the transform locks have been moved into the same panel as the transform values. They also don't visually stand out as buttons.


Background can be seen through objects, Alpha Over doesn't work? I made another post for this earlier but I didn't exactly explain it well enough. On the render, you can see the stars and such behind the planet, as if it's transparent. I tried using the Alpha Over node in Composition like I was told but it didn't work. I was re-directed to another post but
it wasn't really the same thing. My background is another layer and such, as shown in the bottom left. I can't get it to appear in the above so I can connect it to Alpha Over and it won't let me add one to its node editor.

The bottom right is the planets texture and the top is just more detail onto it

Here's the link to the file https://www.dropbox.com/s/m032wc3pg66a7wv/Game.blend?dl=0

You just missed to check "transparent" in the render panel, under the film section.
Once you do that, your two renderlayers will have their own alpha channels and you will be able to composite them.

However, you'll notice that you no longer have the sky background. To bring it back you just need to turn the environment pass on in the planet render layer, and use it as background for your two plates.


How to make a Lightstick (Firework) This is a simple question, How do I make something like this in Blender?

I already did the flying sparks but I cant seem to recreate this part right here... It seems to be a very intense fiery glow but I dont know how to do it.

LIGHTSTICK

You could use the particle render type "lines" and increase the amount of trailing particles to emulate a streak.

To get the sparkles you may have to duplicate the particle system and use different render settings. make sure to keep the dynamics the same or they will diverge.


Particles render much larger than in viewport Particles are big and round. The scale is right, the size and the speed, it's suppose to be like this:

Even when I try to change the scale, it doesn't do anything. They are supposed to look smaller

Here are the setting it's using:

The problem was that the size of my particles in "Viewport display" section and "render" had to be the same.