Align vertices with curvature of another object I am new to Blender, and I'm currently trying to align vertices of one object to the curvature of another object.

I can't use S, then some axis and then 0, since both objects will (in the end) have a circular shape.

Thanks.

Just use the Shrinkwrap Modifier.

You can read about it in the Blender manual or watch this Youtube tutorial


How to create Dict from Collection Property in Blender python? I want to get a dict from a collection property which will be used for exporting a json file.
I completely have no idea how I should do it, so I don't have any code for it.
Thanks for helping me.
I have a propertyGroup-
class Favourites(PropertyGroup):
    label: StringProperty(
        name="Label",
        default="",
    )
    idname: StringProperty(
        name="idname",
        default="",
    )
    icon_value: IntProperty(
        name="Icon value",
        default=0,
    )
    index: IntProperty(
        name='index',
        default=0
    )
    is_preset: BoolProperty(
        name='Is preset',
        default=False
    )
    mode: StringProperty()

And this property group is registered as Type of a CollectionProperty in register def
bpy.types.Scene.favit = CollectionProperty(type=Favourites)

I want the list of data in bpy.context.scene.favit  to be stored in a json.

If you don't need to write out default value, just use items() like dictionary.
Unless you assign it, Blender will not create an entry for them.
import bpy
import json

data = [
    prop.items()
    for prop in bpy.context.scene.favit
]

print(json.dumps(data))  # save this string to json file

output:
[[["index", 1], ["label", "hello world"]], [["label", "cool world"]]]

The output format is same as [key, value] in a list,
once you want to write back to blender,
json_string = '''[[["index", 1], ["label", "hello world"]], [["label", "cool world"]]]'''
data = json.loads(json_string)
for prop_list in data:
    prop = bpy.context.scene.favit.add()
    for key, value in prop_list:
        prop[key] = value


Wave modifier doesn't work on my cylinder I'm still trying to get used to using Blender, but I'm having trouble animating a cylinder the way I want. I want to get the cylinder to move in a wave motion, like this:

So I figured I should use the wave modifier tool because you can make sinusoidal type motions with it, but when I try to use it, it only really animates the circles at the ends of the cylinder.

I thought maybe I needed to subdivide along the surface of the cylinder to allow it to move in an up and down motion like I'm looking for, but that didn't seem to help. Any ideas?

To make it work properly you have to apply transformations to the object and divide the mesh to make the Wave Modifier work.

First apply the Rotation and Scale (Ctrl+A-->Rotation&Scale) to the cylinder.

Then divide it using the loop cuts in Edit Mode. Press Ctrl+R and increase the cuts number using the Mouse Scroll.

Important thing here is to place the origin point in the desired position, since the wave movement starts from where it is. Select the desired edge loop in Edit Mode, then press Shift+S-->Cursor to Selected.

With the cursor placed press Shift+Ctrl+Alt+C in Object Mode to move the origin point there. Then add a Wave Modifier and play with its settings.


How to combine two rigs? I have a character model and a full body armor model both having humanoid rigs. I want to be able to remove parts of the armor so how do I make the armor sit on top of the character and make both of them move at the same time?

If the armatures have the same bone names:

Remove the armor from its rig (select the object and press Alt+P or remove the relationship in Properties > Modifiers)
Parent it to the character rig (select the armor object, select the character armature and press Ctrl+P > Armature Deform).

If the armatures have different bone names:

Remove the armor from its rig (select the object and press Alt+P or remove the relationship in Properties > Modifiers)
Parent it to the character rig (select the armor object, select the character armature and press Ctrl+P > 'Armature Deform With Empty Groups'.
Select the armor object, switch to Edit mode in the 3D view and go to Properties > Object Data Properties > Vertex Groups.
Make sure no vertices are selected in the 3D viewport by pressing Alt+A
In Properties > Object Data Properties > Vertex Groups you should see all of the names of the bones of the armor armature (even though it is no longer linked). Click a name, click 'Select' to select all the vertices in that group, click the name of the character armature group you want to that piece of armor to follow then click assign.
Test in 3D Viewport > Pose mode to see if it is working as intended.
Repeat steps 4-6 for all the bits of armor.


How to change colors during animation? Can anybody help me with changing colors of a mesh in animation? When I change the color and set the keyframe, the last modified color of the mesh is applied on all previous keyframes.
When I press i to set keyframe, which keyframe should I choose from the rolling list?

You can key frame the actual color by just hitting "i" on the color box

Starts out blue - hit "i"

Move the timeline and box and change the color and hit "i" again.


Blender interface/viewport lag I have recently upgraded to an Asus FX753V laptop but the blender interface and viewport movement lags badly compared to my lesser spec Dell laptop I used to have. I have the most recent NVIDIA drivers but can't get smooth operation.

Any suggestions or help  would be awesome!

The specs for my new Asus:
i7-7700HQ CPU @ 2.8GHz
NVIDIA GeForce GTX 1050
16GB RAM
Solid State Drive

Found the solution! I had to roll back to original nvidia driver for my graphics card, install the latest CUDA software and reinstall blender. Working like a dream. Thanks for taking the time to assist.


How to Render with Frontface Culling I flipped the normals, so that I could see the meshes layered within the outer mesh by using blackface culling. Reversing the normals made it so that instead of culling the backfaces, it culls the frontfaces. I did this, following this tutorial: https://www.youtube.com/watch?v=H5edojx6DFI
[I modified the center to suit the aesthetic style I was going for. However, he doesn't go over rendering in the video. I'm using Blender Render.

I want my render to look something like this.

But I can only render it to look like this.

Is there anything I can do to salvage this?

Below is the Blender file for download:

Applying this node set up (in Blender Render) will cull frontfaces. Apply your texture in the texture box onto the material you want to use. Linking it with color. Set the material to color output. Add a geometry node and set that to alpha. You need to set this to anything that has a mesh within it. But you will not need this setup for the most center mesh. For the most center mesh you can just apply whatever material/texture you want as typical with or without the nodes.


Blender VSE Renders audio/video out of sync I've seen a few other posts in various places about this problem. But having tried all the ones I've found I'm not sure what else to do.

My problem is that Blender renders my video out of sync with the audio. But it happens somewhat randomly. It's really annoying to find that every other video I render is very out of sync.

It's very simple footage too. Just footage of a game from my PC. Nothing complicated.

Now I'm sure I'm importing at the correct frame rate, it's at the correct resolution, and my frame range is right.

I've tried using all of the different timecode options, and not using it at all. Nothing seems to help. But I'm still new to using Blender as a video editor so I must be missing something. I also don't really understand what the different time code options are doing.

I didn't realize I couldn't edit my comments. I tried again with OBS and it still just records a black screen no matter what I do.

I should mention that I use Bandicam to record, with the "YouTube Preset". Which uses the Xvid codec.

@gdquest The addons you suggested seem to have solved this problem perfectly. As well as making editing a breeze. Thank you!

I edit videos almost daily with Blender, but I never faced your issue.

I highly recommend giving Blender Velvets a try. The Velvet Revolver add-on allows you to transcode all of your footage to an editing-friendly video format, using FFMPEG. It also makes editing in Blender much more efficient, but that's another story! I recommend that you use the MJPEG format with Revolver, prores is way too heavy.

Most video editing software out there only support a limited set of codecs for technical reasons, and you can have issues editing with videos that use the h264 codec. The lovely compression it provides comes at a cost: your video's frames are not available individually in the movie file, making it hard to decode, hard to split frames... so your issue is most likely due to that.

I hope it'll help, and if it doesn't, could you upload a blender file with a sample of the incriminated footage?

Kind regards,
Nathan.


Animation: Root of armature Picture a monkey climbinga a hanging wire, hand over hand, then take away the body, so only arms, the bone structure goes from on hand to the other.
The root of the armature will be in one of the hands.
It is easy to animate the first "hand over hand" motion, but when the "Root" hand need to move over the "free" hand/bone then I am struggeling.
Is there a way to do so without messing up the motion?

After a couple of frustrating ideas, I finally made it work.

I parented the objects to two armatures.

The first is Head up, and the second is Head down.

After animate the armatures, I swapped the visibility influence of the armatures in the Modifier Tab storing as keyframes.

I sent my file for analysis. Version 2.79b.

See the images below.


Why deselecting an already selected vertex does NOT work? I have found out that while it is possible to select vertices by setting select to True, it is not possible to deselect vertices by setting select to False if the vertices are already selected.
Sounds silly but it is not.

To demonstrate this, open a new file with the default cube, switch to Edit mode (all vertices should be selected by default).
Then run this script:

import bpy

bpy.ops.object.mode_set(mode="OBJECT")

bpy.data.meshes['Cube'].vertices[0].select = False

bpy.ops.object.mode_set(mode="EDIT")

The vertex 0 should be deselected, right? Well, it is not.

Now, deselect the top 4 vertices on the Cube and run this:

import bpy

bpy.ops.object.mode_set(mode="OBJECT")

bpy.data.meshes['Cube'].vertices[0].select = False
bpy.data.meshes['Cube'].vertices[5].select = True

bpy.ops.object.mode_set(mode="EDIT")

The vertex 5 will be a new selected one, as it should, but vertex 0 will still be selected but it should not be.

More info: if the select property's value is checked while still in Object mode, it will be False. However, switching to Edit mode makes it back to True.

Why is deselecting vertices not working? Am I missing something?

Actually, yes, you are missing something ;)

The fact is, when you select all vertices of an edge or face, you also select said edge or face (same when you select all edges of a face). In other words, selection of verts, edges and faces are linked together, so if you want to deselect vertices you must first deselect all faces and edges they belong to.

Note that selection operator(s) in editmode take care of that, using current select mode as reference (such that in vertices select mode, deselecting a vertex automatically propagates to relevant edges and faces).


Selecting an object via scripting? As shown below, I have 2 nested spheres, each with a different material (inner = "1", outer = "2"). Ultimately, I need to select the inner sphere (material "1") via python scripting.
I've found a number of ways to select (or make active) one of the spheres. However, even though Blender says that it's selecting the correct sphere (indicated by orange line around center sphere), I don't believe it's active -- adding a modifier applies it to the outer sphere instead. That, and the material properties show the properties of the outer sphere.

bpy.data.objects['Sphere.017']

refers to an object. (Lets assume all names in quotes are the names of objects in your Blender Scene)

2.8 Recent Version of the API

bpy.data.objects["Cube"].select_set(True)

# to select the object in the 3D viewport,
# this way you can also select multiple objects

bpy.context.view_layer.objects.active = bpy.data.objects['Sphere']
# to set the active object

https://docs.blender.org/api/current/bpy.types.LayerObjects.html#bpy.types.LayerObjects

⚠Older Version of API 2.79

A python script can do something with that.

You can also use

bpy.data.objects['Cube'].select = True
# to select the object in the 3D viewport,
# this way you can also select multiple objects

# additionally you can use
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
# to make it the active selected object


How to generate a fake top lighting effect? How can I generate a fake top lighting effect for a stylized game asset.

Lighting effect aren't recommended for PBR games, but it can be useful for games running on old hardware or mobile games to save calculation by displaying the assets in shadeless/unshaded.

To create this shader, add an emissive shader on your high poly.
Use an Input > Texture Coordinate and use the Normal input. This Input colors the faces depending on their orientation relative to the world (this means the rotation must be applied with Ctrl + a).
Connect it to a Converter > Separate RGB and use the Blue channel.
By default only the bright values are visible, to display the dark values add a Color > MixRGB and set it to Screen.
You can add a fake Global Illumination effect by adding another Screen node.
To bake your texture on the low poly use the Emit bake mode. You will find more informations about baking with Cycles here: https://blender.stackexchange.com/a/13509/23134
(optional) Blender's viewport and tools work in sRGB. If you want to export it to work in Photoshop or GIMP you will need to convert it to Linear, for that add a Color > Gamma and set the gamma value to 2.2.


Adding transparencies in blender grease pencil I'm trying to shade my drawing in grease pencil, and for that I'm using a layer with Blend set to "Multiply" and a grey material to fill the color. I have multiple objects, trying to rig a character, and when these shadows are superposed the result looks really bad (see image attached). Is there any way I can shade my drawing in different layers without having this issue when they are superposed?
Thanks,

so I think the reason this has occurred is your multiple pass shading has both overlapped and not quite joined when you've drawn it. Easiest fix is to draw the shading in 1 pass if you can.
If that's not possible you could enter Edit mode and, ensuring your viewport is set to "Select only points" (This is the first button to the right of the Mode drop down box) move the overlapping/miss matching points as desired.
Another solution would be to draw the boundary of the shading with a stroke on a layer and then fill on the multiply layer, hiding the original stroke layer once complete.
Or, my personal preference would be to remove the multiply effect all together and instead go for a black or grey dark layer with a low opacity. This would avoid the compounding colour (making areas darker) but obviously wouldn't fix the gaps.
Good Luck. Shout if you need any further guidance.


Belly deforming when moving hand! For some reason moving the hand deforms the belly:

However, there are no weights in that area, or at least none strong enough to cause the deformation I see:

This is how it appears normally (at rest position):

How would I go about fixing this? I am completely stumped.

Diagnosis first, solution second:

Problem

From the looks of it you used automatic weigthing (probably heat-based) and in the bind pose the IK bone finger1.L.IK is very close to both the belly and the finger, so both places are automatically weigthed to the IK bone.
Anything you move that moves the IK bone will therefor will move the belly.
This problem exists for all of your IK bones, they all have weights when they really should not deform anything, they are just helpers to move the real deform bones like finger1.L, finger1.L.001.

Solution

Your IK targets generally should not have any vertices weigthed to them if you only want to use them to drive your real deform bones. To make sure automatic weighting doesn't use helper bones, select them and switch off the deform option by clicking Armature>Bone Settings>Deform in the 3d View menu bar or by pressing SHIFTW and selecting deform (just unchecking the checkbox only changes the setting for the currently selected bone!):

Notice that I did not switch deform off for the IK targets of the feet, because you are using those as both an IK target and deform bones for the feet!

When you are done with this you have to redo the weigths.
Select the mesh ALTP then select Clear Parent and finally you can parent the mesh to the armature again like you did before and create automatic weigths again.
I've attached my result as a .blend file, so you can have a look if you have any further problems.

Additional Infos on Rigging

If you want a really incredibly great and thorough introduction to rigging, take a look at 'Humane Rigging' in the Blender Shop or on Youtube. It's not for the current version of Blender, but it is the best I know of (my knowledge of Blender rigging is dated too, I should add).


Maximum linked model depth? How deep can you link models in Blender? I mean, what if you were to link model C within model B, which is then linked within model A? Would that work?

[edit]

I'm working with models created in Lego/LDraw, and it could potentially save space if the individual Lego parts were stored outside the model and instanced instead.

No that would not work, you can only link non linked objects (so just the objects you made) in the file you want to link.


Texture scaling to real world measurements? Is there a method to scale a texture in relation to the measurements of the model?

For example, consider an architectural model with a concrete paving. Its image texture is a "real world" photo measuring 3×3 times which makes it 180cm × 180cm. Is it possible to make Blender scale the texture in model-units? Or the other way around: is it possible to automatically scale the UV coordinates so they fit the "real world size"?

If you only work with planes or meshes in which all faces have 90° angles between them, following the local object's coordinates, yes (typically planes and cubes which were only rotated in object mode and on which you didn't apply the rotation). You have to apply scale first with Ctrl + A -> scale.

