Efficient empty volume rendering in Cycles Suppose I am rendering a smoking torus from above in Cycles:

(at laughably bad resolution, of course, but that's not the point)

Cycles spends a lot of time rendering the empty space, even though the density is 0 (and therefore, the volume should have no effect on light). I don't quite know why Cycles has to think so much.

In fact, the render times can be almost halved (from 11 min to 6 min) by using an old BI trick and masking empty parts of the volume with a shadeless object (which can be made here).

This is fine for simple test renders, but now I'd like to make actual scenes with smoke and fire in them, and obviously my little masking trick won't work because there are objects behind the smoke that can't be masked. (Also, shrinking the domain is not an option)

How can I optimize scenes with large empty volumetric sections?

It's actually quite similar in Cycles and seems to speed up renderings as well (which indicates there is still room for optimization in Cycles volume rendering).

So with a basic setup:

You get result (~16 seconds):

Now add a Shader Mix Node and use Density as a Mix factor:

With current Cycles algorithms you can leave the second slot unconnected - it just tells Cycles to compute volume rays for areas that are masked by density with a value greater than 0.5 (screen shows the reverse of that, but it's the same if you connect Volume shader in second slot and use converter math node 'Greather than', which would be more intuitive, I guess).

Now the result of this little tweak:

Time almost halves! But there are very crisp edges - you can tweak that with changing the converter math node value to a very low number (which would tell cycles to leave out only area with density values close to zero:

And the result:

Still reasonable improvement over the original render time and nearly the same visual effect.


i'm a beginner following blender guru's donut tutorial trying to make the icing but when i try to pull down one vertex other vertices spasm out I move a vertex down and look around and suddenly i see a bunch of vertices that aren't right.

You might have proportional editing on
try pressing O to turn it off.
(it's also an icon at the top of the viewpoint - a circle with a dot in it.)


How can I save a dict in a scene propertyGroup? I want to save a dict of random information to the scene, per .blend file, the dict updates fine but on reload it is back to its defaults.

    bl_info = {
    "name": "Test",
    "author": "Test",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "description": "",
    "category": "3D View"}

import bpy
from bpy.app.handlers import persistent

region_3d_settings = (
            "view_location",
            "view_distance",
            "view_rotation",
            "view_perspective"
        )

class Test_Variables(bpy.types.PropertyGroup):

    startup_settings = {"clip" : {"start" : 0.01, "end" : 100},
                          "viewport" : {},
                          }

@persistent
def pre_save(scene):

    self_vars = bpy.context.scene.test_vars

    for a in bpy.context.screen.areas:
        if a.type == 'VIEW_3D':

            for setting in region_3d_settings:
                self_vars.startup_settings["viewport"][setting] = getattr(a.spaces[0].region_3d, setting)

            for s in a.spaces:
                if s.type == 'VIEW_3D':
                    self_vars.startup_settings["clip"]["start"] = s.clip_start
                    self_vars.startup_settings["clip"]["end"] = s.clip_end
                    break

classes = (
    Test_Variables,
)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.test_vars = bpy.props.PointerProperty(type = Test_Variables)

    bpy.app.handlers.save_pre.append(pre_save)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.test_vars

    if pre_save.__name__ in [hand.__name__ for hand in bpy.app.handlers.save_pre]:
        bpy.app.handlers.save_pre.remove(pre_save)

if __name__ == "__main__":
    register()

Make them properties

In as much as you can define anything to a property group, only those that are defined as bpy.props properties, or wired up as @property with setter,  will be saved to blender file (or elsewhere).

In example above, to use bpy.props and have them saved to blender clip would be a pointer property, and start a float property of another propertygroup.
Can create a property group with type,

clip_class = type("Clip", (PropertyGroup,),
        {"start" : FloatProperty(),
        }
    )

See the bpy.props documentation, in particular the setter getter example which emulates how a property is saved on the blend as an ID property on the object.

Better still

Alternatively, to save a "junk" dictionary with only string, integer, bool and float values use the rna

As used here

https://blender.stackexchange.com/a/54040/15543

can define a custom property on a scene and set arbitrary values in the dictionary that stores values to decorate the UI.  If you add a custom property named "prop" using the UI.  All the details filled in via the popup are saved, and used to decorate the display of the prop in the UI. Recommend viewing the source of rna_prop_ui.py

We can abuse this system.

 C.scene['_RNA_UI']['prop']
<bpy id prop: owner="SCScene", name="prop", address=0x7facac90e108>

>>> C.scene['_RNA_UI']['prop'].to_dict()
{'min': 0.0, 'soft_min': 0.0, 'max': 1.0, 'soft_max': 1.0, 'default': 1.0}

Can set, save file

>>> foobar = {"foo":True, "bar":100}
>>> C.scene['_RNA_UI']['prop']['foobar'] = foobar

and reopen, dictionary remains. The boolean is converted to int.

>>> C.scene['_RNA_UI']['prop'].to_dict()
{'min': 0.0, 'soft_min': 0.0, 'max': 1.0, 'soft_max': 1.0, 'default': 1.0, 'foobar': {'foo': 1, 'bar': 100}}

Another option is to use json to convert / read string dictionaries and store the dictionary as a string.

In your persistent handler, (add code to handle key errors)

self_vars = scene['_RNA_UI']['prop']['foobar']

notice scene is passed to the handler.


How to animate object with data file I have a csv file and an object, which i would like to animate using the data from the file. The file consists of x- y- and z data and time data.

how can i with python code access the objects location and set it to the given coordinates at the given time.

Do i need to iterate throuh all the frames? can it even be done with a csv file?

I am not aware of a direct csv importer. But of course you could write a python script for your special case. If your csv contains just object locations on a timeline, then it would be rather easy:

then you would iterate over the timeline something like this:

import bpy
context = bpy.context
obj     = context.object
scene   = context.scene

start   = scene.frame_start
end     = scene.frame_end

for frame in range(start, end+1):

    # Set object location to whatever you get from the cvs
    # here i just move the object along the x axis:
    obj.location.x=frame
    obj.keyframe_insert("location",frame=frame)

This is not a very efficient way to do an animation. The above example would be done much more efficient by just adding 2 keyframes (one at the start and one at the end) and let blender calculate the movement in between.

Also you might want to create the animation curves (fcurves) directly instead of keyframing every timeframe. But it really depends on what your csv data contains.

However, maybe the above script can help to start your journey :)


Inset faces not working as it had been a few moments ago A few moments ago, inset faces simply created a new face inside another face as it always did. Now, either this happens (see picture 1) or the border between the new face and the old one is disproportionate (see picture 2). Any ideas what the problem could be?

Your topology is not good, you have overlapping faces and vertices, if you move your face up and move some vertices you can see that it's not a quad but an ngon, you can inset an ngon but in your case it quickly creates overlapping.

Oh and as pointed out by Csarb3d, you need to apply your scale, it will fix the second point.


Freely move and rotate tip of bendy bone? I have an object that i'd like to be able to translate and rotate freely, while the  bendy bone below stays attached and curves and stretches accordingly. This works in edit mode but not when i switch to pose mode, it only rotates.
see gif:

how do i rig this up?
it has to be a single bendy bone because of the weight painting

Solved: https://youtu.be/BsJ3Grq_3GM
stretch to constraint and also start and end handle in bendy bones menu


lamp properties in game I am trying to animate a lamp properties in the bge yet since it is not a proper Action or ShapeKey I cannot use the standard logic bricks and I was wondering if there is a way around scripting.
I can access bpy.data.lamps['Lamp'].energy but whats the way to implement the code in the game ?

I managed to access the energy property in game with this script

import bge
cont = bge.logic.getCurrentController()
obj = cont.owner
obj.energy = 1.0


Set Freestyle line thickness using python script I have enabled the freestyle SVG add-on.  I can set the 'Line thickness' in the 'Render' tab.  But, I would like to change this value using a python script.  I can't find an example of this.

Does anyone know how to change the line thickness via script?

If you mouse over a field in blender it, amongst other things, gives you the script path

bpy.data.scenes["Scene"].render.line_thickness

For most scripts we use context.  If we are in scene "Scene" it is the context scene, rather than look it up from bpy.data.scenes

import bpy
from bpy import context # for testing
scene = context.scene
#set line thickness to 2.0
scene.render.line_thickness = 2.0

Or in the python console, where C = bpy.context for convenience.

>>> C.scene.render.line_thickness
1.0

>>> C.scene.render.line_thickness = 3.0


Color with falloff | Animation nodes 2.1 in blender 2.81a I have these squares that spin 90 degrees when the falloff passes over them, I want them to change color from blue to magenta at the same time, I've made this array to clone one and got the color to work but it's only effecting the first one since they are all using the same material. How do I do this?

I either want to color the emission node using the falloff
OR
Change color along with the 90 degrees of rotation

Rendered in cycles

I would love some help with this! :)

You can make use of the "Viewport Color" property of each object, since this property can be accessed in any shader.

See my answer here for more information : https://blender.stackexchange.com/a/163699/86891

In your animation node tree, you need to add an "Object Attribute Output" set to "color" :

Edit :

As of V 2.1.7, thanks to 3DSinghVFX there is a node specifically for this : The object color output.

Then access it in your shader :

These two objects share the same shader, but I am modifying the left one's color in my animation nodes tree :

In order to change each individual object's color, use this setup :

Don't forget to tweak the "Evaluate Fallof" node to output a list instead of just one value. You need to click on the button on the right of the "location" field in this node. Notice how it is blue tinted.
Result :


How do I align particles to the center of the object? I’ll keep it short,

I found myself playing with particles on Blender and I am unable to align them with the center of the object that emits them (which happens to be a cube).

This is what I get (default setup particles, I did not change anything):

And this is what I am trying to achieve:

So, any idea on what type of configuration I should be using? Thx for your time and happy blender!

I found the answer to my own question... lol

So here it is, it can be of help to any of you, or so I hope.

In short, you have to rotate the object (particles) in the X-axis -90º so it looks as it’s shown in the following image.

Then you just go Control+A, Apply Rotation and then you have it!


How can I change Blender's theme? I just downloaded blender and its very bright. I want it darker. How can I change the color of it?

What you want to change is the theme.
Here is how its done. Open your user preferences Ctrl+Alt+U.1 Then one the top you will see a couple of tabs one of the labelled Themes Then one the left from the drop down you can select a different theme. If you want a darker theme try Elysium.

And this is what it looks like.

If you want more themes you can get them here:
https://www.blendswap.com/blends/category/22

1: CMD+, on Mac. Edit menu -> Preferences in newer versions.


Weird line between mesh connections I'm new here, but this thing is annoying me for at least a whole month. I've searched everywhere and didn't find anything.

If I join 2 body parts, for example the arm and the torso of my character, there will be a kind of line between both, and this happens not only on Blender but on game engines like Unity too, even if the material and the texture are the same.

How can I fix this?

To show an example of this, I split the arm off my character and re-joined it, and there is a division where the mesh was divided. The effect is visible.

Before:

After:

It seems that it is due to the flipped surface. So try to go to the edit mode with face selection mode, then select the face and then click on "Flip Direction" option as shown in screenshot below.


How to make a procedural node setup to for raindrop effect for EEVEE? I just saw this amazing video that shows procedural raindrop effect using a node setup in EEVEE, created by this person. It's not possible to see the node setup from the video. So I wonder if someone knows how to create a node setup that does what's being shown in the video.

Use a Voronoi texture node to control roughness and normal (bump). Use a mapping node to stretch the texture in z-axis and animate the z-axis location to make the rain drops run down the sides:

On top of this, try to experiment with a noise texture to modulate the x and y axis to make the drops go down in a not so straight line.

Note: This approach only really work well on cube-like geometry with rounded corners.

EDIT: I worked further on this and with inspiration from Eris answer I updated the setup to the following:

The two voronoi textures are animated independently to make two sets of raindrops of slightly different sizes and speeds.

Even though I used Eevee for the above example, this works perfectly fine with Cycles as well. The first example was made using Cycles in 2.79, the second with Eevee in a recent 2.8 build.

Here is the .blend-file (Note: this is a Blender 2.8 file):


I can't seem to select any vertices edges or faces in edit mode, blender 2.8, Mac OS 10.12.5 I'm trying all three point/edge/face contexts and using the select tools, yet nothing is selecting. I can't do any modeling! I've read a few other posts pointing to graphics drivers, but I have the best drivers for my system, or at least I've been using this driver for the last 6++ months, and there isn't a newer one available. Am I out of luck for now?

I have 3 nvidia gpus on a 2012 Mac Pro, it's working perfectly in all my other software like c4d, redshift and octane. Nvidia Web Driver 378.05.05.15f01

Please help if you have an idea of what to try next!?

This happened to me when I first started using 2.80 because it was trying to use my 2.79 key maps. That would explain why it is working on other machines where perhaps you don't have 2.79. Toggle the console on and see whether you have error messages at start up.

I don't use a Mac, but if you can work out how to delete your old settings then that might solve it. I have a feeling they added a button to the initial splash screen which allowed you to start fresh.


Black hair material instead of selected material To make this quick, when I go in render view, or actually render the scene, the hair particles appear black instead of purple. So I end up with this abomination. I am using Cycles btw.

Here are the nodes of the material used on the mesh:

And a proof that I'm not completely stupid. I am using the same material:

Can someone help me fix this please?

Link to download the .blend: https://drive.google.com/open?id=11a65XueeeWegHhS8QU3Kjq7_wf-Sz9Rs
The model is nsfw, so I only put the head, sorry.

I did some poking around and it turns out you can't use subsurface shading or normal mapping for hair particles. So I added a new texture called "Shantae_Particle", deleted the Fresnel subsurface input, and used tangent mapping instead of normal mapping and it works now.

Also note that the Principled BSDF has Fresnel built in so there is usually no need to add it in other ways.

Here is the screenshot and below it is the fixed blend file.


How to batch join a sequence of images with a sequence of alphas? What I have:

[A] a sequence of RGB images
[B] a sequence of grayscale alpha images (but also in RGB)

What I want:

a sequence of RGBA images that have untouched RGB channels from the [A] sequence, and the alpha channel created from the [B] sequence.

Is there a way to do this using Blender's sequence editor?

EDIT: I'm almost there. The trick is to load both sequences as Movie Clips, add these to the compositor using the Movie Clip node, and combine channels.

The remaining problem is the way the alpha is handled - I want straight all the way (so that the RGB channels are not touched), but I can't find any settings for that, and I get a white outline, such as often appears when there is straight/premultiplied alpha mismatch:

https://dl.dropboxusercontent.com/s/jvf9r7fu6j9hrna/shot_170905_203012.png

What you try to achieve is extremely simple:
Just plug the RGB image to the Composite's node "Image" socket and plug the Alpha image to the alpha channel, and make sure you're saving to an unassociated alpha format, as PNG.
The same effect is achieved by just plugging a set alpha node and connect the output (Now RGBA with the new alpha assigned) to the Composite's "Image" socket.

Keep in mind that both methods will produce exactly what you want, but you won't be able to see it in the viewer, as Blender expects an associated buffer to display. The saved PNG will be fine.

That being said, it's important to remember that PNG and unassociated alpha are no the best choice for CG and VFX.
Associated alpha allows you to create composites where your transparent pixels can also be luminous, producing lighting effects that are absolutely impossible using unassociated (straight) alpha.
Preserving RGB is only useful when you want to do associated alpha compositing. It is completely useless with unassociated as the alpha over operation will make any pixel with alpha=0 disappear.


Texture is black and won’t change I’ve been watching “Blender Guru” make a donut and following. I first made my texture paint fine, but when I did the displacement something went wrong. I don’t remember why, it just turned black.
I went to redo my texture paint and now it’s just black. No matter what I do, my paint won’t show and it is only black.
Also, this might help more. I did change the blend in texture painting and I could paint on it. But it was the cloud texture. I tried to change it, but now I can’t paint anything on it.

I had the same problem too, but I fixed it by following the instructions to this answer. Here are the steps:
1. In the Texture Paint tab, press N, and click Tool on the right side-bar.
2. Under Brushes click the X button to delete the brush, then add a new brush.
3. Then select a colour under Brush Settings, go to the Colour Picker dropdown, and then draw over the object.
I hope this works for you.


How can I get rid of this bulge? This bulge on the glove has appeared whilst I was adjusting my hand and arm armature. I figured it was just down to messing with the Weight Paints, but after trying, I could only reduce it slightly. How can I get rid of this?

Thanks

You should have added that picture; I'll bet a hundred would know in a second. It's the inside of the glove poking the wrong way. It's weight is too strong and possibly to the wrong bone. It's outpacing the outside of the glove (assuming it's a glove specifically) and moving faster than the positive-facing normals. That gray strange color is the dead giveaway; those normals are flipped and display like that when you haven't enabled 2-sided. (I'm glad you didn't enable 2-sided or it wouldn't show up so clearly.)

Less weight will reduce your swelling. That will keep the gap between outside and inside from inverting. Depending on your needs, you might paint that portion to another bone? I understand the problem but can't tell you the perfect solution for you.


Merging two separated parts back into one perfectly I have a spherical-like object whose thickness is 1.6 mm.  There is a section of the surface that is to be only 0.8 mm thick.  So I changed the thickness of the entire object to 0.8 mm, then selected the faces that define that special region, then pressed P to separate it from the rest of the object, then changed the entire object's thickness back to 1.6 mm.  So now that special region is 0.8 mm as desired.  The problem now is the gap between that region and the rest of the surface caused by the separation.  I want to close that gap so that from the outside, the surface looks like a single surface and no one can tell where the 0.8 mm thick region is.  What is the most precise way to do this?

I tried moving the edges and vertices of the region so that it intersects with the original surface, but the intersection is not clean (see below).  How to do it perfectly so that it looks like the original surface from the outside?

When I join the two with Ctrl+J, the two regions share the same edges, so I'm stuck on how to proceed there as well.

Have you tried smooth vertex?

Select mesh
Edit Mode
Select these vertices/faces
select smooth vertex from the tools panel

UPDATE:

Another way to do this is adding the thickness to the opposite direction by flipping the face normals and then adding thickness using the solidify modifier. This will add thickness internally so that the original mesh is not messed up as shown below:

I split the sphere into upper and lower half:

I then switched to edit mode and flip normals:

Then add the solidify modifier with the desired thickness and apply it:

as shown I added thickness -0.8 which was added internally.

I then joined the two meshes:

As shown the lower half has more thickness than the upper half.

I wrote the below script to do these steps between two meshes automatically:

import bpy

ob = bpy.data.objects['Sphere.001']
ob.select = True
bpy.context.scene.objects.active = ob
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.flip_normals()
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.modifier_add(type='SOLIDIFY')
bpy.context.object.modifiers["Solidify"].thickness = 0.8
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Solidify")
ob2 = bpy.data.objects['Sphere']
ob2.select = True
bpy.ops.object.join()

A blend file can be downloaded from here:


Animating model instances I model a digger assembled of multiple parts, place several instances of it into the scene and animate each instance's bucket individually within the rotation constraints specified by the model.

This is the task to be performed. An everday's task and a core requirement for an animation software.

Or, construct a car and put some of this same brand and model into the scene. One should steer to the left, another one to the right, the next one's window is open and another one's trunk is open. They are all instances of the same model, just with movable parts to be animated within the limits as specified with the model.

My problem is that it's not doable in an acceptable way:

Copying the objects the digger is made of would mean that any future change to the model would have to be done numerous times with every instance. Copies are not instances.
The parts of group instances are frozen. The group's objects, like the bucket, are not rotatable individually.

After 15 years of trying to work with Blender, stumbling across this again and again, I'd really like to know this now.

Thanks

It sounds like you need to add an armature and rig it to your mesh.  The various armatures can be posed and animated independently although they share a single armature datablock.  The same with the objects instantiating the mesh.

I found a couple of rigging tutorials by searching for  blender armature rigging.

https://www.youtube.com/watch?v=B9iL1hmJXrI
http://www.blenderguru.com/tutorials/introduction-to-rigging/

And the Humane Rigging series is somewhat legendary

https://www.youtube.com/playlist?list=PLE211C8C41F1AFBAB

It is entirely possible to place multiple independent meshes under control of a single armature by giving each mesh an armature modifier pointing at the controlling armature.  This still requires assignment of vertex groups, but you would have to do that in a single-mesh situation anyway.

An even simpler system is to give each mesh a "child of" constraint and make it the child of a single bone in the armature.  This is only appropriate if each mesh is a single rigid element, but if your objects are constructed in this way, you do not have to assign vertex groups.

I am not sure what problem you are solving with proxies.  When I am linking assets from external files, I often end clicking Make Local on the Object datablock (storing positions, constraints, modifiers, etc) and the Mesh datablock is still a link to the source .blend.  Changes to the mesh will be reflected in the linking .blend upon next load.  The drawback is that changes to the modifiers and object position would not be.

My suspicion is that blender can accomplish the vast majority of what you want to do, but some of the workflow steps are not covered by the tutorials you have read yet.


Why are my classes and functions not working in Blender 2.8? The buttons I created stopped working, they worked in blender 2.79. By the way, the standard buttons work, but my not. Any thoughts on this? Please tell me what could be the reason. Thank!

Button example:

class ALLSELECTDELETE_PT_operator(bpy.types.Operator):
"""All select and delete"""
bl_label = "Delete all"
bl_idname = "object.all_select_delete"
bl_description = "All select and delete"

def execute(self, context):

    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)
    bpy.ops.view3d.snap_cursor_to_center()

Look in system console for errors

Start blender from a system console and note any error or warning messages that pop up during registration.

Where does console output go

How to view python error messages?

Blender 2.8 has a far stricter naming convention for operators and panels.  The operator with bl_idname = foo.bar should be given the class name FOO_OT_bar  (_OT_ indicates "Operator Type")

Here is an adjustment to the code, I have prepended the button to the 3DView header to test.

import bpy

class OBJECT_OT_all_select_delete(bpy.types.Operator):
    """All select and delete"""
    bl_label = "Delete all"
    bl_idname = "object.all_select_delete"
    bl_description = "All select and delete"

    def execute(self, context):

        bpy.ops.object.mode_set(mode='OBJECT')
        bpy.ops.object.select_all(action='SELECT')
        bpy.ops.object.delete(use_global=False)
        bpy.ops.view3d.snap_cursor_to_center()

def draw_button(self, context):
    self.layout.operator("object.all_select_delete")

def register():
    bpy.utils.register_class(OBJECT_OT_all_select_delete)
    bpy.types.VIEW3D_HT_header.prepend(draw_button)

if __name__ == "__main__":
    register()


How to run a script with lot of nested loop without crash I have a blender python script that I used to produce a lot of different dataset for my machine learning project. The problem that I have is that I use a lot of nested loop to simulate a lot of different scene. This is my full script

import bpy
import os
import glob
from math import pi

scene = bpy.context.scene
directory = '/home/cgal/testimageSFS/Hasil_blender/'
list_ob = '/home/cgal/3d_scans/*.ply'
lampu = bpy.data.objects["RGB"]
lampu_utama = bpy.data.objects["Lamp"]

counter = 0

rgb = {'r':(1,0,0) ,'g': (0,1,0) ,'b' : (0,0,1)}

for img in glob.glob(list_ob):

    #create face object
    bpy.ops.object.select_all(action='DESELECT')
    bpy.ops.import_mesh.ply(filepath=img)
    obj = bpy.context.selected_objects[0]
    nama = str(counter)
    obj.name = nama

    #modify face
    face = bpy.data.objects[nama]
    face.scale =(0.00001,0.00001,0.00001)
    face.rotation_euler.x = pi/2
    face.location.z = 3.23

    #attach skin
    mat = bpy.data.materials.new(name = "Skin")
    mat.use_nodes = True #Make so it has a node tree

    #Add the vertex color node
    vc = mat.node_tree.nodes.new('ShaderNodeVertexColor')
    #Assign its layer
    vc.layer_name = "Col"
    #Get the shader
    bsdf = mat.node_tree.nodes["Principled BSDF"]
    #Link the vertex color to the shader
    mat.node_tree.links.new( vc.outputs[0], bsdf.inputs[0] )
    face.data.materials.append(mat)
    #take Pic
    for x in range(-10,11,2):
        for y in range(-7,-2,1):
            for z in range(-6,11,2):
                #change center_lamp position
                lampu_utama.location.x = x
                lampu_utama.location.y = y
                lampu_utama.location.z = z
                xs = str(x+10)
                xs = xs.zfill(2)
                zs = str(z+6)
                zs = zs.zfill(2)
                utama_loc =xs + str(y+7) + zs
                for pow in [1000,5000,10000]:
                    #change RGB power
                    lampu.data.energy = pow
                    power = str(pow)
                    power = power.zfill(5)
                    for i in range(-5,6,1):
                        #change RGB light position
                        lampu.location.x = i

                        #take normal picture
                        for ob in scene.objects:
                            if ob.type == 'CAMERA':
                                lampu.hide_render=True
                                bpy.context.scene.camera = ob
                                file = os.path.join(directory,nama+'_'\
                                +'_'+utama_loc+'_'+str(i+5)+'_'+power+'_a' )
                                bpy.context.scene.render.filepath = file
                                bpy.ops.render.render( write_still=True )

                        for n,color in rgb.items():
                            lampu.data.color = color
                            col=n

                            #record RGB
                            for ob in scene.objects:
                                if ob.type == 'CAMERA':
                                    lampu.hide_render = False
                                    bpy.context.scene.camera = ob
                                    file = os.path.join(directory,nama+'_'\
                                    +'_'+utama_loc+'_'+ str(i+5)+'_'+power+'_'+col )
                                    bpy.context.scene.render.filepath = file
                                    bpy.ops.render.render( write_still=True )

    #delete face object
    bpy.data.objects[nama].select_set(True)
    bpy.ops.object.delete()
    counter=counter+1
    break

The problem is I keep having my PC freeze at some point (not fixed sometimes in 6 min sometimes in 7 min) even when I run the script without GUI, this is the command that I used blender myscene.blend --background --python myscript.py. So is there any solution to fix this besides reducing the number of possible scene on my script? Thank you

My PC specs :
ubuntu 18.04
i7 3770
gtx 1080ti
16 GB of RAM

Full blend file

link to one of .ply I used :
download here

Ok so apparently when I run it on same PC but with windows OS it can run without any crash so far. So I will submit this into bug for linux later on. Thank you for all the helpful comment especially lemon who go as far as trying my code in his/her PC


Why does the knife tool create random extra geometry? The knife tool seems to be generating duplicate vertices, creating additional unwanted geometry. Is this a bug or related to camera or tool settings?

Any idea?

edit:
Clarifying the vert:

try using line tool instead, it is pretty similar to knife tool, works pretty well and has some additional functionality, like create faces and objects
https://github.com/Mano-Wii/Addon-Snap-Utilities-Line/wiki


New default file template? In Blender 2.80, you have options now to set a file template with it's own set of workspaces. Is there a way to rename, or better yet create a new file template?

You can add your own App Template by using the Operator Search F3 to find Install Template from File.... The underlying operator PREFERENCES_OT_app_template_install allows you to install a zipped App Template.

If you don't have a zip file you can copy and modify one of the existing templates. You can find the location of the template files by switching to the scripting workspace and typing the following code into the python console:

for x in bpy.utils.app_template_paths():
     print(x)

This will print the path(s) where the build in application templates are stored.

Each template consists of a folder containing a startup.blend and a init.py. The former is the default project that is loaded. The latter is a Python script that contains a callback function / handler that is executed once the startup.blend is loaded. This allows to perform additional configurations. The folder name is the name of the template. Below you see the basic structure of such an init.py.

import bpy
from bpy.app.handlers import persistent

@persistent
def load_handler(dummy):
    pass

def register():
    bpy.app.handlers.load_factory_startup_post.append(load_handler)

def unregister():
    bpy.app.handlers.load_factory_startup_post.remove(load_handler)

The load_handler() is the function that will be registered once you select the app template in Blender and then executed once the project is loaded. When you create your template you can add whatever additional Python code you like here. If you copy an existing template to create your own, you may want to edit this function or replace it's content with pass to make it do nothing.

Now in order to create your own template you need to do three things:

Either copy an existing template or create your own directory with a startup.blend and init.py
Open the startup.blend and adjust the UI to your liking
Open the init.py and modify the load_handler. (If you're unfamiliar with software development simply copy and past the example given above, which does nothing.)

Your new template should be available right away when you restart Blender, if you've created the files in the directory where the other templates are stored. Otherwise you will either have to copy it there or create a zip file of the directory and install it by using Install Template from File... as described at the beginning.


How to make multiple displacements map node thanks in advance for any help.
Sort of a beginner but also not. Just haven't tried doing this before.
So this is what I have done so far.
I took multiple images and put them in a rgb in photoshop. So now the 3 layers are over one another and I exported it as a TIFF file.
There are 4 of the TIFF files.
So now what I want to do is to paint the 4 textures in blender onto an object. Take the unwrapped object, export it as one tiff. Back into photoshop and separate the rgb layers again to have one tiff instead of 4.
So then once I have done that I will put it back into blender to have multiple layers to change the intensity as I would like it to be.

I truly hoped I explained it properly. My English sucks. So If you have any questions I would answer the best I can.

Thanks in advance for any help provided.

the displacement Im trying to replicate from texture xyz
https://texturing.xyz/pages/making-a-digital-face-sefki-ibrahim

1) Put images into rgb and crop the mouth forehead and nose part.

2) paint onto character

3) back to photoshop to seperate the pictures

4) use as displacement in blender

