How to create a Tetrix/Sierpinski Tetrahedron fractal radiating from 0,0,0 ? Python or nodes Animation nodes method true to description has been provided by @lemon,
Vote his answer UP UP UP!

INFERIOR

INFERIOR

INFERIOR / different concept

Mesh. I want to create it not by dissection of edges, but instead by splitting 1 into 4, or should I say, adding 3 more to the original location before moving all 4 away from Local 0,0,0 , and then doing the same with the 4 replicas, as each of them is splitting the same way (the subsequent movements of replicas becoming more and more complex/derived),
so that (if animated) it really looks like the one is splitting into 4, and each of the 4 results are then splitting into 4 (and so on).
If Empties were placed in each start/end position of each object it would, looking at the Empties hierarchically connected, appear like a branching tree, with old branches continuously lengthening.

Though I wouldn't mind knowing the opposite too. Having 1 edges dissected(halved) and created vertexes connected, but always so that connection doesn't happen toward the inside (coordinate 0,0,0),
THOUGH THAT WOULDN'T  really be the opposite of the previous,
the real opposite would look like the 1 is scaling in (previously mentioned) 4 directions (toward the vertexes of the 1), and so on, in each of the 4 newly created. Yeah XD definitely wouldn't mind knowing how to do this.

Method using python script or nodes would be just FINE!

IRL construction

BTW I have a hunch it would be easier to construct it if there was some alignment with the coordinate system, such as edge midpoints aligning on the axes.

Updated answer with animation technique (sort'a cheating)

So to generate an animation of the tetrix levels increasing I kind'a cheated.
Since my previous answer already used a dictionary to store all the levels, I simply wrote that data structure into a json file, then used an app handler function to read it prior to every frame change and load the current level matching the frame number.

So this has solution has two steps:

Generate data file

import numpy as np
from time import time
import bpy, bmesh, json
from mathutils import Vector

def generate_quad( original, quads, level, max_level ):
    ''' Recursive function generating 4 tetrahedra off of the the input tetrahedron '''

    # The 1st new tetrahedron is simply half the scale of the original starting from the original tet's bottom left corner
    origin = original.min(axis=0) / 2
    half  = original / 2
    half += origin

    # Calculate the dimensions of the new tetrahedra
    newdims = Vector( half.max(axis=0) - half.min(axis=0) )

    # The 2nd moves by the new tet's x dimension to the right
    right = half.copy()
    right[:,0] += newdims.x

    # The 3rd moves by half the x dim and all the y dim
    forward = half.copy()
    forward[:,0] += newdims.x / 2
    forward[:,1] += newdims.y

    # The 4th moves by half the x, a third of the y and all the z
    up = half.copy()
    up[:,0] += newdims.x / 2
    up[:,1] += newdims.y / 3
    up[:,2] += newdims.z

    quad = [ half, right, forward, up ]
    quads[ level ].extend( quad )

    if level < max_level:
        for q in quad:
            quads = generate_quad( q, quads, level + 1, max_level )

    return quads

## Main Code
start = time()
n     = 5  # Number of steps of the fractal
scale = 10 # Scale of the original tetrahedron

# Generate regular tetrahedron at the desired scale
orig = np.array([
    [0,   0, 0],
    [1,   0, 0],
    [0.5, 3**0.5/2, 0],
    [0.5, 1/3*3**0.5/2, ((3**0.5/2)**2 - (1/3*3**0.5/2)**2)**0.5]
]) * scale

# Initialize data structure for all tetrahedra in all steps
quads = { i : [] for i in range( n+1 ) }

# Generate tetrix via recursive function
quads = generate_quad( orig, quads, 0, n )

# From numpy to simple lists to prepare to save as json
quads = { i : np.array(quads[i]).tolist() for i in quads }

quad_cache_file_path = r'C:\Users\username\Documents\tetrix.json'
with open( quad_cache_file_path, 'w' ) as fh:
    quads = json.dump( quads, fh )

print( f'Generated {n} tetrix levels in {round(time() - start,1)} seconds' )

Add frame_change_pre app handler function to link between the frame number and the tetrix's level

import itertools
import numpy as np
import bpy, bmesh, json
from mathutils import Vector

def update_tetrix( scene ):
    C = bpy.context
    D = bpy.data
    S = C.scene

    regular_tet_faces = np.array([[3, 0, 1], [1, 0, 2], [0, 3, 2], [3, 1, 2]])

    quad_cache_file_path = r'C:\Users\username\Documents\tetrix.json'
    with open( quad_cache_file_path ) as fh:
        quads = json.load( fh )

    # Select level to display at current frame (match
    n = S.frame_current - 1
    n = n if str(n) in quads else max( quads.keys() )

    # Generate mesh data
    verts = []
    faces = regular_tet_faces.tolist()
    for q in quads[str(n)]:
        # Find last vert index and add new verts
        last_vert_index = max([ len( verts ) - 1, 0 ])
        verts.extend( q )

        # Use base face arrangement of original regular tetrahedron and offset indices
        faces_indices = regular_tet_faces + last_vert_index + 1
        faces.extend( faces_indices.tolist() )

    # Remove duplicates
    faces = sorted([ sorted(f) for f in faces])
    faces = list(f for f,_ in itertools.groupby(faces))

    if 'tetrix' in D.objects:
        print( f"Updating mesh with level {n}" )
        o = D.objects['tetrix']
        m = o.data

        bm = bmesh.new()

        bmverts = [ bm.verts.new(co) for co in verts ]
        bmfaces = [ bm.faces.new([ bmverts[i] for i in f]) for f in faces ]

        bm.to_mesh( m )
        m.update()

    else:
        # Generate mesh data and initialize vertex and face arrays
        m = D.meshes.new('tetrix')

        # Generate mesh object and add to scene
        m.from_pydata( verts, [], faces )
        print({ k : len( quads[k] ) for k in quads })
        o = D.objects.new('tetrix',m)
        S.collection.objects.link( o )

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

Caveats

This solution doesn't enable animating a transition between levels, simply a harsh switch. You also don't get a lot of control over how long the pauses are between switches (though this could be done in post in any video editing software by multiplying or delaying frames).
Currently the entire data file is read prior to every frame change. This can be pretty slow if you've generate a big file with many levels (above 7), depending on your computer's specs. It could probably be improved by loading the file once to memory as a global scene object then reading directly from that prior to every frame change, rather than reading the file from disk every time.

Original Answer

This script can generate a n-level tetrix. It will work only in Blender 2.8 and utilizes some Numpy tricks for more efficient numerical manipulation.

import bpy, bmesh
import numpy as np
from mathutils import Vector

def generate_quad( original, quads, level, max_level ):
    ''' Recursive function generating 4 tetrahedra off of the the input tetrahedron '''

    # The 1st new tetrahedron is simply half the scale of the original starting from the original tet's bottom left corner
    origin = original.min(axis=0) / 2
    half  = original / 2
    half += origin

    # Calculate the dimensions of the new tetrahedra
    newdims = Vector( half.max(axis=0) - half.min(axis=0) )

    # The 2nd moves by the new tet's x dimension to the right
    right = half.copy()
    right[:,0] += newdims.x

    # The 3rd moves by half the x dim and all the y dim
    forward = half.copy()
    forward[:,0] += newdims.x / 2
    forward[:,1] += newdims.y

    # The 4th moves by half the x, a third of the y and all the z
    up = half.copy()
    up[:,0] += newdims.x / 2
    up[:,1] += newdims.y / 3
    up[:,2] += newdims.z

    quad = [ half, right, forward, up ]
    quads[ level ].extend( quad )

    if level < max_level:
        for q in quad:
            quads = generate_quad( q, quads, level + 1, max_level )

    return quads

## Main Code
C = bpy.context
D = bpy.data
S = C.scene

n     = 2  # Number of steps of the fractal
scale = 10 # Scale of the original tetrahedron

# Generate regular tetrahedron at the desired scale
orig = np.array([
    [0,   0, 0],
    [1,   0, 0],
    [0.5, 3**0.5/2, 0],
    [0.5, 1/3*3**0.5/2, ((3**0.5/2)**2 - (1/3*3**0.5/2)**2)**0.5]
]) * scale

regular_tet_faces = np.array([[3, 0, 1], [1, 0, 2], [0, 3, 2], [3, 1, 2]])

# Initialize data structure for all tetrahedra in all steps
quads = { i : [] for i in range( n+1 ) }

# Generate tetrix via recursive function
quads = generate_quad( orig, quads, 0, n )

# Generate mesh data and initialize vertex and face arrays
m     = D.meshes.new('tetrix')
verts = []
faces = regular_tet_faces.tolist()

# Generate mesh data
for q in quads[n]:
    # Find last vert index and add new verts
    last_vert_index = max([ len( verts ) - 1, 0 ])
    verts.extend( q.tolist() )

    # Use base face arrangement of original regular tetrahedron and offset indices
    faces_indices = regular_tet_faces + last_vert_index + 1
    faces.extend( faces_indices.tolist() )

# Generate mesh object and add to scene
m.from_pydata( verts, [], faces )
print({ k : len( quads[k] ) for k in quads })
o = D.objects.new('base',m)
S.collection.objects.link( o )

Here's a higher level tetrix from all orthographic angles and a free one (quad view):


Emission materials don't show any light I'm using an emission texture to use as a light, but it doesn't show anything. What could be wrong?
When a put Render mode (cycles) doesn't work eiter.
Light should be seen behind the TV. Thank you in advance

If you are asking for backlight - ambient light behing a TV lightning a wall ...

add Area light between TV and wall that works for Eevee and Cycles

Cycles

Eevee

Using emission material require Light Probe - Irradiance Volume for eevee engine that seems to be too short distance between emiter and receiver, so probably harder to setup.


is it possible to export .mdx and .mdl files? is it possible to export to .mdl or .mdx files?
If yes, tell me the exact way please. Me and my friend are working on a Warcraft map, but Warcraft only imports .mdx or .mdl files and blender can't export this kind of files.

You could try the Blender-MDL addon.

It is also listed in official import/export extension section of the documentation at wiki.blender.org


How can I add mass to part of a cloth simulation? I'm working on an animated scene with quite complex cloth simulation (2.83-2.90). Multiple characters and layers of clothing. The dress in the foreground is working perfectly now after much error and lots of trial. But I'd like to find a way to add more inertia/mass to the lower hem of vertices somehow, to give a sense of weight to the fringing along the bottom (this is created with particle hair btw).
I haven't tried stiffness scaling, as I don't want to change the stiffness of the cloth as such afaik. I thought about subdividing that part of the mesh, but this would likely mess up all the collsion/self-collision. Any thoughts anyone? Or do I just need to hope vertex group control is added someday? ;)
EDIT: I just discovered that this feature was implemented in 2006 Blender but later simplified/removed. Still wondering if there's a way to cheat this somehow.
from On what Cloth Simulation Model is Blender Cloth Physics Based?
re: 2006 Blender:

