Broken Add-on (only for one person though?) So, I have been trying to create an add-on and with help from the community and lots and lots of snippets and videos, I am up to version 1.2.

Over the last few versions I have had a few thousand people download the add-on, but now one person is having trouble with it.

For him, the panels open but show nothing and when he checks the Info, it shows an error.

Now I know for sure that the code it mentions in the error is slightly broken anyway.

It toggles the information text.

The error points to line 2935 ?

but this same script works for everyone else, why would this now happen to this person?.

He is using the same version of blender as I am (2.80) and is also using a Windows, so there should be no difference.

If someone could help me figure this out or have suggestions I would greatly appreciate it.

I could also post the full code if that helps or link to it here

Here is the error message followed by the section of code around line 2935:

Traceback (most recent call last):
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\Darkfall VFX Nodes1_2.py", line 2935, in draw
    icon="TRIA_DOWN" if obj.expanded else "TRIA_RIGHT",
AttributeError: 'NoneType' object has no attribute 'expanded'

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

        box = layout.box()

        row = box.row()
        row.prop(obj, "expanded", # Line 2935
            icon="TRIA_DOWN" if obj.expanded else "TRIA_RIGHT",
            icon_only=True, emboss=False)

It is possible that the user has put Blender into a state where context.object could be None by having no selected objects. For example, if a user deletes the selected object, there will be no selected object. It could also be that this is a side effect from another addon (one that deselects all objects, for example).

I am able to reproduce this error by starting with a new .blend file and deleting the default cube. I am also able to reproduce the error by running the following script in the text editor:

import bpy
bpy.context.view_layer.objects.active = None

You may want to handle the case where context.object is None. One way to handle this is by adding the poll class method to the panel. The draw method will only run if the poll method returns True.

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

EDIT: I took a closer look at your script. The only reason an object needs to be selected is because the expanded property is stored inside of an Object. The object is not used elsewhere in drawing. I would consider a small redesign so that the property is stored somewhere else so that it is not necessary for the user to have an object selected. An example could be to store the property in the Scene object. Here is an example for how this could be done:

class Sub1Panel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "clonepanel"
    bl_idname = "OBJECT_PT_clone"
    bl_space_type = 'NODE_EDITOR'
    bl_label = "Clone Node"
    bl_region_type = "UI"
    bl_category = "Darkfall VFX Nodes"
    bl_options = {'DEFAULT_CLOSED'}
    bl_parent_id = 'OBJECT_PT_toolseffect'

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

        box = layout.box()
        row = box.row()
        row.prop(scene, "Sub11Panel_expanded ",
            icon="TRIA_DOWN" if scene.Sub11Panel_expanded else "TRIA_RIGHT",
            icon_only=True, emboss=False
        )

        if scene.Sub11Panel_expanded:
            row.label("label")

def register():
    bpy.utils.register_class(Sub11Panel)
    bpy.types.Scene.Sub11Panel_expanded = bpy.props.BoolProperty(default=False)

def unregister():
    bpy.utils.unregister_class(Sub11Panel)
    del bpy.types.Scene.Sub11Panel_expanded


How to change the alignment of a newly created primitive object When I add cubes, for example, this always happens in view mode, regardless of which view mode I choose.
How is this possible ?

After adding a new cube, open the last action editor and set the Align option to World instead of View.


Texture Painting object stays black I'm trying to texture paint a donut for a beginner's blender tutorial but for some reason the donut stays black when I try and paint. I've made a texture so I'm not sure what I've done wrong.
https://gofile.io/d/Qy2O5F

Because you have created a Texture brush, and it was black, you need to close it:


Imported openVDB sequence from another scene moves around randomly Like the title says, I did a smoke sim in another scene and tried to import the vdb sequence to a new one and the whole volume moves about semingly randomly, please help im ripping my hair out over here!

It has to do with the adaptive domain and how to origin is imported


Texture is missing in Cycles? Because I am pretty new to blender I watched the tutorial Introduction to Texturing with Cycles in Blender from BlenderCookie.com.

I loaded this texture onto a sphere but then in all views the texture is just some kind of blurry with no details.

The problem is that your texture does not have any mapping defined.

To fix this, you can either UV unwrap your object, or use the Texture coordinates node.

To UV unwrap a UV sphere, all you need to do is:

Select your sphere and enter Edit Mode (Tab)
Select all (A)
Press U>Sphere projection while in side view.

For more info on UV unwrapping, see this post.

There are also ways to map images without UV unwrapping, such as Blended Box Mapping:

The Mapping node is used to scale up the texture.


How do I open up a window I have closed in blender? I opened up a new viewport window to move lights, adjust camera, etc which was just grayscale. When I meant to close the new window, I accidentally closed the window that had my materials rendered on the screen so there is no color being rendered. What do I do to get the colors back?
This image should have pink, brown, and blue...

This image should have pink, brown, and blue but it's just grayscale

In the top left of any viewport window you'll find this button:

You can turn any window into any other type of window from here, and completely customize your workspace.

In your case, you were in the 3d viewport, but you were in either rendered mode or material preview, and now you're in solid mode.  You can switch between these by pressing Z while your mouse cursor is inside the viewport, or using these buttons in the top right.

Last, if you don't know what you just closed, you can create a new workspace of the type you were working in, here.

You can delete the old workspace and move on like nothing happened.


How do you make a loop cut a straight line (not follow the contours of the mesh)? I was watching a tutorial video (Which you can find here) and at the 18:00 mark he creates a loop cut, then appears to press 'S' (scale) and mashes a few other keys that aren't displayed and the loop cut suddenly becomes completely horizontal and no longer follows the contours of the mesh.

What is happening here and how can I accomplish this, or something similar?

He presses SZ0, which scales the selected vertices to 0 on the Z axis, flattening them.

Another useful shortcut is E during edge slide, which aligns the new loop to one of the adjacent loops (press F to switch between loops).


How to get a perfect circular UV unwrap projection? When I UV unwrap this mesh, I got those "non-circular" projections. They look weird and non-aligned...

I want them perfectly circular. What's the proper way to fix that... or isn't it possible?

As @lemon suggested me, the proper solution is selecting the right faces in the 3D Top View and UV wrap them with the Project From View option. (UProject From View).


How can I achieve a Anime Shader look in Blender? So, i saw a post in this Stack about 2 years ago but nobody had awnsered, so im trying to ask another time, does anyone know how to actualy get this Shader in blender 2.8? Somehow they have controls over the shading, and normals. And the shader draws smooth lines around the edges. Here are more examples.
I would like to know, what kind of settings, what kind of stuff I should be looking for, to copy this style with blender, or if anybody pro enough to create a short tutorial it would be amazing!
Here are my examples.

Animation:
https://twitter.com/twitter/statuses/916984184035360768
This here is actually created in blender. https://orig00.deviantart.net/f78a/f/2015/056/9/e/untitled_by_keiichiisozaki-d8jfztd.gif

I specifically made a long playlist where the main characteristics of stylizing a shader play a big role in your character considering:

Vertex painting (to create specific shadows) use separate RGB to create filter for channels that can be later used as specular, reflective, etc. maps.
Using a threshold to limit the light (aka Ramp Shader)
Many math operations between results to ADD light or Multiply it (darken) in the shader editor.
Modeling in regards to how the normals will be affected by light. This is tangent and crucial.
You can copy "simplified" normals from less dense polygonal objects, since you want a very "flat" shading and not light-computed-accurate shaded models. Use the Edit Normals modifier.
Textures can also be used to create masks, so you can have flat colors but limited by black/white textures.
PLANNING a GOOD 2D CHARACTER REPRESENTATION is a MUST! You can't jump into 3D without proper knowledge of what makes your character look 2D.
Mask out any unwanted light shedding on the model. Use alphas in the image node textures.
You can watch more details about these points from simple to complex examples in this series for BLENDER ONLY >>
You can use occluding meshes to create fake shadows. Create a "transparent material" but shadows are opaque. You don't see the occluding material shader, but the shadows will be on top of whatever you want to cast shadows to.


Render sphere surface to HDRI? I want to bake the surface of a sphere to a equirectangular HDR texture. Is this possible?

For baking I did not find an option to bake HDR. My approach was to use a sphere with backfaceculling and a panorama camera inside it, but that results in different lighting as the normals are different:

The surface parameterization should support baking directly to HDR. Am I missing something? Help? :D

Something that I tried was rendering it as a mirror ball panorama, but the conversion to equirectangular resulted in some artifacts.

When creating the image, check the 32 bit Float option:

Bake whatever you want into the texture, in your case you want the Combined bake type. I suppose your sphere is correctly unwrapped into a square layout.

Your texture will have the full dynamic range you need.

Save the texture in your favorite format (Image Editor, F3), .hdr is an option.


How to get rid of geometry protruding inside while sculpting? This is the problem I'm stumbling upon a lot recently. You start sculpting on perfectly flat surface, then you make some creases, maybe deeper creases, or maybe you are building geometry with inflate brush inside a hole like eye socket, but eventually this happens - you have a crease in your geometry that is so deep that no amount of smoothing or scraping is going to get rid of.

Actually when you look at it in edit mode it looks like a bubble of geometry that is stuck under the "skin" of your model. The only way to repair this place is to switch to edit mode and then just remove offending geometry vertex by vertex, then close the hole with some polygons or even one big n-gon and then you can sculpt in this area again.

My question is - is it possible to flatten or smooth (repair) such area quickly, with sculpting tools, without going out of sculpt mode?

Please take a look at these images:

The view from inside of the head, offending geometry looks like an air bubble:

You should be able to fix this with the smooth brush. Just go over the required area and it should get rid of the bubble. Just be careful to not set the strength of the smooth tool too high. Otherwise the flatten brush will help to. To stop this from happening in future you can use the mask brush to paint the area you don't want to affect.


What tool can I use to explore a scene created with blender? I want to use a generic tool/game/app (either on PC, or on Android, or as a web page) that loads a scene, and allows me to move around in that scene at eye level, and look around. It's not just for me, it's also for friends and family, so it has to be super easy to install and start.

15 years ago, I was exporting the scene as a Quake 3 map, then I would just "play" that map to explore it. That was perfect: easy to install, easy to load a custom map, nice feeling of walking around.

What would be the right tool today?