1) Unwrap in edit mode with U, select the cube projection mode. By default it will make the smallest image's side to be 2 Blender Units long.

2) In Node Editor: Connect a Texture Coordinate Node with UV output to a Mapping node. Connect this Mapping node output to the vector input of your Image Texture Node.

3) Choose the appropriate Scale values in the Mapping node. "Scale factor" = 2 / "image's smallest side in Real World distance". The 2 is because of the cube projection scaling the smallest side to 2 BU. If you know your image is 1m on x and on 4m on y (in the real world), then give 2/1= 2 for x an y scale in the Mapping node

Other UV projection modes aren't predictable. If you want an always working solution, I think you will have to write it in OSL, but your render time will be 4-5 times slower.


BGE: Can a rigged rigid body interact with BGE physics? BGE: Can a rigged rigid body interact with BGE physics?

Basically, I want to know if it is possible to have a mesh that is animated by an armature interact with the BGE physics, including other rigidbodies.

Question blend file.

An armature rigged mesh cannot interact with other rigidbody objects, as the mesh deformation by the bones are not sent to the physics engine. (They are actually done on the GPU as of Blender 2.71 [source])

Your only option is to parent a bunch of collision proxies to the armature and use those instead of the actual rigged mesh, like this.


How to "simplify" an entire project in order to import it in another? I have a character created in Blender which consists of a complexity of rigging, material, clothing and control bones.

I have to import it into another project, but as the first project is almost an controlled accident, I am wondering if there would be a technique to do a kind of "compiling" in order to make it simple to manipulate in the other project.

In time, this project works as a kind of "statue", which doesn't need new clothing simulations, new bone poses and etc. Any help would be useful. Thanks.

As you're a beginner (it seems) you can:
- Save your .blend fila with another name - select your model - got to the modifiers tab in the properties window and press the "apply" button on all the modifiers you don't need (armature, cloth, etc.) Start applying the modifiers from the upper (first calculated) to the lower (last).
Then delete the armature and everything you don't need, save the new file, close it and then reopen. - Import you model from this new file.


Is there anyway to change the rotation mode of multiple bones at once? I am tired of manually switching from Quaternion rotation mode to XYZ euler mode for every bone. Is there anyway to accelerate this process? Any help would be appreciated!

Here is a script that will change all the pose bone rotation mode to the value set for to_mode in this case 'XYZ' for XYZ Euler Rotation on the active (context) object.

import bpy
from bpy import context

to_mode = 'XYZ'
arm = context.object

for pb in arm.pose.bones:
    pb.rotation_mode = to_mode

Possibly more useful to use context.selected_pose_bones which will set the mode only for those pose bones selected.

import bpy
from bpy import context

to_mode = 'XYZ'

for pb in context.selected_pose_bones:
    pb.rotation_mode = to_mode


How do I sort out this tracking actuator? So without explaining everything, the tracking sensor tries to track to an object in a different layer that hasn't been added into the scene.

To fully explain, the problem lies within which object blender tracks. The object, called "Track", is meant to be added in and tracked to. However, the problem is that when the object is added in then I am presuming that the object added in is called "Track.001". This doesn't exist yet so I can't click on it in the tracking actuator. Does anyone have a solution?

1. Select a plane and create a Navmesh.

2. Add game property to object (the object can be located in another layer and the property can be any type you need).

3. Configure the logic bricks for the tracker object with steering actuator.

4. Finally the script.

tracker.py.

from bge import logic
class Tracker():
    def __init__(self, controller):
        print('init')
        self.objective_list = [obj for obj in logic.getCurrentScene().objects if 'objective' in obj.getPropertyNames()]
        self.actuator = controller.actuators['seek']
        self.actuator.navmesh = logic.getCurrentScene().objects['Navmesh']
        self.actuator.behavior = 3
        self.actuator.selfterminated = True
        self.tracking_obj = False
        self.colSensor = controller.sensors['Collision']

    def change_objective(self):
        if self.objective_list:
            return self.objective_list.pop()
        return None

    def main(self, controller):
        if self.colSensor.positive:
            print('HIT..')
            self.colSensor.hitObject.endObject()
            self.tracking_obj = False
        if self.tracking_obj:
            print('seeking')
            return
        print("Getting objective")
        self.actuator.target = self.change_objective()
        controller.activate(self.actuator)
        self.tracking_obj = True