thats where I am now
test it with a cube and the method worked. Now I just want to know about nodes with multi displacement.

I havent baught the displacements yet. Im doing tests to see if its possible in blender because I havent found any tutorials on this. Only in other programs so Im trying to replicate. They are expensive so I dont wanna buy something I can do nothing with.

So there will end up being 3 different displacements. I know how to put 2 but not sure with 3

If you paint an image on the model with texture drawing, it just copies all the texture channels into your target texture. It's totally up to you, what kind of information you store in those channels. You can paint even normal maps onto a model.
If the displacement maps are just grayscale images, you mix them with add, or screen (or whatever you want) blending, and then feed the result to the Bump node (or to displacement input of the material).
You even don't need to separate the colors of your painted colored image in the photoshop - you can use 'Converter\Separate RGB' node instead, play with the levels of each channel, mix them together, and feed that mixed value to the Height input of the Bump node, or to the Displacement input of the material output node.
And images on your link are enough to play with to have an idea. If you want, you can paint some scratches with white and black brush (50% gray = no displacement) to see how it affects the look of the surface of your mesh.


How can I clean up internal geometry? In an attempt to create some "realistic" clothing, I used Shrinkwrap to project a mesh onto a character. So that the clothing appears elastic, and not glued to the them, I then used Convex Hull on the horizontal loops (I tried it on the entire mesh but it had unwanted results). Unfortunately it has left me with LOTS of internal geometry (see image), and was just wondering if there was a way to delete it all. I thought I remembered reading about such an operation in the Blender manual, but can't seem to find it again.