Mass Scale Vertex Group : This vertex group allows the user to
multiply the point mass by the influence/weight a vertice has in the
vertex group. Thus parts of the cloth can have different weights
making part of it appear wet or heavier for other reasons.
Mass Vertex
Group : This vertex group allows the user to directly specify the
weight of the vertices. The Scale parameter is used to adjust the
results of this.
Scale : This allows the user to scale the results of
applying a Mass Vertex Group.

Ive spoken briefly with some devs who suggested this feature could be added to the cloth sim again in future. In the meantime, I did manage to create a cheat that works well enough in this case:

Added additional geometry at or near the bottom of the hem. In this case more or less a dense bunch of 10 loops within a couple of centimetres;
Assign these additional verts to a vertex group, and excluded them from self-collision, and;
assigned them a new transparent shader so they don't show in renders.

This made a distinct difference and got basically the result I wanted. Still hoping for a more elegant solution via the devs though, as there are multiple cases where vertex weighting mass would have application.
Hard to post animated visual results yet, but feel free to keep an eye on @LMODanimation or thelovemeordie.com if you want to see more soon.
Thanks for looking!


Fluid simulation - filling up a letter New to fluid simulation, and I'm having trouble setting this up:

I have a text, a letter "O", that I want to fill up with water - going for a spurt of water to come jetting in from the bottom and fill up the whole "O".

I've converted the text into a mesh:

I then duplicated it, and removed the upper part of of the letter so I have just the bottom sliver left:

I then made sure to inset it just above the original so it sits "inside" the "O" letter:

Now I set the the bottom sliver mesh with a fluid emitter set to "inflow" with a positive Z value. I set the letter "O" mesh with a fluid emitter set to "domain" with default values for now. I'm expecting the z axis inflow from the bottom sliver to fill up the domain of the mesh "O" with water, but instead get this result:

What am I doing wrong here? Can anyone explain to me what is happening? Why isn't the letter filling up with water?

Does it have something to do with normals?

Thanks in advance!

EDIT:

So, I've now setup a cube around the letter as a domain, set the letter as the obstacle, and even added a mesh at the top as an outflow, but am now getting this:

I am baffled by this, and don't quite understand why the fluid is "seeping out".

The domain is necessary for the sim to work, but if you want to fill a shape with fluid make it an obstacle, put the "tap" inside it and, to avoid overspill, make mesh near the top an outflow.


How to stash all actions to current armature? I just imported a bunch of actions from different files into one blend, but the GLTF exporter can't locate them without them being in the NLA stash. (There used to be a plugin that would export all actions to the GLTF, but 2.8 won't add it to the addon list.)

I tried this:

import bpy

ob = bpy.context.object

if ob.animation_data is None:
    ob.animation_data_create()

ad = ob.animation_data

for action in bpy.data.actions:
    ad.action = action
    bpy.ops.action.stash()

And that just caused:

RuntimeError: Operator bpy.ops.action.stash.poll() failed, context is incorrect

And I haven't been able to find anything on how to fix it for this specific function.

How can I do this?

This does it, but i can't actually unregister the addon.

It needs to be run from the space menu with the cursor in the dopesheet in action mode.

bl_info = {
    "name" : "stash all",
     "catagory" : "Action",
}

import bpy

class StashAll(bpy.types.Operator):
    """My Stashing Script"""
    bl_idname = "action.stash_all"
    bl_label = "stash all"
    bl_options = {'REGISTER'}

    def execute(self, context):
        ob = bpy.context.object

        if ob.animation_data is None:
            ob.animation_data_create()

        ad = ob.animation_data

        for action in bpy.data.actions:
            ad.action = action
            track = ad.nla_tracks.new();
            track.strips.new(action.name, action.frame_range[0], action)

        ad.action = null

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Snapping not working at all I can't get vertex/edge/face snapping (or even grid snapping) to work in one blender file. I have tried this file in 2.79 and 2.79a. If I open another .blend file snapping works fine.

I have saved/closed/reopened the file, restarted Blender and rebooted the computer and upgraded Blender, all to no avail.

Well, I compared with another file, setting-for-setting, until I found the answer. It turns out that in the 3d-view header (in edit mode) there is a button for "Proportional Editing Mode", and when I set that to "disabled" then snapping started working again. I have no idea what I did to enable that (probably accidentally pressed some obscure key combo). I searched all over the Interweb for this issue and although I found a bunch of folks with the problem, nobody offered this "solution". I hope this helps the next poor soul that has this issue.


How to select a point of a MaskLayer with python? I am trying to select points of a spline of a MaskLayer with Python. In the end I want to be able to temporarily store a group of points in a list so I can select and deselect a bunch of mask points with a hotkey via Python.
However, when I try this:

D.masks['Mask'].layers['MaskLayer'].splines[0].points[1].select = True

it only selects one handle of the point, but not the point itself. Am I missing something, or is it a bug or just not supported?
Because I can check if a point is selected or not with the above method, just the selecting with select = True acts weird.

So apparently the above method is actually the way to go, it just doesn't work due to a bug, which will hopefully be fixed soon.


Fluid suddenly disappears I have a problem with fluids and I cant seem to find the answer.

I made a coffee mug which I want to fill with coffee. So I made a cylinder in the mug that turns into liquid when rendering. A little bit of the coffee gets spilled (as should happen if you manage to throw 21 cl as a drop in the mug).

But here comes the problem when the coffee gushes up and touches the domain ceiling, at frame 16, all the fluids in the domain disappears in the next frame. I looked in the domain and liquid object settings but I cant seem to find the problem.

Screenshot

Frame 16
Frame 17

The fluid is disappearing because the domain object is not "baked" completely. It's baked only until the frame where it's disappearing. Remember, the fluid is simulated on the domain object, so up until the frame, it's a fluid, and then it "turns back" into the domain object.

You need to bake the domain object and wait for that to finish before rendering.


adjusting axis of 3d cursor i have a tube and want make it going around an edge. I usually know how I have to do that but in this case, i cant because the axis of the 3d cursor which I use as pivot point a distorted. how can I get the axis right again? (they should align in this case with the normal word=grid)

Try changing your transformation orientation


how to download sintel files? I know that sintel files were distributed under the GPL and also found mention that the files were for public, however, in the download section of sintel's official site, there's only a lite version of sintel's model and textures used. Is there another site to download the files used in the movie or do we have to purchase them? I would like to study the files for animation and modelling purposes.

As far as I know you can only access the full files of Sintel, and all other Open Movies on the Blender Cloud, which is $10 per month. So the full files "should" not be open freely for everyone on the web. Also Blender Cloud offers many awesome products and tutorials so the money is worth. Blender Cloud


Scaling the distance between objects I've got a camera tracked to an empty, and I'd like to add keyframes with constant interpolate to have the camera "click" forward.

How can I scale the distance between objects, without affecting their size? Even better would be setting an absolute value of the distance between the objects.

There's a button in the header bar (three dots with a left-right arrow under it) that when switched on means that your transformations will only apply to the centre points of the selected objects. Using that tool and pivoting by active element will allow you to scale two objects, keeping one in place, moving the other away or towards the active object and leaving the scale of the actual objects themselves untouched.

Setting the absolute distance between two objects could be done with a "Limit Distance" constraint set to a Clamp Region of "On Surface", which you could then key the distance value for.


Where do I find a button "Lock Layers and Used Camera to Scene" in Blender 2.92.0? Where do I find a button "Lock Layers and Used Camera to Scene" (the lock icon in a 3D viewport) in Blender 2.92.0? Rendered Picture is not what active camera shows

Used camera is right here in scene properties:

and if you tap the filter symbol here:

and then press the arrow (selectable)

you can then tap on the collections selectable icon (to lock the layer)


How to Place the Right Seams for UV Unwrapping Where can I read how UV Maps should look and how to know where to place the seams? Here I have a very simple model I'd like you to suggest where the seams should be placed and why. I have attached a picture of my test model and attached the Blend file.

Blend file

In my opinion you should try to place the seams in that way, so the UV islands in UV/Image Editor are even distributed and have a proper scale that reflects the scale of the model's elements. It is often the matter of experimenting. You should think of it as it was a real model. Try to imagine how you may cut it open with scissors and spread on a flat surface.

The example below shows how the different unwrap of the same object results in less uniform Uv islands distribution, which is less beneficial.

Here is the .blend with the seams placed: http://www.pasteall.org/blend/33446


Budget PC Build for Blender 2.8 I'm planning to build a pc for Blender 2.8, mainly for cycles rendering and sculpting. Will this build be sufficient for the task and for long term use?

Ryzen 7 2700
Motherboard (supports crossfire)
32GB(3200) RAM
2x AMD RX580

IMO your question is incomplete.

  Will this build be sufficient for the task

Well, it depends. For sure you can use it, do renders, but it can take more time to complete the task compared to other systems.
Another thing to consider is if you will use things like physic simulations or particle systems.
Always keep in mind that an high poly count will increase render times, so you have to optimize your scene, especially with sculpted meshes.

  Budget PC

This can also be a questionable one.
What do you mean with budget? For someone it can be 500 dollars, for other people it can be 700. In this case even 150-200 dollars can make a nice improvement.
Anyway you can check some benchmarks to see what performs best in your price range.


no transparency in cycles render I'm sure someone already asked this, and yes, i googled it, but in cycles render, i do not know how to fix the transparency problem here. however, transparency works fine in blender render, so it is not my laptop not being able to support it.

i need to get rid of the black
i have a separate alpha png, but dont know how to apply it

If your PNG has a transparent background, plug the Image Texture with your image in the bottom entry of a Diffuse, plug this Diffuse in a Mix Shader, and plug the Mix Shader in the Material Output. Now plug a Transparent BSDF (100% white) in the top entry of the Mix Shader, and plug the Alpha output of the Image Texture in the Factor of the Mix Shader. It should work