def main(controller):
    if not 'init' in controller.owner:
        controller.owner['tracker'] = Tracker(controller)
        controller.owner['init'] = True
    controller.owner['tracker'].main(controller)

Blend File


Why is this bone not pointing up / downwards? Can anybody tell me why the "N_ALL" bone is laying on the floor?
If the bone is laying on the ground, I expect the model to be laying on the ground, too, but it doesn't. The model's pose doesn't correlate to this root bone for me.
Edit: I have uploaded the fbx file here.
Thank you!

Perhaps the designer of the armature .. or rig decided they needed a convenient handle on the armature. Like a coffee cup has a handle or that plastic attachment for cell phones is a handle. Bones can be used for many different things.  Blender Bones can be for human, monster, and other organic creatures.  Bones can control meshes that represent hard objects as well like a car.  You can change the appearance of bones.  The bones of an armature can have zero or some effect on the mesh.  They are flexible in their use. That bone may serve as a handle to indirectly control other bones which directly control mesh.  That control can be changed or deleted.  If the mesh has a vertex group that has the same names as a bone then it can have some effect.  If you decide to delete the vertex group then that connection will be destroyed. Weight painting can change the weights in a vertex group.
So parenting an armature to a mesh with automatic weights is just one use of armature bones.  Some time you might like to control many things at once and bones can do that as well since you might assign a hard object to each separate bone.


How to align object pivot to selected points or edges? In the image on the left, I have selected two points and their pivot is positioned and rotated the way I need it

How can I make the object pivot align as well?

You can create custom orientation.

Select some vertices and your desired orientation (Normal in this case)
Add it as a custom orientation through Transform Orientation menu > +
Your custom orientation will now apply to all objects (you can change it in the list)


One material fades into another on model? Is it possible to make the top of my model glossy, and have the glossiness fade into matte toward the bottom of the model? (Or any combination of surface variations, this is just an example) Thank you!

If cycle it would be something like this

You use the the gradient as a factor between the 2 shaders.


Turning incidental triangles to quads I'm working on a mesh with a 45° edge which left me with several triangles. I've read in several forums that having tris isn't best practice, and I should strive to always use quads.

I've come up with a solution, but I'm afraid I'm using "triangles in disguise" along the 45° edge. Is this poor practice? What topology solution should I employ to keep the original subdivisions but no triangles? I can't remove subdivisions, but I can add new edge loops, so this is what I came up with:

Final:

Overview:

This is the cleanest quad topology I can think of.

I don't know if this is the proper way, but for me it works always the best. Try not to think about quad topology but about Edge Loops and how can you use them along the mesh. If you will work that way, quads will come naturally after some time.

Here you have example with Edge Loop that will allow to control sharpness of the Edge itself combined with Subsurf Modifier.


How to make the insets on either side of this cyllinder symmetrical From there, I'll be adding asymmetrical elements, like the cavity you can see on the one side, and a protruding element on the other. I want to stick multiple cyllinders together and have them fit end to end using that cavity-protrusion method (like an electrical socket). This, I assume, means I can't just use a modifier.

Tl;dr I just want the insets to be symmetrical

Thanks!

Well, you could build the symmetrical elements first using the Mirror Modifier first.

Then apply the modifier, and work on the asymmetrical elements.

Edit

Ok, based on that additional info, here's how you could go about doing so:

Create the first cylinder with the cuts. Then duplicate it, and flip the second one so that the insets are facing each other. Then, just grab the extruded faces, and move them in/out of the cylinder face by the same distance that you did for the first one. You can type in distances after activating the grab tool for exact distances.


How to texture paint large objects while retaining high quality paint I'm new to Blender and have tried to make myself a large cave model. After I've finished it, I tried texture painting it and am successfully able to, but it seems the quality of the texture being painted to the mesh (im using Stencil) is a bit blurry. I tried the same image on a smaller object and sure enough, it painted very well.

Based on my research, it has to do with how my UV is unwrapped. If I unwrapped a small object, it is unwrapped looking large on the UV map (sorry if wrong terminology) and paints in high quality. The problem is for large objects, when you unwrap them, the islands are forced to be small (even with seams) in the UV map or else they wouldn't all fit in the UV Map.

What can I do about this? Is it possible to have multiple UV maps so I can put each island on their own UV map? Or am I doing it wrong and there is the right way to do it?

UV mapping is the way you can define how the faces of a 3d mesh are placed and projected in a 2d plane (texture).

You can increase, decrease, stretch the area in the UV mapping.

You can also attach a huge "image texture" to the mesh (UV mapping helps to map 3d mesh to 2d texture), so when you paint an object you won't loose any detail.

The bigger the texture is, the mode big the UV area should be

(in newest version of blender, you can have different UV MAP / texture with different pixel density --> check this article+video: new-udim-texture-painting, bu probabily you won't need it)

here you can check how different faces have different size as UV MAP


How would one code a pie menu with an additional traditional menu beneath it? What would be the nicest way to code(in Python) a pie menu in Blender 2.79 or 2.8, that would have another menu as an addition to the standard 8 pie menu choices?

After playing with it for some time I found that this kind of works:

import bpy
from bpy.types import Menu
class VIEW3D_PIE_template(Menu):
    bl_label = "Some Pie Menu"

    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.operator("mesh.primitive_cube_add")
        pie.separator()
        pie.separator()
        gap = pie.column()
        gap.separator()
        gap.separator()
        gap.separator()
        gap.separator()
        gap.separator()
        gap.separator()
        gap.separator()
        menu = gap.box()
        menu.scale_x = 2.5
        menu.operator("mesh.primitive_monkey_add")
        menu.operator("mesh.primitive_monkey_add")

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

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")

I wonder if there is a nicer way. This feels 'hacky' and it would be nice to have a menu that would have expandable sub-menus if that is possible at all. I realize that might be too much to wish for... Any advice?

The solution I ended up with is the same as discussed in the comments:

import bpy
from bpy.types import Menu

class Submenu(Menu):
    bl_label = 'Some Submenu'
    def draw(self, context):
        layout = self.layout
        layout.label("Some Submenu")
        layout.separator()
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")

class Pie_menu(Menu):
    bl_label = "Some Pie Menu"
    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()
        pie.operator("wm.call_menu_pie", text = "Some Other Pie", icon = "RIGHTARROW_THIN").name="Pie_menu"
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.separator()
        pie.separator()
        other = pie.column()
        gap = other.column()
        gap.separator()
        gap.scale_y = 7
        other_menu = other.box().column()
        other_menu.scale_y=1.3
        other_menu.operator("mesh.primitive_cube_add", text = "Some Menu Operator",icon = "BLENDER")
        other_menu.operator("mesh.primitive_cube_add", text = "Some Menu Operator",icon = "BLENDER")
        other_menu.menu('Submenu', icon='RIGHTARROW_THIN',  text='Some Submenu...')

def register():
    bpy.utils.register_class(Submenu)
    bpy.utils.register_class(Pie_menu)

def unregister():
    bpy.utils.unregister_class(Submenu)
    bpy.utils.unregister_class(Pie_menu)

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="Pie_menu")

It works exactly as I wanted:


Clean up mesh generated from overlapping curves Suppose I have draw overlapping curves in order to simulate branches. How can I clean up the mesh around the branches? Are there better techniques for drawing branched curves that also supports tampering and bevel effects?

Being in face selection mode select the trunk with L, press Space and type Intersect. Unselect it, then select a branch and hide it (H). Delete all the faces inside the intersection edge, unhide the branch (Alt+H) then join verices to create a clean topology. Then remove the rest of the branch's vertices. Finally remove doubles (W-->Remove Doubles).

Result:


Is there a way to identify colours in a mesh So, I've imported an image as a plane. It's a simple logo, just black with a company's name in white font.

Is there a way I can identify the white font as a separate material, so as to remove the font and make a cut-out plaque?

Sure thing.
Just use the black and white image as a mask for transparency.

Connect your material nodes like this.
And use the Transparent BSDF node.

If you're using Evee, don't forget to enable Alpha Blend

You can also combine different colors the same way.
All of these planes were created using the same bw image.


How to wrap cylindrical object around 2 posts Currently working on a chair and can't get the back rest right. It's essentially a cloth draped around the wood legs that extend all the way up into posts. Anyway, I tried taking a cylinder, extruding half of it over to the other post but can't seem to get the trajectory and rotation right. Any ideas for how I can accomplish this in a more accurate way? Would love for it to look more realistic so any tips and critiques would be appreciated.

Here are my reference images

Try the ShrinkWarp modifier (add more geometry), or try making a simulation.

Try going into wireframe and by pressing the view keys (1, 3, 7,Ctrl + 1, Ctrl + 3, 9) getting your vertices right.


How to change the scale of dots in a shader in gradient-like pattern? I ran into a problem while making a toon shader. I wanted to add specular made out of dots, where central spot of the specular will have larger dots, while the specular border will have tiny dots. In other words, I want the dot size to be dynamic, based on the size of the specular.
I couldn't produce it, but if anyone knows how to do it, I would be grateful for a method.
Bellow is the simplest setup of some dots and as you can see I tried using gradient texture and plugging it into a scale input of the voronoi texture. That of course did not work. I'm guessing the solution is in multiple math nodes after the voronoi texture.
I'm also adding an image which showcases my goal.

This setup is far from perfect but can give you some direction :

The trick is to use the "Shader To RGB" node to convert the lighting result into some usable value. This is an Eevee-only node.
For a greater variety of sizes, you can add more Voronoi textures and mix them in cascade, with greater then greater values in the top GreaterThan nodes.
I didn't manage to get a cleaner transition between the zones (some dots are cut in half, that doesn't look good).


Landscape material with ridges and erosion I have an modeled  landscape. How to create material with ridges and erosion on it  shown below?

You can create erosion with the Landscape tool.
Here's a good tutorial for this:

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


How to create a Torus with a non-circular cross section? I want to create a torus-like shape, however using a cross section that is not circular. In particular, the shape I'm trying to make would have a cross section that consists of a rectangle, with one side replace by a half-circle (as in the picture). The circular side would be inwards, towards the center of the Torus.
I have found answers for how to do this out there, but all of those that I've found apply only to pre-2.8 Blender.

