Strange rendered texture of tea fluid I have a question about the rendered texture of my tea fluid.

Why do I have this weird blurry texture of my tea fluid?
I have copied the surfaces from the cup's inside and added a face on top of the surface. The fluid texture can be seen in the attached figure.

When I render the whole scene with the cup, fluid, walls and surface light this is the result. I still see this blurry texture which is confusing me.
When I rotate the camera, some of the blurry areas disappear. This is very strange

Since I am quiet new to Blender, I don't know how to improve this behavior.
Thanks in advance.

I personally think there are two things going on here:

CG technical. There is a noisy reflection of the ground-plane. That can be improved by Denoising, and the other considerations for reducing noise. You might also consider discriminating between rays: sampling at different levels according to the Light Paths the renderer is evaluating, if you find you are having to push the overall sampling rate too high.
Perceptual. I think this is more important, actually, here. This all depends on what kind of shot you want: an idealized product or pack-shot, or the glass in a more fully-realized scene. At the moment, in the absence of context, the eye interprets the reflection of the floor, noisy or not, as a feature of the surface of the glass, rather than a reflection of its environment.

For a product-shot, you could, for example, make a full soft box, (an emissive  rounded cube containing the scene)  you can subdivide its faces, delete some, color some, whatever you like, and it can be visible in lighting, refractions, and reflections without being visible to the camera. Your best references probably come from real-world commercial photography. Other devices available to you are depth-of-field, to soften reflections from a distance and emphasise the scale of your object, flags / gobos  for detailed shadows.. reflective or emissive 'cards' to punch up the glow in the liquid ... the list is endless.
At its crudest, the more fully realised scene is less work: put the glass and the floor into an HDRI environment. This is no great shakes, but it took no time.


Shading Issues with the Array Modifier I'm working on a model of a car wheel. However, before I continue, I want to fix some shading issues I am having.

My model has Subdivision surface, Mirror, and Array modifiers, which make up the 10 spokes/"slices" of the wheel. The wheel itself is all one, contiguous object. However, there are multiple areas where the shading looks a bit odd.

Problem #1: Seams at the End of Array

While my Array modifier has Merge Vertices checked and all angle values were precisely calculated/typed in to ensure that all of the vertices in the circle line up, the very last seam where the last segment connects with the first does not merge.

I think that this is because the Array modifier merges vertices only with each next part. Even turning on Automerge editing to merge vertices that are close enough globally does not work, because of the Array being a modifier and not applied. I have tested applying this modifier, and the problems did go away. However, I wish to keep it in an array and was wondering if anyone has any other solutions.

Problem #2: Hard Edges on Circle

At the center of the wheel, where all of the spokes converge, there is a circular edge which appears to not be affected by the Subdivision surface modifier.

No, it is not marked a hard edge -- it is completely parallel with the two lines in front and behind it too, but those are completely curved as normal.

Problem #3: Artifacts at all Array Seams

In the indicated center part of the model, there is a shading artifact. It happens where each part of the array has a seam.

Does anyone have any advice? It would be best if you could download the .blend file to mess with it:

But either way, I'm happy to have any feedback on the best way to fix these various artifacts from those more experienced than me. Thank you so much!

For the first issue, you just need to 'merge first last' in the array modifier. This option tells Blender that the extremities of the array have to be merged.

For the second one, it is because the flat face normal is inverted. Select your mesh and use ShiftN to recalculate the normals.

An easy way to check if normals are inverted is to turn on x-ray:

The third one is because the wheel border is not 'regular'. To make it more regular, use the knife tool K to make a loop along the wheel border.

That will make a ngon (on the face above) but luckily that doesn't matter here. Eventually, turn it to quad+tri (not shown in the gif below).


Fast Loop Cut in 2.8 I found a video @ https://www.linkedin.com/learning/blender-tips-tricks-and-techniques/use-the-mesh-edit-tools-add-on (see video at time 2:02) that shows a really nice loop cutting tool called "Fast Loop" (NOTE: see edit at bottom of this post - this tool doesn't do what I originally thought).

The addon is called "Mesh edit tools 2", and the video author mentions it ships with 2.79. I have 2.8, which has "Mesh Edit Tools" included, but no mention of "#2", and I don't see this really useful loop cutting tool anywhere.

Does anyone know anything about this? Is this version available for Blender 2.8? Or is this fast loop tool still available in the version that exists now?

If anyone is having trouble seeing the tool in the video, it essentially allows you to skip the loop slide part of creating a loop. The loop is instantly created wherever your mouse is. So you can literally click, click, click. Seems like this would be a really nice feature. Especially on those very long edges where you can't even see where your loop is being created until you slide it some distance.

If there is some way to pull off something similar in 2.8, that would be great too.

Edit: After watching the video more closely, it appears this addon did not instantly create loops where the mouse is hovering. The gentleman in the video is actually sliding loops by holding down the mouse button.

So I'm looking for something that may not exist at all. A loop cutting tool that instantly slides to where the mouse is hovering. Imagine a situation like this one..

So the user cannot see the center of the box they are adding a loop to because they are zoomed in too close. This happens often when working on longer low poly models like boards and sticks. In order to create a loop cut where the orange edge loop is, the user must create it off-screen, and very slowly (because the slide factor resolution increases as you zoom closer) slide it over into view. What I'm hoping for is a way (addon or feature) to instantly create a loop exactly where the mouse is hovering. So there would be no sliding involved. The preview would show the user where the loop will be cut, so there would never be a need to slide them.

Anyone know if something like this is possible? Any idea how difficult it would be to write a tool like this? I know very little about Python, but I have C++ programming experience. Seems like the hardest aspect of creating something like this would probably be calculating the slide factor based on the mouse cursor location.

Thanks again for any help!

You actually don't need any addon for it in 2.8. You just select Loop Cut on the left side bar and each time you click, new loop cut appears. Then you can hold down the mouse button to slide new loop but as a default it stays in place and you can keep clicking and adding loops.


How do I show a rendered image in a new viewport without the verticies being highlighted? Sorry it's a confusing question. Here's an image of what I'm talking about.

I would really like to see my model rendered without all the black outlining everything as I work on it.. I never had this issue before back in March when I last worked with blender.

Edit: The material is shadeless and the rendered mode is selected for the view. I realize you can't see that in the screenshot.

I'm not sure if it is the ideal fix, but if you just want to not see the vertices in the view on the left (which show up because toggling into Edit Mode on that object is affecting its mode in both views), I think turning off Overlays in the left-hand-side view will give you what you want. I've indicated where the relevant button is below, and give an example of what the result looks like:

As alternative, there may also be a way to only switch mode on an object in one viewport window but not in another, but that I am not sure about.


How to delete a collision modifier on blender 2.8? I don't know if I'm missing something or is really obvious, but I can't find how to delete an added collision modifier from a sphere.

To remove physics element, just click again on the button you've used to add it.

You can notice that once added, the original icon is replaced by a cross 'X' which indicate it could be removed.


Align face with a vertex via python Hi and good days to everyone.

What I have been trying to accomplish is rotating the plane (in the image below) in its x (red) direction until it aligns with the top vertex of the cone. Is there a way for me accomplish this via scripting? My tryouts have given me no result.

Edit: I have added a picture how it should look. And top of the cone is just a point. It could be 3d cursor.

Here is how I would do it.
I'll just show a workflow for doing it with constraints and blender operators.
I assume you will manage to code the same process in python?

I add an empty which is the point you want to track. I had a child cone for consistency with your image ;-).

I add another empty with a set of contraints :

And then I add a constraint to the plane's object :

It is over, the plane is like you want.
Now you can either leave it as is. You can move the first empty, and the plane will follow it.
Or, you can select your plane, and "Apply visual transform". And then you can delete everything you don't want anymore.

Now you can do these steps in python ! I guess it is slower than computing directly the good rotation with some trigonometry, but it has the avantage og being simple, plus you can still move your point at the end !


How to create road intersections with curves? I'd like to create a "curve" at the place where 2 roads intersect, instead of just having unrealistic blocky intersections, so how could I do that the easiest way?

Basically, instead of this

...I want something like this, that is not blocky

Also, is there a way to snap nurbs paths to this intersection somehow or would I just have to move it here and there until the road (nurbs) fits the intersection model?

One way could be,perhaps,using subdivision surfaces, creasing straight edges... sort of


Batch exporting scene collections or selected objects using glTF-Blender-IO I'm still new with python and scripting. I tried editing the obj exporter that I found. Since I'm exporting tons of object groups, I need each of scene collection or selected objects to be exported as an individual gtlf file:

import bpy
import os

# get the path where the blend file is located
basedir = bpy.path.abspath('//')

# deselect all objects
# bpy.ops.object.select_all(action='DESELECT')

# loop through all the objects in the scene
scene = bpy.context.scene
for ob in scene.objects:
    # make the current object active and select it
    scene.objects.active = ob
    ob.select = True

    # make sure that we only export meshes
    if ob.type == 'MESH':
        # export the currently selected object to its own file based on its name
        bpy.ops.export_scene.gltf(
                filepath=os.path.join(basedir+'gltf-individual', ob.name + '.gltf'),
                use_selection=True,
                )
    # deselect the object and move on to another if any more are left
    ob.select = False

Q: Can someone help me with this?

Approach to export collections using unlink and link methods
You can temporarily .unlink() all collections from the root level, then (re-)link() one by one to the scene level in order to export them and link them all back at the end of the script.
Tested this approach for a huge scene using the alembic export operator and it was pretty fast, surprisingly. For convenience I added a col_level integer to determine how many (sub-)levels of collections are going to be exported to gtlf or glb files:
import bpy

col_levels = 2                          # Levels to export
scn_col = bpy.context.scene.collection  # Root collection

def file_name(s):
    '''Return valid file name from string'''
    return "".join(x for x in s if x.isalnum())

def col_hierarchy(root_col, levels=1):
    '''Read hierarchy of the collections in the scene'''
    level_lookup = {}
    def recurse(root_col, parent, depth):
        if depth > levels:
            return
        if isinstance(parent,  bpy.types.Collection):
            level_lookup.setdefault(parent, []).append(root_col)
        for child in root_col.children:
            recurse(child, root_col,  depth + 1)
    recurse(root_col, root_col.children, 0)
    return level_lookup