Is it possible to edit all texts without affecting other curves using Python? I have run into an issue where I need to edit all text curves to change their content, but I also need to be able to use other curves that are not text within the scene.

If I try and use the standard for x in y method and cycle through all curves I get the error I expected.

import bpy

curves = bpy.data.curves

for c in curves:
  print(c.data.body)
  c.data.body = 'this has worked'

'Curve' object has no attribute 'data'

This is caused by non-text curve objects in the scene, which of course have no text attributes. What are my options to work around this limitation of having text objects bundled in with all curve objects?

Adding text object definitions manually is not an option as this needs to be extremely flexible.

Edited, thanks.

import bpy

curves = bpy.data.curves

for c in curves:
    if isinstance (c, bpy.types.TextCurve):
        print(c.body)
        c.body = 'this works in better style'


One of my objects doesn't appear in 3D View Full For my imaging and modeling class, we are to make an animation as part of our final. I've imported 4 objects from Slicer into Blender and have the animation that I want down.

However, one of the objects (Corpus) isn't visible in 3D View Full, and if I assign it a material, the material doesn't show up.

This is my first time working with any animation software and I'd appreciate any help.

Here is the blend file.

Thank you!

The Corpus is created from individual edges but not Curves. As far as Blender is concerned it has no mass and there is nothing to render.

Go to the Object menu and Convert To select Curve From Mesh/Text.

Now you can go into the Curve settings and Extrude to give the threads depth.


Jump cut editing in the Video Sequence Editor I would like to edit a long video, deleting parts of it. I think this type of editing is called jump cut. What would be an efficient way to do it in Blender? Just soft/hard cutting the video and sound strips on two different frames, deleting the middle strip and moving together the remaining parts? Or is there a better way?

I found an add-on called "Jump to Cut", but I'm not sure if I understand how it works and if it could be useful for this purpose.

Thanks!

The Jump to Cut Addon assembles various important tools, which can be found in the Blender Sequencer, but has no premade method to create jump cuts.

The manual way is already rather fast.

 RMB select the movie strip.
Position the cursor at the beginning of the jump cut.
Soft Cut with K.
 RMBSelect the start handle of the 2nd part of the
strip.
Move it forward a  number of frames. Assuming you want to jump forwards a second in 24 fps the shortcuts would be GX24⏎ Enter.
Remove the gap. ⟵ Backspace or Strip > Remove Gaps.


Corrupted AVI Raw files I am experiencing an issue, when I choose to render an animation to AVI Raw from Blender. I can not play the video properly, the video file seems to be corrupted. The rendered file has around 5 GB, quite big actually.
The default video player in Windows 10 plays only the first few seconds of the animation. Then the video ends without reporting any errors.
On the other hand, VLC detects the error and offers a solution. The file is obviously missing an Index. Unfortunately, this workaround fixes the file only temporarily to play. So, is there any way how to generate the Index for the file? Even Adobe Premiere Pro cannot import this file.

Render settings of the animation in Blender

Thank you for the answers in advance.

So, I solved the problem by dividing the animation into pieces and gradually rendering these parts. Then I will just grab these pieces in Adobe Premiere Pro and join them together.
When you search for maximum size of AVI, it outputs 2 GB. That's most likely why the files above this limit are corrupted.


Blender only showing a small sliver of objects in 3D View Here is what the issue looks like:

I fixed this by pressing View>Toggle Quad View, and then Toggling off quad view with the same menu


Mesh not following bone after parenting and painting The mesh is not moving at all even after i parented and painted the weights on that bone's vertex group. I tried it on all the bones but I have the same problem.
Any help would be appreciated.

When you parent an armature to a mesh you need to go into the mesh's object properties and make sure that under Relations->Parent you have the proper Armature object selected and make sure the type is set to armature not Object or Bone.


How to expand an object I have an .stl file of a fan cover. I need to expand it, or stretch it, from the front and pull it out about three times it's depth. I've looked at Youtube videos on extruding and stretching but I can't get it to move in the right direction.
Thank you for any help.
Here is the .stl file: https://www.dropbox.com/s/lqkf2dkcinmrgax/hotend_fan_shroud_cover_remix.stl?dl=0

Go in Edit mode (tab), choose the left view (3), and switch to X Ray (AltZ) to be able to select through:

Choose the Lasso Select tool (or use the shortcut):

Select the part of your mesh you want, press shift to select again:

Switch to the Move tool (or shortcut G):

Move the selection, use the gizmo to move on the Y axis or press Y to contrain on this axis:


How do I set the origin of a mesh to the center of its axes-aligned bounding box? Do not flag this as a duplicate. The answers that are out there on similar questions contain shortcuts which do nothing in my version of blender (2.80.0-git.3dc9da3a74ee-windows64). Furthermore, they do not consider axes-aligned bounding boxes.

That out of the way, here is my problem:

I need to generate an axes-aligned bounding box of an object
I need to set the cursor to the middle of that box
I need to set the origin of the object to my cursor

The object consists of a single mesh.

Sounds easy enough, but I have no idea how to complete step 1. How do I go about this?

No scripting required.

1) Select your whole mesh in edit mode (it may also work in object mode)

2) Change your pivot point to "Bounding box center" (little dropdown menu at the top of your 3D view)

3) Use Shift+S and select "Cursor to selected"

4) Enjoy !!!


Blender-Python: Select and iterate vertices after each other from left to rigth, top to bottom I want to build a blender python loop around all my vertices of one plane which is subdivided and so has many vertices.
It should select one vertice (do something else with it which is not the question here) and select the next vertice after each iteration.
It should start with the top left, then go through the first row to the right and then step over to the second row and again go from left to right.:

Operator solution
Since you're asking specifically to select a vertex:
import bpy

data = bpy.context.view_layer.objects.active.data

bpy.ops.object.mode_set(mode = 'OBJECT')
verts = sorted([(v.co.z, v.co.x, v.index) for v in data.vertices], reverse=True)
bpy.ops.object.mode_set(mode = 'EDIT')

for z, x, v_index in verts:
    bpy.ops.mesh.select_mode(type="VERT")
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.object.mode_set(mode = 'OBJECT')
    data.vertices[v_index].select = True
    # modify manually here, e.g.:
    # data.vertices[v_index].co.y += x
    bpy.ops.object.mode_set(mode = 'EDIT')
    # use bpy.ops here, e.g.:
    # if x > 0: bpy.ops.mesh.hide()

Bmesh solution
import bpy, bmesh

mesh = bpy.context.edit_object.data
bm = bmesh.from_edit_mesh(mesh)
verts = sorted([(v.co.z, v.co.x, v) for v in bm.verts], reverse=True)
for z, x, v in verts:
    v.co.y = z+x # example

bmesh.update_edit_mesh(mesh)

Changing for different planes (views)
I assumed the Back Orthographic view and XZ plane: . For other planes you need to sort differently. Perhaps remove reverse argument and use minus signs to swap the sign of the coordinate inside the tuple used for sorting. So the following line:
verts = sorted([(v.co.z, v.co.x, v) for v in bm.verts], reverse=True)

would become: [for Back Orthographic]
verts = sorted([(-v.co.z, -v.co.x, v) for v in bm.verts])

and for Front Orthographic you would change the sign of x for sorting:
verts = sorted([(-v.co.z, v.co.x, v) for v in bm.verts])

Likewise you may want to turn (v.co.z, v.co.x, v) to (v.co.x, v.co.z, v) if you rotate the camera by 90 degrees or want to iterate by columns instead of rows.
Interactive Testing
Here's a script allowing to test if the order is correct, by pressing Ctrl+Shift+F12
bl_info = {
    "name": "Vertex iterator",
    "category": "Mesh",
}

import bpy

addon_keymaps = []
current_vertex = 0

class WorkMacro(bpy.types.Operator):
    """Work Macro"""
    bl_idname = "object.work_macro"
    bl_label = "Work Macro"
    bl_options = {"REGISTER"}

    def execute(self, context):
        global current_vertex
        data = bpy.context.view_layer.objects.active.data
        bpy.ops.object.mode_set(mode = 'OBJECT')
        verts = sorted([(-v.co.z, -v.co.x, v.index) for v in data.vertices])
        bpy.ops.object.mode_set(mode = 'EDIT')
        z, x, v_index = verts[current_vertex]
        bpy.ops.mesh.select_mode(type="VERT")
        bpy.ops.mesh.select_all(action = 'DESELECT')
        bpy.ops.object.mode_set(mode = 'OBJECT')
        data.vertices[v_index].select = True
        bpy.ops.object.mode_set(mode = 'EDIT')
        current_vertex = (current_vertex + 1) % len(verts)
        return {'FINISHED'}

def register():
    bpy.utils.register_class(WorkMacro)
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
    kmi = km.keymap_items.new(WorkMacro.bl_idname, 'F12', 'PRESS', ctrl=True, shift=True)
    addon_keymaps.append(km)

def unregister():
    bpy.utils.unregister_class(WorkMacro)
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    del addon_keymaps[:]

if __name__ == "__main__":
    register()


How do I fix these weird lines in my model I was following along with Darrin Liles character modeling tutorial, and I was doing well, but then I left edit mode and turned off wireframe. I got lines like this (by nose and jaw):

I have no idea how to fix this. Help?

Here's the .blend file:

Those lines are a result of mesh distortion. It means that your polygons aren't "flat". Mesh distortion results in shading errors.

Blender's Mesh Analysis functionality helps you checking with these kind of problems. In the screenshot below you see all the distorted polygons in your mesh. Grey is ok, then it goes from blue to green and finally to red (which means bad).

This is OK to a certain extend, but it depends on the purpose of your model. I would stay in the grey and blue-ish area to keep things safe.

The solution in your case would be working with a little more polygons, for example by adding loopcuts and then moving the vertices until the polygons change their color into blue or turquoise.


