How do I have two different 'template_icon_view's in a panel?

I just made everything double:

import os
import bpy

def enum_previews_from_directory_items(self, context):
    """EnumProperty callback"""
    enum_items = []

    if context is None:
        return enum_items

    wm = context.window_manager
    directory = wm.my_previews_dir

    # Get the preview collection (defined in register func).
    pcoll = preview_collections["main"]

    if directory == pcoll.my_previews_dir:
        return pcoll.my_previews

    print("Scanning directory: %s" % directory)
    def_dir = os.path.dirname(bpy.data.filepath) + directory[1:]
    if directory and os.path.exists(def_dir):
        # Scan the directory for png files
        image_paths = []
        for fn in os.listdir(def_dir):
            if fn.lower().endswith(".png"):
                image_paths.append(fn)
        for i, name in enumerate(image_paths):
            # generates a thumbnail preview for a file.
            filepath = os.path.join(def_dir, name)
            thumb = pcoll.load(filepath, filepath, 'IMAGE')
            enum_items.append((name, name, "", thumb.icon_id, i))

    pcoll.my_previews = enum_items
    pcoll.my_previews_dir = directory
    return pcoll.my_previews

def enum_previews_from_directory_items2(self, context):
    """EnumProperty callback"""
    enum_items = []

    if context is None:
        return enum_items

    wm = context.window_manager
    directory = wm.my_previews_dir2

    # Get the preview collection (defined in register func).
    pcoll = preview_collections["main2"]

    if directory == pcoll.my_previews_dir2:
        return pcoll.my_previews2

    print("Scanning directory: %s" % directory)
    def_dir = os.path.dirname(bpy.data.filepath) + directory[1:]
    if directory and os.path.exists(def_dir):
        # Scan the directory for png files
        image_paths = []
        for fn in os.listdir(def_dir):
            if fn.lower().endswith(".png"):
                image_paths.append(fn)
        for i, name in enumerate(image_paths):
            # generates a thumbnail preview for a file.
            filepath = os.path.join(def_dir, name)
            thumb = pcoll.load(filepath, filepath, 'IMAGE')
            enum_items.append((name, name, "", thumb.icon_id, i))

    pcoll.my_previews2 = enum_items
    pcoll.my_previews_dir2 = directory
    return pcoll.my_previews2

class PreviewsExamplePanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Previews Example Panel"
    bl_idname = "OBJECT_PT_previews"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        row = layout.row()
        row.prop(wm, "my_previews_dir")

        row = layout.row()
        row.template_icon_view(wm, "my_previews")

        row = layout.row()
        row.prop(wm, "my_previews")

        row = layout.row()
        row.prop(wm, "my_previews_dir2")

        row = layout.row()
        row.template_icon_view(wm, "my_previews2")

        row = layout.row()
        row.prop(wm, "my_previews2")

# We can store multiple preview collections here,
# however in this example we only store "main"
preview_collections = {}

def register():
    from bpy.types import WindowManager
    from bpy.props import (
            StringProperty,
            EnumProperty,
            )

    WindowManager.my_previews_dir = StringProperty(
            name="Folder Path",
            subtype='DIR_PATH',
            default=""
            )

    WindowManager.my_previews = EnumProperty(
            items=enum_previews_from_directory_items,
            )
    WindowManager.my_previews_dir2 = StringProperty(
            name="Folder Path",
            subtype='DIR_PATH',
            default=""
            )

    WindowManager.my_previews2 = EnumProperty(
            items=enum_previews_from_directory_items2,
            )

    # Note that preview collections returned by bpy.utils.previews
    # are regular Python objects - you can use them to store custom data.
    #
    # This is especially useful here, since:
    # - It avoids us regenerating the whole enum over and over.
    # - It can store enum_items' strings
    #   (remember you have to keep those strings somewhere in py,
    #   else they get freed and Blender references invalid memory!).
    import bpy.utils.previews
    pcoll = bpy.utils.previews.new()
    pcoll.my_previews_dir = ""
    pcoll.my_previews = ()
    pcoll2 = bpy.utils.previews.new()
    pcoll2.my_previews_dir2 = ""
    pcoll2.my_previews2 = ()

    preview_collections["main"] = pcoll
    preview_collections["main2"] = pcoll2

    bpy.utils.register_class(PreviewsExamplePanel)

def unregister():
    from bpy.types import WindowManager

    del WindowManager.my_previews

    for pcoll in preview_collections.values():
        bpy.utils.previews.remove(pcoll)
    preview_collections.clear()

    bpy.utils.unregister_class(PreviewsExamplePanel)

if __name__ == "__main__":
    register()

I am sure It can be done more professionally, but it's good starting point.
If You want more than two You should reed about collections


The factor of the Edge Loop is a value between -1 and 1. Assuming you know the total length of the wall (w), and (x) is the distance from the corner,  you can use this formula :

factor = 1-x/w*2

To enter the formula, press the = while using the loopcut tool, then type your values.

But this is tedious, cause the total length will be reduced by each cut. It would be much easier to extrude faces starting from the left, because extrude allows to specify distance values.


Help me understand Renderers, especially in 2.8

Thank you for stating your question so clearly.
1.) Many different representation engines in Blender 2.8 will allow you to navigate, differentiate, represent volumes (smoke, fire, etc), heavy dense scenes and realistic light bounce materials and environments. You´ll learn in time how to use them to the best of the representation for each case.
2.) Workbench: when you want to see lot of objects inside an archviz scene, EEVEE: if you want to see the completed materials/textures in real world light conditions), etc..
3.) Eevee doesn´t support adaptive subdivision like in cycles at the moment. No further notice have been given about this, don´t know if it will be implemented, as the engine per se, is different than Cycles (EEVEE is screen space based effects only)
4.) Right not there isn´t a specific tutorial, but upvote me as answer and click on the left side checkmark icon of this post because:
1. When you model: Work in workbench using wireframe
2. When you sculpt: Use workbench in solid mode
3. When you create your materials/textures: use look and dev mode (flat light or Hdri or Studio light)
4. When you´re lighting: Use look and dev
5. When your're ready to render switch to EEVEE or CYcles.

There are some nodes that will only work for eevee, not for cycles, and backwards.
The only way to know what to use is to ask around or watch tutorials. No guides specifically filtering those nodes have been created up until this moment.

4.) To answer this you need to search for "screen space effects". Which in addition "What the camera sees is computed into a 2D space, takes the info of any normal or UV space around it, and applies a certain code to "compile" a result of light calculation".

5) There are many tutorials. I´d bid you to search for "eevee light reflection probes" to start with.

6) Experimental only means not every user has a necessity to use them, so it´s best for the system to have it "dormant" until this function is needed. Blender makes a "wake up" call to many functions in it´s code. They are activated at the time of need. This is the reason why you open Blender, loads up necessary components and starts up in less than 5 seconds. Compare that to a larger (fully loading .dll applications that can take up to 1:30 minutes to load up).

7) World machine is superb. Just keep generating procedurals using Cycles. The only way for now. Unless you bake a high poly displacement and THEN take that huge poly count into EEVEE. But this is just a work"around" method.

BFCT_Schiller


No, you are confusing volume samples, volume bounce depth, and ray-marching steps, which are all different controls.

To start with, a short overview of how volume rendering works. As a ray passes through the volume, it is checked at a series of steps via a process known as "ray marching". Here's an example illustration, from this answer by the user sambler:

When using the volume scatter shader, there is a chance that the ray will experience a "scattering event" at each step. The higher the density, the greater the chance of a scattering event. For the volume absorption shader, the energy of the ray is reduced at each step. For the emission shader, the energy of the ray is increased at each step.

Ok, now, a breakdown of volume step size, volume bounces, and volume samples.

Volume Bounces

The control you pointed to is the volume bounces control, also sometimes called volume depth. This controls the number of bounces of multiple scattering that will be computed. Depth of 0 disables multiple scattering, leaving you with single scattering: Volume scatter shaders will bounce once, and after that the ray will exit the volume regardless of if it should experience another scatter event. If volume depth is non-zero, it is the number of additional scatter events a ray is allowed to experience.

Multiple scatterings are needed to for some physically accurate lighting situations, such as making clouds appear white instead of gray. However, each bounce takes computing time, and increases the chance for noise. So this control limits how many bounces you can have.

In most cases you will want to set this to 0 or 1. Higher values may be needed, but can increase render times a lot. See my answer here for some methods for dealing with bright volumes: Realistic smoke?

Volume Steps

Volume steps are controlled from the Geometry panel:

The "max steps" control is roughly what you were envisioning in your question: it's the maximum number of steps the ray is allowed to take before it gets shut down. However, the steps are not automatically snapped to individual voxels, but rather are a simple distance control. "Step size" is in meters, even though for some reason it does not display units. Step size is a set as a world-space distance rather than a number of voxels because volumes don't need to have voxels. In fact, as Cycles sees it, voxels are something that 3D textures, not volumes, have, and those just sometimes happen to be used to texture volumes.

Smaller step sizes better capture detail in fine volumetric structures, and reduce the grainy appearance when you undersample the volume. However, smaller step sizes will take longer to render.

For volumes defined by a voxel grid, the optimal step size is one-half the length of each voxel. You can find this for Blender's smoke sim by getting the dimensions of your domain, and plugging the length of the longest size into the formula: voxel size + length / (base res * (hi-res level + 1)). So a 10m domain with 80 res and 2 hi-res divisions would be 10 / (80 * (2+1)), or about 4cm.  (so step size is set to half that, 2cm, aka 0.02)

Volume Samples

If you are using Branched Path Tracing you will have an option under the samples panel to set a number of volume samples. This is the number of times a ray will branch to continue the path after a scattering event.

Higher values will reduce some sources of volume noise, such as from using volume bounces > 0.