# Root objects (in case)
scn_obj = [o for o in scn_col.objects]

# Lookups (Collections per level and Parents)
lkp_col = col_hierarchy(scn_col, levels=col_levels)
prt_col = {i : k for k, v in lkp_col.items() for i in v}

# All collections to export
candidates = [x for v in lkp_col.values() for x in v]

# (1) Unlink all Collections
for c in candidates:
    prt_col.get(c).children.unlink(c)

# (2) Export root objects (optional)
if scn_obj:
    bpy.ops.export_scene.gltf(
        filepath="/tmp/{}.glb".format(file_name(scn_col.name))
    )
    # Unlink objects of master collection
    for o in scn_obj: scn_col.objects.unlink(o)

# (3) (Re-)link collections of choice to root level and export
for c in candidates:
    # (Re-)link collection
    scn_col.children.link(c)
    # Export collection
    bpy.ops.export_scene.gltf(
        filepath="/tmp/{}.glb".format(file_name(c.name))
    )
    # Unlink collection
    scn_col.children.unlink(c)

# (4) Reset all back
for o in scn_obj: scn_col.objects.link(o)
for c in candidates: prt_col.get(c).children.link(c)

Note: The script is an initial proof of concept.

Operator to batch export collections
The core idea can be converted into an add-on using the famous ExportHelper class. Have a look into Templates > Python > Operator File Export in the Text Editor. Following add-on adds a new entry to the File > Export menu. The operator comes with the most important export settings as well as a level integer to export Collections to single gltf/glb files:

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>

bl_info = {
    "name": "Batch export glTF/glb files",
    "author": "brockmann",
    "version": (0, 2),
    "blender": (2, 91, 0),
    "location": "File > Import-Export",
    "description": "Batch Export Collections to glTF/glb",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Import-Export"}

import bpy
import os

from bpy_extras.io_utils import ExportHelper
from bpy.props import (BoolProperty,
                       IntProperty,
                       StringProperty,
                       EnumProperty,
                       CollectionProperty
                       )

def file_name(s):
    """Return valid file name from string"""
    #return "".join(x for x in s if x.isalnum())
    return "".join( x for x in s if (x.isalnum() or x in "._- "))

def col_hierarchy(root_col, levels=1):
    """Read hierarchy of the collections in the scene"""
    level_lookup = {}
    def recurse(root_col, parent, depth):
        if depth > levels:
            return
        if isinstance(parent,  bpy.types.Collection):
            level_lookup.setdefault(parent, []).append(root_col)
        for child in root_col.children:
            recurse(child, root_col,  depth + 1)
    recurse(root_col, root_col.children, 0)
    return level_lookup

class SCENE_OT_batch_gltf(bpy.types.Operator, ExportHelper):
    """Batch export collections to glTF/glb files"""
    bl_idname = "export_scene.batch_gltf"
    bl_label = "Collections to glTF/glb"
    bl_options = {'PRESET', 'UNDO'}

    # ExportHelper mixin class uses this
    filename_ext = ''

    filter_glob: StringProperty(
            default='*.glb;*.gltf',
            options={'HIDDEN'}
    )

    # List of operator properties, the attributes will be assigned
    # to the class instance from the operator setting before calling.
    batch_export_format: EnumProperty(
        name='Format',
        items=(('GLB', 'glTF Binary (.glb)',
                'Exports a single file, with all data packed in binary form. '
                'Most efficient and portable, but more difficult to edit later'),
               ('GLTF_EMBEDDED', 'glTF Embedded (.gltf)',
                'Exports a single file, with all data packed in JSON. '
                'Less efficient than binary, but easier to edit later'),
               ('GLTF_SEPARATE', 'glTF Separate (.gltf + .bin + textures)',
                'Exports multiple files, with separate JSON, binary and texture data. '
                'Easiest to edit later')),
        description=(
            'Output format and embedding options. Binary is most efficient, '
            'but JSON (embedded or separate) may be easier to edit later'
        ),
        default='GLB'
    )

    batch_export_copyright: StringProperty(
        name='Copyright',
        description='Legal rights and conditions for the model',
        default=''
    )

    batch_export_image_format: EnumProperty(
        name='Images',
        items=(('AUTO', 'Automatic',
                'Save PNGs as PNGs and JPEGs as JPEGs.\n'
                'If neither one, use PNG'),
                ('JPEG', 'JPEG Format (.jpg)',
                'Save images as JPEGs. (Images that need alpha are saved as PNGs though.)\n'
                'Be aware of a possible loss in quality'),
               ),
        description=(
            'Output format for images. PNG is lossless and generally preferred, but JPEG might be preferable for web '
            'applications due to the smaller file size'
        ),
        default='AUTO'
    )

    batch_export_levels: IntProperty(
        name='Collection Levels',
        description='Set the levels of collections',
        default=2
    )

    batch_export_materials: EnumProperty(
        name='Materials',
        items=(('EXPORT', 'Export',
        'Export all materials used by included objects'),
        ('PLACEHOLDER', 'Placeholder',
        'Do not export materials, but write multiple primitive groups per mesh, keeping material slot information'),
        ('NONE', 'No export',
        'Do not export materials, and combine mesh primitive groups, losing material slot information')),
        description='Export materials ',
        default='EXPORT'
    )

    batch_export_colors: BoolProperty(
        name='Export Vertex Colors',
        description='Export vertex colors with meshes',
        default=True
    )

    batch_export_cameras: BoolProperty(
        name='Export Cameras',
        description='Export cameras',
        default=False
    )

    batch_export_extras: BoolProperty(
        name='Export Custom Properties',
        description='Export custom properties as glTF extras',
        default=False
    )

    batch_export_apply: BoolProperty(
        name='Export Apply Modifiers',
        description='Apply modifiers (excluding Armatures) to mesh objects -'
                    'WARNING: prevents exporting shape keys',
        default=False
    )

    batch_export_yup: BoolProperty(
        name='+Y Up',
        description='Export using glTF convention, +Y up',
        default=True
    )

    def execute(self, context):

        # Get the folder
        folder_path = os.path.dirname(self.filepath)
        scn_col = context.scene.collection

        # Lookups (Collections per level and Parents)
        lkp_col = col_hierarchy(scn_col, levels=self.batch_export_levels)
        prt_col = {i : k for k, v in lkp_col.items() for i in v}

        scn_obj = [o for o in scn_col.objects]
        candidates = [x for v in lkp_col.values() for x in v]

        if not candidates:
            self.report({'INFO'}, "Nothing to export")
            return {'CANCELLED'}

        # Unlink all Collections and objects
        for c in candidates:
            prt_col.get(c).children.unlink(c)
        for o in scn_obj:
            scn_col.objects.unlink(o)

        # (Re-)link collections of choice to root level and export
        for c in candidates:

            scn_col.children.link(c)

            fname = file_name(c.name)
            fpath = os.path.join(folder_path, fname)

            bpy.ops.export_scene.gltf(
                filepath = fpath,
                export_format = self.batch_export_format,
                export_copyright = self.batch_export_copyright,
                export_image_format = self.batch_export_image_format,
                export_materials = self.batch_export_materials,
                export_colors = self.batch_export_colors,
                export_cameras = self.batch_export_cameras,
                export_extras = self.batch_export_extras,
                export_yup = self.batch_export_yup,
                export_apply = self.batch_export_apply
            )

            scn_col.children.unlink(c)

        # Reset all back
        for o in scn_obj:
            scn_col.objects.link(o)
        for c in candidates:
            prt_col.get(c).children.link(c)

        return {'FINISHED'}

# Only needed if you want to add into a dynamic menu
def menu_func_import(self, context):
    self.layout.operator(SCENE_OT_batch_gltf.bl_idname, text="glTF Batch Export Collection (.glb/gltf)")

def register():
    bpy.utils.register_class(SCENE_OT_batch_gltf)
    bpy.types.TOPBAR_MT_file_export.append(menu_func_import)

def unregister():
    bpy.utils.unregister_class(SCENE_OT_batch_gltf)
    bpy.types.TOPBAR_MT_file_export.remove(menu_func_import)

if __name__ == "__main__":
    register()

    # test call
    #bpy.ops.export_scene.batch_gltf('INVOKE_DEFAULT')

For versions pre 2.91, replace the batch_export_materials property (line 117) using:
    batch_export_materials: BoolProperty(
            name='Export Materials',
            description='Export materials',
            default=True
    )

See the actual revision for 2.83: https://blender.stackexchange.com/revisions/175968/7


How can I scale multiple objects around their own origin in 2.80? I want to scale multiple objects at once, with every object using their own origin as a pivot point, instead of the center between the objects.

All answers I found so far do not apply to version 2.80.

What am I missing?

Thanks in advance

Just set pivot point to Individual Origins.
Then each object will use it's own origin point.


How to Make Extruded/Drawn Vertices part of Face it Was Drawn On? I took a vertex from an existing face and extruded it to draw new lines onto that face. The face is perfectly aligned to one axis/plane and I limited the vertices to that plane of existence when extruding so I know they're perfectly aligned with the face.

I had kind of hoped that they would then become a part of that face but I cannot seem to join J them with other vertices of that face.

Can this be done? And how?

Or else, what is the easier way to do what I am trying to do? I really hope my only option is not to split the existing lines hundreds of times and join them all together and split the new lines just to get vertices where I want them.

I'd recommend using the knife tool, shortcut K, this allows you to cut the face any way you want.


Disparate versions of documentation for Python API Usually I search for help on Google, rather than navigating from the Blender homepage.

I frequently find documentation targeting 2.59, e.g. http://www.blender.org/documentation/blender_python_api_2_59_0/info_overview.html

If instead I navigate from the Blender homepage, I arrive at: http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python

I notice that many links from this page seem to target 2.5 or 2.6, even the URL has 2.6 in it. Does this mean the documentation is a bit of a jumble?

And then from this page I can reach: http://www.blender.org/documentation/blender_python_api_2_70a_release/info_quickstart.html.  If I understand correctly, this is the up-to-date equivalent of the first link in this question, although this isn't obvious as many links

How can I locate the legacy help, other than by random chance that Google returns a link? I don't seem to be able to reach it from blender.org

And why is the old documentation so much prettier? It is the most tasteful colour scheme I've ever come across. Why was it abandoned? Is there any harm in using the older documentation?

Could someone put all of this into perspective?

There's an URL that redirects you to the most recent API docs:
http://www.blender.org/documentation/250PythonDoc/

Sphinx Doc is used to generate the API documentation. I assume it's the default style we see for our API docs, not sure if Sphinx Doc changed their default or if there was a special stylesheet for 2.59 docs...
http://sphinx-doc.org/

The docs received an own page, they were formerly embedded in the old, dark-themed website (and I welcome this change). It might be the reason why the theme changed, it's no more part of the website and doesn't need to look similar. In the meanwhile, the website theme changed to a bright design, and I would like to see the current Sphinx Doc theme adopted:

Sphinx 1.0.7 - https://docs.python.org/2.7/
Sphinx 1.2.1 - https://docs.python.org/3.4/

The light gray design looks stylish and modern like the new blender.org design

The Wiki is a jungle of 2.4x docs, partially copied over to 2.6 pages and never updated again, some 2.5 guides and screenshots missing newer features, as well as some very up-to-date 2.6x pages - mainly the most frequently accessed pages (introduction, 3d view port...). Too bad Google doesn't accept documentation projects for the Summer of Code, I worry it will stay a blend of old, partially updated and up-to-date pages forever.


Copying specific frames from one action to another ( python ) I'd like to take specific keyframes from an action ( say 33 to 66 ) and copy them over to another action.
I know I can copy the entire action and just delete the peripheral frames, but that can potentially take long for actions that have a lot of frames in them.
I'd be doing this to a blank action.
Thank you!

Numpy action slicer.
Script to roll thru the fcurves of an action and create a new one based on a new frame range. A condition to shift the frames of the copy is added.

I know I can copy the entire action and just delete the peripheral
frames

The rub here is that copying the action using Action.copy() will AFAIK bring along all the fcurve modifiers and other stuff I have not added in here.
Test script, added a timer wrapper for testing.
import bpy
import numpy as np

def time_it(func):
    import time
    def wrapper(action, start_frame, end_frame, **kw):
        print("-" * 44)
        print("In:", action.name, "frame_range", action.frame_range[:])
        print("Fcurves", len(action.fcurves))
        print("Keyframes", sum(len(fc.keyframe_points) for fc in action.fcurves))
        t1 = time.time()
        copy = func(action, start_frame, end_frame, **kw)
        t2 = time.time()

        print("Out:", copy.name, "frame_range", copy.frame_range[:])
        print("Fcurves", len(copy.fcurves))
        print("Keyframes", sum(len(fc.keyframe_points) for fc in copy.fcurves))

        print("Elapsed time", (t2 - t1))
        print("-" * 44)
        return copy
    return wrapper

@time_it
def action_slice(action, start_frame, end_frame, shift=True):
    copy = bpy.data.actions.new(action.name)
    copy.id_root = action.id_root

    for fcurve in action.fcurves:
        kfs = np.empty(len(fcurve.keyframe_points) << 1)
        fcurve.keyframe_points.foreach_get("co", kfs)
        kfs = kfs.reshape((-1, 2))
        _fc = copy.fcurves.new(
                fcurve.data_path,
                index = fcurve.array_index
                )
        _fc.keyframe_points.add(0)
        _kfs = kfs[
                np.logical_and(
                    kfs[:,0] >= start_frame,
                    kfs[:,0] <= end_frame
                    )
                ]
        if shift:
            _kfs[:,0] -= (start_frame - 1)
        _fc.keyframe_points.add(_kfs.shape[0])
        _fc.keyframe_points.foreach_set("co", _kfs.ravel())
    return copy

action = bpy.data.actions.get("Jumping")
action_slice(action, 100, 300, shift=False)
action_slice(action, 100, 300)

Test run on CMU mocap file 01_01 Jumping.
Output.
--------------------------------------------
In: Jumping frame_range (1.0, 551.1978149414062)
Fcurves 96
Keyframes 264192
Out: Jumping.017 frame_range (100.19960021972656, 299.9988098144531)
Fcurves 96
Keyframes 96000
Elapsed time 0.1481459140777588
--------------------------------------------
--------------------------------------------
In: Jumping frame_range (1.0, 551.1978149414062)
Fcurves 96
Keyframes 264192
Out: Jumping.018 frame_range (1.1996002197265625, 200.99880981445312)
Fcurves 96
Keyframes 96000
Elapsed time 0.14278960227966309
--------------------------------------------
>>>


How many vertices can I connect to a face? I was wondering how many vertices I can connect to a face. I mean, when modeling, I can connect as many as I want, but is it allowed to do such stuff?

Because I know that if I raise a single point on one of the edges on the example below, the face will have a strange form.

If you look at that from different angles, you can clearly see that there are edges but that aren't selectable (I don't know how to explain that). You can see them but there's not an outline of them.