You could put it on Sketchfab or just place it in Unity with the standard  player model


Materials not applying how the appear in preview (after rendering) So I've never tried using a texture before on a model but I was making a building and I wanted to give the door frames a 'limestone/marble' look to them so I popped in a texture and plugged it in from Image Texture to Diffuse to Output via color then BSDF ports. In the preview it appears like it came out good but when rendering my texture is a rather flat color similar to the texture I used. Image to show what I mean, thanks in advance.

What you need is to input some sort of texture coordinate for Blender to map the texture to your mesh. All image textures require this.

What you needto do is to go to the Node editor and press Shift+A and add either a Texture Coordinate or a UV Map node.

Put one of the values into the purple Vector socket in your Image Texture node.

You can use any of these values, plug them into the same place as shown.


Import a .XYZ file as Displacement modifier? TL;DR

I used a program called L3DT to create a mountain-y terrain, and I saved the height map to a .XYZ file. Is there any way I can import this .XYZ file as a displace modifier in Blender? I don't want to use a generic Black and white file for the heightmap because there can be some confusion between the map and Blender, but .XYZ files store raw coordinate data for each vertice that makes up the terrain.

Process

First, I generate the .XYZ file in L3DT, which I have confirmed works and is not corrupt, as this is my .XYZ file in a Point-cloud viewer called LIDARview.

Then, in blender, I create a plane and subdivide it 100 times to add some geometry, then add a displace modifier:

How would I go from here? I can't use a .XYZ file as a texture..

Here's a link to the .XYZ file

It's an option. According to the document Using L3DT with Blender, you can export files in the OBJ format.

Played around with your file. Be carefully) a heavy construction. My computer freezes :

    import bpy
    import math
    import bmesh

    file_path = "D:\\terrain.xyz"

    def read_verts(file_path):
        verts = []
        with open(file_path) as myfile:
            for line in myfile:
                verts.append([float(x) / 500 for x in line.split()])
        return verts

    def create_faces(num_wid, num_heigh):
        faces = []
        j = 0
        for i in range(0, num_heigh * (num_wid - 1)):
            if j < num_heigh - 1:
                face = (i, i + 1,  i + num_heigh + 1, i + num_heigh)
                faces.append(face)
                j = j + 1
            else:
                j = 0
        return faces

    verts = read_verts(file_path)
    num_width = int(math.sqrt(len(verts)))
    faces = create_faces(num_width, num_width)

    # mesh
    mesh = bpy.data.meshes.new("terrain")
    mesh.from_pydata(verts,[],faces)
    mesh.update(calc_edges=True)

    # object
    object = bpy.data.objects.new("terrain",mesh)
    object.location = (-10, -10, 0)
    bpy.context.scene.objects.link(object)
    bpy.context.scene.objects.active = object
    object.select = True


Get/Set coordinates for UV vertices using Python I got this UV map, and I want to set the position coordinates for all the four vertices to x=0.5 and y=0.5 (in the center of the green pixel).

I've already tried to use bpy.ops.transform.translate(value=(0,0,0)), but this moves the vertices relative to the current position. Is there a way to set specific coordinates/position for the UV vertices?

The uv coordinates are stored in 'loops':

You set ob.data.uv_layers.active.data[loop_index].uv = (0.5, 0.5)

You can see how loops work here:

# Loops per face
for face in ob.data.polygons:
    for vert_idx, loop_idx in zip(face.vertices, face.loop_indices):
        uv_coords = ob.data.uv_layers.active.data[loop_idx].uv
        print("face idx: %i, vert idx: %i, uvs: %f, %f" % (face.index, vert_idx, uv_coords.x, uv_coords.y))

# Or just cycle all loops
for loop in ob.data.loops :
    uv_coords = ob.data.uv_layers.active.data[loop.index].uv
    print(uv_coords)


How to fix ngons overlapping wire edges? I am trying to make a retopo of my human head. But it seems that I already have several ngons because I couldn't create an edge loop.

So I checked it with mesh lint and it showed me the ngons

But the ngons are really quads as far as I can see.

Any idea why this is happening?

blend file

You have a large ngon face over the other faces. The same thing goes for the bottom of the nose and the chin. To fix this delete the large polygon and bridge the edges.

Select the large ngon faces:

Delete the faces only

Use bridge to add new polygons. Or you can fill them one by one using the fill tool: F

Do the same for the bottom of the nose and the chin.


Detach Individual Settings/Properties Tabs as Small Windows? Is there any way I can detach individual settings tabs to be their own windows in Blender 2.8 rather than it being stuck within the interface?

Thanks.

There is non, as far as I know properties windows tabs are not detachable.

But nothing stops you from having multiple of them open. As a workaround just duplicate the window and change active tabs on each instance.

Just press Shift while dragging from one of the corners to create a new secondary window and change tabs for each


Light Not Rendering - Cycles I am trying to render a house with cycles, and for some reason, it will not render the light. The .blend file is below.

I have a plane which I am using to emit light using the Emission feature of the surface property in materials. When I render the project, the image does not render the light which is supposed to emit from the plane

Thanks, everyone!

The emission shader is not assigned to the mesh.

Enter edit mode, select the emitter plane, select the material and click on assign:


How can I apply the Shape Key Driver to the Pose mode? I made a Shape Key to fix the jaw.

I have tested it by moving the F-Curve and I can see it change when the value passed 1.

And when I go to pose mode and change the jaw bone and come back to the driver, I can see the driver value changed too.

So which means I have set the armature and bone right.

But the shape key just doesn't change at all!

I have to move the slider manually again for it to change.

So looks like the shape key's value itself was overriding the driver value for some reason!

Could somebody please be so kind and tell me what did I miss!?

Much appreciated!

Recording

Set the driver to the value property instead of the mute one.


Keyframes not animating object When I try to key frame a plane it indicates with the yellow bar on the timeline that I have set the key frame, but as soon as I go to set another key frame or play the animation the yellow bar remains but the object goes back to normal.
When I play the animation the object is idle as if there is no key frame. I have already searched a while on the web for this and found something on it but it had no solution.

Your question is a bit difficult to understand, but I believe I am answering.

It being a plane should not make a difference.

It sounds like you need to add another keyframe. If I am interpreting your question correctly, you are inserting a keyframe, moving/rotating/scaling the plane, relocating the time cursor, and watching all of your transformations revert to the keyframed loc/rot/scale. You can animate by inserting that original keyframe, NEXT moving the time cursor, changing the loc/rot/scale, and finally keyframing again. The plane should now change it's loc/rot/scale between the two keyframes.


Why isn't the Loop tool add-on turning the selection into a circle? I'm trying to do a circle in a cylinder, I unchecked flatten as it was explain in the forum but it does nothing. I probably forget something.

It doesn't work if I put 100% influence, see the result:

Currently the Influence is set to 0%. If you increase it to 100% the selected vertices will form a circle.


Percentile alpha control in the Compositor? Is there a way to adjust the transparency of an image in the compositor with a percentage of the alpha of the original image?

(So images that pixels that are completely transparent stay that way, and pixels that are partially transparent stay the same relative to the rest of the image)

Yes by using math.

The alpha channel is a value from 0.0=transparent to 1.0=solid. A math node can be used to multiply alpha values by the value you want to use. Which you then feed into the alpha over Fac to combine the images. You can also use a CombineRGBA to join together depending on your needs.

While multiplying a zero value by 0.5 leaves it zero you can use math node to get values greater than 0.99 if you wish to only effect a non-transparent area.

You can also use less than to pass through unaltered values and add them together before the alpha over.


How do I successfully Import a humanik Maya character via FBX The image shows the skeleton with all its bones at the correct position but incorrect orientation. Behind that is the character's boot which is lying sideways so either the skeleton is not scaled properly or the character.

Recap:
Need to find out how to get bones to orient properly.
Need to find out how to get the shapes to orient the same direction as the skeleton.
Need to find out how to get everything at the correct scale.

I have been using an alternative FBX importer with good success rate.
You can download the tool and script at http://blenderfbx.render.jp/

The default fbx importer that comes with blender often could not resolve
rigs, and rotation and scale just get screwed. For fbx you will need to download an extra set of software, follow the installation instruction closely. After installing the software and the addon... importing fbx should be a breeze.

A MORE DETAILED INSTRUCTION by Eric huelin
Here are the handy concise instructions. You will need:
(Remember to check on the correct versions. This is accurate as on Feb 2016)

1 - Visual C++ download here: microsoft.com/en-us/download/details.aspx?id=40784
2 - UmConverter download here: umconv.render.jp
3 - BL_20150704 download here: blenderfbx.render.jp

Install Visual C++. Open the UmConverter zip folder copy into the blender.exe folder. In Blender File>User Preference>Addons tab>[ Install from file ] Select io_scene_bos_fbx.zip Check the box on the right [ ] [ Save as default ]. When importing goto File>Import>Bos FBX – Eric huelin


How to attach an armature to a model? I'm trying to get this rectangle to move based on the armature inside of it but it's not working.
Everything I've read told me to select both the armature and the model and then parent with automatic weights but nothing happens when I do that, not even an error comes up.
How do I fix this?

Are you sure you did With Automatic Weights? It really looks like you parented the armature to the cube, with the cube as the parent. That's wrong. The cube must be the child.
Make sure you select the objects in the correct order. The so-called active object is displayed orange. The so-called selected objects are displayed red.
The cube must be the child (=red), selected first in the viewport. The armature must be the parent (=orange), selected last. After you parented them With Automatic Weights (Ctrl+P in Object mode) you will see the hierarchy in the outliner. The armature is in the collection, and when you expand the node you will see the cube.

In Pose mode you can deform the mesh.


Making grass. Difference between hair particles and emitter? In many tutorials and books I read that making grass is better in hair particle mode, but can not find why. Emitter works much faster than hair type.
I try to achieve similar result with hair and emitter in the same scene. The first image was made using hair (grass and forest):

The second image was made using emitter:

I understood only one thing, the emiter isn't as detailed as hair.
What else?

Generally, hair is recommended because you can use Cycles particle hair options to get a decent grass shape. It can also be softer on performance due to Children. However, Emitter pulls ahead when you have a diverse set of grass objects. Load them into a Group, and have the particle system use the Group option. This gives better look and performance (assuming you have good grass assets), but requires more work to set up.