You've already made the profile, you're nearly there..
In Edit mode, drag the profile a little way from its object's origin

(Here, the axis of rotation is going to be Y, it's the profile's Y axis, as well as the world's)
Give the profile a Screw modifier..


How to wrap fingers around a cylinder (handle)? I'm fairly new to blender, and have tried this answer already, but it's actually warping the blue selected polygons. I'm trying to warp / bend the fingers adjacent to the selected polygons. My issue:

I am trying to get those 4 fingers to curve around the handle:

You can rotate portions of the mesh around the 3D cursor. The position can be established by first selecting a ring of vertices in Edit Mode, and then ShiftS and choosing cursor to selected. Press the period key . to choose the 3D cursor location as the rotation point. Select the rest of the mesh you wish to rotate and ...rotate.

Perhaps later you will want to rig to accomplish the same thing - in which case you will want to create your mesh from quads to avoid distortion. In this case I used ALTJ to convert the tris to quads and re-distributed the vertices. The rotation also has proportional editing enabled. While bones and weight paint can achieve the same thing, this is a good way to test bends.


Is there a way to animate a morph between different fonts? I want to make an animation where the font changes into another in a smooth way.

Example: https://youtu.be/rtKbMZqnYFE?t=10s

Thanks!

SVG of second example

Yes, with this add-on you can do this (and more).

Or, if you use 2d curves:


Dyntopo Sculpting questions? Does using dyntopo in sculpting mode give the best results? When is dyntopo the most necessary? Can you make your mesh revert to less vertices after using dyntopo? basically a smoother surface, the way it looked before checking dyntopo?

I also got a warning message saying "Dyntopo will not preserve vertex colors, uvs or other custom data." And another one saying "Keeping the modifiers will increase polycount when returning to object mode."

I will appreciate any advice.

You should only use Dynamic Topology if you make major changes to your mesh, especially if you want to expand an area out effectively changing the necessary Topology. Also you should avoid using Dyntopo if you use UVs and never use it with Subsurface on a mesh, because it works with triangles instead of quads.

For Example if you have a Cube and you want to add details on it you could do it with dyntopo if you don't bother with UVs Vertex Colors and Modifiers like the Subsurface Modifier  but if you want to use any of it its not recommended. UVs can of course be added later on in the process but that more difficult for a triangle mesh than for a quad mesh (at least in my opinion). But there aren't only negatives to Dyntopo. For Example you want to make that same Cube but for a Game. Then it needs to have the least amount of triangles possible. Dyntopo adds only vertices where you need them, where the other way of doing it with a Multiresolution Modifier would add a lot of vertices everywhere to get the same level of detail, while keeping the topology. Also you could only use dyntopo if you want to sculpt something like a human from just a cube, because you don't have the correct topology for a human in a Cube


How to calculate world position of offset point based on rotation of an object in python I have a sphere parented to another object, offset on the Z axis so that when i rotate the parent i can get the world position of the top part of the parent.
How can i calculate this without needing the child sphere object in python?

Parent rotation: 0, 0, 0
Sphere World position: 0, 0, 0.1

Parent rotation: 12.4162, 39.7934, -16.6971
Sphere World position: 0.0537, -0.0386, 0.0750

Some matrix math.

Rotating the vector (0, 0, 1) by the euler rotation described in question (assuming default order 'XYZ')

>>> R = Euler(radians(a) for a in (12.4162, 39.7934, -16.6971))
>>> R
Euler((0.21670356392860413, 0.6945258378982544, -0.2914193570613861), 'XYZ')

>>> v = Vector((0, 0, 1))
>>> R.to_matrix() @ v
Vector((0.5369226336479187, -0.38553091883659363, 0.7503865361213684))

Ooops didn't see the point 0.1, notice though that each element is 10x the result in question, as is the length of the vector

A child object at (0, 0, 1) can be considered at the local coord (0, 0, 1) of the parent.  To get global coordinate of a local coordinate we multiply by the objects matrix world.

Consider the following from the python console.  In this case the "Circle" has no parent, so its origin, local coordinate (0, 0, 0) will be at its location.

>>> C.object
bpy.data.objects['Circle']

>>> C.object.location
Vector((1.0, 3.0, 2.0))

>>> C.object.rotation_euler
Euler((0.5235987901687622, 0.7853981852531433, 1.0471975803375244), 'XYZ')

>>> C.object.scale
Vector((2.0, 3.0, 3.0))

Ok lets look at the world matrix

>>> C.object.matrix_world
Matrix(((0.7071067094802856, -1.7196698188781738, 2.2175967693328857, 1.0),
        (1.2247449159622192, 2.2175967693328857, 0.8409903645515442, 3.0),
        (-1.4142135381698608, 1.0606601238250732, 1.8371171951293945, 2.0),
        (0.0, 0.0, 0.0, 1.0)))

>>> C.object.matrix_world.translation
Vector((1.0, 3.0, 2.0))

>>> C.object.matrix_world.to_euler()
Euler((0.5235987901687622, 0.7853981852531433, 1.0471975803375244), 'XYZ')

>>> C.object.matrix_world.to_scale()
Vector((2.0, 3.0, 3.0))

The global location of local coordinate (0, 0, 1) of circle is

>>> C.object.matrix_world @ v
Vector((3.2175967693328857, 3.8409903049468994, 3.8371171951293945))

>>>


Check box to enable add-ons in blender is missing Hello everyone I am on version 2.77a of Blender.  I am trying to enable a few add-ons but I am having difficulty doing do as I can't seem to find the check box to click in order to enable them.  This is what I am looking at from the User Preferences window in the add-ons tab.  Dos anyone know how to get that check mark there?  Thank you.

The check box you're after is located on the left side.


Transparent Text In Cycles Not Working Before I begin
Let me state my end goal here before I continue, in case the method
I'm using isn't the best way: I'm trying to make text appear and
disappear in an animation. What I'm doing now is animating a mix
shader with a transparent node and a diffuse node. If this is the
wrong way, please correct me.

Please ignore this part. Workaround found. However, my question still stands.

I have a text object in my scene that I'm trying to switch between transparent and opaque. However, instead of getting transparent text, I'm getting a grey colored text.

I've tried the method on other objects, and it works there, but not on the text.
Any help is appreciated.

Download link for the .blend

This is because the text is in the same place as the background plane.

TL;DR: Move the text a little above the plane so they don't intersect and interfere.

Blender has no way of knowing if the text should be on top (and invisible) or if the background plane should be on top (obscuring the text). Even though either scenario comes to the same result in this particular case, such an undefined situation is liable to cause undefined behavior.

What happens is some cycles form of z-fighting (the classic z-fighting artifacts only seem to appear when in ortho view and from some angles). If you put an object behind the plane and text, the issue becomes clearer:


How to get Blender's version number from Python? How do I go about programmatically getting the Blender version number?

Example: If I am running Blender 2.76, how would I get the version number from the python console?

bpy.app.version_string
Test using the python console:
>>> bpy.app.version_string
'2.83.2'

Usage within a script file:
import bpy
print(bpy.app.version_string)

which will print the actual version to the system console window:
2.83.2

bpy.app.version
If you're looking to compare version numbers, it's easier to do this using bpy.app.version which will always be a tuple of 3 ints, (major, minor, subversion), eg: (2, 76, 0)
So you can compare the version number with regular comparison.
if (2, 76, 0) > bpy.app.version:
    print("Your Blender version is too old!")


Volumetrics behind glass arent working in Cycles Im currently trying to render a scene in Blender 2.8 with Cycles out of the inside of a car. The side and windows are all basic BSDF Glass Shader. Outside of the car is a cube with a basic BSDF Principled Volume Shader. But whenever I place my camera inside the car, the volume is not visible in viewport as well as in the render.

I'm not sure what you mean by "the volume is not visible": is it black or is it just as if it wasn't there? (A screenshot would help)

If the problem happens only from behind a transparent surface, you may have the "Max Bounces" settings too low in Render > Light Paths


How do I Extrude Faces Along Normals, and also shrink in two other directions? I am extruding plane surfaces along surface normals by selecting the plane, then hitting Option-E (Alt-E), then selecting Extrude Faces Along Normals.
That is all fine, but I also want to shrink the object along the two local axes that are perpendicular to the Normal. So, as the plane gets thicker in one direction, it gets smaller in the other two directions.
I would be grateful for any pointers.

If you think about this one the other way round..

The I Inset operator has a 'Depth' setting, which you can adjust in its F9 panel.
If you need further adjustments, perpendicular to normals, for unconnected faces, you could set Pivot to 'Individual Origins', Transform Orientation to 'Normal', and scale in the per-face XY... SShiftZ.


Bones Mirroring Opposite Rotation All my bones are mirroring perfectly except for my fingers which for some reason rotate in the opposite direction. Not sure what might be causing this the only thing unique to these are that the tip copies some rotation from the middle finger bone, but I've switched this off and still they taunt me. Here's a video:
https://vimeo.com/513733570 Maybe someone knows what's happening? Thanks in advance :D.
I should also add that this seems only to happen in pose mode, in edit mode it works just fine.

Found the answer today apparently, the mirror is based on the roll of the bones so I needed to set one side to the negative roll value of the other then readjust all my constraints accordingly.


Matching vertex indices in similar models by UV coordinates modelling noob here.
Problem: I am modifying a few meshes with the same number of vertices but different topology deformations. They were produced from the same base mesh but somewhere along the line the vertex indices diverged. I need the indices to allign so that I can transfer weight paint between the meshes. The objects have identical UV layouts as they were unwrapped before the topology was deformed.
Question: Is there a way to match vertex indices between objects by checking for proximal UV coordinates, sort of like the magic UV plugin but in reverse? Or perhaps a way of sorting the vertices of each object by UV coordinates so that they all match? Would the plugin copy_vert_ids be useful in this regard?
Thanks!

A caveat.. there are people on this site who are better at this than me.. I wouldn't have posted if one of them had done it first. (I've really had a go at it, to explore bmesh better for myself)
This script may be a starting point though.. it assumes the two meshes share identical UV maps, vertex counts, and that there are no overlapping / coincident vertices in the map(s).
To use it, you would insert the source and target object names, and the names of their matching UV maps. It creates a dictionary of the pairs of vertex indices, keyed by the UV coordinates.
import bpy
import bmesh
from collections import defaultdict

