How to convert my game to a newer version? I want to get 2.74, but my game is in 2.72. How can I convert this safely, meaning that everything will stay as is, except new features will be possible.?

Download the the most recent version of blender or the version of blender of your choice and simply run the file. Blender doesn't necessarily convert files except for the fact that you can import/export them. Right now i am running Blender v2.74.5 and if I want to use a 2.6x blender file I can the only thing that will probably be different is the interface differences. So you may not have any idea how/what they set the settings/options to.


I cannot figure out how to Rig Eyes So I'm trying to rig eyes on my rig. They have two layers on with the eye whites and one with the pupil. When I try to move it, it can go into the skin of the character and look like it's floating.When I rotate it, it can also sink back into the eye white its self.If anyone could help me fix this problem and get normal looking eyes it would be greatly appreciated. I should also include I'm using Blender version 2.79b

First off you're going to want the pupil and white connected on the same surface. having them disconnected can only lead to strange shadows and collisions like this. The best way to set up eyes so that there are no strange collisions like this is to make a sphere for the eyes. once you have the sphere you place the 3D cursor in the center of it (key stroke : shift+S > U aka cursor to selection) then select your eye bone and put the Head in the cursor at the center of the eyes (Shift+S > T) and then put the tail in the center of the pupil. Now the eye will rotate from the center of the sphere and therefore the pupil will stay flush against the surface of the sphere no matter what direction you rotate it.


Simple Boolean Intersect issue Blender 2.82a Still very much a learner of Blender, although I have used some other 3D tools. I am trying to intersect a sphere with a cube so I selected the sphere in Object mode, went into edit mode and choose a boolean intersect modifier. In Edit mode (left pic) nothing appears to change (until I press "Apply") which is fair enough. In Object mode (right pic) I see the result but there appears to be an extraneous face left across the top of the remaining sphere. I cannot select that circle and delete it in either mode, whether or not I subsequently choose "Apply"  What have I missed? Thanks, John

Sorry! My misunderstanding. I had to select the cube, add a difference boolean modifier, choose the sphere, press "Apply" and then remove the sphere myself to get the indent.


How to model a bee's segmented abdomen I modelled the back of a bee using subsurface modelling.

I want it to have 'bumps' like this:

I did the above by duplicating the object a lot of times and then made shapes to use as a cut for the boolean modifier.
While the result looks 'ok' to me. Making changes is a real pain.

I also tried using a latice but  that didn't turn out well either.

What would be a good technique to do this?

Here the file in case it helps to try on the actual model.

You can use edge creases to sharpen edges when using the subdivision surface modifier, and simple bevelling and scaling to generate this effect.

Start with a subdivided capsule with a topology like this:

Select an edge where you'd like to create a segment in the bee's abdomen:

Bevel the edge using the shortcut CtrlB, then move the cursor slightly to create a small bevel.

Select the rear edge.

Scale it down.

Select the front edge, open the options panel with the shortcut N, then crank up the crease to around 0.75.

Finally, you can play with the scale and position of the edges of each segment, and repeat this process to create the segmented abdomen.


where can I set the axis for the simple deform modifier ? The title should say it all, I want to use a twist but there is not option for the axis. Why is that and how do we get around this ?

You can add an empty and chose it as origin object in the modifier on the deformed object.

By rotating the empty you can change the direction of the deformation.


What does scene.objects.unlink really do? From the Blender Python API:

  unlink(object)   Unlink object from scene

  Parameters: object (Object, (never None)) – Object to remove from
  scene

Does the object directly get removed from the scene or rather the ObjectBase which links to the Object and hence the Object gets removed too?

It removes the object from that scene.

The reason the method is not called remove is that the object its self is not removed. Objects can exist in multiple scenes and groups. So scenes link to objects but don't store them (this is why you have bpy.data.objects).

The object-base is freed, mostly object-base is not exposed to the api, but in some cases accessing is important.


how to fix light on reflective surface I rendered this musketeer sword and as you can see the light on the blade looks wrong and doesn't represent the actual shape.

so this is the solid view model with the blade in edit mode:

and this is the rendered version (please ignore the awful materials):

In case someone need it, this is the blender file : sword.blend

oh ok, it's because your plane is a little bit twisted (i.e. not really flat), you should rebuilt your mesh with a clean mesh structure (quads and edge loops). If you want to let it like it is you can quickly fix the problem with a trick: select the mesh and click on Properties > Data > Normals > Auto Smooth


Camera slows down zooming into an object while in viewport I have been encountering an issue where the camera zoom slows down then completely stops moving before I reach an object which I'm trying to zoom into.
I'm not too sure how to fix the issue and I've searched the web but still struggling to fix the problem.
Thanks in advanced

The camera has a limited amount it can "zoom", and it doesn't move when you zoom it. There are a number of ways you can navigate despite this. The easiest is probably to "snap" the camera to the selected object by pressing the decimal (.) button on your Numpad. If you need even finer control, you can enter walk mode by pressing Shift + ` (same key as ~). You can then navigate with the WASD keys. Press Esc to return to normal navigation.


Blender command line open template Hi and thanks for reading.
I'm newbie and have problem to solve with Blender.
We have a upper level app which will open a template of Blender with a button in GUI (for make difference startup file and userpref file).
But I can't found in docs that argument for open template file so I'm asking community for help if this option is possible, if not hope anyone can help me Python script option for this problem.
Thanks again!

There is no CLI option to choose which application templates is open at startup, you need to use python to tell blender to open one of the templates.

You need to call the bpy.ops.wm.read_homefile() operator, using --python-expr in the CLI arguments should be enough -

blender --python-expr "import bpy; bpy.ops.wm.read_homefile(app_template='usertemplate')"


How to stretch a mesh object over another? Let's say that I want to make, say, a tarp stretched over some objects (like some tools covered down on a military jeep) or a snake stretched around it's prey (I'm a horrible person, I know :P)  or even camouflage netting:

I've had a go at this using soft bodies physics:

Like This Animation

But if you've watched the animation, well... the results are not so great.  Does anyone know of any methods to do this?

Any and all methods are welcome, whether animate-able or not!

You could also try Cloth simulation or the Shrink wrap modifier.
Soft body simulation could be useful if you need the cloth to stretch (see What is the technical difference between softbody and cloth simulation?), but other than that you are probably better off with cloth. Note that if you do use soft body, remember to set the Cache step in Physics > Soft Body Cache to 1 to cache soft body deformations on every frame.
Cloth simulation:

Cloth simulation is one of the hardest aspects of CG, because it is a deceptively simple real-world item that is taken for granted, yet actually has very complex internal and environmental interactions. After years of development, Blender has a very robust cloth simulator that is used to make clothing, flags, banners, and so on. Cloth interacts with and is affected by other moving objects, the wind and other forces, as well as a general aerodynamic model, all of which is under your control.

Note that a new feature for "sewing" cloth has been added on February 6th 2014. This could be very useful for pulling cloth together (like in your first image). If you want to try it out, get a recent development version and have fun :)
Shrinkwrap modifier:

The Shrinkwrap modifier allows an object to “shrink” to the surface of another object. It moves each vertex of the object being modified to the closest position on the surface of the given mesh (using one of the three methods available). It can be applied to meshes, lattices, curves, surfaces and texts.

As mentioned by ideasman42, you can also try using the Convex Hull tool.
Run it by pressing Space> Search > Convex Hull:


screen and workspace layout I have watched many Blender tutorials for various operations in Blender and they all seem to have lots of vertical tabs open that are customized for whatever they do most - see attached - but I can't find a tutorial on setting up these tabs or - for instance - where I can find the tissue dialog

Thanks

The Tissue Tools are from the Tissue add-on. You can activate it in your preferences by ticking the checkbox (Edit > Preferences > Add-ons).

The sidebar can be toggled by pressing N, through View > Sidebar or by clicking on the little arrow icon.


How do I apply color with Cycles Material Nodes with No UV? After many attempts I can't figure out how to make the ends of the lemon green.
Here's my latest attempt. I've tried mapping, etc.

Nodes using Generated Coordinates

No UV

Nodes Use Generated X Coordinates.  Image above.    Cleanup Pending. We think these are better attached to vertices and survive rotation as the image shows a translated and rotated lemon. See axis orientation.  Please test and confirm.  Artistry not considered.

Please improve these nodes.

Deprecated Nodes of Lemon Quality abusing the X position of fragment.

Cycles Render.  Less Green.  X Coordinate used. Object Centered at Origin.  Image Above.  Keeping some old nodes until cleanup.

More Green.  Nodes showing use of X Coordinate.  Left and Right value made equal via Absolute Value Node.

The Multiplication node controls the spread.  Its value is keyframed.

Do not eat lemons like this.


help with routing edge flow I have shading issues can anybody help me with this problem...its half sphere and some square object i make union with bool tool:

This kind of topology works but it needs a bit more edge loops for your sphere than what you currently have:


Weight paint, I can subtract but can't add When I try to add weight paint it does not do anything, but when I subtract it works fine. How can I add weight paint for my rig?

Hit T to open up your brush settings. Chose the draw brush:

Set the Weight to 1, and the strength to 1. Also set the blend to Mix.

Click Images to view larger versions


Strange lighting line when rendering in Cycles This is a frame from a quick rigid body physics animation test in Cycles. For some reason, there's a line separating light from darkness in the background. I can't seem to figure out why.

Since the tower is casting a shadow on the darker part of the background I assume that the darker part of the background is your ground plane and the brighter part of your background is your sky from world settings.


Duplicating objects using Animation Nodes' 'Grid Mesh' node I'm trying to create an image similar to this.

I can create the sine wave using nodes but I can't get them to repeat. I was following the tutorial https://youtu.be/o3N8H8X-GJk

My nodes are below and also the image it creates. I circled the node which seems to have changed from the tutorial. I'm using Blender 2.79b and Animation nodes 2.1.2

If you want to distribute a group of objects, you can use the Distribute Matrices node to generate the locations. You may also use the Replicate Spline node to ease things for yourself.


Manipulator Icons Missing in the 3D Viewport (2.8) I'm not sure if I toggled something and it made my manipulator icons disappear, but I can't find them when I would select an object or face, edge, or vertex. Help?

In the "Overlays" box (Either at the top or bottom of the viewport), make sure to scroll and find the Gizmos section. When found, make sure the "Active Tools" is highlighted.