Overall, both options work and have their uses. As far as I can tell, hair is commonly recommended in tutorials because Blender Guru put out a good tutorial for Hair grass some time ago, and so the method caught on.


How can I change a property on a shared material depending on the object? I've just started using blender after using Cinema 4d for years. I have this trivial problem that I can't work out how to solve.

I have a material that I want to use on multiple objects, however I want to change the tiling of the material on depending on the object. In Cinema 4d I would just select the material tag on the object and change the tiling. I cant work out how to do the blender equivalent of this without making global changes to the material.

One way you can do this is to utilize the object's Pass Index located in the Object Properties tab under Relations. Set the Pass Index to whatever scale multiplier you want per object.

Set up your material to use the Object Info > Object Index output as the input to Mapping > Scale.

You will now have one material scaled differently for multiple objects.


Unable to install cube surfer addon by PyroEvil This is the error message I get every time I try to enable the cube surfer addon:

What am I doing wrong?

It should be an OS-related issue. this addon requires some higher Visual Studio Redistributable version installed, like 2010 or 2012. Then restart Blender, enable the addon again.


Snapping to faces problem, they snap to the inside of the item instead of the outside I'm trying to make a simple blade but I have a problem when trying to snap spikes onto my blade. They snap to the inside of the item instead of the outside.
Any ideas what could be the problem here? Again I'm fresh to Blender but I could not find a solution to this on my own I tried rotating the object but with no success.

This could be a problem of the normals being facing inside the mesh. Select all the faces and recalculate normals (provided all normals are facing inside). Then try snapping to the face.

The operator for recalculating normals is under the view header mesh menu. The hotkey is also displayed in the menu items.

Mesh -> Normals -> Recalculate Inside/Outside and Flip Normals

In case some of the faces only have normals facing inside, then select those faces and flip the normals.


Transparent object shaddows in volume material [Blender Internal] Currently I am fighting with lighting artefacts within a smoke simulation, when the lightsource is within the volume and especially also within a transparent object within this volume. (Note this question is about the old Blender Internal engine, not Cycles).

Basically I can show the problems with a simple demo setup

Ground plane which receives shadows from transparent objects
a container (cube) with a volume material, here a simple, constant density
a small cube which is transparent so the light can pass out. This small cube is located within the container
a simple point light within the small cube and thus also within the container and the voumetric material.

Note the following problems:

the floor within the volume is way brighter than outside, as if the volume material has a semi transparent bounding
the volume material does not interact properly with the light source (without encasing the light into the small transparent box, it would show up lit)
the volume also does not cast proper shadows onto the surrounding plane.

Is this a known problem (with BlenderInternal)? Is there anything I can configure differently to make it work? I could not find any option to make the volume material receive transparent shadows; on regular solid shading material, there is such an option ("Receive Transparent" in the shadow pane).

This problem is especially anoying with the smoke simulation, since there the adaptive domain object takes on the role of the volume container, thus creating a dancing bright patch on the ground as soon as some light source moves into the smoke domain.

The only workaround I see right now would be to use light groups and basically several clone copies of the light source...

After a lot of experimentation, my gut feeling says this might be a "bug" or shortcoming of BlenderInternal...

This being said, I'd like to share a workaround (sometimes you're in the unfortunate situation that you just can not switch to the Cycles engine, but have to pull matters trough with BlenderInternal):

the problems arise when other objects with transparent material do intersect with the volumetric material.
thus a partial workaround is to forego such intersections.

In the example shown, we can use the boolean modifier to cut away precisely the intersecting parts. Plus in addition we must take care to avoid fringe artifacts

add a boolean modifier to the cube with the volumetric material. Choose the ground plane as the other object, and switch to set difference operation. For this to work, in the case of the plane (which has no volume), we also need so switch to the "carve" solver (default ist "bmesh").
next we need to apply the modifier. The cube is now cut such as not to overlap below the ground plane anymore. To avoid problems with ray intersection solving, we should move up the cube by 1 blender unit.
Then add again a boolean modifier to the cube with the volumetric material; just this time we'll cut out the space taken by the small light cube. Use again the set difference operation.
next again apply the modifire. Then select the small light cube (which is still there, now sitting within the hole of the volumetric cube). Again to avoid problems with inferior/exterior tests, we should scale the light cube down by a tiny amount, so it is always clear it does not intersect with the volumetric material.

And voila, now it renders as expected:

In practice, it can be quite tedious and maybe impossible to adapt this workaround for the case of a smoke simulation. So bottom line, this is a problem and if anyone knows a better solution.....


How To Mirror Interpolation Mode I want to mirror my interpolation mode, how can I do that?
I have:

What I want (white thick line)

Open the N Panel in the graph editor and go to the F-Curve sub-panel.
Change the Easing Type of the left keyframe from Ease In to Ease Out.
Alternatively, while the left keyframe is selected, Right-Click > Easing Type > Ease Out.
Another solution, use the shortcut Ctrl + E > Ease Out while the left keyframe is selected.
Ease In:

Ease Out:


How to delete specific edge using python? Firstly, I am new to Blender. I am actually working on to create a hemispherical model with cell fractured property.

I have done this work manually and now I want to automate using python. I have written the code for the hemisphere and filling up the hemisphere using bpy.ops.mesh.fill().

My problem is when I created a hemisphere using circle and bisecting it, I have extruded one edge to another with proper dimension. But there is another edge that is occurring based on code. I am unable to overcome it. I have posted the code and the image below for reference. Please check and help me out with how to delete that extra edge.

I want to create cell fracture using python. I have created particles using python. But I want cell fracture also in python, but since its add-on in blender, I am unable to do in Python.

Here is the code:
#Imports.
import bpy
import numpy as np
import math
from array import *
from mathutils import Vector
from math import degrees

# Draw hemisphere of 1m radius
bpy.ops.mesh.primitive_circle_add(radius=1, enter_editmode=True, align='WORLD', location=(0, 0, 0))
bpy.ops.mesh.bisect(plane_co=(0, 0, 0), plane_no=(0, -1, 0), clear_inner=True, clear_outer=False, xstart=0, xend=0, ystart=1, yend=1)

