Python Timer is not working for me in blender I need to start animation and stop it in 30 sec
command to stop animation is the same as start, so I'm activating animation before setting delay, and I want it to stop in 30 sec, but its not working for me. Any help would be highly appreciated

from threading import Timer

def  play_animation():
    bpy.ops.screen.animation_play()

play_animation()

t = Timer(30.0, play_animation)
t.start()

Override the context for timer funcs

As discussed here Context is incorrect when calling from a timer the timer is outside the context of the main thread of blender.

To get around this pass the objects to the function when defined, and use these in a context override of any operators.

A quick test reveals that the animation cancell operator requires context members "window" and "screen"

import time, bpy, functools
from bpy import context

def stop(w):
    print("STOP")
    c = {"window" : w,
         "screen" : w.screen
         }
    bpy.ops.screen.animation_cancel(c, restore_frame=False)
    return None

#f = functools.partial(loop, bpy.context.screen.name)

if __name__ == '__main__':
    window = bpy.context.window
    bpy.ops.screen.animation_play()

    bpy.app.timers.register(functools.partial(stop, window), first_interval=30)

The same method could probably be employed with threading.Timer As a rule of thumb, threading and blender don't go together too well. The new timer app was created to alleviate this somewhat.  But since it is still a thread outside blenders main thread it has issues with keeping context.

Please notice the way the index of the window is passed in answer to linked question.  Simply passing the window as shown here could be catastrophic if the window is closed, and hence the reference lost,  between invoking timer and it firing.


Missing some faces when importing from blender to unity even with correct normals I've made sure that all the normals are facing the right way but when I tried re importing the model again back to unity some faces are still missing I tried doing this the other way around and it still doesnt work... I also tried doing this both with .blend and .fbx but to no avail
is there anyway to fix this?
here is the blender version:

and this is what it looks like when imported into unity:

Thank you in advance

I have seen your question. The problem is with using normal maps. Normal Maps can have some errors. You should rather go with displacement maps, but I wouldn't recommend it because it eats up a lot of space. I would say you model each individual plank and then arrange them in your way and then join them. Or if you would like control over each individual plank in unity, then export it without joining. This may seem tedious but in the long run is more useful and gives you more control. I am guessing the normal maps are the planks itself, but if the normal maps are the texture and detail on the planks, then I would say go with displacement maps.
If it still doesn't work, then it's a problem with Unity. I would suggest you duplicate the model, rotate it on the X-axis and place it below the original planks. It would give it some depth and it will make your problem look better.


How can I make the default size of new objects 1 x 1? When adding a new object, I would like it to come in at a smaller size (scale).
I have changed my scene units to Inches and a new mesh object is 2 ft x 2 ft, or 24 inches x 24 inches. It would be convenient to control the size of all new objects to something more manageable like 2 inch x 2 inch.

You can achieve stuff like this by setting a custom scale value to the grid itself. I'm working in metric system on my machine and have my scale value set to 0.1, which results in the cube being added having a length of 20 centimeters instead of 2 meters. For imperial, you can set it up like this:

set your units to Imperial in the Scene tab. This sets your main units to feet.

Calculate a working scale factor for converting feet to inches, and enter it in the N Panel in the 3D Viewport

If I am not mistaken, feet and inches have a relation of 1:12. So the multiplier will be 0.08333333

Save your Startup File using Ctrl + U
Restart Blender, as this only takes effect after doing so

Test it by adding a new cube. It should be exactly 2 inches wide. Note that the grid lines now are also 1 inch apart each.


Armature deformation behaviour with shape keys I have a gum squeeze bulb rigged with an armature (simple two bones), when I turn the bone the top of the bulbs vertex group is attached to I get a nice bending of the whole bulb. Please see the attached images.

Now I want to have the same behavior accomplished by shape keys.
I found the Corrective Shape Keys addon, but can't get it doing a good job. The resulting mesh is a mess.
Also I found the option to apply the armature modifier as a shape key, which gives me exactly the same result as with the armature, but instead with a single shape key. That's too good to be true. So I found, that when I want to bend the bulb in +X/-X and +Y/-Y after the first time using the armature modifier as shape key, my rigging has gone and I can't do the -X/+Y/-Y motions with the "use armature modifier as shape key" process...

Help is greatly appreciated!

I got this working by using the "Corrective Shape Key" addon. So I posed the armature in the end position I wanted. Then I selected the mesh object (bulb) and hit the "create duplicate for editing" in the Shape Keys group of the objects data tab.
Selecting both (copied first and then original) objects and hitting "Join as Shapes" from the same menu creates a new shape key with the copied objects shape as final mesh deformation of this shape key.

I then did this with all four directions the bulb is able to bend.
This work nicely with one nasty exception. The motion is not exactly a copy of the armatures motion, the top of the bulb changes length during bending, which in the armature is forbidden. The bulb is actually attached with top and bottom lips to metal parts. So now when I make the angle sweep, a gap between the bulbs lips and the upper metal part opens and closes again. I hope to get around this issue soon...


How to apply a driver to rotate an object around a custom orientation? I'd like the drive shaft to rotate at four times the rate of my wheels. I have an animation that spins the wheels, using parent empties; and I have custom orientations on the pieces of my drive shaft, so I can manually rotate them (r x x for example). But when I look at the drive shaft's transforms, they're in global coordinates so all of x, y and z change when I rotate around local x, so I can't just assign a driver to control rotation.

How can I make the drive shaft's rotation follow the wheels? I expect a driver can be used with an expression that multiplies by 4.0, but I'm not sure where to start. I do have a little experience with setting up drivers for animating materials, but not for animating rotations like this.

You can use Constraints to animate the axle. Constraints are like commonly used drivers that have a gui configuration.

In the following example I have two empties that define the position of the universal joints. The rear one is a child of the diff to follow it around and it has it's rotation animated. The rear tailshaft has a constraint to copy the location of the rear empty, a TrackTo constraint to have the opposite end always point at the front universal joint and a Transformation constraint to amplify the rotation.

Note that the TrackTo constraint will pivot the object on it's origin so you want to place the object origin at the center of the universal joint.

Where a Copy Rotation constraint will do a straight copy of the rotation, a Transformation constraint can alter the end rotation. It can also be used to turn a rotation of one object into movement of another, but in this case I am using it to have a different rotation value than the source. For the source rotation I have min at 0 and max at 360 while the destination has a min of 0 and a max of 1440, that means that a full rotation of the source will rotate the tailshaft 4 times (1440 = 360 x 4)

The front tailshaft is setup similar but uses a simple copy rotation for comparison.

The end result -


Turn off the completed frame presentation I am editing a movie clip for the 2d stabilization; at the top I can see that each frame is taking around half a second each, but blender feels the need to show me what it completed by pausing its work and leaving the last rendered frame up there for around a second before starting the next one. I can see my frame counter go up at the bottom, and each one is taking longer than a second. Is there a way to turn this "feature" off?

Blender isn't pausing the render to show you the frame it just rendered, 'around a second' is just the time it is taking before it can start rendering the next frame in your scene. As gandalf3 mentioned in the comments, that could be because it's writing the image to disk, doing some pre-processing of the file, reading in textures (or in your case a movieclip) or doing any memory freeing that might have to happen between frames.

(Note: I don't actually know the specifics of what blender does between frames, I'm just trying to get the point across that blender doesn't delay things on purpose).

If you render blender's default scene of just a cube at a low resolution you will see how quickly the frames advance. There isn't much 'pausing' happening because the scene is so simple that it requires very little processing (or barely any time to write the frame to disk).

However, there is a way you can potentially speed this up a bit, which is by locking the interface while the render is happening. This is done with the lock icon in the 'Render' panel:

This may give a minor speedup as the render result doesn't have to be drawn to the screen while rendering, but bare in mind that it's probably the processing happening that is causing the most delay, not the drawing to the screen.

Maybe if you render from the command line you will get a more detailed log of what is happening at each point in the rendering process.


Problem rigging with automatic weights and shape keys for Unity Greetings nice community! I'm having problems rigging my character (a simple panda), probably because it's the first time I actually try to rig something.
Anyway I got to the point where I made the rig using Mixamo, did a separate rig for the eyes and set up shape keys for the mouth and the blink animation. I want to use the animations from mixamo in my Unity project and I was hoping I can keep the eyes rig separate so the animations would have no problem working with that mesh, but the eyes rig doesn't work in Unity for some reason.

I tried clearing the auto weights and joining the rigs together and then parenting the whole model to the combined rig,but got wicked mesh deforms.

My questions is what is the right path to follow from the point that I reached and what I'm doing wrong? Should I make bones for the shape keys first? Should I even join the separate rigs into one? And I also tried using preserve volume in the modifiers tab but the animations work perfect only in Blender - when I get them to unity I get slight but noticeable mesh deforms.

I'm uploading a cleaned version of my .blend file with the modifiers not applied and the rigs not parented hoping someone would show me the right way. Thanks in advance!

Have you tried using a Driver for that?

Add a bone to your armature that will be your Driver, it works
similar to an IK bone, as in, it doesn't affect the mesh directly.
Select the shapekey you want to add the driver to, click with the
right mouse button on the bar below and select Add Driver, it shall
turn purple.
Then on the Graph editor window, where it says F-Curve, change it to
Drivers. Click on "Key", there you can select each shapekey that will
be controlled by the Driver.
Expand the right panel, there you can select the bone that will
control the shapekey, a.k.a. the Driver.
One detail though, On the right panel where it says Type, change it
to Average Value, then moving the bone will change the values on the
shapekey.

There rest is up to your preferences.

Hope it helped.


Centering model for symmetrization Have a human model that I moved in both object mode and edit mode and have no idea how to re-center it. There are multiple vertices on the top of the head that mark the point of symmetry and one between the feet. Sorry if a noob question.

You can right-click on the object (while you are in object mode) and then click on set origin -> set origin to geometry. Then your origin is going to be centered again


How to change camera to current view on LAPTOP How do I change camera to current view in Mac Laptop?
I am trying to do what "Ctrl + Alt + Numpad 0" does on desktop version
Thanks

In user preferences, if you use "Emulate Numpad", it gives the regular 1-0 numbers the same functionality as the Numpad:

Of course, if you don't want to go to the trouble of remapping your keys, you can always just select it manually from the view menu:


Mesh won't react to light and remains bright I have an issue where some of my meshes won't react to light and just stay bright no matter what I do. I don't know how or when it happened, but I noticed it when opening the file.... This is in cycles render.

Edit: I only recently picked up blender so I'm a complete noob

Here are example screenshots of before and after:

Before

After

What could cause this?

I somehow managed to enable ambient occlusion in the world properties, disabling it fixed the issue for me


Need help making a 3d keychain pendant I have been fighting with this for the past week and am pretty much about ready to throw it away. I am trying to make keychains for a party and have had nothing but issues and I am almost out of time to get them done. I tried to upload the 2d image and it wouldn't upload properly so I had to do each detail individually and combine them. (I have already given up on making the text look clean.) In the process of combining each object together, my object is now done but has NO solid faces that I can extrude to make it into a 3d object nor can I add a hole for a ring (where there is currently an extra dot that won't delete in upper right corner). Fill doesn't work and I can't download new software onto the computer. I would be more than happy to send the file if you think you can fix it for me.

As you asked if someone could fix it (well i tried):

I would like to roughly tell you what i did, so you could do it too, next time.
After converting the path to a mesh ("Object-Menu" -> "Convert to" -> "Mesh from Curve/Meta/Surf/Text") and cleaning it reasonable, way to many points.
I separated the parts and made the main body from just the outer line extruded with a n-gon face. The rest was separating all the parts based on what layer they go. Like some framing of the text was cut out of the body and the text then set inside the cut out part giving it that depth.

If this is what you were trying to make is questionable, in the file is one pendant object that was the union of all parts, as well as a pendant in parts.
In case you want the faces that are cut in the body to be rather outside, just select all the vertices in the inner part of the body from the side-view and move them along the "Z" axis up. Would have liked to clean it up more, hope this helps you.

Btw. i was missing those bells, could not find them in the file.


How to apply the multiply effect strip on more than 2 video clips? I have 3 identical movie clips stacked upon each other. Each one is slightly shifted to the last. Now, I want to combine all three clips using an effect like the multiply effect, so that one can see the all three clips at once, just like the overexposition effect in old cinema movies.

I know how to do it with only 2 clips, one select the first, then the second clip, and then one goes to add -> effect -> multiply.

How does it work with more than 2 ?

There are several ways to do what you want.
The first option is not to use an effect strip at all an just set the blend mode of the two top strips to multiply..

If you must use an effect strip then select the two strips at the bottom, add the effect strip, and then select the effect strip and the top strip and add a new effect strip

A third way is to add the effect to the two top strips and then create a meta-strip, and then add a new effect to the bottom layer and the meta-strip.

From the Wiki

A Meta Strip is a strip which contain several strips. It's like a Group of strips, working the similar way as Nodes groups. It allows you to reduce significantly the (vertical) space used in the sequencer, and treat multiple strips as if it was one strip. You can move, resize, and edit properties exactly the same way strips are. (see Editing and deleting strips page for more informations.)
You can edit the content of a Meta Strip by pressing ⇆ Tab; It will unwrap the content temporarily and hide any other strips present on the workspace, allowing you to select, move and resize the contained strips, or edit their properties. Press ⇆ Tab again to re-wrap the strips into one Meta Strip.


Export animated .egg I'm making a game using Panda3D, and I need to use animated models. I can't figure out how to export an animated .egg file. Can someone help? (I'm using Blender 2.79)

There is no built in exporter for the .egg format, you need to install a third-party add-on. It seems that for 2.5x - 2.7x you can use YABEE which is recommended in the Panda3D manual. For newer versions of Blender it seems that glTF is another option, although it seems that a plug-in for Panda3D's is needed to import the format according to this post on Panda3D's discourse.


how to configure facility wide configuration files We'd like to integrate Blender into our pipeline. With other software packages, we usually have cascading configurations:

facility (eg configuring temp folders and common plugins)
project (eg project specific settings and plugins)
user (eg user specific shortcuts and plugins)

Usually that's done by appending paths to an environment variable. In the example of Nuke, this would be something like follow:

NUKE_PATH="//path/to/user/config://path/to/project/config://path/to/facility/config"

Where Nuke would then search through from right to left and execute/load anything in those folders.

How would one achieve this for Blender? I've seen this page which makes it sound like you can only define 2 explicit paths (user and system) but no cascading paths. Is that true? It also seems like the system path is only used for '/datafiles/' and '/scripts/', but not for '/config/'?

So how would one achieve a facility wide base userprefs file, that sets the file paths, some settings (eg 'load UI': false), some UI layouts and some plugins? And is it possible to have this then extended by a project configuration which adds or overwrites the facility settings?

Any help or advice is much appreciated!

You can do such a multi-leveled setup using scripting and automatically run script on each startup. Just in scripting panel you can create a new text block, name it with 'auto-config.py' (the extension have to be py), and in that script check whether or not proper blend files, addons, and custom presets are accessible.

In order to run the script with each Blender start, you have to mark 'register' checkbox in Text Editor. Then, save your blender startup file with this script. Next time, when Blender will be run, it will automatically run the script too, and what this script will do depends entirely on you. So, you can open any text files with custom configurations, import data from blend files and so on, using your multi-level path configuration or even cascading blender files setups. This will require some further coding.


How to make the pop-up box in the bottom left of the 3D viewport appear immediately when activating a Transform tool? So many times I want to use the options in the bot left panel (Operator panel) when using a transform tool
but it doesnt pop up unless I use the tool even tho i have it selected....
This is a problem because I want for example for Inset tool to check Individual faces
but I cant unless I go and do it first....
Also cant use the transform and then Ctrl Z because the moment I undo it also goes away
This is just one of many examples, but how can I get the box to pop up when I enter the tool rather than just when i use it?

You cannot. The box is called the Operator Adjustment panel, aka the tweak-that-operation panel.
The fact that you want to do this makes me think you need to know that the tools themselves can be accessed without the gizmos, and will act on all selected faces generally.
Edit: gizmos are pretty much anything that shows in the 3D view that is not an object, particularly as a control.


My hair particle are pointing upwards and downwards, how do I make it point only upwards? I am trying to add sprinkles to my doughnut, but I cannot get my hair particles to face upwards alone, Mine faces both upwards and downwards.

I would greatly appreciate it if someone who knows how to fix this can explain how it is done.

If I understand your question properly, this is what you are trying to achieve. If yes then follow these steps:

Select the top faces and assign them to a vertex
group like this:

Then in the particles tab go to vertex group > density option > select the vertex you made (default in the name of group)


Other possible expressions like #frame I have learned a few minutes ago that you can type # into a numbutton to create a driver. So far the only value I know is frame. While this works nicely, it's still a bit limiting. What are the other possibilities I can input to create a driver on the fly which is a great feature btw?

frame is currently the only updated value in the driver namespace. The rest are functions, available for use in scripted expression driver through bpy.app.driver_namespace.

Several modules are already pre-imported to the driver namespace, like builtins, bpy, math, and mathutils.noise. So, other than frame, and unlike manually-registered functions, functions from these modules are available to scripted expression by default.


How to pin a cloth in blender game engine Take for example a flag, the cloth is pinned to a pole. I want to do the same thing in the blender game engine.

Cloth is not supported in the BGE.

You can use the Physics Type Softbody.

You can pin the softbody with rigid body constraints.


UV Unwrapped Blender texture image is either rotated or stretched, cannot get it to be straight and not stretched I am completely new to Blender. I am making a photo frame in Blender 2.65, and I used a plane to be the 'photo' in the frame, and added a texture to it using a real photo. When I did this directly using materials, it was fine and even rendered (I saw some tutorials say that until you UV unwrap it, the material will not show). After I UV Unwrapped it, some problems occurred. I am using Cycles render.

If I select the object and go to edit mode, then press U, and either use the default unwrap or select 'reset', the UV Map is the same size as the image itself. However, the plane I used is not the same proportion as the image (I did this on purpose, printed photos are usually cropped because camera sensors aspect ratio is different to paper aspect ratio). This means that the projected texture is stretched, as in this screenshot.

If I don't want the stretch, using the above method, I can select "unwrap" (first option). The images have the correct proportion but are rotated, as in this screenshot:

If I then manually rotate my plane in object mode so the, I have to resize it, because the frame is supposed to be in landscape orientation. After I resize the plane, the projected image/texture is stretched once again.

I've tried all the unwrap options including the project from view bounds, nothing works.

I used the photo of the spheres as it is easier to see the stretched result. The photo is square but my goal is to get the frame to work like in the real world when paper and camera sensors have different aspect ratios: either the photo has to be cropped to fill the frame, or there are borders around the photo if you don't want cropping at all. So ultimately, I'd like to be able to use any image as a texture for the plane, and have the plane render the image in the plane's aspect ratio, not the image's aspect ratio.

You can see the file here.
I'd also appreciate it if someone can add 'stretched' and 'rotated' textures as a tag for me.

You still don't have a plane there (from the problem of your last question). At the top you can see, there are 8 vertices and 5 faces.

delete the vertices that are only connected to the side walls of your cube. then normal unwrapping works just fine.


How to get screen color under mouse cursor? I'm trying to figure out how to get the color of the screen pixel under the mouse with python like in this video:

Python-scripted color picker

I tried importing bgl and adding bgl.glReadPixels in to the SimpleMouseOperator sample to print out both cursor coordinates and color value but even after reading a ton of docs I'm having trouble figuring out how to use the bgl operators.

    x = bpy.props.IntProperty()
    y = bpy.props.IntProperty()

    def execute(self, context):
        # rather than printing, use the report function,
        # this way the message appears in the header,
        buff = bgl.Buffer(bgl.GL_FLOAT, 4)
        bgl.glReadPixels(self.x, self.y, 1, 1, bgl.GL_RGB, bgl.GL_FLOAT, buff)
        self.report({'INFO'}, "Mouse coords are %d %d." % (self.x, self.y))
        print (buff[0])

Can anyone help point me in the right direction? Thanks.

here an example about how you can use the glReadPixels  + mouse events;

I did some changes to code from https://blenderartists.org/forum/showthread.php?362427-3D-coordinates-of-the-mouse

import bpy
import bgl
from bpy_extras import view3d_utils
import mathutils

"""Functions for the mouse_coords_to_3D_view"""
def get_viewport():
    view = bgl.Buffer(bgl.GL_INT, 4)
    bgl.glGetIntegerv(bgl.GL_VIEWPORT, view)
    return view

def get_modelview_matrix():
    model_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])
    bgl.glGetDoublev(bgl.GL_MODELVIEW_MATRIX, model_matrix)
    return model_matrix