Is there a way to show distribution of UVs as a heat map? I was wondering if there's an option in blender like that of UV unfold, to be able to see a "heatmap" for UV distribution like red for stretching and blue for too close UVs. I am quite clear of the workflow in UV editor but this is something I have not come across, I know I can apply the checker, but this is more computer displaying the stretching which I think is a handy tool.

Yes there is an option to display UV distortion.
In the UV/Image Editor while in edit mode hit N button to display properties panel and in Display section enable Stretch.

Select Angle to display angular distortion, or Area to display area difference between the UVs and the 3D faces.


Create a sphere with multiple layers and a chunk cut out showing them I have a graphic that I plan to use in a video. Right now it's 2D and I plan to animate the layers as we discuss each point. I'm brand new to blender, but was wondering if it's possible to translate this design to a 3D one and animate the model instead. Any help would be appreciated!

Start with a sphere and delete the faces that you don't want. Then, select the whole object in edit mode, press "E" to extrude, press "S" to scale, press "0", and then press "Enter".

You can duplicate this as many times as you want and then add a normal sphere in the middle.


Save the 2D bounding box of an object in rendered image to a text file I have a blend file with a moving object and want to save the object's bounding box positions (x, y, width and height) in the rendered image to a text file (for every frame):

The bounding box values need to be in the pixelspace of the rendered 2D image, where x and y are the location of the image's pixel representing the top left corner, while widthand height represent the number of pixels from the top left corner to the right bottom corner.

This script determines the camera space bounding box and calculates the top left corner location in the rendered image + width and height (clamped to render resolution).

It will return incorrect results if the object is partially behind the camera, it should work if it's in front and crossing the camera view border however.

import bpy
from mathutils import Vector

class Box:

    dim_x = 1
    dim_y = 1

    def __init__(self, min_x, min_y, max_x, max_y, dim_x=dim_x, dim_y=dim_y):
        self.min_x = min_x
        self.min_y = min_y
        self.max_x = max_x
        self.max_y = max_y
        self.dim_x = dim_x
        self.dim_y = dim_y

    @property
    def x(self):
        return round(self.min_x * self.dim_x)

    @property
    def y(self):
        return round(self.dim_y - self.max_y * self.dim_y)

    @property
    def width(self):
        return round((self.max_x - self.min_x) * self.dim_x)

    @property
    def height(self):
        return round((self.max_y - self.min_y) * self.dim_y)

    def __str__(self):
        return "<Box, x=%i, y=%i, width=%i, height=%i>" % \
               (self.x, self.y, self.width, self.height)

    def to_tuple(self):
        if self.width == 0 or self.height == 0:
            return (0, 0, 0, 0)
        return (self.x, self.y, self.width, self.height)

def camera_view_bounds_2d(scene, cam_ob, me_ob):
    """
    Returns camera space bounding box of mesh object.

    Negative 'z' value means the point is behind the camera.

    Takes shift-x/y, lens angle and sensor size into account
    as well as perspective/ortho projections.

    :arg scene: Scene to use for frame size.
    :type scene: :class:`bpy.types.Scene`
    :arg obj: Camera object.
    :type obj: :class:`bpy.types.Object`
    :arg me: Untransformed Mesh.
    :type me: :class:`bpy.types.Mesh´
    :return: a Box object (call its to_tuple() method to get x, y, width and height)
    :rtype: :class:`Box`
    """

    mat = cam_ob.matrix_world.normalized().inverted()
    me = me_ob.to_mesh(scene, True, 'PREVIEW')
    me.transform(me_ob.matrix_world)
    me.transform(mat)

    camera = cam_ob.data
    frame = [-v for v in camera.view_frame(scene=scene)[:3]]
    camera_persp = camera.type != 'ORTHO'

    lx = []
    ly = []

    for v in me.vertices:
        co_local = v.co
        z = -co_local.z

        if camera_persp:
            if z == 0.0:
                lx.append(0.5)
                ly.append(0.5)
            # Does it make any sense to drop these?
            #if z <= 0.0:
            #    continue
            else:
                frame = [(v / (v.z / z)) for v in frame]

        min_x, max_x = frame[1].x, frame[2].x
        min_y, max_y = frame[0].y, frame[1].y

        x = (co_local.x - min_x) / (max_x - min_x)
        y = (co_local.y - min_y) / (max_y - min_y)

        lx.append(x)
        ly.append(y)

    min_x = clamp(min(lx), 0.0, 1.0)
    max_x = clamp(max(lx), 0.0, 1.0)
    min_y = clamp(min(ly), 0.0, 1.0)
    max_y = clamp(max(ly), 0.0, 1.0)

    bpy.data.meshes.remove(me)

    r = scene.render
    fac = r.resolution_percentage * 0.01
    dim_x = r.resolution_x * fac
    dim_y = r.resolution_y * fac

    return Box(min_x, min_y, max_x, max_y, dim_x, dim_y)

def clamp(x, minimum, maximum):
    return max(minimum, min(x, maximum))

def write_bounds_2d(filepath, scene, cam_ob, me_ob, frame_start, frame_end):

    with open(filepath, "w") as file:
        for frame in range(frame_start, frame_end + 1):
            bpy.context.scene.frame_set(frame)
            file.write("%i %i %i %i\n" % camera_view_bounds_2d(scene, cam_ob, me_ob).to_tuple())

def main(context):

    filepath = r"D:\temp\bounds_2d.txt"

    scene = context.scene
    cam_ob = scene.camera
    me_ob = context.object

    frame_current = scene.frame_current
    frame_start = scene.frame_start
    frame_end = scene.frame_end

    write_bounds_2d(filepath, scene, cam_ob, me_ob, frame_start, frame_end)

    scene.frame_set(frame_current)

main(bpy.context)

One could try cut the mesh at the camera view border (world space, camera space or NDC?) and throw away all coordinates outside the frame. That should fix the bounding box problem with object partially behind camera. If we dropped these coords without cutting, it would likely return a too small box (should return a too large box in these cases at the moment).


Saved 2.77 blender file opens up different So recently (a few days ago) I've created a simple rendering using just a few wine glasses in Cycles Render.  I was happy with the results and saved my blender file.  Of course, it had the '.blend' extension.  When I loaded it up later my camera view looked all funky. I switched out of camera view and then back and then everything was fine.  Am I doing something wrong or is this an expected reaction to my blender file?  I saved it with the camera view pointing to the scene and it is a Cycles Render for v2.77.  It doesn't crash.  It simply looks weird when it comes up so I switch views and then come back and everything is good.  The inner gray area you see is the size of the camera view (Pressing 0).  By the way, it was in Camera View when saved.

That is the UV/ image editor, change it back to the 3d view in the header below on the far left.


How do I optimize this planar object's vertices? So in a nutshell I want to optimize the vertices in my object, more in some parts and less in others:
https://www.youtube.com/watch?v=jvrh6rbrnbQ

Currently the object is planar, but I do want to solidify it later. I've looked through all the context menu tools when in the different edit modes (vertex,edge,face). And tried a bunch of those commands but nothing really worked.

(This is my first real scene so yeah n00b alert)

The file itself is here.

I think I have something of a solution here.

Basically use Vertex → Merge Vertices → By Distance, and then play with the distance parameter till you get what you need. Careful though, it can destroy sharp edges if you're not careful.

What this solution has over the checkerboard idea is evening out the distribution of vertices. Which is what I wanted.


Convert polygons or ngons to quads using bmesh I have imported an SVG keyboard layout into Blender (2.83), which arrives as filled curves in the XY plane.

For each key, after converting the curve to mesh, I have managed to dissolve some edges with bmesh.
    # tris to ngons, separating the bottom from the top
    edges = [e for e in bm.edges if e.verts[0].co.y != e.verts[1].co.y]
    bmesh.ops.dissolve_edges(bm, edges=edges)

This leaves each key with a quad and a polygon, or ngon, with either 5 or 6 vertices/edges.

I want to subdivide the ngons "vertically" using the existing vertices to make quads (2 quads if 5 verts, 3 quads if 6 verts).
I have worked out how to find them, or delete the ngon and keep the edges but am no closer to a solution.
    for f in bm.faces:
        if len(f.verts) > 4:
            bmesh.ops.delete(bm, geom=[f], context='FACES_ONLY')

In one version of the SVG I manually added extra vertices at the bottom to help create the required edges, but wonder if this useful or pointless (bad pun).
How do I convert these polygons (ngons) with more than 4 sides to quads, adding only vertical edges?

Verts of non-boundary edge.

Assuming the white keys are the mesh, where there is an ngon is at the ends of a non boundary edge
Test script below, finds ngons, bisects using YZ (keys aligned along x axis) plane at boundary edge vert coordinates, removes doubles, and repeats until there are no more ngons.
An additional test to make sure the other two connected edges are at an angle of around 90 degrees has been added. (See below)
import bpy
import bmesh

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

ngons = [f for f in bm.faces if len(f.edges) > 4]

while ngons:
    f = ngons.pop()
    def test(v, edge):
        if len(v.link_edges) == 3:
            e0, e1 = [e for e in v.link_edges if e.is_boundary]
            ev0 = (e0.verts[0].co - e0.verts[1].co)
            ev1 = (e1.verts[1].co - e1.verts[0].co)
            return abs(ev0.dot(ev1)) < 0.1
        return False
    # find verts of non boundary edge
    verts = [v for e in f.edges
            if not e.is_boundary
            for v in e.verts if test(v, e)]
    print(len(verts))
    for v in verts:
        geom = bmesh.ops.bisect_plane(
                bm,
                geom=[f] + f.edges[:] + f.verts[:],
                plane_co=v.co,
                plane_no=((1, 0, 0)),
                )
    bmesh.ops.remove_doubles(
        bm,
        verts=bm.verts,
        dist=1e-5
        )
    ngons = [f for f in bm.faces if len(f.edges) > 4]

bmesh.update_edit_mesh(me)


Uninitialized Image TreeDoubleBranchTexture from object "Tree" So I made a UV Texture for my tree and called it TreeDoubleBranchTexture. I decided to change it a bit so the texture wouldn't have any shadows anymore.

I did it the same as I always did but it just keeps saying Uninitialized Image TreeDoubleBranchTexture from object "Tree" every time I try to bake it.

As a way to remove the shadows I made the surface Emission and set the strength to 1.000 for both the wood color and leaf color.