One way is to select bottom most and top most rim (edge loop) and make them seams. Then switch to face select, select one of external faces on the body and CTRL+L to select linked (it won't work in edge or vertex select modes). This way you will have selected only external geometry. Then you can press CTRL+I to reverse selection and delete faces.
It won't work though if inner geometry is linked somewhere else then on top and bottom with external geometry. If that's the case, the best way would be select face loops one by one with ALT+SHIFT+right click.  After all external faces would be selected, CTRL+I and delete.


How to create this painted metal material? I'm beginner at modelling and also in blender. Hope you can help me with this texture.I badly need help. Thanks

I would suggest to use the Principled BSDF shader, which allows you to create a metallic material with a clear coat. You can add a procedural noise as bump map for the small surface irregularities.

My setup in the screenshot below uses a Musgrave texture, which is connected to the Bump node which in turn is connected to the Clearcoat Normal socket of the Principled BSDF. The Principled BSDF has the Base Color set to nearly black, Metallic to 1.0, Clearcoat to 1.0 as well.


How to place the right seams for the UV mapping of a curvy object like this? In the pic is my object, it's basically half a deformed sphere cut in two.

I'm placing seams on an object in order to UV map it and add texture, but I don't understand how to do it properly. I chose the profile where the sphere has been cut, and two diagonals as the seams (you can see them in the pic). But when I use "Unwrap", I have no visible result in the UV/Image editor. I think it may be because I'm not placing the right seams, do you have any ideas on how to do that properly?

Thanks in advance!

I'm not at all an expert in unwrapping, but I'd say the trick is not so much in the seam placement, but more in the top geometry of the mesh where all the loops meet.

Make sure you have an all quads mesh that doesn't end in a triangle fan.

If you are not sure what I mean, try this:

1) Select the top vertex and delete it.