How to add a RGB Curve node How i can add a RGB Curve node, like this example?
I want to improve colors of my PLY mesh.
(This screenshot is not mine, I've found in this forum.)

As mentioned in the previous post, ideally you fix the input file because for whatever reasons the object was imaged under poor lighting conditions or the software used might have a mode to adjust the brightness of the polygon/vertex colours and it was set to darken.

Regaining the fidelty / vibrance of the colours is tricky and the techniques used might produce unsatisfactory results.

One fast way for Blender Internal is to use Ambient Occlusion and Environment Lighting, from the World tab. You'll  notice the result is a little blown out (as if over exposed) if the guy is wearing a light pink shirt.

Blender Internal's materials also has a Nodes mode, and it supports Vertex Colors. It allows you to adjust the colours with an RGB Curve too, and you don't need to enable Ambient Occlusion or environment lighting

Or maybe a hue / saturation node:

Anything you do to make it render nicely won't be a true representation of what the output will look like if it's 3d printed (I think you are doing this to render product shots?) -- unless you somehow modify the Vertex Color map.

You can bake to Vertex Colors using the Bake feature set to 'Full Render'. I would create another Vertex Color layer and set that to active in the panel, before doing a bake. This will prevent bake from over-riding your original.

bake:


Bad configuration, possible bug? I'm new to Blender and 3d in general.
Downloaded 2.78c 2 days ago. Using ubuntu 14.04.
Invoke blender from file browser.

I was following tutorial for noobs when I selected Create->Plane.
Now every time I click the left mouse button, I get an instance of Plane.
I've tried Create->Cube and Sphere, which work but don't 'cleanse the pallet'; I still get instances of Plane with each left click. I can see them accumulate in the Scene panel, where I also delete them. They seem hard to select directly in the viewer.
Sometimes after a while I can't select anything in the viewer.
Did I accidentally turn something on/off?

It seems like it started after I set UserPreference for SelectWith Left mouse button. I had problems , so I switched back to Right click.

Also I can't get OperatorCheatSheet to display anything.
Bad Configuration?

Blender uses a user configurable shortcut system. We can easily add a shortcut to many operators by  on the button or menu item and choosing Add Shortcut. If you then managed to right click on the shortcut entry dialog you would get the right click as the shortcut.

If this is what you did, you will see Right Mouse next to the plane in the add menu ⇧ ShiftA->Mesh.

To remove it should be as simple as quitting blender and starting it again. If however you saved the user settings after adding the shortcut, then you will need to remove it manually or revert to factory settings. Note that adding a keyboard shortcut can be removed by right clicking it again, but a mouse shortcut needs to be removed in the input settings.

In User Preferences under the Input tab you will find the shortcut. For adding an object, you will find it by expanding 3D View and Object Mode and scrolling down to the bottom of that list.

Click the X icon to the right of the entry to remove it.

In your case you could also search for plane to find it, other times searching may be the easiest way to find it, if you can think of the right search words. You can also search by shortcut, but you will find many entries for each key and mouse so it doesn't always help.

Be sure to save user settings after removing the shortcut so that it doesn't return next time you use blender.


How to flatten a non-planar face to a targeted plane? Let's take a non-planar quad here for a simple example, how to only move one vertex on it, to finally make it planar while keeping the other three vertices still?

What @Denis suggested is good, I mean, it can be convenient sometimes with the help of view align. Besides, there are also other ways to do so:

Method 1:

Enable Snap, set Snap Element to Vertex.
Hold Shift and click on Edge Select button.
Use Normal as the Transform coordinate.
Use Active Element as the pivot center.
First select the vertex you want to move, then the edge that contains any two vertices on the target plane. Then R Y Y, then rotate until it snapped on another vertex on the same plane.

Method 2:

Temporarily triangulate the face.
Use Active Element as the pivot center.
Keep the target triangle selected, which is coplanar with that plane, then S Z Z 0.
Select the two triangles, press F to convert them back to quad.

Method 3:

Snap the vertex that you want to move to counter vertex.
Keep it activated, then G G to slide it along one edge, press C once or holding Alt to disable Clamp.
Repeat last step on another edge.

Method 4:

This is sort of similar to Denis's answer, but keeping current point of view unchanged (needed sometimes).

Select three vertices, create a new coordinate system based on current selection (or simply press Ctrl Alt Spacebar), and use it as current transform orientation.
Use Active Element as the pivot center.
First select the vertex you want to move, then select any one of the rest vertices, then S Z Z 0.

Method 5:

This is really a one-stop solution by using a script/addon coded by nirenyang, a friend from local community. After being requested, he made this for us, also posted on BA.

Here is my translated version of his script:

bl_info = {
    "name": "Coplanar by 3 Verts",
    "author": "NirenYang[BlenderCN]",
    "version": (0, 1),
    "blender": (2, 75, 5),
    "location": "3d view - toolbar",
    "description": "Make vertices coplanar using a plane defined by the first/last three selected verts.",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "mesh",
}

import bpy
import bmesh
from mathutils.geometry import intersect_line_plane, distance_point_to_plane, normal

enum_ref = [( 'first', 'First', 'Defined by the first three selected verts' ),
            ( 'last', 'Last', 'Defined by the last three selected verts' )]
class MESH_OT_3points_flat_trim(bpy.types.Operator):
    """
    Manually pick three vertices to define the reference plane
    """
    bl_idname = 'mesh.3points_flat_trim'
    bl_label = 'Coplanar by 3 Verts'
    bl_options = {'REGISTER', 'UNDO'}

ref_order = bpy.props.EnumProperty(name='Refferece Plane', description='Use the first/last three selected vertices to define the reference plane', items=enum_ref, default="last")
filter_distance = bpy.props.FloatProperty(name='Filter Distance', description='Only affects vertices further than this distance', default=0.0, precision=3, min=0.0)

@classmethod
def poll(cls, context):
    obj = context.active_object
    return (obj and obj.type == 'MESH')

def execute(self, context):
    C = context
    D = bpy.data
    ob = C.active_object

    #if bpy.app.debug != True:
    #    bpy.app.debug = True
    #    if C.active_object.show_extra_indices != True:
    #        C.active_object.show_extra_indices = True

    if ob.mode == 'OBJECT':
        me = C.object.data
        bm = bmesh.new()
        bm.from_mesh(me)
    else:
        obj = C.edit_object
        me = obj.data
        bm = bmesh.from_edit_mesh(me)

    bm.select_history.validate()
    if len(bm.select_history) < 3:
        self.report({'INFO'}, 'Pick three vertices first')
        return {'CANCELLED'}

    points3Index = []
    points3 = []
    _ordering = bm.select_history if self.ref_order=="first" else list(bm.select_history)[::-1]
    for i in _ordering:
        if len(points3) >= 3:
            break
        elif isinstance(i, bmesh.types.BMVert):
            points3.append(i.co)
            points3Index.append(i.index)
    print(points3Index)
    if len(points3) < 3:
        self.report({'INFO'}, 'at least three vertices are needed to be selected')
        return {'CANCELLED'}

    points3Normal = normal(*points3)
    for v in bm.verts:
        if v.select and v.index not in points3Index:
            _move = True
            if self.filter_distance > 0.0:
                _move = abs(distance_point_to_plane(v.co, points3[0], points3Normal)) < self.filter_distance
            if _move == True:
                v.co = intersect_line_plane(v.co, v.co+points3Normal, points3[0], points3Normal)

    if ob.mode == 'OBJECT':
        bm.to_mesh(me)
        bm.free()
    else:
        bmesh.update_edit_mesh(me, True)

    return {'FINISHED'}

def menu_func_MESH_OT_3points_flat_trim(self, context):
    self.layout.operator(MESH_OT_3points_flat_trim.bl_idname,
                        text=MESH_OT_3points_flat_trim.bl_label)

def register():
    bpy.utils.register_class(MESH_OT_3points_flat_trim)
    bpy.types.VIEW3D_PT_tools_meshedit.append(menu_func_MESH_OT_3points_flat_trim)

def unregister():
    bpy.types.VIEW3D_PT_tools_meshedit.remove(menu_func_MESH_OT_3points_flat_trim)
    bpy.utils.unregister_class(MESH_OT_3points_flat_trim)

if __name__ == "__main__":
    register()


Dimensions added using MeasureIt addon not appearing in final render How do I make the dimensions added using MeasureIt appear in a final render?

If you click on the View menu of the viewport area of interest, you can choose Viewport Render Image option.
Disabling overlays  keps the measureIt overlays, so you can use that to your advantage:

In order to get your measurements rendered, all you would have to do is:

Click on the Render button in the Render panel which is going to render your measurements as a separate image based on the active camera
Open up a new Compositor window or just switch the workspace to Compositing, add an Image as well as an Alpha Over node
Set the image for Image node to generated image by the MeasureIt add-on
Plug your rendering into the upper socket and the generated image into the foreground (lower) socket of the Alpha Over node

Also have a look into the manual: https://docs.blender.org/manual/en/latest/addons/3d_view/measureit.html.


How to rename selected objects except active object? I wrote a script to rename selected objects except for active objects but it's renaming the active object.
I want the operator button to disable/inactive when the objects are not selected.
Here is my script:
import bpy

C = bpy.context
ao = C.object
name = ao.name
so = C.selected_objects
ao.select_set(False)
for obj in so:
    C.view_layer.objects.active = obj
    obj.name = "SM_"+name

just check if it is the selected object and ignore it
import bpy

C = bpy.context
ao = C.object
for obj in C.selected_objects:
    if obj != ao:
        obj.name = "SM_"+ao.name


In eevee, shadows are clipped by camera distance As shown in the gif, the shadow in eevee is clipped by the camera distance.
The same is true for F12 rendering.
Where are the options to improve this issue?

If this is happening with a "Sun" type light, you want to select the "Light" object in the scene, and in its Object Data Properties Panel, adjust the Shadow -> Cascaded Shadow Map -> Max Distance setting.  Even though this appears in the Light's properties, as per the manual, it's related to camera distance:

  Cascaded Shadow Map -> Max Distance.
      Distance away from the view origin (or camera origin if in camera view) to cover by the cascade. If the view far clip distance is lower than Max Distance, the lowest of the two will be used. Only works in perspective view.


Video preview disappears after adding a color balance node I was trying to color grade a video in the "composite" mode, then I selected "use nodes". I could see 2 nodes in the compositor. No probs.
 But when I tryed to add between these nodes a color balance node, my video preview disappeared as you can see in pictures I sent.

Somebody could Help me?

Your video needs to be added to the composite in the form of a Movie Clip node or as frames in an image sequence node, and then add a Viewer node as output to see the feedback in the backdrop.
Right now, you have a renderlayer node from your scene which probably only gets you the default cube.


Python - How to detect when user opens another file inside Blender? Edit: I think I have found what I was looking for bpy.app.handlers.load_post, but will leave it open for maybe better suggestions.
I have a class variable that is stored in bpy.types.Scene.my_class, which I access with context.scene.my_class.
The problem I am having is that I need this class to be deleted and recreated when the user opens another .blend file from within Blender. The only way I can think of is to store path + file_name to the current .blend and check it before running the rest of my script to decide if my_class needs to be refreshed.

Using a handler to remove my_class:
from bpy.app.handlers import persistent
@persistent
def handler_new_scene(scene):
    del bpy.types.Scene.my_class

I think del scene.my_class will work also, or scene.my_class = None if still need to have the attribute.
In the register function I add my function to the load_pre handler, which will run before a new scene is loaded:
bpy.app.handlers.load_pre.append(handler_new_scene)


How to Set a Property Value in Blender Game Engine? How would I set a property value with python in the Blender game engine?

Here is one way of setting the property value of a game engine object (which has an int property by the name 'upkeycount')

I have setup the following logic on a cube object

Sensor:Keyboard('UPARRAOWKEY') <--> Controller:Python(increment_up_count.py) <--> Actuator('upkeycount')

and following is the code for increment increment_up_count.py

import bge

cont = bge.logic.getCurrentController()

sensor = cont.sensors['UPARROWKEY']

if sensor.getKeyStatus(bge.events.UPARROWKEY) == bge.logic.KX_INPUT_JUST_ACTIVATED:
    owner = cont.owner
    upkeycountAct = cont.actuators['upkeycount']
    value = owner.get(upkeycountAct.propName) + 1
    upkeycountAct.value = str(value)
    cont.activate(upkeycountAct)

Few variations of the above code can be found at https://gist.github.com/satishgoda/5682945


Script to remove faces with significantly different normals I have a mesh imported from a Structure Scanner that has some dirty mesh sections. I have a script that imports, orients and simplifies the mesh to this:

However, looking from the inside shows that some faces are facing inwards, causing problems for another program along to process:

The scanner seems to double up some faces causing these problems. I can get away with deleting the erroneous faces/vertices (leaving holes to be filled in blender or the next stage), but I can't figure a way to detect these areas and remove them.

This solution from another question looked promising, but, firstly, I can't get the script to work and, secondly, it takes an average of the whole selection which wouldn't work on this nearly hemispherical shape.

Is there perhaps a simpler way of removing and correcting these erroneous points, CATIA has "clean non manifold triangles"?

Close up of one of the problems:

A script to select verts based on the angle between normal and radial vector.

An alternative script than the one shown in question link.

In the case where the object is spherical, , after changing the object origin to the centre of the base ring if hemisphere (or where sphere centre would be), can then check the angle between vert  normal and vert coordinate (since vert.co is  also the vector from (0, 0, 0) origin). If it was a perfect sphere, all these angles would be zero.

Test script to run in edit mode. (In vertex selection mode) Change the 90 degree value of angle_check = radians(90) to suit.  The script only selects verts with an angle of norm to radial outside angle_check.

import bpy
import bmesh
from math import radians
context = bpy.context
obj = context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
angle_check = radians(90)
for v in bm.verts:
    v.select = v.normal.angle(v.co) > angle_check

'''
# or by faces
for f in bm.faces:
    f.select = f.normal.angle(f.calc_center_median()) > angle_check

'''
bm.select_flush(False)
me.update()


Displace modifier using an Image Texture on a Grid Mesh I am trying to apply a displacement to a grid mesh for a Lithophane and a cookie cutter.

I create an image Texture, add a Grid mesh and apply a Displace modifier.  Unfortunately the displacement is only on a small portion of the center of the grid.  How can I get the displacement to fill the Grid?

Here is a link to the blender file. http://www.michael-sadler.com/uploads/displace_texture.blend

and here is the image. http://www.michael-sadler.com/uploads/greyscale-raider2.jpg

In the modifier you should use Texture Coordinates > UV in order to control how the picture will print on the surface. So beforehand you must select your plane, go in Edit mode, select all and unwrap with U > Unwrap. I've also tested with a Subdivision Surface modifier above and below the Displacement modifier, it looks like it works better (note that your picture is very pixelated though so it will never be perfect).


How to create and animate the water reflection (Caustics) on an object? What is the best method to create this kind of reflection and how to animate it?

As @gandalf3 mentioned, Cycles is not great at this, if you want to make your render physically accurate; My approach can give you photo realistic results, which are not, however, physically accurate.

Water Movement

You can use a Displace modifier, a Stucci procedural texture and an empty for Texture Coordinates in order to simulate the water movement. Do keep in mind that you'll need a lot of samples in order to get a usable image and a build with the Metropolis patch.

To do this, first add a subdivided plane (Shift + A>Mesh>Plane); then, go to the Modifiers tab in the Properties editor and add a Displace modifier and press the New button to add a new texture. After that, go to the Texture tab and select Stucci; you can later tweak this setting for better results.

Then add a Empty, go back to the Modifiers of the plane and select Object in the drop down list for Texture Coordinates; after that, set the object to be the empty you created earlier.

You can then animate the position and/or rotation of the empty, in order to "animate" the water movement.

Then you can simply add some glossyness to the plane point a lamp at it and render.

Caustics Simulation

A better way is to simulate Throw Patterns on a Spotlight.

Add a Spotlight (Shift + A>Lamp>Spotlight); then add another plane, in the location of the spotlight, and move it down. After that, parent the plane to the spotlight, by selecting the plane first and then the spotlight and pressing Ctrl + P>Offset (Keep Offset). Now, go to the node editor and add a material to the plane, wich looks like the following node tree:

In order to animate the caustics, you can use a Vector Mapping node.

Here, you can animate the X and Y values, for the location, in order to move the caustic pattern around.

Now you can point the spotlight at your objects and git it a test render. Make sure the strength of the spotlight is rather high - I used 2000 - otherwise, you'll not see the light on your object. Also, you can control the softness of the throw pattern by adjusting the distance of the plane to the spotlight or the Size field found in the Lamp tab, on the Properties editor, when the Lamp is selected:

This gives me this result:


Remesh modifier hits cpu instead gpu and crashes Adding the remesh modifier and increasing the voxel amount first triggers the cpu going up to 100% and then crashes blender. I've set CUDA in preferences and GPU for cycles, which otherwise work.
How can I set the GPU for just everything in blender and rule out the cpu?

How can I set the GPU for just everything in blender and rule out the cpu?

Actually, most of the algorithm, operation, modifier, complex computing, data handling is done by CPU, not GPU.
Although Rendering can be accelerated by GPU, but those code is rewrite/design for GPU by developer. Migrating any algorithm to GPU instruction can take a lot of effort due to the lack of some ability and the difference of hard structure. Also, only some algorithm will benefit from GPU.
Remeshing is a complex topic in CG, the new method adopted by Blender is not transferred to GPU code for now. There is nothing Blender can do for you, unless you could develop a GPU accelerated Remeshing algorithm for it.
Algorithm and GPU coding is not that easy as you described.


Driver rotating driven object in the wrong direction? I have set up a driver to rotate an object on its x axis by moving the driver on it z axis. I want to rotate the driven object in a certain direction when moving the driver up and of course in the other direction when moved down. The problem is that these directions are reversed - the driven object rotates the opposite direction in which I want it to rotate when moving the driver. How can I reverse this so that the object rotates in the desired direction?

You can multiply the driver by -1 using the Generator modifier.
This will effectively invert the values.
Original answer on how to set up driver modifiers.


Blender's import scale and units I want to import STL files which I know to be in mm, but blender displays it in meters. I know that I can change the units in properties->scene, but this converts the the units (1m->1000mm), so it's no good.
There is a scale option when I import and I can rescale post import, but I am relectant to do this, since I don't want to multiply and divide large factors on stl files, as this tends to degrade precision from rounding errors.
I actually just want to change unit symbol with no change in the underlying numbers.

Choose unit scale that you like:

0.001 if you need to scale meters to millimeters.


How to make Image Texture have white background and/or transparent background with a second white material behind it on the same object? I have a creature in Blender that I'm trying to texture the eye of. Right now the eye is a sphere with an Image Texture Material on it. The Image Texture is a .png of a pupil with a transparent background. When I put that as an Image Texture on a material, it shows up with a Black background. But I want the creature to have a white eye behind the pupil.

How do I toggle with the settings to achieve a White background behind the transparent-background pupil texture png? I can attach pictures of my setup if needed but I've barely touched the default settings.

Thank you.

Edit: Solved! Submitted answer below.

This answer helped me the most: Change color of PNG background (transparent to color)

Particularly using the MixRBG for Nodes (which btw are in 'Shader' window, not 'Nodes' window)

I copied the MixRBG part of this guy's setup. https://i.stack.imgur.com/kZOHk.jpg

Thanks all!


EEG Keyboard Emulator I am using an EMOTIV Epoc to emulate a keyboard. EMOTIV is a company that develops sophisticated brain-monitering devices. One can read about them here.
My device sends the keystrokes just fine into applications like Word, but when I try and use it with the Blender Game I have created it doesn't seem to work. I'm also using a Macbook Pro, if that helps. Any suggestions?

keyboard emulators or keystroke generators often make use of the Operating System's UI functionality to send the keystrokes to applications. Since Blender comes with its own UI the codes won't be recognized.

I don't know much about Mac OS and Macs in general because I don't use them anymore but maybe there are other tools that provide the functionality on a lower OS level. There certainly are some for Windows.


Cloud texture type in cycles? where to find the clouds texture type in node editor while using cycles? it is there while using displace modifier but not in node editor.

blender internal clouds

all default settings, shadeless material.

cycles noise

Niose texture Scale set to 8. All rest left to defaults. Cycles shadeless material, with a RGB Curves node to boost the contrast in the Noise Texture.

With those few settings changed you can get the cycles noise texture look very much like the blender internal clouds texture.


Bones triangle segments gone I'm new to Blender, and a few times I've loaded in other peoples models and
noticed the "triangle" segments like in the right picture are completely gone, so it's kind of hard to select the bones themselves to add a simple IK rig.

Are they hidden, gone, or a different type of bone all together?

If the last is the case, how do I change them?

What you call triangle segments are octahedral bones, they are the way bones display by default. You can change the appearance of bones, for example you can switch to rectangular bones: Select the armature, go to the Properties panel > Object Data > Viewport Display > Display as.

But you can also replace a bone by a custom object, meaning whatever shape you want: Switch your armature to Pose mode, select one of your bones, go to the Properties panel > Object > Viewport Display > Custom Object, click on the X if you want to come back to the default octahedral shape.

That said I'm not sure how your armature works...


About Painting Bump texture When i try to paint Bump texture on cube its outline appears to be distorted. I have used 4k Bump image.Could anyone tell how to make bump painting smooth.

here is a 1024x1024 example.

go to shader editor and make the first option in image texture to cubic or smart.


Ambient occlusion from high to low poly this is the first question that I post here, I want to know how the ambient occlusion bake works due to the work I did on these 2 models (high poly is still wip)

and this is the AO bake I managed to make

I'm a complete noob when it comes to creating textures through bake, how can I avoid all that problems and artifacts in bake? for example the grid in the center has completely black results whereas the middle plate of the grip has a good result

One cause of these artifacts may be hidden, but "set as to render", objects. If some of their faces might overlap to your active object during the baking.

Even your high poly object can cause this if you don't correctly enable the option "bake selected to active".

Example:

Low and highpoly

Object are in the same location, so faces overlap themeselves or are occluded

Image above is the baked with with the option disabled

This is if it is enable. You must select the highpoly, and THEN the lowpoly in order to get this result.

Someone asked for a moon? :-)