# Insert object names here
ob1 = bpy.data.objects['C1'] # Source object
ob2 = bpy.data.objects['C2'] # Target object
me1 = ob1.data
me2 = ob2.data

# BMesh representations of both meshes
bm1 = bmesh.new()
bm1.from_mesh(me1)
bm2 = bmesh.new()
bm2.from_mesh(me2)

# Insert UV map names here
uvm1 = bm1.loops.layers.uv['UVMap'] # Source's map
uvm2 = bm2.loops.layers.uv['UVMap'] # Target's map

#Create dict {(UV coordinate : [bm1 vert idx, bm2 vert idx]),...}
uvdict = defaultdict(lambda: [-1,-1])

for face in bm1.faces:
    for loop in face.loops:
        uvco = loop[uvm1].uv[:]
        vidx = loop.vert.index
        uvdict[uvco][0] = vidx

for face in bm2.faces:
    for loop in face.loops:
        uvco = loop[uvm2].uv[:]
        vidx = loop.vert.index
        uvdict[uvco][1] = vidx

#get rid of dupe loop -> vert refs
matchlist = list(set(tuple(x) for x in uvdict.values()))

bm2.verts.ensure_lookup_table()

#reassign target v indices
for pair in matchlist:
    bm2.verts [pair[1]].index = pair[0]

bm2.verts.sort()
bm2.to_mesh(me2)

bm1.free()
bm2.free()

It's possible I've got the wrong end of the stick re. your problem.. I run the script in object mode, with nothing selected. Tightening / correction, by folks who know better, would be welcome.


Odd color of the mesh I was creating faces with the given vertices and noticed that some parts of my mesh have lighter color than the rest.

Can anyone help me with an explanation? Thank you so much!

Thanks to @m.ardito and @Mentalist, I was able to remove the odd shading by locating the internal face and removing it by >> Edit Mode with Vertex Selection enabled, and Select > Non-Manifold.


Subdivision surface - dealing with edge support loops (pinching) I'm trying to learn subdiv modelling, but now I'm facing with some issues.
That is clear, when I want to sharpen an edge or a corner I have to use support loops. My issue is: when I do that, support loops also running over areas where I would like to have smooth surface. Tried to even out edges, but the distortions are still visible on the smooth surface.