def get_projection_matrix():
    proj_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])
    bgl.glGetDoublev(bgl.GL_PROJECTION_MATRIX, proj_matrix)
    return proj_matrix

"""Function mouse_coords_to_3D_view"""
def mouse_coords_to_3D_view(x, y):
    depth = bgl.Buffer(bgl.GL_FLOAT, [0.0])
    bgl.glReadPixels(x, y, 1, 1, bgl.GL_DEPTH_COMPONENT, bgl.GL_FLOAT, depth)
    #if (depth[0] != 1.0):
    world_x = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    world_y = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    world_z = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    view1 = get_viewport()
    model = get_modelview_matrix()
    proj = get_projection_matrix ()
    bgl.gluUnProject(x, y, depth[0],
                     model, proj,
                     view1,
                     world_x, world_y, world_z)
    return world_x[0], world_y[0], world_z[0]

"""drawing point OpenGL in mouse_coords_to_3D_view"""
def draw_callback_px(self, context):
    # mouse coordinates relative to 3d view
    x, y= self.mouse_path

    # mouse coordinates relative to Blender interface
    view = get_viewport()
    gmx = view[0] + x
    gmy = view[1] + y

    #c= bgl.Buffer(bgl.GL_UNSIGNED_BYTE, [3,1])
    #bgl.glReadPixels(x, y, 1, 1, bgl.GL_RGB, bgl.GL_FLOAT, c)
    #c= bgl.Buffer(bgl.GL_SHORT, [3,1])
    c = bgl.Buffer(bgl.GL_FLOAT, [3,1])
    bgl.glReadPixels(gmx, gmy,1,1,bgl.GL_RGB,bgl.GL_FLOAT,c);

    draw_square_follow_cursor(c, gmx, gmy)
    draw_corner_square(c)
    draw_square(c)

def draw_square_follow_cursor(c, gmx, gmy):

    # draw 3d mouse OpenGL point in the 3D View
    dist= 50 #distancia del punto al cursor
    mouse3d = mouse_coords_to_3D_view(gmx+dist, gmy+dist)
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glPointSize(30)
    bgl.glBegin(bgl.GL_POINTS)
    #bgl.glVertex3f(*(mouse3d))
    bgl.glVertex3f(mouse3d[0], mouse3d[1], mouse3d[2])
    #bgl.glVertex2f(gmx,gmy)
    bgl.glEnd()

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

def draw_corner_square(c):
    for area in bpy.context.screen.areas:
        if area.type=='VIEW_3D':
            X= area.x
            Y= area.y
    dist= 100 #distancia del punto al cursor
    mouse3d = mouse_coords_to_3D_view(X+dist,Y+dist)
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glPointSize(30)
    bgl.glBegin(bgl.GL_POINTS)
    bgl.glVertex3f(mouse3d[0], mouse3d[1], mouse3d[2])
    bgl.glEnd()

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

def draw_square(c):
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glBegin(bgl.GL_POLYGON)
    bgl.glVertex2f(-0.5, -0.5)
    bgl.glVertex2f(-0.5, 0.5)
    bgl.glVertex2f(0.5, 0.5)
    bgl.glVertex2f(0.5, -0.5)
    bgl.glEnd( )

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

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

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

        if event.type == 'MOUSEMOVE':
            self.mouse_path = (event.mouse_region_x, event.mouse_region_y)

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            context.area.header_text_set()
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            context.area.header_text_set()
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        # the arguments we pass the the callback
        args = (self, context)
        # Add the region OpenGL drawing callback
        # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
        self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')
        self.mouse_path = []
        #self.wx = bpy.context.window.width
        #self.wy = bpy.context.window.height
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

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

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

if __name__ == "__main__":
    register()

some example


How can I export and store light curves? It is easy do color correction/grading (Add -> Effect Strip -> Adjustment Layer, then Modifiers -> Add Strip Modifier -> Curves). This can be used for instance to give a "sunset look" to an amateur video that had a blueish look.

Once I have created some color curves, how can I export them so that they can be imported and re-used in different projects?

I would encourage you to start with the CDL node, as it is easy to replicate and generate looks that can be loaded with OpenColorIO.

If you are using a complex node chain to modify an image, you can reuse your crafted looks. It will require a bit of learning and patience. If you wish to dive into this subject, feel free to wade through this longwinded post written by an idiot. Also note, Blender's curves (and the entire UI) isn't colour managed by and as a result it is not likely responding the way that one might believe it is.

This post over at Blender Artists is quite useful as well.


Understand color of Diffuse Direct/Indirect pass in Cycles render The Blender manual page says about Diffuse direct and indirect as follows:

Diffuse Direct

  Direct lighting from diffuse BSDFs. We define direct lighting as coming from lamps, emitting surfaces, the background, or ambient occlusion after a single reflection or transmission off a surface. BSDF color is not included in this pass.

Diffuse Indirect

  Indirect lighting from diffuse BSDFs. We define indirect lighting as coming from lamps, emitting surfaces or the background after more than one reflection or transmission off a surface. BSDF color is not included in this pass.

What I expect from lighting passes is a gray-scale image, or RGB image with color reflects the light source's color. However, the Diffuse direct/indirect images made by Cycles gives weird colors and I cannot explain it.

I'll try to explain. Here is an example.
We have an orange ball on the gray plane, lit from the side.

What contains the Diffuse Direct pass? A reflection of light coming from the lamp on the side. As you can see, the layer does not contain information about that the ball is orange.

To get the orange color you need to multiply Diffuse Direct and Diffuse Color.

What contains the Diffuse Indirect pass? light reflected from the ball becomes orange and this light illuminates the plane. And the plane reflects light almost unchanged, so the ball looks white:

Finally, connect all layers together

You can see, gray plane have orange reflect from sphere. This reflection goes from indirect pass.

So if Diffuse Direct and Diffuse Indirect are just gray-scale images, where were no color reflexes in scene


How to make a charachter and/or car move on button press i would like to know how to get a object to move when you press a key, such as getting a car to move when the up arrow is pressed. I am relatively new to blender, but i hope to get into the animation/ game engine side of things soon.

change your editor type to logic editor,and here is your logic bricks


How to get rid of unnatural green glare from grass? In a blender cycles project I am working on, I made a scene that includes grass, and it all renders fine, but there is a rather serious green tint in the shadows under the deck. The lighting is a flattened sphere with the normals turned inward and a sky texture node applied to it. The grass has a simple dark-green hair texture node. Farther out, I have a flat plane that is also green, with a noise texture and color ramp to generate a sort of clumpy grass look.

I definitely don't think I would see a green tint in real life, but I don't think a camera would have it either. I thought it was kind of interesting that it had such a sunrise/early morning feel to it when the sky texture has the sun straight overhead.

Light Sphere nodes:

Sky Texture - Preetham, Turbidity 2.2, Vector from Texture Coordinate: Object Vector
Emission texture - Strength: 1, Color from Sky texture

Grass nodes:

Hair BSDF - Color: Dark green, both roughness set to 1.0.

Grass plane nodes:

Diffuse BSDF - Color: varied dark green, roughness: .358

Limit light bounces

The green colour comes from the light that bounces on the grass and the grass planes. As no direct light hits that surface, it is been colored by the indirect light only (which in your case is green). Because the walls are almost white, the effect is even stronger.

This is a physically based behaviour. You can get more information by searching about "Color Bleeding".

Notice how the faces of the cubes inside the cornell box that don't get direct light gain the tint of the wall they are facing.

Try to enable diffuse direct&indirect render passes and examine them and dedermine where the green comes from.

Anyway you can get rid of that by for example limiting the number of light bounces of the plane material:

The ray depth node will assign an empty shader to the material if it has done more than 0 bounces (direct light).

You could also work on the light path bounces in the render tab, but using the material nodes will give you full control on the single material, while preserving physically based behaviour of others.

If you don't want to leave the physically based way, I would suggest to lower the saturation and the value of your grass plane and maybe make it less green, more brownish, as it would be in a real world. This is probably the real cause it looks so unnatural.


How to align vertices to another vertex per axis? I would like to align vertices to another vertex per axis. I know of scaling reset for all selected per sz0. However the alignment depends on other switches like proportional editing and so on which leads to lot of confusion. In Object Mode there is the nice align Object->Transform->Align Objects, I wish this for Edit Mode as well.

You can do this by setting the Pivot Point to Active Element, then selecting the vertex you want all other verts to align to, last (the active vert has a brighter color).

Change the pivot through the 3D view window's header at the bottom:

Then you can scale in each axis to 0, and all selected vertices will align to the active vertex.


How can you turn 2D faces into a 3D object? This is the video I have been watching. Blender Sword Modeling

I cant figure out how the guy make the sword actually 3D, or to appear to have mass.

At 4:30 in the video he selects all the interior faces, with circle select C. Then moves them along the X axis, G X, that gives the object thickness.
Having left the outer faces unselected, it creates a bevel which when combined with the mirror modifier he adds later will make the whole object.


How to Draw Waveform Automatically I'm doing some video editing in Blender, and every time I drop a clip in to edit, I always find myself selecting the audio and then telling Blender to draw the waveform using Adjust → Sound → Display Waveform:

Is there a setting where I can make it automatically draw the waveforms for all audio clips that are pulled into the VSE?

When you have one or multiple Sound strips you can check Draw Waveform in the Strips Sound Properties (on the right, open VSE's Properties Panel pressing the N key) per Strip.

When you want to set the behaviour for all Strips you can do so since the work on the gooseberry branch. They introduced this Feature there directly in the VSE's Menu Bar, but later implemented it in the Master Branch into the View menu with an own submenu Waveform Drawing where you can switch between two global options for turning Waveforms On or Off for all strips or let each strip determine on it's on property as described above whether or not to display its Waveform via Use Strip Option.
(You can script this if needed)


Are there cases whereby auto weights won't work "no matter what"? I have a 70,000 poly mesh of a winged creature that i've rigged up as best i can (intermediate artist here). I don't get it. I've triple checked everything - having made sure the mesh is 'closed' (no holes), removed all double verts, cleared the scale and rotation values to zero (mesh at perfect center facing the front), left and right sides are symmetrical, bones point in the correct axis direction (as far as i can tell anyway), naming syntax is all correct, etc, and my armature still won't bind to the mesh after applying automatic weights. I've tried Rigify, the Auto Rig Pro addon, and have manually created my own armature  and still no joy (haven't tried BlenRig, but why should it be any diff). So, my question is: Are there cases whereby automatic weights (ctrl+p) won't work no matter what you do, if for example, the poly count is say over 50 - 70k?  If the mesh is fairly complex (a non-typical biped with dragon wings), will the auto weight procedure fail even if everything is 'in order'? And if this is the case, what do you do when the bind fails? ..skin everything manually?? That would take forever, seeing that blender doesn't have mirroring when you weight paint. I think Maya has mirrored weight painting so that would no doubt save some time, but who wants to go there, right?!  Thanks for whatever info you can offer on this!! (i've attached a screen grab of the bones & front view and will upload the .blend file if needed, but it's info on 'what' i need to do (procedure) at this point more than on 'how' i need to do it. I'm using v2.79). Thanks again..

Tim
Here's the blend file link:

There is non manifold mesh in your model. Go to edit mode, make sure you are in vertex select mode, deselect all, from the menu select->select all by trait->non manifold (shift-ctrl-alt-m). There's a lot of geometry in the head, lips, teeth, nose etc. If the model is not going to have complex facial animation or speech, delete all that wasted geometry inside the head. The other areas you will have to just attack piece by piece. Having selected the non manifold mesh you can ctrl-numpad+ a couple of times to select the surrounding verts, ctrl-i to select inverse and 'h' to hide most of the mesh. This will clear the field for you to work on isolated parts.


Some parts of my project aren't saved in the .blend file I created a model and added some Actions in the DopeSheet editor (more or less 5).

I exported the model to my game engine, saved the .blend file (Ctrl-S) and closed it.

Then I opened it again, and all the actions were gone, it just had the one I was using last.

The same happens with some preferences (for example, I disabled mip-maps on User Preferences -> System, and I have to re-enable it every time I open the .blend file again.

Does somebody knows how to restore the Actions and save everything? Thanks.

Blender does not save unused datablocks you need to add a fake user to store datablocks that are not in use. See DataSystem Sections Users and Fake User

The setting of mip-maps is not stored in a .blend file you would need to save the user-preferences in the same dialog (button in the lower left corner).

Related:

What does "users" means in term of datablocks?


"Parent to" - confusing and misleading I've long thought that the expression "Parent to" is being used in an inverse manner.

If I "Parent A to B" I make A the parent to B and B the child of A, but I often hear the expression being used to describe the opposite relationship.

Am I the only one being confused about this?

Here's an example @ 3:30 in an otherwise excellent video:
https://youtu.be/xdPMziIHFlU?t=209

Can we agree that he's really making the foot the parent and the head the child?

Given the fact that there are more than seven billion people out there, it approaches certainty that many might share a similar view, even among the Blender community right now.

Personally I never saw this as a two way street until you brought it up. I have never seen the word used in that particular manner outside 3D. Turn B into A's parent would be more obvious, I agree.

It all comes down to definitions and associations. You try to give the verb a universally applicable meaning. And Blender's use of the verb collides a  bit with previous uses of the word.

In Blender, parenting A to B should always mean: B is the parent, A is the child.

Just substitute 'parenting' with 'glueing'. Glue A to B. It's at least tempting to assume that B is somehow bigger, even if it's a bit biased.


How to use multiple particle types in a particle system? I created a particle system, duplicating a red sphere. However I want to also have yellow and orange spheres (already have them in another layer) in the same particle system. So I want to know how to use this particle system that I've created to show all three kinds of geometry/objects.

You will first need to select the objects you want to use, and press Ctrl+G to create a group.

Then use the Groups setting under Particle Systems > Render.

First, select the Group render type:

Then select the group you want to use:


Showing object axis in Blender 2.8 I'm trying to follow along a YouTube video that deals with axis in Blender.
The author in the video uses Blender 2.6, while I'm using Blender 2.8.

In Blender 2.8, I would like to show the object's axis. I have drawn a green arrow towards it:

However, I don't see such an object in axis.

How could I show it?

Thank you!

You can do one of two things:

You can select the 'Move' tool in the toolbar (T) or press Shift+Space> G:

If you would like the gizmo to appear regardless of the tool you have selected, click the 'Viewport Gizmos' button in the 3D View header, enable gizmos for active object by enabling the 'Active Object' option and then enable the 'Move', 'Rotate' or 'Scale' options:

Note: Both these options require the object to be selected for the gizmo to appear. If no gizmos are appearing, make sure gizmos are enabled by clicking the 'Show Gizmos' button:


How to make a wireframe render? I am selling my model in turbosquid. They told me that you must publish a wireframe render of the scene. But the best I could do was to switch from solid view to wireframe mode and take a screen shot of the viewport and crop it. It would be loads better if I could project the wireframe over my mesh (like in edit mode). In maya there is a wireframe overlay option in viewport. Is there a way to do in Blender?
This is an example image of how I want it:

You can take a good, proper snapshot of your viewport using "Viewport Render Image"

Alternatively, you can add a wireframe modifier, with the thickness set rather low, and uncheck "replace original". You must also set the "Material Offset" to 1. Then, give your mesh 2 different materials - one to represent the wireframe, and another for the base mesh. This is what it looks like in rendered preview - it can then be rendered as normal:

The last option, if you have lots of objects, and don't want to have to manually add a wireframe modifier and materials to each of them, is to use the cavity overlay. This doesn't have as strong a wireframe effect as the modifier, but it is still visible. You may or may not want to strengthen the effect with a matcap.
This effect looks best in solid preview mode (not rendered), so if you're going this route, capture the image with the viewport render option I listed above.


Rotate HDRI image only? Is it possible to rotate an HDRI background without rotating the lighting it gives off? I know that you can go into shading, world, and then add a mapping node and that rotates it, but that also rotates the light, I wanna keep the light in the same place but rotate the background. Is there any way to do this? Thanks!

This is possible in EEVEE and Cycles without compositing by using the Light Path Node>is Camera Ray output.
A node setup like below will allow you to do just what you are asking:

This produces the following result in the EEVEE viewport:

Notice that the background rotates, but the lighting does not.


How to extrude faces inward and outward sphere together I need Your help with extrusion. Can't figure out how to extrude something like window frames on a spheric surface and make them solid, while window surfaces must remain flat.
When I extrude faces along normals, then it solidifies my window surface as shown in the screenshot 2 below.
Basically, I want to extrude windows frames simultaneously inward sphere and outward sphere.
How can I achieve that?
Thank You!

Use "separate objects" when in edit mode and you have the window panes selected. Put them in a separate grouping. Then tab out of edit mode, use solidify on the frame, and not on the panes group.  Parent the panes to the frame for scale adjustments as "parent object" in object mode, select panes-object first, shift+click frame and apply parenting (right click or menu etc).  The panes will have the thin non-solidified thickness and the frame will still have a solidify you apply, adjust as required.


setting an objects origin to match its face normals [objects local pivot point has been reset to global, how can i change it back to local normals i.e coresponding with the objects faces?

Quite a few possible ways.. here's one:

Select a face of the object, whose normal you want to be Object Z, and in the Header > Transform Orientations dropdown, hit the little '+' to create a Custom Orientation from it.
In the Object Mode Header > Options menu, check 'Origins' (version 2.81+)
With the object (and therefore its axis) selected, Header > Object > Transform > Align to Transform Orientation, selecting the orientation you have just created, from the dropdown in the 'Adjust Last Operation' Panel.

(and don't forget to switch the 'Origins' option off again ;) )
You can actually create a Custom Orientation from any 3 vertices. Or determine Y down an edge, or from any 2 vertices. In both of those cases, though, you might be 180 degrees out; the selection is not ordered.


Select object and move the view simultaneously is there a way to select something (in edit/object, I'm interested to see if this is possible in either mode) from an area of my workspace and then zoom in/out and pan to a different area (off screen at the time of the selection) and place my selection there?
Thanks

Press N for Numbers panel, click the View tab, enable Camera to View:

Press Numpad 0 and adjust your view, or if you already have the correct view, press Ctrl + Alt + Numpad 0 to set camera to this view.
Now select the object, then the camera (so the camera is active). Ctrl + P, then O to parent the object to the camera.
Now by moving the view you also move the object:


New action button disabled I created a model of a knight in blender to use in a jMonkeyEngine game. I rigged it and used the timeline to make an animation.
Now I want to make another animation and I've heard I have to do that in the Action editor but when I go there the new action button is disabled. How do I create another animation for this model?

Make sure you are selecting an object/bone to be able to add action to it.


How to get a lighthouse to shine a lightbeam I was wondering how i can get my lighthouse to shine a clean and realistic beam.
I cant get my volume density low enough to get the desired result.
Do any of you know how to maybe get a volume emission to work like a gradient?
So that the light cone is less intense the further its away?

or can i add some invisible geometry that is in the way of the light but in all other respects transparent?
Light baking maybe?

Summin like this.
https://captainkimo.com/foggy-morning-jupiter-lighthouse-with-light-ray/
or dis.
https://twistedsifter.com/2013/07/pigeon-point-lighthouse/

It looks like this node setup works not too bad:

I've created a simple light ball for the light source, maybe you should add a bit of glow around as it's explained here: How do I make a luminescent gas cloud?
Now, for the beam, first, create a conic cylinder.
For the length gradient, mix an Emission node with a Transparent node, use a Gradient as factor, and a ColorRamp to control its intensity.
For the width gradient, mix the first Mix Shader with the Transparent node, use a Layer Weight as factor, and a ColorRamp to control its intensity.
To add a bit of noise you could mix the previous nodes with the Transparent node, with a Noise texture as a factor.


Inverting material assignment on mesh I am 3D modelling a museum for a game, and I wanted to give every painting a unique texture. On each painting there are 2 different materials: the frame and the painting. I selected each individual painting and assigned it a different painting material, leaving the frame material as the same.
However after changing every single painting material to an individual material, I realized that the parts of the mesh that the painting material and the frame material are assigned on were swapped (each is assigned to the other's). I can't do ctrl + l because all of the individual paintings are going to change. I really do not want to delete them all and then re-add them.
I tried in a duplicate of the project and I couldn't fully delete the 70 materials I made. Is there a way to change the assignment of each painting, while keeping them assigned to their different materials? I also added material utilities, and couldn't find a way, but there might be one.
Some screenshots:

Make sure you're in object mode, then try running this script from the text editor. Save beforehand just in case.
import bpy
for mesh in bpy.data.meshes:
    for poly in mesh.polygons:
        poly.material_index = 1 - poly.material_index


Textures don't show in 3d view after loading them into node via python. Blender 2.66 Textures don't shows in 3d view after loading them into node via python. I can see them in render mode, but not in edit. Also after selecting image texture node they show-up in 3d view, but I can't do that from script.
Script works with preloaded (with another script) images

import bpy
import os
import os.path
os.system('cls')

bpy.context.scene.render.engine = 'CYCLES'

tex_name_list = []
mat_names = []
for ob in bpy.data.objects:
   print(ob.name)
   for mat_slot in ob.material_slots:
      for mtex_slot in mat_slot.material.texture_slots:
         if mtex_slot:
            if hasattr(mtex_slot.texture , 'image'):
               mat_name = "{}".format(mtex_slot.name)
               for img in bpy.data.images:
                  #print(img.name)
                  mat = mat_slot.material
                  if img.name == (mat_name):
                     if not mat.use_nodes:
                        print("{} - {}".format(img.name, mat_name))
                        mat.use_nodes = True
                        tex_node = mat.node_tree.nodes.new('TEX_IMAGE')
                        mixShad_node = mat.node_tree.nodes.new('MIX_SHADER')
                        trns_node = mat.node_tree.nodes.new('BSDF_TRANSPARENT')
                        diff_node = mat.node_tree.nodes['Diffuse BSDF']
                        matOut_node = mat.node_tree.nodes['Material Output']
                        mat.node_tree.links.new(tex_node.outputs['Color'], diff_node.inputs['Color'])
                        mat.node_tree.links.new(tex_node.outputs['Alpha'], mixShad_node.inputs['Fac'])
                        mat.node_tree.links.new(diff_node.outputs['BSDF'], mixShad_node.inputs[2])
                        mat.node_tree.links.new(trns_node.outputs['BSDF'], mixShad_node.inputs['Shader'])
                        mat.node_tree.links.new(mixShad_node.outputs['Shader'], matOut_node.inputs['Surface'])
                        tex_node.image = img

Ok got it finally.
You need set active Image Texture node:

mat = bpy.data.materials['<Your material name>']
mat.node_tree.nodes.active = mat.node_tree.nodes.new('TEX_IMAGE')


Starring and messy edges when smoothing or using sub surf modifier I have a problem that when I apply a SubSurf modifier to my project, it has some starring and messy edges around the connection of my spheres. My goal is to have a string of "bubbles" which are smooth. I would also like to be able to rig them under one armature. The seams for UV unwrapping should be able to be placed where the spheres connect. I have used a Boolean modifier to merge the spheres. The problem I am having is that when I try to smooth out the spheres, starring occurs at the top and bottom of them. I have tried using loop cuts, the smooth option in the tools menu, and starting with a high-poly model, but none of that worked for me.

Here is an example of the starring:

Here is how the spheres should connect (Please ignore the starring and high-poly count):

And here is a download to what I would like to end up smoothing out: http://www.mediafire.com/file/e6xeb5i74ii2t79/BugZHugSave3.blend1

If you have questions, please ask.

You should avoid Boolean as much as possible. Often it doesn't give a good topology.

If you want to keep your object:

Go in Edit mode, select all and press ctrl N to make Normals Consistent.
Press ctrl W > Remove Doubles to delete all the vertices that are very close to each others. Play with the parameters on the bottom of the Tools panel (T to display).
In Object mode, increase the View Subdivisions of your Subsurf modifier and press Smooth in the T panel > Tools > Shading. You could get something not too ugly.

But you should redo your object this way:

Create a sphere, rotate it, cut its top.
Duplicate this sphere and rotate it 180°.
Merge the two spheres with the Snap tool enabled (horizontal bottom menu of the 3D view), Type of element > Vertex, and press the Automatically merge vertices option.
Scale down one of the sphere, add an edge loop to correct the topology.


Sinister particles rendering experience, Ubuntu 20.10 I don't know for sure if this happens too with blender 2.80 (My last experience), but I'm facing bad rendering problems on my laptop with my on-board card, Blender 2.92 - Intel HD Graphics. And that starts when I add hair particles on Suzanne (3D Mesh). It's really impossible to do anything:

As anyone can see, I simply added hair particle to object and didn't change anything. I don't think it's normal to add hair particle and get that in the end. There's probably not much I can do on this conditions.
It was supposed to look like this:

But I get in return this:

I know some Integrated cards are slower and offers less shader cores, but it fairs decently on some HD games. I face slower rendering speed with simple objects too. It's not I want to make high poly or very complex objects as game assets, but a remarkable quality is very desirable.

I have some ideas of what it could be. First off, What is the scale of your object? 4-meter hair seems long for an unscaled Suzanne. I'd try lowering that value first.


What is the best topology for this odd shape? The existing mesh works, but its a mess, not a mesh ;-)

Version 1: Low poly.

This is topology which is focused on small amount of polygons. Edge Flows aren't so good and using Proximity Loops will be pretty hard, but nevertheless both methods are working best with Bevel Modifier (Angle) + Subdivision Surface.

Topology:

Result:

Version 2: Edge Flow.

This method is focused on proper Edge Flows. You can use here Proximity Loops to sharpen edges but as stated in Version 1 it's better to use modifiers.

Here we need to use two ngons to stop inner loops before 'big circle'.

Topology:

Result:

How to make it.

I will not create whole step-by-step answer here as methods used was just Blender 101 modeling. I've started with outer Circle then created another one in the middle, scale it to have egg shape and from there it was just manual Extruding, Moving, Joining etc. I've also used two add-ons here: LoopTools > Space and F2 to speed up my work. They both are built in in Blender, you will just need to turn them on.

Notes.

My model is pretty uneven as I was modeling it 'by hand' with distorted reference image. If you have good .svg shape, you can import it and use it edges to snap vertices to them.

Blend file.

Here is my blend file. You can check different layers for both versions, also you will be able to see detailed values for modifier I've used.


Using / making text into a procedural shader material in nodes I know I can wrap text around a curve but is it possible to use / make text into a procedural shader material using nodes?

I would like to have the text as a procedural shader material to place it exactly where I want it on an object and this would allow me to mix it with another shader using nodes.

PS:  I'm using Blender 2.8

You can import an image with text on it (typically in black an white, acting as a mask in your node setup), but there is no way to write text in a procedural manner with nodes in Blender.


Add toggle hotkey to custom checkbox I have a self made checkbox in a script. Now I want to create a hotkey in the Input manager to toggle it.

What I have done so far is to create a keymap item with wm.context_toggle. But I cannot get the Context Attribute to work. I grab the one from my script, the Python term in the tooltip. Which is WindowManager.deselect_bool and with that I get an error that the "Object has no attribute WindowManager".

What is the proper Context Attribute term here? Is it even possible to do it this way? If not, what is the proper way to assign a toggle hotkey for my custom checkbox?

Script:

import bpy
from bpy.props import BoolProperty

class LayoutDemoPanel(bpy.types.Panel):
    bl_label = "Demo Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

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

        wm = context.window_manager # Our bool is in the windows_manager
        layout.prop(wm, "deselect_bool") # Our checkbox

def register():
    bpy.types.WindowManager.deselect_bool = bpy.props.BoolProperty(
    name="Checkbox", description="A checkbox", default = False)
    bpy.utils.register_module(__name__)

def unregister():
    del bpy.types.WindowManager.deselect_bool # Unregister our flag when unregister.
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

Here is an example based on this answer. Once it's registered you can press ShiftQ to toggle your BoolProperty. Also notice that  tagging the area for a redraw via context.area.tag_redraw() is requiered after the assignment call in oder to  update the Panel properly:

Once it's enabled (or registered) the shortcut is created automatically:

custom-toggle-shortcut.py

bl_info = {
    "name": "Add-on Template",
    "description": "",
    "author": "poor",
    "version": (0, 0, 1),
    "blender": (2, 70, 0),
    "location": "3D View > Tools",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

import bpy

# ------------------------------------------------------------------------
#    my properties
# ------------------------------------------------------------------------

class MySettings(bpy.types.PropertyGroup):

    my_bool = bpy.props.BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False
        )

# ------------------------------------------------------------------------
#    operators
# ------------------------------------------------------------------------

class ToggleOperator(bpy.types.Operator):
    bl_idname = "view3d.toggle_mybool"
    bl_label = "Toggle My Bool"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        context.scene.my_tool.my_bool = not context.scene.my_tool.my_bool
        context.area.tag_redraw()
        return {'FINISHED'}

# ------------------------------------------------------------------------
#    my tool in objectmode
# ------------------------------------------------------------------------

class OBJECT_PT_my_panel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    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.prop(mytool, "my_bool")

# ------------------------------------------------------------------------
#     register and unregister
# ------------------------------------------------------------------------

addon_keymaps = []

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=MySettings)

    # handle the keymap
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new(ToggleOperator.bl_idname, type='Q', value='PRESS', shift=True)
        addon_keymaps.append((km, kmi))

def unregister():

    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

Gist: https://gist.github.com/p2or/8a37617c4565e4ff143b736a0e4a1660

Alternatively using an update method

Rather than create a new operator use the wm.context_toggle operator, and set up an update method on the property that will redraw the area when run.  If the panel is in same area as key press then would only need update=prop_update

def prop_update(self, context):
    context.area.tag_redraw()
    return None

In example below area_ui_update('VIEW_3D') returns an update method  where if area.type == 'VIEW_3D' in screen.areas that area will redraw.  Useful when your panel is in an area other than context.area eg if your panel was in 'PROPERTIES' you would area_ui_update('PROPERTIES')

import bpy

def area_ui_update(type):
    ''' tag redraw on areas of type '''
    def ui_update(self, context):
        areas = [a for a in screen.areas if a.type == type]
        for a in areas:
            area.tag_redraw()
        return None
    return ui_update

class MySettings(bpy.types.PropertyGroup):

    my_bool = bpy.props.BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False,
        update=area_ui_update('VIEW_3D')
        )

# ------------------------------------------------------------------------
#    my tool in objectmode
# ------------------------------------------------------------------------

class OBJECT_PT_my_panel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    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.prop(mytool, "my_bool")

# ------------------------------------------------------------------------
# register and unregister
# ------------------------------------------------------------------------

addon_keymaps = []

# register
def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=MySettings)

    # handle the keymap
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new("wm.context_toggle", type='Q', value='PRESS', shift=True)
        kmi.properties.data_path = "scene.my_tool.my_bool"
        addon_keymaps.append((km, kmi))

# unregister
def unregister():

    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()


Multiple RGB values for a single black I am very new to blender and would like to understand the mistake I am doing with the color ramp node. I am currently using color ramp to assign different textures to each object in my scene. The complete surface should have the same RGB value. I then use this rendered image and filter out objects based on the pixel values. I have created a simple scene with 2 default cubes(pass index for the bottom cube in 0 and for the upper cube is 1) and added the color ramp settings as shown in the image. But, when I render with this settings, the RGB values on the surface are not uniform. Can someone please help me with this issue. I am using Blender 2.8.

If you over expose your render you can see patern.

Render saved as PNG 8-bit. Nothing is pluged into Surface socket of Material Output node. Tested with Eevee, Cycles, Samples ... all same result. Even if compression is set to zero.

The only difference did PNG saved as 16-bit. Completely black. So I guess OpenEXR will work as well. So the issue comes from output file format.

... and just for lovers of generic graphics - JPEG

And as mentioned already - Cryptomatte seems to me as a better friend, especially for material. With this ColorRamp 0/1 option I can't imagine to work on more complex object.


1 model for unity but 2 files in blender? I have an orb that I made in blender, and I want to make a floor underneath it. Should I make it in the same blender file as the orb, or should I make a new one so I will import both files into unity and put them together? I'm thinking about when I will texture the models. What will be the best method?

Im Speculating that the orb wont just lay there on the plane, but maby gets some animation or interactive behavior.

The Blender file format is treated as an Prefab in Unity. Editing it further, adding scripts, components, rearranging, etc or unpacking it breaks connection and therefore the benefit of quickly updating edits from blender to unity vanishes.

Therefore I'd suggest a seperate .blend file for the floor or even exporting the active selection as .obj or .fbx and overwriting the coresponding objects in the unity asstets folder manually if you want them in the same .blend scene for better refrence (animation, modeling, etc.)


Why is my displacement map virtually completely grey? I'm working on a displacement map to display details from a high-poly mesh on a low-poly mesh. However, when I bake my displacement map, it appears almost completely grey.

What's causing this? Is there a way to fix it?

You are trying to bake a Displacement Map, but looking in your file shows you have no displaced mesh. What you want to do is create a Height Map from existing geometry.
This is a solution if someone experiences the same problem but has a displaced mesh: Check if you have applied the Displace Modifier and set Level Viewport to 0 in the Multires Modifier before baking the displacement.


How do I add ambient occlusion or show shadows for the craters in my moon object? I really don't know how to use nodes so I'm wondering how to use ambient occlusion to show that there are craters on my moon while the moon has emissions on. I want to do this by having some shadows on the craters.
I am also wondering how I can use emissions as a light source because now I am using a sunlight source inside the moon for my background.

I guess there are several solution, but you could simply use the Input > Ambient Occlusion node as a factor between 2 Emission nodes. Use a ColorRamp between the AO and the Mix Shader if you ever need to tweak the contrasts:


exporting animated model to unity 5 totally deform the mesh I am trying to import a model in unity from blender. But using FBX is a total disaster, collada looks "better", at least I can recognize the arms and legs.
This is the link for the original blend file:
https://copy.com/DHMZ4ACjSoyYroAm

hopefully someone can give me a clue, thanks in advance.

I found I had better luck using the FBX 6.1 ASCII settings when exporting to Unity.  Are you animating using bones? I never had any luck importing shape key animations into Unity.

These are the settings I used and had the most success.


Grease pencil object is refusing visual effects I'm new to blender 2.92 and I've a book with cool tutorial series with quick-start guides for blender 2.80, and I've learned many things so far! But a problem arises when I try to apply an effect to suzanne object:

The glow effect is ignored.
As shown above, nothing happens and I did everything I could for hours... I applied all properties in sidebar, but they are being ignored...
I know that the lessons are meant for 2.80, I keep up updated with latest online manual docs.

You need to be in Rendered view to see Grease Pencil effects.


Merge UV vertex across islands? I used Transfer UV Maps and it generated a UV map that looks good for my mesh in the UV editor, but is actually 100s of small islands that placed together like a big jigsaw puzzle with overlapping/duplicate vertices, which I believe is causing a triangular artifacting in my texture.
I have attached screenshots to hopefully explain what I'm talking about better. When I do merge UVs by distance they will not merge across islands. So I'm at a loss of what I can do, any advice or help would be so so so much appreciated.

I can also put the entire .blender file up if that would be helpful?

Select all your UVs, hit W and choose Remove Doubles. You can set a threshold distance that should take care of the overlaps. Be careful though, if you have small islands, or large overlaps, it will merge the wrong vertices, so keep the distance as small as possible. Rather do a couple by hand than risking wrongfully merged UVs, because they might be a pain to spot and to fix.
EDIT:
Merging does not work, bc those UV vertices are not doubles. Each triangle seems to be rotated or flipped:

So adjacent vertices on the UV map are not (necessarily) adjacent in your mesh. I'm afraid that thing is busted beyond repair, meaning there was an issue importing the coordinates. Where did the model come from and wich format was it?


Can anyone help me by providing a sample python-script to modify the size of anyone feature in this Blender model 3D model of Humanoid I have a project deadline and I want to change the scaling of this humanoid model using a python script only, I want to select the specific bones of the "metarig" object and increase or decrease its scaling by setting values in the script for its length or width.
I am totally new to Blender that is why I am asking for a sample script, rest i shall modify the script for other bones in the rig, so if anyone can write a script and show me  how we can select and modify scaling for one bone, that would be of great help.
You can find the blender object here,
https://free3d.com/3d-model/rigged-male-human-442626.html

As commented in your previous question (or dublicate), ManuelbastioniLAB  will probably suffice. You can change a lot of parameters in there, which you can also access via script.

To get information of how to access a certain parameter, just hover above it and press CTRL+C (if that doesn't work copy it by hand).

A short example of how you could change a parameter:

import bpy

def buttock_depth_Y(size):
    bpy.data.objects["f_ca01"].buttock_depth_Y = size
    bpy.ops.mbast.measures_apply()
    return

if __name__ == "__main__":
    buttock_depth_Y(9999)

To run the script either make a .py file with the code in it or do it in the scripting layout


Hair particles are not fitting my fractal ground I created an object composed of 6 different forms and I want it to simulate grasses and my plane that contains "mountains" and a generally altered surface (so its not a plane any more ^^).

When coming to add particles, my object does not fit the ground. If I use rotation and altered my Y axis object, I don’t have a pretty natural result, and nothing is sitting on my floor...

Set Random velocity to 0

As state by the Blender manual's page about the option:

  Gives the starting speed a random variation

Each object, having a different emission speed, is found at a different distance from the surface at the current frame (even if it is the staring one).


Random color on multiple multi-component objects obtained by applying an array modifier I have a shipping container made up of around 30 different meshes. I want 3200 containers stacked together, each with a single random colour of a selected gradient (red container, blue container, green container, etc).

Another post on the site suggests to "Separate as loose parts" after applying the array, but this assigns a random color to each SINGLE mesh component (observable in the monkey's eyes).

Is there a way to merge all objects into a single one, joining all intersecting external faces automagically? (Boolean modifier doesn't appear to be designed or smart enough to handle several complicated meshes)
Is there another way to apply random colors to array items without separating into loose parts?

Thank you!

I think that you shouldn't use an array.

Use a particle system instead. Create a mesh were the containers would be:

Then add a particle system, star on 1 and end on 1, choose volume as emit form and grid.

Now you will have this:

If your containers aren't square (probably) change the scale in object mode of the emmiter to be similar to the container ratio.

Change the physics to "No", render to "Object" choose the object (with the material of the link that you already visited) and change the size as you need:

Any other question, just ask.


Object doesn't render - layer conflict? The object on Layer 8 ("Planks") is not rendering, although it is totally visible in Viewport.

If I select all the layers together (the desired outcome), then hit Render, all the layers will render except this one. If I move the object to one of the other layers, it will still not render.

"Camera" is selected in "Ray visibility" of the Object panel.

When I go back and forth between objects to compare the Object panel of the problematic object with the others, I see no difference.

"Duplication" is not enabled in the Object panel.

In the Outliner, all three icons for display in Viewport, Select and Render are selected for the object.

I had the same problem a few months back, which was never really resolved because I couldn't share the file because of size issues (same here).

Here are the Render Layers settings - there doesn't seem to be a difference from one of the layer in the scene to another:

I tried to render with two different versions of Blender and found the same problem.

Maybe you already got it.. the problem is that your backwall has a solidify modifier which is only showing during render..if you dsiable it or move your planks a bit to the front it will work..
hope this helps..

What further confuses about this situation is that the Solidify modifier doesn't show in "Rendered Viewport" mode if the Eye isn't ticked in the modifier settings.


Is there a way to exclude an axis from the solidify effect? Lets say I have this object:

and I want to solidify it to 3d print it.

I would like to have a constant thickness on the XY plane.
I mean: I want that every 3d printed level has the same thickness.
If I use a Solidify modifier wiht a certain thickness (let's say 2.5mm) It works with the normal of every face, so it works also on z axis and the thickness is not always 2.5mm if measured on XY plane:

If I go to edit mode and extrude the faces I can't find a way to get what I want.

Is there a way to do it?
I don't need it to be with Solidify. It can be done with Displacement, Animation Nodes, Python or anything else. I just need to do it in a smart and quite fast way.

Thank you all in advance!

You can do it in two steps:

Extrude, but don't move E then RMB
Then push/pull using shiftZ to avoid z displacements

"Push/pull" is available in the tool bar (alternate from shrink/flatten) or via menu "mesh/transform/push pull".
Though, you'll have to tune the distance with the mouse as the operator panel does not allow to choose the concerned axis.


Can I color a curve in Cycles by the direction it's running? I'd like to colour a beveled curve in Cycles by its tangent (the tangent of the actual curve - not its beveled faces).

For example:

In this image, the curves running up/down are blue, and the left/right curves are green. Is this information accessible in Cycles?

This is totally possible with the Tangent node (Input > Tangent):

Change the type from Radial to UV Map and also enable Use UV for mapping in Curve's data tab:

The problem is we get black instead of Z-axis direction. That's easily fixable - add both green and red channels together and invert them into a blue channel. To also not care about the direction of axis we make the tangent vector values absolute:


Sometimes zooming with the mousewheel becomes very slow I don't know what causes it, but sometimes zooming with the mouse wheel in the 3D View becomes very very slow. When I create a new 3D View it's back at normal speed, restarting Blender doesn't help though.

What could cause this and how can I solve it?

The more you zoom in, the slower it becomes. This feature helps with precision zooming when very close to something.

Here's what you should do:

Instead of zooming in to something while you (the viewport camera) are very far from it, select that thing whether it is an object, vertex, edge, face, or whatever then press  Numpad . . This will take you closer to the object, then you can zoom in from there.

Always think of the viewport camera as an actual camera. When you want to take an image of something small, you don't stand very far from it and zoom in, but you get as close to it as possible then take the image.


UVs shown when faces of another material selected I have a problem with Blender where UV maps for both of my materials are always visible in the UV/Image editor screen no matter what is selected in the 3D View. My model has 2 materials with texture image assigned to each of them:

A screenshot where all faces of first material ('Main') is selected below:

As you can see UVs of both materials (this 'crazy network' is UV of second material) are shown while only faces of first material selected. The same issue appears when second material selected - the image is changed to correct but both UVs sets are shown. The issue seems to be fixed when 'Keep UV and edit mode mesh selection in sync' unchecked but is this behavior fine for UV/Image editor screen? If not how can I fix this and remove unnecessary UVs from material?

Thanks in advance.

Edit: I uploaded the .blend file here

The behaviour is normal.

Consider that in display textured mode you'll see the last selected texture in the UV/Image editor for the selected faces... so it may not be one of the material's texture. There's no correlation between the material texture and the textures shown in the textured mode of the 3d view, unless you keep it consciusly. So keep an eye on it...

I could not find two of you textures (Texture.png and Texture.png.001 are their names) so I have replaced them with my own creation: Untitled (all right reserved...!!!)

We have a single object with two material and two UVMap.

The second UVMap is "empty", ... well not really,.. let's say it not contains useful info as is collapsed. Remove it by selecting it and pressing the minus.

Now we have a single uv map, but as contain the info for both material, it shows them overlayed.

We can:

1) Select all the faces of one material (Edit mode, deselect all, material tab->Select) and hide them:

2) Duplicate the uvmap, rename, make active first UVmap, select first material faces, invert selection, make uv info related to these faces unobtrusive in the uv/image editor (move them away, or scale them to a 0 factor..). Than select second UVmap, second material faces....and repeat as above.

By selecting one of the UVMaps with one clock you are now able to see only the its relative UVinfo.

(Note: remember to update Image mapping coordinates in the material's texture, they must point to the correct UVMap)

In both methods you are not allowed to see the texture of the other material while UV editing one

3) Assuming that you have one map with UVs overlayed, you can:

Unselect all
Go to the material tab and select one material's face
Go to the UV/Image editor, select all visible
Set repeating coordinates
Shift your selection on the x-axis by the texturex with (in pixel)
Select all in the 3d view

Nothing should have changed, as the texture UV are repeated by default (if no clamp option by enabled), but now you can clearly see and edit both UV layouts

(Note: not shure what to do if the X size is different between textures..)

4) As suggested by gladys, split the objects in two and merge the parts only at the end is the fastest solution.


Images with Alpha look different when layered in compositor compared to Photoshop I'm struggling to get the same result in the Blender node editor when layering images with transparency, to the result I get when doing the same in Photoshop.
The Blender result is shinier/washed out compared to the result from Photoshop (see below).
The blend file can be found here:
https://drive.google.com/file/d/0B54MopLgZnccM2VnVWVTLUxlNUk/view?usp=sharing
I've played around with Premultiplied and Straight Alpha, tried 32 bit pngs, mix nodes and Alpha Over nodes, and pulling out my hair, but haven't been able to find the answer.

Thanks for any help!
Mark.

Photoshop has a non-linear reference space typically, and as such, all blends are wrong.

Blender's compositor on the other hand, uses a strictly linearized reference space, and alpha overs, assuming you are using associated alpha and the Alpha over node, are correct.

Nonlinear Over:

Linearized Over:


How to avoid flipped looking normals when baking them? So I ran into this the second time now. The normals on the model flip randomly despite the faces are facing outwards. In this case it happens at the uv seam of the model but other times it seemed completely random. What's causing this?

It all comes dow to marked seams? Or is there something else in the works which I don't understand?
Please help.

Use color space: Non-Color  for the normal map in the ImageTexture node, not sRGB. Classic mistake ;-)


Stripe along center of mirrored model? I have a stripe down the center of my model and I'm not sure why. I used mirror mod to create the vehicle and have tried reseting 3D cursor and moving the mesh in and out.

Here is the .Blend file

That line you see when you use the mirror modifier is there because the UV maps do not coincide with the image used as texture. If you look close the edges are right where the transparency starts or there is a different tone of yellow.
Move the edges of the UVs inside the solid color or add additional color to the image.

Also, you have a set of unnecessary faces at the seam of the mirror modifier. Get rid of them.


why the finger getting folded Im rigging a hand. Whats wrong with the rigging the finger are getting folded and mix with each other.

I tried weight paint also but did not work. Any suggestion or help. Thanks

The problem lies in a misalignment between the deforming bones and the mesh, so you will have to adapt them one to another (actually, it seems to me far more easy to modify the mesh than this complicated rig).


Can't zoom where I want in scene I'm new to Blender, so I'm stumbling around. Sometimes when I open a project, I can't zoom into what I want. I can zoom out... way outside the model (like an apartment), but when I zoom inside it, I can't zoom any further.

Sometimes I'm in the model and zooming as expected, moving around, and then I don't know if I do something wrong, but suddenly I can't zoom after rotating from some point. Sometimes it seems I zoom towards the outer perimeter of my model, and it won't go any further than that boundary... I can't zoom any further.

Sometimes, if I exit Blender and restart, then re-open the project, this behavior is reset and all is normal again. Sometimes not.

What am I likely screwing up? Thanks!

OK now that it was confirmed to fix the problem I'll make it a response.

Blender zoom works in such a way that the more you zoom in, the less each scroll zooms in (still haven't found a better way to explain it). selecting the object you want to focus on and pressing "." on the numpad recenters the object in the view and resets the zoom so that it's much easier to navigate around your object.


Add objects to center of mesh faces using particles Using Blender 2.79: I have a UV Sphere and would like to add objects to the center of the faces.

Following this post it was not a problem to achieve this. But now I want only parts (rings) to be stocked with a specific object and other parts (rings) with other objects. I tried to use vertex groups for that.

The problems I am facing:

I do not find a way to add objects to just 1 ring of faces.

My approach: If I want 2 or 3 rings coherently I highlight them (faces), apply them to a vertex group and then add a weight of 0 to the outermost edges. This does not work if I only want 1 ring. The objects will be distributed over 2 rings (above and underneath the vertex group edge). I also tried to add single particles to the desired faces in particle edit mode which worked fine but then they where not centered.

I suppose the way I organize my vertex groups is not correct? Would you even use particles for that or recommend another approach?

Anyone? :-)

Consider

Technique 01

Duplicate a ring mesh by itself with a particle system. Then move the ring to be coincident with the original sphere.  One sphere object for shape.  One ring object for particles.
For the duplicate ring, do not render emitter.  The particles remain.  Ensure the Particles per faces setting is value 1.  Set the value of number of particles.

Technique 02

See Duplication on faces.

Above the deleted faces of duplicator.

Above rendered image smoothed and using subdivision surface modifier.

Link

Tapering a tentacle mesh with uniformly scaled suction discs

If your particles are static you might even use the Array Modifier.


Moving object removes fluid while using the FLIP Fluid add on I have a ball that moves through an inverted obstacle (it has the shape of the letter 'P'). When the ball moves through the liquid, it doesn't seem to move and push the liquid, but it appears to remove it. As a result, when the liquid comes to rest, the amount of liquid is obviously way less.

The balls movement is done using keyframes on its position. The liquid is there from the start of the scene using a Fluid object. So part of my inverted object is filled with liquid. There are no inflows or outflows in the scene.
Is there a setting I have turned the wrong way or is there another reason why this behaviour is happening?
My current settings are
Blender frame rate: 24
FLIP Fluid frame rate: 24
Resolution: 200
Min and max substeps: 1 and 24
Enable Adaptive Time Stepping for Objects: on
Fluid settings: all default
Ball object settings - Export Animated Mesh: on

I have run the simulation with a min substeps amount of 6, but that didn't change anything.

This issue is caused a bug in FLIP Fluids addon versions 1.0.7 or lower that can result in regular obstacles not interacting properly with the liquid if there is an inverted obstacle present in the scene. This issue has been fixed and this fix is included in FLIP Fluids version 1.0.8 or later. This version is available on the Blender Market, in our Free Trial, and on our GitHub project page.


How to bake normal map identical to one from cycles? In my project I have normal map defined by nodes in Cycles which I use to render my scene -- here are relevant nodes:

Image texture is a seamless square normal map image.

Later I also decided to bake normal map with Blender Internal. I would like the baked normal map to be identical to one generated in Cycles. What would be settings in BI for that?

To align normal maps to match GLSL I use Photoshop.  By using the Channel Mixer tool you can swap axis.  Swapping Green and Blue is the same as swapping the Y-Axis and the Z-Axis.  Then you can also use the Curves tool to change the direction of an axis which is the same as multiplying the value by -1.0.
I've attached a picture that shows a PS Action.
For your situation specifically, I'm not sure which combination of operations that you require but you can grab yourself a copy of xNormal to help with this.  In the Normal Baking window there is the option to perform all this swapping with a simple GUI.  You can try what you think will work and then bake the normal map to see if it looks the same as what you need.  Once you know this, you can use either GIMP or PS to do the conversion after you've baked a map in Blender.


Blend mode to achieve "Glow" effect with texture painting from Image Editor (No Compositor) I frequently have to create the below Glow effect on objects .Setting up separate render layers with an emission node is  overkill for such a simple effect.
In painting applications like photoshop this is simply applying a blend filter like Colordodge ,Screen or Multiply to the brush .But on trying these same blend modes on Blender texture paint brushes,the glow effect is  not achieved. Is there a proper setup to achieve this effect in Blender?

That result you show is not from a simple blend mode in photoshop, that is from a specific set of steps to render that effect.
To replicate, it is the same process first that you have in photoshop when painting into an image or layer of 0 alpha - you have to first paint pixels into the image/layer to be able to have affect them with subsequent blend mode actions. Paint your shape first with your brush set to Mix mode, and if need be use a low strength brush. Set your blend mode to Add and turn on pressure sensitivity, then paint carefully at center with your brush radius encompassing all of your available pixels. Reduce radius and repeat in center of the shape. Soft Light blend mode can also help a little, depending on what color you use to react to the original pixels. Don't forget to also see if using the Blur or Smear tools can help here as well depending on your desired output.
Main take away you need to understand is that you can't make pixels 'glow' if they aren't pixels of solid color yet. Photoshop and all other image editors like Blender also work this way with painting tools.


Jagged and wrong looking shadow on hair particles The shadow on my smooth shaded sphere with hair particles just looks wrong:

Blender scene with wrong shadow

I use Blender version 2.69, normals are turned outside and there are no doubled vertices. Without hairs the shading is ok.

Thanks for help and suggestion to improve the look.

EDIT: To make the ball look more realistic I further changed the following things:

I made 2 particles - one with "Render -> Strand render" (makes hair really light) and one with "Render -> no Strand render" and less children hair (gives a dark accents to the other particle setting).

I also made a new material for both particles (for more natural looking):

Material -> Diffuse -> Ramp from yellow to transparent
Material -> Strand  -> Root 0.25 (for thin root)
Material -> Strand  -> Tip 0.25 (for thin tip)

Patricles Settings for both particles:

Patricles -> Velocity -> Normals 0.03 (longer hair)
Patricles -> Render   -> Random 0.05 (Shadow really get smoother)
Patricles -> Children -> Render 50 or 300 (less children
also helped to smooth shadow)
Patricles -> Children -> Length 0.7
Patricles -> Children -> Random 0.05 (looks more furry)
Patricles -> Children -> Size 0.01

The jagged shadows arent visible now. Probably the particles aren’t meant to be used with few short hairs where you can see the shadow through.

@Leon Cheung is almost right.

The hairs are coming out exactly parallel to the normal. Because all the hairs on each face are pointing exactly the same direction, the shading on the hairs is going to change sharply at the edge of each face, even though you're using smooth shading.

One way to solve this "problem" is tweaking the Random value on the children. This will prevent the hairs on one face from all pointing exactly the same direction. Another thing you can tweak is the random rotation. Just add a very small amount of randomness, and this will also keep them from all facing the same direction.

These solutions should work without having to make your hairs longer.


How to UV Smart-Unwrap Properly? I am lazy. I select my mesh, U -> Smart Unwrap -> Ok. And I would go on and texture it with SubstancePainter or Photoshop. I only create low Poly stuff and this has worked perfectly sofar. Everything is in correct angle and proportion:

More and more often I get resulst like these, even though I have "Correct Aspect" checked. This makes it impossible to work with:

Tweaking values doesn't fix anything. The Unwrapped Mesh is in inappropriate proportions and it stays this way. It's actually FASTER to redo the entire model and unwrap it again than to complicately mark seams and fiddle with the Mesh in the UV-Editor. Unless of course it comes out bugged again, but sofar that was never the case. The model is pretty much equal, the result is totally out of whack.

WHY???

What is happening here behind the curtains that I don't see/understand?

I have found a Solution. This is not really an answer as to why it is happening but it's too long to put into a comment and at least it fixes the problem.

Go into Edit Mode
Press P (for Seperate) and select By Loose Parts
Create a Cube somewhere in the scene
Select all the loose parts of your model and then the cube so the
cube is the active object and press Ctrl+J (for join)
Go back into Edit mode and delete the Cube, unwrap: done.

This is the same procedure by the way that I frequently use to set the rotation and scale of an object to 1.


How do I scale a rigged character without making it move randomly? I've been trying to scale a rigged character. I applied a new animation to it from Mixamo which works well, but I am unable to scale it. I've literally been trying to scale a character up for two hours but every time I do, it goes back to being small. I've done Ctrl + A > Apply Scale but then it just causes my character to roam around randomly in space. I'm selecting the armature for scaling. Does anyone know a workaround for this? I've also uploaded a video to demonstrate what is going wrong.
Please see the video here

Found a solution.
The bones probably had a scale component on them, so they reset each time you hit play.
What I did was parent it to an empty then scale the empty instead.


How do I create a hinged door? How do I create a hinged door that opens and closes in Blender? If I knew how to do this, then it would help me also create moving control surfaces on model aircraft, such as the rudder and horizontal stabilizers.

The easiest way (without rigging or armatures) is to displace the origin of the object on the edge you want to use as hinge.

Go to Edit mode and select the edge. Then press ShiftS to use the snap menu. Snap the cursor to selected.

In Object mode use Object->transform->Origin to 3D cursor. The origin of the object will be now on the edge of the door.

Rotate the object (in this case on the local Z axis).

For more complex objects or movements beyond local axis it's better to use bones and a rig.


Why isn't changing the material of an object visibly working? First off, I'm putting it out there that I'm pretty new to Blender. The problem is that when I select any object, or faces of a mesh, and attempt to change the material, it doesn't visibly change. A video is linked below so what I'm trying to explain can be seen in further detail.

https://youtu.be/RdlvJl-wcfQ

If you have a solution, please leave it below.
Thanks.

Because you're not in LookDev or Rendered mode (https://docs.blender.org/manual/en/latest/editors/3dview/controls/shading.html).

As a side note, maybe you should start out with a basic tutorial, before you hop into your own projects. It may seem discouraging to actually having to learn something before one can produce results, but so is pretty much every skill that is not trivial.


My HDRI doesn't appear on Cycles Render I added an HDRI image (or also I tried, with Jpeg) but when I apply it, it only appears a single color. I think it could be from the image, but it doesn't appear completely as it should be.

Your texture has to be an environment texture (node) and mapped as equirectangular or mirrorball (if it looks rounded) in world settings.

check "world background" to see it in viewport (perspective view, not ortho)