How to find all objects in the Camera's view with Python? I have a scene with a many objects and one camera.

I would like to select the objects that the camera sees, even partially.

Is there a way to do that in Python that accounts for the objects bounds?

Note, I know that KD trees and Octrees are used for the lookup. There is mathutils.kdtree but the example only suggests how to query objects close to a point. I'm not familiar with the math for combining camera frustrum and binary trees lookup.

There are a few different ways to handle this, you could...

project into 2d space, then detect which objects are in the 2d frame.
calculate the camera bounds in 3d and detect which objects are inside it.

Here is some sample code that demonstrates the second method. It uses a set of planes (4 or 5 for orthographic cameras) and finds all objects that have any part of their bounding boxes within the planes:

Note, this isn't all that elegant, we could for example have a single function that intersects 2 sets of planes - one for the camera - another for the bound-box. However this is at least working and can give you some starting point - others may like to improve or post a method that uses projection.

def camera_as_planes(scene, obj):
    """
    Return planes in world-space which represent the camera view bounds.
    """
    from mathutils.geometry import normal

    camera = obj.data
    # normalize to ignore camera scale
    matrix = obj.matrix_world.normalized()
    frame = [matrix @ v for v in camera.view_frame(scene=scene)]
    origin = matrix.to_translation()

    planes = []
    from mathutils import Vector
    is_persp = (camera.type != 'ORTHO')
    for i in range(4):
        # find the 3rd point to define the planes direction
        if is_persp:
            frame_other = origin
        else:
            frame_other = frame[i] + matrix.col[2].xyz

        n = normal(frame_other, frame[i - 1], frame[i])
        d = -n.dot(frame_other)
        planes.append((n, d))

    if not is_persp:
        # add a 5th plane to ignore objects behind the view
        n = normal(frame[0], frame[1], frame[2])
        d = -n.dot(origin)
        planes.append((n, d))

    return planes