Is there a way to fix this without using edge creasing or bevel?
(producing unnatural results or too sharp edges,but maybe I'm doing it wrong)

Thank you!

EDIT:
Tried to crease, it does not work :<

You have to be careful about adding edge loops on curved surfaces. As you've already discovered, Subdivision Surface modifiers average out the vertices, so those additional edge loops pull the local faces towards itself. Thus, you should try to only add in support edges around the edges that need support.

Here's the topology I used to get that result:

When you're adding support edges/loops, here's are a few things to keep in mind:

Try to isolate the supporting edges. Have the topology of the model surround the protruding mesh and its supporting edges. In this case, notice how none of the supporting edges go beyond the original mesh from the subdivided cube. Using the Knife tool instead of Edge Loops can help here.
Avoid triangles, n-gons, and impossible faces (Ex: imagine a flat square, then you pull one of the corners upwards along the face's normal. IRL, this would end up as two triangles with an edge across the square's diagonal, but that edge is not added in 3D modelling). These often cause shading issues.
Avoid excessively or unnecessarily close vertices. This isn't always a problem. but if possible, merge them together, making sure you aren't messing up your support loops. This can be done by selecting a vertex and double pressing G to slide the vertex along its connected edges into an adjacent vertex. If you have auto-merge vertices enabled (shown below), the two will be merged together. Alternatively, you can enter Edit Mode and select Mesh > Clean Up > Merge by Distance in the top left corner of the 3D Editor.


How do you use drivers to hide an object or mesh? instead of going into the outliner I would like to use the properties tab to change meshes.
I've tried to look for some tutorials but most of them are on shape keys.

For example; skin 1 is hidden and skin 2 is un-hidden when the value in the custom properties tab is changed.

Press Right mouse button over eye icon (or camera icon if you want to hide object in render) in outliner, chose Drivers > single from target.
mouse cursor will change to dropper, click on custom prop.
That is all!


Clear transform of control armature bones does not reset deform armature bones I have a deform armature, with another separate control armature for the rigging and posing.
The control armature has IKs, Spline IK etc., and it does work to control the deform armature.

For the neck and base of the tail (the model is of a large felid), I have bones in the control armature that match the position of the deform bones, and I have a "Copy transform" bone constraint set up so that the deform bones follow the motions of the control bones.

This does work - but when I want to reset the positions of those bones, when I select the control bones for the neck and tail base, and choose "clear pose transform", the control bones are re-set to the default position, but the corresponding/matching deform bones ARE NOT and remain in the transformed position.

Does anyone know a way to fix this, and to reset both sets of bones?
I could reset the bones in the control armature then go in separately and reset the bones in the deform armature, but this would be more slow and not very pleasant as workflow.

Does anyone have any tips for this?

EDIT:
I changed the control set up so that the deform armature bone constraints were changed to "inverse kinematics" rather than "copy transform" - I do not understand how exactly, but this appeared to resolve the issue.


Text game properties and dynamic text I want to use the property value(it's a string) of one object to change the text-game property value of another object(text-object).

For the time being I made the dynamic text to work by just assigning different values to the game-text property of the text object.

I have 2 questions, although the first one is not so important:

Do I need to tick "Text", under Game Settings of the material of the text-object? The dynamic text works even if I don't.
And the important question, can I achieve what I want with logic bricks alone?

I can only access one object's properties(the active's ones, to be exact) when I select both. Any ideas or help on how to do this are appreciated.

Also posted on : blenderartists

Do I need to tick "Text", under Game Settings of the material of the text-object? The dynamic text works even if I don't.

This is not necessary on Text Objects (KX_FontObject). This configuration is for Bitmap Text materials (different topic)

  I achieve what I want with logic bricks alone?
  Yes, it is possible, but only with hard-coded relationships and within the same scene.

Usually I recommend to use Python to get this behavior as this allows to decouple the "value keeper" and the "value viewer".

So here is a Logic brick brick solution.

As the property acts as our model (game's state) we call it in our example "model". We call the object it lives on "Model.keeper". [You can call it as you want].

A model makes not much sense when it never changes. Therefore we implement a sample change operation - we add the string " value" whenever we press .

Model.keeper

Now we want to let another object take over the property value. Add a Text Object with Text Game Property "Text". Call the object "Model.viewer". We can use the Property Actuator in "Copy" mode to tell it to copy the value from object "Model.keeper" with property "model". The GUI supports us when typing/selecting the fields.

If the Model.viewer constantly copies over this value, your game will become busy with copy operations (imagine you have much more than a single viewer). Wouldn't it be more efficient when this will be done on model value change only?

The Property Sensor in "Changed" mode senses when the property value changed. Optional: The object "Model.keeper" knows when the model changed (because it changed it). So it can notify any interested object (e.g. "Model.viewer") that the value changed. We can do that with a message:

[I placed this logic into a separate state, too avoid mixing different tasks. Both states are active.]

I suggest to enable "True Level Triggering". This way the message gets send on consecutive changes too.
The subject of the message is "model changed". This allows us to send other kind of notification messages regarding other events. Please not this is send to any object (empty To: field).

Model.viewer

When "Model.viewer" receives the message "model changed". It will activate the Property Actuator as you already setup above. This means whenever "Model.keeper" notified "Model.viewer" via "model changed" the property "model" gets copied to property "Text".

But what if we just started? The value did not change an therefore there is no notification message. To cover this situation we activate the Property Actuator at start-up too. Be sure to use an "OR" controller:

If you did everything right you should see something like that:

Homework
Add another viewer


How do you paint in 2.8’s UV editor I’m trying to put a black dot right in the middle of this sphere, but  nothing appears when I click down on my map. Does anyone know what I’m doing wrong?

Make sure that the texture is in your material graph.

Select the texture slot in the active tool settings.

Start paint.


Python Panel Dropdownlist and Integer Button I am trying to create a dropdownlist and a increment/decrement button in my custom UI Panel.
I can't seem to find how to do this. Does anyone know how?

Here are visual Examples

Thank you in advance for your help and have a nice day! :)

Here the code for this example:

bl_info = {
        "name": "Test Addon",
        "author": "Me myself and I",
        "version": (0, 0, 1),
        "blender": (2, 80, 0),
        "location": "View3D > UI > MY TEST",
        "description": "This is a test UI addon",
        "warning": "",
        "doc_url": "",
        "category": "3D View",
    }

import bpy
from bpy.types import Panel, PropertyGroup, Scene, WindowManager
from bpy.props import (
    IntProperty,
    EnumProperty,
    StringProperty,
    PointerProperty,
)

class MYTEST_PT_Panel(Panel):
    bl_idname = "MYTEST_PT_Panel"
    bl_label = "MY UI"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "MY TEST"
    bl_options = {'DEFAULT_CLOSED'}

    def draw(self, context):
        layout = self.layout
        placeholder = context.scene.placeholder
        col = layout.column()
        col.prop(placeholder, "inc_dec_int", text="Increment/Decrease")
        col.prop(placeholder, "dropdown_box", text="Dropdown")
        col.prop(placeholder, "file_path", text="Filepath")

class PlaceholderProperties(PropertyGroup):
    inc_dec_int: IntProperty(
        name="Incr-Decr", min=1, default=4, description="Tooltip for Incr-Decr"
    )
    dropdown_box: EnumProperty(
        items=(
            ("A", "Ahh", "Tooltip for A"),
            ("B", "Be", "Tooltip for B"),
            ("C", "Ce", "Tooltip for C"),
        ),
        name="Description for the Elements",
        default="A",
        description="Tooltip for the Dropdownbox",
    )
    file_path: StringProperty(
        name="File",
        default="",
        description="Wanted File",
        maxlen=1024,
        subtype="FILE_PATH",
    )

classes = (
    PlaceholderProperties,
    MYTEST_PT_Panel,
)

def register():
    #the usual registration...
    from bpy.utils import register_class

    for cls in classes:
        register_class(cls)

    Scene.placeholder = PointerProperty(type=PlaceholderProperties)

def unregister():
    #the usual unregistration in reverse order ...

    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

    del Scene.placeholder

if __name__ == "__main__":
    register()

I believe this small example should be easy enough to follow through, i tried to use simple names to see what is used where.

The specific 3 Properties needed are the IntProperty, EnumProperty and StringProperty.


Why is my baked image black? What have I done wrong? Why is my baked image black? What have I done wrong?

Link to the file: https://we.tl/t-ekBeME8dQq

Your normals are flipped inside (red on screenshot), the baking rays go in the bad direction and don't hit any surface, so go in Edit mode, select all and press Alt+N > Recalculate Normals:


How to set Freestyle line set setting using python? I want to make a blender script, to export wireframes.

Honestly I dont have much knowledge on the python thing so I only copied some code from the window over the gui and filled it in a text document.

But on this Code i have troubles:

bpy.context.scene.select_edge_mark = True

this one is for activating the Edge Mark checkbox from the Freestyle Addon.

bpy.context.space_data.context = 'RENDER_LAYER'

and this one should only change from window render to window render layer, but if the edge mark thing would work i wont need these code.

So, what i am doing wrong, or better, what is causing this, because honestly i think i am doing a lot wrong :D

Blender 2.80

In order to activate the selection of edge marks you first need to access the Freestyle settings. These settings can be found in the view layer in Blender 2.80. Assuming your view layer is called "View Layer" you can access the settings using the following code:

freestyle_settings = bpy.context.scene.view_layers["View Layer"].freestyle_settings

Alternatively, if you always want to use the active view layer, then you can use the following instead:

freestyle_settings = bpy.context.window.view_layer.freestyle_settings

Next the line sets need to be accessed because the edge mark setting is configurable per line set. Assuming your line set is named "LineSet", you can access it the following way:

lineset = freestyle_settings.linesets["LineSet"]

Alternatively, if you always want to access the active line set, you can use the following instead:

lineset = freestyle_settings.linesets.active

Then you can enable the edge mark selection for the line set.

lineset.select_edge_mark = True

If you don't need access to the freestyle settings or the line set in other parts of your code you can also do this in a one-liner:

bpy.context.scene.view_layers["View Layer"].freestyle_settings.linesets["LineSet"].select_edge_mark = True

The alternative version when relying on the active view layer and line set looks like this:

bpy.context.window.view_layer.freestyle_settings.linesets.active.select_edge_mark = True

Blender 2.79

In order to activate the selection of edge marks you first need to access the Freestyle settings. These settings can be found in the render layer in Blender 2.79. Assuming your render layer is called "RenderLayer" you can access the settings using the following code:

freestyle_settings = bpy.context.scene.render.layers["RenderLayer"].freestyle_settings

Alternatively, if you always want to use the active render layer, then you can use the following instead:

freestyle_settings = bpy.context.scene.render.layers.active.freestyle_settings

The rest is exactly the same as in Blender 2.80.


Can Blender be used for high quality industrial design? I have been using Rhino for industrial designs but there are many cases that it is very difficult to carry it through because of lack of Rhino's freeform and flexibility. I want to switch to SubD softwares like blender. The problem in SubD softwares is distortion around edges in curved surfaces. For example, it is very hard to dig several custom shape holes on a sphere without distortion when you add subdivision and smooth it.
Please guide me. Is it worth to use Blender for industrial design (just for rendering not manufacturing)?
If yes then how can I learn SubD industrial modeling using Blender? My problen is getting a right topology in each situation.

Yes, Blender is capable of doing high-quality industrial design, if you are willing to invest the time.

For getting appropriate topology, there is information available like http://www.topologyguides.com

Also, regarding your comment about distortion around holes cut into curved surfaces, Blender has the Shrinkwrap modifier that can you can use to smooth your surface after cutting.  For example, here's a sphere with an odd cutout.  On the left I used Shrinkwrap to mold it to a sphere, and on the right without Shrinkwrap. The reflections on the right sphere are distorted as you would expect with a SubD surface, but the reflections on the left are smooth around the edge of the cutout:

This is a really quick example so it's not perfect, but if you put effort into it you certainly can get great results.

See this link: https://www.blendernation.com/2016/04/14/shrinkwrap-modifier-hard-surface-modellers-best-friend/


How to to do something before the blender game engine ends with a script I want to do something before the blender game engine stops. For example, print "THE END" on terminal when I press ESC to exit (scripting).

You can use an app event handler for this.

An event handler is a function (known as a "callback") that is launched when the event is triggered. You can append a custom function of your own to blender's event handlers, and it will be launched when these events are fired.

Conveniently, there's such an event for the end of the game engine (bpy.app.handlers.game_post).

import bpy

def execute_after_game( scene ):
    print( "GAME OVER!!" )

bpy.app.handlers.game_post.append( execute_after_game )

This example will add a function that prints "GAME OVER!!" to the terminal after the game is finished.


How do you create a Gradient Texture as the background for your world? Actually, I have the answer to this, I have just found it at the time of posting this thread, as a matter of fact. I want to point out that a ColorRamp node will actually do the trick, but this will be different from how I ran into the eye gradient texture, seeing as legitimate image textures are not present here.

As promised, I intend to answer, once and for all, how to attain a gradient texture for world backgrounds. I had found myself searching through a few Blender Stack Exchange threads, and this one in particular did the trick:

Cycles texture mapping, generated coordinates with world orientation?

If you check that link to a different Blender Stack Exchange thread, you will notice the same setup being used for an object. I had previously overlooked that, believing it to be impossible for use with World Nodes.

...I was wrong.

Not only could you use that node setup to achieve a gradient background, you can also use a Mapping node, personally best set to point, in order to rotate, scale and position it as you please. Here, see for yourself:

Using Normal allows you to properly use Rotation to legitimately rotate the gradient, though it does not seem to stay linear. Using a Gradient Texture node does not work with any of these nodes, as far as I have currently determined.

Edit: By setting scale as seen here, I have managed to straighten the gradient, but it only works at certain angles.


Camera culling- option not available To limit the memory usage of my scene(which is more complex then given below) I wanted to  use camera cull, but the option seems to be greyed out. How can I use this feature?

You need to activate the camera cull option in the scene->simplify panel


How can I make the decoration to take the shape of any object I'm trying to make a design of decoration to be like the shape of " sphere, car, body ... etc "  for example I convert an image of decoration to be SVG then I make it like sphere shape .

as I used "simple deform" modifier to make it, but I can't use same modifier to make the decoration like the "heart, car, building, face ... etc ", for example can I replace the wires in the below heart with shown decoration in the beginning ? or make the decoration like shape of the car "if I have a car shape" ... then I can print it using 3D printer .

I hope my idea is clear for you .

You can achieve this effect with the Shrinkwrap modifier as long as the pattern you are trying to apply is a mesh. For this to work best you should create a volume of your pattern, preferably spherical, then apply the shrinkwrap modifier with the "project" setting.

I would suggest keeping the pattern flat, then adding the thickness after it has shrinkwrapped around the object (possibly with the solidify modifier).

An alternative is also the Cast modifier, however this works only on geometric objects like spheres or tubes.


Retopologizing Circular Window I made a circular window along a curved surface with Subdivision Surface modifier applied.[![enter image description here][1]][1]

The bottom edge seems fine, however the top edge is crimped and somewhat distorted, the top edge also forms a lip which projects away from the mesh and is visible when in front view;

and here is the underlying geometry, which as far as I can tell is all quads

How do I retopologise to fix this, if that is at all possible? How do I avoid this problem in the future?

Update: The topology shown here has been modified  in that I deleted the quad faces around the circle. However I still don't know how to connect the circle to the outer edge loop smoothly.
.blend:

I believe it's an issue with the density.

What you might want to do is start over and equal out the densities of Yellow and Red (several ways to approach this) before punching the holes to get an easier and cleaner result.

Alternatively you could add another ring and then retopo accordingly to get a cleaner hole.

Here's a quick example (sorry for the messy image).

I used bevel on the outer ring to add another ring.

Next time, please link the mesh so it's easier for us to help you :D


Is there a better way to make addon working on both blender 2.80 and 2.79? I know this works:

import bpy

class Test(bpy.types.PropertyGroup):
    def unedit(self, context):
        print(self.type)
    if bpy.app.version >= (2, 80, 0):
        type: bpy.props.StringProperty(default='xxxxxxxxxxxxxxxxxx')
        name: bpy.props.StringProperty(update=unedit)
    else:
        type= bpy.props.StringProperty(default='xxxxxxxxxxxxxxxxxx')
        name= bpy.props.StringProperty(update=unedit)

bpy.utils.register_class(Test)

but it is coping and paste solution (bed for many properties). Is there a better way?

Two separate addons

The code in question and your answer has versioning for one part of the changes from 2.79 to 2.80, ie annotations in property groups.

I would suggest writing  two addons, one that works in 2.79 and one that works in 2.80. (As opposed to having versioning code ad hoc in each py file.)

Distribute as an addon for that version. If using github a branch is often used.

If wish to distribute as a single addon that works in both, suggest putting each in a subfolder of the root folder of the addon, then in the addons __init__.py check once for version and import modules from that version folder.

See this post on fake modules for some cool trickery https://stackoverflow.com/a/27476659/5317130


Rigid Body Unbalanced Weights I have not seen a post about this on BSE yet.
Is there a way to create a rigid body simulation with two connected objects with different weights?
Think of a hammer or a mace. Naturally, the heaviest part (usually the metal head) would fall facing the ground, with the lighter part facing up.
However, rigid body physics simulates an object as one single weight without any heavier or lighter parts.
Using compound rigid body physics with child and parent relationships would not solve the problem because they are meant mainly for individual not necessarily connected objects, and they do not allow for each individual object to have a different weight.
Is there any way to simulate a rigid body object with varying weights throughout the object accurately?

I would use a rigid body constraint:
https://docs.blender.org/manual/en/latest/physics/rigid_body/constraints
https://docs.blender.org/manual/en/latest/physics/rigid_body/constraints/types/fixed.html


How to undo a Bevel modification? Bevel in Blender is "simulated" by splitting edges into multiple faces. This results in a lot of crap which makes it harder to modify an edge afterwards. What is the best way to deal with it? I would like to be able to easily undo a bevel modification and reapply it after a line or vertex modification. I mean in a long term method, of course I can use the undo history for short but this is not usable after save and other modifications took place in between.
Please keep in mind that Bevel of different edges might have different parameters or diameters and so on.
I know you can store a Bevel modification per mesh but can this be done for parts of a mesh also?
If there is no easy way to manage a Bevel what might be the best procedure to disbevel an edge?

I would use the bevel modifier, and not apply it, that way it remains editable, and suppressible.

Also You can Limit by Vertex Groups.

Everything you want all in one Modifier.


2.80: Pie menus and Quick Favorite menu - conflict? When I have the 'UI Pie Menu Official' activated I cannot open the Quick Favorites Menu when pressing q. All I get is another pie menu with possible view port option (top, front, left etc.)

Any idea?

Pie Menus are enabled by default in blender 2.8, so you no longer need to enable the addon.  So now the q key will work as quick favorites.

But how do you get the view pie menu that the addon previously provided with key q?  Well, that's now the backtick key (`).  You can see all the pie menu key mappings under the user_preferences->keymap and filtering on pie:


Quick way to move an object some distance from one external vertex to another external vertex? I'm trying to move away from Autodesk Max, but I work with a lot of 2d plans, and one thing that I do very very often is to move an object ( or vertices of one object ) a distance x, taking as reference two vertices of another object ( or different objects ).
I know that I can do this in Blender using the 3d cursor, but there's three steps involved, and as I said I do this a few hundred times per day. Is there any way ( even if it's an addon ) to do it faster, without middle steps, like in this animation ( from 3dsmax ):