# Extrude vertices after hemisphere
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"use_normal_flip":False, "mirror":False}, TRANSFORM_OT_translate={"value":(2, 0, 0), "orient_type":'GLOBAL', "orient_matrix":((1, 0, 0), (0, 1, 0), (0, 0, 1)), "orient_matrix_type":'GLOBAL', "constraint_axis":(True, False, False), "mirror":False, "use_proportional_edit":False, "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "use_proportional_connected":False, "use_proportional_projected":False, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "cursor_transform":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False, "use_accurate":False})

# Fill
bpy.ops.mesh.select_linked(delimit=set())
bpy.ops.mesh.fill()

Hemisphere with extra edge image:

Hemisphere with particles image:

Fill the circle primitive.
Going by the demonstration it appears you wish to have a flat filled semi circle.
In which case recommend filling the circle when created, then ditching the extrude and fill operators.
Test script, have chosen a triangular fan fill for the circle, for an ngon, choose 'NGON'

import bpy

# Draw hemisphere of 1m radius
bpy.ops.mesh.primitive_circle_add(
    radius=1,
    enter_editmode=True,
    align='WORLD',
    location=(0, 0, 0),
    fill_type='TRIFAN',  # NOTHING  or NGON
    )

bpy.ops.mesh.bisect(
    plane_co=(0, 0, 0),
    plane_no=(0, -1, 0),
    clear_inner=True,
    )

In question code after the bisect operator the verts on bisect line are selected. The extrude move operator creates an edge for each from original vert to 2 units in x direction.


Workflow to make windows on building I'm new.. I'll start with that...  I'm building a house for uploading to SecondLife. Well, trying anyway.  I built my walls of one piece, using loops to create spaces for doors and windows.  I've mapped and textured, and created glass for the windows.  So my question is about the window frames.  Is it better to just lay a window frame over the existing glass in the wall, remove the face from the wall that are the window and make a frame with glass and set it in, or should I just create the frame out of the wall?  or does it even matter how you do it?

I would recommend to cut holes in the walls using Archimesh and placing the glass frame inside the window frame. Reasoning behind it is that you might want to play with sliding windows etc. But at the end the goal of your project decides mostly what approach will work best.

You can use Archimesh for house/room modelling. But will only work if you started from scratch. In other cases you need to cut the holes your self by for example the knife tool or re-organizing your topology.

Using Archimesh

The Archimesh Add-on is a fine add-on what can make a room, place windows and doors in the location you like and hit a button called Auto-Holes that will cut the holes for you.

The Archimesh add-on is distributed with Blender by default, but it is disabled. You just need to enable it in the User preferences.


Object changing scale in Rendered mode As you can see from my model I am very new to blender, but I feel I'm progressing well. But this problem is slowing me down as it's very distracting.

I have a scene with various parts and everything lines up fine  in all modes except Rendered. I have made sure I have deleted all keyframes, and hit ctrl-a to apply LocRotScale where I want it, but as soon as I go to rendered mode or try an actual render, the main cube seems to get smaller so then nothing lines up.

I have searched a lot for a solution but only found the obvious answers, which haven't worked for me. I have even remade the cube again but I still get the same problem, which just confused me even more.

Can someone please cure my noobness??

Many thanks.

Update: Here is a link to the blend file. Its more than likely terrible so please don't laugh :)
https://drive.google.com/folderview?id=0B8cLVpkzaATbcDM4YUJhZzFFV28&usp=sharing

You have enabled Warp in the Influence panel under Texture.15's tab

With that map you are displacing the geometry's vertices. I can't tell you why a Wrap with 0 influence mess all up and disabling it fix the problem, but is definetly that option that you have to check.


The liquid does not get into the pipe The liquid does not get into the pipe.

I've tried
Is planar off , on
Flip Normals and is planar off

ok, make these changes:

assure that your pipe is converted to mesh
add a solidify modifier to the pipe with 0.2 thickness and apply it
set surface thickness 0.2 in the fluid tab of the effector
remove velocity of inflow (because i am not sure whether it is too fast, maybe some other parameters have to be changed to make this work), so just set velocity to 0

bake again -> test


Easy way to rotate all vertices along desired shape? I want to make the "tail" follow the blue line from the picture:
 Is there any easy way to do it?
Trying to rotate each point looks messy as I do have to rotate and drag back to position:

Thank you

I don't know what is final purpose of your curved shape, but you can consider to try ... Curve object with

Shape > Resolution 8
Geometry > Bevel > Depth to something you like
Geometry > Bevel > Resolution to zero
(it brings default round profile shape to square, like your)

You can easily adjust curvature and if you would need to continue with mesh object, just search for Convert to Mesh operator.


Creating objects with a 'for loop' and setting each new one a keyframe within the 'for loop' So I wish to have a script which creates an object then set's it keyframe at a frame, 'f', before creating another object and setting a keyframe at a new frame, say f+1. However it always sets the keyframe to the first object created and not to the newer ones and using bpy.ops.data.object['Wave'].select = True doesn't work as it just selects the first plane created and not the others (due to the fact the others are named Wave.001 for example. I thought about turning the name into a string but that seemed like an improbable solution. When I ran this script with a more simple example of a plane it seemed to work... Here's the script I'm using for the wave:

import bpy
import math
scn = bpy.context.scene

numY = 10
freq = 1
amp = 1
scale = 1

for numX in range (2, 20):
    scn.frame_current = numX - 2
    verts = []
    faces = []

    for i in range (0, numX):
        for j in range (0, numY):
            x = scale * i
            y = scale * j
            z = scale*((amp*math.cos(i*freq))+(amp*math.sin(j*freq)))

            vert = (x,y,z)
            verts.append(vert)

    count = 0
    for i in range (0, numY*(numX-1)):
        if count < numY-1:
            A = i
            B = i+1
            C = (i+numY)+1
            D = (i+numY)

            face = (A,B,C,D)
            faces.append(face)
            count = count + 1
        else:
            count = 0

    mesh = bpy.data.meshes.new("Wave")
    object = bpy.data.objects.new("Wave",mesh)

    object.location = (0,0,0)
    bpy.context.scene.objects.link(object)

    mesh.from_pydata(verts, [],faces)
    mesh.update(calc_edges=True)
    bpy.ops.data.object['Wave'].select = True
    bpy.ops.anim.keyframe_insert_menu(type='Location')

The strange thing was that without the bpy.ops.data.object['Wave'].select = True the script fails with it outlining bpy.ops.anim.keyframe_insert_menu(type='Location') as the issue. I don't see a difference between this and the simpler cube example though - which works fine without the need of selecting the Plane. Here's the code for the plane example :

import bpy
from mathutils import Vector

scn = bpy.context.scene
scn.frame_start = 0
scn.frame_end = 20
scn.frame_current = 0
for f in range (0, 20):
    bpy.ops.object.add(type='MESH')
    Plane = bpy.context.object
    Plane.name = "Plane"
    PlaneMesh = Plane.data

    verts = [(0,0,0), (0,5,0), (0,5,5), (0,0,5)]
    faces = [(0,1,2,3)]

    PlaneMesh.from_pydata(verts, [], faces)
    PlaneMesh.update()
    scn.frame_current = f
    bpy.ops.anim.keyframe_insert_menu(type='Location')

scn.frame_current = 0

Can anyone please help me understand what's going on...?

Here is your script (a) doing what I think you want it to do.  It makes a mesh object at each frame, and adds a location keyframe at the frame it was created in script.

If you are using an operator, need to be in, or set the context it requires. Make a new object obj context with context.scene.objects.active = obj.  If it works on selected objects, like say join, need to make sure other objects are (de)selected correctly by setting obj.select accordingly on each.

Going to use bpy_struct.keyframe_insert(...) rather than the operator.  This will be quicker, especially for high numbers.

import bpy
from math import sin, cos
scn = bpy.context.scene

numY = 10
freq = 1
amp = 1
scale = 1

for numX in range (2, 20):
    verts = []
    faces = []

    for i in range (0, numX):
        x = scale * i
        for j in range (0, numY):
            y = scale * j
            z = scale * amp * (cos(i * freq) + sin(j * freq))
            vert = (x, y, z)
            verts.append(vert)

    count = 0
    for i in range (0, numY * (numX - 1)):
        if count < numY - 1:
            A = i
            B = i + 1
            C = (i + numY) + 1
            D = (i + numY)

            face = (A, B, C, D)
            faces.append(face)
            count = count + 1
        else:
            count = 0

    mesh = bpy.data.meshes.new("Wave")

    mesh.from_pydata(verts, [], faces)
    mesh.update(calc_edges = True)

    obj = bpy.data.objects.new("Wave", mesh)

    obj.location = (0, 0, 0)
    scn.objects.link(obj)
    obj.keyframe_insert("location", frame=numX, group="Location")


Need HELP with topology - Subdivision I'm modeling knife handle. I'm using the "Subdivide modifier" on my mesh. Everybody is telling me don't use or make triangles. I did make a triangle but, somehow I changed it to the quad. Is this ok?

But still doesn't look ok, funny diamond shape in the middle. If somebody can help draw lines on the image of how to do retopology.

I need later in modeling top edge(RED) to be sharper.

you could simply do that (following picture):


Rotate by a given relative quarternion So this is a classic question, I guess, but still I couldn't find an answer to my specific variation: I have an object where I select a surface with a given normal vector. I then want to rotate the object so that this normal is parallel to some target_vector. I am basing it on this code:
rot = normal.rotation_difference(target_vector)
obj.rotation_quaternion += rot # Wrong. But this line is the essense of my question

I can to it when converting to Euler angles and then simply adding the rotation vectors, but I get into troubles with gimbal lock. So how do I rotate with a given quaternion? Also Will this method be robust for future target vectors and normals? I'm thinking of if any coordinates being local or global and taking the current rotation into account etc.

I figured it out. The code is simply:
rot = normal.rotation_difference(target_vector)
obj.rotation_quaternion = rot

BUT I had transformed my normal vector the the global coordinate system like this:
world_matrix = obj.matrix_world
normal = obj_face.normal
normal = world_matrix.to_3x3() @ normal

It worked if I skipped the last line with the matrix multiplication. I'm haven't wrapped my head around why this did the trick, as I just tried it out of intuition (and desperation). So I guess I have something to think about over the weekend :-)


Running Blender 2.8 and 2.7 on same PC I'm trying to run Blender 2.8 and 2.7 on same PC. When using the installer 2.8 will remove 2.7 and 2.7 won't install with 2.8 already on the PC. Any help greatly appreciated.

If you want multiple blender versions (I have three) to play nicely together you have to download them as zips and then extract them instead of just running the installer.

Alternately you can put your older blender installations into zip files, run the installer, and then unzip the old versions again back to where they were. I have used this method myself in the past but it's so much easier to just get the zip for the latest version to start with.

I got this answer in part from here.


Prevent point lamp from shining through mesh lamp in reflection I have a scene which must appear as if it's lit by a very small mesh lamp.  To optimize performance, what I'm trying to do is place a point lamp inside of the mesh lamp, and have the point lamp shine through the mesh lamp by having the mesh lamp's back faces be transparent.  However, in the reflection of the lamp on a glossy material, the point lamp shines through the mesh lamp:

I've tried making the point lamp invisible to glossy surfaces via Ray Visibility, and having the mesh lamp only be visible to glossy surfaces and the camera.  While this works, it makes rough glossy surfaces quite noisy, partially defeating the purpose of using a point lamp instead of a mesh lamp in the first place:

Are there any other solutions?

.blend file

Two possibilities:

Remove the glossy ray visibility of the lamp :

Or you can set up the sphere nodes like this :

OK, this is what you said in your question... but it works...


Subdivision Surface Problem I have a soldier model:

When I add the Subdivision Surface modifier, this happens to the model:

Does anyone know how to remove this?
I just wanted to add smoothness to the models, but not that.

The split faces subdivided look a lot like what a quad would if subdivided. Thus as @Rekov already mentioned, you should be fine after doing the following:

Deactivate the Subdivision Surface Modifier (faster depending on the model)
Go in Edit Mode
Select all elements of the object with A, either mode, vertices, edges or faces will work
Press Alt+M and select "Merge by Distance"
Go in Object Mode and if you did not do yet, RMB Shade Smooth
Activate the Subdivision Surface Modifier again
Smile

Happy blending.


Custom Hardened Normals in LuxCore All flattened cubes have the same Bevel modifier settings, except for the left one, which has Harden Normals checked. The faces of the left two object are smooth shaded, the right object has flat shaded faces.

I want to use the custom normals created by the Bevel modifier in LuxCore. The result is supposed to look like in Cycles.

Using BlendLuxCore, how can I use the custom normals created by the Bevel modifiers Harden Normals option?

The ticket for custom normal support in BlendLuxCore was closed 2020-03-30 10:39 CEST. Basic support for custom normals is supposed to be implemented. However, the result doesn't match the Cycles render yet. The render with and without harden normals appears to be identical, only the auto-smooth seems to take effect.

Cycles

LuxCore

The following commits should have implemented support for custom normals:

4a972373996737367709309c055e74fee2b712f5
c011bd2aee91e5fa0582ebb93f499b0708a45581
07cef4d62424de340a3693126973c53864e7a335

Project file

The project does not include the HDRI. It can be downloaded from HDRIHaven.


How to scale ColorRamps and Gradient Textures properly? I want to render a small 3D Text but I cant scale the ramp properly. My result is either only red or orange.

Without any input to your Gradient texture it will be applying the gradient along the x-axis only. I can't tell from your question, but which axis do you want the gradient aligned with? Likely your texture is applying to the 'depth' of your mesh so all you're seeing is the 'front' face at the far end of the gradient.
Add a Texture Coordinate node to feed 'Generated' into the Gradient - and put a Mapping node between the two so you can easily rotate the coordinates as desired.


Is there a way to save a material's preview? Edit: I'm talking about the material tab preview, NOT the render preview. Here's an image of what it looks like on your screen. I think everyone can agree that it's ridiculous for this little image to be re-rendered every time you click that material.  Hopefully, this image makes it clear exactly what I'm talking about when I say "Materials window with its Preview section".

Original question:
When I'm jumping between objects in the project, if I happen to have the Materials window open with its Preview section expanded, Blender re-renders that material preview every time I switch objects - even if it's the exact same material. And even worse, the preview is never rendered to the same quality that the final project will be rendered to, so the preview isn't as good as it could be. The computer may render that same low-quality preview hundreds of times, always rendering the same ball or monkey head.

So is there any way to save this preview for a material that is shared between many objects? That would avoid the constant jumps in CPU usage, and maybe could allow Blender to efficiently render that preview in much higher quality. Even if it isn't saved between sessions, it would be useful to keep it in the memory cache.

Short answer: no.

This preview panel really isn't meant to give you an accurate preview. It's supposed to be an "as fast as possible" preview of your material in a neutral environment. Allowing you to see what you're editing on the fly with as less waiting as possible, or scroll through your material list.
It gets refreshed at every material setting change, as well as every new selection (because you change the object, the material window gets entirely refreshed, and so does its preview panel).

The only way it could remain still when changing the selection is if Blender had an hypershade-like editor. Which will let you edit any material you want, even several at the same time, regardless of your selection. But that's not planned for now.

But to be honest, if you're working with cycles and want to have a fair preview of your object which is independent of your selection, your best shot is the 3D viewport. Because the final look of your shader is highly driven by the model's volume, the lighting, the surrounding surfaces, and their own materials, ...
If you have performance issues, there are some work around, like using the render border, using your GPU (or better if you have several GPU, use the one not used for your screen), reducing the pixel size, ...


Multiple Texture Support BGE Is there a way to add multiple functional textures in the Game Engine. What I'd like to do is have one texture that maps the Diff and another that maps the Spec and Bump.

It always seems to override to one or the other when I have multiples placed. Is that a limitation I have to work with?

Make sure you are in GLSL mode:

Make sure each texture only affects the channels you want:

In this example I want this image to influence the specular channel, so I have unticked the Diffuse Color box and ticked the Specular Intensity checkbox.


Transition to First Frame of Fluid Sim I'm trying to do a "melting object" effect using fluid simulation (in 2.77a), but I'm having trouble doing a smooth transition.  My brute-force approach is to use keyframes to turn the visibility of the original object & fluid off and on (respectively).  The trouble is, the first frame of the fluid has flowed more than it should have, compared to subsequent frames, so the transition from object to fluid is very abrupt.
I double-checked that the simulation start time is 0, and played around with the settings.  The only thing that helps is increasing the resolution, but I'm already up to what my computer can reasonably do.

Has anyone else seen this?  Any tricks for getting around it?  I checked various fluid tutorials, but I didn't see this problem covered.
Thanks.

[Updates]
Below are frames 23-25 (24 is the first frame of the simulation).  Note that 24 has already "melted" quite a bit, but there's almost no difference in 25.  The file is currently available at http://www.pasteall.org/blend/42419.

Thanks to @Jbergman for the answer (see comments for additional details).

The main problem was that I had a concave "saucer" obstacle under the fluid, hoping that it would keep the fluid from pooling against the sides of the domain.  The fluid wasn't technically touching the saucer mesh, but I had the saucer's Volume Initialization set to Volume.  This caused the simulator to include the concave volume in the obstacle.  Setting it to Shell fixed it (using a closed mesh as the obstacle may have fixed it also, but I didn't try this).  [Since the saucer was invisible, no one could have found the problem without the original blend file; sorry about that.]

A few other points that he reminded me of:

The domain was much bigger than it needed to be.  Making it smaller
allowed me to use a higher resolution.
I didn't apply the scale to the domain; apparently this can cause
other odd behavior.
The resolution is going to limit how close the first frame looks to
the original mesh.  It's close enough now that I can just copy the
first frame of the domain mesh and use it for the first 24 animation
frames, instead of the original mesh.  If I was really ambitious, I
think could edit this domain copy to look more like the original and
use shape keys for a smooth pre-sim transition, as discussed in the
comments.

Below is how the first frame looks now:


How do I align the view to the local axis of an object? How can I get standard axis views (Numpad 1,3,7,9) in local axis instead of global? The motivation is simple, I was using these view for modelling my object, now I moved it, but want to edit it again.

Press Shift in combination with any of those number pad numbers to align to the local axes of the selected object.

Note that this will only work if you have rotated your object in object mode and haven't applied the rotation. If you have rotated in edit mode or applied the rotation then you can select a face (or vertices or edges) of the object and use Shift+1 (3,7,9 etc.) to align the view relative to the axis of the selected element.

If you use Ctrl+Shift in combination with the numpad numbers you will align to the opposite view of the object's axes, e.g. bottom, back instead of top, front.


Plane not rendering, but is visible in materials mode Hi I'm using Cycles Render in Blender and I have a problem where I made a new plane put color on it and it is not showing up when I render it, but shows in other modes. I'm not using different layers, the material isn't transparent and the camera icon is enabled for it.

The "Duplication" setting of your Plane object, which now looks like this:

should be set to "None".


Non-manifold mesh problems after boolean I have designed my model from the ground up and only used boolean modifier to connect the different parts of the model. Unfortunately after using the 3D Printing Toolbox to make the model manifold it deletes a great part of that model. I tried recalculate normals and it did not make any difference. I can also upload the model if necessary. But in general I would like to know what other steps I could use to "save" my model. It is not very complex either.

Thank you.

Url to file:

Update: Just in case anyone has the same problem. I had copies of the different parts of this model (before I used union on the boolean modifier) and used the Knife Project Tool to cut into cylinder and thus got a useable mesh in the end. For the smaller holes I still used the boolean and got away with it.

Thank you Mentalist for the detailed explanation.

How to find non-manifold geometry

From within Edit Mode, using Vertex selection, with no geometry selected, use the menu to navigate to Select > Select All by Trait > Non-Manifold. (The keyboard shortcut is ShiftCtrlAltM)

This will show you which part of your mesh is non-manifold.

What is non-manifold geometry?

Geometry is non-manifold if it doesn't form a single volume. Examples include internal faces, edges that don't form a face, vertices that don't form a face, two volumes connected at an edge or at a vertex.

Why booleans are not (usually) the answer

The problem is that you tried to model everything with booleans instead of actually taking the time to model a proper mesh. To make things worse, some of your geometry was very dense, and very dense geometry is more likely to cause problems when booleaned.

Instead, try to model it one area at a time, using as many quads as possible:

I'm oversimplifying with labels of "bad" and "good" for the sake of simplicity here.

The Mirror Modifier is just there to save time modeling, since this is a symmetrical shape.

Here's a list of the operations I used to create the mesh in my example: Extrude, Loop Cut, Delete (faces), Fill (faces), Snap (to vertex), Merge, Add (Circle), Bridge Edge Loops, Remove Doubles, Recalculate Normals, Crease. While that might seem like a lot to learn, these are operations you will use over and over, so they are worth getting comfortable with. It's likely you know some of them already.

While in Edit Mode you can select an edge and press ShiftE to add a crease to it. Typing 1 at this point gives the edge full sharpness and keeps the edge sharp even when a SubSurf Modifier is on the mesh.

You can later readjust the crease weight under the Edge Data section of the Properties Panel (a.k.a "the N Panel"):

Tip: In Edit Mode you can select an Edge and press ShiftG to select "Similar" edges, like those that have the same "Face Angles", and in this way select all the 90° edges at once so that you can crease them. It saves time.

There is no real substitute for a mesh with good topology. By learning to create better topology you will be able to make many more types of models, without encountering these kinds of problems. There may be some cases where you can get away with using booleans, but keep your mesh density lower in order to reduce the risk of problems like the one you experienced.


Corner gets skewed by subdivision surface First of all I'd like to specify that I'm new to Blender and I can do only very basic stuff.
That said, I'm trying to model a sink and I need it to have corners with a given radius.
I started by creating only a quarter of the final model so that I can then use the mirror modifier.
I modeled the profile of the sink and then added some loop cuts to round up the mesh using the subdivision surface modifier.
I placed two loop cuts near the corner, placing them at a specific distance from the edge so that they have the same distance from that edge, thinking that in this way the subdivision surface will generate an arc with a radius of that specific distance.
This is what I have so far:

This is what I get after adding mirror and subdivision surface modifiers:

As you can see the corner loop cuts near the corner have moved and now the mesh is not forming a perfect arc on the corner but it is somewhat skewed. I think this is due to the subdivision surface changing those loop cuts' positions.
I tried toying around with the modifier's settings but nothing changed.
How can I achieve what I'm looking for?

This effect is a natural consequence of the Catmull-Clark algorithm, because the centers of adjacent faces,(and their sizes,) are used to calculate new edge-points.

If you're relying on Catmull-Clark to create your curve, and you want it to remain symmetrical about the corner, you will have not only to put in holding-loops for the corner itself, but at least one more loop to ensure the centers of the next faces along are also at an equal distance from the corner.


Pixelated render output, what am I doing wrong? Dear blender community,

So I'm pretty new to blender and general 3d creation and now I rendered my first good project but It has many point where the pixels doesn't belong to or the color of them isn't matching. I can provide a picture for that too. Would be greate if someone could help me. I can provide any additional information if needed. You can see the pixels mostly on the table and at the plant. I could remove some of them when I added another light that directly lights in the room but I don't really want that to be there because the picture is too bright then.
Thanks for helping!

From what I see and understand from your description, you are seeing something pretty common when using the Cycles renderer: Noise. (The bright pixels are sometimes referred to as "fireflies")

There are several ways of reducing this effect:
1) Try a higher sample count in the "render" setting

2) Use one of the denoise options, for example this one:

3) Switch to Eevee Render Engine:


How to hide a certain object in blender 2.8? hide_viewport seems to be the old hide option but how to toggle the "eye icon" like in prior versions?

The 'visibility property' is not exposed to bpy at the moment as confirmed with medium priority (2. March 2019 - https://developer.blender.org/T62062).

From wiki.blender.org:

obj = bpy.context.object
print("Object %s:\n\thide in viewport: %r\n\thide in render: %r\n\tis selectable: %r\n" %
      (obj.name, obj.hide_viewport, obj.hide_render, not obj.hide_select))

Is there any way to replace the old 'hide option' at the moment?

In final 2.80 you can do it:
obj.hide_set(state)

API


I want to bend the corners of a square sheet to 90 degrees as follows. How should i do it? The details to the problem are given in the picture. As you can see I am trying to bend the corners of a plate but I'm unable to give a bend to all corners in one pass.  Could someone suggest a complete solution to this problem?

The Simple Deform > Bend modifier IMO, is not easy to get your head around.

Create a plane, extending from 0 to its dimension in X and Y, with its origin at world 0.
Cut its outer corner (K, holding Ctrl to constrain to the center of the edges)
Bevel the cut.

Select the inner crease, and (ShiftS), place the 3D cursor there.
Create an empty, rotate to the orientation shown, and put the cursor back where it came from

Assign a Bend modiifer. The space in which it operates, here, is defined by the empty. From what I've deduced by trial and error, this is what happens, when set as shown:

a) In the modifier's space, rotations of the vertices of the modified object will be around Z.

