Display series of 2D squares using GPU Shader Module My addon makes measurements on objects and assign a color to the objects according to the measured value. Now I would like to display a series of stacked coloured squares in the viewport to serve as a lookup table, as on this mockup:

This runable code should draw n 2D squares (with n being the number of colors in my palette) and color them:
import bgl
import bpy
import gpu
from gpu_extras.batch import batch_for_shader

# my color palette:
Seq_viridis = [(68,1,84), (69,16,97), (70,31,110), (71,44,122), (67,58,128), (62,71,134), (58,83,139), (53,94,140), (47,106,141), (43,116,142), (39,127,142), (35,139,141), (34,149,139), (36,159,135), (38,168,131), (48,178,124), (69,188,112), (88,198,101), (112,205,87), (138,212,70), (165,219,53), (192,223,47), (223,227,42), (253,231,37)]

# Convert a rgb color (123, 45, 234) to a rgbaf (0.123, 0.06, 0.12, 1)
def rgb_to_rgbaf(_rgb):
    _rgbaf = tuple(ti/255 for ti in _rgb) + (1,)
    return _rgbaf

def Display2D_LUT(pos_dim = (100, 100, 10)):
    # Get Palette
    n_elements = len(Seq_viridis)

    # Origin and aspect of the LUT
    x_orig = pos_dim[0]
    y_orig = pos_dim[1]
    size = pos_dim[2]

    for k in range(0, n_elements):
        vertices = (
        (x_orig, y_orig+k*size), (x_orig+size, y_orig+k*size),
        (x_orig, y_orig+size+k*size), (x_orig+size, y_orig+size+k*size))

        indices = ((0, 1, 2), (2, 1, 3))

        shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
        batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)

        def draw():
            shader.bind()
            shader.uniform_float("color", rgb_to_rgbaf(Seq_viridis[k]))
            batch.draw(shader)
        bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

Display2D_LUT()

But this only draws one element, the last one.

How can I draw several squares at once?
How can I add text?

Thanks a lot in advance!

Problem with your code is that when handler is called and it's callback method draw is called, for that draw method k will be len(Seq_viridis)-1 means pointing to last element.
When script is executed, blender pauses and after completion of execution blender resumes.
Now after your script is executed k is pointing to last element.
What i did is dynamically created draw functions for each square. Look here for More info on dynamic creation of functions.
I used method of storing handlers on some blender class for management of handlers in development process.

For the better management(removing/adding) of handlers look here

Also added control for x and y axis of square
import bgl
import bpy
import gpu
from gpu_extras.batch import batch_for_shader

# my color palette:
Seq_viridis = [(68,1,84), (69,16,97), (70,31,110), (71,44,122), (67,58,128), (62,71,134), (58,83,139), (53,94,140), (47,106,141), (43,116,142), (39,127,142), (35,139,141), (34,149,139), (36,159,135), (38,168,131), (48,178,124), (69,188,112), (88,198,101), (112,205,87), (138,212,70), (165,219,53), (192,223,47), (223,227,42), (253,231,37)]

n = len(Seq_viridis)                                            # This section is for handling
                                                                # draw handlers in developemnt process
try:                                                            #
    for i in bpy.context.scene.my_handlers:                     # I'm using method of storing list of handler
        bpy.types.SpaceView3D.draw_handler_remove(i,'WINDOW')   # on some kind blender class i.e, bpy.types.Scene.my_handlers = []
except:                                                         # Or you can use driver namespace.
    pass                                                        # Check  below link for reference
#https://blender.stackexchange.com/questions/75612/how-do-you-remove-a-draw-handler-after-its-been-added

# Convert a rgb color (123, 45, 234) to a rgbaf (0.123, 0.06, 0.12, 1)
def rgb_to_rgbaf(_rgb):
    _rgbaf = tuple(ti/255 for ti in _rgb) + (1,)
    return _rgbaf

def bindFunction1(k,vertices,indices):
    name = f"func{k}"
    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)

    def draw():
        shader.bind()
        shader.uniform_float("color", rgb_to_rgbaf(Seq_viridis[k]))
        batch.draw(shader)
    draw.__name__ = name
    return draw

def Display2D_LUT(pos_dim = (100, 100, 10, 25)):
    # Get Palette
    n_elements = len(Seq_viridis)

    # Origin and aspect of the LUT
    x_orig = pos_dim[0]
    y_orig = pos_dim[1]
    x_size = pos_dim[2]
    y_size = pos_dim[3]

    for k in range(0, n_elements):
        vertices = (
        (x_orig, y_orig+k*y_size), (x_orig+x_size, y_orig+k*y_size),
        (x_orig, y_orig+y_size+k*y_size), (x_orig+x_size, y_orig+y_size+k*y_size))

        indices = ((0, 1, 2), (2, 1, 3))

        new_func = bindFunction1(k,vertices,indices)

        handler = bpy.types.SpaceView3D.draw_handler_add(new_func, (), 'WINDOW', 'POST_PIXEL')
        bpy.context.scene.my_handlers.append(handler)

bpy.types.Scene.my_handlers = [] #this line for development purpose only.
Display2D_LUT()

Please mark accepted if this solves your problem. : )


How to remove texture from selected faces? I have a roof. But I accidentally assigned the parts under the roof also. Now I am trying to remove texture from it. (See picture) I already tried U and then "reset" but it made my UV background white for some reason.

How does one go about it?

Add one more Material and assign to the Under the roof part it will be a quick solution for you


Render gpu use 1 core cpu! There are things that I do not understand. When you use gpu only uses 1 core. Solution or explanation?
Blender 2.78 release 1475052116

Amd fx 8120
ram 16gb 1600
ssd 120 kingstone + hdd sata3 500 gb
gtx 970 sc evga
linux mint 18

When rendering an image using the GPU, the data somehow needs to be loaded from your disk, preprocessed, pushed into RAM, from there into VRAM where the GPU finally starts doing its job. Everything up until the point where the data enters VRAM is done by the CPU.

If your GPU is working at 100% there is simply no need to push more data into this pipeline, so it's actually a good idea to not occupy more of the CPU's cores than necessary. In fact, this one CPU core won't even reach 100% unless your system runs out of RAM. In this case the CPU starts swapping the content of the memory onto the hdd, which ultimately will rise the CPU load.

So there's no solution needed, the system manages its own resources quite fine.


After I rig my model with automatic weights, the collar stretches when I turn the shoulders The collar has a stretched and morphed problem when I turn the shoulders. Is there anyway to fix it? Did anyone else have this problem with the automatic weights?

Almost certainly, you have an issue with the automatic weight calculations, which are never perfect, but often good enough. When they go wrong, they usually cause this behavior, because they work based on vertex proximity to the bones. So some of your vertices which make up the neck, or collar, are contained in the vertex group that is associated with the shoulder. The simplest solution is to go into Weight Paint mode and use brush strokes to remove the collar vertices from the shoulder vertex group. However, this method, while straightforward, is imprecise. Meaning that sometimes, you can miss parts when you go over them with the weight paint brush. A more surefire solution is to select the problem mesh in Object Mode, then go into Edit Mode, click on the Object Data tab in the Properties Panel, and look under the Vertex Weights section for a vertex group with the same name as the upper arm bone (which is effectively the same thing as your shoulder), and make sure it is selected in the list (it will be highlighted if selected). Then, in the 3D View, select all the vertices making up your collar. Go back to the Vertex Weight section in the Properties Panel, and press the Remove button.

Now the collar vertices are no longer part of the shoulder vertex group, and as such, will never move when the shoulder is moved.
Hope this helps.


How do I put an image as texture on a triangular object? I am using the cloth simulator to create an a triangular flag. Everythig works fine, but now I have been asked to put a in image on this flag. So I add the image as plane, it creates a rectangular plane, however when changing this to a triangle, it screws the image. I would like just to cut the parts of the image that do not belong to the triangle, without deforming the image.

Load  your image in a UV/image editor window, set the 3D viewport in a position that views the triangle from the top, go to edit mode, select all vertices, U to Unwrap and choose "project from view". Then, in the UV/image editor window you can Grab, Rotate, scale the UV map to fit exactly the part of the image you want in your flag. At the end of the process you will have to assign this image to the flag material as an image texture.


Geometry nodes Controle point scale with z position I want to distribute points on my mesh but scale them so they get smaller the higher they get.
I think that we can do this by using a color ramp but I want to separate my position values and clamp the z value so I can properly use it.
For that, I would need a way to feed it into a separate XYZ node but I can't find a node that outputs the position per point to use it later.
This is my current state:

Well, you just need the fresh build of 2.93 alpha.

You can find Attribute separate XYZ here.


Brick texture to a part of a mesh I am new to blender and for a university project i need to make a brick texture for a part of the mesh like in the image just for the castle. I tried by adding a texture to some faces in edit mode but because they have different shapes the texture goes all wrong. anyone have an idea?

Select all the faces you want to assign the texture. Press 'U' and click in 'Unwrap'. If the texture is already assigned to those faces it will automatically distribute the texture. If not you can go in 'Material Properties' in the right side of the screen and click 'assign' with the texture you want selected.

If you want your bricks to be smaller you can create a texture map in your node ang set the scale of the texture higher. This will make the material look smaller in the mesh but will also show its rectangular pattern if it gets too small.

Best regards.


How to join booleaned objects without leaving seams? I have a simple object I'm trying to merge into a single mesh constructed from 2 cylinders and a semi-sphere. I "merged" them using 2 Boolean modifiers.

This is close but I want it to be a single object so that I can copy and paste it and have multiples. So I select the 3 individual objects and press ControlJ to join them into a single object. By doing so the objects are merged but the boolean modifier is lost causing there to be seams in between the objects.