def side_of_plane(p, v):
    return p[0].dot(v) + p[1]

def is_segment_in_planes(p1, p2, planes):
    dp = p2 - p1

    p1_fac = 0.0
    p2_fac = 1.0

    for p in planes:
        div = dp.dot(p[0])
        if div != 0.0:
            t = -side_of_plane(p, p1)
            if div > 0.0:
                # clip p1 lower bounds
                if t >= div:
                    return False
                if t > 0.0:
                    fac = (t / div)
                    p1_fac = max(fac, p1_fac)
                    if p1_fac > p2_fac:
                        return False
            elif div < 0.0:
                # clip p2 upper bounds
                if t > 0.0:
                    return False
                if t > div:
                    fac = (t / div)
                    p2_fac = min(fac, p2_fac)
                    if p1_fac > p2_fac:
                        return False

    ## If we want the points
    # p1_clip = p1.lerp(p2, p1_fac)
    # p2_clip = p1.lerp(p2, p2_fac)
    return True

def point_in_object(obj, pt):
    xs = [v[0] for v in obj.bound_box]
    ys = [v[1] for v in obj.bound_box]
    zs = [v[2] for v in obj.bound_box]
    pt = obj.matrix_world.inverted() @ pt
    return (min(xs) <= pt.x <= max(xs) and
            min(ys) <= pt.y <= max(ys) and
            min(zs) <= pt.z <= max(zs))

def object_in_planes(obj, planes):
    from mathutils import Vector

    matrix = obj.matrix_world
    box = [matrix @ Vector(v) for v in obj.bound_box]
    for v in box:
        if all(side_of_plane(p, v) > 0.0 for p in planes):
            # one point was in all planes
            return True

    # possible one of our edges intersects
    edges = ((0, 1), (0, 3), (0, 4), (1, 2),
             (1, 5), (2, 3), (2, 6), (3, 7),
             (4, 5), (4, 7), (5, 6), (6, 7))
    if any(is_segment_in_planes(box[e[0]], box[e[1]], planes)
           for e in edges):
        return True

    return False

def objects_in_planes(objects, planes, origin):
    """
    Return all objects which are inside (even partially) all planes.
    """
    return [obj for obj in objects
            if point_in_object(obj, origin) or
               object_in_planes(obj, planes)]

def select_objects_in_camera():
    from bpy import context
    scene = context.scene
    origin = scene.camera.matrix_world.to_translation()
    planes = camera_as_planes(scene, scene.camera)
    objects_in_view = objects_in_planes(scene.objects, planes, origin)

    for obj in objects_in_view:
        obj.select_set(True)

if __name__ == "__main__":
    select_objects_in_camera()


How to resize selected part of uv image in python? I'm trying to select a part of my uv image. Like this:

At blender, everything looks well.

BUT I need to do this at .py archive. How you can see, Blender "says" that it using bpy.ops.transform.resize(...) to do this.

Using the script that Blender suggests, however, another thing happens!

How I could do, at python, the resizing showed at second image?

My script untill now:

def create_score():
#adding empty object
bpy.ops.object.empty_add()
empty_obj = bpy.context.object
empty_obj.name = "score"

#adding score plane
bpy.ops.mesh.primitive_plane_add(radius=1, location=(0.5,6.7,0))
bpy.ops.transform.resize(value=(-8, -8, -8), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)

#adding score object1
bpy.ops.mesh.primitive_plane_add(radius=0.5, location=(-6, 7.2, 0.1))
obtext1 = bpy.context.object
obtext1.name = "Score1"
obtext1.select = True
bpy.ops.object.editmode_toggle()
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces[0].viewport_shade = 'TEXTURED'
        area.type = 'IMAGE_EDITOR'
bpy.ops.image.open(filepath="//../../textures/arialbd.tga", directory="/home/camila/Documents/cinemaxd/PlayerXD/textures/", files=[{"name":"arialbd.tga", "name":"arialbd.tga"}], relative_path=True)
bpy.data.screens['UV Editing'].areas[1].spaces[0].image = bpy.data.images['arialbd.tga']
bpy.ops.uv.unwrap()
bpy.ops.uv.select_all(action='TOGGLE')

This

# store original area type
originalArea = bpy.context.area.type
# change current area to image editor
bpy.context.area.type = 'IMAGE_EDITOR'

#insert UV specific transforms here

#return to previouswindow for good measure ( and cleanliness )
bpy.context.area.type =originalArea

Do not helped too :/

At last, i've found an answer:

#edit the object
bpy.ops.transform.resize(value=(0.1, 0.1, 0.1))
#edit the image's selected part size
bpy.ops.uv.smart_project(island_margin=0.4)
#come object to first status
bpy.ops.transform.resize(value=(10, 10, 10))

I know, it's a kludge. But it's a pretty kludge, and works! :)

Thanks everybody.


How to drive camera's Y location with same camera's Focal Length This isn't for an animation, so I'm not inserting keyframes - as I view the model through the virtual camera, I want to experiment with different focal length values in Eevee and Cycles; but to not lose the model, I want to move along the Y-axis specifically to keep the model roughly the same size in the frame.

This solution uses only 1 driver, to drive the y value of the camera's transform depending on its focal length.

I used a linear regression calculator online (Search "Linear regression calculator" on your favorite search engine) and I mapped a few values of the focal length and the resulting y value necessary to keep more or less the same objects in frame. I arrived at a value of y (transform) = 0.28 * focal length +1. I assume the exact values will be different from scene to scene but it can be found quite easily using said regression calculator. I used this simple setup :

In order to drive the y transform value, right click in the focal length field and choose "Copy as new driver". Right click in the y transform field of the camera and choose "Paste driver". Right click again in the field, and choose "Edit driver". Then change the evaluation type to "scripted expression" and enter the above formula (in my case 0.28 * lens + 1) :

The result :

Edit :

If you want to use this technique to be always true for its local z-axis, that is to say the forward/backward axis of the camera, follow this :

Select the camera, Press SHIFT + S then choose "Cursor to Selected"
Press  SHIFT + A then choose "Empty" (whichever type)
Add a "track to" constraint to the empty, set it to one of the objects of focus in your scene. If you don't have a particular object, just add a new empty and set it somewhere in the middle of your scene. The constraint should look like this :

Select the camera object, then the empty, and press CTRL + P, choose "Set parent and keep transform"
Now when you move the empty around your scene, the camera should follow it exactly and always turn toward the focus object you chose earlier.
Do not move the camera directly . If you followed previous steps this should already be working. You will most certainly have to tweak the values a little bit though.

Result :


Icon colors are difficult to see I changed a lot of items individually in the Edit>Preferences>Themes options to make it easier for my deteriorating vision. Somehow these changes made the icons for the toolbars on the right funny colors, vary pale with turquoise accent colors.

Nothing I set under the Icons section has that turquoise color, so the shading and color come from something else apparently. I have been reading that the icons are supposed to hard wired into the program and monochromatic, but something has changed them, somehow. Since I don't know what changed them and I can't find that turquoise color on any other items I set.

I did find I could set the background of the icon to black and then I could see them, but my vision does better seeing black items on white backgrounds so if there is any way to adapt these icons on the toolbar, I would like to know.

If you are talking about these icons:

You need to change the Themes>User Interface>Tab Inner, Selected and Outline colors.

Edit: OK, you mean these:

Unfortunately, those are built from source. See this link if you are interested in trying to modify them.

You can change the background and border though by going to User Preferences>Themes>User Interface>Tool and changing the Outline and Inner Options.


Python BGL: X-Ray mode Is it possible to draw 3d lines/points with X-Ray in BGL?