b) The extent of the modified object in X of the modifier's space is mapped onto a range of 1, with 0 set to the space's origin. So if 2/3 of the object is in negative X, its furthest negative point in X will be mapped to -0.66, and furthest positive to 0.33.

c) Each vertex will be rotated by its mapped position in X, multiplied by the total rotation requested in the modifier.

As far as I can tell, the 'Limits' setting also  refers to a mapped range of 1, but with a different origin. This time, 0 is mapped to the furthest negative point, and 1 to the furthest positive point, in the modifier's X. That's the best way I can explain to myself why the settings shown work the way they do.

Anyway, this is the result:

Now you can add a Mirror (X & Y)  and a Solidify modifier...

... parent the empty and the plane to another empty, (here I've raised it in Z, in case you want some 'pendulum' rotations in the animation)..

For safety, lock off all the transformations of the modifier empty and the plane, placing them under sole control of the parent empty, and you're good to go.


Stopping a character fall in Blender Game Engine I came up with a really easy way to script climbing a ladder in Game Engine. It basically just involves colliding with the ladder (which toggles a "Climbable" boolean) and then when you hold up or down to ascend/descend the ladder it temporarily sets Gravity to 0 (bge.constraints.getCharacter(obj).gravity = 0) so that the player isn't pulled downwards by gravity while they're clinging to the ladder. From there, I was smart enough to make it so if you press a side direction and aren't touching the ladder anymore there's an "Inverted" Collision with the ladder that makes it so if you aren't touching a ladder the Climbable boolean is always False and gravity immediately returns to normal (29.399999618530273, by default). All works properly as intended.

I have a problem though. If I jump onto the ladder or if I simply fall off of a platform onto the ladder and try to climb, it won't work as intended. If my character is jumping upwards to a ladder and I hold up to climb, then he will fly upwards like a rocket (on account of the zero gravity) and if I try to climb up a ladder while actively falling. The drag of falling will keep pulling my character downwards as he tries to climb and the drag continues until he collides with the floor (zero gravity doesn't negate downward force for some reason)

I need some way to "turn off" the falling behavior of a character and the upward motion of a jump on-the-fly so that my ladder scripting works properly. I can't figure out how to get them to stop. If anybody knows some line of code I could use to get him to stop, I would greatly appreciate it.

bge.constraints.getCharacter(obj).onGround is a "read only" boolean, so I can't use that to trick the game into thinking I've landed on ground. I've tried.

I am using Character Physics for my player character.

The way you implemented a solution is that the object has no gravity.

This is not really the behavior of an object that "holds on another object" (character holding at the ladder).

You currently discover "an area without gravity". That means when the character jumps into that area it will preserve it's motion and direction (while gravity would would do the same but adds another force influencing motion and direction).

I suggest you implement a "holding" onto the ladder, e.g. by parenting the object to the ladder [or any other way to restrict the position to the holding point].

While holding any previously active controls (like jumping, walking crouching) will not work anymore as the character is not a freely moving physics object. This is fine, because your character holds itself to the ladder.

You need other "operations" like move up/down (but not via linear velocity and such things).
Additional you should implement a "release operation" that let the character release the grip returning to the normal behavior (incl. falling).

Other operations could benefit from release too - you can combine jump and release. I suggest to first release and jump afterwards. Otherwise the exiting "hold" would disable the jump.

What problems could happen?

A) Parenting is a hard attachment. This means when you throw the ladder around, the character will not care and still hold onto it. If you really need such situations, you could release the character before (or while) moving the ladder.

B) The character ignores collisions while moving on the ladder. While parented the physics has no influence. Unfortunately there is not much you can do here, except sensing for such collisions and acting accordingly. E.g. you sense if there is a blocking object above the character before allowing the "move up" operation.

I hope this helps a bit.


Get the rotation of an object in the game engine How would I get an object's rotation and set that as another's velocity? Like if I had Object A, that has the rotation data, and Object B, the object to be moved. How would I get that working in python?

Because of some confusion, here's some of the code:

Gun = bpy.data.objects["Gun"]
rotationOfGun = Gun.globalOrientation

The method for accessing an object's rotation varies depending upon which rendering engine you are using.

In either Blender-Internal or Cycles, you can access an object's rotation by using the Python reference bpy.context.object.rotation_euler or just object.rotation_euler. In your script, just call that reference and set your other object's velocity based on that.

In the Blender Game Engine, you need to instead use object.worldOrientation.to_euler() to retrieve the object's rotation. For example:

from bge import logic
cont = logic.getCurrentController()
obj = cont.owner
rotation = obj.worldOrientation.to_euler()
print (rotation.z)


Can a model be both smooth and flat shaded? I wonder is it possible to have 50% smooth shading and 50% flat shading in blender cycles, applied to an created mesh?

The 1st image has a smooth shading on it and the 2nd has flat shading , is it possible to have 50% smooth shading and 50% flat shading? or 30% smooth and 70% flat?

You can choose which parts of your model are flat or smooth shaded from the W specials menu. Make a selection of faces and choose Shade Smooth or Shade Flat depending on what you want to achieve.


Does Blender support a uneven texture Sizes? Hi is there a way to disable the auto-correcting it does.

For example a 1k-2k trim texture will always get unwrapped stretched by default(because Blender wants to compensate). If there's a way to turn it off that would be great.

You can adjust the Aspect ratio to match the UV 0-1 space.

The UV coordinates have nothing to do with the image and the image will be confined to the 0-1 area. You will need to manually scale the UV coordinates in one axis to get an 1 by 1 pixel ratio on the model.

This is not specific for Blender.


Meshes don't render in cycles I started to use Blender to make Intros and stuff.

Right now I'm working on a very complex intro with animations and other stuff. Everything works pretty well except the rendering. When I hit F12 I just have my World Color but no Meshes.

By the way, I am using Cycles to render.

When I go to the "Realtime" Render view I can see the meshes and Shadows but these Meshes have the same color like the world color even when I apply some materials.

You camera must be placed and directed to render appropriately.  (User Views) and Camera View are not the same.  Press 0 zero in 3D View Mode to see camera view.  I would put this under a comment if I could.  I am new at this site.


How can I render a very large image in cycles? I want to render a image in 20000x20000 pixels. But I get the error GPU out of memory. My Peak in constantly getting higher. It starts at 280M, after a hour it is 2000M.

I have a GeForce GTX 1060 6GB. I uploaded my model via an OBJ file it. The Blend file is 90 mB. I have save buffers on to reduce the memory usage .

Has someone a idea how i can still render this image in 20000x20000 pixels? or is this just not possible.

Thank you in advance.

Use the "Precise Render Border Adjust" addon.

It allows you to easily split the render into smaller tiles which you can combine later in an image editor.

When rendering just make sure that cropping is enabled, otherwise blender will try to construct the complete image, which may freeze or crash the program upon completion or while exporting.


Want to get volume using 3dprint addon but get Problem From blender Console Problem in Console
Error: Traceback (most recent call last):
  File "\Text", line 51, in invoke
  File "\Text", line 51, in <genexpr>
  File "\Text", line 43, in calc_volume
NameError: name 'mesh_helpers' is not defined
location: <unknown location>:-1

import bpy, os
from bpy.types import Panel
from bpy.utils import register_class, unregister_class

import math

import bpy
from bpy.types import Operator
from bpy.props import (
    IntProperty,
    FloatProperty,
)
import bmesh

class View3DPrintPanel:
    bl_category = "3D-Print"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    @classmethod
    def poll(cls, context):
        obj = context.active_object
        return obj is not None and obj.type == 'MESH' and obj.mode in {'OBJECT', 'EDIT'}
class VIEW3D_PT_print3d_transform(View3DPrintPanel, Panel):
    bl_label = "Transform"
    bl_options = {"DEFAULT_CLOSED"}

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

        layout.label(text="Scale ")
        row = layout.row(align=True)
        row.operator("mesh.print3d_scale_to_volume", text="Volume")

class MESH_OT_print3d_scale_to_volume(Operator):
    bl_idname = "mesh.print3d_scale_to_volume"
    bl_label = "Scale to Volume"
    bl_description = "Scale edit-mesh or selected-objects to a set volume"
    bl_options = {'REGISTER', 'UNDO'}

    volume_init: FloatProperty(
        options={'HIDDEN'},
    )
    volume: FloatProperty(
        name="Volume",
        unit='VOLUME',
        min=0.0,
        max=100000.0,
    )

    def execute(self, context):
        scale = math.pow(self.volume, 1 / 3) / math.pow(self.volume_init, 1 / 3)
        scale_fmt = clean_float(f"{scale:.6f}")
        self.report({'INFO'}, f"Scaled by {scale_fmt}")
        _scale(scale, self.report)
        return {'FINISHED'}

    def invoke(self, context, event):
        def calc_volume(obj):
            bm = mesh_helpers.bmesh_copy_from_object(obj, apply_modifiers=True)
            volume = bm.calc_volume(signed=True)
            bm.free()
            return volume

        if context.mode == 'EDIT_MESH':
            volume = calc_volume(context.edit_object)
        else:
            volume = sum(calc_volume(obj) for obj in context.selected_editable_objects if obj.type == 'MESH')

        if volume == 0.0:
            self.report({'WARNING'}, "Object has zero volume")
            return {'CANCELLED'}

        self.volume_init = self.volume = abs(volume)

        wm = context.window_manager
        return wm.invoke_props_dialog(self)

def register():
     register_class(VIEW3D_PT_print3d_transform)

def unregister():
     unregister_class(VIEW3D_PT_print3d_transform)
if __name__ == '__main__':
    register()