A basic script for doing nearly the same (in object mode):

It is visually different as the object will move at first step then at the second one.
But the result is as expected, I think.
Use D key to use it. You can use Blender snapping options (i.e. snap to vertex) or not.
The principle is to use grab operator with invoke default from a modal operator:
import bpy
from mathutils import Vector

class GrabOffset(bpy.types.Operator):
    """Move an object by an offset"""
    bl_idname = "object.grab_offset"
    bl_label = "Grab with offset"

    def modal(self, context, event):

        #Left click
        if event.type in {'LEFTMOUSE'}:
            #Second left click?
            if self.second_locations:
                #Calculate delta and move objects
                for obj, floc, sloc in zip(context.selected_objects, self.first_locations, self.second_locations):
                    obj.location = floc + obj.location - sloc
                return {'FINISHED'}
            #First left click
            else:
                #Keep locations
                self.second_locations = [Vector(o.location) for o in context.selected_objects]
                bpy.ops.transform.translate('INVOKE_DEFAULT')

        #Aborting
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            context.object.location = self.first_location
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.selected_objects:
            #Keep original locations
            self.first_locations = [Vector(o.location) for o in context.selected_objects]
            self.second_locations = None

            context.window_manager.modal_handler_add(self)

            #Invoke grab
            bpy.ops.transform.translate('INVOKE_DEFAULT')

            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}

keymaps = []

def register():
    bpy.utils.register_class(GrabOffset)
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new(GrabOffset.bl_idname, 'D', 'PRESS', shift=False)
        keymaps.append((km, kmi))

def unregister():
    for km, kmi in keymaps:
        km.keymap_items.remove(kmi)
    keymaps.clear()
    bpy.utils.unregister_class(GrabOffset)

if __name__ == "__main__":
    register()

    # test call
    #bpy.ops.object.modal_operator('INVOKE_DEFAULT')


2.8 Python Outliner Collections Im trying to make a script to add a set of collections to the outliner as I often setup the same or very similar hierarchy for each my projects. In Blender 2.8 if you right click in the outliner and create a new collection the code is

bpy.ops.outliner.collection_new(nested=False)

If you try using that in a script you will get an error on the consol

RuntimeError: Operator bpy.ops.outliner.collection_new.poll() failed, context is incorrect

I have gone back and fourth through the inbuilt API reference to find an alternative but haven't came up with anything that works properly. I expect there must be some fundamental gap in my knowledge about how context works and how to pass correct context.

One thing which seems to sort of work is

bpy.ops.collection.create(name="Test123")

The problem with that is that the collection is not part of anything, it ends up as orphan data in the blend file and I don't know how to arrange it into the view layer. Once again, I expect there are some simple concepts of implementation I don't know, preventing this from working as expected.

This seems to work (not verified against any official documentation):

myCol = bpy.data.collections.new("Test123")
bpy.context.scene.collection.children.link(myCol)


How to bake "full render" in blender My objective is to make models for android so I want to bake textures on low poly (plane) in case of a high poly floppy disk. I want the textures to appear on both sides of the plane. I tried "Full render but all in vain".

EDIT: This is because I did not check "Selected To Active"

When I did a full render bake, this is what I got

Could you enlist steps to do this??

Secondly if instead of a plane, i make a cuboid and I want textures to appear on all sides of the cuboid as if someone take picture and apply on the faces of the cuboid. How is that possible??

Select the high poly then the low poly mesh. So the active will be the low poly. Check the option Selected to Active in the Bake panel. Here is an example:

To be able to do this you have to UV unwrap the plane or cuboid and assign
a texture for the UV to bake on. But you have already done this. :) To use
a cubeoid, you simply have to adjust it so that it represents the models
geometry as close as possible.


Dissolve or disintegrate part of mesh while it is animating? Is it possible to dissolve each vertice of a part of a mesh while it is on the course of its own animation?

I.E have an animation for the mesh and have an animation for the disintegration and have the disintegration say remove half of the mesh while it is animating on its other animation (the transformation, rotation, scaling of its other animation that is not disintegration)?

Then I can make multiple disintegration animations, say 4 total and each will disintegrate 1/4th of the whole mesh, and play all 4 at the same time of its other animation to see the whole mesh, not just part, disintegrate while the single mesh is moving over the course of its animation?

Basically dissolve the mesh without having it jump to some pose before it can dissolve. I.e. it can be in any animation pose when it can start dissolving.

I think you are looking for the Build modifier.

The build modifier erases your mesh, then animates it being "re-built" face-by-face.  Just add a Build modifier to your object, set the Start frame and frame Duration to the desired amounts.  Then check Reversed to have it progressively take away geometry instead of building it from empty.

To get a more dissolve-like effect I would also check Randomize, this makes it randomly choose faces to take away, instead of sequentially doing connected adjacent faces.  Here is a side by side comparison, with Randomize checked on the left and unchecked on the right.


Unit selection circle in BGE? Someone call it a Selection Indicator or Halo. I would like to know how to make this effect in BGE?

The best way to do this at the moment is having an object (the shape itself or a plane with a shape texture) that follows the Character, and turns visible or invisible depending on the character selection state.
You should be able to do this even without coding, by using the visibility actuator logic brick.


How do I remove the glow from particles I've setup a plane with a particle emitter system. When I render the footage and the particles are glowing. Where do I find the settings for that?

As mentioned by CharlesL,
that glow is caused when the particles are rendered with Halo selected in Particle settings > Render:

From the wiki:

  Particles may be rendered as:

  Halos (for Flames, Smoke, Clouds).
      Meshes which in turn may be animated (e.g. fish, bees, …). In these cases, each particle “carries” another object.
      Strands (for Hair, Fur, Grass); the complete way of a particle will be shown as a strand. These strands can be manipulated in the 3D
  window (combing, adding, cutting, moving, etc).

To render a surface, you can change the rendered type to Object (to render a copy of an object in place of the particle) or Group (to randomly select the object from a group of objects)

You can change the halo settings by adding a halo material to the emitter object and changing the Material setting to the appropriate value in Particle settings > Render

The other options are

None
fairly self-explanatory, do not render particles
Line
Render a line along the vector of the particle
Path
Used with hair particles
Billboard
Render 2D planes at a fixed angle to the camera


Animating multiple objects together I'm trying to animate multiple objects together in one animation, but can't seem to do that.

I have 5 cubes. I created 4 animations, but Blender automatically created another 4 animations for 4 cubes, called Cube001.Action, Cube002.Action, and so on.

Basically, when I move one cube, it modifies its position in another animation rather than the one I want, and disappears from the animation I need.

Turn the action editor window into "dopesheet" and you will see all your animations.
Every object has his own action, 5 objects animation will consist of 5 actions, editable together through the dopesheet.


Can't install 'Screencast keys' add-on User preferences, add-ons, won't recognize .py (screencast keys) file when I try to "install from file".  Oddly, it won't show up in Blender when the .py script is put into program files alongside all the all "view" files ending in .py.

There is a mod of the addon that works:

cd ~/.blender/*/scripts/addons/

git clone https://github.com/chromoly/blender-ScreencastKeysMod.git

then activate the addon

3D View > Properties Panel >Screencast Keys


How does fac differ with manual control versus node control? If I mix two shaders together, like the diffuse and glossy shaders, I understand that I can change the factor slider between 0 - 1.

and that having 0.5 factor will show a 50% mix of blue diffuse and green glossy.

What isn't clear to me is what is going on when something else is plugged into the fac input, if I plug in a checker texture for example, with white and black as its two color values.

This now clearly seperates the two shaders based on the checker texture, I understand its doing that but how does it get away with not just supplying 0 - 1?

If I am only allowed to supply 0 - 1 using the slider, what is the checker doing to the factor that I can't do with my slider? Can you explain what can be plugged in to the fac input and how it differs from the user control slider.

Using the slider will just give one value for the entire surface (or volume, now that we have volume rendering :)

Using a texture will give multiple values mapped to different locations (the  depends on the texture mapping of course):

Basically the texture is supplying a value between 0-1 per ray.

Think of it this way: Each "light ray" cast from the camera by cycles that hits your object will test to see if the mix shader is resulting in shader 1 or shader 2. If the texture controlling the factor is black (0) where the ray hit, it will bounce off the diffuse part of the shader. If it is white (1) where the ray hit, it will bounce off the glossy part of the shader.

So, you can use anything which results in a value (which is pretty much anything). However that's not to say that everything will give a meaningful or useful result.

Note that even if the factor is somewhere between 0-1, the ray will only sample one shader at a time (if you are using the progressive integrator), but with many rays sampling the same point it will converge to a pixel which is a mix between the two shaders.


How do i get an array of objects with increasing rotations to stay on a specific axis? quick question:
when i use an empty as an object offset in the array modifier and i rotate for example an array of cubes with it around the y-axis i get a circular arrangement like this:

is it possible to get the empty rotation on the objects themselves like this, so that the objects stay on the z-axis? the rotation has to increase with each new object (i.e. 10 / 20 / 30 degrees etc.)

thank you in advance!

I dont think you can do this with the array modifier or a different modifier. So I made this code:

import bpy
import math

Count = 10
distance  = [0, 2, 0]

rotationX = 10                              # in degrees
radiansX = rotationX *(math.pi / 180)       # in radians

rotationY = 0
radiansY = rotationY *(math.pi / 180)

rotationZ = 0
radiansZ = rotationZ *(math.pi / 180)

startRotationX = 0
startRotationY = 0
startRotationZ = 0

for x in range (0, Count - 1):
    bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(distance[0], distance[1], distance[2]), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False})

    if x == 0:
        startRotationX = bpy.context.object.rotation_euler[0]
        startRotationY = bpy.context.object.rotation_euler[1]
        startRotationZ = bpy.context.object.rotation_euler[2]

    bpy.context.object.rotation_euler[0] = startRotationX + (radiansX * (x + 1))
    bpy.context.object.rotation_euler[1] = startRotationY + (radiansY * (x + 1))
    bpy.context.object.rotation_euler[2] = startRotationZ + (radiansZ * (x + 1))

I hope this works!


How can I make objects behave as if they were solid? If I start blender, I see the default scene, with a cube, a lamb, and a camera. If I add a new cube, and the cursor is in or near the center, it goes on top of the original cube, or floats around roughly where the original cube is located, passing through it as if neither object were really solid.

But say I want to make the cubes behave as if they were both solid? How can I make blender treat objects as if they were solid?

You can turn your objects into rigid bodies.

If two rigid bodies are on the same place they will push away form each other.

In this example a cube and a sphere are on the same place. This is what happens when you hit AltA to start a simulation: The cube gets pushed away... (a plane is there to catch them as a rigid body, but passive type)


Texture painting only working in UV/Image editor I'm a bit new to blender and I have had a reoccurring issue with the texture painting either not effecting the 3d view model in a productive manner(painting over a million times with little effect) or not working at all while being fully functional in the UV/Image Editor. Am I missing a setting?

I had the exact same problem. I know it's been 3 years, so I guess you find a way to fix this, but if someone has the same issue, try deactivating the Backface Culling option in the brush options.


Blending material seams? I've been working on this mushroom to render and the stalk and dome create a seam where there is different materials. Anyone know how to fix this?

Divide your stalk and dome into two separate objects, then assign one material to stalk and another one to the dome.


Problem with drivers value's statement i set up cube rotation and movement by object near by cube,but i also want to set up its z location so it cannot penetrate through plane every time it move forward and backward,there is some problem in expression i use in driver.

Use a python console

Recommend using a python console or a text editor to crunch in your expressions when they get too complex. See image in the way it has shown the error message.  Most syntax aware text editors have some way to highlight matching brackets, including blender.

Define any variables in your expression first with dummy values

>>> x = 1

Conveniently if using the python console, the math methods are already imported, .

>>> locals().keys()
dict_keys(['__name__', '__doc__', '__package__', '__loader__', '__spec__', '__builtins__', 'bpy', 'C', 'D', 'help', 'Vector', 'Matrix', 'Euler', 'Quaternion', 'Color', 'geometry', 'interpolate', 'noise', 'bvhtree', 'kdtree', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log1p', 'log10', 'log2', 'modf', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'pi', 'e', 'tau', 'inf', 'nan', 'M', 's', 't', 'x', 'bmesh'])

just as most are known to the driver namespace (can be used in driver expressions)

>>> bpy.app.driver_namespace.keys()
dict_keys(['__builtins__', '__name__', '__doc__', '__package__', '__loader__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log1p', 'log10', 'log2', 'modf', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'pi', 'e', 'tau', 'inf', 'nan', 'bpy', 'noise'])

In the case you crunch in hit enter and the next line presents you with ... it most likely means you are missing a brace.

>>> sqrt(2) * (x - round(x, 0)) if (x % 2) < 1 else sqrt(2) * (x % 2
...
... )
1.4142135623730951

Test with different input values. The history (up and down arrows) saves retyping everything

>>> x = 0.33
>>> sqrt(2) * (x - round(x, 0)) if (x % 2) < 1 else sqrt(2) * (x % 2)
0.46669047558312143

And when you are happy with it, select it with the mouse  copy CtrlC and then paste CtrlV into the driver expression

See also defining a driver method and adding to namespace [Find Link]


Why is only part of my render taking so long? Did I do something wrong? (Cycles) So, I have been using blender for about two months now and have done a few small projects, but I decided to try something a little bigger.

I took a simple spaceship that I had modeled during a tutorial and added some burner effects to it, as well as an animation of it shooting and blowing up an asteroid. I added a quick explode and a quick smoke modifier to the asteroid to make it blow up. I've never really worked with these effects before, so I'm unsure how they effect render times.

The part of the animation with the spaceship renders relatively quickly, however any frame with the asteroid in it (frame 166 on) takes AT LEAST two hours to render, and doesn't seem to have the material I added to it ( a simple brown diffuse). I'm unsure if the render times are because of the added effects, or if I messed up something with my project.

I've gone through and turned down any of the quality settings that I thought I could afford to so that I could render faster. I'm using cycles render, but I don't have a GPU that supports GPU rendering. I was wondering if someone could take a look at my .blend file and see if I've done something wrong, or if it's just my computer.
Here's a link to the .blend file

http://www.pasteall.org/blend/41959

Thank you so much!!!!!

Rendering takes time.

Rendering complex scene takes more time than simple scenes.

The higher the number of particles the longer it will take to render.

Using a large number of subdivisions in the subsurf modifier will increase the number of polygon on the scene, further increasing the computation needed to render the scene.

Simulations will also use more resources and stress your computer.

Not all segments of an animation will take the same time to render,  it all depends on the elements used for each frame in the scene.

It seems to me that your scene exceeds the resources of your hardware. You don't state how much ram your system has, but chances are your system is running on virtual memory and going slower.

There are many things you can do to optimize your scene: Bake all simulations, reduce the complexity of your geometry, render in different layers and composite later, reduce the size of the image textures used. Maybe bake some of the materials...

As a side note: Never render complex animations as mpeg directly. Render as an image sequence and encode as video later, you'll be very disappointed if after such long renders your computer crashes and you realize all of the previously rendered frames are gone, and you have to start over.Rendering as image sequences will also allow you to stop the rendering process to use your computer and resume later.

I doubt there is anything wrong with the file itself.... You didn't pack your textures with the file, so it's hard to asses the scene properly. (Frame 166 rendered in 39 seconds using GPU on my system...)


How to seperate Blenderkit Assets from Empty I have a Pretty large Scene going on and naturally wanted to add some decals. I used some from blenderkit and most of them come attatched to an Empty. I Need to seperate them to make ivy grow on the actual model. They dont seem to be parented since removing parenting doesnt do anything. Is there a way to seperate the model from the empty?
Thanks in Advance :)

Reasonably sure that Blenderkit uses instanced collections to instance its objects.  You should be able to use Make Instances Real to turn the instance into a real object.
That said, Blenderkit provides a specific way of doing what you want to do, and that's to go into the tool panel for it (N panel on the right, BlenderKit tab) and then in the Selected Model section press Bring to Scene.
Both seem to work although there is some difference in organisation - I believe the BlenderKit specific Bring to Scene recursively adds all of the model parts and materials, wheras Make Instances Real only seems to do one level, but I am not as certain on that.
Either way should hopefully be helpful to you.


Where did object dimensions go in 2.8? Anyone seen this panel? Essential for precise modeling.

Same as in 2.7.

Press N while in Object Mode.

Or press on the little < sign on the right of the screen to bring out the window. If the transform section has been minimized, press on the triangle to expand it.


Viewport material shading looks like face orientation is wrong but the issue is something else The next image will show the problem I am having.

I've been playing around trying to fix this, I had this issue ages ago once but I never found a fix, a year later it has cropped up again. I have checked face orientation, normals are facing the correct way, there are no extra faces inbetween those sections, I have merged vertices by distance, applied rotation and scale, my seams and UV seem alright and I have no marked sharp edges. Images shown below, what have i missed?

Above is the blend file.

Edit: So my answer fixed the problem on my computer but not on yours apparently...
Show Backface seems to be the option you want to disable, it will affect the Material Preview in Cycles, it won't affect the Render, except in Eevee: