How to step-select vertices to side? I'm trying to unwrap a complex model with a lot of vertices, for that I need to mark some seams and later manually adjust the unwrapping UVs.

I'm looking for a tool or a short-cut that would let me step-select to side. For example there is Ctrl+ and Ctrl- to increase/decrease selection, but what I'm looking for is to simply step to side. Like this example:

I don't think a simple way exists yet.

A workaround could be to use vertex groups. By selecting a centre vertex and then selecting side of active to select all the vertices on the side you don't want, you can then create a vertex group and assign these vertices to the group.

With the vertex group setup you can select the centre vertices and expand your selection, then deselect the vertices in the group, which will leave you with only vertices on one side of your mesh selected.

I think you may even want to select only one new edge loop each time, in that case, after deselecting the vertices to one side you can assign the newly selected vertices to the group, then the next time you expand the selection and deselect you will also deselect the previous loop and all the previously selected vertices.

As you are saving your progress each time you can perform any steps you want between each step, you can always select the group vertices and expand then deselect to get the next loop.


Where is the "See Through" selecting button in 2.81? In blender 2.81,Layout workspace, Edit mode, Face select,using Box-selecting tool, I try to select all the faces of a cube at once, but only the front faces are selected.
Blender 2.79 had a "See Through" button next to the Vertex,Edge,Face buttons allowing to select all at once .
Is there such an option in 2.81? I could not find it.

It's still there.
Right next to viewport shading options.

Now it's called X-Ray.
Works in Edit and Object mode.


Start FBX animation with Tpose I downloaded an FBX from Mixamo that has a running animation that starts like this.

I need it to start in a Tpose and transition slowly to the running animation. Please advise.

Be sure to be in Pose mode with your armature selected.

In the Dope Sheet Editor, select all the keys (A) and move them some frames to the right. (G25Enter for 25 frames = 1 second)

Go to frame 1, in the 3D View select all the bones, press Alt+R and Alt+G to reinitialize position and location. The rig should be in T pose now.

Select all the bones, in the 3D View press i to insert a key on location and rotation (LocRot).


Is it possible to set a maximum velocity on a object? I have a object set to rigid body. I am using Linear Velocity set to Add to make it jump. Is it possible to set a maximum velocity so it will not keep speeding up infinitely?

You can set the maximum (and mimimum) velocity of a rigid body object in the Properties Editor.


Imported video's audio has different play time when watching in vlc I have a recorded video (recorded in obs), that has a running time of 28 minutes 56 seconds.  When I watch the video in a video player (e.g. vlc) the last word of audio is at the 28:55 mark.  When I import into blender, the running time of the audio and video track is 28:56 but the last word of audio occurs at 28:48 and then there's silence for the last 8 seconds.

This isn't a case of the audio and video channels being different lengths.  I recorded at 30fps and imported at 30fps so they both are the same length.

What could be causing this weird audio issue?  Is it some sort of codec issue or variable frame rate issue perhaps?

Okay so I finally figured it out!

I thought this would have only mattered if the recorded video was defined as a variable frame rate video, and things were broken even after explicitly converting it to a constant 30fps.  But lo and behold, I changed that setting to AV-Sync and everything works beautifully!

Hope this helps anyone else looking for the answer to this problem.


Create a Collection inside another Collection with python How to create a Collection inside another existing Collection with Python?

Each collection has a children (collection) property. Easy to figure out using the python console:

>>> C.scene.collection.
                       all_objects
                       animation_data_clear(
                       animation_data_create(
                       as_pointer(
                       bl_rna
                       bl_rna_get_subclass(
                       bl_rna_get_subclass_py(
                       children
                       ...

To get the first level of all sub-collections, you can just iterate through the list:

>>> for coll in C.scene.collection.children:
...     print (coll.name)
...
Collection
Collection 2
Collection 3
...

To add a new collection, create a new data-block and then use .link(collection) method to add it to whatever your main collection is:

>>> C.scene.collection.children.link(
link()
CollectionChildren.link(child)
Add this collection as child of this collection

>>> my_sub_coll = bpy.data.collections.new("My Sub Collection")
>>> C.scene.collection.children.link(my_sub_coll)

The same principle applies to all collections, no matter the collection is on the first or any other level. Example on how to add a new (sub) collection to the active collection:

>>> active_coll = C.view_layer.active_layer_collection.collection
>>> active_coll.children.link(my_sub_coll)

You can also specify the each collection by its name C.scene.collection.children["Collection"] or you can even use the index operator C.scene.collection.children[0] but that's error prone. In case the name of the collection or the scene hierarchy changes you're lost. Better practice is using pythons get() method to basically perform a search for the collection in the first place:

>>> C.scene.collection.children.get("Collection")
bpy.data.collections['Collection']

Basic example using .get():

import bpy

C = bpy.context

main_coll = C.scene.collection.children.get("Collection")
if main_coll:
    # Create the new collection
    my_sub_coll = bpy.data.collections.new("My Sub Collection")
    # Add it to the found collection
    main_coll.children.link(my_sub_coll)

Advanced example on how to add a new collection to an arbitrary collection in the scene using a recursive loop based on https://blender.stackexchange.com/a/137866:

import bpy

def traverse_tree(t):
    yield t
    for child in t.children:
        yield from traverse_tree(child)

coll = bpy.context.scene.collection

for c in traverse_tree(coll):
    if c.name == "MyCollection": # Specify the name of you main collection here
        my_sub_coll = bpy.data.collections.new("My Sub Collection")
        # Add it to the main collection
        c.children.link(my_sub_coll)

Notice that you add objects to the collection(s) the same way by just passing an object  when calling the .link(object) method on the actual object (collection) property, which is actually pretty nice and convenient:

>>> my_sub_coll.objects.link(C.object)


IKBone rotates and inverts trying to follow pole when spine is rotated How can I avoid this problem when rotating the spine:

If spine is not rotated, IK works "fine" with Pole Angle: 0, is this correct?

Thank you!

Answered: I had "Inherit Rotation" turned off as the tutorial I followed said.
I just turned on again and now works as expected:


Why is my cycles render still grainy on 1000 cycles? I recently made a desk lamp model and set the samples to 1000 for an overnight render upon waking up the image was still rather grainy is this something in my blender that isnt set right or something in the scene itself?

I see a few things you can improve:

You can use much less polygons. The higher the polygon count, the longer the render will take. Try searching for tutorials that use subdivision ("subdiv") modifiers.
Use a cube instead of a collection of planes. There are gaps between the planes, which makes it harder for Blender to analyze the scene. Using a gapless cube will improve the rendering.
Reduce the number of light bounces; this is what I used in the render below:
Use GPU rendering if you have an NVidia or AMD video card:

Reduce the number of samples (because by now you don't need that many).  I used 100 samples instead of 1000 in the render below.

This is the result (except the polygon count, I kept the lamp model the same), which was rendered in just under a minute on an NVidia Geforce GTX 970.


How do I take a flat model and wrap around an axis like a wheel? I am making tread for a car and I made a simple pattern for one section and then duplicated it a bunch of times using an array. What I want to do now is take the model that is flat and wrap it around an axis to turn it into a wheel. How do I do this?

One way is to just add an Array modifier to your tread or flat object, bump up the counts a bit and add a new Bezier Circle to the scene.

Then add a Curve modifier, select the correct axis (it sometimes wacks out here, you can just apply transformations before you do this) and tweak accordingly until it aligns properly and is arched around a portion of the curve.

Bump up the array count some more and voila, a tire or whatever object wrapped around a circle. (When doing this, you might have to select the curve and scale it accordingly so that the ends of the object meet. You can also tick 'Merge' in the array modifier or use Alt + C to apply the modifiers and convert everything into one object, after this, if a gap still exists, it can be easily filled.


Video Sequence Editor: change all data/files paths with python I want to create a short animation from a series of png image files rendered in another animation program with VSE. I add the effect strip Alpha Under with several transparent overlays PNG files that contain title information, watermark and logo to achieve the desired look. This structure works well and gives the desired result.

I have to repeat this process for a twenty different animations. The number of images imported is always the same, and they are always the same x and y dimension, just different in appearance with unique titles overlays. I would like to use Python to update the data/files paths for all of the assets used as inputs to the VSE, and update the animation output directory.

I am pretty new to Python, but have coded in C++ in the distant past. I am unsure how to programatically select a track in the VSE and bpy.ops.sequencer.change_path() and bpy.ops.sequencer.reload() to update the VSE structure.

There are many great VSE add ons that you could look at for inspiration. Also consider reducing your complexity. Perhaps you could create sub scenes, each containing the png sequence you need. then you could iterate those scene strips in your master VSE scene.

After setting up a repetition of the strip stacks (in the master scene) you could make a simple command line render of the master scene with an array for start / end frames to give you discreet composited renders.


Make head if my figure smoother I need to make this head smoother. I am already using subdivion surface 3 on whole object.

I found here and try select head and use shade smooth.

Head stil had that visible lines and just not look smooth.

Here is file, I hope I upload it right.

This happens due to the n-gon face on top of the head of your figure. They don't subdivide well, so you get some kind of wavy surface.
To avoid this, you should try to keep quads (faces with four vertices) wherever possible.

That means that you shoud put some additional edge loops there, e.g. like that:

What I did was extruding the top face and scaling it down, then repeating the same thing, so that the inevitable transition from quads to one ngon happens in the small area in the middle.

Cheers


Grid to many planes? I need a lot of independent planes (like 200x300), but creating them programmatically with a loop took a lot of time (with bpy.ops.mesh.primitive_plane() or with vertices and faces). But creating one grid with subdivisions is very cheap. My problem is, that the vertices of the subdivision planes are connected and i need them independent (having each inner vertice four times).

So i would ask you, if there is an option to divide an grid in many independent planes?

you can use the edge split operator to divide the grid into individual squares , then you can separate them by loose parts , here is the lines that do that :

        bpy.ops.object.mode_set(mode = 'EDIT')
        bpy.ops.mesh.select_all(action = 'SELECT')
        bpy.ops.mesh.edge_split()
        bpy.ops.mesh.separate(type = 'LOOSE')
        bpy.ops.object.editmode_toggle()


Some Materials Not Rendering, But They Are Applied For some reason some of my materials and textures aren't rendering when I do a full render (or even in the render viewport). I've attached an image below to demonstrate. Notice the front window frame and shutters are not rendering much texture at all. When I select the object in the viewport, all of a sudden the material renders. If I deselect, it goes back to the default gray.

Thanks for your help!

EDIT
I'm thinking it has something to do with these objects being "alt-D" duplicated instead of "shift-D". Could this be?

Some of your objects are duplicated.  In your .blend file, I selected one of the window shutters having problems showing materials.  I moved it away, and found there was still a shutter there.  One had material, and the other didn't.  Coinciding surfaces are unpredictable - you'll see parts of one and parts of the other mixed up, and exactly what you see  may change with camera position and viewpoint.

Solution is to find and delete those duplicate objects.


Accessing a render in a remote GUI instance I hit F12 to start a huge render just before I left work on Friday. Now the render is ready, but Blender is just sitting there consuming a lot of memory. I'd like to get the render saved to disk, so I could kill the Blender process.

Is it possible to access a render that is sitting in a Blender instance on a remote Linux machine?

After your single image render has completed, there should be an EXR file in your System Temp folder, even if Blender has not formally outputted a frame image. However this is only the case if you have enabled Save Buffers in the Render Performance panel beforehand.

Check your Blender preferences for where that folder is on your Linux system (default path is /tmp for linux). The folder may be hidden, so you may have to unhide it to see it, but there should be an EXR file there until a system reboot or the folder is cleared for some other reason.

Alternatively, if your Blender app is running in GUI mode, you could possibly Remote Desktop into your Linux machine, and just save the image out of Blender.

Failing those 2 solutions, you may be out of luck, unfortunately.


Is there a way to change the mortar geometry of the Brick Texture? I started making procedural Cycles materials since a few days, and I find it very fun. After messing around with the nodes, I tried to create a brick texture. Here's my current progress :

I wanted to know if there's a way to change the mortar geometry, to make it less "perfect", like on a real brick wall (for example this one)

I already tried some things, like connecting Noise/Voronoi/Musgrave to the Vector input and the Mortar Size of the brick texture, but I didn't found anything that looked right...

Can someone help me ? Thanks !

Sorry for the engrish, I'm French :x

You can do something like this :

The Noise texture is used to distort the Vector input to the Brick Texture node - this results in distortion of the brick texture. Note how the Factor of the Add node (a MixRGB node set to 'Add') is extremely low and the Scale of the Noise texture increased to 75 to produce many small ripples in the lines of mortar.


How do I make a walking and running sound? I have the sounds, and I have done so when I hold w it starts the walking sound and when released stops.
But when I have done wshiftcollision the run sound overlaps the walking sound:

Add another keyboard Sensor L-shift but make it inverted, connect that to the left side of the Controller linked to your walk sound Actuator but make sure its only W and the inverted L-shift sensors connected, that should keep the run sound but stop the walk sound if L-shift is pressed


Cannot find toolbar in header - blender 2.8 Hi,

I cannot find the toolbar in my blender and when I search toolbar it shows like this in the second image

Click (RMB) on any button in 3D-view header and in menu find Show Tool Settings


Can 2 sets of parented objects be added to a 3rd parent? I'm new to Blender and I'm trying to organize my objects by creating a parenting hierarchy.

I currently have two parented sets of objects each containing several dozen objects (children) each. I would like to combine these two parents under a "super" parent while retaining the "sub" parents. Is this possible?

I've been unable to do this myself, however my research so far says nothing about this being impossible.

Thanks.

Yes, this is possible.

Just select the parents of each individual set of parented objects and parent them to another object.  Note: it is often good practice to use empties as parents for sets of objects for this kind of application.


Too many objects need random emission values I'm new to blender, and am working on a large "cyberpunk" skyscraper that needs a ton of windows. I applied some basic materials nodes that randomized the emission values to each window as a separate object, which works great.

However, the problem is that the picture shown is only a small fraction of the building, and when I'm putting the parts of the building together, the object count is reaching the thousands, and my computer slows to a crawl. Is there possibly an alternative to randomize whether each window is on or off that will remain once I combine them into a single object, or at least in bigger pieces? Maybe have each window be randomly assigned one of two materials? Any help would be greatly appreciated!

Thanks for your suggestion, but I figured out a different way to tackle the problem. I made all of the windows all as a separate object, and I discovered the random selection tool and randomly selected individual faces to be assigned to emission material


How to animate petals opening I need to make a set of rectangles standing up on the edge of a circle close inwards and fan outwards. They aren't actually petals but it seems like an intuitive way to explain it.

In the image I've gotten the geometry I want by using dupliverts, but I can't get that to work for an animation. It doesn't orient correctly unless the child object's rotation is reset with Ctrl + A. I tried animating array modifiers, but the rectangles distort.
I don't think using constraints will allow me to get all the rectangles to nicely spread each in a different direction. I am wondering now about drivers, but I've barely used constraints or drivers. Also it would be really nice to keep the aspect of having one shape determine the shape of the others, so I can edit the shape of all of these blades at once later on if I want to.
How should I approach this?

so, with Dupliverts:

Create your circle, create your petal, apply the rotations, parent the petal to a bone With Automatic Weight.
Select your circle, in the Properties panel > Object > Duplication, press the Verts button, enable Rotation.
Parent the armature to the circle. The petal should duplicate along the circle.
Animate the bone in Pose mode, it animates the other petals.


How to import MakeHuman character in blender2.9 to activate pose mode I want to import the Makehuman file to blender2.9 and want to edit its pose but not getting an option either in the Main menu or in the N-Panel menu.

Did you make sure to add a skeleton/armature to the mesh in Makehuman?  Here's a couple of things that slowed me down:

In Makehuman, if you add clothes or other things, you are actually importing more than one mesh.  For instance, in the attached image, you'll notice that only the clothing is highlighted by clicking on the human.  I don't know if you can see it in the side panel or not, but "Exports:Male_casualsuit" is chosen, not Exports or Exports:body.  You need to make sure you know what you are choosing -- though I'm not sure that even that will get you to pose mode if you choose the mesh rather than the armature -- see point 2.

If you choose the mesh and not the armature, then pose mode is not available. Note in the above image that the mesh is chosen, but not the armature.  In order to go into pose mode, it seems you need to actually select the skeleton itself:

If I choose the skeleton I can then go into pose mode:

But, at the most basic level, you didn't indicate that you actually exported a skeleton at all, so there may not be any rigging done to start with.


Cycles UV/Image Editor: How can I control the Image Displayed? See the two screenshots displaying a concrete (cube1) and a wooden cube (cube2). Each one has its own material which references its own uv map.

Now when I switch from cube to cube (object selection and then edit mode) the image in UV/Image Editor's background never changes. But the unwrapped faces are updated correctly and 3DView (material and rendered) is also working.

This challenges me for a few days now. Any help is greatly appreciated.

Blender 2.78c Cycles

Update: This answer deals with the active image within cycles. Its simply not implemented that image view displays "the best" texture for an object but always the last image used, even if it belongs to another material.
Set active image node with python

Update2 Interesting: As stated here https://developer.blender.org/T34978 the ImageView is completely decoupled from the material. This was a bugfix in 2013.

UV/Image Editor Window

Cycles Render has texture nodes. Different than Blender Render.  This candidate answer may be biased towards Blender Render and may be deleted.
You may also switch to Blender Render from Cycles temporarily for a time period. Requires mouse movement and Click.  Perhaps only slightly more effort and humiliation than going into edit mode.  Some small amount of testing.  Oh, yes, ummm and do not forget to switch back to Cycles, otherwise the results could be ... Catastrophic .  Another Click.

Above image shows a pinned and unpinned image.  One is static. One follows the current mesh object in Blender Render Edit Mode, Not Cycles.  Thus we can see as many images as we want.

Viewport Shading. 2 simultaneous 3D Views.  Top is Solid Shading.  Bottom is Material Shading.  Image above.  Same Mesh.  Local Mode is meant conserve CPU/GPU resources in this contrived example.

Techniques to see the current texture for an object

Blender Render. When you enter edit mode for the Mesh, Blender makes an effort to change the image.  Please investigate. You can quickly menu into and out of edit mode.  Just confirming the OP original statement .... Cycles Render Failed this test. Even when I selected the texture node in the Node Editor Window.  This selection action has some effect in other parts of Blender such as Baking.
If computer resources permit, then you can have a 2 or more ... 3D Views, one with Material displayed. Local Mode may control CPU resource consumption.  More control with display options.  Or Switch Between Material and Non Material in Single 3D View.
Blender allows multiple windows with Menu/Window/Duplicate Window. You need not flood your current window as forbidden in a comment below.  This would again allow multiple 3D Views in the own window. Window meaning here is different than a 3D View.
You can open up 2 or more ... Image Windows. Pin the result of one by enabling "Display current image regardless of object selection". Enter mesh edit  mode with one object, choose the image window non pinned and select a new image.  You can see two images at once.  At least until you enter edit mode on a different mesh.
A single quick frame render may be a reminder.

Blender Behaviour allows flexibility because of So Many Potential Uses

The Image Window has many uses. Blender can not always make the correct guess .  The Blender User must have control.  Blender automatically changing the image for the Blender User May be contrary to the finicky and excessively moody whims of the user.
The little menu highlighted in your question allows you to change the image displayed or show the render result.
Perhaps you just want to inspect for fun, one of your many images.
Image Window can display the new result of Texture Painting so the result image can have no partner mesh. Odd Situation. Please search Texture Painting if that suits you.
Blender Render. You can have many images associated with a Mesh as  Material Textures in the Texture Panel.  The Blender User must be able to inspect the exact image that User desires at that moment.  Even if the images are displayed in the Material Window or Texture Panel.


Is it possible to edit the size of a Sun lamp in Blender 2.8 I've noticed upon switching the lamp types in the new release candidate for Blender 2.8, that the size property for the Sun type is missing. Is that feature removed?


In an add-on, receive the path to the file Blender was opened with or its launch arguments? I want to write an add-on that can open a file opened with Blender (i.e. double clicked while Blender is the default program associated with the file format). That means Blender is opened with launch arguments holding the path to the opened file. This must work for file formats other than .blend, such as .fbx. In the Python code for an add-on, how can I access the path of the file opened with Blender. Or the arguments Blender launched with?

bpy.context.blend_data.filepath - full path and name of opened .blend file. I doubt there is something for imported files, because they are "adding" to scene, not "opening"

For other arguments you can use standard recipe:

import sys
for arg in sys.argv:
    print(arg)


How to use a mesh to reveal an object How can you use an object to mask out objects in blender?
As in, a cube perhaps that hides a circle, and then the cube is animated
to reveal the circle.

I want this cube to act like an eraser almost; Any part of the mesh it encapsulates needs to disappear, however the remaining portion of the mesh that is not "subtracted" should remain visible. Of course I want to be able to specify a specific mesh that the mask effects.

Also a way to fill in the gaps in the mesh that effect would create automatically would be needed in many instances.

Is this possible? If so, is there another way to achieve this?

Here is the link to the model.
I want the cube to be invisible, and as it rises I want it to reveal the sphere, which is also invisible while it is inside of the cube.

This is fairly straight-forward, there are two things you need to do:

Make the cube subtract from the sphere, and
Make the cube invisible to the camera so it doesn't render

First, select the sphere and add a Boolean Modifier to it, setting it to difference and making sure the "Object" option is set to the cube.

Now go ahead and set the maximum draw type for the cube to Wire in the object settings.

You should get a result like this:

Scroll down a little farther and under Cycles Settings un-check all the check-boxes.

When you render you should have a result like this:


How can I view a cross section of 3D objects? I'm looking to view 3D objects by using / adjusting cross sections is there an option to do this in Blender 2.83?
Something like this:

Most information I've seen seems overly complex https://youtu.be/JAzlC3VZDfw

Use booleans. Create the object that you want to cut. (Make sure it is one mesh), and add a Boolean modifier. Then create another object. This will cut out of the original one as the Boolean will calculate the intersection between those two and remove it. Now all that's left to do is move the cutter to where you want it to be, and then hide it from visibility.


Can't orbit the center of the object after painting a single stroke 1."Orbit around selection" is checked.

2.Switching between another view resets the orbiting behaviour.

3.Tried in 2.81 and 2.82.

Please help!

That is what blender thinks it  is doing :)

in object mode it orbits around selected object (as object of your interest)
in edit mode it orbits around selected vertex
in paint, weight, vertex, sculpt it orbits arround place of painting (like a place of your interest)

So in this case, disable Orbit Around Selection if you want to paint arround Torus. So it starts orbit around view center.

To recenter point of view select object or vertex and hit Numpad . or go to 3Dview Editor > View > Frame Selected.

If you use this operator in paint mode in will "frame" last place you paint on.


Playing and stopping sound on in Blender game engine I'm setting up an audio book of sorts in BGE. I'm wanting to be able to click on a button to play a sound until the end, unless I click on a different button before the sound ends. If i click on the second button I want the first button to stop making it's sound.

If i set the sound actuator to Play Stop then i have to hold the button down to listen to it all. Then if I set the sound actuator to Play End and click on different buttons, then all the sounds play over each other.

I would prefer to be able to do this with just using the logic bricks, but do i have to use a python text to get it to do what i want?

It's simple: use properties.

When you click, you set the property "sound" to then respective number of sound. Then, you check the property value with "Property" sensors and play sound 1 if property = 1, play sound 2 if property = 2 and so on.

Here's a working example file:


Set origin to bottom center of multiple objects I have a lot of 3D objects of various sizes, shapes in blender 2.76b and I would like to set the origin to the bottom center of the objects bounds.

I cannot select the bottom edge and snap to cursor etc as each shapes edges are in different X/Y positions.

Is there a script or tool that will allow me to set the origin to the lowest edge z position?

Move the origin to bottom of all selected mesh objects.

EDIT updated for 2.8.  See prior revision for prior.

Object mode script. Moves origin to bottom of mesh, leaving object in place. Pass the matrix world to move origin to global z.

Looks at the 8 coords of objects bounding box.  The bounding box is
in local coordinates. To change space pass a matrix. eg the matrix
world of the object will determine lowest z in global space.
o is the bounding box center. Set o.z for new origin from min z of
bounding box points.
Transform all vertices by -o
Move the object back globally by o to keep the object in place.

import bpy
from mathutils import Matrix, Vector

def origin_to_bottom(ob, matrix=Matrix()):
    me = ob.data
    mw = ob.matrix_world
    local_verts = [matrix @ Vector(v[:]) for v in ob.bound_box]
    o = sum(local_verts, Vector()) / 8
    o.z = min(v.z for v in local_verts)
    o = matrix.inverted() @ o
    me.transform(Matrix.Translation(-o))

    mw.translation = mw @ o

for o in bpy.context.scene.objects:
    if o.type == 'MESH':
        origin_to_bottom(o)
        #origin_to_bottom(o, matrix=o.matrix_world) # global

With some numpy

The global version above drops in global z direction from bbox center of geom, which can lead to an origin outside the bounding box.

Instead here is a version that finds all z minima and sets the origin to their mean

from mathutils import Matrix, Vector
import numpy as np

def origin_to_bottom(ob, matrix=Matrix(), use_verts=False):
    me = ob.data
    mw = ob.matrix_world
    if use_verts:
        data = (v.co for v in me.vertices)
    else:
        data = (Vector(v) for v in ob.bound_box)

    coords = np.array([matrix @ v for v in data])
    z = coords.T[2]
    mins = np.take(coords, np.where(z == z.min())[0], axis=0)

    o = Vector(np.mean(mins, axis=0))
    o = matrix.inverted() @ o
    me.transform(Matrix.Translation(-o))

    mw.translation = mw @ o

This could be further enhanced by using methods outlined in this excellent Q / A

Replace matrix @ vector list comprehensions with something more efficient

Note: Remember objects can share a mesh. The test code above runs over all mesh objects in the scene without checking for this.

Related: Origins to the down of the object by default


How to bake Mantaflow simulation in version 2.83 I tried development versions before, and there I could use Object > Quick Effects > Quick Liquid and there'd be bake data / bake mesh buttons in the Physics Properties.

Now, it seems like the bake happens in the background, and I don't know how to re-bake the simulation after adding e.g. an effector.

You need to switch to Settings > Cache > Type > Modular:


Transparent Cube With illuminating Object I have a cube which is set up to be glass material, and another object with Emission Node, which is glowing. Once i place the object within the cube which has the emission, it's losing it's glow strength. Is there a method to get the cube to look more lit up from the object which is already acting like a glowing source?
Thank you.

The Emission from your "glass" is interfering, among other things. I've found one of the most practical ways to produce "glass" in eevee, is through the node setup below:


how to make light pass through a mesh? I see in real world some time light pass through our ears and nose,i wanted to know how to make light pass through a mesh in blender cycles?

You will want to use the sub surface scattering shader (SSS). or the faster and less accurate translucency shader.

Here is Suzanne with a SSS shader applied, and a very bright light behind her:

The small scale causes the light to spread less far within the object. I set the radius to 1.0,0.6,0.6 to give the light the red cast.


Strange shadow over my mesh I'm a beginner, I started learning blender a week ago, I followed a lot of tutorials on youtube on how to fix and prevent some common beginner problems, but I really don't know what's is going on on my mesh.

Since it is hard to explain I made a little video showing the problem on my mesh: http://sendvid.com/flt8t55s

I already checked for doubles, already recalculated normals.

If I apply a Subdivide Surface modifier all those strange shadows disappear and everything appear smooth, but from what I've learned so far, it is a bad thing to use Modifiers to fix some of the problem that shouldn't be there.

So I want to know what's could be the problem.

It appears to me that the normals should be recomputed. In Edit Mode select all vertices with "A" and recalculate the normals by Ctrl-N. In addition, you may use "Smooth" from the toolbar in Object Mode to "smooth" the object. But that depends on how it should appear in general.
The vertices appear to be slightly "shifted", such that this kind of artifacts can happen. For me, it's completely ok to use the subdivide modifier. This modified subdivides all faces and reduces the angles of each of the faces.


Can rtx graphics cards run cycles renders in realtime? Can Nvidia's realtime ray tracing feature be used to render with cycles in realtime?

Cycles is not a real-time renderer. It is possible to have very fast Cycles preview that could be called 'real-time' with high end graphics cards or/and extremely simple scenes, however if you need more than a couple of samples and more complex lighting with decent image resolution(that is basically every single case you would want to use Cycles for) you will not get close to 25 or 30 fully rendered frames per second. Cycles is not supposed to be real-time. It is not designed for that. RTX graphics cards can be used to render with Cycles, however at the moment no other technologies are used to do that as with any other graphics cards, so they are just a bit faster than older cards, that's all.


How to vary the thickness of a Bezier curve? I have made a bezier tube and I want some parts of it to be large and others to be small.

When I try to set the depth for one of its vertices, it just changes the depth for the whole object. Is there a way to change the depth for separate parts of the bezier curve?

Vertex Radius
You can scale the thickness of a curve at the selected vertices with AltS in edit mode.
Taper Objects
You can also use a Taper object:

The distance from the object origin (yellow dot) in the local Y direction controls the width of the main curve:


I'm having problem enabling Animation Nodes in blender 2.82 I dont know what to do. Im pretty sure you will get the idea what is wrong by seeing this picture. I'm new doing animation in blender so any help will be apprreciated...

I had a similar problem when I upgraded recently.

I suspect you need to reinstall the vc_redist.x64 which has some windows features that AN uses.

Check out this link on the AN github, third item titled "Import Error: DLL load failed"

https://github.com/JacquesLucke/animation_nodes/issues/1240

After I reinstalled vc_redist, I went through the AN install process again and it worked normally.

HTH


Should I append the armarture before binding it to the mesh? Should I append the armarture before binding it to the mesh?
I know you should append the mesh before binding but does that apply to the rig as well?

if you want to join armatures, do it before binding meshes to them (because many problems occur after joining armatures)
but if you want to have a mesh to be affected by multiple armatures and you don't want to join them just :

take care of names of bones to be unique in either armature
set an armature modifier for each of your armatures


how to repair multiple addons with the same name found? my add-ons file shows this error message but when I go to the Blender files
there is no corresponding file to the message,

" multiple addons with the same name found "

Please delete one of each pair

Make Clothes:

C\User\thund\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\makeclothes_init_.py

C:\User\thund\AppData\Roaming\Blender\2.79\scripts\addons\maketarget.py

when I go to these files there is no makeclothes or target file. I have also dumped the addon where it is no longer showing in the Addon list and even uninstalled Blender and reinstalled , and deleted my  Blender files before reload however I did not dump the user files in my docs but checked and these files are not there ether , but when I reloaded the add-ons I got the same message.

Check in the scripts/addons directory where the blender is installed.


How to get a Fresnel node to only affect one part of an object? Ie) The top of an object Just had a quick question.  In the image below, I am trying to get dust to show up at only the white parts of an image.  I am trying to get a PBR dust effect where when you look at it, at an angle, you can see the dust film better.  I know you do this with a fresnel node.  The trouble that I am running into is that there is fresnel on the whole object and where white is on the object, that's where dust is supposed to be.  I was able to access just the top parts of the model where dust should physically lie (second image below) but I can't figure out how to get the fresnel effect to work only on this top data.

The problem where I am getting fresnel everywhere:

The top facing values where I only want the fresnel to work on (I want it to work on the white values):

What're your guys' thoughts?

You are currently blending the fresnel and topside(normal) masks using a mixRGB node set to "mix". This gives you a blend of both masks. Sounds like what you're actually after is the area where both masks are non-zero, so the blending option you want is "multiply". You can either change the mode on the mixRGB node to "multiply", or replace it with a math node since these are float values (grey socket) rather than vectors/colors.


Adding bevels to a simple object messes up the mesh I am modeling a glass top desk, and seem to be stuck at adding a simple bevel to the top of a metal part for the desk.

In the screenshot below, the first two objects are the same, one in edit mode, and the other in object mode. The mesh on this one is very straight and smooth; it reflects the light like I would expect it to.

As soon as I add a simple bevel to the top edges, it screws up the mesh, as you can see in the third object.

I have tried a bunch of things, including trying to apply an edge loop cut, but have thus far been unsuccessful.

Any ideas?

Thanks to the help from @cgslav, pointing me in the right direction, and from this video: Blender Hard Surface Modeling : Are NGons Bad?, I was able to work out the steps to get the bevels I wanted without the messed up final result. Those steps are as follows:

First, add the bevel to the bottom four edges to convert those
angles to smooth curves.
Now you can add the finishing bevels to the straight edges:
Go into Object mode
Click Smooth in Tool shelf -> Tools -> Edit -> Shading
In Properties Editor -> Data -> Normals, select Auto Smooth
Go into Edit mode
Make sure select mode is set to Edge Select
Press A to deselect all edges
Menu Select -> Sharp edges
Properties -> Transform -> Edges Data
Set Mean Bevel Weight to 1.0
Set Mean Crease to 1.0
Press Ctrl-E, select Edge Data -> Mark Sharp
Press Ctrl-E, select Edge Data -> Mark Seam
Go into Object mode
In Properties Editor -> Modifiers, select Add Modifier -> Bevel
Under Limit Method, choose Weight
Increase number of segments to 4
Set Width to 0.1

Here is the final result:

As you see, the side surface is perfectly flat and straight now. I am very pleased with this, and hope it will help others who come across this same issue.


Applying numeric input attribute changes on multiple objects at the same time I have ten cubes selected. I would like to change their rotation using numeric input, using the edit boxes on the panel that opens when you press N. However, only one cube's parameter is changed.

Same is true for location, scale, location/rotation/scale lock, etc.

Why is the change by the numeric entry not being set on each selected objects? And how to achieve my intended result?

The Transform in the N panel only reflects the active object. If you want to set the  value to all selected objects, you can also try the following:

Select those objects;
Setting the value as you want;
Keep those objects selected, right click on the value input field, select "Copy to Selected".


Baking Normals Problem in Blender 2.8 I've tried many things to try and get this to work. (ALT+G, Recalculation outside and inside normals, using a cage, flipping the normals on both meshes, and changing the extrusion size) I still get artifacts.

Blend File

I think it renders on the mesh properly. but based off the actual image, I think something is not right.

Fixed! I had to disconnect the Image texture in the shader editor. I really don't know why this caused a problem...


How do use one channel from an image in a material? I have an image that is split up over the RGB channels. I only want to apply the data from the blue channel. I have made a material and a texture using nodes that separates the color but when I select the texture in the edit mode nothing happens.

I have managed to apply the image to the plane using the UV/ImageEditor but that applies all of the channels.

You already have the image UV mapped to your mesh, good.
For the cycles render engine:
First you will want to make an entirely new material. (the settings from BI could mess things up a bit)
You want your new material's nodes to look something like this.

The first two nodes are how the texture gets in to your material.
The selected (Separate RGB) node is where it all happens, it takes the color form your image, and splits it into the three channels (the three outputs R G B). So since you only are interested in the blue channel, just plug that output in to your shader.

For the blender internal:
The process is much the same, you have to use the nodes. Here is what just the BI's material nodes look like. (This is assuming you already have the proper material and texture set up.)

Still just the Separate RGB node, and you are choosing what channel you want to use in the output.


When you hard-cut in the VSE, does the current frame end up on the left or right side of the cut? I am going insane trying to eliminate a single frame from a strip.

The procedure I am attempting to use is:

Say for example I want to eliminate frame 10.
Position the green bar so that frame 11 shows in the preview.
Shift+K.
On the left-hand-side of the hard cut, position the green bar so that frame 10 shows in the preview.
Shift+K.
Delete the middle clip.
G-move the right clip to fill the gap.

This is not working. It keeps eliminating the wrong frame. I assume I am making some kind of off-by-one error but I can't figure out what it is.

I have here 15 frames, each one with a number on it.

When I followed what you did, frame #10 got cut into it's own strip, which can be deleted:

This are the surrounding frames:

I don't know what you are doing wrong, because it works for me.

What this means is that the frame moves to the right of the cut.

Based on this, what you should do is:

Move to the frame you want to cut.
Enter Shift + K
Move 1 frame to the right
Enter Shift + K again
Select the middle frame and delete it.
Select the next strip and move it 1 frame to the left.


Pose mode and GRS all give me a scale cursor that doesn't do any thing I'm currently following a tutorial to rig a character.

All goes well until I go to Pose Mode to see if my rig moves (I can do that before or after doing the automatic weight things, it changes nothing).

What happens is most strange: I select a bone and press G. The usual box with the colour arrows appear, I try to grab and move one of them and it turns into a >< like that.

So far I've only seen that whilst scaling in edit mode and it does nothing, same with rotating.
I verified I do not have any lock on location or rotation for the chosen bone or it's neighbours. I also dont have the ctrl + . or snap to center turned on, I checked all I could in the manual and here and found nothing.
I've spent the afternoon on this and it's driving me nuts.
I haven't found anywhere on the net anyone who talked about a dead scale >< cursor dragging and replacing the wheel and grab and scale box.

I am following the free rig the biker tutorial on Digital Tutors and so far so good, I checked everything. I'm nearing nervous breakdown.

Judging from your second screenshot, I'd suppose you've got Manipulate Center Points activated. While this is useful on multiple selected objects or bones, when bones are not connected, it leads to the behavior you describe in your Question. See the GIF below on how to deactivate this feature:

The purpose of this feature is to Translate objects by using Rotate or Scale functions. In your case, as the bone is already a child of another bone, Translation channels are automatically locked already. That's why nothing happens.


Copy a mesh at the location of each vertex of another mesh or curve I have a mesh (e.g. a fish). I would like to duplicate this mesh at the location of every vertices of another mesh.

In my example, this means that I would like the fish to be duplicated at the location of each vertex of a mesh. I would then edit this mesh to easily control the location of all fishes.

I looked at modifiers (and in particular Array), but couldn't find it. I wonder if this could be achieve using particles. Maybe a dupli-group? (I haven't tried this last one)

In order to copy a mesh (A) on the vertex location of another mesh (B), you have to select B, click on context object , select instancing and click verts. Then click A first and shift click B and press Ctrl + P to parent, a menu should pop out and pres object. Now the object A is copied on the vertices of object B. The copied ojects will be oriented on the B's vertices normals.


Blender won't correctly load the texture file (png image) in my custom startup file. Why? In my project I have an "Images as Planes" object. I click on the "Save Startup File" option to ensure my project and its layout loads upon starting Blender. It seems to work as expected except the displayed image is pink instead. I've read that pink means texture files are missing but it seems to remember what files to read and I have not moved the image file. Here is what my startup should look like:

This is what my startup looks like:

If I load it from my saved .blend file it works as I intended.
Unfortunately I'm not finding much helpful information through search engines about textures not loading at startup, nor do I wish to spend a couple hours changing random things to see if the result changes (as I do sometimes). I figured it's time to ask here. How do I make it so the texture loads correctly at startup?

Thanks you Jachym Michal for your comment, you helped me solve this.
To solve my problem I:

Loaded the .blend file that has what I want to load at startup.
File -> External Data -> Pack All Into .blend

Upon opening Blender it now displays my image correctly. :)


Modeling eyes for a manifold and continuous game asset? I am making a character for a game in Unity. It is supposed to be animated and textured later and I want to follow best practice in the creation process. I don't know which way to make the eyes of the character. I started with knife projection, but figured this would create ngons. Then I've seen people just making spheres inside the mesh like this:

But wouldn't this make the mesh either non-manifold (holes between eyeballs and socket) or intersect (also they eyeball and edges of socket)? Isn't that bad if you want to follow best practice? What options are there? What is the preferred way?

Is making the eyesockets manifold and then placing an eyeball inside that carving an option (hard to make it blend with rest of the face though)?

It won't be non-manifold ; a manifold mesh can have holes.

It will intersect, unless you make sure the socket contour is perfectly adjusted to the eyeball (you can use surface snap, or maybe a shrinkwrap modifier). Intersect isn't really an issue in the vast majority of real time engine ; in fact, it's often used to save up polys.

An other technique is to model only the visible part of the eye (make the eye a bump in the face, like a statue or a sculpture) ; and use a shader trick to move the pupil. You can find many eyes shaders in the asset store.


Random distribution of objects over a plane I'm making a game which involves the player walking around a forest, and so I need to randomly distribute trees from the sapling tree generator all over it. The plane is huge so I can't simply place them manually.
It would also be ideal to change the seed of the tree for each tree created. I'm familiar with python so a script would be acceptable.
Thanks!

I'd recommend the Asset Sketcher commercial addon on CG Cookie Market. Perhaps you can modify it to randomize the Sapling seed value.


Naming issue with many linked duplicates of groups I have a robot model that consists of several objects and I want a scene with many robots in different positions. My current approach is to group all of the objects of the robot and then make a linked duplicate of that group. Every time I do that, however, each part of the robot (left arm, right leg, etc.) gets duplicated with a unique name ( left arm 001, right leg 001, etc.). I don't want each object to have a unique name, I just want each robot group to have a unique name. Can I make folders or use parenting so that my Outliner isn't flooded with duplicates? Any suggestions?

Use a parent empty (or parent armature) for the robot.  If a robot has a parent  then its children display can be collapsed in outline view thus reducing clutter.  When you duplicate include the parent empty to maintain this feature. All robots will then have collapsible view from parent.  As you duplicate an original group ... remove the duplicate from all groups and create a new group for it.  Thus each robot will be in a single new group including parent.

Parents in the outliner and ... Groups in the group view of the outliner have a collapsible interface ... like folder views in OS UIs.

Once this is done your concern about object names may lessen.  It may not be possible to have duplicate object names in Blender.

Perhaps consider Linking the robot from a different file and using group instancing .  Particles and Dupligroups may help.


How do I create a material that emits light based on how much light hits it? I was wondering if anyone has an idea how I would make a material that emits light based on how much light hits it from a spot lamp in the scene? Using cycles render engine.

Best,
Brad

This is how every material works:

Light hits material
Light might get absorbed by material (some wavelengs) and turned into heat
The rest of the light is reflected into different dirrections (it is diffused, reflected, refracted, bounces inside volume, etc.)

So the answer is easy, if you need to double the light that comes off the surface, you just add 2 shaders together (with add shader). This will break the energy conservation, but that is what you want.

If you need to emit the light in all directions, add white diffuse shader to your material.
If you need to emit the light directionally (as if bounced off of mirror), add white sharp glossy to whatever material you have. You can alter the sharpness of the light with rougness and also direction by manipulating the surface normals.

It is very possible that you can get some strange results.


How can i feed the output of the Dynamic Paint into the input of the Wireframe Node? How can i feed the output of the Dynamic Paint into the input of the Wireframe Node (or any other Node)? So that the red areas show a bigger wireframe effect than the the blue areas.

The effect should look like this: https://twitter.com/MitsuruMan/status/822067706308366338

Thanks for the help! :)

To get direct node access to the output of the Dynamic Paint you need to use the Paint Surface Type in the Dynamic Paint Advanced properties (in your example you appear to be using Weight). For 'Paint' surfaces the Dynamic Paint Output can be set to output to a Color Map Paintmap layer and this can then be accessed in the material nodes via an Attribute node set to the name of your Color Map.

For the Canvas object (the one receiving the paint), enable Dynamic Paint, select as Canvas and Add Canvas. Ensure the Surface Type is 'Paint' and in Dynamic Paint Output click the '+' button alongside the Wetmap layer to create the Color Map (wetmap allows 'drying'). To have the paint 'fade' when not near the 'brush', enable Dry. This will fade out the paint effect as if drying, until it returns to the original color.

Note : Since the canvas is outputting to Vertex Colors, ensure your canvas mesh is suitably sub-divided.

For the Brush, enable Dynamic Paint and Add Brush and set the Paint Source to Mesh Volume and Proximity to allow it to affect nearby surfaces.

In your material, add an Attribute node and set it to the name of your Color Map as specified in the canvas Paintmap layer ('dp_wetmap' if you haven't changed it from the default). This can be used to affect the size of the Wireframe as shown :

This can produce the following results :

Blend file attached


Discrepancy between the viewport render and actual render from the render engine.(Grease Pencil) There appears to be a discrepancy between what one sees in render viewport and the rendered image. This issue is not specific to me. A fellow blender artist posted similar issue.
It seems that the strokes that are added "afterwards" like colouring to fill gaps left by previous work- are not rendered by the engine as image.
Below is the Screenshot of the viewport:

Below is the image rendered by the engine:

I am going to answer my own question in case someone is facing a similar issue:
In my case, there was a plane behind that grease pencil object that was intersecting the drawing while being rendered. Since it was hidden in the viewport but it was being selected for the render.
To see what objects are being rendered:
Go to outliner->Select filter->click on the camera icon
Then you will be able to select the specific objects you want to render from the outliner.


Opencl is not working on the Radeon HD 7750/8740 / R7 250E In "Cycle Compute Divece" appears "none". It's as if I did not have a video card.
I have a board [AMD / ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E]
It is listed as having Opencl support.
This happens with both Linux (Ubuntu) and Windos (Windows 10).
Is there a solution?

Your GPU is GCN 1st gen. That's why it's not supported.
Cegaton pointed out in a comment Can't use Radeon GPU to render in cycles (R9 270)
Which is where I figured that out from this list here https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units

EDIT: Originally I claimed and cited that Nvidia's Cuda core programming has higher support and faster speeds. However, Cegaton pointed out in the comments that as of Blender Version 2.79 OpenCL has made significant improvements. While OpenCL still is undergoing active development it appears to beat NVidia in the benchmarks, at least in tests comparing a midrange ~$200 graphics cards


Is it possible/how to separate several "objects" imported from an stl file? I've imported some a model from an stl file. There are several "objects" (spatially separated), but Blender considers them as one object (due to the algorith of importing, I guess). Is there a simple way to separate those "objects" so that they become actually multiple Blender objects?

Select the object, enter edit mode with Tab key, select all with A and press P to separate, then choose whatever option suits your needs best. I am guessing you will probably want the loose parts one.


Duplicate displaced plane and have edges line up? I have a displaced plane (shown in image 1,) which I'd like to duplicate and move next to itself to expand it into 2 tiles. However, when I do that, the edges don't line up and I can't get the individual tiles to generate new bumps while also lining up properly with the last. How might I fix this? Thank you! :)

You can try duplicating the plane and then scaling it by minus 1 along whichever axis you moved it on. That way, you basically mirror the plane so the edges line up. A better way however, would probably be to just use a seamless displacement map.


recover faces from old model I have some Blender model assets associated with a Unity book I am working through (Unity Android Game Development by Example Beginner's Guide from Packt).  The book came out in 2013 and the assets were presumably made with an older version of Blender (I have the latest, 2.75a).  Every face in the model seems to have gone missing.  All of the vertices are there and the models appear as wireframes that are recognizable, but there is nothing that is renderable and you can't export the models to an FBX as the result is an empty file.

I'm trying to save the TankBattleCity model and I discovered that if I create a face out of four vertices, such as on the obelisk in the fountain, it will suddenly have a 'tangible' surface.  There are probably over 1000 faces to make so that is really a non-starter.

Is the face data still in the original file but just not being read in by the latest Blender?  Is there a way to retrieve that data?  Is there a faster way to create the new faces?

I've attached a screen shot on my work on the fountain.  This is in 3D view with Solid enabled.

Edited to add that I am very new to Blender.  I have had some training in Max and Maya, but Blender seems/feels very different (and I haven't really used Maya in about a year so I'm pretty rough at this anyway...).

Here's the original blend file:

I've used the trick in the comments to go through each object in the scene, but I have a lot of blend files for this book so it would be good to know if there's a way to recover the faces  more efficiently as I am likely to encounter this problem repeatedly.

Edit:It also looks like most of the normals are wrong, even on my new faces.  Flipping the direction seems to work, but there are about 100 faces in this particular model so, again, not very effiecient.

Edit: I installed Blender 2.69 and it mostly works with the old model.  There still seems to be a couple of faces that aren't showing but it looks about 95% correct straight from load.  Thanks to user Todd for suggesting it.  It was released in October of the year the book came out which was December (2013).  I don't think I can mark a comment as the answer.

I downloaded your file and all the faces are there. My Blender is 2.75, try updating yours :)

But if you still have the problem after updating your Blender, try selecting all the edges and vertices and press space and search for "Fill Holes" and select. This should fix it :)


object instancer animation nodes only work on a clean new blend file? i don't know if Jacques Lucke is here on blenderstack for help but
it seems that i can't make the object instancer node work on top the work i'm currently doing
in the picture below, i set the instance of the object to 3, i know (from my observation) that without any other nodes involved the object instances will pop right at the center location of the world, in this case where my object is at. but all i select when i try to place the instances around is the object alone, no other instances.

i tried the same with a new blend file

no problems
there must be a setting to set here but i just dont know :(

The instanced objects are in the same layer as the source, but not in the same scene! each node tree has a scene attached to it (you see which one in the left toolbar). also you can use a "Create Scene List" node to tell the Instancer node which scenes the instances should be in.


How can I average out a certain range of keyframes? For my Blender rig, I have a bunch of parts that are animated. I want to average out the keyframes so each keyframe is at an equal distance from the other. So for instance I have 15 animated keyframes, I want each animated keyframe to be far from each other by say 5 keyframes.

Is this doable?

Go to dope sheet

Click on the first key frame so that the cusroser is set to that
place

select the keyframes that needs to be evenly space out, can use "B"
to drag select area or any other selection

Press "S" to scale

and input number "5" if you wish to evenly space out all
keys with interval of 5 frames


Edit Beard And Eyebrows Along Face I'm trying to rig the face of my character. I have eyebrows, beard and face and they are different objects and beard and eyebrows has hair particle system. And now i want to make shape keys of face but I can only edit face at a time.

Merging beard and eyebrows make particle system disappear, so is there any way of rigging these all at once **so that if I move lips the beard moves along with lips and they also remain individual different objects.

**

In blender 2.80 you can edit several objects at a time.  When using shape keys, you will have to add a shape key to both objects, enter edit mode with both objects selected, and edit the shape key.  you can then assign the driver of your bone to both shape keys.

I hope this helps, please comment if you didn't understand something.


How can I change the angle of an edge loop? How can I change the angle of an object like at 19:44 of https://youtu.be/mu9J0D6ebVw?t=1167 when he adds wingtips?

I think you mean Shear? Shift+Ctrl+Alt+S with selected vertices, then drag the mouse cursor around to effect the amount.

But I think he uses a simple Rotate (R), with the pivot point set to Median Point, then move the mouse to adjust the rotation amount.


Making a Speedometer I have been trying to make a speedometer for a racing game I'm making, but all the methods of making a speedometer I know of don't work on the vehicle wrapper for some reason. It may be that there are either too little solutions to this problem posted to the internet or I'm terrible at coding in Python.

Here are some of the resources I've tried to use in several attempts.

Number one

Number 2

Number 3

Thanks to anyone who helps.

How to measure speed

Speed by build-in Physics

When you let the build-in Physics engine calculate the motion of your game object (dynamic, rigid body etc.) you can directly ask the game object.

The object will provide you the current linear velocity (there is an angular velocity too). The linear velocity is a vector that tells you the direction and the speed the object traveled since the last frame. The speed is the length of the vector (speed can never become negative!).

import bge

object = bge.logic.getCurrentController().owner
velocity = object.getLinearVelocity()
speed = velocity.length

Speed by positional change

In some situations you can't or do not want to use the build-in physics engine. In that case you can "manually" calculate the speed from positional changes.

This method assumes the object traveled from the location of the last frame to the current location with constant speed on a direct line. Typically this is a pretty save assumption (but it does not consider if the object really moved or teleported such as static objects do).

Here we use the school math:

speed = distance (last position, current position) / time

We need to record the current position, to be used within the formula of he next frame, while we use the recorded position of the last frame. The time is the reciprocity of the frame rate (typically 60):

time = 1/frame rate

This means you can calculate the speed this way:

import bge

object = bge.logic.getCurrentController().owner
lastPosition = object.get("lastPosition", object.worldPosition)
object["lastPosition"] = object.worldPosition.copy()

step = object.worldPosition - lastPosition
speed = step * bge.logic.getLogicTicRate()

What to do with the speed?

Just now the speed is in a local variable and will get lost as soon as you leave local space.

From here you can place it in a property:

object["speed"] = speed

to be used within other Logic Bricks (including other Python code).

or you send it in a message:

bge.logic.sendMessage("speed changed", str(speed))

You can do that even with a message actuator:

messageActuator.body = str(speed)
controller.activate(messageActuator)

or any other logic brick.

How to get the speed for displaying?

Dependent what you did with the value, you can retrieve it an use it e.g. in a Text Object:

for body in messageSensor.bodies:
    textObject.text = body

or as property to play an action:
    for body in messageSensor.bodies:
        actionPlayer["frame"] = float(body)

....
There are really many options.

The message method is described in detail in the BGE Guide to Messages


Follow up of normal mapping problem in GLSL As a follow up to Problem with normal map display in glsl texture paint mode I have attempted to analyze my model further. Please see attached images demonstrating inconsistency between 2 objects in a scene when viewed with glsl shading. Both objects have the same material applied, both are uv unwrapped with no textures applied. There is one sun lamp in the scene. As far as I can tell the only difference between the two objects is that the leg object (appended from another .blend) shows that it has a cycles property and that it does not display properly in glsl. I assume something is preventing this object from displaying properly in this scene and ultimately preventing it from displaying a normal map properly in glsl as well. Any suggestions are greatly appreciated.

After much file dissection I found the simple answer to my problem. The draw settings in the object properties for the leg model was set to solid and not texture, thereby preventing the object from displaying properly in texture viewport mode needed for glsl. Frustrating how these little innocent settings can foul things up. Thanks to the community for attempting to resolve my problem.


Translate Z Location of object for every frame? I am brand new to Blender and 3D modeling in general so please bear with me if I use incorrect jargon and terminology.

I got help from a friend making a video in Blender, but as I got further into the project I noticed the camera is to close on every frame. Sadly my friend went on vacation and is unavailable for a while so I have no source for help. To clarify I am looking for a way to change the Z location for every frame at the same time instead of going through and dragging the blue arrow frame by frame.

Any help is appreciated as I am going through multiple websites and only finding words and terms that don't make sense to me.

This is what I see on my screen, hoping it helps

There are a few ways to do this, but essentially you want to parent a camera to the path of the old camera. The easiest way to do this is to:

duplicate the camera SHIFT+D
remove the keyframes on the second camera
parent the second camera to the first camera CTRL+P
change the Transform widget orientation to Local
move the second camera back on the local Z axis
it will still move and pivot with the original camera's orientation.
Select the second Camera and click Set Active Object as Camera CTRL+NUMPAD 0
you can also optionally hide the first camera via the outliner if you find it distracting


Why all my numpad don't work? It supposes when I press 1,3,7 the view will change automatically to top, side or bottom, but somehow it doesn't work. And then I find non of my numpad work. I'm using 2.8 by the way.

The number pad hot keys still work in 2.8. Have you remembered to re-apply emulate numpad in system preferences, because it is a new version of blender so the settings will be set to default (I made that mistake myself :) Also you can use the button next to the 1 to switch through lots of different views in 2.8. I think that may have been mentioned in the above answers. Hope I could have been of some help!


How can i import blender 3d model in after effect How can I import a Blender 3d model in After Effects? Is there any work process or plugin that can help me to import a Blender model similar to Cinema 4D lite model?

Thanks,
Simranjit Singh

No, Currently You Can't (According to me)
Currently There is No Live Link Between After Effects and Blender to Directly Import 3d Model in After Effects But You can Export Tracking Data or Other Data from After Effects to Blender and Vice Versa Using Python Scripts
or You Can Just Import a 3D Model in After Effects Using "Element 3d Plugin For After Effects" But That Needs GPU "Element 3d" Will Not Run On CPU.


A lot of small pixels after rendering Explain me please why do i have these very very small points (like pixels) after rendering. Is it connected with lightning and how to fix it?

Those are called fireflies and are caused by not enough samples.

I will refer you to the manual:

https://docs.blender.org/manual/en/dev/render/cycles/optimizations/reducing_noise.html

  To understand where noise can come from, take for example this scene.
  When we trace a light ray into the specified location, this is what
  the diffuse shader “sees”. To find the light that is reflected from
  this surface, we need to find the average color from all these pixels.
  Note the glossy highlight on the sphere, and the bright spot the lamp
  casts on the nearby wall. These hotspots are 100x brighter than other
  parts of the image and will contribute significantly to the lighting
  of this pixel...


Cut a sized rectangular window into a dome I need a 'window' of a specific size cut into a UV hemisphere; the edges are spec'ed as parallel lengths of arc of given length (See below).

After some tinkering with shrinkwrap and one or two other brilliant but flawed ideas, I gave up and spent a little time constructing the hole as follows:
In edit mode, I used the MeasureIt plugin to get the correct arc lengths over two loops at right-angles, then created edges by joining manually placed vertices, before highlighting faces and deleting – this was easier than finding the lengths of chords and then using a knife project, as I didn't have to switch my brain on.

Sure it works, I'm just thinking there has to be a better way.

Any ideas for a more efficient method please, anybody?

Here's why a boolean mod isn't going to satisfy easily:
The arc AB is a greater distance than the chord AB and we have to provide a set length of arc. Perhaps it IS easier to get the chord/arc calculator out?

to be safe, I would do it with the actual math: trigonometry.

I woun't bore you with the details, but the arc lenght gives you the angle, so:

calculate the "h" value with the formula you see in the picture ("L" is the lenght of the arc, "D" is the diameter of the sphere)
create a cube and make it half its size (press S and type "0.5"), so that it is 1 unit wide
merge two vertices in the top face with the vertices under them to create a triangular prism

select the other 2 vertices in the top face and press G, Z and type "-1" to bring them on the bottom face
without deselecting them, press G, Z and type the value of "h" you calculated before: this way you triangle has the same angle of the desired arc
place your triangle so that is has the acute vertex in the center of the sphere and scale it up until the vertical face is all outside the sphere

scale the triangle on the Y axis (in my case) to change the window's width, and rotate the triangle on the Y or z axis to adjust its position
on the sphere, create a Boolean Modifier, set the triangle as Target and the Overlap Threshold to 0 (you might want to add a Solidify Modifier too)

NOTE:

this solution works if the window's width is small: in that case the angular error is negligeable. If the window is large, from the Top view you'll need to rotate a lateral side of the horizontal degrees you need, keeping the anchor point in the center of the sphere

POSSIBLE VARIANT:

instead of moving arounf the vertices of the top face, you could also bring them at the bottom (press G, Z and type "-1"), then rotate the whole top face arounf the center of the sphere of the angle that you can calculate as 2*L/D


Gradient texture not showing up in rendered view I am making a logo for a friend and I want the text to have a gradient. The gradient shows up in the node editor and the material view, but not in the rendered view. What am I doing wrong?

Shaders

A shader is the function that describes the lighting interaction at the surface or of the volume. That is different from the color of the surface itself.

A red carpet's surface is still of the same shade of red even in a dark room, we just perceive it dark because there is no light around.

At the moment you are defining only the "color property" (yellow socket) of the surface, but not how this property should interact with light. You shoud use one of the nodes you can find under the "shaders" menu. It will acquire the color data as input and output a shading data (green socket) that should be connected to the Surface's socket of the MAterial output.


Mesh displayed as dots I've imported a file and it seems corrupted, it in not due to Blender.
But I wonder if this "corrupted" mesh is still usable or not?
Originally, it was a haircut.

When I switch to edit mode, nothing is shown and I cant use "make edge/face".
It says "more vertices are needed".

here is the file: http://www.mediafire.com/download/5sk6acagdbu7ea0/untitled.zip

EDIT: In fact,  the problem can't be solved in Blender itself, as the tool used to import/export the .m2 file will mess up the result in-game, even if it looks ok in Blender.

You are in edge select mode, this is why you can not select single vertices:

Click the leftmost of the marked buttons, then you can select vertices again.


is there a better way to smooth/flatten specific areas of a mesh than the tools or modifiers? i have a model that im working on which has very detailed boots on the issue ive run into is i need the treads in the center of the boots to be completely flat without flattening out the arch between the heel and front of the foot or without flattening the outer treads however none of the smoothing tools or modifiers seem to work for the purpose or at all in general, if i use the default settings the smoothing has no effect if i go even slightly higher the entire area is warped or imploded upon itself.

I have actually gone and removed the treads by hand and added faces where they were but even that still needs some refinement but again smooth still doesn't work and i don't know of another way to quickly and accurately flatten/smooth the area i need but the modifiers and tools have little to no effect in general and with specific areas it messes them up as stated above.

You might try selecting the faces you want perfectly flat and scale them to zero in the z direction (assuming you want the flat aligned with the x-y plane). You can use proportional editing mode to get surrounding faces to transition toward the flat area.


How to remove modifier contribution from Stress map? I have a Displace modifier on my mesh which is placed after an Armature in the stack. Is there a way for Stress map to be affected only by second modifier?

Edit: Thinking there is no such way, if only I could automatically re-load my scene and apply Armature modifier for every frame, so Blender will treat mesh as original undeformed.

Some tests show, that exporting mesh animation (Armature only) as Alembic .abc can be a workaround. Because when it is imported via Mesh Sequence Cache modifier, Blender starts thinking that my mesh is always represents its basic form, even though it is visually transforming as by usual Armature.

Disable rendering of modifiers (camera and eye pictograms), that you do not want to contribute deformation to the exported object. Basically, .abc cache will replace your existing deformation by Armature
File->Export->Alembic (.abc) and then choose necessary options on the left
Add Mesh Sequence Cache modifier and load exported cache, then choose object path at the bottom of modifier menu
Put up Mesh Sequence Cache modifier in the stack, so it would take place right after all unwanted deformation. Disable all modifiers before Mesh Sequence Cache and enable those, which are after (see pic)

Work is done, now Blender define deformation only made by Displace.

If you want to edit your basic animation, you can enable Armature, disable Mesh Sequence Cache and simply re-export new cache. That is why I don't recommend to delete modifiers before Mesh Sequence Cache


How to select vertices which are overlapping? I got some Vertices Overlapping, after using "Srew" function (:D)

How can i select the vertice, which is beyond the other? Look at the cursor there are 2 Vertices overlapping but i need to select the one beyond the vertice which is in the front

You need to enter wire frame mode Z or turn of limit selection to visible:

 When in one of these two modes, you simple select the vertex, if you got the wrong one, select again, without doing anything.


Image-based plane light eliminates mesh light Edit: blender scene:

I have a simple scene with a lantern in it, the latern's bulb is a mesh with an emission shader.
I of course light it from other angles as well, like from the side where I use a plane with an emission shader whose color is dictated by an image texture (so an image based light).

My problem is, no matter how weak the image based light is, even if it's so weak it's unnoticable in the scene, the effects of the mesh light basically eliminate. But as soon as I turn off the image based light, the mesh light wakes up again. This does not happen with light lights (e.g. area, spot etc) but those don't look the way I want them to look.
Some proof:

though noisy, you see here that the lightPlane1.001 is active, but strength is 0.1. It's a blue-ish image, unnoticable in the scene. But even still, the mesh light is like secondary reflection only. On the contrary, when I turn off the image based light:

You see that the mesh light immediately kicked in.
They do not share the same material (though it wouldn't explain this either).

I'm using Cycles and I'm wtf-ed. Could someone help me?
I'm not using any fancy group settings, everything is on the same layer.

EDIT:
the node setups:

Edit again:

thick glass or no glass, the problem persists.

Got it in the meantime. The solution was to turn off multiple importance sampling for the image based (mesh) light. The reason I didn't realize the render was noisy, not "not showing" is the use of CPU for preview (bc GPU incompatibility). Anyone having a slow or unsupported rig should consider waiting for some result.


How to create Quarter Cylinder I am new to blender and couldn't find how I could make a quarter cylinder. I first tried starting with a cube and subdividing two sides. But this subdivided the two sides into two directions, not just one. Then I tried starting with a cylinder and deleting the 3/4 the vertices which did not result in something useful either. What is the standard way to go?

Although there are many ways to do so, you CAN create a quarter cylinder from a cube:

Select the cube object, Go to Edit mode;
Ctrl + B to bevel the selected edge, roll the mouse wheel to adjust segements;
A + A to select all vertices, then W -> Remove Doubles.

Tip:

To ensure the maximum bevel extent on that edge, you can consider either one of the following ways:

After pressing Ctrl + B, you can see the available operations on the 3D View header (with shortcuts). So, you can then press M three times to switch bevel mode to Percent, then type 100 for a maximum Offset percent.

You can also do it after confirming the bevel operation, from either the lowerleft of the Tooblar (T) or a seperate popup menu(F6):


Spin duplicate gives parts - how to spin a complex part of a pipe? I wanted to get the stretching and pulling out of the mesh with using the spin tool.

The curve tool got used first but the stretching in highly bended areas was way to much.
With spinning it seems to only spin the selected loop.
Toggling the duplicate mode on in the spin mode, it doesn´t close the gaps between the parts.
how can this get fixed?

The Bezier curve seems to ease the stretching but the optimal wished result in this case would be if there was a setting available to say that some parts of the mesh are stretchable and others are not.

Method 1:

Build the unstretch parts first, then bridge the loops among them:

.

Demo file for Method 1 is here.

PROS: Can well satisfy what you need in this particular case.

CONS: Quite a bit basic knowledge on blender is needed.

Method 2

Model stretching and unstretching units separately, then bend them individually with the same curve:

Demo file for Method 2 is here.

PROS: Relatively easy to accomplish.

CONS: Unavoidable intersections in final mesh.


Why is it when I render I Get a blank grey screen I've been having this problem, and I don't know why. ill just give some context. I had imported this model from SketchUp, along with the camera view from there. It was working fine, until I decided to delete the SketchUp cam, and decided to add a new one. I've been having problems since I added the new cam. The model is just fine, and so are the materials, When I put the viewport shading into any mode the model looks fine, however when I decide to render all I get is a grey screen when it finishes rendering. I'm using the cycles render engine. I have read all of the other forums that are similar to mine. I have checked that its not an issue of clipping, or depth of field, or that it is a material problem. I just seem to be stuck. Would be great if someone can shed some light on what I'm doing wrong
Many thanks in advance

The new camera you added may somehow be set as an inactive camera. This is the case if the triangle over the camera is an outline and not solid. Select the camera, go to the view menu, go to cameras, and click “set active object as camera.“


3D view with a touchscreen in Windows 10 (Surface pro 4), how to zoom, rotate, pan I have a MacBook pro, and I can use the touchpad for:

pinch with 2 fingers -> zoom in and out
move two fingers up, down, left or right -> rotate around the object
Shift + two fingers movements -> pan left right up down.

Now I purchased a surface pro 4, and blender windows version seems to not have the same default way to move the camera. The touch screen acts like a simple mousewheel but only do pan view when pinching screen, it can't zoom or rotate.

Is there a way to configure Blender to do so? but I mean, with the internal code, same as the Mac Blender version, not configuring windows gestures or key bindings on blender preferences.

At the moment the surfacepro needs it's key board for functionality:

Alt pen/touch to orbit
ShiftAlt pen/touch to translate
CtrlAlt pen/touch to zoom

Note: I have Emulate 3 Button mouse enabled.

Touch functionality is something that will be worked on in the [Google Summer of Code][1].

Scroll down to Trackpads, smooth scrolling, and multitouch support

"Benefits: Blender should get cross-platform support for modern input devices. Linux and Windows (Surface Pro) are falling behind."

"[1]: https://wiki.blender.org/index.php/Dev:Ref/GoogleSummerOfCode/2017/Ideas


How to loop through 100 files to do solidify through script? I am new to Blender and I basically need it to help me with just one thing - load and solidify my STL surface mesh to one with 3% thickness. I have learnt how to do it manually. However, I need to apply this on 100 files, and I may need to use other thickness later on.

I tried to play around with the record script add on but can't get it to do what I want. I'm also not familiar with Blender's interface and so it makes thing more difficult. Can someone help? My files has names body_out1.stl to body_out100.stl. I don't know python but I do programming in Fortran though. Thanks!

This should do the trick:

import bpy
import glob
import os

def process(stl_fname):
    print('Processing %r' % stl_fname)

    # Determine output filename.
    out_fname = stl_fname.replace('.stl', '-solid.stl')
    if out_fname == stl_fname:
        raise ValueError('stl_fname should end in .stl')

    # Perform the processing.
    bpy.ops.import_mesh.stl(filepath=stl_fname)
    bpy.ops.object.modifier_add(type='SOLIDIFY')
    bpy.context.object.modifiers["Solidify"].thickness = 0.03
    print('Writing to %r' % out_fname)
    bpy.ops.export_mesh.stl(filepath=out_fname)
    bpy.ops.object.delete()

# Start with nothing in the scene
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()

# Process *.stl
here = bpy.path.abspath('//')
for stl_fname in glob.glob(os.path.join(here, '*.stl')):
    if '-solid.stl' in stl_fname:
        print('Skipping %r' % stl_fname)
        continue

    process(stl_fname)

The code processes all STL files that are in the same directory as the blend file it is run from.


When modeling, is there a way to have light shine from behind viewport camera? I'm modeling a simple environment and trying to get some sense of what it looks like with textures early on.  Whenever I switch the viewport to either texture or material mode, though, only the meshes that are lit by lights are visible.  This is slowing down my workflow because I have to keep stopping to add more lights to the scene to see what's happening.  All the lights are also cluttering things up and have to be repositioned every time I move meshes around.

(I've also found the Multitexture/Shadless option in the 'n' menu, but that turns off all lighting information.)

Maya has a nice feature where you can switch from viewing the scene with the placed lights to having the scene lit from a single point light positioned behind the viewport camera.  This lets you get a good sense of what things look like with textures and shading without having to place lights through your entire scene.  Does Blender have a similar feature?

You can put the scene lights on a separate layer, turn them of during viewport editing, and then parent a new lamp to the back of the camera. You can turn off the restrict rendering setting for the test lamp in the outliner.

This works in Blender Internal, but not in Cycles. You could test texture placment in BI, and then render from Cycles. It's possible to create shaders that work cross-engine, you just have to add the specific outputs. The BSDF nodes wouldn't work in BI, but the textures would.


Exporting the cube with 6 faces (obj) I am a beginner with blender 3d and have a probably easy question.

I try to export the cube with 6 sides as a (obj) so I can import it into sweet home 3d, in SH3D I want to give each face a different color or texture ?

How can I do that ?

I found the solution,

Go to Edit mode -> Create 6 new colors -> Go to Edge - Split edge -> Deselect all (a) -> Select 1 face and give him 1 of the new Colors, repeat this for

each face.
Then -> File - Export - OBJ

Go to SH3D and import Furniture -> Import the cubes -> Customize furniture, now you can individually color each of the 6 faces.


How to have an object follow the surface of another object? I have a bunch of planes as one object I'm using to create a crowd of people on a hilly terrain. I'm looking for a way to snap all the "people" to the curvature of the terrain, without have to grab each one individually and raise or lower it.

I tried the shrinkwrap modifier, but it flattens them out, rather than keeping them upright. Is there a modifier for something like this? Something like a surface deform modifier. Thanks!

You can use a Particle System. Use your terrain as the emitter and the people as either an Object or a Group (Set their Origin to the bottom).

Set the Start and End time to 1.

Under Velocity change "Normal" to zero.

Choose either Object or Group (You'll need to separate your planes in Edit Mode press "P" and select Loose Parts). "Object" would be choosing one plane/person as the particle. With "Group" you could choose any number of planes/people for more variety (Select the planes in Object Mode and press CTRL +"G" to Group them).

Additionally you can have control over the Particle Systems density by Weight Painting and a Vertex Group. With your Emitter selected go into Weight Paint Mode and select an Add Brush (There also is a Subtract Brush).

Preform your Weight Painting. Blue represents the most density and red the least. Colors in between vary the density. This creates a Vertex Group with the default name "Group".

Go back to the Particle Emitter and under Vertex Groups > Density select or enter the name "Group".


Xaml Exporter for Blender I am trying to get an old xaml exporter working in blender 2.79.

I have managed to get it showing up in the add-ons list but it when trying to enable it, i get a bunch of errors. I think the Blender API has changed because it won't import Blender. What can I do (not a python programmer)  Or if anyone knows of a Xaml Exporter thats working, let me know.

bl_info = {
    "name": "XAML format (.xaml)",
    "author": "Daniel Lehenbauer and Robert Hogue",
    "version": (0, 0, 48),
    "blender": (2, 71, 0),
    "location": "File > Export > XAML",
    "description": "Export mesh to XAML",
    "warning": "",
    "wiki_url": "https://archive.codeplex.com/?p=xamlexporter",
    "category": "Import-Export"}

from io import StringIO
from math import *

# ERROR HERE
import Blender
from Blender import Scene
from Blender import Texture
from Blender import Mathutils
from Blender import Lamp
import BPyMesh
import BPyObject

I have done some more work on it. The code is on PasteBin I am getting the error shown in the image.

3D in XAML is pretty much a dead since Microsoft dropped support for it.

I rewrote the script from scratch. You can the script from my GitLab page which includes install and usage instructions as well as the license (MIT).


How to assign vertex groups and bone weights through Blender's Python API? I'm making a script to import custom objects, it is still at early stage but so far vertices, faces and uv are created correctly. I want to do weight painting through Blender's Python API but I don't know how to do it properly.

Below an extract of the code that create the objects, how I could add vertex group and relative weights? I know how to extract vertex indices and weights from the input model but don't know how to use them,

(Blender version is 2.72)

    for i in range(0,self. subsetCount):
        subset = self.subset[i]
        coords = subset.getV3(0)
        faces = subset.getIndices()
        me = bpy.data.meshes.new(subset.name+"_Mesh")

        ob = bpy.data.objects.new(str(i).zfill(2)+'_'+subset.name, me)
        ob.location = (0, 0, 0)
        bpy.context.scene.objects.link(ob)

        me.from_pydata(coords, [], faces)
        me.update(calc_edges=True)

        mat = bpy.data.materials.new(subset.name)
        mat.diffuse_color = (random.uniform(0.0, 1.0), \
                             random.uniform(0.0, 1.0), \
                             random.uniform(0.0, 1.0))
        me.materials.append(mat)

        for f in me.polygons:
            f.material_index = 0
            f.use_smooth = 1

        # vert_uvs = subset.getV2(0x28)
        # if len(vert_uvs) > 0:
        #     me.uv_textures.new("UV0")
        #     uvlist = [uv for pair in [vert_uvs[l.vertex_index] for l in me.loops] for uv in pair]
        #     me.uv_layers[-1].data.foreach_set("uv", uvlist)

edit

found this to add the group:

        vxgroup = ob.vertex_groups.new("group")

still don't know how to set weights for vertices (best would be at once)

edit

I was hoping to use something like a foreach_set but can't figure out how to use it, instead solved this way:

        for grp in ob.vertex_groups:
            grp.add(range(0,len(me.vertices)), 1.0, 'REPLACE')

is just an example and set all vertices weight in all groups of the object ob (if you try it in console select another mesh then back to see the weights applied).

vertex_groups method .add() first argument is a list of vertices index, I  group my input to reduce the calls to add to the minimum necessary.

Note: my input weights are stored in unsigned bytes (0-255).

First with a dict {grpID: ...} then another dict as value for weights {grpId: {weight: ...}}, finally the list of vertices id {grpId: {weight: [vxId, ...]}}, at this point the code is quite simple:

        weights = myGetWeights()
        for grpId, wv in weights.items():
            grpName = "Bone_"+str(grpId).zfill(3)
            ob.vertex_groups.new(grpName)
            for weight, vxIdList  in wv.items():
                ob.vertex_groups[grpName].add(vxIdList, 1.0 / 255 * weight, 'REPLACE')


Equirectangular skyboxes: Tips for avoiding pixellation? I'm creating an artificial HDRI image with Blender:Cycles- just creating a landscape, lighting it, equirectangular projection, sorted.

When I use the HDRI as a background for new scenes the image seems very pixelly.

I'm rendering the scene as a 4096 x 2048 image, with 40-50 samples per ray. Obviously, this isn't enough detail. But what is the determining factor for a high quality HDRI: more pixels, or better quality pixels? Is there a formula I can use to get me a useful skybox?

4096 x 2048 should be adequate resolution, but keep in mind that the focal length of the camera you use in the second scene will make a big difference.

If your second scenes' camera focal length is high, 50-200mm, it is the same as opening up your equirectangular render in photoshop and zooming in a lot. Generally, a real HDR equirectangular image photographed in the real world will be 4k-12k in width. The 4K is best for reflections and lighting and the 12k might have some use as a seen sky in the 3D render, however, backplates, which are photographs taken at the same time at the same place using a different focal length (not a fisheye for panoramas, but more like a standard FOV (35mm-85mm) are often used to replace the environment image render. That image is then lined up to the rendercam (or should I say, the rendercam is aligned to the image) and it is composited in behind the CG elements, replacing the HDRI 'sky'.  If you wanted to do that without taking a separate photograph, your equirectangular environment map would have to be above 20k (generally speaking).

tl;dr  10-35mm blender camera settings should work fine with a 4k image if rendered out at 1080p.