2) Select the first open edge loop, extrude it and right click to cancel (leave it in place).

3) Scale it to zero to make it meet at the center.
You may move it slightly up in Z to compensate so it's not perfectly flat.
Make sure you don't remove doubles so you have a quad's only mesh.

4) Lastly you can use the Unwrap > Follow Active Quads > Lenght Average to have an even rectangular unwrap.


When I paint in vertex paint mode, can I paint per vertex with python script? I know that selecting vertices is possible in edit mode. I want to color after selecting a vertex in vertex paint mode. Is that possible?

This does what you want I think. It's not particularly efficient though since it loops through all verts and all loops.
import bpy

ob = bpy.context.active_object
assert ob.type == 'MESH'
assert ob.mode == 'VERTEX_PAINT'

mesh = ob.data

# Get the active vertex color layer
color_data = mesh.vertex_colors.active.data

# Find index of all selected verts
sel_vindexs = set(
    v.index for v in mesh.vertices if v.select
)

# Find all loops (loop = corner of a poly) that touch
# a selected vert and make them to red
for loop in mesh.loops:
    if loop.vertex_index in sel_vindexs:
        color_data[loop.index].color = [1, 0, 0, 1]


how to curve cylinder like image below I want to curve the cylinder so it would be like a rotating ramp

Are you looking for something like that?


middle mouse key alternative everything has been great with blender. just one problem at the moment i need sort of alternatives button for middle mouse (the mouse wheel) button for rotating, panning etc. everything that have anything to do with the mouse wheel click.

after quite a while using it, now it's a bit broken and sometimes not responding on my click. much appreciated if someone can list everything that use middle mouse wheel button, that i need to change to completely replace the middle wheel click with something else. and alternative key suggestion would be nice too. (bit troubled with this one)

You can emulate 3 Button Mouse.
Blender 2.7
File > User Preferences... (Cmd + ,)
Blender >= 2.8
Edit > Preferences...
In the Input tab, check "Emulate 3 Button Mouse".
Now, you can emulate the middle button by pressing Alt + LMB (Left Mouse Button).


Copy Physics To Multiple Objects Using the cell fracture addon, I created many objects from my mesh. I want to have a rigid body physics on all of them. How would I copy one of the fractured pieces physics to all the pieces? I tired ctrl L and the copy attributes addon, but none of them have the option. Any help is great.

If you have one object that has physics properties and you wish that the other object had the same properties:

Select all object that you wish to copy the physics properties to
Select the object you wish to copy the physics properties from

note: We select this one last so that It becomes the active selected object. This is the object that has the desired physics properties.

Then In the Physics panel under Object Tools choose Copy From Active.

If none of them have physics properties than you will want to add them:

Select all objects that need physics properties.
Physics -> Add Active


How to instantly stop the rotation of an object in BGE? I can't stop the rotation of the camera(around the z global axis), in BGE. The camera is set to dynamic. Here is part of the script, the only one that affects rotation.

def rotation():
    if (mX < 0.10) and (mY < 0.90):
        cam.setAngularVelocity([0, 0, 0.1], 0)
    elif (mX > 0.90) and (mY < 0.90):
        cam.setAngularVelocity([0, 0, -0.1], 0)
    else:
        cam.setAngularVelocity([0, 0, -cam.getAngularVelocity().z], 0)
    #print (cam.position)
    print ("Angular Velocity :",cam.getAngularVelocity())

Setting the angular velocity to 0 does not work.So what I did was to subtract the current value(cam.getAngularVelocity().z). This kills the rotation but it is still slow and it creates a flickering effect.

I found 2 threads about this thing in other forums. They were unsolved. Any thoughts?

Here is the blend file

This appears to be a reported bug

Workaround: use a very small value like 0.00000012

def rotation():
    if (mX < 0.10) and (mY < 0.90):
        cam.setAngularVelocity([0, 0, 0.1], 0)
    elif (mX > 0.90) and (mY < 0.90):
        cam.setAngularVelocity([0, 0, -0.1], 0)
    else:
        cam.setAngularVelocity([0, 0, 0.00000012], 0)


2.8 Toggle the display of objects as a box of their extents? I find old answers to this. I can go to Object Properties->Display As->Bounds. But you can only do it per object. So you can't select all 100 objects lets say, to view as their extents in a box wireframe format. You would have to do them one at a time. And even if you could select all 100 or so, going back and forth would be tedious.

3D studio has a hot key to switch the viewport into this mode so that all objects suddenly show their orientation as simple see-thru boxes. Either way, when lining up the edges of irregular shapes, it helps to display them constrained to an outline resembling a box (be it oblong/rectangular/etc).

Surely there is an easier way?
Thanks for the help.

To change the same attribute on multiple objects at the same time:

Select all objects
Hover your mouse-pointer over the attribute you want to change
Hold Alt and either enter the new value by selecting from a list like this:

(shown here is the UI of Blender 2.90, but it works the same in older versions.)
Or in other cases with values, click in the field and enter a new value.

After the list was opened with Alt held, or a value selected also while Alt was held, the attribute will be changed for all currently selected objects. This will though not work if you have different types of objects selected that do not share the attribute you want to change, like a few Cubes and a Light for example.

Happy Blending


How can I make an object show up on different layers How can I make an object show up on different layers without having to copy it? E.g. I have an object animated and I want it to show up on multiple layers.

Shift + LMB on the layer boxes in the Relations section of Properties->Object.

Or in 3d view hit M in Object mode, and Shift + LMB on the layer boxes there


Add enum property to existing dropdown menu Under the render settings in the bake panel there is a 'bake type' dropdown menu.
Each of the options within this is enumerated, however I want to be able to add my own option to this drop-down box.

using:

bpy.types.CyclesRenderSettings.bake_type.__add__(my_tuple_item)

doesn't actually add anything to the menu, and the structure remains the same.
Is adding to this property group allowed?

Would there be a better way of going about it (apart from editing the source code)?

Thanks

scene.cycles.bake_type is already registered as a property of the CyclesRenderSettings class.  We can get the details of the enum from the class itself, or in the example below from  the instance; scene.cycles.rna_type.properties("bake_type")

Add a new item to the enum property list and redefine the property with our appended list.

import bpy
from bpy.props import EnumProperty

context = bpy.context
scene = context.scene
prop = scene.cycles.rna_type.properties["bake_type"]
items = [(i.identifier, i.name, i.description, i.icon, i.value)
              for i in prop.enum_items.values()]

# add one
if 'FOO' not in [i[0] for i in items]:
    items.append(('FOO', "Foo", "New Foo Item", 'NONE', 11))

    bpy.types.CyclesRenderSettings.bake_type = EnumProperty(
                                             name=prop.name,
                                             description=prop.description,
                                             default=prop.default,
                                             items=items)