I was having this problem too. It seems I had not actually created an image, just a slot for one. I managed to fumble around until I found Fill Image With UV Grid. Then I had an actual image, which I saved, and then it worked.


Edge length font size Is it possible to change part of source code inside blender which determines the edge length font size?
I know, the scale of the interface can be changed, but this also changes the size of the other elements.
Thank you for Your advice.

if you only need the font size of the measurements to be bigger, you could use the included addon Measurelt which gives you a degree of customization on the font side.


Use custom values as units? Does Blender have any way of using custom units? Say I create a "unit" called depth and set it to equal 5mm. I set an object to have the dimensions (1 depth, 5 depth, 3 depth) which would equal (5mm, 25mm, 15mm). Then I change depth to equal 6mm. The object dimensions would change to (6mm, 30mm 18mm). Does blender have anything like that?

Blender only has 1 unitless unit: the Blender Unit.
You can't create any others, but that doesn't matter, since it does exactly what you want.

At first your BU equals 5mm. Enter 0.005 in the Unit Scale checkbox.

Switching between metric and None will you either Dimensions of (1, 5, 3) or (5mm, 25mm, 15mm).

Changing the translating to 1 BU = 6mm seems pretty straightforward. Simply entering the new value 0.006 produces dimensions of (6mm, 30mm 18mm).


Blender does not render particles I am following a tutorial on how to make a super speed effect in Blender.
I went through half of the tutorial but got stuck now. When rendering just like in the tutorial (at 23:26), I don't see the particles- only the background.

Here is the Blender file if you need it.

You've got strips in the Video Sequence Editor, so Blender will try to render them instead of the actual scene.

You can uncheck "Sequencer" in Render / Post processing.

A good practice would be to create a new Scene (or even a new .blend) to handle the video editing separately.


Copy settings from one particle system to another I'm trying to copy specific settings (that are the same across all of my hair particle systems) on a character to all other systems... but I can only see how to do it manually and I'm thinking there has to be a way to simply apply the same settings to other systems. Ex: I want all of my hair particle sysyems to have Adaptive render enabled with 2 degrees and 3 pixels while also having B-Spline enabled at 5 steps. I have one setting that's the way I want it but the others need to be updated. Any ideas other than manually going through all of them? (I have 12 systems so it's very tedious)

If you can do some python.
Traverse all the objects and then traverse all the modifier of this object, if the modifer is a subsurf set the modifier correctly.

for ob in bpy.data.objects:
    for m in ob.modifiers:
        if m.type == "SUBSURF":
            ob.cycles.use_adaptive_subdivision = True
            ob.cycles.dicing_rate = 3
            ....

And do the same for the particule system:

for ob in bpy.data.object:
    for psys in ob.particle_systems:
        psys.use_hair_bspline = True
        psys.render_step = 5
        psys.adaptive_angle = 2
        psys.adaptive_pixel = 3


Which is the best way to generate 2D mathematical surfaces with a different color each side Here is a handy mobius strip. Mathematically it has one surface, but in Blender it's just a twisted flat mesh stitched together carefully. I added some icospheres as breadcrumbs to guide the eye. I am going to try to add some patterning to the "surface", either a color gradient or a UV-map in the future.

But, right now, I am wondering if using backfacing in nodes as @BenSimonds shows in the second answer here is going to be robust, or if I should just get used to making my 2D surfaces as really thin 3D double-surfaces (e.g. a flattened tube in this case) and avoid any potential future problems. There may be some experience out there about things that can go wrong here that I can't find with google.

Note: surfaces will be pretty complicated, and making them thin 3D shapes will be tricky - this is a simple example for discussion.

import numpy as np
import bpy

R,   W  = 2.0, 1.0
nth, nw = 120, 9

th = np.linspace(-0.5*np.pi, 1.5*np.pi, nth+1)[:-1][:,None]

w = np.linspace(-0.5*W, 0.5*W, nw)[None,:]

phi = 0.5*np.pi*np.cos(th.clip(0.0, np.pi))

x = (R + w*np.cos(phi)) * np.cos(th)
y = (R + w*np.cos(phi)) * np.sin(th)
z = (0 + w*np.sin(phi))

nx = np.cos(th)*np.sin(phi)
ny = np.sin(th)*np.sin(phi)
nz = -np.cos(phi)

verts0 = [tuple(thing) for thing in zip(x.flatten(), y.flatten(), z.flatten())]
faces0 = []

for ith in range(nth-1):
    for iw in range(nw-1):
        v1 = nw*ith + iw
        v2 = v1 + 1
        v3 = v2 + nw
        v4 = v3 - 1
        faces0.append((v1, v2, v3, v4))

for iw in range(nw-1):
    v1 = nw*(ith-2) + iw
    v2 = v1 + 1
    v3 = nw*0 + nw-2 - iw # last one is sideways 'cause it's a mobius!
    v4 = v3 + 1
    faces0.append((v1, v2, v3, v4))

blueish = bpy.data.materials.new("BLUEISH")
blueish.diffuse_color = (0.1, 0.3, 1.0)
blueish.specular_color = (200, 1.0, 100) # CHANGE THIS!

mobi_mesh_0 = bpy.data.meshes.new('mobi0')
mobi_obj_0 = bpy.data.objects.new('mobi0', mobi_mesh_0)

bpy.context.scene.objects.link(mobi_obj_0)
mobi_mesh_0.from_pydata(verts0, [], faces0)

mobi_obj_0.active_material = blueish

bpy.data.objects['mobi0'].select = False
bpy.data.objects['mobi0'].select = True

bpy.ops.object.shade_smooth()

d = 0.11
for i in range(0, nth, 5):
    xp = x[i,4] + d*nx[i]
    yp = y[i,4] + d*ny[i]
    zp = z[i,4] + d*nz[i]
    q = bpy.ops.mesh.primitive_ico_sphere_add(size=0.1, location=(xp, yp, zp))

The following example accomplishes two things that I believe you want to accomplish based on your question.

Eliminate the seam caused by the one sided surface.
Highlight the twisting contours of the mesh so that the viewer can more easily understand it.

Here is the result:

Here is what I did.  Once I created a mesh that closely resembles your picture, I used the Solidify modifier. The resulting mesh had a squashed seam where the geometry flipped through itself. I then had to apply the modifier so I could delete those faces and reconnect them to fix the seam.

At this point I unwrapped it using the 'Reset' option, so each face filled the texture space. This worked well for the most part, but I had to do a bunch of cleanup. Many of the face normals needed to be flipped and/or rotated 90 degrees. This wouldn't have been as much of a problem if I had used a larger offset in the Solidify modifier. The opposing faces were so close to each other that it was difficult to make selections. In hindsight, I should have unwrapped the mesh before connecting the loop to avoid this problem altogether.

The material is pretty basic. I think the key to getting a uniform texture without distortion is to use the Reset method of unwrapping. However this is only true for tileable textures. I used the Brick Texture here. Checker also works or you could create your own. It may be possible to make an organic texture work using Generated Texture Coordinates, which I tried, but I didn't know how to correct the distortion on the twisted section.

I liked how the Brick texture worked because when you use it as the 'Factor' for a Mix between Emission and Transparency, you can play with the settings so that the texture for each face becomes asymmetric, allowing the grid on the opposing face to become visible. If you really want to impress the ladies, try using a MixRGB node between two Brick Textures.

I settled on this material, because it is pretty simple and just by playing with the sliders in the Brick settings or plugging different inputs from the Geometry node into the Emission strength and color can produce a lot of variety depending on the look you want.


AttributeError: module 'bgl' has no attribute 'glColor4f' I'm running the Python template operator_modal_draw.py in Blender 2.80 and I am getting this error in the Console:

AttributeError: module 'bgl' has no attribute 'glColor4f'

Is this problem just for me running on Windows?  Is there anything I can do to fix this?  Thank you.

While 2.80 is still under active development, not all of the templates included with blender have been updated with the changes needed to work with 2.80.

With the last of the python API changes about to be finalised any day, these remaining templates should get updated soon.

This post might help get you started with the bgl changes.


Multi-core/threaded particle simulations Recently did a liquid splash via Gleb Alexandrovs tutorial.

So smoke + flow field + particles + meta-balls to get some sort of fluid splash going on.
Where I noticed, none of these processes are able to use multiple cores. Grinding my 6 core / 12 thread CPU to a worse experience than a heavily OC-ed 2 core little thing. Making the whole experience quite unpleasant if using more than 550K particles.

Is there a way to make Blender 2,78 use more cores outside of rendering?

In Blender particles and simulations are still badly optimized and mostly single-threaded with no GPU compute support. With time features are added and even now you can look into the FLIP FLUIDS addon. Multithreaded with OpenCL support, demo for tryout here.

Another solution might be DualSPhysics simulation engine, which is free, multi-threaded and even GPU accelerated. It's ease of use is not that great, there is no integration with Blender other than importing the simulation data and rendering with Cycles (there is addon for that). It is integrated with FreeCAD. Ooutside of that there is no GUI, some programmer knowledge required.

Full capable, easy to use and well optimized simulation apps cost $3000+, like Houdini, Bifrost, RealFlow, etc.


How do you get rid of blue numbers blue numbers that keep appearing when I resize vertices help

From your screenshot it appears that you have enabled edge length under mesh display.

To enable/ disable this option, open the properties panel with N and select/ deselect length under edge info.


Blender 2.8 - render image creates only an outline of the image In 2.8, I have a complete scene in blender that I would like to render as a 2D image (and save as a .png file).  I view the scene from the camera and the attempt to render.  When I click Render->Render Image, I don't get what appears in viewport, instead I get just a faint silhouette outline of what appears in viewport.  Render settings are all default.  What am I doing wrong?

If you want to render the scene as it is displayed in the 3D view, you'll have to set the render engine to Workbench. You can do this in render tab in Blender 2.8.

Otherwise when rendering with Cycles or Eevee you need to setup materials and lighting otherwise you won't be seeing much in your render.


How can I scale to the center? How can I scale proportionally into the center? For some reason it keeps going to which ever edge or vertex was first selected when making the edge loop.

You have pivot point set to Active Element and the first vertex you select when selecting a loop is the active element. To scale to the center you would need to set transform pivot to Median Point or to Bounding Box Center. You can switch the type of pivot point for transform operations like rotate, move or scale at the header of any 3D View window:


Particle hair growing in a weird direction I created a particle system in my object and the hairs are growing in a weird direction... I tried to change the rotation but nothing happens (they don't rotate at all). I want them to be orientated in the z direction. Thanks for the help!

The hairs grow from the faces of the two rings in the direction that the normals are facing.  If you view normals in edit mode (by turning on the overlay

and setting the normal length) I suspect you will see something like this:

You want the normals from the top ring to face down.  To do that select all of the faces in the top ring and type SHIFT-N to recalculate normals.  If they're still facing up, open  the action box (in the lower left of the 3d view) and enable inside:

and you should see something like this:

Now your hair should grow down from both rings


How can I make two molecular particle systems collide? (Using the molecular addon) I am trying to recreate something like this with the molecular addon:

https://www.youtube.com/watch?v=t7qjlWxgtNY

I created two separate particle systems, but they aren't interacting at all (when I bake the simulation, the particles go through each other). I tried to add both particle systems to the same Collision Group (as seen below) but that didn't fix anything.

I'm fairly new to blender, but I have experience in a few other programs. Any help would be appreciated!

Thankfully I was able to find the solution myself.

To make particle systems interact with other particle systems:

Go to the particle tab
Scroll down to "Collision:"
Check the box that says "Activate Collision with others"


Why does the mirror modifier not mirror perfectly? I have added a mirror modifier then the skin modifier to my mesh.

I get this:

But I'm supposed to have this:

What I did I do wrong ?

Your vertices are not at the exact center.

change their position to 0 on the concerned axis

This should fix your problem

This could be avoided using clipping in the mirror modifier.


What are the shortcuts for the pie menus? The shortcuts for the pie menus aren't shown in any tooltip, so I can never remember them. What are they?

Mode

Ctrl+↹ Tab

Proportional Editing Falloff

⇧ Shift+O

Snapping

This one is not a pie menu, but its shortcut seems to be missing from the tooltip as well, so I included it in the list:

Ctrl+⇧ Shift+↹ Tab

Snap

⇧ Shift+S

Pivot Point

.

Transform Orientation

,

Shading

Z


Blender render background image distorted I am trying to add an image as render background in 2.75, using Blender Render, not Cycles. I add a world texture, mapping set to "view". What I want is an image mapped 1:1 to the rendered background, meaning when I render the same dimensions as the input image, I want to get the same image as render output. What I get is an image with a pillow distortion, which amount depends heavily on the focal length/field of view of the camera:

(This uses a rectangular grid as input)

Looks like some kind of spherical projection to me, but I set mapping coordinates to "view". I remember this working in previous Blender versions without having to use the compositor, what am I doing wrong?


"Positional arguments" error in script This script produces error: object_update<> takes 0 positional arguments but 1 was given

import bpy

def object_update():
    object = bpy.data.objects['Cube']
    bpy.ops.object.explode_refresh(modifier="Explode")

bpy.app.handlers.render_pre.append(object_update)

Script is a kind of working, but how to remove this error?

The functions assigned to bpy.app.handlers need to accept one parameter, even if they don't use it. While you can ignore the scene parameter I would suggest using it, rather than directly accessing global data (not that you are making use of the object variable you set).

import bpy

def object_update(scn):
    object = scn.objects['Cube']
    bpy.ops.object.explode_refresh(modifier="Explode")

bpy.app.handlers.render_pre.append(object_update)

Note that the explode_refresh operator will only work on the active object if it has an explode modifier named "Explode", so I'm not sure what you want to achieve will work, or that it is really necessary.


Changing bone size changes Envelope instead I try to change the bone size:

See also this video:
https://youtu.be/cZ3o5tjO51s?t=403
But for me the tool is only changing the envelope, what am I doing wrong?

(blender 2.91)

Press Ctrl + Alt + S  to change the size of a bendy bone.


How to Blend Animations - Always Fails for Me Extra Information: https://youtu.be/fhvEo-Ct_FU See description for transcript of information.
I have a series of idle poses as animation files. Each of these are static, or just arm or head motoin. Thay are supposed to be used alongside an "Idle Noise" animation. However, none of the blend modes seem to support this.

You can see here the subtle motion the noise track gives. The mess of bones isn't supposed be an issue, since the change in motion from this start position is all I need, but I can't get any blend mode to take just this motion and apply it over the 'realistic, full-body' pose it's to work with.
I need a way of taking the first frame of the new animation as the 'zero' and have any additional animation from that zero to be added to the underlying pose. Isn't the 'Add' mode supposed to do something like that?
This is the pose without the Noise track enabled.

If all the poses are on the same armature OR if all the poses are on identical armatures (meaning armatures with the same number of bones and with the same bone names), you can create a pose library with all the poses you want saved to it. Then you can attach this pose library to a project file containing the armature that you actually wish to animate, and all the saved poses will become available to it. The Pose Library is created and accessed from the Object Data tab of the Properties Panel (while an armature is selected), then under the Pose Library section).
To blend the poses during animation: Make sure you're in Pose Mode any time you are doing anything with the Pose Library. After choosing poses in the Pose library one by one (the poses become listed in the library when they are saved to it), you must click the "+" icon to save the pose to the library. Only selected bones are affected by any changes in pose that are brought about by using the pose library, so keep this in mind. You can keyframe any pose activated in the Pose Library (using the "magnifying glass" icon to apply the pose to the currently selected armature) using your standard workspace windows and editors as you normally would. Then you can choose another pose from the library at another frame, and keyframe again to get interpolation between the two poses.
If it turns out that the desired poses were originally from different armatures, this can all still be done, but extra steps are required. You would need to open the extra versions of the armatures, and for each one, select all its bones in Pose Mode, and then Ctrl + c to copy all the pose positions of all selected bones, then select a different armature -- the one you eventually want to animate -- in Object Mode, switch to Pose Mode, select all its bones, and Ctrl + v to paste those pose positions to this other armature, save the new pose to your pose library, and then continue with these steps until you have added all the needed poses to the pose library. Your pose library can be saved and appended to other files also, which can be handy. This way, you don't need all of your armatures in one file to get the pose library built. That said, it might actually be easier to append the armatures to the file containing the pose library instead of the other way around, as this might entail less chance of pose library corruption. So, you could append each armature to the file containing the pose library, add the pose of that armature to the pose library, save everything, and append a new armature to the file containing the pose library, then save the new pose to that library. This might be the preferred approach if none of your desired poses are on armatures that all exist within one single file. If they do, then simply add their poses to the pose library all in the same session, one at a time, and then get rid of the armatures you no longer need afterwards. You should end up with one armature and many available poses. Don't delete any of the other armatures until you know all your poses work.


I get weird shapes when I extrude and scale a mesh I am currently doing the doughnut tutorial, part 6, from this link, and I am now supposed to model a plate. Unfortunately whenever I copy the instructions, I get these really weird shapes and my plate looks messed up.

I extrude and scale it but it just doesn't come out right.

created the circle

extruded

scaled it

You are using Proportional Edit with the "random" falloff setting. To turn it off, click on the blue button in this menu and select "disable":

or press O while in Edit mode


Glow effect invisible on transparent background I'm trying to render a lightsaber on a transparent background to use as game sprites. I've followed a tutorial on youtube to create the glow/blur effect and it worked great on a black background but it's completely invisible on a transparent background.
I figured I had to put an alpha channel node somewhere to make it work but I tried all the "alpha" named nodes all over the place and without success.

This is how the node setup looks like

Here is the blend file if you want to take a closer look.

EDIT: Found a solution/workaround. Doesn't look as good as before but it's close enough.

There is a fundamental problem with glows. Glow cannot be merged into a composite with alpha, because such layer is then composited using the 'mix/normal' color operation. What you need is having the glow separate and combine it with add/dodge. Here is the explanation:

If the Glow layer (foreground) is lighter than Background, the Normal/Mix color operation with alpha will not be as bright as original Add operation with alpha. If the Background is lighter than the glow (a color glow on white) - the end result will be darker than Background leaving unwanted effect!

That's why you never ever ever composite color glows into a single merged layer with alpha that's supposed to be overlayed with Mix/Normal mode over some other than complete black background.

Now let's say you have object with a color glow on black background and you need to make this background transparent. Here is how you correctly do it:

You break down the image into channels and use each channel as alpha for a solid red green and blue - what this is is separating the background per channel. As it is black the alpha of the background is 0. You then add the colored channels with alpha together to reconstruct the image. Simple.

With nodes when adding the channels together turn Include alpha of second input on:


Why does Blender slow down when I duplicate a model repeatedly? Why does Blender slow down when I duplicate a model repeatedly, as in the above screenshot?

Blender's viewport is a more or less simplified 2D representation of what your 3D scene looks like from a certain point of view.

This representation needs to get updated in real-time (if possible) if you rotate a scene and that update needs to be calculated by your GPU as well as your CPU.

As Shubol3D already hinted, duplicating a model also duplicates geometry. Even further, if you have assigned materials and modifiers, they get duplicated as well.

Mathematically every vertex in your scene is described by three vectors, x,y and z. But there is more data behind a vertex than just the geometrical coordinates. Color and light values are only two of them. Imagine a long list of those values in a spread sheet. The more geometry, the longer the spread sheet, the more time it takes for your hardware to update the information that needs to be changed to display your scene.

If this explanation answers your question, please mark it as "accepted".


Creating a delayed blur effect? I would like to recreate an effect similar to that seen at this timestamp in the following video of Zelda: Majora's Mask 3d: https://www.youtube.com/watch?v=M-FoQ1XNoGM&t=462

I believe this was accomplished by having each frame fade slowly away (and travel northeast) after it played.

Is there any simple way to achieve this in Blender? I'd prefer this to be accomplished in the VSE, without any custom scripts (if possible).

I don't have an elegant solution but it seems to work. Instead of fading a frame, I just use 8 or more strips with the same image sequence and move them each one frame to the right.

Each of the strips (except the bottom one) gets a transform strip. There I lower the opacity and move the strip a bit with the position fields.

You might need to use a gaussian blur strip, too.

It looks a bit better if the Blend type is set to 'add'


Control custom properties How can I add remove and create a callback/event for a custom property using bpy. I have a scene, called scene, and I want to add a custom property named x, defulat value 2 (as intereger), and a callback foo, to run when it is changed. I also need to be able to read the value from it, and delete it. How do I do this?

You can use static custom properties for this;