So my question is, if I don't have the intention to move the surrounding edges of that big face, can I leave it like that (image  1)? Or do I have to triangulate it or what?

Ps: Maybe for a basic scene it doesn't matter. But I do it for a game that's why I'm wondering if I'm doing anything wrong.

Thanks

If it's a big flat surface, it is absolutely fine to leave it as Ngons. A polygons with more than 4 vertices are called N-gons. For rendering and UV unwrapping there should not be much issue, if it's going to be staying within the blender environment.

However if you are working on models that would be exported into a game engine, it's best to define your 4 sided polys all over your meshes as much as possible. Games engine tends to mess up your triangles when no definition of edges are found. They pretty much auto tesselate your meshes for you, which usually produce "unhappy" results producing in-game artifacts.

The link that iKris posted is pretty clear on a number of reason when to use them, and when to avoid them.


How to make a skybox move with the player but not jump with them I have a pretty nice skybox, but it doesn't seem realistic that the player can get right next to it, so I want it to move with the player, but not jump with the player or rotate with the player.

I found out how to.  I just added a Copy Location object constraint


Wrapping a mesh around point cloud with cavities I have a series of point clouds I want to convert to mesh (there are points inside the object, uniformly distributed, not only on the surface).

I want to generate a model of the surface of the point cloud.

When the model is convex (like a cube or a sphere) applying a convex hull around the object is good enough but when the model has holes (like a torus (a.k.a. doughnut)) or cavities (like the area around the eyes in a head model or the area around the steam in a glass of wine) those concave features are lost.

Is there a way to wrap a mesh around a point cloud in a "convex hull style" without loosing the cavities?

It doesn't need to be perfect, a reasonable approximation of the geometry of the object would be good enough.

There is a cool addon called Point Cloud Skinner that can build mesh from point cloud data. (By Hans.P.G)

Download and install it;
Find the Point Cloud Skinner panel in Scene tab;
Tweak the parameters as instructed until you get a good-enough result;
For complicated data, additional manual fix may be required, such as filling holes or clearing elements.


How can i bake a texture for a large plane on which I've used a seamless texture Ive used a seamless texture to make a brick wall, it is a square texture, and I've just scaled up the UV map beyond the image constraints in order to repeat the texture over the large plane, I'm now trying to bake the lighting etc. onto a texture, but instead of baking the entire plane, it bakes a small area

I've tried making the image texture im baking onto, the same proportion as the plane but it bakes a smaller area that looks stretched

is it just a problem i have with the UV mapping?

For baking you often want 2 UV maps: one for reading the source texture appropriately (exceeding bounds or just filling a small part) and one for baking (optimally filling the entire texture space). You can control which UV channel is active with baking via the little camera icon next to UV maps.


How can I get this curtain to open and close realistically? I'm trying to model a curtain (drape for you US people) accurately.  I've seen this youtube tutorial that scales the top vertices in the x axis with shape keys, but it's not the right look because it all squashes up evenly.
Here's a gif of how I want the curtain eyelets to operate - they get a certain distance from the next one and pull it along because they are all connected together with string:

They hook on at these points:

And here's a real-life version, that I want to animate:

(You may notice the curtain doesn't sag down, because it has stiff fabric holding it up level.  This might make just hooking the vertices difficult)

.blend coming soon - as soon as it uploads! - It's massive. I can upload if strictly necessary, but it's nothing amazing so far.

Here's a way to get you started,
Subdivide a grid or plane well and select some vertices that would be where the "rings" would go into the curtain. (a bit randomness is okay I suppose)

Add these selected vertices to a vertex group to be used by the cloth modifier for pinning.

Create a Shape Key and for the second key scale the pinning vertex group towards the cursor the direction the curtain will open.

Add cloth and subdivision surface modifiers.
For cloth settings, default is mostly okay aside from adding self collisions and pinning vertex group.

Next animate the shape key from 0 to 1 and you should end up with a result similar to below:

Here's a file to play with:


Transform cube face in the z up direction to vertice above (need automation method) My scene currently has 2 objects in it from imported gis data sets.

The first object contains a series of cubes, think building shapes.
The second object contains a series of vertices that define the z up height. One vertice for each cube and is roughly placed in the center of each cube top face (building elevation)

Question:

What would be the fastest method to snap a cube top face to the above vertice if you had a few hundred cubes? (The snap to vertex is not workable because of the number of verts in the scene)

I have seen a drop to the ground script for objects so I think there may be addon for gis data out there?

Thanks in advance

You may be asking for the DupliVerts feature.

In this case, the general steps would be:

Move the origin of the cube to the center of its top face;
First select the cube, then select the vertex cloud object, press CTRL P > Object;
Keep the parent object (vertex cloud) selected, go to Properties > Object Data > Duplication, select 'Verts". As shown in the image below.

P.S.: Remember to keep their origins staying at same location.


Get icon_id of image already loaded I'd like to know how i can get the icon_id of an image already loaded.
For exemple, if i use the template "ui_previews_dynamic_enum.py" and i change the directory, there is no problem as long as i don't return in a folder already used to display the icons.
In this case, i've got this message error:

  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\modules\bpy\utils\previews.py", line 97, in load
  raise KeyError("key %r already exists" % name)

How can i "ask to blender" using the icon_id of the corresponding image if this one already exist ?

i'm not sure without seeing your code ( a github link would be great ). I can make a guess about how you might be able to avoid the KeyError

# ImagePreviewCollection(dict) is a subclass of Python's built-in dict type
main_collection = icon_collection["main"]
icon = main_collection.get(some_key)
if not icon:
    main_collection.load(icon_name, icon_path, 'IMAGE')

I use custom icons in mesh_tiny_cad

If i'm reading bpy/utils/previews.py correctly it isn't possible to overwrite or clear a key/value pair.

If you are keeping track of the IDs somehow then..

if icon_id in [v.icon_id for k, v in pcoll.items()]:
    ...


Reload pressing F8 will not restore property to default? Is it possible to reload by pressing F8 and restore property to default value? I don't seem to get this working? If there's a way to do so, would it work with EnumProperty?

bpy.types.Scene.my_string_prop = bpy.props.StringProperty \
  (
    name = "Text Field",
    description = "My description",
    default = "some default text here"
  )

In the panel def draw:

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

        #Set TextField
        col = layout.column(align = True)
        col.prop(context.scene, "my_string_prop")

Make an operator to add functionality before calling another

The text editor > templates > python > Operator Simple template edited (minimally) to reset a user defined  "xxxx" property of the scene to its default value. Can either use scene.property_unset("xxx") or simply remove its storage del(scene["xxx"]).

After which the reload script is called. (default op of F8)  Edit the shortcut in user preferences to point to new operator.

the screen F8 shortcut after changing "script.reload" to "object.simple_operator"

import bpy

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "My Reload Scripts"

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        scene = context.scene
        scene.property_unset("xxx")
        #del(scene["xxx"]) # same
        # what F8 calls
        bpy.ops.script.reload()
        return {'FINISHED'}

def register():
    bpy.types.Scene.xxx = bpy.props.IntProperty()
    bpy.utils.register_class(SimpleOperator)

def unregister():
    del(bpy.types.Scene.xxx)
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()
    # test code
    scene = bpy.context.scene
    scene.xxx = 10
    print("before", scene.xxx)
    bpy.ops.object.simple_operator()
    print("after", scene.xxx)


Change size of armature bones? I want to be able to do is change the size of the big bone a bit so I can actually see what I'm animating.

I want to be able to wireframe the armature so I can see the hands.

So in other words, I want to be able to see the fingers, making the whole armature a lot thinner but not bigger or longer, and the then be able to see through it.

To adjust the size of the B-Bone display type in Blender, enter Edit mode and use CtrlAltS. It will scale while keeping it constrained. To scale on a specific axis, select the desired axis after triggering this with X, Y or X.


Why does an even subdivide change the displayed texture? In my scene I have a default plane and scaled one edge along the x axis. I have a material that is just a tile texture that is mapped on with a UV map. Here is a screenshot of the setup.

This is far from what I would expect. I would expect that it would look like the tiles had been compressed. My expected result shows up as I subdivide the plane. What is subdivide doing that is fixing this mapping?

Here is 1 subdivision

Here is 3 subdivisions

Ah I figured it out and it's not the vertices. Blender uses a triangulated version of a mesh to do UV mapping.

Looking at this we can see two distinct triangles:

Initially this doesn't make much sense since the object only has 4 vertices and should just compress as if it was transformed in Photoshop. However, once the mesh is triangulated with Ctrl + T the problem is clear.

All of the UV data is equally split between two uneven triangles. Subdividing makes the all of tris closer in size, creating less distortion.


Rendering ocean scene, but ends up as a cube I am new to blender, and I am trying to render my animated ocean scene. However, when I render only the cube I started with is visible, not the ocean. And the cube does not show in my viewport. Any suggestions on what I can do to render my ocean animation?

If you are using the ocean modifier, then it would be best to use a plane not a cube. Also, you need to subdivide the plane before you add the modifier. You can do this by adding a subdivision surface modifier, or subdividing in edit mode. You also may need to keyframe the ocean modifier, if you have not done so.


How can I edit an action strip while seeing the global NLA animation playing? I'm playing with the NLA editor so I can use action strips, but I think I don't understand how it works.
From what I understand, I can see the NLA (global) animation only if there is no action opened in the Action Editor.
I can edit an Action Strip by right-clicking it then Start Editing Stashed Action from within the NLA.  It is now open in the action editor.  But I don't see anymore the global animation of the NLA so it's difficult to work correctly.
Is there a way to edit an Action Strip while the global animation plays ?
Thanks

If you select the strip in the NLA and press Tab, the action will open in the Dope Sheet and the other objects will continue to be animated.
The only problem is that the action you want to edit will stick to the beginning of the timeline, or at the frame where it is supposed to begin in the Dope Sheet as an action, not at the frame where the strip is placed in the NLA.
To make it begin at the same frame as in the NLA, enable the track pinning option:


Make imported images insensitive to lighting but cast and receive shadows I'm trying to do a cutout animation with imported .png's. The only way I've found to get them to render faithfully is to make them either shadeless or emitters with an emit value of 1. However, I'd like to simulate the effect of actual cutouts where they sit on top of one another and cast a small drop shadow. I've tried adding a second lamp with the 'only shadow' shadow checked, which works to some extent, but the shadow is very faint no matter how much I increase the energy of the lamp.

Is there any way to achieve this effect?

Well you see, in reality, shadow is simply the absence of light. So to make something shadeless and receive shadows doesn't make any sense at all.

But of course, there is always a way around the laws of physics :)

There may be a few ways to do this, but the first that comes to mind is compositing:

Your "shadeless" material should just be a regular material with shadeless turned off.

Then you need to give a unique Object Index (or Material index) for the objects with shadeless materials - this will allow to do compositing for only those objects:

Then enable some render passes:

Shadow to give you... well, shadows.
Object Index so that you can isolate those shadeless objects.
Color so that you get the material color without any shading.

So when you render, you'll get:

Plain uncomposited render:

Shadow:

Object Index:

Color:

Then in the node editor, you simply need to multiply the Color and Shadow passes to get your shadeless but with a shadow effect:

And then use the ID Mask node to isolate the objects that you want to be shadeless, and use that as the Fac to mix the raw render and the shadeless part together (so that only the objects that you want to be shadeless are shadeless):

Download the .blend

Note: If you get aliasing issues, enable Full Sample in the render settings.


Why does my render quality decrease when I open my file in an older version, then bring it back to the current version? I'm working on a project in Blender 2.78. Normally I work from my fancy workstation. Last night, I pulled up my project on my laptop in Blender 2.76b (that's the newest version that works on my laptop). I did some more modeling and saved the file. Today, I opened the file up in 2.78 again and the render quality has dropped dramatically. I'm using an environment map for lighting. Even when I pump the samples up, the quality is horrible. When I create an area light with an emission shader, the quality is as expected, but the environment light has suffered.

Here's a screenshot that compares the render quality using an environment texture for lighting. Notice the quality difference and the number of samples in each image:

Why has my render quality dropped?

Can I fix my file or should I create a new .blend and append the objects from my original file? (that seems to fix the problem, but it's not an ideal solution since I will probably be doing more work on my laptop).

Check the "multiple importance sampling" option in the world panel. Sometime recently, I believe post-2.76, it was changed to be enabled by default. Disabling it would produce the result you see here, and might happen if you change Blender versions without explicitly setting that flag.

See this answer for what that setting does: https://blender.stackexchange.com/a/8156/8081


Convert old AnimationNodes to Current - a flying away movement - what is the "Objects from Group" replacement How to convert this animation to current 2.8x animation nodes ?
A simple flying with slight rotation, controlled by the empty locaion....

I can't find a kind of "Objects from Collection" node

thanks so @OmarEmaraDev it's called "Collection Info" now,
also it kind of messed up the the inital transforms and Index Keys


Disappearing bone shapes with rigify (show_wire) In the transition of 2.79 to 2.8 there are currently still some problems. The main problem I'm having is, now I can't see my wire shapes without manually selecting "show wireframe" on all of my bones.
I know this is going to happen so I'd like to automate it.
Is there a simple script that can turn wireframe on or off on all selected pose bones?

You don't need a script, simply hold Alt when clicking the checkbox, it should do the action on the whole selection. Unless this function is broken in your 2.8 build of course x)


Is it possible to delete folders in Blender's file view? It's possible with files (right-click, x key, click "Delete" to confirm), but I haven't gotten it to work with directories yet. In case it changes anything, I'm using Blender 2.67b on Debian 7.0.

It is not possible to to delete directories in Blender's file browser, unfortunately.


Animation Nodes - Blend distribution of objects on a curve into another curve I've been trying to recreate the effect from the Cinema 4D tutorial below:
https://www.youtube.com/watch?v=BPv2HVvQfGo

I'm stuck at 9:55 where he uses the inheritance effector to be able to morph instanced cubes from the first path into the other. Is it possible to do it in Animation Nodes? I've been trying for a few days and I couldn't find a way to do it.

Or maybe there's another way to achieve this effect in Blender? I've tried connecting splines and trimming the bottom one. It works kinda well but the connection is very sharp and I don't know how to smooth only the connection, not the whole shape.

Thank you in advance.

First, I'll show how to morph objects distribution from one curve to another curve then we will use the same node-tree to morph a curve.

==========================================

Morphing Object-Distributions:
1) First, we have to sample the curves (A and B) which we will use to distribute the objects, both curve's sample-amount should be the same:

2) Now, we have to mix the locations or vector-lists of both the curves and the mix factor is controlled by the falloff. To do that, we can use the Mix Vector node but for vector-list, we also need a Loop node. However, for better performance, I have made a group-node which do the same job i.e., mix the two vector-lits (A and B):

3) Next step, mix the locations of both curves using the group-node (mentioned in step 2) then use the resultant locations to distribute the objects:

4) You can use any falloff to animate the object-distributions. Here, I have used the Delay Falloff node to animate the distributions:

5) And also use the same group-node to mix the other vector-lists, e.g., Tangents of both the curves:

Here is the final node-tree:

Blend File:

==========================================

Morphing Curves: We can also use the resultant locations from group-node to create a spline for curve morphing:

Blend File:

==========================================

Edit:

Morphing Object-Distributions on multi-splines:
We can easily morph the object-distributions on multi-splines use Loop Node. In this example, I use the above node-tree with a single spline (A) and loop/iterate over other splines (B list):

Final node-tree:

Blend File:


getting the most out of tracking vs memory I think this has to do with having lots of tracking points vs memory that is slowing me down to a craw.

I have 16GB ram, and 11GB swap. I selected detect features, giving me a lot of tracking points, (per youtube I found out this feature) when I run it to track of course it runs fine for a while until my RAM is almost used up, then slows to a craw.

I too have proxied my video to 50% as well.

from what I have learned on YouTube the more tracking points the better. How do I utilize this feature in blender to select the points for me and still be able to use them all while tracking something over 150 frames. the limit that
they all use for training purposes.

this too is a per-recorded movie by someone else.

More tracking points are not better, but accurate ones are. More inaccurate trackers will only make things worse, not better.

The automatic feature detection sounds good in theory, but I still prefer choosing the tracking points myself, focusing on what items will be in frame for the longest time in the scene and which will help blender determine the 3d space.

To get better performance, let blender cache the  whole shot into RAM. You might need to increase the cache size in the system preferences.

For more tips on motion tracking please read: https://blender.stackexchange.com/a/42332/1853


How to add scratches? How to add scratches just at the tip o my blade and mabye on the wood too? Using PBR maps...

Here is a setup I like to use for adding imperfections that allows for a good amount of control in placement.

To start with, I typically will give imperfections a separate UV map, as it tends to give a bit more control.

After adding a second UV map, you can use a  Mix RGB node to add(or multiply) the scratches texture to your roughness map. Then, use a node group such as this one from BlendSwap to combine your scratches normal map with your base normals if desired. (See this question for some other solutions on combining normal maps also.)

With that done, it is only a matter of using a gradient texture (or any other procedural texture if needing some other kind of mask) as a mixing factor controlled with a color ramp to determine where the scratches should be.

You can change the interpolation on the color ramp to something other than linear for a bit more control over the mix as well.

A node setup like the one shown below  should suffice in most cases, and is adaptable to use in most situations where you might want to add some kind of imperfections to an object.

click to enlarge

Here is a quick example  with a cylinder using the node setup above:


Gradient colour on UV mapping I watched a youtube tutorial on making a clover and I want to make the same by myself. From the video, it seems that clover is shaded using UV map

and then some gradient texture in the "Texture Properties" tab instead of shading nodes.

The result is

However, I encountered some problems below:
1) The video is too fast to follow even though it is played at 0.25 speed
2) I am using Blender 2.82 but it seems that the Blender version in the tutorial is 2.79 or earlier.

Can somebody teach me how it can be done in Blender 2.8. Thanks a lot!

I guess it's this kind of node chain: Texture Coordinate > Mapping > Gradient > ColorRamp > Diffuse > Output.


BGE Game LogicImport I'm doing some game with city traffic in BGE. I'd like to spawn driving cars near player using script but I want to give them different Game Logic on spawn dynamically and randomly (for different types of drivers like agressive or calm). Is it possible to import GameLogic from file or object from other .blend file? I know it is possible using bpy but how to do it in bge?
Thanks in advance.

Within Blender (and the BGE) the logic is assigned to the game object and can't be exchanged. This means the behavior is fixed assigned to a specific game object.

But there are options to work with that.

Separate objects

Have one object with the behavior and others for representation. This way you can exchange the behavior be assigning another behavior object. You can establish the relationship via parenting.

Composition pattern (Python only)

You object gets fixed high-level behavior. E.g. Perform the driving behavior.

Your code is designed around the composition pattern. For example the car can have a driver. The driver performs the driving behavior. You can have one driver for aggressive driving and one for calm driving etc.. They all share the same interface to the car.

Before driving you assign a specific driver to the car. You can even exchange the driver on-the-fly.

This design fits very well
- on a discrete number of driver tpyes
- the driver types have not much in common (they are very different)
- you want to add further driver types later

The different driver types are Independent of each other.

Parametric

You have one driver's behavior that can be controlled by different parameters e.g. aggressiveness.

This fits well
- when there is smooth transition from one behavior to the other. e.g. aggressiveness 0.0 .. 1.0
- when the different behaviors are pretty similar


Unexpected result adding the Array modifier I have created a 3d curve from a group of points. I have done this by reading point coordinates from a CSV file and created the curve within Blender using Python. The curve is available here.
I am wanting to use this curve as the target curve in the Array modifier. I am currently testing with Suzanne. But you can try almost any mesh (eg a cube).
The issue is the array result is not what I am expecting as each mesh is rotated weirdly(!) along the curve.
Everything is fine when I build up a curve in Blender. But for some reason, it's not working as expected when the curve is imported or created with python.
The following image shows Suzanne's orientation at the beginning of the curve. It is almost facing up after the first round in the helix.

and here is the end of the curve where Suzanne is almost upside down:

I have tried to tweak the Array modifier properties but that obviously is not the right solution.
I am looking for a way to have Suzanne's front normal aligned with the curve tangent vector all along the way. Pretty similar to how a vehicle sits on a road or a trolly on a roller coaster rail, always following while facing the same direction as the curve's front normal.

Go to your curve settings and change the Twist Method from Minimal to Z-Up.
To get the look in the image (one facing the back of the next) I had to rotate the Suzanne head (in edit mode) 90 degrees on the Z axis. I also added a subdivision surface modifier, simply because the smoothed models seemed easier to see in the screenshot.


Why are sky textures not showing up? I'm a Blender noob and trying to do something I thought would be simple, but is causing me grief. I'm trying to add a sky outside the windows of the classroom scene found in this Blender file I found online.

I've tried the tutorials here and here, and neither of them show any alterations to the scene when I go through the steps. It's like something in the setup of the file is overriding what I'm trying to accomplish.

I have no idea what's going on, or how to even find what settings to tweak, turn on/off etc. Any guidance would be wonderful.

This appears to be due to a several things:

Transparent is enabled in Render settings > Film.
This renders the image with alpha transparency instead of sky. Useful for compositing, but hides the sky texture (at least in viewport render).
Ray visibilities are disabled on the world material.
The compositing setup doesn't take into account the sky texture. This is understandable, as a real-life camera would over-expose the sky when taking a picture with a reasonably exposed interior.

So to make this work, you'll need to modify the compositing setup.

Start by adding your sky texture to the world material. Ensure the strength is set correctly and at least Camera ray visibility is enabled:

Disabling Properties > Render > Film > Transparent won't work in this particular case, since the compositing setup uses it create glare from the sky. Instead you can use the Environment pass:

Enable the environment pass in Properties > Renderlayers > Passes:

Connect the environment pass output of the _mainScene Render layers node to the Alpha over node in the COLOR CORRECTION frame:

You may have to reduce the amount of glare by reducing the Fac value of this mix node:

Render:


Create arches to form dome on ring shape I am trying to take this shape:

and have it with a dome (of a slightly different width) over the ring shape.  (refer to my sketch)
How do create a dome over this ring?
Attached is a side view of what I'm trying to achieve

I have tried using the bend modifier after watching some tutorials but I can't seem to get it to work since I'm not sure I understand what it's doing.
Any help in the right direction is appreciated!
My Attempts So Far:
Here is my wacky attempt using bend modifier:

I have tried the bridge loop technique as well but I also get weird results.

How to create a dome procedurally.

Add a Plane, go to edit mode, select all, right click > Merge > By distance (in order to get a single vertex at the origin of the world)
Add a displace modifier, set the direction to Z and midlevel to 0

Add a screw modifier, set to X, angle 90°. Now you have an half-arc going from Z = 1 to Z = 0

Add another screw primitive. Now you have a half UV sphere primitive

Duplicate the dome and remove both screw modifiers, and set the displacement axis to X. Now add a screw modifier and don't change anything. right Click in the "Strength" field of the dome's displacement modifier and choose "copy as new driver".
Paste the driver in the "Z" location of the wall object with right click > Paste driver. Now go to the "Angle" field of the dome's first screw modifier and copy as a new driver too. Right click again in the "Z" location driver and choose "Edit driver". Click on "paste driver variables" icon on the top right of the displayed variables. Change the driver settings from "Averaged value" to "Scripted expression" and type : strength* sin(pi/2-angle). That should make sure the walls are always leveled with the bottom of the dome.

Now for the circumference, do the exact same process but with the "Strength" field of the wall's displacement modifier and change the expression to strength*cos(pi/2 - angle)

Add a boolean modifier to the dome set to "Union" and a "weld" modifier. Hide the wall object.
Add a solidify modifier to the dome object for thickness.
Result :

You can go wild editing every field in the modifiers and create your custom drivers !


How to convert particles to duplicates I need to create a scene where hundreds of detailed objects are cloned within the volume of another shape. Tutorials online showed me how to do this using the particle emitter (render type: group), which worked great. Here's my problem: I need to export my final scene to the web using Verge3D, which apparently does not support particles. Therefore, I would like to convert all the particles to duplicates. I do not want to convert them to actual geometry, because it is hundreds of shapes and it will run very slow. Is there a way to convert the particles, in the positions they are in now, to duplicates?

Thank you!

Welcome to Blender Stack Exchange!

After out discussions in the comments, I'll lay out what I mean a bit more clearly, and give you a step by step solution so you understand what you have to do and why.

The end result/goal will be to get rid of the particle system (although we will use it as a step) and end up with a large number of objects that are all duplicates of each other.

First off, by default, converting a particle system to real meshes via the modifiers tab does actually make them into duplicates automatically. Each identical object will have identical data. If you edit one mesh, they will all update accordingly. This should be much faster already than having individual objects with unique data. So there may not be much improvement available over what is done automatically already.

That said, the second method is to use linked objects for the particle system. A linked object is an object that is referenced from another file. When you link an object, it will appear in you scene, but you will not be able to edit the mesh data at all. Any updates you want to make to the objects will have to be done in the original file. This may provide you with some speedups. In my tests, the viewport was a bit more responsive, but memory usage was about the same. Theoretically though, this should be the fastest.

So let's get down to business.

The first method is self explanatory. Click the convert button on the particle system in the modifiers tab. This isn't what you want though, as it should be the slowest method.

For method 2, I'm assuming your setup is something like this: You have an object that is the emitter for a particle system, and you have a group of objects that are being instanced by said particle system.

Here's my setup that I used:

This is the group of objects that I used for the particle system

And this is half an icosphere used as an emitter for 5000 particles with random size and rotation (I used Blender Render with a transparent material for the emitter and enabled viewport transparency which is why it is not visible).

From here, I selected the 4 objects and copy pasted them to a new file Ctrl+C then Ctrl+V. Save this file and you can close it, as we won't need it again. Then I deleted the 4 objects from the file with the particle system. This will make the particle system disappear. However, all the settings will have remained the same. The only ones that may change are the render settings where you select the group, so maybe make note of them just in case.

Now, go to the file menu and choose the link option about 2/3 of the way down. This will allow you to add an instance of another object to your scene. Navigate to the file with the copy-pasted group, and Link the objects. It's important to link them all as separate objects, and not import the whole group, as importing the whole group will not allow us to work with each object individually.

Once you've linked the objects, they should appear in your scene, but you can't edit them or move them in any way really. For our case that's just fine, just put them on another layer. Then we can group these linked objects.

Next, Go back to your original particle system and select this newly created group. Since they are the exact same objects, just linked, and since you haven't changed any settings at all, the new particles should be identical to the old ones. Now you can convert the particle system by going to the modifiers tab. This won't delete the emitter and original particles, you you have to do that manually. At this point, you will have a bunch of individual objects, but they are all instanced from another file. On my system though I really didn't notice much of a speedup, but just converting the particles directly didn't seem to bog it down much though so there may be a noticeable difference.

There is one other way that will probably be the fastest. That would be to link the entire system to a new file as a group. Basically all you do is select all the converted objects, make a group out of them, then go to a new file and link this group (actually linking the group this time). This will create an Empty with duplication enabled and set to group.

There is also a modifier you may want to check out called the Particle instance modifier, but at least from my basic understanding it doesn't work with groups.

While these speed-ups should all work in theory, I didn't actually notice much a of a difference on my computer. The biggest slow down was when I had a bunch of individual objects and selected them. This was much slower than selecting the linked group from the final option. As far as navigating the viewport though there wasn't much difference.


Check if the whole plane is being on a orthographic camera render (or get a proportion of the rendered plane) Situation: On my scene, planes can be positioned anywhere and I should not move them - I move around only camera. After positioning a orthographic camera with a script, I am not sure if the whole plane is being rendered - I want to render one whole plane at a time (also areas that don't belong to a plane are not desired on a render).

My questions:

Given a camera position and the plane in 3D space (where camera is orthogonally positioned to plane), how can I check if the whole surface of a plane is being rendered using orthographic camera?
Is it possible to calculate the proportion of a plane's surface that's going go be visible on a render?

The reason I need this is because I cant figure out proper camera positioning function. What I did until now is I: find a center of mesh and calculate the plane's normal out of it, I position the orthographic camera on plane's normal some distance away. Now I don't know how to set the orthographic camera's rotation and scale to render only the plane.

Not finished camera positioning code:

import bpy
import bpy_extras
import mathutils
from mathutils import Vector

def get_global_plane_normal(plane):
    normal_local = plane.data.vertices[0].normal.to_4d()
    normal_local.w = 0
    normal_global = (plane.matrix_world * normal_local).to_3d()
    normal_global.normalize()
    return normal_global

def main():
    scene = bpy.context.scene
    plane = scene.objects.active

    coords = [(plane.matrix_world * v.co) for v in plane.data.vertices]

    # Calculate the center of the mesh
    local_bbox_center = 0.125 * sum((Vector(b) for b in plane.bound_box), Vector())
    global_bbox_center = plane.matrix_world * local_bbox_center

    plane_normal = get_global_plane_normal(plane)

    # Set camera to distance from a plane
    distance = 1
    camera_position_vtx = global_bbox_center + distance * plane_normal

    camera = bpy.context.scene.objects["Camera"]
    camera.location = camera_position_vtx
    bpy.context.scene.objects.active = camera
    # TODO: Rotate and set orthographic scale to the right values,
    # only the plane is visible.
main()

Thank you for your time!

camera_fit_coords

The method camera_fit_coords does most of what you need, it returns a location and zoom factor for an ortho camera such that it fits all given coordinates.  It does not however rotate the camera, so that will have to be calculated.

Test script, make a plane active, run script and the camera will move to fit the entirety of the plane into the scene camera.

Calculate the centre of geometry of plane using bound box ( local plane coords)
Grab the local normal of the first face of plane, I've used bmesh here, could use mesh API instead.  Have to use a face normal, a vert normal on a 1 face square plane will be at 45 degrees to x, y axes.

Find the longest boundary edge to align to the x axis of the camera.  At this step could compare the render dimensions of camera and choose to align x or y, if y swap x and y x_axis, y_axis = y_axis, x_axis
The rotation part of the new global camera matrix is created from the three orthogonal unit vectors, the plane global normal being the -z axis, the x axis aligning with global vector created from longest boundary edge. The other being z_axis.cross(x_axis) Rotation difference could have also been used here.
Call the camera_fit_coords method with a flat list of all the global coordinates of the planes bounding box, use the return values for location and orthogonal zoom.

import bpy
from mathutils import Vector, Matrix
import bmesh

context = bpy.context
scene = context.scene

cam_ob = scene.camera
plane = context.object
pmw = plane.matrix_world
plane_co = sum((Vector(b) for b in plane.bound_box), Vector()) / 8
me = plane.data
bm = bmesh.new()
bm.from_mesh(me)
bm.normal_update()
bm.faces.ensure_lookup_table()
# first face, could sum them I suppose
bm.faces[0].normal_update()
plane_no = bm.faces[0].normal
# longest edge

axis = sorted(
    (e for e in bm.edges if e.is_boundary), key=lambda e: e.calc_length(), reverse=True
)[0]

# global coords
z_axis = pmw @ (plane_no) - pmw @ Vector()

x_axis = pmw @ axis.verts[1].co - pmw @ axis.verts[0].co

y_axis = z_axis.cross(x_axis)
'''
#  would need to also check scale, hmm bmesh.from_object.. doh.
render = scene.render
if render.resolution_y < render.resolution_x:
    x_axis, y_axis = y_axis, x_axis
'''
R = Matrix([v.normalized() for v in (x_axis, y_axis, z_axis)]).transposed()
cam_ob.matrix_world = R.to_4x4()
cam_ob.matrix_world.translation = pmw @ plane_co

scene.update()
coords = [t for b in plane.bound_box for t in pmw @ Vector(b)]

v, scale = cam_ob.camera_fit_coords(context.depsgraph, coords)

cam_ob.data.ortho_scale = scale
cam_ob.matrix_world.translation = v
scene.update()

There are other questions on here regarding aligning objects with a face normal, or another vector.


Blender 2.8 Texture color error I made texture for box. But original texture (right) and imported texture on UV editor (left) are not same.
Why this color changing happens?

I finally find the solution.

Properties editor -> Render -> Color Management

Changing the 'View Transform' to make post-render filtering.


How to make custom node type animation data show in dope sheet I have created a custom node type, using the blender custom_nodes.py template.

I have made a custom node, with a IntProperty with ANIMATABLE set as an option of the IntProperty.

i can insert a keyframe, and that works fine... and the fcurve is showing up under:

bpy.data.node_groups['NodeTree'].animation_data.action.fcurves[0]

but the 'NodeTree' animation data does not show up inside the dopesheet, or the fcurve editor.

is there something that i have to do to make my custom node tree's animation data to show up in the dopesheet and fcurve editor?

This appears to be a limitation of the current setup. The dopesheet and graph editor don't display items from custom node trees.


Grouping animated objects I've animated a box to open.

In the Dope Sheet the box sides appear as seperate objects, the actions are also seperate. I want to be able to combine the sides in order to export the box as a whole, as some of the animations rely on their parent transforms. Is this possible?

As a side question, what steps can I take to avoid this in the future?

For a pipeline friendly way to solve this problem, I would use an armature to rig the box and then combine the box and rig into a Group.

Then in another file you can link the group, make a proxy of the rig and constrain other scene objects.


Why does my render not show my light source? I have a sun that lights up my scene perfectly fine in my object view, but when I render it is completely dark.

There is nothing between my sun and the camera. I've moved it all around the scene but no luck.
Here is my blender file.

You have a sphere that is hidden in viewport but that will be rendered, as we see in the Outliner. Note that even if you move your sun inside it won't light your scene, the location of the sun is not taken into account, so you need to either hide your sphere in render or find another solution:


How do I transfer only single vertex groups between objects? I have two identical models and want to transfer a single vertex group from one of them to the other. I do NOT want to transfer all of the vertex groups, just a single one out of the list.  Is this possible?

Select object where you'd like the vertex group to copy to. You don't need to create empty vertex group there as it will be added automatically, still it's possible to do for testing purposes.
With this object still selected,  Shift + RMB to select object which has original vertex group.
Choose Copy Vertex Group entry from drop-down menu. The thing is that you should select mesh with vertex group to be copied last.


Blender Crashing on Startup Ever since yesterday, blender has been crashing during it's startup sequence. It shows its normal little window of code, but then doesn't load. It worked just fine earlier in the morning yesterday, but hasn't worked since yesterday afternoon. I haven't done anything different with my PC; I've reinstalled blender multiple times, and I've been using 2.79b and there's no way I'm settling for an older version, and I've installed the latest drivers, but still no luck. Any ideas on how to fix this?

I found that for some reason, blender, even though absolutely nothing uses it since I have a dedicated Graphics Card, wants me to have the integrated intel graphics enabled on my CPU. Not sure why, but it works just fine so long as I have that enabled through the BIOS.


Deformed Cloth Simulation Hi, When I do the cloth simulation for this tshirt, there's a fold in the shoulder area. I've tried smoothing it out in sculpt mode however it doesn't remove it and I've tried playing around with physics settings i.e 'self collision settings' however it still remains

check the normals and recalculate..
check and revome double vertices...
add more steps to the simulation for example 10 for quality and 5 for collisions...
check that you did properly the stitches in the mesh...
make sure your cloth is big enough to fit the character, but first try tweaking first some settings in the cloth setting physics settings...


How to snap object back to its original position After moving some objects particularly along the Z axis I would like to be able to snap them back to their original position. I have found a previous thread for 'snapping' an object back to it's original after using the rotate tool but cannot work out how to bring an object back to its original position especially on the Z axis.

Resetting all Transform values to 0 is Alt+G for location, Alt+R for rotation and resetting scale to 1 is Alt+S. After performing these three steps Transform location will be (0, 0, 0), rotation (0, 0, 0) and scale (1, 1, 1).
To set it back to a different location/rotation/scale, these differing values should be set in the Delta Transform properties of the object. Delta or Δ stands for (among other things) "difference" in mathematics and means in this case the divergence from the "normal" Transform properties.
Looking at this cube, it has a Transform location and a Delta Transform location. They have to be added together to get the actual world location of the cube (or multiplied for scale):

In case your object has Delta Transforms, then resetting the Transform values will result in (0, 0, 0) + Δ(x, y, z). So this way your object resets to a location different from the world origin.
Now, moving an object by hitting G only changes the Transform location, not the Delta Transform. If you moved an object to a location which should be its new "original" location, then you can apply these transforms with Ctrl+A > Apply > All Transforms to Deltas. In the options you can then also choose if you want to apply all transforms or just Location, Rotation or Scale and if you want to reset the normal transforms.
After doing it you can see that now the Transform location of the cube is reset to (0, 0, 0) while the new Delta Transform location is (7, 2, 1). This is its new "original" location. When you move the cube with G, resetting the transform with Alt+G moves it back to (7, 2, 1).


Sharp edges not sharp enough when bending? I modelled an emblem with a skull and base/background, and I want the side borders to be smoothed, while the faces themselves get their own "smoothing group".
For that, I marked the edges between the surface / sides as sharp and - to get subdivision right - set the mean crease to 1.0.

This worked out fine until I bent the object to fit on the surface of another object.
If I look closely on the emblems skull now, some triangles get the wrong smoothing color, as if I didn't mark some edges correctly as sharp.

The emblem is a converted SVG curve, which may already be suboptimal, but I didn't know better for my 3rd model ever. The creased edges seen here are also marked as sharp.

Same goes to the background of the emblem, though even more sublime. If you crank up your monitors brightness, or just look at my edited picture, you can see different colors, as if the mean crease was not high enough (it's at 1 for that surface).

It was a simple cylinder once with some extrusion. Creased edges are also marked as sharp.

I don't even know if that can be corrected, as the surface is bent and somewhere the lightning just does its job. But the first thing is really going on my eyes.

I tried playing around with the modifier order, but nothing helped.

You're using NGons (faces with more than 4 vertices/edges) and a curve converted to mesh, resulting in bad triangulated topology.
They're exactly what you don't want to bend.

Smoothed curve surfaces need quad topology.

All you can do is trying the face beauty fill (Ctrl+F menu with faces selected), or selecting the flat faces deleting them and reconstruct something better (extruding/scaling inside the outer loop) or using remesh modifier.

For your big round face of the background, inset it with I multiple times to the center and Alt+M at the center to merge the last loop at the center.

This is an exemple of a manual retopo. All quads, can be subsurfed, no bending artifact.

Blend file here


How to attach a Mesh to armature while keeping transform Hey I have a problem basically I have a HumanBody Mesh and I have a bone structure/armature. The armature is one that I used for a lot of animation.

I used to have a old body-mesh the used to be on this armature but now I want to switch it out for a new body mesh.
Im trying to attach the body to the armature but the new body is in a different "pose" than the armature. And I can't change the armature's positioning in edit mode because if I do than all the animations. I previous created for it will be messed up and not work.

So to simplify my problem basically when I select the mesh then selected the armature than press Ctrl + p. To parent with Automatic weights I get this picture below all I need the mesh to do is stay in the same place it was before:

I meant (crtl + p)

The arms go upward in instead of staying where they were. I know I can go to edit mode and match the armature up like that but than my animation will be messed up. Is there a why to do it with out changing it in edit mode:

Thats actually pretty simple, your mesh is parented to the armature in its edit mode state, pose mode is meant to pose your model after it has been rigged correctly.

even if you see the skeleton in a T pose you are actually parenting your T pose (with arms stretched out, like a T) to a rig with its arms in 45°.

you can check this by resetting to rest pose, and seeing how your mesh will be intact but the skeleton will still be offset by the same amount.

As this happens then we apply your rotation of the arms 45° in pose mode, thus rotating the arms 45° more.

What you need to do is either adapt the rig or the mesh before parenting. I suggest you reset your transforms in pose mode to properly see the state of your rig, to reset transforms press ALT+G for location, ALT+R rotation and ALT+S scale.


unknown location when importing .obj I'm completely new to blender but im trying to import an .obj( https://we.tl/t-X9g9ETJoBk ) into blender but I'm getting a 'location: : -1' message in the console when doing so.

can anyone help me out?

The file you're trying to import has the extension .obj.py.  It is not a .obj so you can't import it like a normal object.  Go into the text editor view in blender, Press Alt + O, or go to Text>Open Text Block and open the .py file, then simply press Run script or press Alt+p


Creating a custom menu of active grease pencil palette colors via Python Script (Blender 2.79b) So,I was looking to accelerate the coloring workflow in grease pencil by creating a custom menu of the active GP palette colors. The workflow would be to assign a hotkey to this custom menu and then invoke it while coloring.I have  scripted a Python code for this purpose andfacing the following issues-

1.Since GPcolors are array of RGB values(correct me if I am wrong) couldn’t find any pointer functions to point to array values.
 2.The code when run indicates an endless loop of menus.
Any suggestions would help.The code is given below-

import bpy
class GPcolorMenu(bpy.types.Menu):
    bl_label = "GPcolors"
    bl_idname = "gpencil.GPcolor_menu"

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

        for color in bpy.data.grease_pencil["GPencil"].palettes["GP_Palette"].colors:

            layout.menu(GPcolorMenu.bl_idname, text=color.name)

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

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

if __name__ == "__main__":
    register()

bpy.ops.wm.call_menu(name=GPcolorMenu.bl_idname)

Here is the probable solution (but it gives an Anytype error)

import bpy
from bpy.types import Menu

class GPcolorsMenu(bpy.types.Menu):
    bl_label = "GPcolors"
    bl_idname = "gpencil.GPcolorSwitch"

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

        #display active palette
        palette = bpy.context.scene.grease_pencil.palettes.active
        row = layout.row(align=True)
        row.label(palette.name, icon_value=layout.icon(palette))

        col = layout.column(align=True)
        col.separator()

        #display GPcolor [keys()] for switching in a menu

        key = bpy.context.scene.grease_pencil.palettes.active.colors.keys()
        for i in key:
            row = layout.row(align=True)
            row.prop(i,'name',text='')

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

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu(name=GPcolorsMenu.bl_idname)


How to subsurf this wing without adding vertices to its profile (only to the curvature) I have this wing:

How can I subsurf it with only adding cuts between the ones selected, without adding vertices to its profile that already has more than 120?
I can Loop Cut, but then I'll have to manually move the new cuts and scale them, which will not result in a smooth curve.

Beveling Edge Loop:

Choose Edge Select mode and select desired Edge Loops (like you have in your screenshot now) then hit Ctrl+B to Bevel, you can set amount of Edge Loops by hand (mouse scroll and move) or just by tweaking values in Tools Panel or by pressing F6.

Loft with LoopTools:

This method will allow you to add the same number of Loops between existing ones. You need to turn on LoopTools addon in User Preference menu.

Select all Edges between Loops, delete them, then select remaining Edge Loops, hit W > LoopTools > Loft and change values accordingly.

Sadly there is not (or I'm not aware of it) any automatic method to give same space between all Edge Loops given that there is different space with existing ones. You can just put same amount of cuts. As a workaround you can make two things. First one is kind a eye-balling, so it's not perfect.

Spacing Manually by Loop Cuts:

In this method you will need to place Loop Cuts (Ctrl+R > MouseScroll) manually and eye-balling number of cuts. It could give pretty nice result with a little of practice.

Dissolving and adding new cuts:

This one is a last option, this will give even spacing but will not preserve main shape and you will need to manually move Edge Loops with Proportional Editing turned on.

Select existing Edge Loops, Dissolve Edges, add Loop Cuts, move new Edge Loops with Proportional Editing turned on (MouseScroll to control influance).


how to create a Pop up dialog and link the property to an object I am still really new to Python and I am working through some new things. I would like to create a Pop up dialog box that the user can input some text. I would like to then use that Text for something else, for example changing the Name of the default cube.

I have read through some posts and I see that creating the pop up dialog box is pretty simple but I am not sure how I can then use the user's defined text for the object name.

Here is what I have so far (which is just the pop up dialog box which works fine) I need to know how I can then use the text that the user inputs into that Dialog box and use it to change the name of the cube.

import bpy

class WM_OT_myop(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wm.myop"
    bl_label = "Simple Object Operator"

    text = bpy.props.StringProperty(name="Name", default="")

    def execute(self, context):
        bpy.data.objects['Cube'].name = #rename cube to User Input?

        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

def register():
    bpy.utils.register_class(WM_OT_myop)
    bpy.ops.wm.myop('INVOKE_DEFAULT')

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

if __name__ == "__main__":
    register()

Edit, Thanks to @Matt's explanation I made an addition:

text = self.text

here is the full script:

import bpy

class WM_OT_myop(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wm.myop"
    bl_label = "Simple Object Operator"

    text = bpy.props.StringProperty(name="Name", default="")

    def execute(self, context):
        text = self.text
        bpy.data.objects[0].name = text

        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

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

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

if __name__ == "__main__":
    register()
    # test call
    bpy.ops.wm.myop('INVOKE_DEFAULT')

There are a few things to know, some of which are Python specific.

Firstly, text probably won't exist anymore by the time you call execute() because text is merely a local variable, not a class member. To make it a class member, simply declare it as self.text = bpy.props.StringProperty(name="Name", default=""). If you're familiar with C++ or C#, self is almost exactly the same as this.

Secondly, you probably want that declaration in a constructor for that class. The Python constructor is __init__(self) (it has two underscores before 'init' and two underscores after) which you declare the same as any other class method. Put code there that you want to run when an instance of the class is created, just like any other constructor.

Thirdly, I'm assuming that when you call bpy.props.StringProperty(name="Name", default="") it returns the text that gets typed into the dialog. If so, it should be as simple as bpy.data.objects['Cube'].name = self.text


Camera flips 180 degress when moving around object I have a problem that I have not been able to find an answer to, I am sure there must be an answer out there, probably I am not formulating the question correctly. Anyway, I want to rotate the camera around an object, but when I am completely perpendicular to the Y axis, as soon as I cross the X axis my camera flips 180 degrees, making the camera always maintain its "belly down attitude", how can I stop the camera from doing that?

Thank you!

Locked Track

You should use Locked Track Constraint instead of Track To Constraint .

As stated in the manual's page:

  Basically, it is a Track To constraint, but with a locked axis, i.e. an axis that cannot rotate (change its orientation).

While the for the Track To it is said:

  ... it always points a given “To” axis towards its target, with another “Up” axis permanently maintained as much aligned with the global Z axis (by default) as possible.

That said, using this kind of constraint will allow you to avoid the flipping of the camera. Here's an example of usage:


Is it possible to change shortcuts for the add menu? I know you can add a shortcut, but can I change the shortcut on the Add Node menu? I would like to make the S key default to Shader instead of to Search. Can this be done? For example I want to be able to add a diffuse node using the key set: Shift+A > S > D

No, blender GUI  was not designed with that in mind, it's something I've tried to do for a long time.
We can only hope or ask developers to give us facilities to customize menu shortcuts.

Here are some discussions that I started on this topic:

How to customize a Menu
Ayuda con los menus ( Spanish )

Personally I think it is quite necessary because many users require this. I think we should begin to wonder where can we make requests to the developers?


Essentially, what are drivers? Okay, so I'm a relatively new user of Blender. I've delved into most of Blender already, including the Graph Editor and F-curves, but not the Dope Sheet or Drivers.

I'm planning to get into what the Dope Sheet is later on, but for now, I wondered what drivers are...?

What can they be used for?
How can I use them?
Are they Engine-specific?
(I usually use Cycles.)

Thank you.

A driver is a Python expression that is used to control the value of some field, generally depending on some external variable. They're generally limited to one line, but can actually span many.

Drivers can use properties, numbers, transformations, and scripts, to control the values of properties.
Using a F-Curve, the driver reads the value of the Driver Value and sets the value of the selected property it was added to.

From the Manual entry: drivers
F-curves are just an easier way to animate a property overtime, by manipulating the handles that define a function that maps time to some value. Then, Blender interpolates for the values between the handles.

The idea is simple: you define a few Key Frames, which are multiple frames apart. Between these keyframes, the properties’ values are computed (interpolated) by Blender and filled in. Thus, the animators’ workload is significantly reduced.

From the Manual entry: f-curves


Transparent image plane doesn't show whole image I imported a PNG Image Plane, wich Looks like this:

Then I changed the material, so it's transparent.

Nodes:

But the rendered result Looks like this:

Some parts are missing or they became transparent. Can someone please help me. Is there a way to fix this?

The second mix shader should be driven by the alpha channel instead of the color. As it stands, "bright" colors will be rendered opaque but the darker branches are transparent. This obviously depends on your image including a proper alpha channel.


Rendering many overlapping parallel lights In my situation, I want to render many narrow spotlight all overlapping in mist.

You can see in this image how all the spotlights overlap. The rendering I'm trying to produce is a simulation, and therefore I want to keep the geometry mostly as it is.

I've tried a few approaches:

Use spotlights into a volume

The issue here is that the minimum angle of a spotlight in Blender is 1 degree, which is still too large for me! (My spotlight should be 0.5 degrees)

Blender Render / Volume emit cylinders + Scattering volume

The main issue with this approach is that in areas of very strong overlap, some bits are even darker than background. I.e. where there's lots of light crossing over, the result is shown as dark.

Perhaps the 'emit' object are also casting a shadow.

Cycles Render / Volume emit cylinders

Get a better result (the areas of most overlapping aren't the darkest). But still getting some black parts.

For Blender Cycles, I also tried disabling Ray Visibility settings on each beam object for

Transmission
Volume Scatter
Shadow

but the result is largely the same

For Cycles volume emitters you need to ensure that the number of bounces in the Light Paths panel is set sufficiently high - otherwise the rays cannot travel through all of the surfaces.

The Transparency Max and Min values determine how many transparent surfaces rays can pass through. Increasing both values will allow rays to pass through more transparent surfaces unaffected.


How can i make more realistic lighting/materials Im looking for tips to create more natual looking light like you would get from the sun and tips on making my materials look a little less fake looking the image below is using the glossy and glass shaders but still looks to un-realistic.

You'll need something to be reflected.

If your world is just black, there is nothing to be reflected by your material.

As suggested by Gonzou, I'd try a HDR / IBL image.
Alot of those Images can be found here:
http://www.hdrlabs.com/sibl/archive.html

Those will lighty your scene / object and so there is something to be reflected.

Speaking of materials i'd suggest this tutorial:
https://www.youtube.com/watch?v=rzXNZkEoTAk

It's quite helpful to get a bit more interesting looking materials.


Mesh's material_index is an index into what? If you check the docs for the Mesh(ID) type, you going to see something like this:

  class bpy.types.MeshTessFace(bpy_struct)
  TessFace in a Mesh datablock

  material_index Type:  int
  in [0, 32767], default 0

My question is: material_index is an index into what? I am desperately looking for a scene-wide collections of materials, but I can't find it.

I am desperately looking for a scene-wide collections of materials, but I can't find it.

You want scene-wide materials?:

>>> bpy.data.materials[:]
[bpy.data.materials['Material'], bpy.data.materials['Material.001']]

this shows the materials for one object:

>>> bpy.data.objects['Circle'].material_slots[:]
[bpy.data.objects['Circle'].material_slots[0], bpy.data.objects['Circle'].material_slots[1]]

or

>>> [m.name for m in bpy.data.objects['Circle'].material_slots[:]]
['Material.001', 'Material.002']

For completeness then

bpy.data.materials indices

For sake of argument I have a scene with 4 materials

>>> bpy.data.materials[:]
[bpy.data.materials['MAT A'], bpy.data.materials['MAT B'], bpy.data.materials['MAT C'], bpy.data.materials['MAT D']]

We don't often need to get the material index in the materials collection, because we can use the name (a string) directly to get the reference.

>>> my_material = bpy.data.materials['MAT D']
>>> my_material.name
'MAT D'

If you really wanted to find the index of 'MAT A' in .data.materials, you could do a .find() because material names are always unique.

>>> bpy.data.materials.find('MAT A')
0

data.materials is an indexed collection.

>>> bpy.data.materials[0]
bpy.data.materials['MAT A']

material slot indices

The material_slots indices refer to the order in which your materials appear in the object's 'material stack'.

>>> obj = bpy.data.objects['Icosphere']
>>> obj.material_slots[:]
[bpy.data.objects['Icosphere'].material_slots[0], bpy.data.objects['Icosphere'].material_slots[1]]

If you want a direct reference to the material in a slot:

>>> obj.material_slots[:][0].material
bpy.data.materials['MAT A']

No need to get the name first, but if you wanted to:

>>> obj.material_slots[:][0].name
'MAT A'

If the material_index is 1, and the object references two materials  (MAT D and MAT C), then 1 refers to MAT C and globally MAT C is index 2. It may be a point of some confusion that the term index is used to talk about the location of an item in two different types of collections.

Different Materials assigned to different faces (directly on mesh)

>>> bpy.data.meshes['Icosphere.001'].polygons[42].material_index
0

this zero refers to the material slot index.

>>> ico_mesh = bpy.data.meshes['Icosphere.001']
>>> idx = ico_mesh.polygons[12].material_index
>>> ico_mesh.materials[idx]   # get the reference
bpy.data.materials['MAT D']


Resumable render for Cycles The Resumable Render for Cycle allows you to add some Samples steps when rendering your image from the command line (as far as I understand)

"This feature is also known by the name Samples Offset, which allows
artists to render animation with given amount of samples N, but then
render more samples, starting from N and ending with M (where M > N)
and merge renders together as if they rendered exactly M samples.

Surely such effect could be achieved by changing Seed variable, but
that has possible issues with correlation artifacts and requiring to
manually deal with per render layer samples and such."

https://developer.blender.org/rBf8b9f4e9bbc10675de9bbc3088f2841381e23f78

This new feature is in the master but not on the release yet afaik,

however I cannot find out how to use it ;

the links says:

"Here's a command how to run Blender with the new feature enabled:

blender -- --cycles-resumable-num-chunks 24 --cycles-resumable-current-chunk 2

This command will divide samples range in 24 parts and render
range #2 (chunk number is 1-based)."

at the moment I am trying:
blender-b test_render_resumable.blend -f 0 -- --cycles-resumable-num-chunks 24 --cycles-resumable-current-chunk 2

then 3, 4, etc.

I get an image I backup everytime, but don't know how to merge all of them, and not sure that's the correct way to do.

Does anyone know how to use it?

Assuming that the actual renders are rendered correctly, you can try something like this to merge the separate renders from within Blender: Stacking cycles renders in the compositor?