Would need to append a draw method to the panel that recognises the new enum prop 'FOO'.

Note: could get some hassles if cycles code doesn't know what to do with your new bake_type.


Updated version of Blender I just want to make sure I keep all my user preferences. When I install the updated version of blender, how can I keep all my user preferences?

As far as the Start-Up File, save a version as you like it in the older version and open it in the newer version and set it as the start-up file. You find that in the File menu by selecting "Save Start-Up File..."

I don't know about the User Preferences as I have the same question myself.


Can a Mesh Deform modifier be successfully used with a fluid simulation? At the bind event of the Mesh Deform modifier there is no warning yet
When the frame is changed a warning is issued in the Mesh Deform modifier ... verts changed from 8888 to 8800 ... two different numbers
The goal is to change the shape of the fluid simulation.    The fluid is not in the general shape of a box.
This is a narrow ["Yes", "No"] question. A 1 to 4 sentence answer might be sufficient. Conciseness is appreciated. No images, new examples, or mention of other modifiers are necessary in a candidate answer.
There are other issues which may be posed in a separate question.

No - a fluid mesh cannot be used directly as the deformation object in a Mesh Deform modifier, nor can it be deformed by a Mesh Deform modifier.

The reason for this is that the Mesh Deform uses the change in the mesh of the 'Object' to affect the target mesh by reacting to the changing location of each individual vertex by 'binding' vertices together - by determining how much a vertex in the 'target' mesh would be affected by the position in the 'source' mesh and averaging those deformations over all vertices. For this to work there must be a fixed number of vertices in each mesh (the source and the target). In a fluid simulation, the mesh is not actually deforming from frame to frame but is being effectively re-built for each frame to represent the fluid in that frame. Since the fluid mesh is effectively rebuilt each frame it is not actually the same vertex that represents a particular part of the fluid throughout the animation - and this breaks the deformation.

That said, if your requirement was to deform an object within a fluid as that fluid moves, there is a solution by using another mesh to deform based on the fluid and use that as the Deform Modifier source.

First, create your fluid simulation :

Add another mesh with sufficient geometry to capture the motion of the fluid - eg, a subdivided Cube. Make sure you add enough subdivision to capture the required detail of the fluid (you'll probably want more detail than I've added in my example images - I purposefully didn't subdivide too far so as to be able to clearly show the mesh deforming). Add a Shrinkwrap modifier set to shrinkwrap to the fluid - the 'Project' mode of the shrinkwrap is useful here so that vertices can project up to the surface :

You should now have your "shrinkwrapped" mesh deforming to the fluid :

You can now use this as the source of deformation :

This can produce the following result :

The other alternative is if you want to deform the result of the fluid simulation base on another mesh (which is your actual requirement), and this cannot be done with the Mesh Deform modifier due to the changing vertices throughout the animation (due to how the mesh is completely rebuilt between frames).

However, this can be achieved with a Lattice Deform instead. A Lattice deformation is very similar to a Mesh Deform but is greatly simplified - instead of being based on the 'target' being within the 'source' mesh (and so the effect of each vertex is applied to each vertex in the target), it is the actual deformation of the whole lattice that affects the whole of the target mesh (regardless of whether it is within the source mesh or not). You could potentially also apply a Mesh Deform to your Lattice so that the mesh deform affects the lattice and the lattice affects your fluid simulation.

If you could update your question to include more specific examples of what you're trying to achieve I could include more specific details of how this could be applied to your case.


Join objects (boolean) with different materials How can I join 2 objects using the Boolean modifier, but keep their original materials assigned to them?

If it is impossible - is there another way to join 2 intersecting objects and remove useless geometry inside the intersection area?

To keep the existing materials on meshes in a boolean operation, simply put the material on those objects on both material lists. For example Cube 1 has Material 01 and Cube 2 has material 02. For those two objects to be joined in a boolean operation and keep their respective materials Cube 1 MUST have Material 01 AND Material 02 in its material list and vice versa.

Two objects with different material lists:

Now the completed Boolean with the two materials in the one list of Cube 2:

If I did not put both materials in then the original one overwrites the mesh material because the material no longer exists (child material data dissolves in a union operation) so you must make sure the material actually "exists" so that it can stay on the object. Hope that helps :)


How can I bend a mesh so that it curves around other object? I have base of the machine and the button separate model. I want the button to be bend and shrink so that it fix on the top of the machine.

I tried shrinkwrap and bend option but its not working.

With bend option i got this result

With shrinkwrap option i got this result

I want to achieve this result

As you correctly guessed, you can use the simple deform modifier, with the bend option. However, you have to change the direction and origin of the bend You can control this by creating an empty and positioning it close to the button, if you select the empty in the origin property of the modifier. Here, I created two deform modifiers, controlled by two empties:

The two empties were made the children of the button, and rotated so that the bending happened in the right direction (to find the right direction, I had to play with the rotation a bit - there is no easy way to understand the correct orientation):

The modifiers look like this (again, I had to try different angles to find a good value):

Here is the .blend file:


i connected the two vertex but now i can't seem to select the other face on the top half? why? it selected whole of the face instead. I just want that top half section. This is after I connected the two vertex

You must have connected the 2 vertices with F (fill), which won't separate the face in 2 separate faces, but just create an edge between the 2 vertices over the existing face. If you want to connect the 2 vertices in order to cut face in 2 parts, choose J (join).


Problem with editing mesh - not closed? I am new to Blender (2.9) and have some Problems Editing Meshes. I am repairing a model which I built some time ago in ArchiCAT and I'm trying to join Walls and so on. Now im editing some meshes and somehow they appear wrong. It looks like the faces are broken. Also the edges are not highlighted as you see on the picture. I think thats a simple problem to solve but i cant find it.
What's the problem if the edges of the model/mesh look like in the screenshot?

always the same. ask question and find the answer 2 sec. later: Edges with green line are sharp edges. mark as sharp.
Red - UV seam
Orange - Bevel weight
Pink - Edge crease
Blue - Sharp edge
Green - Freestyle edge


Imported FBX animation looks strange on action editor I made a rig and a set of animations in a Blend file and then lost the file.
I do have a FBX file that I exported with the mesh, rig and animations.

I've managed to import it into a new Blend file, but I have the following problems:

Instead of displaying the bone names, it displays the X Y Z Location, Quaternion and Scale for each bone.
It made a keyframe for every single frame in the animation.

Is there a way I can fix this to get the file back to an editable state?

The "keyframe for every single frame in the animation" part of your question "is a feature, not a bug": That is how Blender outputs an FBX.

In object mode, select your armature. I imagine you may not be able to see it unless you turn on Xray.

Now go into pose mode and Blender's Animation screen set up.... or, I find this easier, anyway:

Your dope sheet will show you which bones in the armature have actions keyframed to them. Although Blender creates a keyframe for each frame, it does not create one for each bone -- only those bones that have actions associated with them.

In the NLA editor, you can turn this set of keyframes into an action strip, and you can B box select and simplify.... but it is still less elegant than what you undoubtedly had in your original Blender file.

Regarding names and axis... does your file look like this?

If that's what you are seeing, you can turn them off under the Armature panel.... but I have seen weird issues with some FBXes (more often scaling and orientation than naming)... and frankly I typically just hack at them until I get what I want... That is not really an answer... just what I do.

best
rg


Weird erratic mesh color(Normals aren't the problem) Things I've done:
I've looked for extra vertices.
I've messed with Normals.
I've even tried deleting a section and re-making it.
I deleted half the mesh, mirrored it, and what's weird, is that the weird color isn't mirrored perfectly.

enter image description here

The topology isn't weird, no n-gons, no overlapping vertices
Normals are fine.

Normals seem to be the problem.

Go to the Geometry Data section and press on Clear Split Normals.


Modify light range with nodes I can make a light not illuminate things further away than a set distance, using the attached node setup. Is there a way to refine this setup so that the light intensity can be controlled between the light source and the set distance, with a gradient?

I do understand that there is a light falloff node. I need a way to control not only falloff but also the distance where the light stops illuminating the scene (physically non realistic light).

I came up with the below node setup. As qwazix pointed out, the divide value of 60 is actually the distance in system units from the light source to where the light stops affecting the scene.

You can use the ColorRamp to visually modify the attenuation across space.

What the setup does is "normalize" the ray length to make the max length you want to control equal to 1.

In the following image, the plane is exactly 5x5, so the falloff should be 2.5 units in order for the light to go off exactly before it reaches the edge.

Reasoning

The ColorRamp factor input takes values between 0 and 1 while the ray length is in absolute blender units (length). So in order to use the ColorRamp we need to bring down the maximum ray length we want to control to correspond to 1. So, let's say we want to shine light up to 10 meters (or units), we'd need to divide Ray Length by 10, so that the end of the ColorRamp corresponds to 10 meters from the light source.

The ColorRamp then assigns a color to each ray depending on their length. This result (which is a color - different for each ray) is plugged into the Emission color node so that we can pass color information in addition to strength.

We still need to make the light falloff constant so that the default attenuation does not interfere (multiply) with the our gradient. So we plug in the Constant output of a Light Falloff node into the Emission Strength input.

In the final setup, we control the distance by modifying the division value (2.500 in the screenshot above) and the strength by tweaking the Strength input (100.000) of the Light Falloff node.

Credits:

Using the additional info from cegaton's answer and Booth's edited question, I have edited this answer to be correct and complete. If the reader wants to see how we got here, visit the history


3D Volumetric Planetary Clouds in Cycles? Well I succeeded in creating a realistic volume atmosphere (method here, for those who are curious), but I am unable to create 3D clouds. I wanted to use the clouds as a density map for a volume material. Unfortunately, the volumes only respond to 3D procedural textures. Is there any way to get 3D clouds that appear to move around the planet in jet streams? Similar to the cloud map below.

I don't know if it is possible (and I wasn't able) to map thickness in a shader without a voxel simulation. But here is a way to give your cloud texture some thickness and shape, and ability to rotate. Render time is way faster than sim.