Is it possible to have a boolean of multiple objects, merge it down into a single mesh, and preserve the union between the objects from the original boolean? (I don't care about it being dynamic, I want the final mesh.) Or can this only be done by deleting and connecting the proper vertices manually and then creating the faces?

If you join two objects into one, then boolean modifier between them is meaningless, since only one left. Actually, they can be merged after applying the modifier. That's for your question.

Furthermore, I think a better idea for such simple shape is to model it with a few steps, with some basic tools that Blender offers, which is also easy to do, and gets better result:


Bring all planes in mesh to same level I have added a plane in top view. I have then extruded the plane according to a floorplan in topview.

I don't know what happened, but when I switched my view, I could see that some parts of it are for some reason high up in the air.

I would like to ask how I can bring everything back down onto the grid / floor.

And if somebody could tell me how this might have happened, I would also be glad.

Switch to object mode using the tab key, then press SZ 0 to scale the model to a uniform value on the z axis.

The result is that the selected region will be scaled to the median of all the selected vertices, effectively flattening the selection.


In Python how can I name the active selection Low Poly, join the others and name them High Poly? In a Blender 2.8 script I want to bake multiple high poly objects on one low poly.

I want to create a script in Blender 2.8 that bakes in selected to active mode. The active selection must be named "low poly", the other selections are joined and are named "high poly".

I hope that's what you're looking for.

Select the low-poly object and run the script to add a <Name>_LowPoly suffix to the objects name in the first place, join all other mesh objects of the collection and rename the result to <Name>_HighPoly:

import bpy

suffix = "_LowPoly"
act_obj = bpy.context.view_layer.objects.active

# Append the suffix to the active object
if suffix not in act_obj.name:
    act_obj.name = act_obj.name + suffix

# Get the collection of the active object
obj_coll = act_obj.users_collection[0]

# Create an empty list
high_poly_objects = []

# Append all mesh objects (of the collection) to the list
for ob in obj_coll.objects:
    if not "Low" in ob.name and ob.type == 'MESH':
        high_poly_objects.append(ob)

# Deselect all objects
bpy.ops.object.select_all(action='DESELECT')

# Select all High-Poly objects to call the join operator
for ob in high_poly_objects:
    ob.select_set(True)
    bpy.context.view_layer.objects.active = ob

# Join all objects selected before
bpy.ops.object.join()

# Get the object in context and re-name it
if "High" not in bpy.context.object.name:
    bpy.context.object.name += "_HighPoly"

# Optional -> Invert the selection for fun
for ob in obj_coll.objects:
    if "Low" in ob.name:
        bpy.context.view_layer.objects.active = ob
        ob.select_set(True)
    else:
        ob.select_set(False)

You can also override the context of bpy.ops.object.join() to avoid any viewport selection changes. Select all objects, make the low-poly object the 'Active Object' and run the script:

import bpy

hp_suffix = "HIPOLY"
lp_suffix = "LOWPOLY"

C = bpy.context
scene = C.scene

ob_active = C.active_object
if not ob_active.name.endswith(lp_suffix):
    ob_active.name += "_{}".format(lp_suffix)

obs = []
for ob in C.selected_editable_objects:
    if ob.type == 'MESH' and ob != ob_active:
        obs.append(ob)

if len(obs) > 1:
    c = {}
    c["object"] = c["active_object"] = obs[0]
    c["selected_objects"] = c["selected_editable_objects"] = obs
    bpy.ops.object.join(c)

if not obs[0].name.endswith(hp_suffix):
    obs[0].name += "_{}".format(hp_suffix)


How can I create a texture that looks like a woven strands of metal? I need your help and advise, I'd like to create a mesh like the below shown image , shall I duplicate a several torus and mix them ?! or create curve and mix them, really I don't have the correct .

I would try doing this with a procedural texture on a torus.

Using a simple voronoi texture and scaling it so that it creates a texture for the vertical strands. And feeding that to control the mix between a transparent and glossy shader.

Then use the same kind of setup but rotated 90 degrees for the horizontal strands.

Then mix the two textures (with a multiply operation), and use the resulting image to control the mix between glossy and transparent, but also use that to create some displacement. Adding a Brightness/Contrast node will give you control for the transparency and the amount of displacement.


How to export Blender model into Adobe After Effects? I have a model in Blender, which I have tried to export into Adobe After Effects as .obj and adobe after effects file (.jsx). None of these open in After effects. Does anyone know how to export it?

After Effects is not a 3D program, therefore it can not import 3D objects by itself. There are 3rd party programs that can help import an OBJ file. One of the best is Element 3D by Video Copilot ($200). After Effects also comes with Cinema 4D lite which has built in pipeline for working with 3D. You could always export from Blender into Cinema 4D and then use the built in pipeline to get it into After Effects.

Hope this helps.


Rigid body objects passing through each other I am experimenting with rigid body physics using the game engine for a project.

This is the setup:

I have 2 long rectangular prisms with hole.
The 2 prisms are connected with a cylinder (acting as a dowel).
I locked translation and rotation for one of the prism and everything else is free to move and/or rotate.

And here's the problem:

The dowel and the free prism are going through the locked prism. Can someone please tell me what am I doing wrong? Thanks.

Here is the blend file:
https://www.dropbox.com/s/o2y0pxk7ijk12bc/untitled.blend

There are several problems in this file:

Objects scale hasn't been applied;
Setting Triangle Mesh here is required, since the prisms have holes, which means they are concave objects, so other collision types don't work well with them;
Bound margin should be tweaked carefully, as well. Considering the distance between the surface, try smaller value;
The two prisms stay too close to each other, which will cause "intersection" if bound margin is non-zero.

Demo file_v3. Just FYI.

Added a demo video for better understanding.


Make axis parallel to face I'm making a grenade and still a blender newbie, but how do i make the x axis parallel to the face i want to move (drawn the line in pic 1).  Its off and every time I select edges to move along the axis it causes a weird movement (pic 2) when I want the grenade  faces to be aligned and not distorted...

Ahhh, figured it out, orientation was set to global and needed to be set to normal

In object mode, select transformation from global to local to normal etc at the bottom of the screen


How to enable an addon on startup via script? Our renderfarm is running Blender from the network. How can I enable addons on startup without saving user preferences for each node?

The following works when I run it from Blender REPL during a regular Blender session. I thought I would easily add a script in script/startup and run:

import addon_utils
addon_utils.enable("animation_nodes")

But it doesn't find the addon. Maybe the startup script is run before the addons are scanned? Any ideas?

What would be the best way then to enable it for all the rendernodes?

You can enable a comma-separated list of addons through the command line/terminal, so you're able to do that through a script. That functionality is described in the blender terminal help (./blender --help).

An example would be ./blender -b --addons animation_nodes,meshlint [file] to enable animation nodes and meshlint, then load your file.

If you need to load a single python script, such as a set of operations you want to use on a mesh object, you can use the --python flag. ./blender -b --addons animation_nodes,meshlint [file] --python [myscript.py] loads blender in the background, loads specified addons, loads the file, then executes the python script.

Unfortunately, the wiki is not helpful here; it only goes over basic rendering functionality. Simply call the help flag to see everything the executable can do from the terminal. A specific thing to remember is that flags are order-sensitive. Those flags listed first will be interpreted first, sequentially until the end of the command.


Why Blender 2.49 does not show button on ubuntu like it does in windows? I have add-on for Blender 2.49b, python 2.6.6 and I need it to "show the button" to a user like this:

result=Blender.Draw.PupMenu("Sketchfab Viewer ?%t|Yes|No")

But button does not show up in ubuntu, but it does in windows?

To run script press Alt+P in text windows and go in to addon folder than go in to 768dd88bd0bb49a8ad0a75ab143f685a and select astrea-768dd88bd0bb49a8ad0a75ab143f685a.html and hit Import. Then you should see

Edit:
When I add print "2" on line 43 it does not show up in console so its problem in folder "newGameLib" I doubt that it contain some windows only releted command just like cls.

Also one thing should be changed line 3277

os.system("cls")

to

##os.system("cls")

You can find your addon for 2.79 and 2.8 in link here.
https://github.com/sketchfab/blender-plugin

If you are unfamiliar with 2.8, you can see basic tutorials in link below.
https://www.youtube.com/playlist?list=PLa1F2ddGya_-UvuAqHAksYnB0qL9yWDO6

Playlists of tutorials for 2.8x on page 4 and those for 2.7x on page 5. I regard those as best for absolute beginners.
https://docs.google.com/presentation/d/13UpIjJEE7Oa7x5BiMsjXGW5CGOTDF03-SocRYi4Babs/


Can't use context menu 2.81 When I add a new object and I want to change the properties of it I can't change any of the options in the context menu. The options look grayed out and when I click I just click through the window into the 3D viewport.

This only happens when adding meshes: When I go into edit mode and bevel, then pop up the context menu I can change values just fine.

To clarify, I have used 2.81 full time for a couple of days now with no issues, one second it was fine the next I couldn't use it anymore, I'm pretty sure that means it must have been a thing on my end.

Restarting blender and making a new project doesn't work.

I've been using Blender since 2.69 and never had anything occur similar to this.


How do i Parent a mesh to an armature that is not in rest Pose? This is a simple character mesh: http://www.pasteall.org/blend/31247

The mesh has no modifiers.
Scale and Rotation have been applied.
The Armature's Rest Pose is the T-Pose.
The Armature has been posed to match the mesh.

How can i parent the mesh to the armature (with automatic weight from bones) while retaining the armature's original rest pose ?

I got feedback from Bassam Kurdali on Blender's bf-animsys mailing lists. Here is his slightly edited answer:

There is no "bind pose" in blender. There is just a rest position and a pose. Armature deform happens based on the rest position.

the only exact solution to this problem is:

create your 'bind' pose
duplicate object to a new armature
apply the pose as new rest pose on the new armature
Use the new armature as your modifier target
Constrain the new armature to the old and use the old one as the control rig, if you desire rest pose as T pose.

One more remark: It is not possible to use the Pose library as temporary storage for the original rest pose, because the Pose library stores poses relative to the current rest pose. If the rest pose changes, the poses in the library will no longer result in the same pose as before.


I can't transform the "Body" Mesh anymore in Edit Mode I'm working on a body mesh for a personal project and i think i made a mistake somewhere because i modeled the hand then joined it to the main body then i couldn't transform the body anymore.
The manipulator is "locked" on the hand meaning that whatever part of the hand mesh i select, it appears but when i select a part of the body mesh, it doesn't and doesn't "cancel" the selection too.
Here's the link to the file if you want to look for yourselves what the issue might be.
https://drive.google.com/file/d/14oCnIdfKQ8wDcb_-d-a2hKG5LpEQStqE/view?usp=sharing
Edit : File has been deleted since the issue got solved ! (Thanks again)

Snaping isn't enabled

Don't know if the explanation is clear enough but i can try to explain better if you need.
Thanks for the help and your time!
Aadam

Yes I also tried the answer of selecting the body in object mode, switch to edit mode, 'a' to select the whole mesh and then alt + h to 'unhide' and now the mesh is editable again.


How do i make a gaping hole? I'm trying to simulate something being stabbed and the sword leaving a gaping hole
 But i don't want to change the geometry of the actual thing, I wanted to try and use a transparent plane, so how would i go about making a gaping house in someones torso without affecting their geometry?

Masking doesn't touch the mesh, just makes it appear a hole, tunnel, or pit is in the impaled object. Note that this form of masking only works when rendered with OpenGL.  Blender Internal can also do this but with more imagination and work.  I have no experience with Cycles but imagine it could also be possible.

In this example a 3D mask is used to give the hole depth. It is turned off in the Outliner until the sword is ready to be withdrawn. The sword's removal reveals the hole.  The camera can actually travel through the hole and out the other side, spin around and peer through from the rear with a little Outliner trickery.

If 3D masking is a little too much for the inexperienced, a plane shaped as the hole can be used instead, but you'll be seeing straight through the torso and without depth, as though a hole had been cut into a photograph.

The details -

Make a duplicate of the actor and store it in say Layer 10 for safekeeping.

Impale the char with the sword and select the char, use a Boolean modifier on it, choose the "intersect"  option and name the sword as the impaling object.  What should be left is the actual hole the sword makes but shaped as a solid 'lump'.  It's front and rear surfaces will match precisely the torso's geometry.

APPLY the modifier so the geometry remains solid.

Blender is still seeing this 'lump' as the character, so rename it as a mask and move it to layer 2.

Go back to layer 10. duplicate the character or torso and move that to Layer 1. (replace what the Boolean modifier has destroyed)

Select the mask in Layer 2 again and give it two material slots.  One for it's sides (coloured red) and another for it's front and rear surfaces. (transparent)

We use the 'old Inviso trick' here and refer you to this link for detailed info about this form of masking.

How to put a mask into 3d space

The two important steps being - the Transparency tab's "Opacity" slider is to be set at 0.008, and both Specular sliders set to zero to avoid ghosting.  The diffuse's colour wheel slider should be set to about half brightness.

Once done and viewing in 'Material" mode the mask should now have invisible ends and you should be able to peer through it and see it's sides.  If the sides aren't visible, get into the mask's material tab and make sure the 'Mask' material is underneath the 'Sides' material. (use the triangular arrows to move each up or down)

With both layers active, expand the mask in the X or Y direction only and just a whisker so it's ends are barely outside the torso's surfaces.  This is so we will be seeing the mask's ends, not the torso's material where the mask sits.   When the ends are working properly as masks, a hole will appear 'through' the torso.  Viewing from the rear will be the same.  If it's not working you will need to read through the link
properly and apply that info.

Shape the hole's ends as you wish to make it appear as a wound, bearing in mind that it's surfaces once deformed, may slip back under the torso's and lose the masking effect in those regions.  It's no big deal but it may appear a little strange.

If the character is going to be moving about, a 'Navigation Empty" will be necessary.  Create an Empty at the char's origin point, then parent the mask to it.  Do that first.  Next, parent the character or it's armature to it.

This maintains the 'creation hierarchy' necessary for this form of masking.  We would be in effect, parenting the torso to the mask but not directly.

Full details can be seen at the info link above.

The character's selection arrow in the Outliner should be grayed out so it cannot be moved about directly.  Instead animate the Navigation empty.  That will keep both the 'hole' and the torso together.


Cycles: Shadeless "Shadow-catcher" Material for Rendering onto Footage I am superimposing CGI over video footage, and have run into a problem in making materials for objects that act as 'shadow catchers'.

Essentially I want a shader that is shadeless—like an emitter—but catches shadows and light from other objects. This is so I can reconstruct objects in footage so other objects in the scene interact convincingly with them.

Here's an overcomplicated diagram to illustrate my point:

(In this particular scenario, the problem could be glossed over by using RGB curves, but that is definitely not the case with more complicated scenes)

Isn't this a common situation? How to the real guys do it? Thank you.

(I am welcome suggestions of other ways of doing this.)

Divide objects into 2 scene layers, move actors (Suzanne) onto layer 1, move backgrounds onto second layer, place lights into both of them.
Setup 3 render layers - First for layer 1, second for layer 2 and third for layer 2 with layer 1 excluded:

Render it with transparent bacgrounds, it will produce results like this:

In compositor divide render layer 2 (BG_With_Shadow) with 3 (BG_Clean) - you now have a shadow to multiply over your backdrop and layer 1 to composite into backdrop:


How can I make a twisted cone? I've looked everywhere on how to do this shape, and the closest I can get is to a spring shaped item. Whenever I try to manually do it by extruding I don't get the exact look I want. Anyone know an easier way?

https://gyazo.com/49cdb8ec0b285802a7bdb1e05f52dc07

( For those who can't use the link, the shape is kinda like a Unicorn horn/cone shape but with it twisting around and around. )

Thanks!

As has been mentioned, there are multiple ways to achieve what you want, but I just thought I'd elaborate on the technique I used when I did this very thing not long ago...

First, Add 2 circles and move them so they're just touching. Then select both and Join (Ctrl+J) them into a single mesh, and set their Origin to Geometry (Shift+Ctrl+Alt+C) so that the pivot point is centered.

Next, add a Screw Modifier and change the Axis, Screw, and Iterations values until it looks right (for circles of size 1, a Screw value of 4 seems right), and then Apply the modifier.

Next, go into Edit Mode (Tab) and Deselect All (A). Then change to Wireframe Mode (Z) and select just the top few vertices.

After that, turn on Proportional Editing (O) and Scale the vertices to 0 (S>0). You can then scroll your mouse wheel until the Proportional Editing circle covers as much of the screw as you desire.

And one last thing, for whatever reason, the normals on one of the circles is always inverted, so just select Make Normals Consistent (Ctrl+N) to get them all facing out. You should then have a nice-looking twisted cone.


How can I assign a mesh group to an armature? I have a mesh group which is not allowed to merge but has to move together.  Now I am assigning each part to the same armature which controls all the parts together. It takes insanely amount of time to connect every single peace to the armature. I really wish I can just connect a group to an armature. Is this possible? Thx in advance!

Select all your mesh group
Then select your armature
Press Ctrl+P
Select Parent with Automatic Weighting

Now your mesh should be linked and moves with your armature nicely.


Model has a hole in it due to weird geometry in wireframe mode? I'm fairly new to blender and have encountered a problem with wireframe mode. The screenshots show a hole that is visible in object mode but not in edit mode. I turned on wireframe mode to see the geometry and as you can see from the images it looks strange in this area. Any ideas how to get my mesh looking normal?
Screenshots-

Blend file-
Apologies if the answer is obvious, i've been trying to figure it out myself but have got nowhere. I've tried:
-Deleting loose vertices
-Merging by distance (removing double vertices)
-seeing if any ngons or tris in the area (there are none)
-Moving the vertices in the area around (nothing changes)
-Googling wireframe mode to learn about this mode and how geometry is generated because If I knew how it generated the geometry maybe i could fix it (couldn't really find much relevant info)

You've created a shapekey and it is selected, so whenever you try to bring some corrections in Edit mode it changes this shapekey, not the base shapekey, and as soon as you come back to Object mode, you don't see what you've done on this second shapekey, as its value is at 0, you only see the base shapekey, which remains unchanged. So you need to select the base shapekey and work on it, you can even delete this second shapekey if it's not useful.


macOS flamenco worker test fails: blender_cmd […] does not exist so I fire up the flamenco worker in test mode, it registers at the manager (yay!) and then I send a test job. Here's what comes next:

2020-04-04 15:52:23,700     INFO flamenco_worker.worker.FlamencoWorker.fetch_task Received task: 5e8890f55061d1b8b40f1217
2020-04-04 15:52:23,700     INFO flamenco_worker.worker.FlamencoWorker Task changed status to active, pushing to manager
2020-04-04 15:52:23,700     INFO flamenco_worker.worker.FlamencoWorker Updating task 5e8890f55061d1b8b40f1217 with status 'active' and activity Activity(activity='', current_command_idx=0, task_progress_percentage=0, command_progress_percentage=0, metrics={'timing': {}})
2020-04-04 15:52:23,720  WARNING flamenco_worker.commands.blender_render.(task_id=5e8890f55061d1b8b40f1217, command_idx=0) Error in settings: blender_cmd 'Volumes/Applications/Blender' does not exist
2020-04-04 15:52:23,720     INFO flamenco_worker.worker.FlamencoWorker Task changed status to failed, pushing to manager
2020-04-04 15:52:23,721     INFO flamenco_worker.worker.FlamencoWorker Updating task 5e8890f55061d1b8b40f1217 with status 'failed' and activity Activity(activity="blender_render.(task_id=5e8890f55061d1b8b40f1217, command_idx=0): Invalid settings: blender_cmd 'Volumes/Applications/Blender' does not exist", current_command_idx=0, task_progress_percentage=0, command_progress_percentage=0, metrics={'timing': {}})
2020-04-04 15:52:23,722  WARNING flamenco_worker.runner.TaskRunner Command 0 of task 5e8890f55061d1b8b40f1217 was not succesful, aborting task.
2020-04-04 15:52:23,722     INFO flamenco_worker.runner.TaskRunner Aggregated task timing info: {}
2020-04-04 15:52:23,722    ERROR flamenco_worker.worker.FlamencoWorker Task 5e8890f55061d1b8b40f1217 failed
2020-04-04 15:52:23,722     INFO flamenco_worker.upstream_update_queue.TaskUpdateQueue Pushing task update to Manager, queue size is 2
2020-04-04 15:52:23,733     INFO flamenco_worker.upstream_update_queue.TaskUpdateQueue Pushing task update to Manager, queue size is 1
2020-04-04 15:52:38,726     INFO flamenco_worker.worker.FlamencoWorker Updating task 5e8890f55061d1b8b40f1217 with status '' and activity Activity(activity='', current_command_idx=0, task_progress_percentage=0, command_progress_percentage=0, metrics={'timing': {}})
2020-04-04 15:52:38,733     INFO flamenco_worker.upstream_update_queue.TaskUpdateQueue Pushing task update to Manager, queue size is 1

I think the important part is the first warning in line 4... I've read a couple of times that this path that "blender_cmd" wants to use tends not to work, but how can I change it (I've tried editing $PATH and .profile) and is that the issue at all?

Turns out you have to set the path to the blender binary of the workers in the setup of the manager! Switch the manager to setup mode, add the path to your blender binary (not the .app) and I set that binary to 'worker' only and added another one for 'user' only that points to the .app.


Multiple variables for on operator? Is it possible to have a class method work as same as with a function, where you can put in different parameter for one instance function? Like in my case, where I need to have 8 selection options, each with different naming conventions. This works fine with a function, but I need to execute the operation with a pie menu, so I believe an operator is the only way to go?
I was hoping to have one operator for each option, but have a different variable for each in the pie menu command?

lst = ["YO!", "WAZZAP!?", "HOW'YOU'DOIN!?"]

class Print1(bpy.types.Operator):
    bl_idname = "object.print1"
    bl_label = "Print 1"

    def execute(self, context):
        self.printz()
        return{"FINISHED"}

    @classmethod
    def printz(cls, text=lst[0]):

        print(text, "What is going on in the kitchen?")

class Print2(bpy.types.Operator):
    bl_idname = "object.print2"
    bl_label = "Print 2"

    def execute(self, context):
        Print1.printz(lst[1])
        return{"FINISHED"}

In this case, I have one "master" operator that feeds others, but I think there must be a simpler way than have a copy of 7 operators in code, that do almost the same thing? Can it be done as same as with basic functions?

I don't know what exactly you were going for with the class method, but using a function in this case should be equivalent. There is no need for a "master" operator.

from bpy.types import Operator

def printz(index=0):  # "cls" wasn't being used anyway
    text = ["A", "B", "C"][index]
    print(text)

class Print1(Operator):
    bl_idname = "object.print1"
    bl_label = "Print 1"

    def execute(self, context):
        printz()  # index defaults to 0

        return {"FINISHED"}

class Print2(Operator):
    bl_idname = "object.print2"
    bl_label = "Print 2"

    def execute(self, context):
        printz(1)

        return {"FINISHED"}


Can I model a house in a way that I can turn details on and off? I am building a model of my house with a view to using it to explore different changes as part of a major redecorating project. I have done some work using sketchup, but have run into problems because (for example) adding a skirting board affects the wall, such that removing the skirting board leaves a gap at the bottom of the wall. If the alternative skirting board is smaller, then I have a gap.

I would like to model each room as a simple box to which I can then add (as different scenes?) different skirting boards as well as other fixtures and fittings.

Also I would like to be able to have a view where the walls go semi-transparent to I can show details of wiring or plumbing, but still see enough of the walls to see where the wiring or plumbing is.

I'm a bit of a 3D noob, but have used sketchup enough to get frustrated at its limitations. How would you recommend using parent / child, groups, layers or scenes for this?

There are several ways to go about this. You named most of them in your question actually.. You could use parenting, and you could even use multiple files, however here are the most practical ones I could think of:

Hide and show objects as needed
You can hide the selected objects with H, and you can unhide all objects with AltH. You can also use the outliner to toggle visibility, which combined  with the Groups view, you could use to hide/unhide groups of objects (you can group the selected objects with CtrlG).
Use multiple scenes
For an object you want to appear in more than one scene, select it and press CtrlL> Objects to scene, then select the scene you want it to appear in (aside from the current scene).
Note that modifying the object in any scene will update it in the other scenes as well.
Use layers
You can move the selected object(s) to different layers by pressing M and selecting the layer(s) you want the object to appear on (use Shift to select multiple layers).
Any objects on at least one of the visible layers will be displayed (unless hidden in some other way).

Some useful shotcuts for handling layers:

Pressing numbers 1..9 (0 is layer 10) will set that layer as the visible layer. You can use Shift to keep the existing visible layers visible, and you can use Alt to operate on layers 11..20.
` will toggle all layers visible (press it again to go back to the previous layers)

This is probably the most intuitive option (also arguably the fastest, as you can use convenient shortcuts like M), however you are limited to 20 layers and layers cannot be named (I sometimes write down what is in each layer with the text editor).

I assumed this is just for real-time display. If you want to animate and render this, then that's something else..


How to get solid shadows cast from obstacles? I need clear shadows from the blinds on my character. There are some shadows, but they are very scattered, which, of course, do not seem to exist.

What I've already tried:
1 - Move the blinds point-blank to the character so that the light does not have time to scatter along the way
2 - dripped in the light source settings
3 - Set up different types of light (Sun, point, area, etc.)
4 - Work with the blinds material and drip into its settings
5 - Climbed in render settings
6 - Climbed in object settings

this parameter should have been set to 0


How to hide one level for all collections with Python? Using python how would I hide one level? Like shown below.

Override the context.

Test run, collapses "Collection 1"

To hide one level the operator used is  bpy.ops.outliner.show_one_level(open=False) enable developer tools in prefs to display [find link]

If we invoke an operator in outliner from mouse or button then the context.area is an outliner, if we run it from the text editor, for example, it's a text editor area.  The operator knows naught of the text editor area.

Overriding the context is a way to "fool" the operator into thinking it has been run from elsewhere or on a collection that is not context [add link]

Below is a test script.  I have hard coded in the default "Collection 1" to be collapsed.

import bpy

context = bpy.context
screen = context.screen
collection = context.collection
collection = bpy.data.collections["Collection 1"]
view_layer = context.view_layer

outliners = [a for a in screen.areas if a.type == 'OUTLINER']
c = context.copy()
c["collection"] = collection
for ol in outliners:
    c["area"] = ol

    bpy.ops.outliner.show_one_level(c, open=False)
    ol.tag_redraw()

#view_layer.update()


Why did my mesh disappear after using remesh modifier? I was trying to clean up the geometry of letter "N" after I converted it from text to mesh.

But the mesh of letter "N" disappears after I apply the Remesh modifier.
Making Octree Depth higher did not make the mesh reappear.

Q: Does anyone know the best way to clean up the geometry of a mesh?

For this modifier object has to be a 3D. Your N is only 2D.

To clean up go to edit mode, select all vertices and press X > Limited Dissolve.

Or select all vertices and press F (Make Face)

For more info https://docs.blender.org/manual/en/latest/modeling/meshes/editing/basics/deleting.html


How can you offset animations within a particle system? I am making a flock of birds using the particle system (with Boids). My base object is a single bird with a flapping animation using an armature.

When I create the particles, each bird particle is flapping in unison. Is there a way to randomly offset the pose animation so that the flock of birds is less in sync and looks more natural?

so you can use group in render section in particle setting. you should Duplicate your object and animate them separately and group them . then in render section in particle options use group instead of object. you can add more object with more animation to the group anytime you want.


How to convert linestrip into triangles I have imported a SVG path:

now I'd like to convert this path into triangles. For example below the path is converted into two triangles.

How should I do? Thanks!

First you have can convert your "curve object" to "mesh object" (select your object, Alt+C, convert mesh from curve/meta/surf/text). Then you can do triangles in many ways. By hand, go to edit mode (press Tab) > press Ctrl+Tab > mesh select vertices > then shift click on 3 vertices you want to do a triangle and press F. An automatic way, can be, with the object converted to mesh and en edit mode, press A until you select all object > press F to fill > press Ctrl+T to triangulate.


Why do I get different Denoising Normal Information when exporting as HDR and EXR files? At the moment I am rendering images and need to also export their albedo and normal information.
When I export them as .hdr images I get following result:

When rendered for EXR (or PNG) I get the following result:

It seems like the .hdr version is incorrect.
Is this possibly a bug or is there a proper explanation?

This may very well be a bug, but even if it were not, HDR and PNG are poor choices here.

HDR is a horribly inefficient format when compared to EXR. This is doubly so when considering that an albedo represents a range of energy reflectance of a whole. That is, the primary value range for an albedo is 0% to 100%, or in normalized float terms, typically 0.0 to 1.0.

So why is HDR horrifically inefficient? The encoding scheme is dedicated to encoding much larger ranges. That trade off means fewer bits are allocated for that crucial range of values between 0.0 and 1.0. The same applies to scene radiometry as well, where the emission range frequently isn’t using up the entire bit range of HDR’s encoding scheme.

EXR is by far and above the only file format one should be using when dealing with these sorts of things. Sadly, some people are forced into other file encodings due to poor software, and have to make do with awful encodings.

This link is extremely informative for those who seek further information on the file encoding quantisations:

http://www.anyhere.com/gward/hdrenc/hdr_encodings.html


why are the edges of uv unwrap blurred? and how to fix i used smart uv project and then baked and this is what happened

The blurred part in your image is create around the outside of boundary of each UV island when you bake. It is called the margin, and is used to hide/minimise various texture sampling errors that can occur around seams in some renderers.

You can control the size using the margin setting in the bake settings panel under output (in your screenshot it is set to 16px).

You may need to reduce this value if your image is low res or your islands are very close together to avoid overlap.

You can also control how much space there is between your islands when you make your UV layout, see https://docs.blender.org/manual/en/latest/editors/uv_image/uv/editing/unwrapping/mapping_types.html


Mesh emission strength to Area lamp strength I've three emissive mesh planes in my scene which I'd like to convert to Area lamps.

I've set my new Area lamps to use precisely the same size, location and strength as the planes were. But when I press shift+Z to preview the render, lighting is much, much darker than it was with the planes.

Is it just matter of me bumping up those Area lamp strengths, or is there something more to consider, if my goal is to get identical lighting what I had before with the planes?

Also is there some kind of formula I should use to convert emissive plane strength to Area lamp strength, or should I just eyeball it?

Yeah that was a problem I had, I did some testing and found that its something like 15 to 1 ratio.
If I had a Plane with the emission strength 1 then I needed strength 15 for the lamp.


Unable to add color to text I am using blender 2.66. I have added a text object and then selected the Object tab in the properties window, went up to the bottom and the used object color picker to choose a color.

But even after choosing a color, when I render the scene as image the color does not seem to be applied to the text object. Is there anything I am missing?

Try creating a material.

Blender internal:

Create a material in Properties > Materials panel:

To simply add some color, you probably want to set the Diffuse color instead of the object color:

Object color only affects the render when enabled in Material > Options:

Object color is used to add some color variance per object without adding new materials.

Cycles:

AFAIK, Object color is not used at all in cycles.

Render:

To give an object a color in the render for cycles:

Create a new material in the Materials panel by pressing Add new:

This will automatically add a Diffuse shader.
Adjust the Color input of the diffuse shader:

Viewport:

To give the object a color in the 3D view set the Viewport color in Properties > Materials > Settings > Viewport color:

Note that the Viewport color is separate from the colors defined in the material which will appear when rendered. (It will only affect the 3D view)


Tips for removing a handle point from a complex mesh I have some complex meshes imported from photogrammetry which I am trying to clean up in Blender. One of the artefacts that sometimes arises is when two parts of the mesh incorrectly join to each other creating a handle point. I need to remove these so the meshes have genus 0.

This is one example. I want to remove the highlighted "pillar" so that the upper and lower parts in view here stay separate from each other.
I have been able to bodge together a method in edit mode using knife cuts, deleting faces, and then filling holes using grid fill, but it is quite laborious and the resulting geometry does not match the surroundings well. As far as I'm aware there aren't any tools in sculpting mode that will change the fundamental topology in this way. Any suggestions for how to do this without too much micro-management of individual vertices, and leaving a natural-looking result?

Sculpt mode has a few tools to do this. One of them is
Trim tool (Box or Laso).

or
Flatten tool (with Dyntopo enabled)


Holes In Donut Icing Material The icing on my donut has small holes around the edges. I didn’t notice exactly when they appeared, but it wasn’t until just recently. I was likely messing with render settings when it happened. Any help is appreciated!

The donut's displacement was poking through the icing. The solution is to either decrease the Displacement Scale or increase the icing's Solidify modifier Thickness.


Impossible to invoke a message inside of a timer app? it is impossible for me to invoke a message within a timer app, is it normal? or is it a bug?

for this message system:

import bpy

def ShowMessageBox(message = "", title = "Message Box", icon = 'INFO'): #Message function
    def draw(self, context):
        self.layout.label(text=message)
    bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

ShowMessageBox("Such crash", "Many Wow" ,"BLENDER")

if i put him inside any blender timer app loop

import bpy

def ShowMessageBox(message = "", title = "Message Box", icon = 'INFO'): #Message function
    def draw(self, context):
        self.layout.label(text=message)
    bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)

def every_X_seconds_word():
    ShowMessageBox("Hello World", "Many Wow" ,"BLENDER")
    return 5.0
bpy.app.timers.register(every_X_seconds_word)

it make blender crash

import bpy

def every_X_seconds_word():
    def ShowMessageBox(message = "", title = "Message Box", icon = 'INFO'): #Message function
        def draw(self, context):
            self.layout.label(text=message)
        bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)
    ShowMessageBox("Hello World", "Many Wow" ,"BLENDER")
    return 5.0
bpy.app.timers.register(every_X_seconds_word)

i also tried within the app, also crash.

inside of this timer app there's also some operator that cannot work due to context issue ? for example i cannot do a screenshot every X seconds.

how can i bypass this?

this is how you get menu working in a app loop

import bpy
from bpy.types import Menu

class VIEW3D_MT_ScriptLauncher(Menu):
    bl_label = "Save Your File?"
    bl_idname = "OBJECT_MT_fc_main_menulaunchscript" #other id if two pies

    def draw(self, context):
        layoutT = self.layout
        layoutT.label(text="30 minutes passed witouth any saves", icon='COLORSET_02_VEC')
        layoutT.label(text=" ")
        layoutT.separator()
        col = self.layout.column(align=False)
        col.label(text=" Quick save ")
        col.label(text=" Quick save as ")
        col.label(text=" Quick save as copy ")
        col.label(text=" Quick save as new version ")
        col.separator()
        col.label(text=" Don't ask anymore ")
        col.label(text=" No ")

    @staticmethod
    def every_n_sec(C_dict, times=10, interval=10):
        if times > 0:
            bpy.ops.wm.call_menu(C_dict,
                name='OBJECT_MT_fc_main_menulaunchscript')

            bpy.app.timers.register(
                lambda: __class__.every_n_sec(C_dict, times - 1),
                first_interval=interval)

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

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

if __name__ == "__main__":
    register()

    # pass context dict to the function so bpy.ops works in timer
    C_dict = bpy.context.copy()

    bpy.app.timers.register(
        lambda: VIEW3D_MT_ScriptLauncher.every_n_sec(C_dict))


Is there any way i can place models down like blocks in games? Okay this is kind weird but pretty much,
Is there a way to place down models like you can place down blocks in games such as minecraft and others?

Drag a new window from the handle on the top left of the viewport. Make it a 3d view window and position it next to the other 3d view window. Then, build up a library of props and set them off to the side in the second window.

I would enable snapping just to make it more like Minecraft at this point. Now, just copy and past from one window to the other, and Alt+G to center the object in the middle of the construction area.


Check if a mesh has a material in Python I want to create a script that check if the mesh has a material, if not it applies a diffuse shader with mid grey (value 0.735).

If the mesh has no materials then

1>len(obj.data.materials)

although it is also possible that it has a material slot with nothing in it

obj.data.materials[i] is None

and the complete script is

import bpy

def no_material_on(mesh):
    if 1>len(mesh.materials):
        return True

    for i in range(len(mesh.materials)):
        if mesh.materials[i] is not None:
            return False
    return True

def my_grey():
    name = "my grey"
    rval = bpy.data.materials.get(name)
    if rval is None:
        rval = bpy.data.materials.new(name)
        g=.735
        rval.diffuse_color = (g,g,g)
    return rval

def mission1(obj):
    mesh = obj.data
    if no_material_on(mesh):
        mat = my_grey()
        if 1>len(mesh.materials):
            mesh.materials.append(mat)
        else:
            mesh.materials[0] = mat

#

mission1(bpy.context.active_object)


How to get cursor position in clip editor? How to get cursor position in clip editor?
I've been searching in context.space_data attributes, and in region, and region_data attributes, no success.

I'm assuming you're talking about the Mask mode of the Movie Clip Editor (it's the only 'clip editor' that has a 2D cursor). I've looked through Blender's source code, and it seems that the cursor location is not exposed to Python.


FBX option from import is missing I have a blend file, But when I am trying to import the only options I have are collada and alembic. FBX, OBJ etc are all missing.

I have enabled FBX add on in preferences. I have seen the options MANY times before, why is it missing all of a sudden?

I have the same problem .
But i accidentally found a solution so I thought  I should share it.
The  import export options like . Fbx  etc are missing In layout workspace, if you switch to modeling you will find all the other import export options.
Same in case of  exporting uv layout, it's missing if you open a window and use uv editor but it's present in uv editing workspace.


Where to find correct syntax for operator in Blender API manual? I have an issue finding the correct documentation online.

Example:

CTRL + A calls the following command:

bpy.ops.wm.call_menu(name="VIEW3D_MT_object_apply")

And a selection option reads out the following command:

bpy.ops.object.transform_apply(scale=True)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)

Solution:

Now by trial and error I found out that if you want to call an operator it has to be formatted the following way:

row.operator("wm.call_menu", text="Apply Tans").name="VIEW3D_MT_object_apply"
row.operator("object.transform_apply", text="Apply Rot").rotation=True

name and rotation have to come after the operator closing bracket to pass that information to the operator.

Where can you in the Blender Python API find this information? I searched for it but do not find anything about the correct syntax.

The docs have this information if you know what you're looking for.

http://www.blender.org/api/blender_python_api_current/.../wm.call_menu

In this case TextEditor > Templates > Python > UI Menu has a working example of how to trigger a specific menu

The UI source is often the most comprehensive documentation. For example space_view3d.py's class VIEW3D_MT_mirror(Menu) shows how to pass properties to an operator. As you have now seen

props = layout.operator("transform.mirror", text="Z Global")
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'GLOBAL'

Here both constraint_axis and constraint_orientation are passed as values to bpy.ops.transform.mirror as soon as the button is pressed.


Get selected UI-Language in python I work with an add on for Blender and after hours of debugging I finally found the culprit. It's the localisation.
For Example:
When i add a modificator, i. e. "Smooth" it is added as "Weich" in the german localisation. So far, so good. But if the coder uses another language as the user (coder: english,user: german) in lines such as
bpy.ops.object.modifier_add(type="REMESH")
bpy.context.object.modifiers["Remesh"].mode = "SMOOTH"
you get an error, that blender can't find the keyword "Remash", which is understandable, because the correct keyword would be "Weich" if you selected the german localisation.
My questions are:

Is there a way to list all installed localisation?
is there a way to check for the chosen localisation at the start of a script?

thanks in advance

Both methods are provided by Blender API.
A way to list all installed localisation
>>> bpy.app.translations.locales
('en_US', 'es', 'ja_JP', 'sk_SK', 'vi_VN', 'zh_CN', 'ar_EG', 'de_DE', 'fr_FR', 'it_IT', 'ko_KR', 'pt_BR', 'pt_PT', 'ru_RU', 'uk_UA', 'zh_TW', 'ab', 'ca_AD', 'cs_CZ', 'eo', 'eu_EU', 'fa_IR', 'ha', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'id_ID', 'ky_KG', 'nl_NL', 'pl_PL', 'sr_RS', 'sr_RS@latin', 'sv_SE', 'th_TH', 'tr_TR')

A way to check for the chosen localisation
>>> bpy.context.preferences.view.language
'de_DE'

>>> bpy.context.preferences.view.use_translate_interface
True

>>> bpy.context.preferences.view.use_translate_new_dataname
True

>>> bpy.context.preferences.view.use_translate_tooltips
True


Is there a way to resize multiple objects with different sizes, to the same dimensions? So I am very new to Blender and I am attempting to model a low poly P250, after a lot of struggle I had the wireframe outline, but when I looked at it in 3D view everything had different thicknesses, I've got no clue how to change all parts to the same dimensions. To an experienced user this must be painful to look at haha.

press TAB
select all by pressing "A"
press S to scale
now without touching anykey/mouse.. press X
and now move your mouse ... it will start scaling in X direction.


How do I fill an area with vertices lined up in a grid over a complex surface? I'm looking for an add-on or a short cut to fill fast and symmetrically a complex surface that needs to be closed with vertices. Doing it manually it takes a lot of time. I tried to do Ctrl+F and then Grid fill, but it didn't work. Neither F key works. Check the attached screenshots.

This is the surface that needs to be completed with vertices :

This is what happens when I try to use the Grid fill tool :

And this is what happens if I try to use the F key :

Bridge egde loops and/or F2 addon can do the job here. But i dont think any tool can automatically do it all in "one click" for you here.

Bridge edge loops : select two opposite edges parts (with same accound of vertices in each) then ctrl+E and validate "bridge edge loops" :

F2 is an addon to easily make faces (mesh_f2.py). A tutorial and download link here :

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

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Modeling/F2


object shape change when i duplicate object in a curve How can I duplicate object without shape change, or another good way to duplicate an object in a circle?

Try using dupliverts instead of the array modifier. The manual page on Dupliverts explains it well:

  First, in Object Mode, select the base object and Shift-RMB to add the
  circle to the selection (order is very important here), and Ctrl-P to
  parent the base object to the circle. Now, the circle is the parent of
  the monkey; if you move the circle, the monkey will follow it.

  With only the circle selected, enable Duplication vertices in the
  Object panel ‣ Duplication ‣ Vertices. A monkey head should be placed
  at every vertex of the circle.

Be sure to go to the bottom left of the manual page and use the pop-up menu to switch from English to your language, if it is on the list.


Why is the walk cycle not working? I have a 32-frame walk animation and have converted it to action. With the first and 250 last frames I set the keyframe as a walk cycle. When I hit play it just walks 32 frames and then slides the rest of the frames.

I have set the repeat option (8 repeat). It walks, but not as a normal continuous walk cycle. Where am I going wrong or what else do I have to do to make it a complete walk?

Pose Mode

It looks like your character is moving forwards both in Pose mode and in Object mode. I guess it's your problem.

Most of the time, when you create a repetitive walk cycle in Pose mode, you'll make your character (i.e. his root bone) stand "still" on the X and Y axis, like if he was walking on a treadmill. It's only once in Object mode that you'll make the whole armature move forwards, either with a Follow Path constraint or just making him move from point A to point B with keyframes.

It's the combination of treadmill animation and movement in the scene that will recreate the illusion of walk.

Making an armature move forwards in Pose mode (i.e. moving its root bone or moving the other bones away from the root bone) is only useful for small moves through the scene, or for some complex and non-repetitive movements, and in that case you generally won't make him move in Object mode.


How to move an edge loop along the normals of each edge? I've got a bit of a problem where I want to move an edge loop along the normals of each edge. If I have gaps between the selected vertices, it works fine - as shown below.

But I want to move the whole edge loop, not every second vertex/edge. When I have individual origins selected and normal orientation and I press G then Z Z, it seems to move along an average normal for the whole edge loop, as shown below.

Sorry if I haven't explained this well.

The Shrink/Fatten tool is what you are looking for. Select your vertices then press Alt+S. You might find it useful to activate Even Thickness by pressing S.


Making a menu to take me to different scenes How do I make a mesh clickable so that when I click on it, I go to a different scene? Obviously just making a mouse sensor (left button) > Set Scene (game) isn't working. Whenever I click anywhere on the screen, it goes to the next scene. How do I make it so that when I click a specific object, the actuator goes off?

use both mouse over and mouse left click on the object :


My config trying to find color management, how can I make it gone? This is my config from last workplace. My technical director write something into it and now blender trying to find color management. I don't want blender to write this titles. Raw/new blender don't write it. But I need my config. How can I make it?
+ I don't need Aces at all. I need standart srgb. I just want blender not try to find Aces on startup

Look for the color management folder within the previous install folder (C:\Program FIles\Blender Foundation\Blender XXX\datafiles) and copy it to the new install.


Creating custom arc shapes (multiple bumps) I'm a beginner at 3D modelling and currently stuck on modelling an arc for a furniture piece i'm working on. As per the image below, I thought this would be a relatively easy piece to model but of the methods i've try, none of them seem to be working!

The closest I've gotten is first creating a rectangle, giving it some loop cuts and performing the warp function. But when I try to create the additional bumps, I'm assuming the lack of vertexes made it impossible to smooth out those sections. Does anyone know what a possible way of creating an arc like the one I attached may be? Any help would be greatly appreciated!

Use NURBS Curve to model the lower part

Still in Edit Mode add another NURBS curve and model the upper part or the 180° arc
Convert both to mesh, close at the bottom with edges and fill
Extrude these bottom edges
Y-Extrude the whole model


Unable to select bones in pose mode (Blender 2.8) This question has been asked a few times in various forms here, but none of the solutions work for me. I have included a short video showing the issue, where I highlight everything.

https://youtu.be/OP9Q6qG978s

Video broken down:

Brand new install of 2.8 (even deleted the data in Appdata/Roaming/Blender Foundation/2.80)
Restriction Toggle for the armature is not disabled
'Lock Object Modes' in Pose Mode whether On or Off doesn't fix it
Unparenting the mesh from the armature and reparenting doesn't fix it

Something I forgot to say in the video, importing that character mesh into 2.79 works and doesn't have any of these problems (opening a saved 2.79 project in 2.80 does not fix it either). Same with other character meshes I have tested.

I genuinely don't know what to do, and neither do my buddies who work with Blender regularly. I have been trying to fix this for 3 days now, and I am very frustrated as it's preventing me from working with any armatures.

Can't Select Bones in Pose Mode (Blender 2.8)

I can't keep my armature in pose mode when selecting another object

Why can't I select bones in pose mode

Try to disable "In Front" in Viewport Display in the Armature Tab - that worked for me


What file formats preserve sharp edges? I am collaborating on a project with another individual who uses 3DS Max. When he marks edges as sharp, exports the mesh as a .obj file and gives it to me, I don't see any marked sharp edges.

Are there any file formats that preserve sharp edges between modeling programs that I can use in Blender?

Have you tried the last Blender version ? I've seen that it now supports sharp edges with vertex normals, so no more edge splitting needed. That should theoretically works as Max is using something similar (You might have to use FBX export thought).
If that doesn't work you can still collapse the edge split modifier prior to export, it will break your sharp edges in two. It's less practical but gives the same visual result.

If you're doing models for realtime keep in mind that sharp edges splits the uv islands in most game engine, which can very slightly reduce performance (sometime support edges are a better option). Cheers !


A very confusing cursor when sculpting [![When sculpting the cursor has two circles and a cross hair. It is extremely distracting to say the least. I don't even know what the purpose of the double circles are. Is there way to disable this complicated icon or at the very least remove the cross hair?

The center colored dot snaps to the nearest vertex and also appears on the other side of the model if you have mirroring turned on, as Yohello said. As far as I can tell, the outer circle shows the size of the brush, and the inner circle represents the strength / falloff of the brush, and increases in size as you increase the brush strength.

If you want to disable the cursor entirely, you can uncheck the "cursor" box on the right panel. If you do this, There will only be the normal mouse icon to show the cursor position until you click the mouse / press down the tablet pen to begin sculpting, at which point there will be no cursor.

Or, you could go to the cursor color settings and change the cursor alpha to 0, and a simple crosshair will be shown at all times instead of the dot and circles. Hope this helps!


Keep the bevel modifier from creating ngons and tris How can I keep the bevel modifier from creating ngons and tris? I thought a quad-only mesh would do it, but it doesn't like topological gems, and the edge flow is too important.
Or is it Simply Imposible ?

I don't think there is any automatic way accompanied with Bevel modifier to operate like that. Some other manual solutions:

If you just want to triangulate, there is a Triangulate modifier for you to use;
You can also select all faces then CtrlT to convert them into Triangles;
If you want to keep quads as many as possible, select all ngon faces only, by Select >  Select Face by Sides, set it greater than 4 (As shown below), then CtrlT to convert all selected faces into triangles, then AltJ to convert them into quads by tweaking Max Angle in F6 panel.


What happens after dragging and dropping a texture directly on an object? I am new to blender and as an experiment I dragged and dropped a texture from the file manager directly to my object in Blender. Now I see a texture on it in when Solid or Texture Viewport Shading is selected.

However, after switching to Rendered Viewport Shading there is no texture. The object is gray.

As you can see on the screenshots, the object has no materials or textures in the corresponding panels.

My question is: what happened to the object? Why is there no material/texture when the texture is visible in Solid mode? And how do I delete that "ghost" texture so that my object is gray again in Solid mode?

The Image you have drop down is present in the UV editor. If you drop down the image editor image you get it.

As soon as you click the image in the UV image editor then you can excess in texture also.

Create a New window -> UV Editor and from there you can find the image from drop down.

Now you can access the image apply to as texture material on the mesh


Is there a way to make hand painted designs glow? If not, what’s an easy way to model more intricate designs
anyway, here is a crudely drawn example of what i want

Quite simply, use an emission shader.
Longer answer:

Make your drawing, and get it as an image file, preferably black and white. You can use GIMP to edit a scanned drawing. It doesn’t technically matter which is which, but to save yourself a node (and possibly some confusion) you can make the glowing part white and the non-glowing part black.
If possible, use a Principled BSDF shader in your object’s material, and connect the drawing to “Emission Strength,” then set “Emission Color” to the desired value.
If Principled BSDF is not an option, input your drawing as the factor in a Mix Shader node, and hook your regular shader and an Emission BSDF to that Mix Shader. Set the Emission BSDF’s color value as desired.


Beveling edges with varying number of segments (preferably programatically) So I wrote a script to select a certain set of edges that I'd like to bevel. I save the edges inside of a dictionary with the key being the indices of the vertices on that edge and the value being the weight of the beveling. The edges are guaranteed to be separate. Which mean they don't share any common vertex. But some of them need more segment and width, some of them need less depending on the angle between the faces it lays on. I tried using the bevel modifier but it only either bevel by weight OR by angle and not both. I also tried manually beveling each edge but after one bevel, the indices are all messed up and the algorithm can't find the edges anymore.
Is there a way to achieve this?

As the index of an item changes as edits are made to the mesh you need to get each edge object before making any changes, then refer to each edge as you do the bevel. You can use the edges verts property to get the vertices at each end.

import bpy, bmesh

bpy.ops.object.mode_set(mode='EDIT')
me = bpy.context.edit_object.data

# edge_bevel_data
ebd = [
{'idx': 13, 'edge': None, 'offset': 0.05, 'segments': 3},
{'idx': 32, 'edge': None, 'offset': 0.04, 'segments': 2},
{'idx': 89, 'edge': None, 'offset': 0.06, 'segments': 3},
]

bm = bmesh.from_edit_mesh(me)

# first get the edges
for i in range(len(ebd)):
    ebd[i]['edge'] = bm.edges[ebd[i]['idx']]

# bevel each edge
for i in range(len(ebd)):
    e = ebd[i]['edge']
    bev_geom = [e.verts[0], e.verts[1], e]
    o = ebd[i]['offset']
    s = ebd[i]['segments']
    bmesh.ops.bevel(bm, geom=bev_geom, offset=o, segments=s)

bmesh.update_edit_mesh(me, True)


How can i fill a hole in this mesh I would like to close this hand mesh. I have tried fill, grid fill, and adding a new face. Nothing seems to work. I also tried extruding a new face and scaling it down to 0. Ideally, it can also be done with python. Thanks

First off, its hard to tell from the picture but the last edge loop looks very thick, possibly indicating there is a double edge there? maybe check that but otherwise, i made a cylinder with the same amount of edges, the extra extruded edges and triangles. The grid fill seems to work fine if you have the right settings and right active edge.

Or am I missing somthing? is this not the desired effect?


How to enable all in viewports? Collection manager right hand side At the right hand side of the Blender UI there is a collection manager that lists all objects, lights, cameras, etc in the scene with their respective collections. Every single object is disabled, how do I re-enable them all at once?

There may be a better way? But here goes..
In the (funnel) 'Filter' dropdown of the outliner, enable the 'Disable Selection' dart-icon, if you haven't already.
If there is a top-level collection, below 'Scene', containing all the others, Shift-click the dart icon next to it, to recursively set the 'Selectable' state of all the collections and objects beneath it.
If there is no top-level collection, you can temporarily or permanently create one.

ShiftA once or twice to collapse the Outliner view and
make it easier to see what you're doing.

Right-click below 'Scene' to create and name a new top-level empty collection.

Select all the top-level collections and objects whose state you want to change, drag them over the new collection and Ctrl-drop them there. This will link everything to the new collection without disturbing the originals.

Shift-click the dart next to the new collection.

Once done, you can X delete the new collection of links, if you want to.
There is also the per-viewport 'View Object Types'setting in the 3D-View header to look out for, if objects are unselectable.


How to see my Cycles render and blender render in Game engine This has probably been asked several times but I can't seem to be finding the answer.

I currently have made a tree (the body in Blender game and the textures in cycles render). Now I want to check it out in the game I'm making.

How can I achieve this?

You can't use Cycles materials in the BGE; it uses something similar to the Blender Internal renderer with a few differences. You can still use the same model, though—you'll just have to change the material.


How to make an animated survey graph? I try to make an animated graph like the one below (the value changes according to the post's lenght). I need about ten poles to be animated. I suppose that using drivers may be a good solution, but I don't know how to achieve it. Thanks in advance.

There are two techniques for animating text.

The first technique is to have a vast number of text objects whose hide_render property (the camera icon in the outliner) is keyframed so that each only shows up in the rendered scene for the appropriate frame or frames.

The other is to use a frame_change_pre handler (python) to change the body of the text curve.

Here is a modified version of the example from Garrett's answer to How can I make dynamic text in an animation?

import bpy

scene = bpy.context.scene

def recalculate_text(scene):
    obj = bpy.data.objects['Text']
    bar = bpy.data.objects['Cube']
    obj.data.body = "h=%.1f" % bar.dimensions[2]
    obj.location[2] = bar.dimensions[2] + bar.location[2] + 0.2

bpy.app.handlers.frame_change_pre.append(recalculate_text)

(I modified the default cube by moving its origin to the bottom of the cube, and animated its Z size property).

You would have to put this python script in a text buffer and run it.  If you want it to automatically run every time blender loads the file you should give the text buffer a name ending in .py and click the Register checkbox for that text buffer.  This also means you will have to load the .blend file Trusted (either using the Reload Trusted button, or by invoking blender with the -y flag).

The other technique of having a swarm of text curves whose visibility is animated is demonstrated at http://web.purplefrog.com/~thoth/blender/python-cookbook/data-graph.html .  Here is a relevant excerpt:

def setVisibility(obj, f1, f2):

    if not f2 is None:
        obj.keyframe_insert(data_path='hide', frame= bpy.context.scene.frame_end+10)
    obj.keyframe_insert(data_path='hide_render', frame=f1)
    obj.keyframe_insert(data_path='hide', frame=f1)
    obj.hide = True
    obj.hide_render = True
    obj.keyframe_insert(data_path='hide', frame=0)
    obj.keyframe_insert(data_path='hide_render', frame=0)
    if not f2 is None:
        obj.keyframe_insert(data_path='hide', frame=f2)
        obj.keyframe_insert(data_path='hide_render', frame=f2)

def makeText(text, loc, f1, f2):
    curve = bpy.data.curves.new("label", 'FONT')
    curve.body = text
    o1 = bpy.data.objects.new("label", curve)
    bpy.context.scene.objects.link(o1)
    o1.location = loc
    if not f1 is None:
        setVisibility(o1, f1, f2)
    o1.parent = bpy.data.objects["font folder"]

    curve.materials.append(bpy.data.materials["text"])

    return o1

def make2Text(text1, text2, loc, f1, f2):
    o1 = makeText(text1, loc, f1, f2)
    o2 = makeText(text2, loc, f1, f2)
    o1.data.align = 'RIGHT'

    return (o1, o2)

# animating text by creating hundreds of individual text objects that pop in and out
f1 = -1
for i,xy  in enumerate(data):
    f2 = frameForX(i, len(data), f0, f9)
    f3 = frameForX(i+1, len(data), f0, f9)
    if (i+1 >= len(data)):
        f3 = None
    if (f2>f1):
        make2Text("x=%d,"%xy[0], "y=%.1f"%xy[1], [4,6,1], f2, f3)
    f1 = f2


How to select all identically faces on object Hello, how can I select all faces that are identicall as those I already selected. Those are strawberry seeds, and I want to select them all at once. Is there some useful tool to help me with that? Thanks

Make sure that you are in Face mode, select the face and press ShiftG > Area (or header menu > Select > Select Similar > Area).

You can tweak the threshold in the Operator box:


How can I move the roots of hair particles? One time I accidentally was able to move the roots of hair with the comb tool but I have never been able to do it now that I need to. How can I move the roots of hair particles?

Uncheck the 'Root' option in the left hand tool panel, then re-check it when you want to anchor the roots in place again.

Note that you can also select and translate points with 'G', as in normal mesh editing. You can enable snapping and use it to put your roots back onto your mesh if needed.


Some faces of a model don't respond to UV Mapping I can't seem to get these particular faces to take the UV Mapping. I selected the entire object, entered edit mode, hit U>Unwrap.

The rest of the mesh takes the uv wrapping, but not those faces for some reason.

It looks normal in solid mode.

Does anyone know what could be causing this?

Some of the faces were not selected while assigning the texture.

To avoid that problem, make sure all UV islands are selected when creating or assigning a texture, or select all the UV islands and reassign the texture again from image browser: the small image icon on the bottom of the UV/Image editor window.


Blender crashes when decimating hi-poly mesh I just recieved a terrain mesh with over 16M polys.
I can open it and mess around the scene quite well since I'm on a really decent PC.
But I'm trying to decimate it (using the modifier itself) and my PC just crashes. It gets stuck for a while and then the sound and signal dies and PC freezes forever.
I haven't tried letting it frozen for more than 10min but since the sound on the PC dies I'm assuming it won't get out of the dead lock.

I don't think I'm recieving a less hi-poly version of that mesh, so I don't know what to do.

Thanks.

Make sure you have the newest release of Blender.
Recalculate normals, then try Clean up options on the mesh.
Maybe you'll have more luck that way than through the modifier.


Why are there dark patches in my rendered drop diamonds? Does anybody know why there are dark patches in the corners of the pear shaped diamonds in my renders?
I have attached the node set up of the diamonds (which i followed from a tutorial) incase there is anything wrong in there, and also the lighting setup for the same reasons.

I have tried spinning the ring and no matter which angle it is rendered at there is still darker patches, and i have also used a boolean to make sure there are no intersecting pieces of 'metal mesh' on the 'diamond mesh'.

Is it just a lack of light behind the claws and the shadows that are cast causing the diamond to reflect the darkness or are there other problems?

It would be easy if you uploaded the blend file, or drawed where are the dark patches, because I can't see them in your image, but I simply think that the "Dark Patches" you mentioned are simply reflections from the area around your scene that has not a background. Think about it, the left and right portion of your scene doesn't have anything for the ring to reflect, if you are not using a HDRI, which I think you're not, then the dark patches are simply reflections of empty areas.

As for the shader you have, I don't know why you have 4 different colored glass shaders adding on top of each other, might be something to do with that, it should be easier to reacreate the same material with a Principled BSDF shader.

Also your top image is a rendered one, in which engine you are rendering? Cycles or Internal? That might change things as well, your rendering options like bounces can affect that kind of thing too, that's why it's much easier if you uploaded your blend file.

But I hope this answer helped you,


How do I expand my camera distance? I already know how to expand the distance with a normal camera view. But how do I expand it, with the work camera? Or whatever it's called.

To expand the render distance in your viewport, increase the End field in the view properties panel.

Show the properties panel by pressing N, then go into the view tab to change the setting.


Rig deformation problem My rig is not bending the meshes legs correctly and stretches the leg and arm weirdly

I added a subsurf after the armature modifier, turned on the "preserve volume" option, turned on the "edit mode visibility" buttons and tweaked the weight values: in the central joint edge loop 0.5/0.5, then 0.75/0.25, then 0.95/0.05.

In the arms there is not enough geometry to get smooth bends, you'll have to add some edge loops.


How to duplicate selected vertices using python script? How to duplicate selected vertices using python script?


Switch node in Cycles material? I am making a node group for a procedural texture, and want to create a node that has a setting that defines which color value to use, and can be toggled. basically the exact same thing as the switch node, but that doesn't exist in cycles material editor. Is there a way to do this?

I just so happen to have created a custom Group Node that does precisely this. I found myself in a similar situation as yourself, although I needed to switch between more than two sources, so I put this together.

In this demonstration there are 10 different colors being sent into the switch node for convenient testing. You can easily see how the material's color changes when you type the corresponding channel number.

While I was at it I also created a 4-channel switch and a 2-channel switch (the 2-channel switch is admittedly redundant when you consider Rick Riggs' suggestion). You can pick whichever one suits you.

Inside the Group Node it looks like this:

This routing uses the principle of a "band-pass filter" to allow only values within a specific range through. By chopping a color ramp into ten equal bands of 10% at different places in the spectrum and assigning each to an input channel, we get a handy switch selector.


How can I get the names of the vertex groups these vertices are in? In my mesh I have few vertices which are in more then 4 vertex groups. I know the indices of those vertices, is there a way to get names of those vertex groups? Many tnx

There's no need for operators, nor the bmesh module:

import bpy

ob = bpy.context.object
assert ob is not None and ob.type == 'MESH', "active object invalid"

# ensure we got the latest assignments and weights
ob.update_from_editmode()
me = ob.data

# create vertex group lookup dictionary for names
vgroup_names = {vgroup.index: vgroup.name for vgroup in ob.vertex_groups}

# create dictionary of vertex group assignments per vertex
vgroups = {v.index: [vgroup_names[g.group] for g in v.groups] for v in me.vertices}

# test: print list of vertex group names vertex 0 is in
print(vgroups[0])


Arrange the items in a collection randomly on a curve with good orientation in animation node I've been trying to arrange the items in a collection randomly on a curve and  I am blocked.
I would like to dispatch multiples object to create diversity.
This is my differents test.
Blue : Dispatch the same object along curve work perfectly the pilar orientation folow perfectly the curve.
yellow : Dispatch an instance of collection like an oject along a curve work perfectly. The pannel on the picture is maded with multiples object in a collection.
My problem
InPink : Distribute A bunch of object contained in a collection like the Lampposts on the picture. doesn't work.
Anybody can help me ?
Thanks for your Help
[]
[]

[![enter image description here][4]][4]

You can also try using Random List and Copy Object Data node.


Shading editor doesn't have nodes I'd like to start adding a world node, but the "add nodes" button is replaced with a weird pin. What do i do?

In the top left corner of the bottom window, notice how there's a dropdown menu labelled Object? Click on that and select World.


Faces in solid mode suddely seem to be weidly bugged My problem seems to be simple yet I can't really countinue this project without a solution.

I've been modeling a building. Then once I switched back from wireframe mode to solid mode and my whole mesh became so weird. Everything seems to be okay in, except that the faces look terrible. If I orbit in the viewport, they - the faces - become half-transparent in various shapes and it all seems bugged, like if I duplicated the mesh and it overlaps itself.

What should I do? I didn't apply any modifier to it except a mirror.
Thank you for the answer.

The reason for this issue is that the viewport clipping start is set to 0. If you go to the properties panel (bottom left on the second screenshot) and make the value greater than 0 (the default minimum that blender will allow you to drag it down to is 0.001 and the default value is 0.1) then the objects will look normal again.


Is there a way to only store keyframes of only selected bones in poseLib? What bones does "Add New Pose" operator store in Pose Library ?

I am animating with "Blenrig" Character Vincent and it has lots and lots of bones. When I try to store poses it creates keyframes for all the bones whether hidden and in the same layer or even if the whole layer is hiden. Which makes it very heavy. And takes a lot of time while storing each pose.

So I needed clarity on how does "Add New Pose" operator function?

Is there a way to only store keyframes of only selected bones in poseLib?

I even tested it creating a test case added an armature with 3 bones

Created a PoseLib
Selected one Bone

Added a New Pose

In the Action Editor All the Three bones are keyed

pose library won't save positions of bones with DEF in the beginning of their name. You could try that for a basic ignoring of specific bones.

Or to disable bones in a keyframes
From:
https://www.blender.org/forum/viewtopic.php?p=107151&sid=ad277a6cd901c3e716346e1bdd51c371#p107151
"Mute the Bone's animation channels in F-Curve Editor and change frame to update 3d view:"

The only other way I can think of is to use a script which grabs all of the keyframes and allows you to modify only parts of that script before being run again.

I suggest you look into scripting and start with some of the codes here: How to get keyframe data from python?


not able to conect nodes in the compositor I'm having a weird problem, I've had it before but at the moment I'm using the compositor so much that it's getting really annoying...
at the moment I'm working in 2.82a but I've had this problem in al the versions before that one.

I'm unable to connect nodes by hand (see gif)

I am however able to do it with noderangler, but when I do that the connection starts at another point (see give)

it's also just really hard to select nodes (with a mouse and with my Wacom), sometimes when I click on the nodes or use box select I select the node next to it or just nothing at all. (see gif)

this also makes me unable to use frames because I'm probably dragging nodes "next" to them instead of on top of them...

This all points to the nodes actually being in a different place than they are being shown to me. Do you guys have any ideas on how to fix this?
As is sat I've tried different versions, restarting the program and my laptop and I don't have any other ideas.
thanks in advance

I had the same problem. It looks like having two areas of the interface displaying nodes is causing this bug.
Just close the other nodes area(s) and it should be back to normal. It worked for me !


vertex dots in edit mode disappered I've lost vertex dots in edit mode, is there any chance to bring them back?
I have lost vertex dots in edit mode

you are on edge mode, so either press the icon on top or number "1" on your keyboard (top).

Other reason why you may not see the vertices or any other element of your mesh highlighted may relate to this:
Blender 2.8 I can't see vertices, edges or faces in edit mode


Cycles fireflies with police lights setup For an animation project I'm working on, some vehicles with a warning light - these plastic ones with a rotating mirror inside which you can find on top of police cars, firefighter trucks (blue) or excavators and construction trucks (orange).

Some time ago I read a question (I am not sure if it was on stack exchange or somewhere else) where someone wanted to create glowing buttons. The answer which was given to him was something like "cycles is a physically-based renderer, so try to model like in the real world". So the solution for that was to model a button and put an object emitting light below.

With that answer in mind, I modeled the light as it looks like in the real world. A basic plastic casing with a separate transparent part (Glass BSDF), the mirror (Glossy BSDF) and a kind of light bulb (Emission). So far so good. The problem with that is, you need an unreasonable number of samples to make it look alright. You can have a look on my results below.

256 samples, 960x540 (25% of 1080p) - 0min : 31sec

1024 samples, 960x540(25% of 1080p) - 2min : 34sec

4096 samples, 960x540(25% of 1080p) - 8min : 12sec

This example scene has only ~1500 verts and the same for the faces. The vehicles I made have up to 80k faces and there is also a landscape around.

My question is: Is there a better way (in terms of rendering time) to achieve the same or a similar effect?

Thanks in advance
nioerd

--- edit ---

An image how the scene looks like with the changes suggested by pycoder (change the glass material of the bulb and the hull to a material which is only viewable for the camera)

256 samples, 960x540 (25% of 1080p) - 0min : 30sec

I can't see any real difference between my first try and the suggestion by pycoder, except that there is no illumination from inside the hull. Even the time needed for rendering does not realy changed. Did i do something wrong?

--- edit 2 ---

Added the model to download via blend-exchange.

In the glass shader you need to use the light path node. Setup your material so the main section gets mixed with a full transparent shader by way of the camera output of the light path node.

This will make your glass look like glass when the camera sees it, but not even exist when other objects see it. Doing the same with the bulb and then adding a point light would also be an improvement to sample count.

Note: This is not physically correct. To get better render times from cycles, you need to pull tricks like this to improve sample count.

Edit:

After playing with your file I got this (25 samples):

Here's what I did - switched device to CPU and disabled reflective caustics. (I also did a little trick with smooth shading to improve the look of the siren, but that's another topic.)

Here's the new blend:


Constraint objects to rotate in opposite ways I'm trying to rig an airplane's ailerons on blender. They are each near the tip of the wing and (usually) rotate in the opposite direction. I'm currently using the Locked Track to rig the other control surfaces, but is there a way to use only one control point to rotate both of them in the opposite direction?

Blend file: http://www.pasteall.org/blend/34207

The ailerons are the green objects. I made one, then duplicated and mirrored it to the other side (Mirror modifier wouldn't let me rotate them)

You are looking for the Invert option:

You can select this option for any single or combination of axis.
Check out an animation made by @SixthOfFour using this technique here.


Texture not being shown in rendered animation I decided to do a project using blender to do some rendering and I've followed this tutorial: Blender Tutorial: Wood Chipping Text Animation
So, everything was going fine, but somehow when I rendered the animation I've made, the textures in the cube and in the text objects wasn't there. Here are prints and my blender file. By the way I am using VLC player to play an OGG file.
Here you have some of the texture details of the one I've used and how I'm using.

Here I have a frame of my animation beign played in VLC Player, as you see it doesn't show the texture I've used in my project.

As you guys can see in the images, when I put "rendered" the textures are attached to the objectsm but somehow there are not in the animation.
Does anyone have a clue of why my textures are not being attached to the files in the rendered animation?

Never mind about posting the new blend file. The reason your texture is not showing up in the render is because you have an override material set in the RenderLayer screen called "Material". It's an empty material which is why the object is rendering as white.


How to Import a model with textures applied? I have downloaded a model from this website.

It comes with all the textures as .tga files.

I want to import all the files into blender so it looks exactly as it does on the website, textures applied and everything.
I've searched around for how to do this with no results.

Can someone help or guide me through doing this?

You would need to enable the 3DS Import/Export Addon in the User Preferences (Menu: File / User Preferences)

Then Import the .3ds file (Menu: File / Import 3D Studio (.3ds)
some of the UVMaps don't match the textures you would need to reassign them.

Enable Transparency in the Material Settings for glas parts:

You would also need a few lamps in your scene, in Object Mode ALamp/Hemi and place them e.g. in front of the model, then you will also see the textures.


How to apply texture the same size on all meshes? ignore mesh\normal size I'm trying to apply texture to the wall in "Generated - Cube" mode and when i look at it in the Render mode - it has different scales on the different meshes which have different size. The same thing goes with the polygons - smaller polygons scale texture size.

If one of the polygon's dimensions has a very tiny size - texture looks totally wasted.

How to apply texture on meshes with the different size and ignore it's size for texture scale?

p.s. Blender render

So that's a solution for Cycles Render, not Blender Render: Try some parameters in the Image Texture node, like Box instead of Flat:


Run modal operator while tool is selected For my addon in blender 2.8 I need to have a modal operator running while my custom tool in the new toolbar is selected, or at least know when it is selected/deselected so that I can invoke/stop a modal operator. I have not been able to find any way to do both these things. Is it possible with the current python API?

This is a hack--but for now (in 2.80/2.81) you can find out when a custom tool is activated and deactivated with a custom gizmo group:

class MYADDONNAME_TOOL_mytool(bpy.types.WorkSpaceTool):
    bl_idname = "myaddonname.mytool"
    bl_space_type='VIEW_3D'
    bl_context_mode='OBJECT'
    bl_label = "My tool"
    bl_icon = "ops.transform.vertex_random"
    bl_widget = "MYADDONNAME_GGT_mytool_activated"

class MYADDONNAME_GGT_mytool_activated(bpy.types.GizmoGroup):
    bl_label = "(internal)"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'WINDOW'
    bl_options = {'3D'}

    @classmethod
    def poll(cls, context):
        return True

    def setup(self, context):
        print("My tool activated!")

    def __del__(self):
        print("My tool deactivated!")

bpy.utils.register_class(MYADDONNAME_GGT_mytool_activated)
bpy.utils.register_tool(MYADDONNAME_TOOL_mytool, separator=True)

This isn't enough to invoke a modal operator as you're asking for, because the setup() method gets called in a drawing/rendering context, not one where you can just call bpy.ops.whatever('INVOKE_DEFAULT'). But this might be a useful starting point.


Replicate zirconia material in blender-cycles (tooth material) I"m trying to replicate the material in the shown image. Can anyone help me, please?
It's called zirconia and used in dental crowns.

I've given a try to your tooth, basically it's a mix between a Diffuse and a Glossy node, then a bit of Subsurface Scattering to give it a bit of depth and transparency. Add a Noise Texture to give it a bit of bumps, scale it on the Z axis as the strias are rather vertical. You could also try a bit of Transluncency at the end if necessary.