Here is my custom 3d line in viewport:

As you can see it's drawn behind the monkey head. Is it possible to make it as X-Ray?

Here is the code i use:
https://github.com/mifth/mifthtools/blob/ff2bd836267deb0c0d5f0c0bb28904876068bba3/blender/addons/mira_tools/mi_curve_test.py#L331-L349

as @CoDEmanX noted you can disable the depth test with bgl.glDisable(bgl.GL_DEPTH_TEST) while drawing and use the POST_VIEW.

here is an example code of a modified draw modal operator :

import bpy
import bgl
import blf
from mathutils import Vector
from bpy_extras import view3d_utils

def draw_callback_px(self, context, points):

    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
    bgl.glLineWidth(2)
    bgl.glDisable(bgl.GL_DEPTH_TEST)

    bgl.glBegin(bgl.GL_LINE_STRIP)
    for x, y, z in self.points:
        bgl.glVertex3f(x, y, z)
    bgl.glEnd()

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glEnable(bgl.GL_DEPTH_TEST)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'LEFTMOUSE':
            if event.value == 'RELEASE':
                co_2d = Vector((event.mouse_region_x, event.mouse_region_y))
                viewport = context.area.regions[4]
                r3d = context.area.spaces[0].region_3d
                nor =  view3d_utils.region_2d_to_vector_3d(viewport, r3d, co_2d)
                v3 =  view3d_utils.region_2d_to_location_3d(viewport, r3d, co_2d, nor)

                self.points.append(v3)

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'VIEW_3D':
            self.points = []
            args = (self, context, self.points)
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()


normal map inverted in cycles I've been working on a piggy robot model in Blender for some time, and I'm having some issues texturing in Cycles, specifically with the normal map.
For some reason, Blender inverts half of my normal map on the model, which make the seams that are supposed to go inward are now sticking out (every line on the texture/normal map is supposed to be an indentation, like this, but without the lines being black, if you know what I mean:

And this is what happens when I try to apply the normal map:

Now I've tried to invert the green(y) and red(x) channel of my normal map in photoshop (with help of the nvidia plugin) but it turns the normal map slightly transparent, so when I use the png in blender, the whole texture becomes much darker (the material should be a glossy plastic material).
After that I tried to see if maybe changing the normal map node from 'tangent space' to 'blender object space', and that made the seams work, but also darkened the texture again, like this:

I'm kinda lost as to what I'm supposed to do now.

The normal map you are using is baked for tangent space. Blender tries to calculate the tangent and binormal vectors from a UV map. The problem here is that along UV seams the tangent direction can change. This is why you get weird shading along the UV seams.

A simple solution is to calculate the normalmap in Object space (use "Object Space", not "Blender Object Space" in the Cycles shader). However this will not work if your object gets deformed, for example by animation bones. Also there still seem to be some artifacs and the normals seem not to be calulated smoothly (see red box below).

Using the displacement texture directly instead of the normal map gives you perfectly smooth shading, so I think you should it instead.

Apart from the texture issues your object also has a bunch of flipped normals: inside the nostrils, the eye sockets and inside the holes where the ears are attatched to the head.


(2.8) Do you need to apply subdivision surface mod before UV unwrapping for texture painting? I am relatively new to Blender, using 2.8, and just made a model using the subdivision surface modifier. I'm onto the texture painting phase, but whenever I select all geometry in edit mode and unwrap, I get the unwrapped version without the subdivision modifier applied. I don't want this since I want to paint directly on the surface itself. Do I need to apply subdivision surface to do this, or is there a way to unwrap with the modifier already applied?

If you just unwrap it as normal, so that it unwraps the un-subdivided version of the mesh, and then start texture painting, it should work as expected.  If not, you can apply the subdivision modifier and then unwrap.


Selection goes through objects I am working on a kind of Voxel design. However, whenever i use box or circle select in object mode, it selects all of the objects in the path, not just the visible ones, how can i get around this so i only select the ones on the surface?

This is intended behavior, At the moment circle selection in object mode uses object centers only.


How do I change the default settings of export operators? I made a panel with an Export Modified Model STL button. Right now I am using...
class Export_STL(bpy.types.Operator):
    bl_idname = "diamond.export_stl"
    bl_label = "Export Modified Model STL"

    def execute(self, context):
        bpy.ops.export_mesh.stl('INVOKE_DEFAULT')
        self.report({'INFO'}, f"This is {self.bl_idname}")
        return {'FINISHED'}

It works but I need the default settings to have "Batch Mode" to Object" and a check on the "Selection Only". How do I write this in the script?

You don't necessarily need to write a custom operator to re-use the existing one. You can call the operator in your layout and change its properties, see How to pass multiple operator properties via UI layout?
import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        op = layout.operator("export_mesh.stl", text="My Custom STL Exporter")
        op.use_selection = True
        op.batch_mode = 'OBJECT'

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

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

if __name__ == "__main__":
    register()

You can find the operator's parameters in your blender install path / 2.** / Scripts / addons / io_mesh_stl / __init__.py under the ExportSTL class.  :
use_selection: BoolProperty(
    name="Selection Only",
    description="Export selected objects only",
    default=False,
)
global_scale: FloatProperty(
    name="Scale",
    min=0.01, max=1000.0,
    default=1.0,
)
use_scene_unit: BoolProperty(
    name="Scene Unit",
    description="Apply current scene's unit (as defined by unit scale) to exported data",
    default=False,
)
ascii: BoolProperty(
    name="Ascii",
    description="Save the file in ASCII file format",
    default=False,
)
use_mesh_modifiers: BoolProperty(
    name="Apply Modifiers",
    description="Apply the modifiers before saving",
    default=True,
)
batch_mode: EnumProperty(
    name="Batch Mode",
    items=(
        ('OFF', "Off", "All data in one file"),
        ('OBJECT', "Object", "Each object as a file"),
    ),
)


Is there a way to read the rotation_quaternion data of an object that is under the control of the physics engine? I'm trying to use blender to test the probabilities associated with different faces of non-cubic dice (some of you may even know why). I've already written a python script that randomly sets the objects position, rotation, initial linear velocity and initial angular velocity, then bakes the physics and jumps to a frame where the shape is likely in a settled position. The problem is that the rotation data at this frame seems to be the same as the frame right before the physics engine took over. It looks like the physics engine doesn't operate directly on object transformations. Is there a way to get this rotation information from python? Right now I can't even seem to find it in the UI.

There's a fairly simple way to get the transformations of an object under a physics simulation without baking (which also applies to other situations such as parent-child relationships, constraints, etc).

To do this you simply need to access the object's world matrix property. Here are some examples you can test through the interactive python console:

# Accessing through the location property will give the initial value before the simulation starts
>>> C.object.location
Vector((0.0, 0.0, 14.47101879119873))

# The world matrix though gives the real, simulated location
>>> C.object.matrix_world.to_translation()
Vector((0.5996798276901245, 1.5040934085845947, 1.7373782396316528))

# Same goes for rotation
>>> [ degrees(a) for a in C.object.rotation_euler ]
[0.0, 0.0, 0.0]

>>> [ degrees(a) for a in C.object.matrix_world.to_euler() ]
[176.1907675277052, -11.192468775907107, -74.38630617504491]

# To access quaternion rotation values, simply use "to_quaternion"
>>> C.object.matrix_world.to_quaternion()
Quaternion((0.17901940643787384, -0.7067779302597046, 0.6757702231407166, -0.10840550810098648))

You can also add an app handler that calculates and prints the simulated location and rotation after every frame change:

import bpy
from math import degrees

def print_simulated_loc_rot( scene ):
    C = bpy.context
    o = C.object

    simulated_loc   = o.matrix_world.to_translation()
    simulated_rot   = o.matrix_world.to_euler()
    sim_rot_degrees = [ degrees(v) for v in simulated_rot ]

    print_friendly_loc = [ round( v, 2 ) for v in simulated_loc   ]
    print_friendly_rot = [ round( v, 2 ) for v in sim_rot_degrees ]

    print( "Location: ", print_friendly_loc )
    print( "Rotation: ", print_friendly_rot )

bpy.app.handlers.frame_change_post.append( print_simulated_loc_rot )


Wind Field freeze at frame 250. Where can it be changed? I have setup a project of 250 frames with a flag and a wind force field. It works fine until I change the length of the project to 520 frames, then the flag is frozen after frame 250. There must be a simple way to change this. Thanks for any help. Regards, Daniel.

I pressume you are using cloth simulation for the flag. Go to the Cloth cache and modify the end to the number of frames you need.


Move vertices but keep original shape I want to retarget a asset store asset I have for a slightly different use case. So I need to narrow it down a bit but keep the shape of it. If its a straigth shape I can just move the vertices and it would just work. But this is a curved shape. See screenshot. How Can I narrow it down without ruining the shape? Also I need to preserve UV too.

edit: It seems edge slide is doing just what I want and then check Correct UVs

If you select all of the horizontal edges (you must be in edge select mode) and then set the pivot point to Individual Origins you can scale just the edges that control the with of your object.

Another option is to double tap G and slide each outer edge loop towards the center.


I need to setup a camera to follow a character in blend4web I'm working on a proof of concept for my comic companies website and want an immersive experience. To that end the goal is too put site visitors in the shoes of a character and have users "follow" the character in a click and point adventure.

(Until I can conceive of a free roaming control scheme that works for mobile and desktop)

I don't need a full third-person camera setup, though that would be ideal. I'd prefer to prototype with logic nodes of that's possible. Problem is not all constraints work in blend4web. Is there a work around that can get the prototype up and running that doesn't require me to dive into "The Joy of Coding" until after I make the proof of concept public?

In b4w where is 3 predefined camera setups:

https://www.blend4web.com/doc/en/camera.html#hover-type-camera

You need to change camera type to hover


How to reduce polygon count I want to reduce the polygon count from a model of around 50,000 faces to exactly 1,000 faces. Give me the settings and numbers okay?

It is impossible to exactly reduce the amount of faces of an object, but there are tricks to doing so:

1) Use the decimate modifier, and adjust the settings while watching the faces-count and the quality of the object.
Here's how this works: Go to the modifiers tab, and select decimate. Then set this modifier to un-subdivide. The modifier will show the amount of faces in the object at the bottom. Set the iterations amount, (a couple should do fine), and watch the quality of the object and the amount of faces.