Duplicate a sphere with UV map. In edit mode, duplicate it and flip normals with Ctrl+Shift+N. Add 2 vertex groups for both duplicates (inside, outside). Add a subdiv and 2 displace. Map your texture on both displace (mid level 0, very low strengh), and use vertex groups. Your clouds are now "meshed" and can be controlled with subdiv level, displace strengh and rotated around the planet axis (same local axis as it's a duplicate).

These clouds can be placed inside another volume object (add transparency levels in render/light paths if needed). You can add topology where needed to reduce subsurf level. Density should be controled by your texture to limit the cloud. Once Done you can duplicate it to make another cloud mesh that has a different rotation/texture.

this is a simple neptune blue volume with your texture as clouds. (GPU rendered in 1min)


How to achieve an evenly distributed 90° turn? I'm trying to bend "#Object 1" to something like "#Object 2" but with less triangle clutter and an equally distributed inner turn.

I tried the "Spin" tool on "#Object2" and a "Bevel" at the inner edge but that's not working very well as one can see in the image.

Any hint how I could achieve an evenly distributed 90° turn?

Easy way to do that is with spin selection around cursor. Put the cursor where the radius of the bend should be, select the edges which you want to extrude and hit Spin button in Tools panel. You can adjust the spin angle and number of segments in spin properties panel or by hitting F6 button right after spin operation.

Note that the spin operation is relative to the view angle.


3d track stabilzed video? Tracking shaky/handheld video is difficult because a) motion blur and b) potential track marks jump around wildly. The first makes the quality and precison of a match worse and the second requires to enlarge the search area and thus slow things down.
Is there a simpe way to

stabilize video
3d track the stabilized video (so while the track marks will still suffer from motion blur, at least they do not jump around wildly)
undo the stabilization of step 1

Or alternatively, to "tell" new track marks to "guess" the next position (centre of search region) from already existing tracks instead of the previous frame?

As you must have already figured out, it is better to avoid shaky, unstable video.

It is possible to use 2d tracking to stabilize the video first, and apply the shakiness later using the 2d stabilization node in the compositor, but in reality it makes no difference, because you still have to track the video to stabilize, and the tracker will still have a really hard time tracking elements that are blurry, or shaky. If you are going to do motion tracking, might as well do it only once. Additionally all errors induced by the stabilization will only make solving the motion harder.

You can use one of the presets for motion tracking for blurry footage or fast motion.

If the movement is too much from frame to frame enlarge the search area, so that blender can find the tracked feature in the next frame:

And yes enlarging the search area requires more resources and will slow down the process.

(if the search boundbox is not visible enable it on the marker display section)

But don't expect miracles. If the original video is blurry, distorted, shaky or has artifacts caused by rolling shutter, etc, tracking will require a lot of extra work. You will need to adjust the trackers manually, when the autotracking process fails. It will probably take less time to do the shot again and keep it sharp (use a fast shutter speed), you can always make it shakier or add motion bulr in postproduction.

Read:

Some Data Failed to Reconstruct, Motion Tracking

and

How can I get better results when doing camera motion tracking?

But for the sake or argument, let's pretend for a second that you did stabilize the video successfully. Then you would face two new problems:

1- The edges of the video will either be cropped, or you would have repeated pixels there where there is no information to fill the frame. To fix that you would need to render the stabilized footage on a much larger canvas and who knows how that would work to determine the field of view (combination of lens and sensor size).

2- The original motion blur of the video will not have disappeared at all from the frames, it will be even more obvious, again making tracking inaccurate.


Blender Cycles 2.69 on Ubuntu Server 13.10 64bit I trying to render an image/animation using Amazon EC2, but Cycles rendering fails with this message:

Fra:1 Mem:17.09M (0.00M, Peak 17.09M) | Mem:0.00M, Peak:0.00M | Scene,
RenderLayer | Synchronizing object | Cube Illegal instruction (core
dumped)

For testing I used the Blender default scene, I only changed the rendering engine to Cycles. (To make sure it,s not some advanced feature that is broken).
Using the default Blender Renderer seems to work fine.

I installed the current version of Blender according to this instruction.

I start rendering using this command :  blender -noaudio -b test.blend -f 1

Using the default version of Blender (2.66) works for the default scene, but is not compatible with the scene I want to render (results in empty images). I would prefer to render using 2.69 instead of converting my scene for compatibility with 2.66.

I figured out a way to get it to work:
Instead of using the launchpad version I downloaded the GNU/Linux version from Blender site. Using this version Cycles works fine.


How to apply a bevel modifier, so that it affects only specific edges? I am trying to apply a bevel modifier to a box with some additional buttons, however, I am struggling to apply the bevel modifier only to the top face and the edges that are connected to that face. In a nutshell, I am trying to bevel the top of the box without affecting the bottom and the buttons.

Here is an image of what I get upon applying the bevel modifier:

You can use bevel weights, which lets you specify a value between 0 (no bevel) and 1 (full bevel).


Merge vertex to face I have a cylinder inside another cylinder and i want to remove the surface of the small cylinder in the large cylinder so i get a large cylinder with a hole in it. How can I merge the vertices of the small cylinder to the faces of the large cylinder so I can remove the faces of the small cylinder?

Allready thanks and cheers!

I'm not entirely sure I understand how you cylinders are aligned towards each other, but it doesn't matter to much. I'm going to use the "bridge two edgeloops" operation.

Here is my starting position:

I edit both of them and remove the end caps.

Then I select them both and join them Ctrl + J. Now I again go into edit mode and select both edgeloops at the end of the cylinders. Hold down Alt to select and edge loop. Hold down Shift + Alt to select the other without deselecting the first.

Then hit space and type "bri" in the menu. It should look like this. Hit Enter

Now the two edge loops should be bridged with faces:


How to change mesh to Flat or Smooth shading while in sculpt mode? I am learning sculpt mode and the best way to see the results is by switching from flat to smooth shading in object mode, but the best way to see geometry of what i am doing is best viewed with flat shading. Is there a hot key to toggle flat or smooth shading without having to switch from object to sculpt mode each time?

Only way I know is press your space bar and look for flat and click on shade flat while in sculpt mode. Do the same for switching to smooth.

Hope this helps :)


How do I install the Fracture Modifier Add-on? Here's the add-on I'm talking about.

I have the zip downloaded, but it just looks like the blender folder (the one in program files), and not like a common addon. What do I do?

The fracture modifier project is not an addon, it is a development branch of blender that adds the fracture modifier as a core feature within blender's source code and aims to have it incorporated into a future blender release. You need to use a copy of blender that was built using the separate branch of development.

The site you link to includes downloads of pre-built versions of blender which include the fracture modifier. If the available versions don't work on the system you have, then you will need to build your own copy of blender by checking out the fracture_modifier branch instead of the master branch.


Problem with Snapping So, I'm working on this house with oblique walls.

I can't properly make the vertex just move along the Y axys and snap to the lower line, as it snaps along the Y axys but doesn't stop exactly ON the line.

Any easy way of doing this? Since I'll have to do it a lot of times.

Blender allows you to set a custom orientation for transformations, but, unfortunately, does not provide custom orientations for snap projections.

However, if you enable the Mesh:TinyCAD add-on, (included in 2.78) it will do what you need, and some more.


How to fix wrong normals after subdivide/poke on a mesh containing a custom split normals layer? ScreenShotBefore:

ScreenShotAfter:

As you can see, the new face normals are all identical to the original one. I wonder if they could have been smoothed in some way?

None of these will auto-fix it (this is just one triangle, I have a whole mesh to fix).

normals / recalculate inside
normals / recalculate outside
faces  / recalculate normals
faces  / shade smooth or flat (just to be sure...)
smooth vertex weights (just to be sure...)
smooth vertex (just to be sure...)
beautify faces (just to be sure...)

It looks like that after a subdivide it will auto call normals/recalculateInside once, because I tested recalculateInside on some non-subdivided faces and the effect was similar.

So I wonder if it could subdivide using other kind of normals recalculation that would not break it that much?
Or a way to recalculate normals properly after subdividing?

A not so good workaround I found is:

The mesh has something called "Custom split normals layer".

So I went in mesh edit mode, now at the "Properties" window, at the "Data" tab, click on "Clear custom split normals data".

The moment I did that, the way the whole mesh looks changed somewhat, I could say it became more simple, like more basic or less impressive, but the overall looks didn't look bad at all, just simpler.

Subdividing now won't completely mess the looks, will just subdivide it quite well, but with that normals layer lost already...

I still wonder if it is possible to subdivide keeping the "Custom split normals layer" w/o messing it?

Using blender 2.79

Just a wild guess (we could help more if we had the .blend file to look at): Have you tried removing doubles? Looks like you could have doubles.

Additionally, try going into wireframe to make sure that there isn't an edge connecting the outer 3 vertices underneath the new geometry.


When I import an OBJ it won't show up, does anybody know how to fix it? When I try to import wavefront .obj, it won't show up. It appears in the explorer, but I can't see it when I try to edit. Does anybody know how to solve this?

For me at times, .obj files have imported super huge or super small. It might still be there but out of view. Try selecting it in outliner window in upper right and then in the 3D window hit . on your numpad or choose View > Selection in Object Mode.


Is there any Property in the bpy.props which can take multiple lines of text? The idea I want to implement is to have some kind of StringProperty in the UI so the user could enter multiple lines of text into it which then could be used as a text body of the new Text Object. But I can't find any way to do it with the bpy.props.StringProperty. It doesn't recognize Python \n command and I can't see any other Property which would suit this purpose. So is there any way to do it directly through the UI or the only way to get multiple lines of text at once is from the bpy.data.texts?

Blender doesn't have a multi-line text/string property at the moment that could be edited in UI panels like other bpy.props.
There are some workarounds to render multiline texts from text objects in panels, but I think you want to render a string as a multiline text into a Text object.
You could still use the StringProperty to let the user enter text in a single line and let him mark new lines with \n. The captured string could then be placed in a Text object like so:
some_text = 'line one\nline two\nline three'
bpy.data.texts[0].from_string(some_text)