import bpy

def foo(self, context):
    print("my test function", self)

bpy.types.Scene.testprop = bpy.props.FloatProperty(update=foo)

This will print:

my test function <bpy_struct, Scene("Scene")

When the property is updated, through:

 bpy.context.scene.testprop = 11.0

Note that the FloatProperty function takes the arguments:

FloatProperty(name="", description="", default="", maxlen=0, options={'ANIMATABLE'}, subtype='NONE', update=None, get=None, set=None)

Which are all optional; This does, however mean, that you can define set and get functions for the property.

You can also use StringProperty and BoolProperty

If you want to add it to the UI, in a custom location, use something like:

class myPanel(bpy.types.Panel):     # panel to display new property
    bl_space_type = "VIEW_3D"       # show up in: 3d-window
    bl_region_type = "UI"           # show up in: properties panel
    bl_label = "My Panel"           # name of the new panel

    def draw(self, context):
        self.layout.prop(bpy.types.Scene, "testprop") #Make sure this matches the name you gave to your property.

bpy.utils.register_class(myPanel)

It will be found under the Scene tab, in the Properties panel, otherwise.

The custom property is basically a field and can be read, programatically, as:

bpy.type.Scene.testprop

And delete them with:

bpy.ops.wm.properties_remove(data_path="scene", property="testprop")

You can check the relevant docs here, and the API here.


Square Geometry with uneven formed Mesh Is there a standardization method that helps adding geometry in form of an even wireframe with same-sized squares on to a mesh like the ones in this pictures:

The left geometry I had to add all manually and it's taking a lot of time.

I need even squares in order to UV-unwrap them and have undistorted displacement and texturing. Eventually these will be hedges like a boxwood.

Thanks in Regards,

F.Sterzik

I'm working with speheres now. They got a curve-mod and the displacement direction is not problematic. Rebuilding it in a more clever way sure did the trick :D


Why will my fluid domain only bake once? I'm trying recreate Ian McGlasham's "ALICE" fluid animation. In the process, I've been trying to adjust settings for the size of my fluid objects and also for the resolution of the domain object, so I want to bake the domain, see the result, adjust things accordingly, then bake again. However, after I bake the domain once, when I try to bake again, the baking progress bar appears and progresses, but the fluid and domain object do not merge to become the flowing liquid. I assume there is a "Free Bake" somewhere that I'm supposed to click on but I can't find it. In addition, if I just go and manually find & delete the fluid cache folder in my computer, the domain still won't bake properly. Also, I'm using 2.70.

To show what should happen when you click Bake, I made a simple demo blend with a small inner cube as the fluid and a big outer cube as the domain:

See how the domain and the fluid objects merge into the fluid mesh? That's what should happen, but that doesn't happen for me if I click Bake a second time.

Here's the layout of my scene:

Here's what happens when I try to bake a second time:

See how the domain and the liquid objects stay separate and do not begin to flow? They should, but they don't and I can't figure out how to get them to.

Here is my blend file.

Just as a side note, is it weird that one cube inside another cube requires 27MB of memory to bake, but the other more complex scene only requires 1.89MB?

This is because your setup is a bit weird.

First, make sure the fluid objects are enough large to be initialized as fluid volumes. To do so, you can Tab to edit mode and scale it Z, to have more volume at the beginning of the simulation. Beware to move the volume inside the domain, since the volume beyond the domain won't be computed. A good idea here would be to reset origin of both fluid objects to their respective centers.

Then, your obstacle object is not well configured:

Set the Volume initialization setting to Both because it contains both concave and convex surfaces.
It does not contain enough subdivisions, so the simulation is not so much accurate. You should add more edges to the height of the obstacle object (Tab to edit mode, then Ctrl + R over an edge, then mouse scroll to add more subdivs.)
You should also Recalculate the entire mesh's normals. (In Edit Mode, A to select all, then Ctrl + N)
As a side note, you added a Collision physics modifier for your obstacle object, which is useless here (even if it doesn't affect the fluid sim).

The amount of memory required for the simulation depends on the resolution you specify, for Final: (used for render) and for Preview:. The more resolution you give, the more memory the bake will take.

There is no "free bake" button, but you can specify the directory where Blender will store the simulation data (in the domain's Fluid dropdown, file browser at the bottom). By the way, if you re-click on the Bake button, it will erase the previous baked data while the simulation compute.


Why does my volumetric jet material appear so low res? I'm trying to make a jet material for my rocket ship but the volume appears low res no matter how much I scale up the voxels.
I also played with the size of the object and that seemed to do nothing as well and when I zoom out it disappears. I'm using eevee to render this scene
any help is appreciated
Here's a link to the tutorial
https://www.youtube.com/watch?v=52wkINcVpbE&t=911s

For Cycles it was enough to change Mesh to Volume modifier Resolution > Voxel Size to 0.1

For Eevee it is the same, but ...

... you have to change also Render Properties > Volumetrics > End to 1000 m or

... increase Distribution to 0.98 and Tile Size to 4 px

Material is fine.


Why can't I see the transformation gizmo in the 3D View? I have a problem with gizmo. I already turned on gizmo but it doesn't show in the view port, when I move, scale, rotate the objects.
How can I solve this problem..?

I don't see the left side of your Blender file, but maybe this helps:

If you click T a tool bar should appear on the left side of your screen. Here you can select for example the move or rotate tool and then you should see the correct gizmo. If you move or rotate the object using hot keys (for example G to move objects), there's no gizmo even if you turned on gizmos.


Linking transformation but not other data (ex. Modifiers) in two objects I need to link only the transformation of two objects, but no other properties.
I need to create a hollow cylinder. The catch? It must be made out of cuboid objects and only with rotations 22.5 degrees at a time. This is because I am making this for a Minecraft resource pack, and these criteria are part of the requirements for the Minecraft Exporter I am using. I came up with an idea. I used an empty with a slab I very roughly transform scaled. I copied the transformation info from the slab to the empty, altered the empty so it was 22.5 degrees off in rotation and a bit to the side and down, and then set up an array mod on the slab relative to the empty. This created a barrel.
The problem? Any time I scaled the barrel, the empty had different data, and so the barrel was destroyed in a variety of interesting ways. I tried making the empty a child of the barrel, but then the weirdest thing happened. At first it worked, but if I needed to edit the actual transformation of the barrel slab (ex. to make the barrel thicker), it seemed to reload the parent-child relationship, and give the empty the array modifier. I tried putting both the barrel and empty under the same parent (another empty), which worked but any time I had to rescale the whole thing, I had to select the empty in the hierarchy, not in the viewport, because selecting it in the viewport selected the barrel slab and not the parent empty. So I need to link the transformation of the slab and the empty, but in a way that does not link all properties of the parent.

For arrays from object offset, parent the object to the array.  Empties cannot have modifiers of any kind, so I'm not sure what you're talking about with it acquiring the array.  This is likely a misinterpretation of something, but if it's not, then it's a bizarre bug.  A video of the problem, or a file with explicit instructions to recreate, would be necessary to answer in more detail.

Selecting the empty will not select the barrel.  Regardless of selection in viewport or outliner.  I wish there was an interface to make Blender behave like you describe, it would be useful for a few specialist things.  Again, I suspect you're misinterpreting something, and video or file+instruction would be necessary to give more detail.

To answer the explicit question, for perfect linking of transformation data, use object constraints.  "Copy transforms" copies all data.  You also have "copy position", "copy rotation", "copy scale", all pretty self explanatory.  Generally, you'd be using these world->world space, but there are times that you could parent an object to an empty and use local space coordinates to achieve other effects.  (However, again, I strongly suspect that there's some misinterpretation of what Blender's doing here, and even though it answers your explicit question, I doubt that it will do what you expect it to.)


I encounter this Error: Multiple different uvs per loop at single vertex. when trying to export the model into mod3 So I'm trying to do some modding for MHW, I imported the mod3 of the Gae Bolg from chunk11 of the game, then imported the 3ds custom model.
After going through everything and making a UV map for it too, I try to export the model into mod3 file,
but I got this error instead:

  Meshes
  600 instances of: ('rod008 001 LOD 1', 'Error: Multiple different uvs per loop at single vertex. Consider
  marking islands as seams and then splitting at seams.')

I don't really understand what this is, can someone please help?

Hello fellow MHW modder!

I hope you have latest add-on build, support for 2.8 isn't ready yet (as of post)
https://www.nexusmods.com/monsterhunterworld/mods/969?tab=files

You want to select your seams and break them from the model.
For some reason the MT Framework engine (or add-on) doesn't like edge loops.
I'm still struggling with some of the other stuff.

Basically on your mesh,
(first make sure you have triangulated faces, add-on will break and show an error)
Use the edge select, select your seam, press "V" to break (island) it off the mesh.

Here's more about this if you still need help:
https://github.com/Ezekial711/MonsterHunterWorldModding/wiki/How-to-Fix-UVs-for-Objects-Sharing-Seams


Use Animation Playback when frames have different names My addon renders frames whose names are not constant.  How can I use Python to get the playback to work?

I'm working on a time remapping addon and wanted to give the user the option to include the true frame number in the filename, e.g.:

1.00_0001.png

1.25_0002.png

1.50_0003.png

But bpy.ops.render.play_rendered_anim() doesn't work on these, although importing these images into the Video Editor works fine.

The operator doesn't expose any options you could set, but this seems to be the command it uses:

'C:\\Program Files\\Blender Foundation\\Blender\\blender.exe -a -f 24 1.0 -s 1 -e 250 -j 1 C:\\tmp\\0001.png'

There's even a step / frame jump parameter:

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Command_Line#Animation_Playback_Options:

But it doesn't really help in your case. You need to specify every single frame:

blender -a -f 24 1.0 00_0001.png 25_0002.png 50_0003.png 75_0004.png


Looping Smooth Spline Generation That Will Be Evaluated in Animation Nodes I would like to generate a spline with smooth peaks and troughs. This spline will be evaluated. Once the object following the spline reaches the end of the spline, it returns to the beginning (loop, not ping pong), and a new spline (generated spline 2) with the same start and end points is generated, however, it has different peaks and troughs. How could one achieve this effect in animation nodes?

You can create some random points and use them as the handles of a spline as follows:

To generate another spline, just change the seed.


How to change the grid's length values? I have a model of a gear that should be in the millimeters but when I scale it to that size it becomes so small that I can't zoom in to see it. Right now the grid is in metric and each grid is 1m x 1m x 1m. But I want to change the grid so each square in the grid is 10mm x 10mm x 10mm.

You have 3 options essentially.

Two of which are cosmetic, and involve changing the grid size - but will not affect actual scale or unit measurements of your file for 3D printing or other CAM methods.

By default, 1 blender unit (and 1 grid unit) equals 1 meter. If you want to 1 blender unit to equal 1mm, you can either:
Option 1 - scale the grid via the Properties Panel (N) --> Display --> Grid Floor Scale.

Option 2 - In the Properties Window --> Scene settings --> Units, 1st set to Metric, then set the scale to 0.001.

However, if you export or save your file, 1 blender unit will still equal 1mm for most external programs.

If you want to print your model, your safest bet will be to scale your model and regard your model's dimensions as if they are in millimeters. For instance, 155 blender units = 15.5cm.

Of course you can scale your model AND change the grid settings to make the grid nicer, no contradiction there.


Is it possible to interpolate missing frames in video editing? Sometimes it is useful to render a complete video even though some (possibly random) frames are still missing.
Is there any way to interpolate the missing frames with Blender?
In the case that it is not possible, I would be happy for any suggestion on that problem.

Blender does not currently support inter frame effects that allow information from one frame to inform a later one. What you need is Optical Flow technology.  There are a number of software solutions available and even some free ones, depending on your OS.

This would be a neat trick for blender however, allowing you to render at half frame rate then interpolate the rest.


Complete beginner question, merging vertices So I've been trying to learn blender, and I wanted to make a gun model. I got a reference image, and I've been trying to merge some vertices in a way that looks like this:

https://i.imgur.com/rf3nrln.mp4

Unfortunately, the result looks like that:

https://i.gyazo.com/b30627e966835efebd77756330f7c54b.png

I could make it the hard way and connect the vertices from both sides like this:
https://i.gyazo.com/cac033f1ca0cc122a8bbcd666a763564.mp4

But it isn't really effective. Is there a way around it, or do I have to do it like that everytime? Sorry If my english is broken, but I hope you'll understand what I mean.

Thanks in advance!

edit: I've been trying to make that the images show up without entering the external links, but I couldn't do that, sorry!

To merge vertices to corresponding vertices on another loop..

Select the sections of the loops you want to merge, (with an equal vertex count)
 and use CtrlE > Bridge Edge Loops, with the 'Merge' option checked in the Tool region, or Options panel in 2.8.

as Ray Mairlot has commented, you may intend to merge vertices at opposite ends of existing edges.. in which case you would AltCtrl select the edge ring, followed by X > Edge Collapse.


How to scramble C3D dots? I am trying to make point light displays (an example: https://www.youtube.com/watch?v=r0kLC-pridI). So far, I have used c3d files from Carnegie Mellon University, Motion Capture Database (link:http://mocap.cs.cmu.edu/search.php?subjectnumber=%&motion=%). The c3d files contain the XYZ coordinates of the markers across time.

I import the c3d file into Blender. And Blender creates an empty for each marker. Then, I create materials for each empty and set their attributes. In this way, there will be a flat white little square on each marker. And I render the animation and something similar to the YouTube video will be the output.

Now, I need to create the same stimulus but the empties' locations would be scrambled. In this case, only XYZ coordinates of the markers would be changed but their motion vector would stay the same. The output will be some random moving dots that do not have the shape of a person moving.

Here, the intact and scrambled stimuli are motion-matched. Meaning, they both have the same motion properties. But they are different in the position of their markers.

Now my question is that; is there any option in Blender to scramble the XYZ of the empties?

My not-an-easy option is to add a random constant to my XYZ coordinates for each empty for each frame.

Sorry if this is not clear. My goal is to use these stimuli in an fMRI experiment to see how the human brain perceive motion.

Here is an addon to do that (if my comprehension of the question is good).

To make it work, you need to associate the wanted objects (empties) in an object's group.

Then:

Choose the group in the UI
Set min and max values (the scramble part will take 3 random values in between and shift x, y, z with them)
Choose a seed if you want to repeat it with the same random sequence
Use the scramble button.

The scramble function is commented in the code below (other parts are simple UI):

bl_info = {
    "name": "Scramble animation locations",
    "author": "lemon",
    "version": (1, 0),
    "blender": (2, 78, 0),
    "location": "",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "category": "Animation"}

import bpy
from random import Random

def ScrambleObjectAnimation( object, scrambleMin, scrambleMax, rnd ):
    #If there is an animation
    if object.animation_data:
        #Get random values to shift/scramble x y and z
        dx = rnd.uniform( scrambleMin, scrambleMax )
        dy = rnd.uniform( scrambleMin, scrambleMax )
        dz = rnd.uniform( scrambleMin, scrambleMax )
        delta = [dx, dy, dz]
        #Loop on the animation curves that correspond to the location
        for curve in [c for c in object.animation_data.action.fcurves if c.data_path.endswith( 'location' )]:
            #Shift all control points of the curve
            for key in curve.keyframe_points:
                key.co[1] += delta[curve.array_index]

def ScrambleObjectsAnimation( objects, scrambleMin, scrambleMax, seed ):
    rnd = Random()
    if seed > 0:
        rnd.seed( seed )
    for object in objects:
        ScrambleObjectAnimation( object, scrambleMin, scrambleMax, rnd )

def SettingsAreOK( context ):
    return True

class ScrambleObjectAnimationOperator( bpy.types.Operator ):
    bl_idname = "lemon.scrambleobjectanimationoperator"
    bl_label = "Scramble objects animation"
    bl_options = {'REGISTER','UNDO'}

    @classmethod
    def poll(self, context):
        return context.mode == 'OBJECT' and SettingsAreOK( context )

    def invoke(self, context, event):
        scn = context.scene
        settings = scn.scrambleObjectAnimation

        #try:
        objects = bpy.data.groups[settings.group_name].objects
        scrambleMin = settings.scramble_min
        scrambleMax = settings.scramble_max
        seed = settings.seed
        ScrambleObjectsAnimation( objects, scrambleMin, scrambleMax, seed )
        #except:
            #pass

        return { 'FINISHED' }

class ScrambleObjectAnimationPanel( bpy.types.Panel ):
    bl_idname = 'lemon.scrambleobjectanimationpanel'
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_label = "Scramble objects animation"

    @classmethod
    def poll(self, context):
        return context.mode == 'OBJECT'

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

        settings = scn.scrambleObjectAnimation

        layout.row().prop_search( settings, "group_name", bpy.data, "groups", text="Object group" )
        layout.row().prop( settings, "scramble_min" )
        layout.row().prop( settings, "scramble_max" )
        layout.row().prop( settings, "seed" )
        layout.row().operator( ScrambleObjectAnimationOperator.bl_idname, text="Scramble" )

class ScrambleObjectAnimationProps( bpy.types.PropertyGroup ):
    group_name = bpy.props.StringProperty()
    scramble_min = bpy.props.FloatProperty( name="Scramble min", default=-1.0, soft_min=-10, soft_max=0, step=2, precision=2 )
    scramble_max = bpy.props.FloatProperty( name="Scramble max", default=1.0, soft_min=0, soft_max=10, step=2, precision=2 )
    seed = bpy.props.IntProperty( name="Seed", default=0, min=0)

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

def unregister():
    del bpy.types.Scene.scrambleObjectAnimation
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


How to trace the path of an object in the video editor? Suppose I have a movie showing an object (such as a bird) moving around.  I would like to use the video editor to add a line behind the object showing the trajectory.  Does anyone have suggestions on how to accomplish this?  I've tried using the UV/Image editor to add a dynamically changing mask but am unable to figure out how to apply a color to this dynamic mask.  Perhaps this is the wrong approach?  Any help is appreciated, thank you!

Combining colored elements is easiest in the compositor.

I would also suggest using 3D to create the colored line as Blender has good visual tools in 3D. Just use a Shadeless or emitting material to make it monochromatic.

Then mask out the part of the bird, which shouldn't be covered by the line.

Render it with transparency and use a mix node in the compositor. Check the invert button in the mask options (in the image editor) to invert the mask.


How do I draw a circle in a location in my video I'm new to Blender and am looking for guidance on how to do a simple task for a research study that I will be running.

Basically, I have a short video (<5 seconds long) of a dog barking. I wish to insert a small, flashing white dot (appears for 500ms) onto the video as a location and time that I choose. (This sounds random, but it's important.)

Could someone please talk me through the steps to do this? Or point me to a tutorial about something similar?

Thanks :)

In blender's VSE we don't have exact control of timing, we can only align to a frame. To get a timing of half a second you will want to use an even number of frames, at 24 fps 12 frames will be 500ms.

To get the dot in place you want an image of the dot, save it as a png so you have the alpha channel to easily clear out everything but the dot. In the VSE add the image, ensure it is above your video, then in the strip properties N set the blend type to Alpha Over and set the frame length what you want.

To position the spot, under strip input, enable Image Offset and change the X and Y values until it is in place. You could also create an image the same resolution as your video and place the dot where you want it.

Then smile as you see the dot on your video.


Reconstruct a plane and keep UV intact This is probably simple, I want to remove some unused space since it takes up lightmap space in my game

Basicly I want to remove the red part but keep the green withsame texture cordinates so I need to correct UV somehow.

Mesh looks like this in blender 2.8

So basically I want to shrink down to the 3D cursor, but also remap UV.

edit: I solved it just because it was even measures. The wall is 4 meters tall and the wall I want is 1 meter. So i moved down the vertices, now the UV is wrong. Than I moved the top vertices in the UV mapping down from 1.0 to 0.25. Must be a more bullet proof way of doing it?

Use a knife or loop cut to break the square in half, then delete the extra vertices.


Realigning the Axis to Geometry Okay so like many other people I have asked this question into google and gotten back some VERY complicated answers on how to do this. All I want to do is have the XYZ axis move itself into position relative to the object and it's orientation when in local mode.

Easy right?

Seems not. Every answer relies on hooking, creating an empty .. or doing a bunch of other things I can't remember and every time I have this problem its crippling.

Even in Second Life .. YES SECOND LIFE .. you can just pop into local mode and your axis behaves itself properly. Why the hell is this so damn hard to do in blender.

Perhaps I'm missing something, perhaps I've asked the question wrong (in the 96 different ways I've tried to ask it). Youtube videos on this subject often don't solve the problem and the few that do usually are non verbal and don't explain what the hell they did to reorientate.

So my question is more ... why can't blender have this functionality where in Local mode the axis just orienatates to the geomtry you're editing or moving?

And I'd be eternal grateful if someone can give a simple, comprehensive explanation how to get my axis to align to my geometry and stop me from going insane?!?

As you can see from the pic below .. my axis is fine on the Z .. but X and Y are not being helpful at all. All I wanna know is how do I get this to work properly. Local mode REALLY should automatically reset the axis to follow the object .. don't you think?

I appreciate any and all answers .. espeically those that sort out this problem. And if any Dev's for blender are reading ... seriously if Second Life can do this .. why not blender?

Create a new transform-orientation based on sub-object (component) geometry, like edges. The Z-axis will point in the direction of the cross-product of any two edges selected.

If you are not familiar with that term, the cross product is the vector that is normal to 2 other vectors. Keep the following in mind as examples:

The Z-axis is the cross-product of the X and Y-axes;

The X-axis is the cross-product of the Y and Z-axes;

the Y-axis is the cross-product of the X and Z-axes;

(You can also look up "cross-product" or "Right Hand Rule" for a way to visualize general cross-product vectors. It is not necessary to know the math to visualize a cross-product)

The cross-product of 2 vectors is perpendicular (in 3d we say "orthogonal" or "normal") to the plane the 2 vectors are in:

Say I wanted to create this fan shape so that it was oriented to the curvature of the bookshelf. The shape is a quarter-circle in the plane that I could have made a few ways, but I did it by rotating duplicates of edge components about this corner (the cursor is placed there and transformations are oriented about the cursor). To do that, I first had to get my transform orientation right. I did that by selecting the 2 orthogonal corner edges shown here, then creating a new transform orientation from that, as shown below:

This is the result:

Notice that the transform orientation is still usable even after returning to object-mode:

Now I was able to rotate edge duplicates about the corner, in a plane that is normal to the bookcase. Rotations are done about the new Z-axis in this orientation.  Big-picture:


Interface goes in and out? I have looked through the other things, and can't find what I am looking for. I do believe it has to do with some setting that is effecting the video card settings, but anyways I have an Nvidia GTX 1050, should be plenty to at least OPEN blender... Though, as soon as it gets opened, as I move the cursor over the screen, or click anything, the whole screen goes in and out (like my monitor is about to go out, but doesn't when Blender isn't open so it isn't the monitor). It is so annoying, like every second, so I can't even really use it, as to even attempt to make a piece of paper would cause it to go in and out 1000x times.

I have gone through the user settings and made sure it is using the Nvidia video card (I have another one Intel UHD 620), and it is. So that isn't the problem. I did change the resolution as well, as my 2in1 has a 3000x2000 and I zoom it 200% so not sure if the resolution is also not causing the issue.

This problem is usually caused by a maxing out of a certain part of your computer. The CPU might be lagging, or something else might not be working.


Simulate a sticky fluid in Blender I'm trying to simulate a fluid that gives me a fresh paint effect, once it is on the object the liquid drips and lets the object dirty (with some drops)
Actually, the "best" result i got is setting high viscosity, low speed for the fluid and no slip for the obstacle, but in any case the fluid does not stick to the object.
Any suggestion?

Thanks

As far as I know this is not possible with fluid simulation itself. The fluid sim does not do sticking itself to a surface as a feature (sometimes you get it as a bug).

Workarounds i can think of:

Stop the fluid sim at the point where it should stick and apply the modifier making the mesh solid.
Use dynamic paint modifier with the fluid sim mesh as a brush. Use the resulting paint output with a bump map to give it some texture.


What is the pipeline for a project that needs Cycles renders for still images and Eevee renders for animation? Is there a way to achieve this in a non destructive way, having both settings on the same project?
At the moment, the only solution I see to this is just to having the project completely finished and then duplicate it for the different render settings, because the outputs are fundamentally different.
I am using mostly the HDRI image as a source of light, and I think this is sending Eevee crazy: in fact I need to disable the World in the viewport, or everything looks almost white.

Material output can luckily be directed to one or the other rendering engine, so one can easily compensate for the lighting limiations of Eevee by using a different output material on the same shader graph.
This helps greatly by not requiring to add and switch materials in the objects, it all happens inside the same material node graph, and also projection, images nodes etc. can be shared.


Assign Property Value with Message Body I'm looking for a way to have object 1 assign a random value to property "Gold". If the property value turns out to be higher than 10, I have a Property Sensor to check for that, and if it's true, it will activate a Message Actuator with the subject "Add Gold" and the property "Gold" as the body type (Not text).

In my head, this will embed the property "Gold" into the message "Add Gold" that is being send out to other objects.

Now, in object 2, I have a Message Sensor that looks for a message called "Add Gold". This is then connected to a Property Actuator which will add the message to the property "Total Gold".

The problem here is that this does not seem to work, and I'm not sure what I'm doing wrong.

Object 1 logic that will embed the value "Gold" to a message and send it to Object 2.

Object 2 logic that will look for added gold message, and add the value in the message body to it's property "Total Gold".

I have the information sent to a Game Controller (Empty object) which handles all important global information so far. On my HUD screen, I have a counter working as a total resources counter, which includes among others, the gold values I want to send. The HUD counter then copies the property value "Total Gold" from the game controller, but nothing appear on the HUD (The counter starts, and stays at a -1 value, even after picking up the resource boxes (the grey ones being dropped by the yellow cubes)

I have done a simple test and it did  not work without a value to add to the property. You need to have your logic like this:

The script only activates the actuator "Message", which send the message.

logic.getCurrentController().activate(logic.getCurrentController().actuators['Message'])

And if you dont set a value e.g "15" to add on the property actuator it will not work. You can't do ( + 0 = ?).

EDIT

I failed to make the random actuator work, but it's very easy with python.

For the mineral object: (You may already done this!).
1. Make a proterty call mineral
2. Add a collision sensor(True level triggering) with property player < and > edit object actuator - end object.

For the player object:

Make a proterty call player
Add an always sensor an a python controller
Add a collision sensor(True level triggering) with property mineral to the python controller

Script:

#import needed libraries
from bge import logic
import random

#main function or module.
def main(controller):
    # Param controller = bge.logic.getCurrentController
    #eval if collision sensor activated
    if controller.sensors['Collision'].positive:

        # Gold attr = gold attr  + Random num
        controller.owner['gold'] += random.randint(10, 50)
    print(controller.owner['gold'])

#Game update######################## every frame if always sensor true level triggering

#call function
main(logic.getCurrentController())

EDIT

to send the message use:

controller.owner.sendMessage('subject', body = str(controller.owner['gold']), to = 'object' )

and retrive it:

if logic.getCurrentController().sensors["Message"].positive:
    gold = logic.getCurrentController().sensors["Message"].bodies[0]

Api sendMessage

Api messageSensor.bodies


Multiresolution Modifier and N-gons While retopologizing a human head, the internal cavities i.e. nose, mouth, ear, eye lids, were extruded inwards to create the required occlusion effect.
While all the mesh is in quads, the final face in these cavities is an N-gon. After applying the multi res modifier at latter subdivisions, the single ngons turn into a jutting irregular triangular mess. Even when smoothed in to disappear in sculpt mode, they retake their shape at saving or changing modes.
Is there anyway to exclude these n-gons or subvert this effect without doing major changes to the retopology?
Can I at least prevent them from penetrating to the exterior?

What I would suggest is turning the faces into quads or tris, like by poking (Ctrl+P). I don't know how exactly you want to save your original topology, but this shouldn't visibly change anything from the intended shape.

Alternatively, if you're sure nobody will ever look up the nostrils (if this is a demo render, etc) then you could just remove the faces. however, if you're planning on texturing it open holes in the geometry can cause problems for volumetric or subsurface shaders.


How to avoid the wrinkle at the poles of the UV sphere? When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.

How can I avoid it?

I've read the article How to handle distortion at the poles of a UV sphere? but there seems to be no clear solution.

UPDATE 1

I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.

UPDATE 2

I followed josh sanfelici's solution, but still there is an artifact at the pole.

Here is the screen: (A rendered view with a sun lamp)

Maybe it's the limitation of the general-purpose subdivision modifier.

BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable.

The wrinkles are generated by the triangles that connect the pole to the rest of the mesh. Even quads with one side much longer than the other can lead to similar problems, expecially with subsurf.
My favourite way of get rid of it is to delete the pole vertex, loop select the circle, extrude and scale down until near of the center, then Ctrl+F Grid Fill.
Then select the new central pole, activate the proportional editing  with sphere falloff and grab the pole to the old position, that can be "marked" with the 3D cursor (Shift+S cursor to selected).
Then you can expand your selection with Ctrl++ and use the "smooth vertex" function in the toolshelf T.

You'll have to do some experiments: if the last circle is near the pole you'll have artifacts, if it's very distant you'll have to set the sphere "by hand", also the smooth vertex function requires some manual adjust. If you need perfect sphere use icosphere instead.


Changing the color of non selected edges in the theme preferences There is an option to change the color of various edges (selected, seam, crease...)in the themes menu, but not for the simple non selected edges. there is a way to change the black color?

In the preferences you could change the Wire Edit color.

This influences the non selected edges in edit mode:


Colorful glass material on aeroplane How do I get that effect on the glass just like the one shown in the pic below

I would start with:

Surface: Principled BSDF
Roughness: 0
Transmission: 1

In the material settings, enable Screen Space Refraction

In Eevee:

Enable Screen Space Reflections and within that, Enable Refraction

The last step is to go back to the material and set the IOR (Index of Refraction) from 1.45 to 1.00.  That will make the material completely transparent like glass.

Then, adjust the Metallic value of the material to give you that mirror-like reflection you're looking for.

Finally, to get the irridescence click on the dot to the right of the Base Color and select Noise Texture.  Set the Dimension to 3D, and adjust the Scale, Detail, and Distortion to your liking.  I found Scale = 2.5, Detail = 1.0, Distortion = 0.1 worked pretty well.

You can dig into this further by going into the Shading Editor and working with this directly with nodes, but this approach gives you what you're looking for without getting into that detail:


how to create fluid simulation in glass? how to create fluid simulation in glass?

There is a video you should be able to figure out the minor  changes but other wise there.
https://m.youtube.com/watch?v=YgwKPP2ZEjI


Quadripedal Rigging: Twisted limbs I'm still pretty new to blender so no hate. I have a quadrupedal rig that I built from following an online tutorialTutorial Here! I am trying to find out how much of the processes in this video are necessary because I've seen and read about different ways.

This is my rig.

In the tutorial, and in my blend, the IK limbs ended up twisted. He corrected his. I'm not able to as well as he did. Is there a standard way to prevent this in the future?

I set up pole targets, but how necessary are they really? I've seen rigs do without them and they seem to cause confusion(at least for me). Do the pole targets cause the twisting?

Finally, I have placed the IK constraints on the upper limb, as the video instructed. Is this best or is it better to use the lower limb?

Also, if anyone has any better suggestions for learning material on this topic I'm open to it. This was just the most recent tutorial I could find.

If the IK constraint isnt pointing at the pole target the right way, you might want to try changing the pole angle

also, looks like you need to recalculate the normals on your mesh because the leg looks flipped inside out.


Creating vertices at mouse position is very off I am trying to create a vertice at my mouse position with python. This is my code to get the location:

`       region = bpy.context.region
        space = bpy.context.space_data.region_3d
        x, y = event.mouse_region_x, event.mouse_region_x
        loc = bpy_extras.view3d_utils.region_2d_to_location_3d(region, space, (x, y), (0,0,0))

. This is what happens:

Add vert on left mouse click

Further to this answer added code to add vertex on left mouse click. (Using method explained here)  Added a list to class to hold the newly added vertices, as suggested via this question.

Things to note:

Vertex coordinates are  local coordinates, whereas the calculated 3d cursor position is a global coordinate. To convert global to local the global vector is multiplied by the objects matrix world inverted.

A class property for the matrix world inverted, similar to setting cls.bm for bmesh to avoid inverting the matrix each time.

When writing operators or panels, very rarely (if ever) do you need to access context via bpy.context.  If context is an argument use it.  I often use context = bpy.context atop of test scripts as a convenient way to later copy / paste into code where context is defined.

import bpy
import bmesh
from bpy_extras.view3d_utils import region_2d_to_location_3d

bmeshes = {}

class Modal(bpy.types.Operator):
    bl_idname = "object.modal"
    bl_label = "Modal Op"
    bl_description = "Other thingy"
    bl_options = {"REGISTER"}

    bm = None
    added_verts = []

    @classmethod
    def poll(cls, context):
        return context.object and context.object.type == 'MESH'

    @classmethod
    def bmesh(cls, context):
        me = context.edit_object.data
        cls.bm = bmesh.from_edit_mesh(me)

    def invoke(self, context, event):
        bpy.ops.object.mode_set(mode='EDIT')
        self.bmesh(context)
        context.window_manager.modal_handler_add(self)
        return {"RUNNING_MODAL"}

    def add_vert(self, loc):
        v = self.bm.verts.new(loc)
        self.added_verts.append(v)

        return v

    def modal(self, context, event):
        # no longer in edit mode
        if context.mode != 'EDIT_MESH':
            self.bm.free()
            self.bm = None
            return {'CANCELLED'}
        ob = context.edit_object
        me = ob.data
        if self.bm is None or not self.bm.is_valid:
            # in edit mode so try make a new bmesh
            self.bmesh(context)
        if event.type == "LEFTMOUSE" and event.value == "PRESS":

            x, y = event.mouse_region_x, event.mouse_region_y
            region = context.region
            rv3d = context.space_data.region_3d

            loc = region_2d_to_location_3d(region, rv3d, (x, y), (0, 0, 0))

            v = self.add_vert(ob.matrix_world.inverted() * loc)
            v.select = True

        if event.type in {"RIGHTMOUSE", "ESC"}:
            self.bm.verts.index_update()
            bmesh.update_edit_mesh(me)
            print("added", self.added_verts)
            return {"CANCELLED"}

        if event.type in ["WHEELUPMOUSE","WHEELDOWNMOUSE","MIDDLEMOUSE","LEFTMOUSE"]:
            return{"PASS_THROUGH"}

        return {"RUNNING_MODAL"}

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

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

if __name__ == "__main__":
    register()

Btw. If you put minimal working code into your question it would be a lot easier to work out where your particular mistake is.


How do I use IES lighting with a sphere? ( Hey,everyone! I'm in a bit of a pickle. I created a wonderful IES node setup thanks to an amazing tutorial and it works with planes and circles. However,I'm having trouble with one mesh in particular,the sphere. When I use a sphere to try and light my scene,its curvature the light scatters incorrectly. Could someone please tell me what can I do to fix this dilemma?

Lights

Plane:

Circle:

Sphere (specifically,hemi):

Node Setup

Thanks to a little advice from my commentor,Jaroslav Jerryno Novotny,I figured it out. For the first Mapping node connected to the Geometry Normal socket,change the Z-axis scale from 1.000 to 0.000. I know you're facepalming right now because this question was stupid and it had an easy answer,but c'est la vie.

Solution


Place a video on a still picture of a monitor I want to combine a video and a static image in Blender. The image shows a monitor and I want to place a video on its screen. How can I do that?

Visit the following site for instructions: https://www.maketecheasier.com/blender-3d-virtual-video-screens
Or, if you have Import Images as Planes add-on, you may do this in BI, too, as your video/image is mapped correctly after it's imported. It's possible to model such "a screen" and join it with CTRL+J.

To have audio, do as follows:

Extract audio and video from your clip to have two separate files
Follow the procedure given in the tutorial using the video without sound.
In VSE combine it with the extracted audio


Hide Blender's grid floor programmatically When a new install of Blender opens, there is a camera, a light source, a cube and a matrix of vectors on the x,y 16x16 plane.

As I do not know what this is called, I cannot search for it to switch it off or change its values.  I've checked Neal Hirsig's grand reference, and gone through the User Preferences, but cannot find what I'm looking for.

What is this reference vector matrix called?  How can I modify it?  I want to toggle it into/out from my 3D ViewPort Editor Window.

EDIT: OK we know it is now called the grid floor, but I need to toggle it programmatically and didn't ask for that at first.

bpy.types.SpaceView3D.show_floor = False

does not appear to work in code.

To show or hide the grid floor you must first find the 3D view space, then use the space's show_floor porperty:

import bpy

def find_3dview_space():
    # Find 3D_View window and its scren space
    area = None
    for a in bpy.data.window_managers[0].windows[0].screen.areas:
        if a.type == 'VIEW_3D':
            area = a
            break

    if area:
        space = area.spaces[0]
    else:
        space = bpy.context.space_data

    return space

space = find_3dview_space()
space.show_floor = False

What you tried to do is to access the SpaceView3D type, which is the class of the 3D view space object. You cannot access methods directly from the class, but rather need to find the object instantiating that class as specified above.


Why won't my object follow the path I give it? When I apply the curve modifier to my fence that I have it put it somewhere totally random on the screen and doesn't follow the curve at all?

ensure both the outline and the fence element share their origin.

eg, like this, before enabling modifiers:

then, if you enable them:


When I create a mesh and try to select a previous mesh, it selects them both as if they were one object I was modeling a tree trunk and I placed the origin cursor on the trunk and added an icosphere. But when I tried to select one of them with the mouse it would select both at the same time as if I had joined them (which I know I did not).

Thank you to anyone who answers :)

If you add a mesh while in Edit Mode, the mesh will be part to the selected object. In an object you can have many different meshes, even if they don't share any vertices.

If you want them to be two different objects, exit Edit Mode add the new mesh while in Object Mode.

Anyway, you can select the added mesh and separate it (Press P).

For a detailed explanation on the difference on creating objects in edit mode and object mode read:
Why can't objects in Edit Mode have their own name?


Displaying airflow inside of an engine model Okay so basically I have a model of an engine.

The purple shows where all the gas and yes gas not liquid should go. It must collide and be held in by a couple moving parts.
The first thing I tried was to use a particle system. The collision stuff was waaaay too bouncy so I tried to use a follow curve forcefield. And after getting frustrated with that I tried using a smoke sim and smoke colliders and the air would not even go into the top. The inside and outside mesh are one in the same if that matters. And if so should I attempt to separate the two?

So I gave up and was going to manually edit a bunch of frames in GIMP but that was waaaay too much. So now I am here after many hours.

Would it be best to use a fluid sim and forcefields? Or is blender just not the software for that kind of thing?

Smoke seems like the correct medium to display airflow. Since Blenders smoke does not support suction, you'll have to fake the flow using multiple Forcefield.

Model a simplified collider and mark it as a smoke collision object.
Add an emitter which is fitted into the collider.
Add a forcefield to direct the smoke.

If you use multiple forcefield, make sure they don't intersect by using the maximum distance and falloff properties.

In the smoke domain, decrease the temperature difference to a small value. Otherwise the smoke will drift upwards or downwards on its own.

Hide the collision object before rendering.

Connected smoke interacts. This enables us to fake suction by filling the whole domain. I filled the whole domain with red smoke, except for the entrance. After the first frame, no red smoke is emitted (keyframe the Volume Emission), but green smoke is continuously being emitted. The green smoke will now get pulled even though it does not intersect with the forcefield.

With rgb colors, we can extract the color information and use it as a mask for rendering.


Hair particles not following curve modifier :( Happy Holidays everyone :)

I'm making a holiday special simulation this week but I can't do that if my garland is just a string.

The zig zag tube is the emitter which represents the string and the spiky things are the "leaves" of the garland, for lack of a better word.

Sad to say these leafy hair particles are just ignoring the curve modifier. :'(

Any help would be greatly appreciated :D
I also need my personal project finished before Dec. 31 :)

The order of modifiers matters. In your case, Blender creates particles first and then blends the source mesh by the given curve. Just move the Particle Modifier down in your modifier stack.

Also check if you enabled Use Modifier Stack under Particles > Emission by accident.


How to remove all booleans (across all layers) from being displayed? I have many layers with many objects with many booleans. Is there a way I can "un-display" all of them in the viewport?

Essentially, I'd like all boolean modifiers (across all objects and layers) to have the "eye" icon un-clicked.

Remove the modifiers from one object. Select all the other objects you want to remove the modifiers from, making sure you select the object with no modifiers last. Press ctrl + L and select Modifiers.

All the modfiers will be cleared from every object you selected.