2) Another thing to do: Limited Dissolve in edit mode. This won't let you specify the face-count, but you can adjust it so that you get a lower-poly result.
Do this by selecting the object, going to edit mode, and selecting mesh > cleanup > limited dissolve. Adjust the angle factor, and watch the faces.

3) Nobody wants to do this, but go to edit mode, select certain faces and press F on the computer keyboard. Manually combine the faces until you have exactly 1000 faces (if you want), or as many as needed.

I hope these tips help you, and/or answer your question!


Image not appearing in UV edit mode In trying to place an image onto a surface (Blender v2.74), i've become unable to use the picture i've attached. The file format of the image is .png, and although it uploads fine, when switching to UV edit mode, nothing appears in the left-hand window [see pictures for reference].

Could anybody explain to me what the issue is here, and how to fix it?

You have no image selected, you need to select the image for it to be displayed.
To select an image, you must click the little image icon () in the bottom center of the uv image editor and find your image. Then select your image. If you have many images, you my need to you the search function to find the right one, just type the name of the title. of course, you only have one, so you don't need that. :D


How do I open an obj file? I tried to open an .obj file using import but all I got was the workstation with the block. Yes, I'm a total beginner.

Only .blend files can be opened by Blender. Other file formats can be only imported.

Obj Import

Go to File ‣ Import ‣ Wavefront (.obj) and choose the file.

Remember to save the Blender file as a .blend file. If you wish to export the obj file go to the menu item File ‣ Export ‣ Wavefront (.obj).


Glass texture has Voronoi like texture on it when using glass BSDF I followed a tutorial on how to make a good paint texture
(found here: https://www.youtube.com/watch?v=jlfBvt0O6Dk).

The texture came out nice, but when i go to add a glass texture for the windows it always looks as if it has Voronoi applied to it.

I note that there is a distinct possibility that it has nothing to do with Voronoi, but it is the best way i can describe the way the glass looks.

The final render (showing how the glass is keeping Voronoi?)

The nodes used to create the paint texture (This shouldn't have anything to do with the glass, but i'll keep it here just in case)

The nodes used to create glass texture

https://imgur.com/a/6sL8T

The desired output would look something like this:

(this was done by removing the glass and thus isn't really adequate as a solution)

Here is a copy of the Blender file:
https://www.dropbox.com/s/toms123eho2w589/2017fordfocus.zip?dl=0

The model is a mess. When you download models created by other people you are always prone to inherit a lot of buggy geometry and bad modelling habits of the creator, plus those created by the translation into different formats.

The particular model is plagued with duplicated geometry, hence the z-fighting. All of those dark triangles that you see are not only on the windshield but in every surface, are caused by overlapping vertices

You need to do "remove doubles".

The normals are all messed up (in edit mode select all of the vertices and make them consistent (Ctrl+N).

On top of that, whenever you are dealing with glass you need it to have some thickness (see this link: https://blender.stackexchange.com/a/69616/1853)

The glass shader you are using makes no sense. See this link for a proper  shader: How to illuminate the darkness inside glass objects in Cycles?.

The scale for the object is also wrong.

There is probably more, but that you will have to figure out on your own.

If you are doing experiments with textures, first make sure that the model you are going to use is decently crafted so that you can focus on the textures.


Freestyle External Contour has Large Gaps. Error Related to Topology? Large Gaps appearing in external contour. I've disabled any modifiers and have troubleshot the issue extensively using other "gap fix" procedures & recommendations. Error appears to occur at very acute angles, but line-render isn't tied to occluded freestyle edges. Error somewhat affected by rotation of object

I ran into a similar issue, in my opinion this is a bug ocurring when working with larger geometries. Try scaling your geometry down (dimensions below 100 units) and try again.

For bigger geometries sometimes whole lines or part of lines (always when crossing with hidden lines as seen from the camera) are disappearing, this goes away when simply scaling down. See the screenshots below.

I've file a bug report here, including a testfile: https://developer.blender.org/T49479

Update: According to the bug report, this bug has been fixed end of December 2016 and should not occur anymore in newer versions of blender.


How to fix this stretched texture? I try to apply this material on my object but I can't figure out how to fix this stretched texture.

as you can see in the screen, i use Blender v2.79
my meshes are unwrapped on the only existing UV map
I deleted and recreated the material
I had this on other scenes in the past few days

Thanks.

It looks like you have the wrong texture node. From what I can tell you are trying to use an image texture in an environment texture node. If you switch the environment texture nodes to image texture nodes everything should work.


How can i activate the alpha on Blender Render? I already activated the transparency, the alpha, what i'm missing? if i see the texture preview it looks like it doesnt have a background, but when i render it it still appears.
Help please!

You need to enable it in the Material settings:

Tick the Transparency checkbox and set the Alpha value to 0.

Also be sure to make that the texture Influence affects the Alpha value:


Blender pure video editor - overlay image with transparent areas I just want to edit a video I recorded with my camera and add a logo onto it.

The logo is a PNG with transparent areas, and I want these areas to show the underlying video.

Unfortunately, this answer doesn't help me, it simply doesn't seem to change anything. When I click "render animation", the video shown contains the logo without transparent areas but with the "chess" background instead.

How do I do that?

Found it out.

When you add an image to the VSE (video sequence editor, where videos, audios, images, etc. appear as bars like a timeline), click the image bar with the right button. A properties panel will appear for that image, containing the filename and other information about it.

Under the "Edit Strip" section of that panel, change the "Blend" combobox to "Over Drop". (Usually it starts with "cross").

That will make the image transparent areas actually transparent on the video.


Blender 2.8 API, python, set active object I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80.
The problem is with

bpy.context.scene.objects.active = some_object

This is how I used to set an active object, the problem is, active property was removed in the new API!,reading other Q&As, I found 2 suggestions:

bpy.context.object

and

bpy.context.active_object

The problem is, both of these will return the already active object, but when I try to use them this way:

bpy.context.active_object = some_object

or

bpy.context.object = some_object

I'm getting an AttributeError: property is read-only!

I tried the documentation with no luck!

EDIT:

According to Blender 2.8 WIKI API changes:
https://wiki.blender.org/wiki/Dev:2.8/Source/LayersCollections/API-Changes

bpy.context.scene.objects.active

changed into

bpy.context.render_layer.objects.active

This doesn't work, AttributeError: 'Context' object has no attribute 'render_layer'

Use the view_layer
Set ViewLayer.active to any object in view layer or None
context.view_layer.objects.active = ob

Note selecting has also changed from ob.select = True to
ob.select_set(True)

which together will emulate the general case  UI state of having the context object  both active and selected.


Blender 2.8 Colour wheel weirdness Using 2.8 Beta I discovered that most of my colour values end up being a shade of pink, (irritatingly) and I'm not sure quite what's going on. It happens with literally everything. Is there a setting I need to change, or is this actually a bug? As you can see in the screen recording, the white dot in the centre is moving around.

Thanks in advance.

In render tab - color managment set Display device to sRGB

Maybe, it is a good point for 2.8 start with factory settings.


Hide subsurf modifier curve in edit mode I have added a subsurf modifier, and because of that I can see some extra curves in edit mode. I want to hide these curves in edit mode because it is hard to distinguish them from the actual verticies. How can I hide the curves of the subsurf modifier in edit mode or maybe make the a different color?

To disable the modifier only in edit mode press the cube icon:

You can also:

Enable the Deformed display which deforms the edit mode mesh to the subserfed object, making it easier to see geometry. Note that this can make tools like loopcut and knife hard to use, you may have to disable it to use those accurately.

Disable the modifier in the viewport by clicking the eye icon (affects object mode too). This will not affect the render. To disable the modifier in the render, click the camera icon.


Particles are not in contact with object I've been watching Andrew Prices tutorial on "how to make a cave in blender". So now I'm trying to put mushrooms in the cave as a particle system to spread them along the floor of the cave.

Unfortunately, as shown by the red arrows, some of the mushrooms are not in contact with the cave at all, and are hovering either above or below the cave floor.

Is this some kind of setting that makes particles placement random? Anyway, here's the .blend file if you wanna take a look.

Also, I wouldn't mind if I got some overall feedback too!

It seems it is the child particles which are being placed above or below the surface. I found that changing the 'Children' type on the particle system from 'Simple' to 'Interpolated' created a more accurate result, though I'm not quite sure why 'Simple' children wouldn't respect the location as much:


What is the reason the view isn't rotated around the selected object? Using v2.79.

I wonder why the view isn't rotated around the selection, in some cases, in spite the related setting in User Preferences is set to Rotate Around Selection.

An example below, which was obtained this way:

I had the yellow cube showing the problem. I determined approximately the point of rotation of the view and set a yellow empty to show it.
Then I tried with a new object, the red cube. This cube hasn't got the problem, the view is appropriately rotated when this one is selected.
I duplicated the yellow cube and empty into blue ones, and changed the location and direction of the blue pair. The blue cube shows the same problem, and the point of rotation of the view is located at the same relative positive (indicated by the blue empty).

File: rotation.blend

In case that would help to explain, the initial cube was previously used for some tests with a Displace modifier.

What is the reason I cannot rotate the view around the yellow/blue cube when selected?

Go in Edit mode and select all, as you can see you've accidentally created a vertice far from the origin point of your mesh, it completely moves the rotation centre of your 3D view (as the Rotate Around Selection option, in the User Preferences, seems to consider the Geometry Origin, not the current origin of the object, as its pivot point):

In Object mode, if you selected this object, you weren't able to see this vertice, it looks like you can see edges and faces (surrounded by an orange line) but not isolated vertex.


Armature is not moving all vertex equally even though they have the same weight I'm working on a low poly game and I decided to use blender to model and animate. This is my first time really using it, so I could use some help.
I modeled an arm and apply an armature following a youtube tutorial. I parented the mesh to the armature using automatic weights and it works for the whole arm and wrist, but it didn't work for the fingers, so I tried setting the weights manually.
The problem is that I'm settings the same weight to all the finger vertex, but some of the vertex seem to move slower than others, causing the finger to quickly deform.
This is how I did the weight painting.

In here you can see how the 2 lower vertex are moving very little in comparison to the top 2.

Finally you can see what happens when the finger is moved from the next bone.

Any idea why this could be happening or any way to fix it?
Thank you for your help!

Sometimes vertices are assigned to more than one bone by accident, and Blender gets confused. A bit tedious but go through vertex groups one by one and see what’s being selected. Can also check this with weight paint, but found Vertex groups more accurate.