Also see related questions:

UI: Text box with multiple lines
Change size of StringProperty Text Input
Is there a way to display a multi-lines message in panel / popup?

Btw there's a more or less corresponding feature request on Right-Click Select: https://blender.community/c/rightclickselect/S6fbbc/
I'd appreciate the addition of such a multiline text property among the bpy.props.


Glossy material rendering black, in a scene with environment and emission lighting Having a bit of an issue, just messing around with some game models. And whenever I apply a glossy shader it renders black, just for the car/tires model (pre modeled). Any other objects (newly created) render the glossy just fine. I have a plane with an emission shader as well in the scene.

Thanks!

EDIT: .blend file

Deactivate autosmooth in data tab and it will be ok.


Save unpacked blender file I'm looking for a better way to version Blender files under Git. By default the entire file is saved as one big blob even though it is a structured format (has scenes, meshes, cameras... I can see it when linking parts of another blend file).

Because it's one binary file it doesn't play nice with version control systems. Is there a way to save an "unpacked" blend file?

I don't need features like diffing and merging, I just want the different versions stored more efficiently in the face of progress.

Since you don't need diff and merge functions, you could organize your files differently. You could create one or more scene files to be used as empty containers and link everything else.

This way you would only commit real changes in linked objects and avoid to commit lots of unchanged binary data.
You can easily switch back and forth·between your scene files to the linked ones using the Edit Linked Library addon.

Related:

Wiki Linked_Libraries
Re-Import obj and replace existing
diff and version manage blender work
Moving a Linked Library


3D modeling- is it possible to map image to 3d mesh im a new  to blender as well as 3d modeling....
i have 3d model that i make from other 3d photogrammetry software such as remake..
but the model is not nice... so i want to ask .... is it possible if i want to export the model into blender then map the image onto it.. but the problem is the triangular mesh is too many ( because the model is tree model capture from sequence of photos).. or any solution ..as next i need to export the model into unity to build vr..
thanks..

select your object
add a new material
open the node editor
enable "use nodes"
add -> texture -> image texture
then you can change the position of the texture in the uv editor

That is only a short description. For more information please see the comment from Duarte Farrajota Ramos
or look here.


Shadow from camera vs shadow from reflection Is it possible to distinguish between shadows viewed directly from the camera, and shadows seen in the reflection of an object?

For example, the shadows circled here:

From the cameras's perspective, I'd like the tile to disappear (along with its shadow, diffuse effects, etc).

If I make the tile transparent for camera rays, shadow rays, and diffuse ray, I get this:

I'd like the shadow to be visible in reflections though. If I remove shadow rays from my transparency condition, I get this:

So here's what I'm trying to achieve:

Is there a way to determine whether the shadow is viewed directly from camera, or if it's being viewed through a reflection?

So for this I would use render layers. This means you can't really view the effect 'live' in the viewport, but it will be applied when rendered and composited.

I have 2 render layers:

Render layer 1, called 'Main', renders layer 1 which holds the sphere and light only.

Render layer 2, called 'Floor', renders layer 2 which is the floor object and excludes layer 3, which is the red plane.

'Transparent' must be enabled in film section of the Render tab to allow layers to be composited together.

Note: All 3 scene layers should be made visible before rendering. All 3 layers are required, the render layers take care of what appears in the render.

'Main' render layer will only include the sphere, but will still be effected by the other layers, so will include the plane and floor in the reflection.

'Floor' render layer will only include the floor object and will only be effected by layer 1 because red object is excluded on layer 3.

These render layers can then be combined in the compositor:

Which results in:


Edit object while rendering Is it possible to edit your project while im rendering an image in blender 2.83 while but net affecting what im rendering

If you only want to edit one object in the scene then for simplicity and safety I'd move that object to its own file, make a backup of that file, and link it into the overall scene file. Then start the render of the scene file from the command line and in a regular Blender instance edit the object in its own file.


Weird axis arrows appeared These things started appearing from nowhere when i click an object.

When i try to move the object, the axes move, the object doesnt.

I assume i just touched some setting by mistake

Basically you have set it so transformations only affect the origin of the object, to disable this setting,
go to Options then disable Origins

There is also a very similar looking thing that one can accidentally enable under Gizmos > Object Gizmos


Different Color When Rendered? (Not Material) I have made a model of a building. I was using the make face tool, but when I extruded it, it was a different color than the rest.

Its not any different material or anything either...

You need to reset your normals, go into edit mode, select everything A, and hit Ctrl-N.

This happens when blender incorrectly guesses which way the face normal should be pointing when you make a face, it happens from time to time.


How to edit a model in sculpt mode I am trying to edit a model in sculpt mode to make the legs thicker. I was told to use the the inflate tool in sculpt mode but when I tried using it nothing happen. Why am I having this issue?

The move tool works as well. I think you just need to keep looking for a spot on the mesh to get the brush to work possibly because of how your object is aligned for blender to read it.


How can I extrude a egde into the middle of another egde? I am learning blender. But I am having some problems. I'm trying to extrude a egde and add the end as a point in another egde. I made this to illustrate what I want to do: The 3 green lines are what I am trying to add.
On the right hand side you can see the other 2 areas I want do to do a similar process with. So, kind of fixing a part of a egde loop which got cut off when I deleted some vertices

Blender has a built in tool to join faraway verts such as these, and to automatically create all the connecting edges. The tool is called "Connect Vertex Path", and is assigned the shortcut key J.

I find it to be a pretty essential modeling tool I personally discovered rather late.

All you need to do to use it, is to select two verts, then press J:


Why does my mesh have a dark outline on one of the edges? It ruins the look, it appears glitchy

Try following these steps:

Go in Edit Mode Tab, Vertex select 1

Select all A
Press Alt+M and select "by Distance"

With all selected still press Shift+N to recalculate the Normals

This should fix most issues.
You can check if the normals are ok by activating the "Face Orientation" here:

One other thing i believe you may have in your object is one or more faces inside the object, those you could find by selecting some of the outside faces, then pressing H to hide them. Allowing you to look inside the object you then can select and delete the faces inside the object with X, "Faces". Afterwards just press Alt+H to unhide all again.

Should there be still issues, please leave a comment and eventually update the question with a picture pointing it out.


Complex Shape Not Correctly Unwrapping I am trying to make a render of a Japanese cookie box. In order to animate it, the top has to open. I built another object that represents the top, and traced the outline of the image to make the new shape. I am happy with the shape of the actual object. However, when I go to unwrap it the shape seems to change in the UV editor.

Here is an example image:

The box with the added top object hidden:

Anyone know what to do? Thanks for any help or suggestions!

Blender file:

The easier is to unwrap with 'project from view with bounds' :
That gives you a flat projection of your 3D model into the UV map part. This projection depends on the 3D view itself, so you may want to align your model correctly (using NumPad4 and NumPad6, for instance). Once done, you may have to adjust (grab and scale) your UV map a bit to fit your image.

Note : I took the wrong image from your screen captures, that why you still see the UVs from this image in the gif above even when the unwrap is done.


Is there a (hotkey) way to set the weight paint brush to the weight of a specific vertex? I'm not very familiar with weight painting in Blender, so I might be overlooking something obvious.
In the usual program I rig in, I can use a hotkey (⌃ Ctrl + LMB ) to set my weight paint brush to the clicked vertex's weight--e.g. if the brush was initially at default 100%, ⌃ Ctrl + LMB  a vertex weighted to some bone at 80% would set the brush weight to 80%. Can I do the same in Blender?

In the default 2.8X keymap it is ⌃ Ctrl + RMB  to sample weights in weight paint mode. The 2.79 keymap is set to ⌃ Ctrl + LMB


Why is base colour wheel only giving me black as an option I don't know when this happened but my base colour wheel doesn't want to cooperate to give me the colours that i want. The problem:

How do i get the colour wheel to show all the colours again and what did i do to make this happen? Thanks!
ps: Not sure if this is related but the animation i have for the + signs are changing alpha value from 0 to 1, using alpha blend as shown:

You have set the luminosity to a low level. Bring it up.

The circle is to set hue and saturation. The strip to the right is to set luminosity.
Alternatively use the sliders for the different color channels.

Or use the Mouse Wheel to adjust luminosity.
To reset the color wheel to default press the ⟵ Backspace


Texture looks grainy in cycles render (not fireflies) I am following a Blender Guru tutorial titled: The Basics of Good Texturing in Blender.

The result of his tutorial, his final render, is MUCH higher quality than my result. I eventually got frustrated and jacked samples and resolution% up to 2000 samples and 1920x1080 | 100% to no avail. As I said I have been using Blender for no more than a couple of days so almost anything and everything is greatly appreciated. The question of this post: Why does my result differ so much in quality from Blender Guru's even though I followed the tutorial to a T? Does my result only look bad to me because I expected too much?

Here are my cycles material nodes:

My result:
Blender Guru's result:

Ok, after looking at your nodes, scene, and the images it all came down to two small values. (They were also the only things you have different from the tutorial)

The most important setting here is the  Strength of the Bump node. One is too strong in almost every case. Andrew uses 0.1, but I used 0.15, either way, turn it down and you will see it look much better.

The second setting you want to change is the Roughness of the Glossy BSDF node. The default 0.2 is kind of rough, and you might not even see the reflections at all. Both Andrew and I use 0.1, which may not sound like much but on the scale of Pure mirror to diffuse, .1 makes a big difference.

Here is the exact same scene, only difference is the strength of the roughness in the glossy shader. 0.1 is on the left, and 0.2 is on the right.

Notice with the more scattered, or diffused (0.2) value the reflection just mix in and you really cant tell what should be reflecting.


How to correct non-connected edges/faces? I've an object with edges that appear to be connected to a face, but when you move a faces touching the edge, it leaves a hole in the object:

I would expect the top and side faces to 'stretch' with the selected edge, when I move the selected edge (just like the bottom one).