```

Python NameError
The error occurs on this line.
bm = mesh_helpers.bmesh_copy_from_object(obj, apply_modifiers=True)

and is informing you that mesh_helpers is not defined.
Assume you are doing a bit of copy paste to and from the 3D print addon, where no doubt mesh_helpers is imported and available, whereas you missed it. It  can be imported from the 3D print toolbox
from object_print3d_utils import mesh_helpers

may find similar issues with clean_float and _scale.


Cloth sim makes hole in my cloth When I bake my cloth sim so the cloth will fall on the chair,instead of covering it like it is supposed to,the back of the chair rips a hole in the cloth. How do I stop this?

You could try a couple of things:

Increase the "Distance" value under Physics > Cloth Collision
Increase the Structural Stiffness of the Cloth
Increase the Repulsion Force
Increase the Repulsion Distance
Increase the Collision Quality under Physics > Cloth Collision


Painting with polygons in BLender 2.8 - help needed I've been intrigued with paining with polygons effect - info below:

http://www.isaacbotkin.com/siggraph/
https://www.youtube.com/watch?v=-I0hRymkhnQ&t=592s

I have tried to recreate this in Blender 2.8.
First I have created shader with displacement using texture offset:

After this I used linear interpolation and cycling over frame 0 and 1 with changing texture mapping rotation:

After that I tried rendering (In cycles) but it doesn't work. I am at loss what do next.

I have found one topic about this but it is from 2009 so not actual: https://blenderartists.org/t/painting-with-polygons/453991/7

I also found a guy who uploaded a working blend file, but it is for version 2.63 and I haven'T been able to recreate it. It can be found here:
http://rylanwright.blogspot.com/2012/09/sharing-fun.html

Finally, here is my blend file:
https://pasteall.org/blend/2706155074d9419da210ebd9950097e6

I would be very thankful if someone could help me to work this out, thanks in advance.

I managed to recreate painting with polygons by using the ideas from this paper.
http://www.isaacbotkin.com/siggraph/
Here is my result:

To achieve the hand painted look by motion blur, i used the displacement modifier
and did a variation of the "Strength" over time.

Also i did a little rotation of the monkey head during rendering a single frame.
To get the oszillation of the object during rendering, i defined this in the Dope Sheet
so that the oszillation is performed multiple times during one frame.

Then i activated motion blur inside the Render Tab.

For a stronger representation of the blur effekt raise Diffuse value at Light Path settings.

At least i used a brush stroke Bump Map and a Gradient Texture node setup.

For the rendering i used a frame rate 25ps

and a render sampling rate of 600 and Pixel Filter 3


Why do the measurements of this object seem erroneous? I just found out about the Mesh Display : Length feature in the "N" panel (thanks to this seemingly-migratable question) that allows one to measure the length of a face or vertice.

But my first encounter with this tool gives me complex feelings of love and hate, see how, as I was trying to measure the aspect ratio of this TV screen, I am getting WIDTH = 20.33 and HEIGHT = 37.57.

These values seem awfully wrong, since my betrusted eyes tell me the height should be shorter than the width.

I have tried measuring the single vertices as well, to identical results.

The discrepancy in measurements happens when your object has been scaled in object mode, but the transformation has not been applied.
As an example, look at this perfectly regular cube (2mx2mx2m) in edit mode:

What is wrong with it?
Look at the scale section on the panel in object mode:

If you select your object in object mode and press Ctrl A and select Apply Scale

The scale of the object will reset to 1,1,1

And the measurements in edit mode will reflect the real measurements of the object.

Without applying transformations, you can also choose to display local or global measurements:

The measurements in Local units are Relative to the Scale, and show that the cube is 2x2x2, whereas the Global units show the Absolute measurements, revealing that the cube is no longer a cube, but a cuboid that is 4m tall and 2 meters wide.

Why should you care for local or global measurements?
There are many operations that use the scale and rotation of the object and not its absolute dimensions
Quote from the blender manual

Applying transform values essentially resets the values of object’s location, rotation or scale, while visually keeping the object data in-place.
The object origin point is moved to the global origin, to rotation is cleared and scale values are set to 1.
For simple cases you won't notice any difference the 3D View or rendered output, however modifiers and constraints may depend on object transformation.

Beveling, UV unwrapping, physics simulations, booleans, and many other functions will use the objects relative dimensions and will give unexpected results if the transformations have not been applied.
Please read: Why is it important to apply transformation to an objects data?


How to render an object with both a base mesh wireframe and subdivision surface wireframe? How can an object be to rendered using the cycles render engine so that it renders with normal maps, specular maps, etc, and shows wireframes of the mesh and the subdivision surface modifier? For example, -

This is done with a texture, but is there another way?

I found a way to do it only in the Blender Internal render engine.

I add a subdivision surface modifier to the object. Then I add a new wireframe material and make it shadeless. Then I add a new material and assign it to the object. As long as the wireframe material is on top of the other materials, it will be shown in the render. Then in edit mode I hit E and then Mark freestyle edge. Then I click on Freestyle in the Render panel to enable freestyle and in the Render Layers panel I click only on Edge mark.


2.8 Animation stops when copying keyframes in dopesheet I have been searching and i've found posts that touch on this issue but one that quite covered a solution.

I've got this fish and it has been animated and I am trying to copy the keyframes so that i can continually loop the animation of the fish.

I have gone into the NLA and unpinned the actions in there (as recommended in another post I found) but even still, whenever I copy and paste the keyframes the animation doesn't continue.

This image, you can see the un highlighted key frames, then in yellow is all of the keyframes I have copy and pasted - but as I play through, the animation only happens in the beginning (unhighlighted keyframes).

Any and all help would be greatly appreciated.

Thanks in advance.

I'm in Blender 2.8 on a standard 2016 Mac pro 15 inch.

Thank you for posting your question so clearly.
1. Go to GRAPH editor. Select all your keyframes. Then, SHIFT+E (for extrapolation options) > CYCLES. Your animation will last as long as you have animation timeline set end frames.

Thank you for your consideration to vote me up (click on the checkmark besides this post) as the answer.

BFCT_Schiller


How can I create complex edge profiles on columns? I'm a complete beginner to Blender and I'm trying to create an accurate model of the Tuscan Order, based on William Chambers' "Treatise on Civil Architecture" from 1759.
So far I've made a rough outline of it using only cylinders and cubes of various dimensions. I haven't figured out how to properly curve/round their sides however.
This is what it looks like at the moment:

There are a couple of different types of curvings I'll need to do, as can be seen below:

Make the sides of the cylinder completely rounded, and have the flat upper face begin where the next part of the column stands (i.e. make it in the shape of a half-circle).
Make the shaft of the column slightly taper outwards where it ends.
Make the sides of the cylinder rounded, but only from one direction. (i.e. make it in the shape of a quarter-circle)
Make a Cyma Reversa (inverted s-shape)
Make a Cyma Recta (s-shape)

I'd be grateful for any help I can get, whether it's for all, or just one of these curvings!

For the circular base, you can use the Screw modifier.
That way you can easily change the shape and number of sides.

Create a profile from vertices or using a Bezier curve
Add a Screw modifier
Done


Scene is being rendered instead of animation? I created an animation in blender, exported it as a series of png files, used the blender video editor to merge them as frames in a clip, and continued to add sounds, transitions, etc. to complete the scene.

When I attempted to export the final product to a video file, all of the frames were re-rendered, but instead of the correct color view they rendered as greyscale scene view (essentially not even rendering anything). All of the images were overwritten instantly, and the previous hours spent rendering were wasted.

Now, I'm trying my hardest to re-render the entire scene, but every time I try to render the animation (or even just a still image), it keeps rendering the greyscale image scene as opposed to the actual product. How can I fix this? Also, once this is fixed, what is the proper way to render the final video?

Go to Node-Editor change it to COMPOSITING and press Shift+A for adding an IMPORT --> Movie Clip. Connect Image from Movie Clip with Image Composite.


volumetric shaders missing in blender 2.69 I have installed blender 2.69 and it says that volumetric shaders will be supported but i cannot find them. Do i have to download then as an add on?

Volumetrics have been added in 2.70, not 2.69.

Download the Release Candidate here: blender.org/development/blender-2-70-release-candidate

(A final stable version has not been released yet)


import files in obj, dae, ply I tried to import a obj file into Blender and could not do it. So I downloaded MeshLab and converted the obj to a dae file and still nothing happened. Nothing showed up on the screen and nothing appeared in the upper right corner- its a scene outliner type window (see pic)

Since those did not work. I converted it to a .ply file. That file appeared in the outliner but not on the desktop. So I spun on my mouse wheel and got the area super small and the file showed up.

How do i get the file back to the normal desk. It seems to have vanished altogether. Scrolling either way won't bring back the plane in the default window.

I created the character/object using this site, if it matters:
http://cvl-demos.cs.nott.ac.uk/vrn/index.php

I tried to create and download a model from the link you posted in your question, and my OBJ is correctly imported (I used one of the sample pictures on the link). The object's vertices location is not convenient (as shown in your picture), but the pivot is on the world center, so to quickly translate the mesh to the center and keep the pivot:

go to Edit Mode, and select all vertices
press Shift+S and choose Selection to Cursor (Offset)
then in Object Mode rotate and/or scale the object to position it as you prefer.

Anyway, the procedure to import the OBJ in MeshLab and export it to PLY format is a common practice, because PLY format keeps the Vertex Color data, while OBJ can't (so what you did is a good practice). So my suggestion is to use PLY format instead of DAE.

P.S.: When you see an object in the outliner, but not in the 3D Viewport, press the "." key on the numpad to quickly focus on the object without scrolling your mouse wheel.


Imported model from Steam version of Fuse has flipped faces when rendered. Flipping normals does not work The title mostly describes the issue I have with Blender 2.8. When exporting the model from the Steam version of Fuse, I export it as a .OBJ file and box appears with multiple options:

Export in new folder
Flip Normals
Combine diffuse (RBG) and Specular (A)
Remove occluded polygons
Pack textures and UVs

I only have "export in new folder" and "remove occluded polygons" selected. I have tried selecting "flip normals" and deselecting "remove occluded polygons" in separate exports, however, both options did not make a difference to the result. As the title says, I have also tried flipping normals by selecting all the faces of the model and using the hotkey "SHIFT + CTRL + N" which did nothing.
I have included multiple images showing what the model looks like in both edit and render mode in Blender as well what the model looks like in Fuse.

Thanks in advance. If you require any additional information such as settings, please let me know! I am not very experienced with Blender so you may need to help me navigate to show you the settings you are after.

The answer was quite simple and if I did a bit more research and watched a video, this would have been simple. All I had to do was to select the model, select materials, scroll down to settings and change "Blend Mode" to "Alpha Hashed." This has to be applied to all textures.


Turn off motion blur in cuts How do I turn off Motion Blur when cutting the camera (when the camera immediately moves to a new location in one frame)?

Here is my solution: It requires some manual labor.
Update: Only works for Cycles
I will be saying "Ghost Effect" a lot in this answer. The image is what I mean by that.

First, locate the property titled "Position" in the Motion Blur panel. The position property defines how the Motion Blur is calculated:
Start on Frame: The Motion Blur is calculated through the current frame and the frame right after it.
Center on Frame: Calculated through frame - 1, frame, and frame + 1.
End on Frame: Calculated through frame - 1 and frame.
With these three settings, you can remove the "Ghost Effect" of motion blur with this procedure: Let's say that the cut is happening on frame and frame + 1. If you use the default Center on Frame, both frame and frame + 1 will have the ghost effect, because the Motion Blur calculates with neighboring frames. To fix this, keep it on Center on Frame, go to frame - 1, hover over the property with your mouse, and press 'i' to add a keyframe. Then, go to frame and change it to End on Frame and add a keyframe. Then, go to frame + 1 and add a keyframe on Start on Frame. Last, add a keyframe on Center on Frame for frame + 2. In total, you will need to add 4 keyframes.
Here's an explanation of what this is doing:
On frames that are not in the cut, the Motion Blur computes on Center on Frame. When it reaches the first frame of the cut, it performs on End on Frame. End on Frame computes with frame - 1 and frame, as stated above. Because the cut happens on frame and frame + 1, the Motion Blur does not reach the cut, and will eliminate the "Ghost Effect". This can also be applied to the next frames.


How to model a square (starting with one vertex)? I have a simple question. What is the easiest way to model a perfect square starting with one vertex and just extruding that vertex around ?

Or :
Presuming the first vertex is selected :

E
X
1 Extrude along X axis 1 unit

A
A Double A, to first deselect the extruded vertex, but A again to select them all

E
Y
1 Now extrude both two precedent vertices to make the square


Setting mesh's origin in python (2.8) If I create a cube, the origin is originally at the center of mass. I know how to move the origin to the center of one of its faces using the interface, but how can I do the same thing via Python?

Bmesh script

This can be done similarly by using me.transform(T) with a translation matrix T. I have used an edit mode bmesh as it is simple to set  the active face interactively before running script.

Get the local coordinate of the face center.
Subtract it from all coordinates, effectively making face center (0, 0, 0) or origin.
Move the object globally to reflect the local transform of the origin.

Script and Origin to Selected 2.80 addon available here
 https://blender.stackexchange.com/a/134460/15543

Addon from link above, same result as script below

import bpy
from mathutils import Vector
import bmesh

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

f = bm.faces.active
if f:
    o = f.calc_center_median()
    bmesh.ops.translate(bm,
           verts = bm.verts,
           vec = -o,
           )
    bmesh.update_edit_mesh(me)
    me.update()
    # move the object globally to reflect
    mw = ob.matrix_world
    t = mw @ o - mw @ Vector()
    mw.translation += t

Since mw @ Vector() is essentially mw.translation the last line could be

     mw.translation = mw @ o

Related:  Set origin to bottom center of multiple objects


How to set the origin of sub-meshes without it affecting the armature? I have many instances where the concept artist tells me to tweak a few things on the models after I've already rigged them. Oftentimes I have to affect the dimensions (hence location), and then when I export it, the origin is thrown off. I do the Alt + Shift + Ctrl + C to re-set the origin to geometry, but then the armature is affected.

I'd hate to start all over on my armatures just to make a few minor tweaks to vertices and whatnot. Is there any way around this?

Place the model and armature in the center of the scene with both origins at 0,0,0. Then you won't have to re-set origins every time but scaling the model and applying the scale will always affect rigging. There is no way around it except scaling rig to which the model is parented, you probably want to avoid it though, if you want to export model with animations to some other environment, like Unity or Unreal. The best solution to this problem would be to rig the model after all mesh changes are finished.


My model looks weird I was just doing my usual stuff, but when I checked back on part of the model, it looked like this:

I also pressed Alt +  N, but it didn't fix anything.
Edit: The one one on the left is what I want. I exported the model a few days ago.

I can give better advice if you specify what you expect it to look like. It appears to me that you want to fix the smoothing groups. Depending on what you want, you can check out Auto Smoothing: and alternatively how to use the weighted normals modifier
Another thing I noticed is that you have auto keying on(blue dot on line editor) toggle this off so it isn't highlighted in blue and remove animation from all objects in the scene. If you forget this is on, objects can end up in unwanted locations and be confusing.


Bind and apply SURFACE_DEFORM modifier without bpy.ops? Is there a way to bind a surface deform mod without running

bpy.ops.object.surfacedeform_bind(modifier="Surface Deform")

and is there way to apply it without running

bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Surface Deform")

The obj.to_mesh() method described here, does not seem to work for Surface Deforms.

Thanks, I'd appreciate any pointers.

It turned out I had to do a scene.update() before applying the modifier, as the surface deform modifier was added by code via modifiers.new().

I'm still looking for a way to do the bind without the bpy.ops* however.


Ubuntu launch blender instances with a different configuration I am moving from Mac to Linux (Ubuntu) to use Blender (it gives me the feeling that it is more stable and, above all, faster).
The problem I have is the following: On Mac I had a script, to run an instance of each version of Blender, in which I defined the variable ENV: $BLENDER_USER_CONFIG and $BLENDER_USER_SCRIPTS, so that the program started with a different configuration ( startup file and installed addons) depending on the version (if you launched the script for 2.83 it came with certain addons or if you launched the 2.79 or 2.90a with others).
In Ubuntu I have managed to configure a .desktop for each version so that it launches the corresponding instance but... does anyone know how to define the ENV variables for each .desktop so that they have their different path to config and scripts?
I hope I explained myself well...
Thanks!

This should work: You can change the Exec line in the .desktop file like this:
Exec=env YOUR_VAR1=value1 YOUR_VAR2=value2 /opt/blender-2.90/blender %f

(Duplicated my answer from blender.community :) )


Hexagon column tessellation New member here so please let me know is I'm doing anything wrong in this post and I'll adjust accordingly.

I'd like to create the following image. I create a hexagon (circle with 6 sides), make the face, add one array modifier in x 20 times, another in x&y once to create two rows, then another in y to create many rows. So far so good. I now set origins to geometry and apply a transform random in x & y only. Perfect so far. NOW if I extrude these faces in z, they obviously don't tesselate properly because the rotation has kinda shrunk them when viewed from directly above.

How do I rotate randomly AND maintain the tessellating columns of hexagons afterwards?

Some sort of elaborate boolean cutting operation?

Appreciate any workflow help from the pros here!
Many thanks.

A procedural displacement, shader-only approach, using the HexGrid node group discussed here

The 'Cell ID' output is used to produce a UV into a Noise texture, to generate a random value
That value is used to rotate the Cell UV's, per cell.
The U is extracted from the rotated UV, to produce a gradient across the cell, in a random direction
The 'Distance From Edge' output is used to subtract from the displacement value, to give a slight bevel on the edges of the hexagons, which cleans up the near-vertical sides of the columns, and sink the cracks between them


Slope of an fcurve - how to determine? Is there any function or method to obtain the slope (first derivative) of an fcurve at a particular point/frame? (Corresponding to velocity or angular velocity or "velocity of scale" or any other rate of change of a property with an fcurve).

At the basic level I'd like to have a driver depend on whether a scene object is travelling upwards or downwards, not just on it's instantaneous location. The velocity would have even more uses than just a simple sign.

At the moment I can approximate it by sampling the fcurve a little before and a little after the frame in question, and calculating a slope from there, but it feels a bit like a hack, particularly if a better way to calculate it exists.

The maths for calculating the slope of linear and Bezier interpolated fcurves isn't that difficult, but so far I've been unable to find an elegant method of doing so. The upcoming easing equations would also have an simple mathematical solution, but again it's a matter of whether it's implemented as a python function or whether it would have to be calculated from the control points. (If it does have to be calculated that way, I'd love some advice on how to calculate it best).

Further, is it possible to obtain the second derivative (acceleration) for use in a driver?

No, blender doesn't have the ability to do this.

For Bezier splines you could probably calculate this yourself, but once you have F-Curve modifiers and use 2.71's new easing options, this becomes very complicated.

So the best you can do is check values to either side of the keyframe with some offset (called nabla)


confused about texture types While looking at lots of different texture types from various games, i have come across some maps which i am not sure about. Sometimes the file name helps to determine the type, but some are just confusing. Examples below:

According to a material file this is supposed to be a specular map. The imagefile name says "RGB":

But then there's this one. The name says "Rim". What's a "Rim-Texture"?

And here's one from a completely different model. The filename says "Body_FX". What's this? A Specular map? Why is everything green?

Why are so many Specular maps b/w and some brightly colored? Can i just plug them in the Principled Shader or do they require special blending modes?

The images store multiple material information in their color channels. When you view them in RGB, the resulting image doesn't make any sense, because all these layers just get added up.
If you look at the color channels independently, you can identify the stored information. The RGB channels of boYTW.png and K3Cvf.png look like this:

I don't exactly know, what the R channel is for in the first image, it might be some kind of mask or SSS information. The green channel however clearly stores the specular information. You can see the shiny hair, the wet lips and the metal buttons. The blue channel seems to store the roughness information.

The other image only carries two channels, R and G. Blue is black and therefor doesn't store any information.

The Red channel seems to store emission information, the Green channel stores ambient occlusion data.

You can grab the channels in Blender and see for yourself, wich channel might contribute to wich part of the shader.
Here is one possible experiment, there are obviously a lot of maps missing, you'd need to add the albedo and normal maps. But this is a nice approach to see wich texturechannel might deliver wich information.

I hope that helps!