To work properly, yes, it does require volume. The Subsurface Scattering emulates scattering within the surface and this includes light that has travelled into the surface and has been scattered within the volume and back out of the surface, as well as light that has passed into the volume from a different surface and scattered back to the surface. If the mesh is a flat surface without volume then there is no volume to emulate and so no light can scatter through from the 'back' surface. However, the light from the top surface can still scatter so the shader will operate, just will be darker - without any effect from light striking the "back" surface (or sides).

To demonstrate I created a scene with a Subsurface Scatter shader on a plane illuminated by spotlights (one tinged red, the other blue) above and below.

With a Solidify modifer :

Without solidify :


How do I make smoke fill a specific object

I think this has been asked previously here:

Why isn't smoke flowing with the shape of the domain?

Basically - use a cube as usual as your smoke domain, and within that add your hollow hat-shaped object, make it a 'collision' object in the physics properties, and place your smoke emitters within that object.


Two way to do this :

Rotate the bevel object in edit mode 180°
Select the curve ( not the bevel object ) , enter Edit mode and select all points with A (or twice) than adjust the tilt angle from the transform panel :


in the selection mode "by pressing button b", how to deselect previous vertices?

When activating border select(b) middle mouse will deselect while left mouse will select.

-eh five


How do implement the effect of blur on transparent materials?

A very simple solution is to create a render pass for the glass and use it as a mask to add blur in the compositor. Of course, to implement the depth effect, you would also then need to render out a depth mask to use as the blur amount, and then your passes are adding up. That's a lot of rendering and compositing just to avoid a glass material, but this method can sometimes end up rendering faster because it avoids some of the typical issues associated with rendering glass.


How to Set/Calculate pole angle of IK constraint so the chain does not move?

This is what the pole angle is:

Its a signed angle between the Base_Bone's X axis and the projected Pole_axis onto Base_Bone's XZ plane. The direction of projection is IK_axis.

Fill in the bone names, it will print the appropriate pole angle into System console. Then you can set the IK constraint with that Pole bone and angle and the IK chain won't move:

import bpy
from mathutils import *

def signed_angle(vector_u, vector_v, normal):
    # Normal specifies orientation
    angle = vector_u.angle(vector_v)
    if vector_u.cross(vector_v).angle(normal) < 1:
        angle = -angle
    return angle

def get_pole_angle(base_bone, ik_bone, pole_location):
    pole_normal = (ik_bone.tail - base_bone.head).cross(pole_location - base_bone.head)
    projected_pole_axis = pole_normal.cross(base_bone.tail - base_bone.head)
    return signed_angle(base_bone.x_axis, projected_pole_axis, base_bone.tail - base_bone.head)

base_bone = bpy.context.active_object.pose.bones["BASE_BONE_NAME"]
ik_bone = bpy.context.active_object.pose.bones["IK_BONE_NAME"]
pole_bone = bpy.context.active_object.pose.bones["POLE_BONE_NAME"]

pole_angle_in_radians = get_pole_angle(base_bone,
                                       ik_bone,
                                       pole_bone.matrix.translation)
pole_angle_in_deg = round(180*pole_angle_in_radians/3.141592, 3)
print(pole_angle_in_deg)


How can I import an image sequence into blender

The Frames value in your Image Sequence node is set to 1, so it will only show the first frame of the sequence. Set that value to the total number of frames in that image sequence and you should see it update. You may also want to enable Auto-Refresh so you can see updates as you scrub.

That said, if you're just doing an Alpha-over, it would probably be way more suitable to do this in the VSE.


How to cast/teleport a ray in a material for a squinching illusion?

In the past I've succesfully done this with multiple render passes, where I first render the scene from the position of the audience, and then project it onto the screen, to then capture that from whatever angle I need.

This technique seems to be the most viable to me. If you want to project what the audience is seeing onto the surface, this approach does exactly that - and the simplest solution is often the best.

This technique however loses a lot of quality as some parts end up being more stretched then others.

You can increase the resolution until it satisfies your needs. Yes, you might "waste" some pixels, but that doesn't seem like a critical issue.

A way to somehow "teleport" the ray back. But it looks like I can only influence its direction.

Yeah, I don't think Cycles is designed for custom ray transformations such as the one you describe. This is likely not a common use case, and there is a flexibility-performance trade-off when designing renderers.
Edit: alternative suggestion
Since you have already gotten the projection to work for objects behind the "screen", I can suggest scaling the screen down towards the audience - so that everything, including the cube, is behind the screen. Then you would also need to adjust the camera, and the projection would appear as you intend.

If you need to render the rest of the scene as well, you could combine that render with the rest of the scene during compositing.


Adaptive sampling leads to evidentiation of rendering tiles

You will likely get better results by using either the Denoiser or Adaptive Sampling - instead of activating both at the same time.
The reason for this is that the Adaptive Sampling feature stops rendering an individual tile when the noise of those samples gets below a threshold, while the denoiser attempts to deal with any noise present over the whole render. By using both at the same time it’s resulting in varying levels of noise in adjacent tiles and the denoiser cannot cope with it, resulting in edge of tile artifacts.


Go to Scene Properties> Units> Unit System and set Metric or Imperial to None.

Then the option to change the subdivisions in the Viewport Overlays will be enabled again.

I'm using Blender v2.82.


How can I prepare a set of colors that should go together, and be able to apply them to different objects with a single click?

Within a node group, use an RGB input node and multiple colour outputs with colour variation nodes to get the variations you want in a group. Each material can then use the relative variation output from the group and when the main colour in the group is changed each use of the group will change to match.

For multiple colour groups in a scene, you could duplicate the group so that you have one for green, one for red...

Beyond that, you could look at drivers. Have a look at CGCookies Flexrig. The Flexrig contains custom properties to define the colour used for hair, shirt, pants and so on, with drivers reading the rigs custom properties to define the colour used.


Keyframes not showing is a result of a different texture, material, or any output/input things selected. It will only show if it is specifically selected


Maybe you should use a simpler topology. I've done this from scratch, using your object underneath, first I've used the Snap option then the Shrinkwrap modifier so that it sticks to your object. Maybe you should use the same method, but starting with a duplication of your own mesh so that you have the right amount of edges...


How do I export a mesh then import it in to another blender file while keeping the original textures?

As atek said, just press A to select all of the objects in your blender scene that you want to be copied over. press Ctrl C to copy and then just simply open up a new blender file and press Ctrl V to paste those objects into your new scene. this will bring all of your textures with it.


Can I use my ubuntu server without a gfx card to render?

If you have packaged your external assets with your .blend file, such that when referencing these assets you're looking for UV map images in, say, "//Assets/UVMaps/", you should be able to simply use the command line to render.  The trick is to use the -b (batch) switch:

blender -b [file].blend

which will give you headless (no GUI) operation.  Next up are a few command line options:

-S : select the scene to be rendered
-a : render the full animation (only applicable if you're doing an animation)
-f : render a specific frame (should not be used with -a)
-F : the output format to utilize (this may already be set up in your .blend)
-o : save the rendered output to a specific file (not needed if you've already set this up in your .blend)

For a single frame of an animation, your command line may look like this:

blender -b [file].blend -S [scene] -f [frame number] -F PNG -o frame_######.png

For the full animation, your command line may look like this, assuming you've already set the format and output parameters in the .blend file:

blender -b [file].blend -S [scene] -a

Note that if your .blend has only one scene, or if you have saved your .blend such that the active scene is the one you wish to have rendered, -S is optional.

If you're still getting errors, to better diagnose what's going on I know that I for one will need to see what the actual error log is.


About Merging One Texture with Another Texture which has Transparent Background

Plug the Alpha socket in the image node into the Mix Factor of the Mix Node there instead of the Color socket.


Getting really fine details without taxing too much VRAM?

The 1px adaptive displacement is the more accurate one. The reason you see it as worse is because it exposes your displacement map for what it is: an 8bit file (and one with an odd value range at that).

Your standard 8bit integer images store values as integers (whole numbers) from 0-255. That means an 8bit integer displacement map has only 256 possible height levels. Worse, your map is very low contrast. The 'blank' value is 128 (I think you might have another misconception here, see below). The lowest value I could find in a quick check is 108, meaning your entire tire track has only 20 different heights in it. Obviously, you're not going to get smooth gradients over only 20 possible heights!

Unfortunately, painting in Photoshop is rasterized immediately, so you'll have to repaint in a 16 or 32bit file to fix this. Even just using 16bit gives you 2^8 more height possibilities than 8bit. And remember, you were only using about 1/10th of the 8bit range. So make a solid white 16bit file, and paint some tire tracks with a heavy hand, the deepest point in the track should be close to black.

Above I commented on your use of 128 as a "blank' value and recommended using full white on the repaint. The reason for this is how Cycles interprets the displacement height. Cycles' displacement system is designed around floating point inputs, and simply takes the value given as literal distance. Meaning the "blank" value is black, and negative numbers need to be used to displace downwards. Simply Photoshop isn't really conducive to painting negative values, it's easiest to paint in a 0-1 range then just subtract 1:

As far as memory savings go, this answer of mine might be useful as well: Render fails at tesselation with out of memory error


What does the compression setting do to a PNG?

No, the compression slider does not affect the image quality.
PNG uses a lossless compression algorithm called DEFLATE (among some other things), which is the same as is used to produce .zip files.
Long story short, the only difference between PNG files with 0% and 100% compression is the CPU time it takes to perform the compression (and of course the resulting file size).
Some tests:
Saving a 1920x1080 render of the default cube:
0% compression:
0.66 seconds, 8116 kilobytes (8 megabytes)
Zipping an uncompressed png produced a 48 kilobyte file.
100% compression:
0.86 seconds, 36 kilobytes
That's a compression ratio of 225 (!) and a time difference of .2 seconds.
Saving a pure high-frequency noise image (also 1920x1080):
0% compression:
.9 seconds, 8116 kilobytes (8 megabytes)
Zipping an uncompressed png produced a 5496 kilobyte file.
100% compression:
2.01 seconds, 5108 kilobytes (5 megabytes)
That's a compression ratio of 1.58 and a time difference of 1.11 seconds.
All tests were conducted with blender and compression times measured from the "saving" time printed to stdout and averaged over five samples.
As you can see, more uniform images (like the grey flatness of an empty blender scene) are much more compressible than highly variable images (such as pure RGB noise). The time it takes to perform the compression isn't very significant even in a worst-case scenario, however that 1 extra second could add up when rendering an animation.


How to create a custom UI script that toggles a specific Object's Render and Viewport visibility while being a bool property (toggle or checkbox)?

Syncing both properties and controlling them by another BoolProperty, takes a lot effort to manage situations like the User disables one of the properties in the Outliner: Is your custom (single) property in this case False or True?

One simple approach is using an operator to set the state of both properties and also store the name of the object (unique). In case the string property is not empty, the operator "resets" all the values:

import bpy

from bpy.props import (StringProperty,
                       PointerProperty,
                       )

from bpy.types import (Panel,
                       Operator,
                       PropertyGroup,
                       )

class MySettings(PropertyGroup):

    my_obj: StringProperty(
        name="Object Name",
        description="Helper property to store an object name",
        )

# ------------------------------------------------------------------------
#    Operators
# ------------------------------------------------------------------------

class SimpleOperator(Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Disable in Viewports and Renders"

    @classmethod
    def poll(cls, context):
        #return context.active_object is not None
        return context.object is not None

    def execute(self, context):
        scene = context.scene
        mytool = scene.my_tool

        if not mytool.my_obj:
            # Disable both properties and store the name
            mytool.my_obj = context.active_object.name
            context.active_object.hide_render = True
            context.active_object.hide_viewport = True

        else:
            # enable both properties
            obj = context.scene.objects.get(mytool.my_obj)
            mytool.my_obj = "" # Set the string to None
            if obj:
                obj.hide_viewport = False
                obj.hide_render = False
                obj.select_set(True)

            # Set the active_object:
            # https://blender.stackexchange.com/a/132829/3710
            #bpy.context.view_layer.objects.active = obj

        return {'FINISHED'}

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool

        layout.label(text="Object Properties")
        row = layout.row(align=True)
        row.prop(context.object, "hide_viewport")
        row.prop(context.object, "hide_render")

        layout.label(text="Toggle Operator")
        layout.operator(SimpleOperator.bl_idname)
        layout.separator()

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MySettings,
    SimpleOperator,
    OBJECT_PT_CustomPanel
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.types.Scene.my_tool = PointerProperty(type=MySettings)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

Layout code from: How to create a custom UI?


How can I get the Solidify modifier to apply after a texture displacement?

Displace Modifier

Using this modifier before Solidify is the easiest option.

Since you seem to have tried this, I'll include the blend file for you to inspect.


Force each new render into sequential render slot

here is a script that switch the render slot automatically after each render
-This is for blender 2.72 and earlier versions :

import bpy
from bpy.app.handlers import persistent

@persistent
def PostRender(self):
        bpy.data.images['Render Result'].render_slot += 1
        bpy.data.images['Render Result'].render_slot %= 7

bpy.app.handlers.render_complete.append(PostRender)

paste and run inside blender

as Ray Mairlot noted the changes in blender 2.73 and later versions require replacing render_slot with render_slots.active_index as follows :

import bpy
from bpy.app.handlers import persistent

@persistent
def PostRender(self):
        bpy.data.images['Render Result'].render_slots.active_index += 1
        bpy.data.images['Render Result'].render_slots.active_index %= 7

bpy.app.handlers.render_complete.append(PostRender)


Object appears mottled in views and renders

Yup found your problem it's indeed an issue with your Normal data on the model.

These are the steps

Goto Properies panel "Data" tab.
Goto "Geometry Data" Header
Select "Clear Custom Split normal Data"

That's all to it. There is a history to this thing, can't remember them at the moment may add to the answer later.


Animation is laggy in the viewport the first time you run it. It will be at the desired framerate once you render. Also, remember to set your output to video so you don't have to put together an image sequence.
~Dan


Can't figure out why this looks so grainy

These are the fastest ways.
If you are not in Cycles Render then switch to Cycles and on the Render Layer tick mark Denoising.

If that does not give you the desired effect then increase the Render Samples as well , at the Sampling section, but will increase your render time.

These two settings usually solve the problem.

Sometimes I find that unticking the Reflective Caustics and the Refractive Caustics will improve some scenes. These settings are under the Light Paths settings under Sampling settings.


How to get back the 'Add ' menu after performing any other action?

unfortunately not, you can just delete the object and re-add it though!


Anand mbs is correct about selecting faces, but to use those selected faces in a Smoke Simulation, you need to do some more stuff.

Selecting The Faces

At the bottom of the 3D Viewport and while in Edit Mode, you can click a button that looks the following to switch into Face Select mode.

However, also while in Edit Mode, you can key Ctrl + Tab to open a pop-up menu like the following. You can then either click the bottom option (Face) or key 3 to have Blender automatically select the third option down.

Separating Faces

We're not quite done yet. RMB select the first face and then Shift + RMB select the rest that you want smoke to emit from. Key Shift + D to duplicate the faces. Key P to bring up the SeParation pop-up menu. It looks like the following. Key 1 or click on Selection to separate the faces from the original mesh.

Smoke Simulation

Tab back into Object Mode. Select the mesh that is made up of the separated faces. This will be your Inflow object. It is also probably wise to Parent the faces mesh to the original. Parenting will guarantee that the faces mesh follows the original during transforms. Select the faces mesh, then the original, then key Ctrl + P and either 2 or select Object (Keep Transform) from the resulting pop-up menu.


My renders keep coming out all black despite having lights

Try increasing your lamp strength a lot (click use nodes).


You're looking for register_module:

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

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

It grabs all the relevant classes in the file.


Light object evenly and have a transparent or solid background

In General

The ultimate purpose of every 3D render engine is to create 2D images of 3D objects in a way that they are recognizable as 3D objects. A main aspect of this is light - and therefore also shadows.

Depending on how realistic the source images are and how exact your image recognition software should work, keep that in mind.

Transparent Background

Guessing from your rendered image, I assume you are using cycles. To get a transparent background, just get rid of the object that generates the white plane(s), then go to "Properties Window - Render - Film" and mark the Checkbox for transparent background.

Light Setup

If you use Cycles instead of Blender internal you can avoid hard shadows to a point where there are nearly no shadows at all. Because it handles light "more naturally", it's really simple to recreate a diffuse light setup similar to what you would use in a photo studio setup.

Instead of a common light source, you can use planes, assign a light-emitting material to them and turn off their ray visibility. This method gives you more "visible" control over your light sources.

Depending on the plane's size and the strength of the light your shadows will get stronger. If you add more than one plane you can get to a point where there is nearly no shadowing at all.

Here's the result with one light-emiting plane:

The same scene with six light-emiting planes, that are placed in even distances around the object:

Remember to turn off the camera ray visibility for your light planes.

Here's the .blend that contains the setup.


What's the difference between the different Rig Types ? (Rigify add-on)

Rig Types are the Properties Collection used by Rigify to identify
  what kind of rig the user is building.

Choice should depend on what controls you want to get for your bones.

Rig types description is in link below.

https://archive.blender.org/wiki/index.php/Extensions:2.6/Py/Scripts/Rigging/Rigify/#Rigify_Rig_Types


Why does memory and file size increase when objects are joined?

The way I see it the issue is twofold.
Instancing
Separate objects benefit from instancing optimizations. If objects share the same object data (geometry) Blender only stores such geometry once, and objects share it internally.
This yields both smaller file size and corresponding savings reading and loading the file. Once the scene is loaded memory is also saved by only recycling the shape of the object both into RAM and VRAM.
Joining all into one objects removes the benefit of instancing, and worsens it by creating a massive single mesh full of unique data.
Memory Consumption
Other than that joining, separating or preforming any other operation on objects creates undo steps which are stored in memory, requiring additional memory consumption until it is flushed or released.

Overall joining objects doesn't really add any benefit at all, other than possible viewport performance and working responsiveness. Blender tends to get slow when the object database is very large, and the viewport tends to slow down if large amounts of objects are visible.
Under certain situations Blender may behave faster with a single large mesh as opposed to several thousands of instances containing the same geometry, generally at the expense of memory consumption, editability and file size.


Can't always view object within a transparent box

This is a technical limitation in Eevee called Alpha Sorting.

Unlike Cycles, which uses ray tracing, Eevee is a rasterization engine, which means each triangle that's visible to the camera is transformed into screen space and "rasterized" into a pixel buffer.

(Image from learnopengl.com)

When a rasterization engine renders objects with transparency, it has to render triangles furthest from the camera first, and progressively render things that are closer. If closer triangles were rendered first, any transparent objects rendered behind it later would be discarded by the depth test, which means the engine would think the object is occluded because there's something in front of it. If depth of transparent objects is ignored (an approach some engines use), it can alter the final color, which is also not ideal. The process of determining the order in which triangles need to be rendered is called Alpha Sorting.

According to the Blender Manual:

  As of now Eevee does not support per-fragment (pixel) sorting or per-triangle sorting. Only per-object sorting is available and is automatically done on all transparent surfaces based on object origin.

What's happening in your case is that the alpha sorting is incorrectly ordering the objects at different angles, causing some to be occluded and thus not render.

As for the fix, start by enabling Show Backface in the material settings. It can resolve a lot of these alpha sorting problems.

If that doesn't work, try messing with the Backface Culling setting too, as that can make a difference in certain cases.

You can always switch to Cycles, it doesn't suffer from these limitations.


UV-Mapping not correct on 3d model but in UV-Editor

Not allowed to comment yet. Just a hunch, but do you have a not-unwrapped duplicate of this plane that is rendering on top your unwrapped plane by accident? This is what it looks like from your screenshot and I've made the same mistake.

Turn off the renderable option in the outliner for anything you don't want to render.

EDIT: If that is not the problem, overlay the texture on your UV editor and make sure your UVs line up with the texture itself.

GOT IT: Problem is that the scale of your X axis in your shader's mapping node is set to 1.100 instead of 1.000. Fix that and it renders like this:


Is there any advantage to using child particles with object particles?

There is very little advantage. Child Particles make copies of existing particles to reduce the computational power needed. When using objects as the display type for the particles, it is displaying a (translated) copy of that object at each and every particle. As far as render time goes, this will make no difference. When first setting up the particle system, using child particles will let you simulate the particles faster - but once you have the system set how you want it, it does not make much of a difference in render time.

Best way to answer this is to test it:
The following data was gathered from a test scene with a particle system on a simple plane, and using default (non-manifold) Suzannes as the display object. All children were identical:

Suzannes:   Actual Particles:   Children Particles: Total Render Time:
10,000          10,000              0                   00:28.19
10,000          1,000               10                  00:17.02
10,000          100                 100                 00:21.85

Clearly, it takes the longest for Blender to render the 10,000 separate particles, as it must calculate all 10,000. child particles are less intensive, but only up to a point. When you get too many child particles, there begins to be no computational gain between calculating extra particles, and calculating a large number of duplicate particles. This is why one can expect the best performance by using some child particles (but not going overkill).


Boolean modifier combined with Subsurf modifier creates weird shapes. How to Fix?

Boolean operations always messes with the topology of the mesh, you can go around this in some ways, but the best practice is to invest in understanding topology, and how to create the best topology for Your model. In this Example, I would make the model without the boolean modifier and do something like this:

Without subsurf

With subsurf, and edge crease on the edges to create sharp edges.

If you want to learn about topology, the anvil series by Blender Guru is quite good. He also addresses the issues with the boolean modifier and the topology (in part 2).


Nonuniform Moving of Vertices of Meshes Along Local Normals

I used an existing base mesh to test this, which is why the code I'm using might need some changes for you to be able to implement it.

The most important thing here is lines 22-23:

d    = normal * h_i[i] # Current vertex's displacement value
v.co = V[i] + d        # Displace current vertex along normal

You calculate each vertex's new location by adding to it the displacement value, which is the h_i for that vertex X the face normal (which is a direction vector).

Here's the complete code:

import bpy, bmesh
import numpy as np

bm = bmesh.new()
bm.from_mesh( bpy.context.object.data )

worldMatrix = bpy.context.object.matrix_world

F   = bm.faces                                 # Face objects
V   = [ worldMatrix * v.co for v in bm.verts ] # Vert coordinates

# Generate a random number between -1 and 1 as a displacement value for each vertex
h_i = 2 * np.random.random( len( V ) ) - 1

# Perform displacement
# Iterate over faces (You might want to zip the face normals and triangulations here)
for f in F:
    normal = f.normal # get Face normal (your n value for this face)
    fVerts = f.verts  # List of face vertices (your "F" variable for this face)
    # Iterate over this face's vertices (F[face_index])
    for v in fVerts:
        i = v.index

        d    = normal * h_i[i] # Current vertex's displacement value
        v.co = V[i] + d        # Displace current vertex along normal

update_existing_mesh = True
if update_existing_mesh:
    bm.to_mesh( bpy.context.object.data )
else: # Generate a new mesh
    m = bpy.data.meshes.new( "Displaced" )
    bm.to_mesh( m )

    o = bpy.data.objects.new( "Displaced", m )
    bpy.context.scene.objects.link( o )


Click the pushdown action button (icon with the double down arrows):

After that the Action Strip settings become available in the Properties

This is documented in the Docs Creating Action Strips


Not all video output options work on OSX. I'm assuming you're using a video format? You'll have to experiment to see which ones work on your machine.


Displacement modifier texture not matching color texture

You need to set the displacement modifier to use the UV map:

To change the size, simply scale the UV map up or down, by going into the UV editor and hitting S.


I cannot find interpolate key of grease pencil in tab

I had this issue also, Make sure you are using the latest "Blender Builder" /
here is the link https://builder.blender.org/download/

I'm guessing you saw the youtube tutorial from OpenToonzTraining. you're using blender 2.78. If possible when you see his video you will see he is using 2.78.1

Me personally, I think I'll wait for blender 2.79, as there is a risk of instability with the builds as it says on top of it, but I don't know about that stuff yet.


Why is the "source to destination mapping" controls is missing?

The UI for the constraint has changed, but the features are still there. Each axis has an alterable “source” option, which is equivalent to “mapping.”


How to place repeatedly a small texture on very large surface?

This should be your basic material for any Image

To increase the texture size, Simply increase the scale in the mapping node

WARNING  However with most textures, you will see noticeable tiling
To reduce the amount of tiling, i suggest looking into Blender Guru's Video here:
https://www.youtube.com/watch?v=-VgtSL5ZpYc&feature=emb_title


im trying to make textured glass but it doesn't work the way i want, can any help?

In the material properties tab (next to main viewport), with the material selected,  scroll down until you see Blend Mode and Shadow Mode (under Settings). Set Blend Mode to Alpha-clip, Alpha-hashed, or Alpha-blend (play and see what looks best).

The other controls the shadows created by the transparency. Also, play around to see what looks best, or just leave it off if you don't need it to have a shadow.

Also, make sure to connect the alpha from your image texture to the BSDF node, or adjust the value as needed ($0$ is pure transparent).


Movements done in script do not show in game view

There is no bpy module in game (same problem as this one and this one).
You really are moving the cube. Everything you described proves exactly this.
The console output shows the location changing, and when you exit the game the cube is in the new location.
Assuming blender is laid out like you have it in that screen shot. Exit the BGE, then press the "Run Script" button in the text editor. That will run your code, you will see the cube move every time you click the button.
Now how to make it work.
You need to use the bge module.
To move a cube in game like you are doing now would be like this:
import bge, mathutils

# the object holding the logic brick running this script
obj = bge.logic.getCurrentController().owner

obj.worldPosition += mathutils.Vector((1, 1, 1))

Or if you want to get the object by name:
obj = bge.logic.getCurrentScene().objects['Cube']


I had accidentally changed the mesh in a custom shape key rather than on the basis shape key - meaning the head enlarged when she blinked! I needed her head to be enlarged for every animation. For future reference, if you want to edit the mesh for all animations (shape keys), ensure you have basis shape key selected in object mode, then go into edit mode. As I had already made the mistake of editing another shape key, I just deleted it, edited the basis key as I should have done, and recreated the blinking shape key.


Is there a way to utilize simple math operations for color correction?

Yes, you can use the Converter > Separate RGB and Converter > Combine RGB nodes to get access to each channel.

You get 3 streams of float values, on which you can do Converter > Math operations.

When you have build you node network, you can pack it into a Group node (CtrlG) and reuse this node in other projects (append or link from a library .blend or save the node to start-up .blend)


If I understand correctly, what you could do is:

Use your picture as a background image.
Create a cylinder, extrude inwards.
Only keep an arc.
Scale on the X axis (because it seems a bit deformed).
Make sure you've applied the rotation with ctrlA.
Give it a Simple Deform modifier / Bend mode. Give it the Angle value you want.


Move multiple faces towards single point

A way to get the result is to select one of the faces at the end you want to move and press ⎈ CtrlH and select Hook to New Object, repeat for the other faces you want to move.

Go into object mode and select the empties that were just created. Enable the manipulate pivot points option (nice if we had this in edit mode) and scale the empties until the faces are where you want them.

Once the ends are in place, apply the hook modifiers and delete the empties.


How to make an object's vertex follow another object

This can be done with the Hook modifier.
To hook vertices from "object A" to "object B", first assign all vertices of object A which you want to "follow" object B to a vertex group.  Then add a hook modifier to object A and select the vertex group you have created and object B in their respective boxes on the modifier.


Make particles clump together and flow in a specific direction

This is campfire example.

To achieve this effect add two force fields.

First one: Shift+A > Force Field > Turbulence

Then change Noise to 5.

Second one: Shift+A > Force Field > Vortex

Change Noise to 2 and Strenght to 0.1.

Blend file:

Final toughts:

I don't know your full setup so some values may vary. You can try change position of force fields and strength/noise values.

Edit:

Based on provided blend file I've change all Force Fields to Force with negative strenght and noise. Also I've zeroed Velocity > Emitter Oject > X and Random.

This is how it looks with Motion Blur.

Updated blend file:


How to import text data blocks as modules using the 'from/import' statement?

Add to sys.modules
Among other ways to make fake modules, can simply add it to sys.modules
>>> import sys
>>> sys.modules["function"] = bpy.data.texts['function.py'].as_module()
>>> from function import function
>>> function()
hello

Have a good link re fake modules and namespaces, will look for it.
https://stackoverflow.com/questions/5122465/can-i-fake-a-package-or-at-least-a-module-in-python-for-testing-purposes/27476659#27476659
Will add this link here too, https://dev.to/dangerontheranger/dependency-injection-with-import-hooks-in-python-3-5hap in can make a fake namespace that can be imported as if a regular module.
An example using above (stripped of comments to make shorter) making the function method appear to come from module  my_addon.utils
import importlib.abc
import importlib.machinery
import sys
import types

class DependencyInjectorFinder(importlib.abc.MetaPathFinder):
    def __init__(self, loader):
        self._loader = loader
    def find_spec(self, fullname, path, target=None):

        if self._loader.provides(fullname):
            return self._gen_spec(fullname)
    def _gen_spec(self, fullname):
        spec = importlib.machinery.ModuleSpec(fullname, self._loader)
        return spec

class DependencyInjectorLoader(importlib.abc.Loader):
    _COMMON_PREFIX = "my_addon."
    def __init__(self):
        self._services = {}
        self._dummy_module = types.ModuleType(self._COMMON_PREFIX[:-1])

        self._dummy_module.__path__ = []
    def provide(self, service_name, module):
        self._services[service_name] = module
    def provides(self, fullname):
        if self._truncate_name(fullname) in self._services:
            return True
        else:
            return self._COMMON_PREFIX.startswith(fullname)
    def create_module(self, spec):

        service_name = self._truncate_name(spec.name)
        if service_name not in self._services:
            return self._dummy_module
        module = self._services[service_name]
        return module
    def exec_module(self, module):

        pass
    def _truncate_name(self, fullname):
        return fullname[len(self._COMMON_PREFIX):]

class DependencyInjector:

    def __init__(self):
        self._loader = DependencyInjectorLoader()
        self._finder = DependencyInjectorFinder(self._loader)
    def install(self):
        sys.meta_path.append(self._finder)
    def provide(self, service_name, module):
        self._loader.provide(service_name, module)

if __name__ == "__main__":
    import bpy
    injector = DependencyInjector()

    injector.provide("utils", bpy.data.texts["functions.py"].as_module())
    injector.install()

    import my_addon.utils as utils
    utils.function()

output
hello


You can do this within a Cycles shader using the particle info node. One of it's outputs is "location", which is the world space location of the particle than an object is being cloned onto. By splitting this vector with the a Separate XYZ node, you can control a color ramp based on a particular axis:

In this example, I've used the Z-component of Particle Info > Location, modified with with math nodes, and fed it through a color ramp to colorize the spheres based on their height.


Cycles: sharper transition from transparent to opaque areas when using partly transparent texture

You were on the right track: you can use a math node in between the alpha output of your texture and the mix shader. set it to "less than" and input a number between 0 and 1.
if you input 1, only 100% opaque pixels will be diffuse, all other pixels are glass.

Here is the node setup (I used transparent and emission shaders for demonstration purposes. this works with your node setup as well), the texture I used and the result:


Get rotation of object without decimals?

Blender uses radians natively for rotation.  You see degrees in the panels because the default setting for Units under Scene properties is to show degrees.

There are only 2Pi radians in 360 degrees, hence 10 radians is more than a revolution. To add 10 degrees to a rotation use the radians(degrees) method.  eg rot += radians(10)

You can use formatting when printing to reduce the amount of decimal places. %.0f prints a float (decimal) type with no decimal places.  %5.2f is print a float in a 5 digit field with 2 decimal places.

import bge
from bge import logic
from math import degrees

cont = logic.getCurrentController()
obj = cont.owner
rotation = obj.worldOrientation.to_euler()

print("%.0f" % degrees(rotation.x))
print("%.0f" % degrees(rotation.y))
print("%.0f" % degrees(rotation.z))


The POV-ray newsgroups are quite responsive to such scientific visualization demands. and Blender is cleaner to script. You could use both except for the most accurate results, where LuxCoreRender might end up slightly better since spectral based. :-)


A Color Ramp Node is the most straight forward way I know of to achieve your desired effect.

Example Node Setup:

In the Color Ramp Node select the + button to add more markers. Click & drag to place. Position number & arrows can also be used for more precision. Placing them further apart will increase the size of the transitional gradient (better known as 'falloff').

Note: You can do away with the Gradient Texture node all together & simply use the Color Ramp Node for your gradient as well.

Note 2: You also don't require two separate emission shaders. Using a Mix RGB node accomplishes the same effect with, slightly, fewer resources. Unless you need or want separate strength values. I'd recommend the preceding setup.

Note 3: For more information on the Color Ramp Node visit their official manual page here.


Can I delete all materials of all objects in a scene quickly?

Yes, you can. Easy way would be:

Select all objects, keep one active, remove all materials on it by pressing the "-" button on the right-hand side of material slot list;
Then, from the drop-down list (below it), choose Copy Material to Others. Save the file.

All unused material data will be removed after saving. You cannot see them anymore after reopening.


Viewport options in Blender 2.90: where to configure Active outline and world grid?

It turns out that the correct place to change this is "Viewport Overlays" dialog. It's accessible via third dropdown in viewport top right with icon that looks like outline circle and filled circle partially overlapped. The tooltip for the quick toggle says "Show overlays".
Other possible reasons for this behavior can be found at question Grid floor disappears and cannot see outline of selected objects


How to add horizontal cylinder at end of cube

You could select the last top and bottom edges and create bevels, then extrude inwards and merge.


How can I set a default value on a Dynamic EnumProperty?

There is no default when items is a function (you'll get an error if you try to specify it).

I'll update the doc, this info is missing currently…

Note even with 'static' enums, not specifying the default is not the same as giving "" or None, currently. Not very pythonic, but a consequence of our current C <-> python code.


Can I use Blender like After Effects or Nuke for motion graphics?

You can turn off the world strenght down to zero, delete all lights, set the color management as standard (sRGB), and use an emission shader set to 1 strenght instead of a principled BSDF.


Recording soft body deformations during simulation in bge

You can write a BGE script that reads the vertex positions from the mesh.

Store this positions in a way that you can match them with the vertices of the according Blender object.

When you run the BGE embedded you can access Blender (bpy) while your game session is running. Be aware changes will apply AFTER the game session ended.

Therefore I suggest:

read the BGE mesh vertex
write to Blender object data (e.g. create shape keys)

I do not have a ready to use script nor do I want to write one here. This answer means is more an idea than a complete solution.


Solution it's a use the bake action. Just select your action, press spacebar and type "Bake animation" and then select "visual keying" and "clear constraints" parameters.


Currently there is no way of of limiting the grid to let's say 10 squares. You could however disable it under "Overlays", create a plane and subdivide it with a right click. Then under Object Panel > Viewport Display set "Display as" to Wire and check "All edges".


These UI elements are called panels. When using bl_options = {"DEFAULT_CLOSED"} they will start in a closed state.

The following example add-on creates three panels in the sidebar of the 3D View in a closed state, which looks like this:

bl_info = {
    "name": "Multiple panel example",
    "author": "Robert Guetzkow",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > Sidebar > Example tab",
    "description": "Example with multiple panels",
    "warning": "",
    "wiki_url": "",
    "category": "3D View"}

import bpy

class EXAMPLE_PT_panel_1(bpy.types.Panel):
    bl_label = "Panel 1"
    bl_category = "Example tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {"DEFAULT_CLOSED"}

    def draw(self, context):
        layout = self.layout
        layout.label(text="This is panel 1.")

class EXAMPLE_PT_panel_2(bpy.types.Panel):
    bl_label = "Panel 2"
    bl_category = "Example tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {"DEFAULT_CLOSED"}

    def draw(self, context):
        layout = self.layout
        layout.label(text="This is panel 2.")

class EXAMPLE_PT_panel_3(bpy.types.Panel):
    bl_label = "Panel 3"
    bl_category = "Example tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {"DEFAULT_CLOSED"}

    def draw(self, context):
        layout = self.layout
        layout.label(text="This is panel 3.")

classes = (EXAMPLE_PT_panel_1, EXAMPLE_PT_panel_2, EXAMPLE_PT_panel_3)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)

if __name__ == "__main__":
    register()

Notice that as of Blender 2.8x, we can have sub panels to save even more space:

class EXAMPLE_panel:
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Example Tab"
    bl_options = {"DEFAULT_CLOSED"}

class EXAMPLE_PT_panel_1(EXAMPLE_panel, bpy.types.Panel):
    bl_idname = "EXAMPLE_PT_panel_1"
    bl_label = "Panel 1"

    def draw(self, context):
        layout = self.layout
        layout.label(text="This is the main panel.")

class EXAMPLE_PT_panel_2(EXAMPLE_panel, bpy.types.Panel):
    bl_parent_id = "EXAMPLE_PT_panel_1"
    bl_label = "Panel 2"

    def draw(self, context):
        layout = self.layout
        layout.label(text="First Sub Panel of Panel 1.")

class EXAMPLE_PT_panel_3(EXAMPLE_panel, bpy.types.Panel):
    bl_parent_id = "EXAMPLE_PT_panel_1"
    bl_label = "Panel 3"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Second Sub Panel of Panel 1.")


How do I make a reference image in Blender show up when rendering the scene?

The whole point of reference images are to help while modeling and setting up a scene, they are not intended to be in the final rendered image.

Blender includes an addon called import images as planes, enable this addon and you get an extra import option File->Import->Images as Planes. Using this will setup your image as a texture on a plane so that it will show up in the final render.


How can I assign an image texture on a Circle?

In Edit Mode select all your faces making sure you specifically click on one of them to make it the active face.

Unwrap it using the Follow Active Quads option.
In the UV Image Editor turn on the option Constraint to Image Bounds under the UV menu.

Rotate your unwrapped faces 90º if necessary so their orientation follows the rings.

Move them so they fit to the 0,0 coordinate then using scale resize them so they completely fit within the image boundaries. The Constraint to Image Bounds option should make sure everything snaps into place easily.


To connect the bones you can reparent the bone in edit mode and make sure that you select connected rather that keep offset. You can also set this in the relations section of the bone's properties, it is a checkbox labelled connected.


Is it possible, without knowing Python, to animate between orthographic and perspective camera view?

To achieve a smooth transition from a Perspective camera to Ortho (and back), @someonewithpc's answer gets you part of the way there. However, that solution just jumps between Perspective and Ortho; the transition is not smooth. Use the following steps:

Set a keyframe for your camera's location (I -> Location)
In Camera Properties, set a keyframe for your camera object's Focal Length (it's in the Lens panel) by either RMB the value and choosing Insert Keyframe or hovering your mouse over the value and pressing I. (Note: this assumes that your camera is in Perspective view to start.)
Move forward in time to where you intend to have your transition to Ortho complete.
Increase the Focal Length to a very high value (The soft limit is 5000mm, but you can manually enter higher numbers. Typically, however, around 1000mm should be sufficient.) You should notice right now that everything feels zoomed in very close. Don't worry about that just yet.
Insert a keyframe for your new Focal Length (hover -> I or RMB -> Insert Keyframe).
Grab (translate/move) your camera along its local Z-axis... you will need to move it very far. Try moving it by 100 units to start (G -> Z -> 100 -> Enter). You will also probably need to adjust your camera's clip range... both the Start value (to remove artifacts) and the End Value (to ensure visibility). Keep grabbing your camera and moving it along it's local Z-axis until it looks very similar to the Orthographic camera (you can quickly switch between Perspective and Ortho in the Lens panel of Camera Properties to check).
When you're happy that your perspective view closely matches the ortho view, insert a keyframe for your camera's location (I -> Location).
Make sure your camera is set to Perspective view in the Lens panel of Camera Properties and insert a keyframe on the Perspective/Ortho/Panoramic buttons as described in @someonewithpc's answer (hover over buttons and press I or RMB -> Insert Keyframe).
Step forward one frame right arrow.
Change the camera view mode from Perspective to Ortho from the Lens panel of Camera Properties.
Insert a keyframe for the camera's viewmode as described in #8 and @someonwithpc's post.

That should do it. This should get you a smooth transition from Perspective to Ortho. I know it looks like a lot of steps, but I was just overly thorough with my description. It's pretty easy to do.


For atmospheric/volumetric effects in cycles you have to use volume scattering and volume absortion on the volume section:


Your image is not a JPG file...it's a WebP file, which Blender does not seem to be able to load as a background image.  Try a different image.   I took a screenshot of the image from my web browser, so you should be able to download and use this one:


You need to specify the new camera as the active one for the scene, before rendering, like this:

bpy.context.scene.camera = cam_ob

To rotate an object around its Z axis, just do:

from mathutils import radians
my_obj.rotation_euler.rotate_axis('Z', radians(10))


This is intended behavior, if you are using Local Coordinates the transform gizmo orients itself to match the object local coordinates.

If the object is rotated so is the pivot, to match the objects orientation.

Either clear the object's rotation if it is not wanted (Alt+R), apply it so it becomes part of the object geometry (Ctrl+A), or use Global Orientation instead.


Gradient biased to black (it seems); why?

In vertex color paint one can see the useful interpolation.  This may or may not be useful.  If you just want the gradient you could vertex color paint simple planes and use them as textures.  Blender Render.  Arrow indicates required setting.

For your example try to avoid negative coordinates relative to origin.

Nodes with exponent of 1.   Origin of cube in center of cube. Image above.  Negative Values possible for coordinates.  Not desirable for your goals.

Origin of cube is in the corner. Image Above. Zero or Positive Values for coordinates.  This origin works with your goals.

Make sure your placement of the cube has

one corner at (0,0,0) and origin is there as well.

one corner at (1,1,1)

You may want to research Barycentric Interpolation


You could start with a spiral and stretch it to a rectangle.


Scaling a math function from a specific vertex

I'm not sure what the best way to scale that with Blender would be, but I'd look at just adjusting your equation. Here's your $y$ equation:

$$y=\begin{cases}
0.5 & \text{if } u < 0 \\
\frac{u^2}{u^2+(1-u)^2}+0.5 & \text{if } 0 \leq u \leq 1\\
1.5 & \text{if } u > 1
\end{cases}$$

Notice that the main part of the middle equation, $\frac{u^2}{u^2+(1-u)^2}$, normally has a range of $[0,1]$ on the interval $[0,1]$. You are offsetting it by $0.5$. If we scale it, and change the offset of the third piece, we can place it wherever. Use this equation instead:

$$y=\begin{cases}
0.5 & \text{if } u < 0 \\
k \cdot \frac{\left(\frac{u}{k}\right)^2}{\left(\frac{u}{k}\right)^2+\left(1-\frac{u}{k}\right)^2}+0.5 & \text{if } 0 \leq \frac{u}{k} \leq 1\\
k + 0.5 & \text{if } \frac{u}{k} > 1
\end{cases}$$

where $k$ is your scalar. You can try it online using Desmos here. (Thanks to Rich Sedman for help with scaling horizontally).

In a Python expression, it would be this (substituting in whatever value for k):

(0.5 if u<0 else (k*((u/k)**2/((u/k)**2+(1-(u/k))**2)+0.5) if (u/k)<=1 else k+0.5))*v


You would have to pass 'INVOKE_DEFAULT' to call the invoke method of the operator:
bpy.ops.wm.quit_blender('INVOKE_DEFAULT')

Read: https://docs.blender.org/api/current/bpy.ops.html#execution-context


Bone heat Weighting Failed while Rigging

In your file I founded 30.000 doubles and I applied the decimate modifier. The existing problem of bone heat weighting failed still exist, and is probably due to the overlapping geometry, which automatic weighting doesn't like.

I think you will have to split the character into various spare parts (in edit mode select one vertex, Ctrl L to select linked, P to separate).

This is a good practice also to optimize the animation performances: objects like skulls or some parts of the armor should not deform, they should only solidly follow a bone instead. Parenting an object to a bone (bone option after Ctrl P) is also lighter to calculate for Blender, so you will have less lag during animation process. I think you will have also to retopologize the sections that actually need to deform in the classical way, because the geometry is very bad and it will lead to ugly deformations. It's a long run, good luck (or start with a simpler character :)).


Creating Millions Of Particles With Spheres

I found a workaround, following this post:
https://devtalk.blender.org/t/manipulating-particles-in-python/7552
I'm able to manipulate the positions of a particle system. So I created a particle system and then write in the positions. Then, I set the instance object of the particle system to be the primitive I want. I found a Nurbs sphere could work for me. In this way, I'm able to render 1 million particles with no problem.


If you are a begginer you should try less complex objects before try to create a revolver.
Look at YouTube for tutorials about booleans, crease, edge split, bevel and other hard surface tools.
To solve the problem you post try to use bevel modifier or add more loops (ctrl+R) near that junction.


Self-excluding Transparency Material in Cycles

I found using Transparent Depth from the Light Path gets the job done. It works in reflections as well, but of course any other kind of transparency also occludes objects using this node setup as the ray depth will be more than 0.

Another possible solution depending on your exact case is to use multiple passes and to add transparency to the objects pass in compositing.


Why is it when I render I Get a blank grey screen

The new camera you added may somehow be set as an inactive camera. This is the case if the triangle over the camera is an outline and not solid. Select the camera, go to the view menu, go to cameras, and click “set active object as camera.“


Blender 2.8 Bone pose local and global axis mismatch

In bones Y axis is always the longitudinal axis, and this cannot be changed, but you can extrude from its head another bone, orient it as you want (along with world coordinates I guess) and the set it to be the parent of the deforming bone.


Making an object continously spin and then stop after hitting a wall

Create your Shuriken mesh and curve object to follow.

Add a Path Constraint, a Follow Path (Ctrl+P > Follow Path) parent or whatever suits your need.

After the shuriken is correctly following your path, select it as active object, place the timeline in Frame 0 and keyframe it's Delta Rotation by pressing the i key, then move the timeline to the last frame of your animation and do the same, keyframing the last Delta Rotation again.

This will do nothing on its own, you now have to adjust it in the Graph Editor.

Either open a new Graph Editor area, or switch to one of the default screen layouts for Animation which will automatically set up the editors for you.

Now in the graph editor, with the select the shuriken as active object, select the animation curve handle for rotation in the last frame and move it up or down, depending on the direction you want it to rotate, the amount of degrees you want it to spin (amount of turns * 360 degrees), you will probably have to eyeball it to see what looks best, but probably a very high number.

To make the speed constant turn all animation handles into Vector type.


Selecting vertices in solid mode selects random vertices?

This might do the trick:

Go to 'user preferences'
Under 'system' search for Window Draw Method
Change it to 'No Multisample'
(this disables the antialias in the 3D view).


Copy location constraint while maintaining the original distance

There are a lot of ways to achieve this, but the easiest and most straight forward would be to check Offset option in Copy Location constraint and move the Emp_toFollow back to it's original position. Like this:


How do I achieve the tri view in Blender?

LMB the three hash marks in the top right corner of the 3D Viewport and drag to the left to divide the view.  LMB the three hash marks in the top right corner of the right 3D Viewport and drag downward to divide the view again. You can now add a different Background Image to each.

Tri View:

.blend file:


How do I prevent overhangs when using subdivision modifier?

The problem is due to ngons (again), probably because of the use of a boolean modifier (again).

The faces which overlap the hole are these one, two ngons around the hole:

The aim will be to organize quad around the hole. That could be done all over the discus, but, as the other part may stay flat this is not absolutely mandatory.

These quad will be "subdivision surface" modifier resistant!

You have also added many loops around the hole, I remove it for now.

So first cleanup:

Opening the ngons
Remake the border (which is not the same as the others)
Removing the doubled vertices

Creating vertices to obtain quad in the wanted part. I only do it here in the hole concerned part... So that will create ngons around, and that's not visible so long these faces stay flat and convex.

Subdividing the edges around
Grabbing vertices along the edges to the wanted location
Connecting quads

Now when we show the modifier:

As you want it squared, we'll add some bevel in order to maintain the subdivision effect. Use CtrlB to bevel and Numpad + and Numpad - to set the amount of edges.


You can do UV unwrapping and hair particles independently of each other.
UV unwrapping creates UV maps. You can find them in the Object Data Properties.
Hair particles create particle settings and adds a hair modifier to the object.
As long as you haven't started to paint textures or edit/comb the hair you can delete uv maps and particle settings and re-create them.


How do I get rid of this crease when joining/creating new faces?

Dont create a single face with F.
Select all the edges you want to join (in both parts you want to join) and use the Bridge Edge Loops command (you can easily find it with the F3 seach menu).


I joined two objects together, but when I edit the object, they aren't completely joined

You have two edge loops that overlap perfectly, one on the body, the other on the wing. To fix the issue, select everything, then press W and choose remove doubles.


How about one at a time using "Render Single Layer" check box? Or simply deselect the "Use for Rendering" from the layers you don't want to re-render.


How to open properties bar, I accidentally closed it?


You are using a mask brush which doesn't use colour.

Choosing a colour from the palette only makes sense with brushes that apply colour to an image such as draw. Brushes like smudge, mask and blur don't use colour information so don't see the palette. While the clone brush applies colour it takes the colour from the starting position not the current brush colour, so also doesn't get the palette visible.


How to eliminate offset and follow rotation with parent vertex

Your video is a bit fast to follow.  It looks like at the point that you vertex parent your smaller cube to your bigger cube, your smaller cube jumps?  This can happen in a few situations, but usually when an object has been parented to something else previously.  It's a bug, but a small, easily rectified one: undo the parent operation, then clear parent inverse on the small cube (alt p -> clear parent inverse) then parent it to the big cube again.
It moves with the cube's rotation, but it doesn't rotate with the cube's rotation, because it is parented to a vertex, and rotation just isn't a property of something 0-dimensional like a point.  Blender can't tell you or anyone what way that vertex parent is rotated.  If you want the small cube to acquire rotation from the vertex parent, you need to parent it to three vertices.  Select the big cube, enter edit, select three and only three vertices on it, then in object mode, parent the small cube to the big cube with vertex (triangle) option.


How to make a tape measure for exact measurements?

First, two assumptions. One is that I assume your person model is made in compliance with the usual norms as far as topology and geometry of the model. The other is that the "exact measurements" to which you refer to in the title of your question relates to the exact measurements made and communicated to you, and not necessarily to obtaining exact measurements in the model. That written, here's what I would do.

Make a duplicate of your person model and move it to a different layer.
Figure out where on the model you will need to show the measurements, likely including (but not limited to) the neck, the chest, the upper and lower arms, the waist, the hips, and upper and lower legs.
At each point where you have identified a location where you need a measurement, define a contrasting material to any that might already be present on your real person model, and make two loop cuts around the duplicate person model in that location. Space those two loop cuts you just made to be about an inch apart, or so (relative to the model), and assign the new material to the areas between the two loopcuts.
When all of the areas where you need measurements have been marked, in the material context button of the object properties window, in edit mode, choose "select" to select all of the loop cuts with the material you need, then in the select menu in the 3D viewport header, choose "inverse selection". Now delete everything from the duplicate model that is not a location of a measurement you need.
Switch the pivot point to "median point", and scale each of the locations of the tape up by about 2 percent, constraining the scale directions so as not to change the scale of the tape in the direction perpendicular to the tape. Do not change the locations of any of your measurement lines.
Move the tape lines from the layer you moved them to in step one, back to the layer where the person model is to be found.

If you choose, before doing step 6, you can make a more accurate and detailed representation of the ends of your tape measure


Why don't static objects detect collisions with other static objects?

It is that way by design - most likely for performance. See the Static Physics Object page.

Static objects in the Blender Game Engine do not automatically react to physics, including gravity and collisions. Even if hit by the force of a speeding 18-wheeler truck, it will remain unresponsive in terms of location, rotation, or deformation.
It will, however, give collision reactions. Objects will bounce off of Static Objects, and rotational inertia will transfer to objects capable of rotating (that is, Rigid Body Objects will spin in response, though Dynamic Objects will not).


How can i control the extrude size of a curve while creating it?

When creating a curve you have some control using the parameters on the tool bar (press T to make it visible) or revel the tool options bypressing F6

Once a Curve has been created it can be manipulated with precision using the Transform control panels. (Press N to make it visible)


Cloth Sim-Same value but different results, why?

Check the scale of your model. For realistic simulations you really need to fit to real-world scales - so it should be, say, 1m top to bottom. Don't forget to 'Apply Scale' on your mesh (otherwise it will still behave at its old size). I'm not familiar with the 2.8x cloth settings (I'm more used to 2.79) but 5kg vertex mass would seem way too high. If my assumptions are correct that is the effective weight of each vertex in the mesh. So if the whole garment would normally weigh 500g, if there are 500 vertices each should be 1g, not 5kg! Set the scale and mass correct for ‘real world’ physics and re-run the simulation.


After you generate a rig, rename it. The armature generated is given the name rig, when you click generate on the second metarig the first rig is updated because of it's name.

This only applies up until 2.78, the about to be released blender 2.79 includes an updated rigify addon that makes this easier. The new version has options to overwrite or create a new rig, as well as choosing which rig to overwrite.


(Assuming Blender 2.80)
To fix the size, move your mouse cursor over the panel, which you want to change. Press CTRL and hold down the mouse wheel. Then move the cursor up and down until the size of the fonts are as you want.


blender 2.9 curve handles not visible until selected

I think that's what you're looking for (Viewport Overlays > Curve Edit Mode > Handles > All):


Python RNA getting the names of Vector axes. (eg "g" is color[1])

Guess you've tried this already, so forgive me if it doesn't suit your needs. It's also using hardcoding via a dictionary, the test runs based on the type of the property and the axis to test on:

import bpy
from mathutils import Vector, Color, Euler, Quaternion

classMap = {
    Vector:'xyz',
    Color:'rgb',
    Euler:'xyz',
    Quaternion:'wxyz'
}

def returnIndex(_driverProp, _axis):
    dictVal = classMap[type(_driverProp)]
    return(dictVal.index(_axis))

print (returnIndex(bpy.context.object.rotation_quaternion, 'y'))


How can I combine multiple displace modifiers?

Though I think your project is better suited for shape keys here's a solution with displacement:

You can use multiple a displace modifiers on the same object, each one with a different image/texture as displacement and animate them separately.

Let's say you have 3 dsplacement maps:

By animating the strength on each one you can create transitions from one deformation to the next.


Node get from node_tree.nodes don't have copy property

The copy function really seems to be missing from the Python API. I would suggest to get the bl_idname of the node, create a new instance in the other node tree and then iterate through the default_values of the node's inputs and assign them to the new node.

import bpy

def copy_node(node, target_node_tree):
    # Get the bl_idname to create a new node of the same type
    node_new = target_node_tree.nodes.new(node.bl_idname)

    # Assign the default values from the old node to the new node
    for key, input in enumerate(node.inputs):
        node_new.inputs[key].default_value = input.default_value

    return node_new

For instance, if you would have an active object with two material slots, each with filled with a node based material and you would like to copy the Diffuse BSDF node of the first material into the second one, this could be accomplished by the following code:

if __name__ == "__main__":
    node_tree = bpy.context.object.material_slots[0].material.node_tree
    node_tree_2 = bpy.context.object.material_slots[1].material.node_tree
    node = node_tree.nodes["Diffuse BSDF"]
    copy_node(node, node_tree_2)

This simplified example doesn't check if the materials and nodes actually exist, which should be done in a proper implementation.


select all the individual objects and try CTRL J


Python: add object, then change properties

When using add primitive operators, the object that is created is marked as the active object. You can access the active object using obj = bpy.context.active_object.


How can I get rid of these weird shadows?

It seems like several of your normals are pointing inside.
Answer to this question shows how to see normals in viewport:
Viewing normals in Blender?
Answer to this question shows how to flip normals of selected faces:
how to flip normal direction in blender


The simplest remedy is to make the script not depend on the 3d cursor at all. The add-on in this case seems to use the 3d cursor somewhat arbitrarily to store the location of the selected object.

# replace these two lines
bpy.ops.view3d.snap_cursor_to_selected() # move 3d-cursor
tinObj.location = bpy.context.scene.cursor_location #position object at 3d-cursor

# with this line
tinObj.location = obj.location.copy()

it will do the triangulation as desired.

>>> bpy.ops.delaunay.triangulation()
0 duplicates points ignored
0 z colinear points excluded
Triangulate 6 points...
4 triangles
Create mesh...
Info: Mesh created (4 triangles)
{'FINISHED'}


Am using "Commotion Add-on" for random offset effects. That should be the best Add-on to handle that


Given the list of objects, their classes (0, 1, 2), and sizes of each class. We can evaluate the sizes list at the classes list and use the output as the scale as follows:


glove: proper way to create/apply It to an hand?

Cool looking model.  I'd just apply the subsurf + shrinkwrap modifier and maybe delete the hand mesh that's underneath the glove.  Unless you plan on having the character unwrap the glove in a scene.


Absolutely black object in 3D view/texture display

You might not have the texture files on the new PC, while saving the . blend file go to file and check automatically pack into . blend file. And then try it


The problem is you have to edit your vertex group.

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

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

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

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

happy blending!


Flipping the pose on the x axis is pasted incorrectly

The bones of your right leg are not well oriented, you must have duplicated your left leg instead of symmetrized it. So delete the right leg, bend a bit the left leg (always better to show Blender in what direction it is supposed to bend), symmetrize it. As you'll see you'll need to correct the IK Pole Angle of the right lower leg (0°). It should work.


I've managed to come up with a decent result using the 2D Length and Angle settings.

I first used an Along Stroke modifier (thanks Robin Betts) for the line thickness in the Render Layer Properties -> Freestyle Line Style:

This by itself didn't do much, so messing with some other settings, I managed to get the Min 2D Angle and the 2D Length values to get me a close enough result to the one I 'm aiming for:

This may not be the best way, but for me, it works fairly well.
This is what I now have:

This way does give you different stroke widths on the mesh, giving it a more hand-drawn look which I was hoping to achieve in the first place.

EDIT: I reposted the first pic, which was originally:

This gave the mesh occasional bumps in the lines drawn, but in case anyone wants the curves for the rendered picture above, this is what it used.


Hold D and press  LMB to draw
Hold D and press  RMB to erase
Hold ⎈ CtrlD and press  LMB to draw a line
Hold ⎈ CtrlD and press  RMB to draw a poly line

The shortcuts are in the tooltips:

Also note that the Circle select and Grease pencil erase circles are already subtly different:

Circle select Grease pencil


Can you see why texture isn't rendering? (Screenshots included)

Texture in your setup doesn't influence anything, so you need to enable Color checkbox in its settings.


Python access to Skin Modifier data - again

The original question you link to mentions this in the first line, but doesn't make a point to clarify why the Object/Edit mode switch is important.

Non BMesh

When using obj.data.skin_vertices[0].data, the Skin Modifier data will show the correct current values only when the object is put back in Object Mode. The same is also true for checking other information of the mesh, like vertex.select.

BMesh

It may be possible to get this skin information while still in Edit Mode using bm = bmesh.from_edit_mesh(obj.data) but I have not been able to find an obvious way. If it is possible someone will no doubt offer a suggestion.


No more Ctrl + Tab to those who emulate numpads?

I saw some questions about having the 2.8 blender changed the Ctrl + tab shortcuts that gave a problem to those who use emulate Numpad just like me. All I did to solve this problem is to make a new shortcut, because why not?. I can't comment my answer to this question because my reputation is not high enough to do so. I hope this helps and to those who post the question earlier, I hope they found this.


How can I draw an alpha-channel, or clone one texture over the other in Texture Paint mode in Cycles?

This is not cycles or Blender internal dependant, this is just texture paint mode. So the principle is the same. You can clone the same way.

You can also "erase alpha" (blend method in the "texture paint mode" tools panel). But this will not "unclone" the original textures.

If you want to erase part of one texture, clone again the other one instead of erasing using alpha.


It's really important to set the origins to the rigth place, where the parts are rotates. Then set the lock part (the wire) as a child of the latch and add a Track to constraint to it, which points the objetc's y axis to an empty. So when you rotate the latch, the lock's end will stay down. After you rise the latch, you have to move the empty above the model, to rise up the lock. You can just move the empty manually, or set it as a child of an other empty and rotate it.

https://blend-exchange.giantcowfilms.com/b/A08G7S9e


How to use "Denoise" on a secondary rendered image

Just create two render layers and turn on denoising only one of them. You will get both image the same time.


You can access an object by calling it in the collections (= all things stored in 'bpy.data')
For example:

import bpy

cube = bpy.data.objects["Cube"]

You can search in the console for things you can access from there, like the attributes of the object: i.g. type bpy.data.objects["Cube"]. in the console and press SPACE+. and it will show you all the attributes and methods of this object. One of these is location.

So to get an objects location:

cube_loc = bpy.data.objects["Cube"].location

or to set an objects location:

bpy.data.objects["Cube"].location = (1,1,1)


Render image does not change despite changes in nodes

What you see in your viewport seem correct, considering your node tree.

However, there's something that does not look correct in your node tree, that being the maths multiply node between your color texture and your principled shader. Remove that, and it should have a more logical result.


Why are the edges of the corners of some of my objects curving off after I render?

It looks like you're using a Subdivision Surface modifier with the viewport level set to 0.

When rendered with the Catmull-Clark algorithm this adds extra faces based on the Render setting and interpolates their location.


Displace Mesh along Curve on single axis

Create a constant-offset array of a single mesh edge, crossways to the bridge-curve..
Set the arrayed edge's duplication to Dupliverts
Parent the vertical elements to the array of edges?

This might not suit .. there are other options, particles on placeholder planes, parenting with constraints..


Cannot select anything but an edge highlighted in pink

In the screenshot I can see you have all of your object geometry selected, not just one edge: how?

Look at these numbers in the bottom right edge of the window:

they say that you have 251 vertices selected out of the total 251, and so on for edges and faces.

Your pink edge should be an edge with some "special" feature, likely a crease, as others said.


Do you think the edge loop is ok? especially around the ears. Will it deform well after animation?

Nope, the area around the ear is not right.

The meshflow should follow the Sternocleidomastoid muscle and not return back to the eye corner.


You have entered orthographic mode. Press Numpad 5 to toggle it on and off, or simply hold down the Scroll Wheel and move the mouse you will be out of it. If you want to use orthographic modes in the future:
Numpad 1 = front orthographic
Numpad 3 = side orthographic
Numpad 7 = top orthographic
Numpad 5 = flip (ex: top flips to bottom)


Odd Black Patches and Modifiers Not Appearing in Blender Cycles Render but Appear Fine in Viewport

So I solved it myself, there must have been some type messed up topology that was allowing it to preview fine, but then when I went to actually render, everything went haywire. I ended up re-modeling all the bevels around the initial shape and now it renders out fine!

So I guess make sure to do periodic test renders!!


Automate random shape generator and export viewport render with python

range(0,1) just generates a list containing only '0', so that's only looping once. I presume you had it set like that just for testing.

When I ran your script it crashed on the bpy.ops.file.filenum(increment=1) line. Changing context can be complicated, so I'd suggest instead controlling the filepath directly by assigning bpy.data.scenes['Scene'].render.filepath, and numerically increasing it yourself using the x variable.

Also, you don't need to call both bpy.ops.render.opengl() and bpy.ops.render.render(). The former is the one you want - you just need to pass it either animation=True or write_still=True to specify what it should save, while the latter render function is the full-on F12 'render', which requires a camera.

To give a different seed to the shape_generator call each time, you can use the x loop variable added on to whatever base seed you want. For example, if you loop for x in range(6) that will repeat with x == 0 the first time, up to x == 5 the last time.

Here's a version showing these suggestions.

import bpy
from os.path import join

folder = "C:\\Users\\acro\\random_shapes\\"
scn = bpy.data.scenes['Scene']

for x in range(42):
    bpy.ops.mesh.shape_generator(random_seed=1000+x, update_draw_only=True, show_seed_panel=True)
    # set the save destination:
    fname = "randomShape_%02d.png" % x
    scn.render.filepath = join(folder, fname)
    bpy.ops.render.opengl(write_still=True)

    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)


Random placement of cylinders with random orientations

I have this script,

...
# Function to calculate the distance between two points
def distance(a, b) :
    '''
    list , list --> float
    a = list with three element
    b = list with three element

    return the distance between two points in float
    '''
    return sqrt((a[0]-b[0])**2+(a[1]-b[1])**2+(a[2]-b[2])**2)

# How many Sphere you want to add
count = 50

# Cylinder properties
radius = 0.03
depth = 0.2

# The sphere will be created between -domain <--> domain
domain = 0.5

# Max time to try finding a new location before break the loop
maxTry = 50

# Variable to count how many try has been done
Try = 0

# list with three element to generate locations
location = [0, 0, 0]

# Variable to hold the distant between balls
dist = 0

# True == Won't collide , False == Will collide
State = True

# This tuple will hold centers of created spheres
locList = ()

while count > 0 :

    # Calculate x, y, z position
    location[0] = randint(-domain*10, domain*10)/10.0
    location[1] = randint(-domain*10, domain*10)/10.0
    location[2] = randint(-domain*10, domain*10)/10.0

    # Start check if it will collide with other spheres
    for x in locList :
        # Calculate the distant
        dist = distance(x, location)

        # If it's too close make State = False
        if dist < radius*2 + 0.1 :
            State = False
            break
        # If it's in a good position State = True
        else :
            State = True

    # The distant is too close , recalculate the location
    if State == False :
        Try += 1
        continue

    # After Try reach maxTry break the loop
    if Try > maxTry :
        break

    # Successfully found a New location
    # Add this point
    locList += (location[:],)

    # Smooth the faces
    bpy.ops.object.shade_smooth()

    #Create a new sphere at the same location, and resize it to an cylinder
    bpy.ops.mesh.primitive_cylinder_add(radius = 0.1, location = location)

    #Give the cylinder a random orientation
    bpy.ops.transform.rotate(value=(2*pi*random()-1), axis=((2*pi*random()-1), (2*pi*random()-1), (2*pi*random()-1)))

    #Smooth the faces
    bpy.ops.object.shade_smooth()

    # reset Try
    Try = 0

    # Decrease the counter
    count -= 1

The problem of this script is in the condition of overlap between two cylinder, someone can solve this problem of overlap?


Usually, you download a compressed folder, extract it and put it into the Applications folder. There's no real installation involved since all data is stored inside this folder which can be stored anywhere. So on mac the directory of Blender is individual on each system.

The actual executable can be found within the Blender.app application bundle. Right click, select Show Package Contents and navigate to Contents/MacOS/ where the unix executable can be found (if the executable is what you're looking for). You can now drag&drop this file into the terminal to get the full path.

If the only purpose is to access blender from a program locally, this may suffice. If you plan to make your program available for others, some more steps would be involved like prompting the user to specify a path to blender.


By default all bones will deform the mesh.

The simplest way is probably to unparent the mesh, uncheck "deform" in the bone properties for the handle bone and parent it again with automatic weights.

You could also remove the weight for this bone manually with weight-painting.


You need to animate the Seed under Render Settings:

You can do this by hovering over it and pressing I, and then moving some frames, changing the value, and again pressing I.


Why are the straight lines in my model distorted when UV unwrapped?

Maybe all the planes of the fireplace are not at right angle to each other. You can confirm with this script (select the fire place before executing it; the info will be printed on console).

All the angles should be close to 90 (or 0).

import bmesh
import bpy
import math

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

if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

for f1 in bm.faces:
    angleInfo = (f1.index, [round(math.degrees(f1.normal.angle(f2.normal)), 3) \
        for e in f1.edges for f2 in e.link_faces if f1 is not f2])
    print(angleInfo)


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


If you haven't already, I would recommend that you bake the cloth simulation before you render it. If you already have, try baking it again.
If it still doesn't show up in the render, check to make sure "Render visibility" (the camera icon) is enabled in the modifiers panel for all of the objects associated with the simulation.


Well I am stumped. It doesn't seems to have a solution apart from pulling the eyebrow geometry slightly away from face. It seems the intersection created by the 2 meshes is causing the black lines.

Other things I've tried:

Alpha Premultiply/Straight settings
Render bounce and transmission settings
Turning off all ray visibility expect for camera rays
Texture clipping settings