This shape started out as a cube. I used only 'subdivide', moved edges to where I wanted them to be and tried the 'edge split' modifier. (what did I (likely) do wrong to create this mess?)

My question is: How do I repair the object?

This was caused by the Edge Split modifier, which, as its name infers, split your mesh at the edges. To fix it, select all the vertices and click the "Remove Doubles" button in the Tool Shelf.


How can I change Blender 2.8 Preference via Python I am trying to find out how to read/set values for Blender 2.8 Preferences with python , for example before 2.8 to change the gizmo size( previously known as manipulator size) to 10

bpy.context.user_preferences.view.manipulator_size = 10

the user_preferences class doesn't seam to exist anymore,

I tried reading the api doc but it's not clear to me, i feel like i am missing something really simple

https://docs.blender.org/api/blender2.8/bpy.types.PreferencesView.html#bpy.types.PreferencesView

This works...

bpy.context.preferences.view.gizmo_size=101


Does the file size of the blend file influence the render performance? If I pack all the textures the file size of the blend file can grow substantially. How will this influence the render performance ? Does GPU/CPU rendering make a difference ?

.blend file size does not influence render times. Does not matter if render engine load packed data from .blend file or from folder. Here can be difference in milliseconds only on beginning while Blender preparing scene. Not while render it.

Difference between CPU/GPU: Of course there are difference in speed as well as final render output. If you ask for difference about preparing scene, here can be differences in millisecond too. Render engine need move data to your graphics card and this need a time. But don't worry about it, 4GB VRAM in graphics card can be filled in a split second. If we consider that GPU can render much faster than CPU this is absolutely insignificant.
Of course, all depend of PC specs- This is true for "balanced" systems, not for system with extremely powerful CPU and low end office graphics card.

In some cases image rendered using CPU can be different as rendered using GPU. Not always, usually if you use volume and/or SS shaders. Some of this differences was eliminated in Blender 2.78, but nobody know if everything is OK now. The time will show :-)


Is there any other way without array modifier? I am looking for a way to model circular objects without array modifier. Something like this for example:

Edit: as you can see the dimensions tab has numbers. I think that is what's messing the mesh around. Have I modelled my basic part incorrectly ? Is there a way to reset the dimensions of an object?

Maybe you can use both X and Y symmetry in the mirror modifier.

Like so..

It does depend on the complexity of your subject. In many cases Array will give you more control than the mirror modifier but for less complex objects this may be helpful.


How to rotate individual objects in an array modifier around their own origins I have a Array modifier on an object, and would like to rotate each individual copy of the original object, around it's own origin; without applying the Array modifier, is this possible?

No.

Modifiers operate on mesh data, so the array modifier must take an initial mesh and output a resulting mesh which another modifier can operate on.
This means that the array modifier copies every vertex, edge, and face in your initial mesh for every duplicate it creates (storing the same data multiple times). Also see Applying Array Modifier - Still instance? and What techniques have been used to repeat geometry or other detail to the infinite horizon?

TL;DR: The array modifier doesn't operate on an object level, so there are no "objects" to rotate without applying the modifier and separating loose parts.
Essentially modifiers are stuck with working in edit mode.

The closest you can get is destructively rotating the initial mesh, however this will change the dimensions of the object (unless the object is a sphere), potentially giving unwanted results if you are using Relative Offset:


Cape not falling down in simulation ive been busy trying to figure out Blender the past few days.
I havent had any experience with modeling or even photoshopping in overal, so this is totally new for me.

I just got done with the head and body modelling and wanted to put a cape on, i followed a tutorial did the exact same things, now the cape is made  and i tried simulating it.
On the toturial the body doesnt move, the only thing that moves is the cape.

On my simulation as you can see on the link below, my Body moves,  the eyes and cape do not move.
I think you get the problem.

Hope you can help me out

Edit:     Alright i think i saw what the problem of the body was :  The cloth Modifier for the body was on.       i put it off and it doesnt fall down now.

Now only the cape...

Edit 2:
I made the cape look collide too,  now the problem is that it doesnt collide well with the body.

everything goes fine except it going THROUGH the hands, not colliding with it, is this because there arent many 'steps' like i had to do with the hair to calculate the colliding? if yes how do i change it?.

Yes, I do believe that you are correct in thinking that you need to up the steps of the simulation. You can find those in the cloth modifier tab under "Physics" in the Properties.

Also, check if the hands and other body parts that need to collide have the collision in the "Physics" tab. More important, however, is proper subdivision. Make sure that the hand has proper subdivision and the cape is not only subdivided in one or two axis. For example make sure it looks like this:

And not this:


Engraved Design Lines on Mesh (Sword) so I'm currently modelling the buster sword (crisis core version), and I've come across a problem with the engraved lines on the blade of the sword.

This is what I've done but I think there is a better way to do it because the method I'm doing is very messy and hard to fix (after subsurf modifier).

This is what happens with the bump map

Since the engravings are just very fine and only on a straight plane, I would suggest to use a normal map which simulates the engravings. So you can keep your mesh simple, while the engravings are always visible, depending on the light.


Join extruded vertex with edge I need to join a vertex to edge, with snap to edge i can snap my vertex on the edge but i don't know how to join it.

Now my solution is:

snap vertex to edge
subdivide edge (this creates a new vertex on the edge)
merge the two vertices

But i think is too elaborate, so i look for a simpler solution.

Subdivide is a bad option in your situation because you get more verticals than you need.

The fastest way, in my opinion, is to manage this with a loop cut.

Loop Cut CTRL+R and slide to the position where you want to connect your vertex
Select your vertices and merge ALT+M them

You could the same with the knife tool (K). However you can't guarantee  for a good mesh flow if you do so.
With Loop Cuts you are most of the time on the good side.


Using subsurface modifier on circle So, I'm trying to use a subsurface modifier on my mesh, but it displays weirdly... I know how to use edge loops on a square side, but how can I make this work on a circle side ?

The bottom face is made as best as I could, by merging two extruded vertices.

You can select the bottom face and use the INSET TOOL (Hotkey : I) to adjust.

But Keep in mind you have a N-GON(poly with more than 4 verts) down there, and subsurf and ngons don't work great together.

You can fix this deleting the NGON face, select all the boundary verts, extrude the verts/edges and scale them to the center


bpy.ops.transform.translate does not work as expected for object just linked from one collection to another I have a method that iterate through a collection(the assetsHandCollection), copies (link copy) the object to another collection(the gestureCollection) and then it should move the linked object.
This is the method:

def make_gestures():
    gestureCollection = bpy.data.collections.get("Gesture")
    for hand in assetsHandCollection.objects:
        linkedCopyHand = hand.copy()
        gestureCollection.objects.link(linkedCopyHand)
        linkedCopyHand.hide_viewport = False
        linkedCopyHand.hide_render = False
        linkedCopyHand.hide_select = False
        bpy.context.view_layer.objects.active = linkedCopyHand
        bpy.ops.transform.translate(value=(50, 0, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, False, False), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

The object are correctly linked to the new collection but they are not moved.

If I replace the line:

bpy.ops.transform.translate(value=(50, 0, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, False, False), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

with

linkedCopyHand.matrix_world.translation += Vector((50, 0,0))

It works, the oject are correctly linked and translated.

If I check in the console which is the last active object after my script finished to run (with bpy.context.view_layer.objects.active), it is, correctly, one of the object that I have just link copied. If the console I try to run the command:

bpy.ops.transform.translate(value=(50, 0, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(True, False, False), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

It return CANCELLED, without any further detail.

Objects need to be selected.

Since the operator works on all selected objects and you are translating each the same, could select and call the operator once.  Tip only need to set non default values in an operator call

As an example will use default file, and set active object to None and assume no other objects selected

>>> C.view_layer.objects.active = None

Selecting works:

>>> for o in D.collections['Collection 1'].objects:
...     o.select_set(True)
...
>>> bpy.ops.transform.translate(value=(0, 0, 1))
{'FINISHED'}

Overriding context

>>> c = {"selected_objects" : D.collections['Collection 1'].objects}
>>> bpy.ops.transform.translate(c, value=(0, 0, 1))
{'FINISHED'}

Putting it together to add a copy of each object in 'Collection 1' to 'foo'.

Copies the objects, links them to foo and moves them using one call of overridden operator.

>>> bpy.ops.object.select_all(action='DESELECT')
{'FINISHED'}

>>> foo = D.collections.new(name="Foo")
>>> C.scene.collection.children.link(foo)

>>> obs = [o.copy() for o in D.collections['Collection 1'].objects]
>>> for o in obs:
...     foo.objects.link(o)
...

>>> bpy.ops.transform.translate({"selected_objects" : obs}, value=(0, 0, 1))
{'FINISHED'}

Ditch ops when possible

  but still I would like to use the methods that the API provides and
  learn those, instead of patching the matrices directly.

IMO it's the other way around, the operator is basically a bridge between UI and API.  For transforms you are far better off manipulating the matrices directly. There are some ops I would suggest you never use, eg adding a modifier.  Why? see

https://blender.stackexchange.com/question/7358/python-performance-with-blender-operators

Hence you have already found what would have been my suggestion re answering this and manipulate the matrices directly and not rely on operators and a lot of diddling around to get context.


Is it possible to not create keyframes automatically when drawing with Grease Pencil? Is it possible to use the grease pencil without creating keyframes when you draw: I just want a single drawing so I don't need keyframes, but I need to be able to scrub through the timeline when drawing.

I know I can move the keyframes or delete them, but it would be easier not to have any.

I have already tried turning the "automatic keyframe" button from the timeline off.

Yes it is possible. Just hit the button to lock the frame in the grease pencil layers panel.


Rendering object gets cut off? I am trying to render a waterfall-esque thing. As you can see in the render:

The waterfall and its particles get cut off about 4/6 ways through. (I should note that I am using the Viewport render mode, not actually rendering just yet.)
However, the exact same shot in wireframe and solid shows that everything is fine:

Try do a low sample render just to double check? The Viewport preview render is a good indication but not foolproof.