UV Map - Changes direction midway I hope that will be my last question about UVs in blender.

I now have an object unwrapped. The Quads are sometimes not exactly squares. On one site they get smaller so its a trapeze. Therefore when the UV is a normal square the uv tiles should get smaller to the smaller site of the square but in my case they are randomly changing direction like it can be seen in the image.

Here is my blender file so that you can look up my UV:

BlenderFile

This is a problem related to uv coordinate interpolation. It is inevitable when working with very low mesh density. To avoid
this kind of problem increase mesh resolution by adding few extra loops.

As you can see the distortion runs along triangles - this is the way uv is interpolated in quad polygons.


Evening sky, or how do I use the Sky Texture Node? I'm trying to create a sky and light setup to approximate this image:

Something like what photographers call the blue hour. Apart from the orange spot lights there is the gradient created by the indirect light from the sun that is sitting below the horizon. I have made this super quick setup to begin approximating it:

Why does the ColorRamp not work as it should? With four colour stops I should see a gradient no? With the orange on the horizon. You can see the sunlamp is pointing directly up, so the light on the sphere is coming from below.

Maybe there is something I'm not understanding about how to employ the Sky Texture. Can it be tied to the sunlamp in some way?

The light from the sky should affect objects in the scene as well as the spot lamps. So how would you recreate the sky and lights for a scene like the image? Sincere thanks for your suggestions.

I don't know anything about Sky Texture but it looks like this setup works the way you want:

Plug the Sky Texture (Preetham mode) into a Gradient into your ColorRamp (always better to use a Gradient before a ColorRamp if you want your gradient to look like your ColorRamp spectrum, I dont know why though).

You can also use Texture Coordinate > Mapping nodes before your Sky Texture if you want more control on the sky position/orientation.


How to get outer glow to the object I have a node setup and got this effect.

Node setup

Result

Need to have a outer glow to the object like this

Outer Glow

What extra node i have to add to get the above result to glow my object. Any suggestion or help. Thanks

Create a box.
*Create a new shader for the box
*Unplug material from material output.
*Create a new principled volume shader
*Connect it to VOLUME on material output
*turn density to 0.02
*Play with absorption.

Put the box enclosing the monkey.

Volume shading will capture light by the absorption and density parameter.
Hope this helps.


My Minecraft's Player rig doesn't have shadows, how to fix? So, I have a Minecraft's player rig, I've put a light spot and made the render, but I can't see the shadow of the rig, how can I fix it?

Select your light object, head over to the light options tab on the right hand side, and turn on shadows.


Rigify not generating a full rig skeleton I am new to Blender, and am currently following tutorials to try and generate a rig using rigify. However as you can see, it's only generating a rig for a few bones, not the complete skeleton:

After searching for a solution, the only answer I can find is to make sure Auto Run Python Scripts is turned on, which it is. Here (hopefully, if I've done it right!) is my Blender file:

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

Rigify uses a python script to generate the controller rig. Changes to the base metarig can mess up this script, preventing parts of the armature being generated.

While it looks like you started with the metarig, your rig doesn't have a spine or shoulder bones. The original metarig has hips-spine-chest-shoulder-upper_arm you have hips-chest-upper_arm. These missing bones will be the reason the script is failing.

Create a new metarig and adjust the existing bone positions to where you want them, leaving each existing bone in place.


Why do i have bald spots with hair particlesystem? I have a camel mesh, both mirror and subdivision surface modifier applied, with armature on it and I wanted to give it some hair. I added a hair particle system with interpolated children and made a density group, but I have got some bald spots in some areas. I am sure, that I am using correct vertex group to control density, I tried to make some changes in the emission panel in the advanced particle settings. The only way to solve this I found was to make same number of hairs per face, as is the number of faces, but since I have over 12 000 of faces, this isn't quite ideal. here is picture of how it looks:
here are the problematic parts of my model:  (so far I know about tail and legs. It isn't whole model, just the parts.)

For some reason that I cannot find, some of the interpolated child hair strands are growing inwards -no bald areas actually. You can see little dots in those areas which are the root of that bad children that are growing inside the mesh. The interpolation is bad though the face normals are fine and I couldn't find any other cause for this.

So, as the problem is the interpolation between parents, the solution is adding more parents manually.

Go to the Particle Edit mode, then choose the Add tool and add a parent wherever there is a bald spot. Then, the Children will rearrange around the new parent and will face towards the face normal as the parent.

You can se above that I fixed the right leg.

Note that doing this means have more parents and, eventually, will create more children too. You might want to change the number of children.


Why I can't smooth a cylinder right in Blender? Why can't I smooth the upper cylinder like the bottom one? I tried to set the top and bottom face to Flat "Shade Flat", and set the middle face loop to "Shade Smooth". It doesn't work.

I also tried to set "Shade Smooth" to all faces of the cylinder, top and bottom edge loops set "Mark Sharp". It doesn't work either.

You can use 2 ways, one is to select the specific faces you want to be shaded flat and then go in the Mesh menu, under Shading and select the Flat Faces.

Or you select the object and go in the Object Data Properties under Normals and activate Auto Smooth.

The latter works very well with most objects, but does not give you as much control as the first way.

Auto Smooth demo:

Happy Blending


Parenting an object to a bone not working I am making a sword attack animation for my character and I want to parent the sword to his right index finger. I read that you have to create an empty, parent the empty to the bone and then parent the sword to the empty. When I tried doing this Blender wouldn't let me parent the empty to a specific bone, only to the whole model. It would also only act as a regular child (following the parents transforms etc.) when I was in object mode. When I tried moving bones in pose mode the sword wouldn't follow. Why is this happening and how do I fix this?

The correct procedure to parent the empty to the bone is:

Select the empty

Shift select the armature

Go to pose mode

Select the bone you need as parent

Press Ctrl P and choose "bone" option.


Transparent object not fully transparent A few days ago, I watched this Video from "Blender Guru" on Youtube (i´ts about the modern kitchen):https://www.youtube.com/watch?v=KyXRBu7gn2o. There he showed a trick how to reduce render times, by adding transparent images instead of real trees as trees to the scene. My Question: How did he make their backgroud fully transparent? Always when I import Transparent Images(the background is transparent) i`ts only "half transparent"

It also does not change, when I switch between Material-Preview or Rendered Mode:(((
As you can see in the Video which is linked above, Andrew has images where the background is completely transparent, but how does he do that?
(I have exported the image of the tree myself, made sure that the output is PNG, RGBA, and the in the Film-Panel I activadet Transparent)->have I forgotton something? I also tried to render the tree normal(no transparent background) and changed it in GIMP, but that did not help as well. It also doesn`t change when I import the Image instead of "Image-as-plane" as Plane where it is applied to.
Maybe you know an anwser to my question, thanks!!!
PS: I`m from Austria, so I want to apollogise, if my English is not so good, you can always ask quesions If something unclear:)

When you import the image set the import images as planes to use alpha.

Or set the material to use the alpha channel in the alpha input of the shader.


Script method to trim mesh objects I went away and learned some OO in python, and now I will pick up where I left off - creating mesh objects from mathematical expressions. In the simple test below, I would like to cleanly trim the tops and bottoms of the surfaces where they would intersect planes at Z = +1 and Z = -1. So far I just append faces which have at least one vertex inside. (there are probably unused vertices which I should clean up at some point).

I am hoping there is a simple way to trim this (or future) object at Z = +/-1 within the script. There are probably a number of possible ways to do this - what would be most helpful is both a few lines of script and a pointer to the relevant documentation on mesh object methods so I can dig in and learn. Any other pointers/suggestions would be helpful. I hope to plot some pretty complicated stuff, so helping me starting off on the right track would be greatly appreciated!

Note: An alternative approach would be to calculate the exact intersections myself, but for math more complicated than just np.tan() I'd have to use something like

from scipy import fsolve

to find the intersection with the planes, and that's another issue.

import bpy
import numpy as np

pi = np.pi

nx, ny = 40, 21
x = pi * np.linspace(-0.475, 1.475, nx)
y = pi * np.linspace( 0.0,   2.0,   ny)
X, Y = np.meshgrid(x, y)
Z =  np.tan(X + Y)

verts = []
for iy in range(ny):
    for ix in range(nx):
        vert = (X[iy,ix], Y[iy,ix], Z[iy,ix])
        verts.append(vert)

lo, hi = -1.0, 1.0

faces = []
for iy in range(ny-1):
    for ix in range(nx-1):
        i = ix + nx*iy
        face = (int(i), int(i+1), int(i+nx+1), int(i+nx))
        highpoint = max([verts[iv][2] for iv in face])
        lowpoint  = min([verts[iv][2] for iv in face])
        # if face has at least one vertex inside hi-lo range,
        # but doesn't cross Z=0 (by more than a little)
        if (highpoint > lo and lowpoint < hi) and highpoint*lowpoint >= -0.1:
            faces.append(face)

# alternatively could I remove them later using some things such as
# faces.pop() and face.co[:][2]???

meshthing = bpy.data.meshes.new("Tan")
object = bpy.data.objects.new("Tan", meshthing)

object.location = (0,0,0)  #bpy.context.scene.cursor_location
bpy.context.scene.objects.link(object)

meshthing.from_pydata(verts,[],faces)
#meshthing.update(calc_edges=True)

mat = bpy.data.materials.new("PKHG")
mat.diffuse_color = (float(1.5),0.0,1.0)
mat.specular_color = (200.0,1.0,100.0)
object.active_material = mat

mypolys = meshthing.polygons
for p in mypolys:
    p.use_smooth = True

# this helps ensure it's visible and selected
bpy.data.objects['Tan'].select = False
bpy.data.objects['Tan'].select = True

print_info = False
for item in bpy.data.objects:
    print(item.name)
    if item.type == 'MESH' and print_info:
        for vertex in item.data.vertices:
            print(vertex.co)
        # This doesn't work yet
        for face in item.data.tessfaces:
            print(face.co)

The simple way to solve your problem is to use a Boolean modifier and intersect with a really big box spanning z=-1..1 , but eventually you will want to do something to a mesh that isn't so simple.

You're going to want the bmesh module:

http://www.blender.org/documentation/blender_python_api_2_67_release/bmesh.html

It has access to the vertices, edges, and faces of the mesh with the ability to add, modify, and remove any of them.

For an example I'll include the code from http://web.purplefrog.com/~thoth/blender/python-cookbook/squish-mesh-axis.html :

import bmesh
import bpy

def stretchAxis(mesh, idx, tgt_min, tgt_max):
    """ Squish/stretch the vertex coordinates of a mesh so that their .co[idx] ranges from tgt_min to tgt_max. """
    bm = bmesh.new()
    bm.from_mesh(mesh)

    min = bm.verts[0].co[idx]
    max = min

    for v in bm.verts:
        val = v.co[idx]
        if (val<min):
            min = val
        if (val > max):
            max = val

    # remap co[idx] from min..max to tgt_min..tgt_max
    for v in bm.verts:
        old = v.co[idx]
        v.co[idx] = (old-min)*(tgt_max-tgt_min) / (max-min) +tgt_min
    bm.to_mesh(mesh)
    bm.free()

#
# squish or stretch all the selected meshes to a specific thickness along a
# specific axis.
#

idx = 2 # the z coordinate
for obj in bpy.context.scene.objects:
    if (obj.select):
        stretchAxis(obj.data, idx, 0, 1)
        obj.location[idx] = 1
        obj.scale[idx] = 1

Although this example does not alter the TOPOLOGY (faces and edges).  It only adjusts the position of the vertices.


Cycles Nodes - object location in another object's space? The Object Info node gives me access to the location of the shaded object('s origin) in
World Space
The Texture Coordinate node gives me access to the coordinates of the shading point in the Object Space of any object.

How in a shader tree, could I retrieve the location of the shaded object in another object's space? For instance, the location of the shaded object in its parent's space?

Somehow apply the parent's inverse transform to the Object Info > Location?

I was being dim.. to return the location of object A in the space of object B, in all A's shading points:

Here, 'A' is the shaded object, 'B' is an Empty.


Selecting verices by angle I am working on a road net mesh that only contains edges, no faces. They all share a common plane (I'm basically working in 2D). There is a ton of redundant edges that form ALMOST perfectly straight paths between crossings and could be dissolved but doing it manually with take me ages. On the other hand, there are some road turns that I want to keep.
I'd like to know if Blender has any command that will select my vertices by angle or select similar angle to the one I selected, so I could later dissolve them. Say, my selected vertex connects two edges that are almost parallel, and I want to dissolve all vertices that are like that. I want to be able to set a threshold, so I can keep vertices that connect edges with deviation from parallel larger than 2 degrees, for example.
Here goes a screenshot where I manually selected what I want to be done automatically. The whole mesh is much larger, that's why I'm asking.

If there's no such an option, natively or with an addon, please tell me if it would be difficult to write a script for such an action. Any help greatly appreciated.

Select inline verts.
Quick edit mode bmesh script. Run in vert select mode.  Selects all vertices connected to 2 edges that have an angle of within 2 degrees of  180 degrees.  Think of it like a clock, and the angle between the two hands with respect to the clock centre.
import bpy
import bmesh
from math import pi, radians

context = bpy.context

ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

def is_inline(vert, eps=1e-4):

    o = vert.co
    e0, e1 = v.link_edges
    v0 = e0.other_vert(vert).co - o
    v1 = e1.other_vert(vert).co - o
    return pi - v0.angle(v1) < eps

for v in bm.verts:
    v.select_set(
            len(v.link_edges) == 2
            and is_inline(v, eps=radians(2))
            )

bmesh.update_edit_mesh(me)


Scatter Particles after the have been created How do I move Particles in random directions (explosion) after they have been created?  I trace letters with a particle system without any movement.  Once I have particles all around my edges I want them to disperse.

In other other words, create non moving particles between frames 1 and 150.
 On Frame 151, put the particles in motion.

Thank you,

Add an appropriate force field, or maybe fields if you want the "centers" of the explosion to be on each individual letter.  Keyframe the strength of the force field to be zero on frame 150, then something higher (say, 10) on frame 151.  Set the force of gravity of the particle system to zero (or zero until frame 151 if you want your explosion to include gravity effects).

Here I have keyframed the explosion to start on frame 101.  So on frame 100 the strength of the field is zero and the particles have not moved:

A few frames later, they have exploded outward:


How to do camera tracking for a video shot in portrait mode? Whenever I try to do camera tracking on a video that was shot in portrait mode (1080x1920 pixels), I fail to get a proper result. In the 3D view (with the video footage as a background) the trackers don't end up in the right place:

When I take the exact same video and rotate it 90 degrees before importing it in Blender, I get the correct result:

I am using Blender 2.90.
In both cases I do the tracking using Motion Model = "Location" and Match = "Previous frame".
I keep the default camera settings that Blender uses for a new scene, and solve the camera motion using Refine = "Focal Length, Optical Center, K1, K2)".
Then I set the floor, origin and y axis using the exact same trackers.
Of course I could do camera tracking on portrait scenes by rotating them first, but that would be very inconvenient: looking through the camera with the video background, I would have to work on a scene that was rotated 90 degrees.
My question: is it possible to do camera tracking in Blender using a video in portrait mode? If so, what should I do to make it work?
NOTE: A workaround would be to turn a portrait video into a landscape video by adding black bars to the left and right. I already tested this, and it works. But I would still like to know how to do camera tracking on a portrait video. You'd think this should be possible in an era in which portrait videos are almost more common than landscape videos.
An example of a portrait video for which blender gives an incorrect camera tracking result, can be found here: https://app.mediafire.com/icyvdawxlli8q
There you'll also find the same video in landscape format, that doesn't cause any problems.

Portrait

Under Solve tab check Refine > Focal Length, Optical Center, Radial Distortion with those I got nice error only 0,10 px
Set Floor, Wall, Center, XY axis - with that I got camera correctly orientated

The only one thing that didn't match was camera Focal Length (and Shift).

If you select camera and go to Properties editor > Object Data > Camera > Sensor Fit and switch to Horizontal > Width 35 mm.

It does not fix the value itself, but empties and reconstructed scene match perfectly.

I still don't know why the given Focal Length is incorrect, but I'm not a tracking guru :) Alternatively you can adjust Focal Length and Shift manually according generated Empties.

Notes
How to determinate Lens Distortion
How to get better result ...


Metadata / notes / comments in .blend files? I was wondering - what options are there to include metadata, copyright information, and/or comments/notes in a .blend file?

I realized late that in the main dropdown (where 3D view is), one can select "Text Editor", and then do Text / Create Text Block (these are then shown under Outliner > Datablocks / Texts). I'm guessing these are for scripts, but when I see, say http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Creating_Blender_Libraries:

  make visible upon loading one small text file which lists layers and objects
  ...
  make your licensing expectations clear: artistic license, creative commons, etc.
  ...
  sign your work, stable email address or website url if possible

... I simply cannot see where else could I add this information, but in a "text block" as described above. The Outliner / Datablocks view looks like it might contain some metadata, but seemingly it is not editable.

So my question is - what is the preferred way to enter metadata (e.g. key/value combinations like author, license, date, etc), and to enter notes/comments in a .blend file?

Its quite common just to distribute a text block with some plain text information.

Some options you have for storing more structured meta-data in a Blend file.

Text-Block

You might want to use JSON/XML/MIME encoding to dump your data to this in your own format which you can read back.
Text blocks can be hidden (indeed any data-blocks), by starting the name with a . - Unix .convention).

Example:

import bpy
import json
metadata = dict(author="Me", date="Today", rating=100)

# hidden text block
text = bpy.data.texts.new(".metadata")
text.write(json.dumps(metadata))

# print it back out
print(text.as_string())

ID Properties

attach a dictionary like object to any data-block.
only support primitive data types str,int,float,dict,array - but can be nested.

Example:

import bpy
metadata = dict(author="Me", date="Today", rating=100)
# attach to current Scene
scene = bpy.context.scene
scene["metadata"] = metadata

# print it back out
print(scene["metadata"].to_dict())

Neither of these options are especially easy to extract from the Blend file without loading the file in Blender first, however it is possible.

See: https://developer.blender.org/diffusion/BAM/browse/master/bam/blend/blendfile.py


blender cycle glass issue(2.8); It looks thicker than the actual thickness of an object like the title
the render result looks quite odd.
Although I tried to make this wine glass mesh thinner, it still does not affect the result.
so, if there is another point I do not know,please let me know
thank you in advance

reduce the roughness on the glass material


Scale object with edge loop as if there were no loops I have a cylinder, that have been split with multiple edge loops.

Is it possible to scale the bottom part of it as if it were no intermediate edge loops.

You can use the proportional editing. So you edit the base loop and it influences also other loops:


Smoke Flow Type "Fire" vs "Fire+Smoke" In this question I showed images of a smoke simulation with Flow Type = Fire and Flow Type = Fire+Smoke. It seems that these two flow types have very little difference in their effects on the simulation.

But I guess the developers had reasons to create those two flow types. What is the nature of these two flow types and how do these flow types influence the smoke simulation ? I also mean how do these flow types influence the voxel data / simulation fields (availability, strength) ?
So where do these flow types really have a different impact on your simulation ?

Flow type

"Fire" -  lets the flame generate first and then the smoke is created when the flame dies off (depending on your settings). The smoke is generated FROM the FIRE not the mesh.

"Fire+Smoke"- Generates fire AND smoke at the same time. Does not wait for the flame to die. The MESH generates the fire and smoke at the same time.


initial velocity for a rigid body simulation: a ball rolling on a skew plane I can do a falling torus onto a plane, but I wanna have a modification:
a ball moving upwards on a skewed plane and then slowing and increasing the velocity
in the opposite direction as would physics suggest.
My question is: how do I give the ball an initial velocity?

There might be another solution but I don't know it. So what you could do is:

Give your object a Rigid Body > Type > Active, create your slope, Type > Passive.

Put your object on the bottom, make sure it doesn't come across the surface, give your object a keyframe (i) > Location, Rotation and Scale, enable the Rigid Body > Animated option and give it a keyframe as well (put your mouse cursor over the option and press i):

Several frames later, move the cube a bit, create a second keyframe for your object, then disable the Animated option and keyframe again:

If the initial momentum is strong enough, it should work fine:

File:


Multiple objects doing the same animation in the BGE So I have some collectables in BGE that bob up and down. But when I play the animation they ALL go to the exact same place that I animated it for the first time. How do you keyframe location without meaning that EXACT location and only the location on one axis or something?

I usually parent the object to an empty and place the empty at the base location.


Total newby question - How to either close the rendering window or return to the main scene window? First post, version 2.77 -
I'll just apologize now.

I have a simple scene with a cube and a camera.
I rendered it as shown below.
How do I either close this/these rendering windows, or return to the main scene window to change things?

Thanks,

Joe

Just press Escape, with your mouse cursor over the area.

Or, you can change the Editor with the icon bottom left the area (I guess "3d view" is the editor you're looking for)


Radial gradient to black from center of image in compositing I am trying to figure out what compositing nodes I need to use in order to take an image such as this:

And with the use of a radial gradient, fade to black from the center, such as the original source footage from a certain film.

In brief: I want to use Blender's compositing nodes to gradually fade to black from the center of an image in an outward radial (circular) pattern.  What nodes are required to apply a radial gradient that fades to black?

I used the following node setup in the compositor to solve the problem I was experiencing:

The general gist of what the nodes are doing is creating an ellispe with the "Ellipse Mask" node and shaping it as necessary with the width and height parameters.
Next, I feed the Mask output of the Ellipse Mask Node to the Invert node. When initially using the Ellipse Mask node, the colors were opposite of what I desired, so the Invert node solves that problem with no required configuration of the node.
I feed the Color of the Invert node to a Blur node, ensure the "Gaussian" method is selected from the drop down list, and configure the parameters until I am comfortable with the blur or feathering of the Ellipse mask used at the beginning.
I then feed the Image output of the Blur node to an Alpha Over node, combining it with the original image as well as black in order to "fade to black" and bing-bang-boom, why's your mother in your room?


How to force an object into the render border? I made a glass smashed by a bullet animation, with smoke simulation. I have 100 frames in the simulation but wish to render only one frame no. 61, where the smoke cloud is the most beautiful. Unfortunately, the bullet and a few other nice shards are already outside the render border, and they must be part of the rendering. I move them into the border but when rendering, they jump back to their previous place. How can I force them to be part of the rendering?

Make sure your smoke animation is baked.

Go to your selected frame and delete all keyframes from the objects animation. Afterwards, you will be able to move your object freely.

(This will obviously delete the animation, so only do this if you are sure that you don't need it anymore.)


Assign material to multiple objects in edit mode I selected parts of multiple objects (in edit mode) and assigned a material to them, but it only assigned it to the active object.
How to assign a material to all the parts of objects?

How to assign materials to all or part of a single object
This is a simple process. Here's a screenshot:

Go into edit mode. Select the geometry that you want to be a different material (you can select faces individually, or press L when hovering your mouse over a mesh). Then simply click on Assign as shown in the screenshot above.
How to assign materials to multiple objects while in Multi-Object editing mode
Select one of your objects and create two material slots, and then also create two materials. Tweak your material settings for the second material to whatever you wish. I just used a bright blue color here.

Select all of the objects that you want to edit, shift click the first one so it becomes active.

Press CTRL + L to open the links pop-up, and then select Materials.

Make sure the number that appears on the materials panel matches the number of objects you have.

Select all of your objects and TAB into edit mode. Select what you want to change, be it faces or meshes, and then simply assign the new material.

Done!


How do I extrude all faces a random amount through a python script? I want to create a blocky random terrain by extruding all faces of a plane a random amount.
I had the idea you were supposed to iterate through all faces, select one, extrude at random, deselect, select next etc.etc.
I made a script but it does not seem to be working. It will only extrude once on the face i have manually preselected. If I select none, nothing happens.

here is my script:

import bpy, bmesh, random

objList = list(bpy.data.objects)

mesh = None

for obj in objList:
    if obj.name == 'Plane':
    mesh = obj

if mesh != None:

    for face in mesh.data.polygons:

         randExt = random.uniform(0.001,0.06)

        bpy.ops.object.mode_set(mode="EDIT")
        bpy.ops.mesh.select_mode(type="FACE")

        #select does not seem to be working.
        face.select = True

        bpy.ops.mesh.extrude_region_move(
        MESH_OT_extrude_region={"mirror":True},
        TRANSFORM_OT_translate={"value":(randExt,0,0),
        "mirror":False,
        "proportional":'DISABLED',
        "proportional_edit_falloff":'SMOOTH',
        "proportional_size":1,
        "snap":False,
        "snap_target":'CLOSEST',
        "snap_point":(0, 0, 0),
        "snap_align":False,
        "snap_normal":(0, 0, 0),
        "release_confirm":False})

        bpy.ops.mesh.select_all(action = 'DESELECT')

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

You can extrude individual faces quite efficiently with the bmesh module:

import bpy
import bmesh
from mathutils import Vector
from random import random

bpy.ops.mesh.primitive_grid_add(x_subdivisions=10, y_subdivisions=10, radius=5)
ob = bpy.context.object
me = ob.data

bm = bmesh.new()
bm.from_mesh(me)
faces = bm.faces[:]

for face in faces:
    r = bmesh.ops.extrude_discrete_faces(bm, faces=[face])
    bmesh.ops.translate(bm, vec=Vector((0,0,random()*2)), verts=r['faces'][0].verts)

bm.to_mesh(me)
me.update()

If you used the standard API, a lot of mode changes would be required (select face in object mode, switch to edit mode, extrude face, switch back to object mode and so on). Mode switching is time and memory intense, thus it should be avoided as much as possible.


Multi camera render addon issue I wanted to render at 1 click all setup cameras. So i found the addon Multicamera Render from here

With the camera selected in the render tab with the multicamera render button

I click but there is no respond or no process bar and blender hang. Is this the correct way im using the addon or some other method. Is there any other addon or this will work fine. Multi camera Render at one click

I downloaded and "installed from file" this script in 2.79:

https://raw.githubusercontent.com/lapineige/Blender_add-ons/master/Multi-Camera-Render/multi_camera_render_v2-1.py

Then, selected both (2) cameras and pressed the "multiple camera render" and it produced 2 images, as expected.

With the addon default settings (empty directory) those images were created in the blender folder itself (I use a zip blender version); selecting a folder on my desktop as "directory" they were created in that folder, as expected...


Saving projects to more than one file or path Is there a way to have the output in Video Editing, go to more then one location at the same time?

Such as when rendering the project it would go not only to a desktop file and but also a file on a external hard drive at the same time.

I am not aware of any way to do that by default. That's why wrote a little add-on for you.

The add-on allows you to create a list of paths that the file should be saved to. Then every time a render is written to disk it is automatically copied to the specified paths.

The add-on can be downloaded here: https://github.com/oweissbarth/blender_multisave/releases/download/0.0.1/multisave_0_0_1.zip

To install the add-on click on "Edit" > "Preferences" > "Add-ons" > "Install..." and select the downloaded zip file and click "Install Add-on". Then activate the add-on by clicking on the checkbox next the its name.

The add-on will then appear in the properties editor in the output tab as its own panel called "MultiSave". You can add a new path to save to by clicking the "plus"-icon.  You can change the path of an item by double clicking it. And finally you can remove an item by selecting it from the list clicking the "x"-icon.

The source code is on github: https://github.com/oweissbarth/blender_multisave/


getting objects to properly face towards normals I wrote this little addon: https://gist.github.com/SuddenDevelopment/16df6602a2ecab06f56dc8a2c7e4c9e0
and at first I thought it was doing great, but have found a bunch of scenarios where the area lights face the wrong direction.
I try to get the normals for a face, move rotate the light to match that face and then face it towards the normal, but it works for roughly half of the faces when it come to facing the proper direction. If I play with which axis are in the rotation by quartnerion I get different ones that are correct, I also tried .inverted()
I dont even know if I'm going the right direction. help appreciated.

Matrix centric approach
Code to place a lamp object at center of each selected face of a mesh, with light local -Z axis pointing in direction of face normal.
Find the global direction of a face normal by premultiplying with the objects global rotation matrix. (No scale).
import bpy
import bmesh
context = bpy.context

ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)

faces = [f for f in bm.faces if f.select]

while faces:
    f = faces.pop()
    light = bpy.data.lights.new(
            f"Face{f.index}",
            type='AREA',
            )
    light.size = 1
    light_ob = bpy.data.objects.new(
            f"Face{f.index}",
            light,
            )
    M = mw.normalized() @ f.normal.to_track_quat('-Z', 'Y').to_matrix().to_4x4()
    M.translation = mw @ f.calc_center_median()
    light_ob.matrix_world = M
    context.collection.objects.link(light_ob)

Local with parenting.
The above code adds the lights in the scene at the global orientation of the face. If the mesh is moved the lights do not go along with it.
Another option would be to use only local coordinates and make each light a child of the mesh.
Scaling to fit the face.
It appears you are also scaling the area light to fit the face. To do this when not axis aligned is a bit more in depth than finding axes minima / maxima.  IMO quite possibly warrants another question
Some examples that use another vector to align.  The face has some calc tangent methods, based on longest edge, edges. Can adjust by rotating light about its local z axis (the face normal) to match the tangent. This way have one known axis aligned with an edge and can scale to match.
https://blender.stackexchange.com/a/94047/15543
Align a face normal to Z axis.
https://blender.stackexchange.com/a/121227/15543
similarly in this one the poly interior angles maps the corner verts to 2d. Similarly here if the face normal is aligned to an axis the coords can be mapped to 2d.
https://blender.stackexchange.com/a/203355/15543
If the coords are in 2d there are some helper methods (primarily for UV) that fit rectangles.
Using mathutils.geometry.box_fit_2d


modeling in blender by taking input from wireless media controlled by autonomous system anybody knows how to take command from wireless media like xbee modules and according to that command modeling is done without human intervention.
        I have one xbee module on a micro-controller which sends information about objects detected to another xbee module connected to PC. how blender can perform modeling (like placing detected object on the map created in blender ) using the information received by xbee module.
        I just want to know the way in which i can take input for my python script from the xbee. Do anybody know how to do it?

First you will need a python module that will talk to your xbee. The XBee module doesn't mention what python versions it works with, but it uses pyserial which does support python3.5. If that doesn't work, searching pypi for xbee shows a few other possibilities.

There are a few ways to install third party modules or you can make blender use the system python. You can also add a path to sys.path so that blenders python can search for it.

Once you are able to import the module within blender create a script that responds to the input. You may want to look at using the subprocess module to read the input without locking blenders UI.


In pose mode, changes revert when I move the timeline If I make a change, it moves back the moment I move the timeline, as seen here,
https://i.gyazo.com/3ec8b06336418e6956fccca3f5c38ba8.mp4

What causes this? (also, it happens even though keyframes are created.)

Well, I found the answer myself...turned out there was some data on the non-linear timeline that was messing it up. I deleted it and it fixed the problem.


How to parent or constrain baked particles to an object so they follow the object's animation? Here's what I am trying to achieve using Newtonian physics.
Emit particles perfectly vertically from a plane.
If I animate the plane, the particles in Newtonian physics will naturally drag behind which I don't want.
I tried baking or caching the particles while the plane was static. So the simulation is locked in the way I like it. But then moving the plane the particles don't follow anymore, and there is no baked particle object I can find to parent or constrain to anything.
Note:
This does work with fluids inside a domain. I can bake a fluid simulation in a domain, then animate the domain object (translate, rotate, scale) and the baked simulation follows as expected since it is baked in the domain space.
Is there a way to achieve similar behavior with other particle systems ?

The Particle Instance modifier seems to do the trick.
Basically any object with the particle instance modifier draws the result of the simulation you point it to. but the object itself can be animated and does not actually influence the result of the simulation.


Blender is saving as a blend1 file, not blend I teach Blender to classes of game design students in the University of California and a student came to me yesterday with a problem I haven't seen before. She's created a very simple file, but when it's saved Blender puts a .blend1 extension on it every time, not the normal .blend. This means that after it's saved twice there are two .blend1 files in the directory, and no .blend file. I have no idea why this is happening. What has she done? Anyone seen this before?

thanks - Chris

That's Blender's file versioning system. A very subtle but quite helpful feature. When you open the settings panel, under File, you can specify how many previous versions of a file you want to keep around on your computer.

So everytime you hit save, Blender maintains a stack of previous versions of the same file so you have some backup of your work and don't overwrite your progress when saving.

In the above screenshot, the last 5 versions of one .blend file are saved. All suffixed individually (.blend1, .blend2 and so on).

You can enable showing file versions in the open file dialog if you want to pick a specific version from your save history (red arrow). And also you can toggle showing normal .blend files in that dialog (green arrow) which is what your student probably did.

Hope this helps!


Unwrapping doesn't follow UV editor Oh, mighty Blender elders.

I'd like to know if this is a bug, or intended behavior.

What is going on
I have three textures with different aspect ratios. 1:1, 2:1, 3:1.
But when unwrapping, the UV map aspect ratio is always based on the image selected in the shader editor.

It seems that unwrapping depends on your shader editor image texture, not the texture in the UV editor.

So, in some cases, there's no way to match the correct aspect ratio.

Example:
2:1 in UV editor, 3:1 in shader editor.  And no way to match the correct ratio.

Additional notes:
This concerns all UV unwrap methods and projections.
Correct aspect ✓ doesn't work either - it only switches to 1:1 ratio.
Even after removing an image from file, Blender still unwraps in it's ratio.

Question

Is this intended behavior?
Or is this a bug that should be reported?

Here is the file for testing, images included.

The UV scale will depend on the scale of the selected Image Texture node in the Shader Editor, but its appearence will be stretched in the UV Editor, depending on the selected image here. If you select the same image in Shader Editor and UV Editor, the UV will appear at the right scale.
If you select 1:1 in the Shader Editor, and select 1:1 in the UV Editor, you'll see the correct scale, then if you select 3:1 in the UV Editor, it will be scaled 3 times on the X axis.
If you choose 3:1 in the Shader Editor and choose 1:1 in the UV Editor, it will look scaled 1/3 of its X scale, if you switch to 2:1 in the UV Editor, it will be 2/3 of it X scale, it will only look good if you switch to 3:1 in the UV Editor.
It works as expected, but it surprises a bit at the beginning.


Why don't my tracking markers stay in position? This is my very first post here. After having used it a few times in the past, I recently started playing around with Blender again. At the moment I'm experimenting with Blender's camera tracking feature, and I keep running into an issue that I'm unable to solve.
The problem is that the markers of tracks don't stay in the position I put them in.
For example, when I place the marker in the first few frames of my video footage (either manually or by clicking the Track Markers button for automatically tracking a single frame) everything looks fine when I play the first few seconds of the video: the marker perfectly follows the item in the footage that I'm trying to track.
But when I continue to work on the same track, and move the marker in another part of the video (for example, around frame 532), and then go back to the first few frames, the marker has shifted to a different position there.
Example:
I manually placed the marker in the right position in frame 17:

After manually moving the marker in a few frames around frame 532, the marker in frame 17 looks like this:

NOTE: In this example, I didn't press any Tracking button. All the changes to the marker position were done manually.
How is this possible? Is this a bug in Blender, or did I accidentally activate a setting that causes changes in frame x to influence the position of the marker in frame y?
I'm using Blender 2.90.1, and my tracking settings look like this:

Any help would be much appreciated!
Kind regards,
Frank

I found the solution myself.
For some reason, the frame numbers of my video file didn't stay in synch with the frame numbers of the track markers: when I would scroll to frame n in the timeline, it would sometimes show frame n+1 of the video, making it look like the marker had shifted.
I solved the issue by converting the video to separate image files before importing it in Blender.


Slow Playback of mocap data I downloaded Animations from mixamo to import into my scene. In the mixamo webapp the animation plays back at 100fps. In Blender 2.8, its 7fps.

Solid mode, no modifiers, no materials. No other objects in the scene but a plane. Purely the imported FBX from mixamo.

What could be causing the framerate issues? Is there a way to remedy it so that the animation playsback at 24+ fps?

Currently running a Dell Insperon g5 with a gtx1060m and an Intel i5-7300hq 2.5ghz and 8gb of ram

I found I could work around my issue by optimizing a few things. I want to stress that these are all to lighten the load of the CPU during playback and I have not found any way to make Blender's playback as reliably smooth as Mixamo's web player or Maya. I suspect this issue stems from how Blender's code handles hardware acceleration during playback. Something that would be far outside of my realm of expertise.

OPTIMIZING:

Models --

Merged Unconnected overlapping Faces(Merge by distance)
Remove Doubles
Tris to Quads
Apply Decimate modifier for a low res proxy model.
Erase nonessential faces from low poly proxy model

Viewport:

Use WorkBench
Shade Single if possible

Ui:

Remove as many panels as possible, this includes N and T menus.
Ctrl+alt+space to fullscreen for smoothest playback

Misc:

remove any VSE Preview panels

1a. If you need a vse preview panel, set it to the lowest resolution proxy settings

In Solid mode, with these changes I was able to go from 7 fps to 45 fps with my single character
In Eevee the difference was from 2fps to 14fps for the same scene.

Not a perfect solution but certainly a significant performance improvement, especially in solid mode.


im trying to make textured glass but it doesn't work the way i want, can any help? so i have been trying to make a glass block in blender with a Minecraft image texture node. and every time i tried it works but it doesn't. the texture shows but the center is black

In the material properties tab (next to main viewport), with the material selected,  scroll down until you see Blend Mode and Shadow Mode (under Settings). Set Blend Mode to Alpha-clip, Alpha-hashed, or Alpha-blend (play and see what looks best).

The other controls the shadows created by the transparency. Also, play around to see what looks best, or just leave it off if you don't need it to have a shadow.

Also, make sure to connect the alpha from your image texture to the BSDF node, or adjust the value as needed ($0$ is pure transparent).


UV/Image Editor, pink circle cursor sorry for asking this because I suppose it's a very obvious question but here it goes: I don't know which key I've pressed but when I enter in UV/Imager Editor mode the pointer looks like some kind of pink circle and I'm not able to work as usually. Can someone tell me how can I back to the normal UV/Image Edit mode?

Thanks

You must have hit the Q key. I think its someing like "sculpting for UV editing"
With your mouse hovering over the UV/image editor window tapping the Q key again will toggle it back to the regular selection mode.


Object mode scaling vs edit mode scaling for video game development When working on video game assets, is it more efficient to model the assets and scaling them in edit mode or rather modify the scale on object mode? Which option is most commonly used by artists?
For example, creating a table using simple cubes. Is it more efficient for game engines and the PC as a whole to work with the table formed by several cubes with different scales (object mode scale) or rather have all specific scales modified in edit mode while maintaining the x,y,z object scale in 1?

I don't think there are any significant efficiency implications, but I typically try to apply scale when making assets for the BGE, as some discrepancies with physics and collision bounds can occur and very large or small scales can cause precision issues.

For external engines I would apply scale just because of the exporting process (depending on the format, the scale may be applied automatically anyway)

It doesn't really matter whether you scale in edit or object mode as long as you apply it with ⎈ CtrlA> Scale when all is said and done.


Face Orientation weird effect There was a weird effect on my textures that when I set to face Orientation, I got this result.
Any idea what it could cause it?

This looks a lot like z-fighting caused by too large clipping range.

Either adjust the values in Clip Start/End
or switch to Orthographic view through View > Orthographic (Numpad 5)

Change clipping distance...

...or switch to Orthographic view


How can I have multiple separate texture maps for separate objects? Is it possible? I'm new to blender and trying to model a character, but I still don't have a full understanding of UV maps and texturing yet. He's got quite a few parts, so I was doing my best to fit everything onto the one UV map, but I decided to separate a couple of parts of him - namely his ears and wings - so that I could texture those separately, without having to fit them onto the main UV map. Here's my workspace.

I've done extensive googling but still can't figure out the answer to my question - Can I actually have separate textures/UV maps for separate objects? To be clear as possible, I have most of his mesh in an object called HeadBody. I put his ears and wings into another object called EarsWings. I want to texture each separately, but every way that I try to, even when adding a new UV map, it just ends up on the same crowded UV map again when I go into Texture Paint mode. I read a few things about assigning different Materials, but I couldn't figure out how to assign a texture to those Materials.
Any enlightenment is super appreciated. Thank you!

Yes, it's possible. If you have the wings and ears in a separate object, just create a new material, and select there the image texture you want.
The relationship is the following: Object → Mesh → Material → UVMap → Image Texture.

A mesh can have more than 1 material. In the Edit mode you can select faces and assign them to a material in the material tab.

In the Image Editor you can select the texture images to inspect them or paint on them.

In the Texture Editor, the UV map and the texture are specified in the Texture Slot settings. Blender can read this pair from the material or you can specify the there. This defines on which image and where the pixels go when you paint on the 3D model, and vice versa.

In the Shader Editor you can define with nodes the UV Map and the Image Texture that a material uses.

And in the Object Data Properties > UV maps you can select the active (default) UV map for the viewport and for the render.


How to make a bone follow location of two bones at same time? How can I make a bone follow the location of two other bones to always be between both of them?
I have 3 bones (2 feet and 1 torso), how can I make the torso bone always be between the 2 feet bones?

You can achieve this, by creating a copy location constraint for the bone, which has to be between the controlers.

  The Copy Location constraint forces its owner to have the same
  location as its target.

Given are the three bones: footA, footB, torso (which has to be between footA and footB).

Make sure the torso bone isn't connected to another bone. It can have a parent though.

  Note that if you use such a constraint on a connected bone, it will
  have no effect, as it is the parent’s tip which controls the position
  of your owner bone’s root.

Add a Copy Location Constraint to torso. Set the Target to footA.
Add a Copy Location Constraint to torso. Set the Target to footB. Lower the Influence slider to 0.5 on this constraint.

The torso bone will move to footA with the first constraint. Then, with an Influence of 0.5, the torso bone will move halfway towards footB.

This can also be done for the rotation with Copy Rotation Constraints.


repeating model possible? So lets say I have a simple cube and I want to make 10 of these cubes, all lined up right next to each other, with the same distance between each. If I change one of these cubes, I don't want to make the same change on 9 more cubes. Is there a way to basically repeat this cube 9 times, so that I only need to make a change on one cube to affect them all? It's basically like the mirror tool, but used to repeat the model instead. Is there something like this in Blender?

You can use an unapplied  Array Modifier.


OSX Eevee performance with multiple materials in OSX EDIT 2: Thanks to a user posting a detailed technical explanation as to why the bug is manifesting (TL:DR, certain material properties cause multiple calls to the shader compiler in the AMD driver when only a single one is necessary), I have found a couple of workarounds:

Set the blend mode to alpha blend (This affects the output)
Enable backface culling on the material (This usually doesn't affect the output unless you care about how the inside of your mesh appears)

More details on Backface Culling here

Issue in the bug tracker here

EDIT: As stated below, the sword in the tutorial files exhibits the same behaviour, but I've also provided a blend file for the sword I built whilst following the instructions in the tutorial.

I've been following this tutorial series as part of my efforts to learn Blender.

Things were going okay, until I got to the shader part of the tutorial, more specifically the part where I'm supposed to add a material to the grip of the sword, which has a different base colour and the metallic setting turned down to 0.  As soon as I turn the metallic value down, performance falls off a cliff and the frame rate in the editor drops to single digits.  Blender is basically unusable.

If I leave the metallic slider on 1, then performance is fine.

I used Bootcamp to import the same blend file into the Windows version of Blender on the same machine, and the performance is fine regardless of what metallic setting I apply to the sword handle.  This suggests it must be either:

An issue in OSX Catalina
An issue in the OSX OpenGL implementation
An issue in the OSX version of Blender

Has anybody else ran into this issue and found a way of addressing it?  The hardware I'm running is definitely capable of doing the job.

The system specs are:

2019 Macbook Pro, 16 inch
CPU: Intel i9, 8 cores, base clock 2.3 GHz
GPU: AMD Radeon Pro 5500M, 8 GB

Secondary GPU (not in use for this scenario): Intel UHD Graphics 630 1536 MB

RAM: 64 GB
OSX Catalina, 10.15.2
Blender 2.81a

Only other application running is a browser so I can follow along with the tutorial video.

I have downloaded the tutorial files from the website linked in the video, which includes a finished version of the sword, and I have confirmed that the behaviour in the model provided in that bundle is exactly the same.  If I load it as is the performance falls off a cliff, but if I bump the slider for metallic up to 1 performance returns to normal.  This means that I've not doing anything wrong (as far as I know) while modelling my own sword and it should behave like the one the tutorial maker built.

This is a reported bug: https://developer.blender.org/T66231

I can't think of any way other than downgrading to a previous version without this issue :-P


Typing G+X or R+X is not working. Instead is asking me if I want to delete When I hit GX I'm expecting movement along the $X$ axis by an amount I type in.
Similarly, I'd expect RX$90$ to rotate the selected object(s) about the $X$-axis $90$°. Instead, the $X$ is taken as a delete command and I get a dialog box asking if OK to delete.
Is this a change in Blender or am I doing something wrong? I'd really like to be able to type SZ and a number or RX and a number.

Most likely you inadvertently deleted the shortcut in the keymaps, or you set it to something else, overriding it. Clicking on Restore in the keymaps in the preferences should clear the modification.


How to control which edges are selected after beveling operation is complete? In 02:05 of this video

https://www.youtube.com/watch?v=GU6fYiujrlI&t=2m05s

some edges are beveled multiple times. However, when I try to do the same in Blender, after finishing my fist bevel, the selected edges include short in-between edges, and not only the edges parallel to the bevel.

What I'm getting:

What should the after-bevel selection look like according to the video:

I have to manually de-seclect everything and re-select only the edges I want to bevel again, while in the beforementioned video that is not the case. How do I achieve the same behaviour of the bevel tool like in the video?

That video was made with an older version of blender (2.64). You can now do pretty much the same thing faster by beveling (⎈ CtrlB) and then using the scroll wheel or the numbers on the keyboard to set the number of cuts:

Or you could deselect the edge rings with ⎈ Ctrl⇧ Shift⎇ Alt RMB:

Not exactly an optimal solution, but I don't think this is possible without using an older version of blender..


Creating smoke domain manually instead of using quick smoke makes domain visible When I use quick smoke to create a smoke simulation everything works fine,

but when I create a box and make it a domain, the smoke simulation is not visible in the render due to visible domain?

What's causing this?

That's because the default material for the domain is still enabled
so you see on that image that it doesn't work
so you have to make a random image and apply quick smoke on it and then delete it and then select the domain again and choose the smoke domain material   and then it works.


How to increase the scrollback history of the Python console/terminal within Blender? How can I increase the size of the command history in the Python console?
The console options don't provide any option for doing this.

Like Maya's unlimited output section in the script editor.

You can do this by going to User Preferences > System and changing the value in Console Scrollback under the General category. It's set to 256 by default.


Deactivate smoothing So I made a 3d model of a sword, and when I try to render it, the program automatically smooths everything out.

Basically, I looked around online, and made sure everything smoothing related discussed there was turned off, and they all were, what should I do?

The program can't really "automatically smooths everything out". Without any further info it just looks like you probably have a Subdivision Surface modifier on your sword.

Make sure your View and Render subdivision values are the same, or if you don't want subdivision on your model at all, remove the modifier entirely.


How to remove object from group? How do I remove one object from a group hierarchy? I don't want to delete it, just remove it from one specific group.

Found it: Ctrl+Alt+G does "Remove From Group".


How to edit objects together I understand that the green lines are groups,is there a way to edit them all together,or to ungroup them and then regroup them all into a single object?

This is what happens when I enter edit mode:

My goal is to be able to edit all of the green lines together so that I can fill the gaps in between them like this:

I'm sorry if I didn't explain the issue correctly,I'm a beginner and this is the first time that I ask something.

Select the objects in object mode, then press Ctrl+J. They are now merged into a single object.

Since these are curve type object, connecting them with faces is not that easy. I would suggest that you convert your new object to a mesh. Alt+C > Mesh from Curve/Meta/Text


Transferring rig weights from one mesh to another in blender 2.76 I've recently started using blender in order to create my own models for games and such. I have created a model, rigged it, created clothes separately and now I want to add those clothes to my model so that it moves with the rig without the skin poking through.

So there are many solutions that use the weight transfer tool but I can't seem to get this working with blender 2.76. I parent the rig to the clothes with empty weight groups under the deform option. I then, selecting the mesh and then the piece of clothing, go to weight paint mode and choose the 'transfer weights' option under the tools section but the weights dont actually get transfered, nothing happens.

All the tutorials online use previous versions of blender and so the interface of options when choosing to transfer weights is different which could mean that I am just selecting the wrong options (I tried messing with them but nothing works).

Any help will be appreciated. I can post pictures later if need be.

Thanks

Im using 2.79, they did change it after 2.76. Heres how it works now. Once you have parented the desired mesh to the rig with empty groups. You have to select first the weighted mesh and then the desired mesh for the transfer. Then go into weight paint mode. Then change the following two settings, source layers and destination layers. Source layers needs to be set to "By Name". Destination needs to be set to "All Layers". Once these two settings are changed the transfer will automatically occur.


How to create a good cage for baking in cycles? I just want to know how to bake my normal maps using the Cycles render engine.
When I use a cage in Cycles, should I target the cage between high poly and low poly objects? Or should I create another mesh with similar proportions to the related mesh to bake, as an intermediate object to use as a cage?
Does there exist any boundary box to catch the rays and make a good normals with constant colors, rather than odd or very dark.

I have used Xnormal in some cases, but I would prefer to learn to use cycles, and to target OpenGL for my normals.
I have been using Blender since 2013, so I know a little of everything.

Cage baking should follow more of less the same principles in any baking system. It is only really necessary to have a custom cage when trying to capture hard edges, smooth organic models shouldn't need one, as the ray distance parameter will effectively create on for you. The purpose of a custom cage is to modify the direction that the rays are cast when determining where to draw the normal info from, which is particularly important form split normals, as otherwise you may miss some directions in the bake (see here).

The best starting point for creating a cage is to just inflate the low poly (this effectively is what the ray distance parameter is doing internally). From there you need to look at you high poly and low poly together and look for problematic hard edges and tweak the cage around these errors. Until you get more experienced, some trial and error will be required. Be aware that Cycles requires that the cage has the same topology as the low poly.

The blender manual covers cages briefly at the bottom of this page.


Parenting is Breaking Animation I am animating a locomotive which is an a 3rd party model with wheels and brackets that were animated - which I'd like to keep. However, it was done strangely, and the parenting relationship is hard to follow.

I've already fixed it partly, and the train animation runs fine, but any kind of additional parenting to animate the train in motion breaks the local animation of the wheels turning and brackets pumping.

I have tried parenting the whole lot to an empty to animate that, but as soon as it is animated the local animation breaks.

Parenting the wheels and brackets to the chassis is causing parenting loops
Joining also breaks the animation - but not all the time. I joined the locomotive to the carriages and it did preserve the animation but I lost my UVs (which have been carefully modified).
Doing it the "wrong way round" also doesn't work. Setting the trains as the Parent and making the empty the child is not working. Something about the parent child relationships int he mechanisms is being thrown off.

I can't be alone in this boat...

So I think I have figured it out...I managed to track down the empty that was the parent of "some" of the brackets and wheels. It was just an orange point, but once THAT was parented to the empty in front of the train and the train body (the parent of everything else) was hooked up - it all worked. Gee what a head scratcher.


Creating an Unwrapping Animation (NOT texturing) As a new-ish Blender user, I'm still not entirely familiar with how to do everything in Blender. I've been attempting to create an animation of the lateral area of a cone unwrapping into a 2-D semicircle thing: however, I've found no good way to separate out each area of the cone for rigid-body bound animation. Any and all help is appreciated: if you need a .blend, just ask, but it's really just a cone on an otherwise blank area, so I don't think it's necessary.

Thanks.

I'm not quite sure what you are trying to achieve, but I created this blend file that turns a 2D fan into a 3D cone... https://www.dropbox.com/s/zjddbv90rfj48n8/Cone2Dto3D.blend?dl=0 . Just press Alt+A to run the animation.

OK, since it was requested, here's the instructions....

0) To get started, Num Pad 7 for top view and Shift+C to centre cursor at origin.

1) Add a mesh circle with 72 sides, triangle fan fill, 1.1536m radius. [Any strange dimensions given here are due to the maths required to make a cone that ends up as 1m tall. I did do the maths but deleted it].

2) R, Z, 2.5, Enter, to rotate circle about Z by 2.5 degrees.

3) Tab into edit mode and delete 71 of the faces, leaving just the one at the 12 o'clock position.

4) Add an Empty ('Empty1') at the origin (i.e. the sharp point of the triangle).

5) Select just the triangle and add an array modifier, Count=36. Turn off Relative Offset and choose just Object Offset, specifying Empty1 as the Object Offset.

6) Rotate Empty1 5 degrees about Z to cause a fanned array of triangles in a semi-circle.

7) Add another Empty ('Empty2') at the point of the triangle (I used the Single Arrow style to make things clearer). You should get an arrow pointing up the +ve Z axis.

8) Select Empty2, then shift-select the triangle, hit Tab to edit triangle, shift select the vertex at the point.

9) Press Ctrl+H, Hook to Selected Object. (Moving Empty2 can now drag the triangles up and down into a point... but leave it where it is for now at Z=0).

10) With the triangle still in edit mode, select the other two vertices only (Ctrl+I), Shift+S, Cursor To Selected. The cursor should now be between the two vertices at the outside of the triangle.

11) Tab out of edit mode and then A to deselect the triangles.

12) Add another Empty ('Empty3'), single arrow style, then press R, X, 90, Enter, so it points back towards the point of the triangle (along the Y axis).

13) With Empty3 selected, shift-select the triangle, Tab, Ctrl+H, Hook To Selected Object. [Moving Empty3 can now squash the triangle towards the centre... but leave it where it is for now at Y = 1.1536m.]

14) Tab out of edit mode and A to deselect all.

++ Now the animation ++

15) Set start frame to 1, end frame to anything you like.

16) At Frame 1, select Empty2 (the arrow pointing upwards) and set a key frame for Loc Z (i.e. Z=0).

17) Go to last frame (Shift+Right arrow). Move Empty2 up to Z=1 and set a keyframe.

18) IMPORTANT! Go into the graph editor and set interpolation (T) to Linear.

19) Go back to Frame 1 (Shift+Left arrow), select Empty1 and set a keyframe for Rot Z (i.e. Rot Z = 5 degrees).

20) Go to last frame. Rotate Empty2 another 5 degrees about Z and set a keyframe (i.e. Rot Z = 10 degrees). [You should have a droopy propellor / palm leaf thing now].

21) IMPORTANT! Go into the graph editor and set interpolation (T) to Linear.

22) Go back to Frame 1, select Empty3 and set a keyframe for Loc Y (i.e. Y = 1.1536)

23) Go to last frame. In top view, select Empty3 and set its Y location to Y = 0.57625. The triangles should join exactly to make a cone. If not, move Empty3 manually along Y until they do.

24) When the triangles meet exactly, set a keyframe for Empty3's Y location.

25) IMPORTANT! Go into the graph editor, select Empty3's graph and open the Properties panel (P). Set Interpolation to Sinusoidal, and set Easing to Ease Out.

26) Alt+A to run animation.


Why are Grease Pencil Strokes converted to thin Lines? I was working on a small test animation within the 2d animation, but somehow hit a hotkey that I couldn't seem to find and fix it.

The image below shows how it looks after the accidental hotkey input.

I had the same problem with the random hotkey, still don't know what it was.

On the top right corner of the viewport are four icons which change the Viewport Shading.

Select the second or third icon on the top right corner of the viewport to change Viewport Shading


Multiresolution modifier not working for bake I'm trying to bake some normal map details onto a low poly model using a multires modifier. I set up the image texture, made sure both the object and image textures are selected in the viewport and shader editor, and I'm using CPU to bake. However, when I actually click 'Bake', I get an error saying "Multires data baking requires multi-resolution object".

I don't know what to do. The object has a multires modifier, but I'm still getting an error saying the object needs a multires modifier.

Additionally, and I don't know if this has something to do with 2.8, I can no longer change subdivisions for sculpt mode and preview independently. The option is just not even listed in my multires modifier.

Create new or choose existing texture for bake to in material node editor and make it active by selecting it.

Then set preview subdivisions number of modifier to 0 before multires baking.


How to set origin of multiple objects at the same time? I want to set the pivot of all the arrows to their bottoms like the pic below. The method of "origin to geometry" does not help in this case. I have like 6000 arrows, so... Any ideas?

Well I'm not sure of a good way to do this, you can try to select all your arrows, and then select the one with the correct origin, then press CTRL+L, and select "Object Data" from the list.. Unfortunately this is not ideal, as it also copies all other object data such as materials and UVs, effectively making all the arrows instances of the active one.

You can then select all the arrows again, then press U on the keyboard, and select "Objects and Data" from the list, to make all the arrows mesh data single users again, and not instanced..


How can I remove all unused materials from a .blend file? I'm testing different materials in the same object, and finally the file has a lot of unnecessary material, is there any command  that performs the cleaning of these materials automatically? in short, is it possible to make them disappear from the file?

After unlinking your materials, save your file. Then reload it with Ctrl+Shift+O.


Get bmesh and list of vertices I try to get the are_inside function working from:
https://blender.stackexchange.com/a/80781/21443

No matter what I try, I just get new errors.
My scene is as follows:

I don't want to rely on edit mode for selections for the script.

The closest I got is:

import bpy
from mathutils import *
from mathutils.bvhtree import BVHTree
import bmesh

def are_inside(points, bm):
    """
    input:
        points
        - a list of vectors (can also be tuples/lists)
        bm
        - a manifold bmesh with verts and (edge/faces) for which the
          normals are calculated already. (add bm.normal_update() otherwise)
    returns:
        a list
        - a mask lists with True if the point is inside the bmesh, False otherwise
    """

    rpoints = []
    addp = rpoints.append
    bvh = BVHTree.FromBMesh(bm, epsilon=0.0001)

    # return points on polygons
    for point in points:
        fco, normal, _, _ = bvh.find_nearest(point)
        p2 = fco - Vector(point)
        v = p2.dot(normal)
        addp(not v < 0.0)  # addp(v >= 0.0) ?

    return rpoints

def test():
    print("test")

    mesh_points = bpy.data.objects['Grid'].to_mesh()
    bm_points = bmesh.new()
    bm_points.from_mesh(mesh_points)
    points = bm_points.verts

    mesh = bpy.data.objects['Suzanne'].to_mesh()
    bm = bmesh.new()
    bm.from_mesh(mesh)

    inside = are_inside(points, bm)

test()

How can I get this working?

Set  the points to a collection of coords.

Needed to change to the points from a collection of bmesh.types.BMVert to a collection of 3d coordinates.

points = [v.co.copy() for v in bm_points.verts]

May still need some tests, here is the result

added some code such that if the grid is in edit mode, select the result.

import bpy
from mathutils import *
from mathutils.bvhtree import BVHTree
import bmesh

def are_inside(points, bm):
    """
    input:
        points
        - a list of vectors (can also be tuples/lists)
        bm
        - a manifold bmesh with verts and (edge/faces) for which the
          normals are calculated already. (add bm.normal_update() otherwise)
    returns:
        a list
        - a mask lists with True if the point is inside the bmesh, False otherwise
    """

    rpoints = []
    addp = rpoints.append
    bvh = BVHTree.FromBMesh(bm, epsilon=0.0001)

    # return points on polygons
    for point in points:
        fco, normal, _, _ = bvh.find_nearest(point)
        p2 = fco - Vector(point)
        v = p2.dot(normal)
        addp(not v < 0.0)  # addp(v >= 0.0) ?

    return rpoints

def test(grid, ob):
    print("test")
    mesh_points = grid.to_mesh()
    bm_points = bmesh.new()
    bm_points.from_mesh(mesh_points)
    points = [v.co.copy() for v in bm_points.verts]

    mesh = ob.data
    bm = bmesh.new()

    bm.from_mesh(ob.to_mesh())

    inside = are_inside(points, bm)
    if grid.mode == 'EDIT':
        # view the result
        bm = bmesh.from_edit_mesh(grid.data)

        for v, select in zip(bm.verts, inside):
            v.select = select
        bmesh.update_edit_mesh(grid.data)

scene = bpy.context.scene
test(scene.objects["Grid"], scene.objects["Suzanne"])

Consider using bmesh_from_object() or applying the global transform to the bmesh.  If using an edit mode bmesh and not wanting to commit changes bmesh.from_edit_mesh(me).copy() provides an unbound copy.

If only the transform needed then transforming a mesh copy with

me.transform(ob.matrix_world)

or using the operator, will provide global coordinates.

bmesh.ops.transform(bm,
        matrix=ob.matrix_world,
        verts=bm.verts)

Alternatively could put one in the object space of the other to make their coordinates equivalent.

The mesh provided from ob.to_mesh() is "not what it used to be"

How do I get a mesh data-block with modifiers and shape keys applied in Blender 2.8?

May be worth noting too that Suzanne has 3 separate parts.


Particles higher than geometry i am having this issue, some particles are getting buried in the geometry and you can see only the tip of the object, is there a way to cast the particles a little bit higher than the geometry volume?

The Simple way ... the Origin

The placement of the particle uses the origin of the particle.  In edit mode move the mesh vertices away from the origin.  You can easily experiment which axis works best for your situation.

X or Y or Z

The origin of the mesh need not lie anywhere near the center of mass of the mesh.

For example a sphere particle may have its origin twice the distance of the diameter ... or in the geometric center.   A tree form particle probably would have its origin at the base of the trunk ... not in the geometric center.


how i can disable motion blur for specified objects in BGE? I need to enable motion blur filter for specified objects in the scene using python or something

Short answer is you can't. The motion blur 3D filter in the BGE is accomplished by accumulating the previous frames together with the current frame, therefore it can't single out a specific object.


Install from file is not working I have been trying to install several addons, but when I click on the zip to install it, it doesn't show up!  I have several addons installed from a few months ago that worked, including animation nodes and sverchok, but now it doesn't work! Python isn't working on my computer as of late and needs to be reinstalled, so is that the problem?  Also, I have tried the unzipped version and the init.py file.

The file you should select will be a .py file, that can be found inside the .zip file. (Use WinRAR or 7Zip to open it) if the init.py doesn't work and it's the only file in there, you could have a corrupt download. What plugin are you trying to install?

Here are the specific installation options for installing the Mitsuba render engine:

First, download this file, then follow the following instructions:

  Unpack this file and move the resulting mitsuba folder into your
  Blender scripts/addons folder. After you do this, restart blender then go to user preferences, then find mitsuba in the addons tab and enable it. Then, you should be able to select
  Mitsuba as the currently active renderer (click either Cycles or Blender Render above the 3D view.

  In the main scene tab, you
  will need to set the path to the main renderer executable (mitsuba.exe
  on Windows, Mitsuba.app/Contents/MacOS/mitsuba on MacOS,
  /usr/bin/mitsuba on Linux).

Then, to install the spaceship generator, go to this link and select "Clone or download" and download .ZIP

Then open the .ZIP and drag the spaceship_generator.py onto your desktop. Then, in blender, go to the addons tab and choose 'install from file'. then select the spaceship_generator.py through the dialog box. Afterwards, just enable the addon and you're good to go.


Smoothing in sculpt mode but not by Smooth tool Can anybody tell me how the guy from the video is smoothing out the nose in his sculpture?
https://youtu.be/TLb_CCoWn5o?t=261
I know that he is using one of those: Draw, Clay, Clay Strips or Layer, but I'm trying to achieve this I think 4th hour and failing. I have similar poly to smooth, but Smooth tool destroys my object.

So I guess the answer is in your question  ;)   it looks like if you use the Clay brush with a high Autosmooth you add geometry without deforming the general shape. Also, maybe he sometimes switches to the Smooth brush with the shift shortcut. Of course make sure that your Dyntopo is activated with a low enough Detail Size (the lower it will be the smaller the geometry will be) and the Subdivide Collapse and Relative Detail options activated (so that the detail size will depend on your zooming).


Can you use geometry node data to affect the material of instanced objects? (E.g. scale changes color) Specifically, is there any way to change the color of the instanced cubes based on their scale attribute?

No. You can't.
You can, however, use common input for your shading nodes and geometry nodes: the empty's position:

Of course as you can see it creates gradients:
So you want to change each coordinate of an inner cube to one single coordinate of that cube - most logically to the center (which is also the vertex that spawned the inner cube).
First an approach that didn't work, to perhaps save someone some time investigating the same thing...
I found that Texture Coordinate > Object for unspecified (default) Object target will give the coordinate in the spawned cube's coordinate system - so you get the information on how far you're from the center of the inner cube:

But the above is a dead end, because you want to know how far you're from the center in the BIG coordinate space, so you end up where you started - you need the inner cube's dimensions relatively to the big cube's dimensions, to know how to scale their coordinate systems so they're compatible with each-other.
--
Now for a solution, that actually works in your case: you can (easily) mathematically describe the geometry, so you can figure out for each pixel's coordinate where's the center of the inner cube this pixel is on. Start by using Object coordinate of the Instancer:

X, Y, Z components are in range of -1.11444..1.11444 instead of usual -1..1 - that's because the coordinate system is defined by the vertices of the object before its geometry is changed - so -1 is the leftmost/lowest/furthest center of an inner cube, and not the boundary of resulting shape:

If there's no empty space between inner cubes, a line between 1st and 9th centers is equal to the length of 7 and 2 halves on either side = 8 inner cubes in middle:

1 / 8 * 9 = 1.125. That would be the number instead of 1.11444 if inner cubes would be as big as possible without overlapping. Armed in this information, let's snap the values to 2/8 as our current range is 2 integers (-1..1), and 8 inner cubes fit into it:

There's an obvious offset in colors, because the snapping starts at half of a cube, so let's translate by half of a cube: 1/8/2*2 (1 of 8 cubes, divided by 2 for a half, multiplied by the range which is two from -1 to +1)  = 0.125 of the entire range:

Now subtracting pixel's position in the empty's coordinate system from its position in the instancer's coordinate system should give the position of the empty in the instancer's coordinate system; then displaying a color based on the distance from it should yield the desired result:

But the gradient returned, something is wrong. Viewing the result of subtraction mentioned in the last paragraph, we can see the problem:

There should be just one color, because regardless of the pixel position, the calculated empty position should be the same (we calculate position relative to the coordinate system, not relative to the pixel). The problem comes from two places:

the instancer is rotating - counter the rotation using drivers pointing to the instancer's rotation (you can right click, Copy as New Driver, then in node right click, and Paste Driver)
the empty is scaled - multiply the vector by the empty's scale, you can use drivers here too.

All that's left is to duplicate the nodes (3 first and 2 last can be common) for the other empty and combine the distances somehow (average, sum etc.).


How to use the rotation matrix calculated by Matlab in Blender? Good morning,
For a project, I created in MATLAB a scene composed of an object and twelve cameras looking at it. With the tool box of MATALB, I got the rotation matrix and the translation vector for each camera.
Now I would like to use these information (rotation matrix and translation vector) to create the same scene in Blender.
So I want to use the translation vector to position correctly my cameras in the space, so I will modify the location parameters in Blender with it.
I want to use the rotation matrix to get the correct rotation of my cameras in the space. So I will modify the rotation parameters with it.
The panel I am using  is this one:

For the rotation, I know in Blender, I can use the quaternion, the euler rotation angles (XYZ, YXZ, ZYX) or the axis vector. I calculated all of them with MATLAB but unfortunately they don't give the correct result. The cameras don't look in the correct direction as shown on the following pictures:

Camera's view:

What I would like is the camera looking at the object like on the following picture but with the parameters calculated by MATLAB. In this example, I use the object constraint properties:

So, in the view of the camera, we can see the object:

The rotation matrix of the first camera is:

Its translation is:

The XYZ angle calculated with this matrix by MATLAB is:

I read that MATLAB and Blender don't have the same coordinate system.
How can I do that?
Thanks for your help.

Some rattling on.
Not sure one arbitrary rotation matrix and one location vector with very little more info is enough. Instead of a very long commment, here is some ways to try and work this out.
The matrices given.
>>> print(R)
<Matrix 3x3 (-0.4877,  0.8728,  0.0190)
            ( 0.4404,  0.2648, -0.8578)
            (-0.7537, -0.4100, -0.5136)>

 T = Matrix.Translation((1.5581, 1.2190, 1.4871))

In blender (row order matrix) the columns of a 3x3 rotation matrix are the vectors of local axes.  If the camera was placed such that it focused directly on (0, 0, 0) (In blender a camera looks down its $-Z$ axis)
For example in default blend, with a track to constraint on camera to look at cube at (0, 0, 0)
>>> C.object
bpy.data.objects['Camera']

>>> print(C.object.matrix_world.to_3x3())
<Matrix 3x3 (0.6563, -0.3579,  0.6642)
            (0.7545,  0.3114, -0.5778)
            (0.0000,  0.8803,  0.4744)>

>>> print(C.object.matrix_world.translation.normalized())
<Vector (0.6642, -0.5778, 0.4744)>

ie its local  $Z$ axis matches its normalized location
if it was same for given data would expect
>>> T.translation.normalized()[:]
(0.6295621991157532, 0.4925462305545807, 0.6008740663528442)

to match a column (or row, not sure of order) of rotation matrix, unfortunately it does not,.
Using angles given to  get this matrix by setting order to ZYX and transposing
>>> print(Euler((map(radians, (141.4, -48.9, -137.9))), 'ZYX').to_matrix().transposed())
<Matrix 3x3 (-0.4878,  0.8728,  0.0187)
            ( 0.4407,  0.2647, -0.8577)
            (-0.7536, -0.4101, -0.5138)>

Reversed order suggests pitch, roll, yaw type rotation.
Transposing suggests either column order of matrices, it is also a cheap way of inverting a rotation matrix.
>>> print(Euler((map(radians, (141.4, -48.9, -137.9))), 'ZYX').to_matrix().inverted())
<Matrix 3x3 (-0.4878,  0.8728,  0.0187)
            ( 0.4407,  0.2647, -0.8577)
            (-0.7536, -0.4101, -0.5138)>

Which also suggests there could be a difference in +/- for CW / CCW rotation.
>>> print(Euler((map(radians, (-141.4, 48.9, 137.9))), 'XYZ').to_matrix())
<Matrix 3x3 (-0.4878,  0.8728,  0.0187)
            ( 0.4407,  0.2647, -0.8577)
            (-0.7536, -0.4101, -0.5138)>

Seeing what happens, set the matrix world to
C.object.matrix_world = T @ R.to_4x4()

for the hell of it in this one have used
C.object.matrix_world = T @ R.transposed().to_4x4()

since it is easy to see in image that (if the object of interest to focus is around (0, 0, 0)  it's looking the wrong way and is upside down.
Can make a conversion matrix via
>>> bpy_extras.io_utils.axis_conversion(
...         from_forward='Z',
...         from_up='-Y',
...         to_forward='-Z',
...         to_up='Y')

Matrix(((1.0, 0.0, 0.0),
        (0.0, -1.0, 0.0),
        (0.0, 0.0, -1.0)))

Or can see that flipping 180 degrees around $X$ axis would give same result.
>>> Matrix.Rotation(pi, 3, 'X')
Matrix(((1.0, 0.0, 0.0),
        (0.0, -1.0, -8.742277657347586e-08),
        (0.0, 8.742277657347586e-08, -1.0)))

So with one of the conversion matrices above as S
>>> S = Matrix.Rotation(pi, 4, 'X')
>>> C.object.matrix_world @= S

In as much as it doesn't exactly answer your question, I hope it gives enough info that if you have two locations and a rotation from each that points directly at a known point (eg the origin) then it would be a relatively easy task to work out the space.


BGE: Refer to keyboard event boolean problem Got this strange little issue:
I've got a separate module, besides variables such as the player object and animation functions there is also the boolean variable for the W key.

w_active = bge.logic.KX_INPUT_ACTIVE == bge.logic.keyboard.events[bge.events.WKEY]

Now when I import it from the module to another script and go like:

if w_active:
   run_animation()

It won't play it but when I don't use the variable and write the bge.logic.KX_INPUT_ACTIVE = bge.logic.keyboard.events(bge.events.WKEY) right after the if it does work.

I also checked it out with print(w_active) it seems the problem is that the boolean stays on False even when I press the W key.

This appears to because the module will only be executed once. Variables assigned directly inside the module will retain their initial value and won't be re-evaluated when accessed later.

To re-evaluate a variable, define it inside a function and call the function from wherever you want to access the current value of the variable.

For example, in the module you might create a function to return True if the W key is pressed:

import bge

def is_w_active():
    return(bge.logic.KX_INPUT_ACTIVE == bge.logic.keyboard.events[bge.events.WKEY])

Then when this is called from a script (or anywhere else) like so:

import bge, keyboardmodule

print(keyboardmodule.is_w_active())

it will return True or False accordingly.


Can I adjust bones after skinning and weight painting? I used rigify to create a rig and then skinned it. I then weight painted some areas. Is it possible to move some bones and reskin without doing everything all over? I need to adjust the hand especially.

You can edit the armature as much as you like as long as the bone names remain the same.

You see, weight data is stored in the object in the form of Vertex Groups. Vertex Groups are a multi-purpose way of defining weighted areas in mesh that's used for all kind of things, skin weighting being one. The armature modifier just takes the incoming bone names and matches them with the names of the Vertex Groups. It's super flexible.

It's possible to even delete the rigify generated rig, do the adjustments in the metarig and generate a new one, and the armature modifier is like nothing happened.

The trick is to add the armature modifier without adjusting the pre-existing weights. Through parenting, you just have to choose "Armature Deform"

Or by setting the armature object in the armature modifier manually.

Both will leave your skin weight data as it was. No need to redo.

If the bone names have changed, for whatever reason, you only need to rename the corresponding Vertex Group to match the new one.


How to get operator defaults How do I get a list of default properties for an operator, similar to how the console autofill does, so bpy.ops.export_scene.fbx() gives:
check_existing=True,
filter_glob="*.fbx",
use_selection=False,
...

Operator property variables are defined as Python class annotations, so you can read those to find their defaults.
First, get the name of the class as registered:
>>> bpy.ops.export_scene.fbx.idname()
'EXPORT_SCENE_OT_fbx'

Then use that to get operator class as defined in the script file:
>>> getattr(bpy.types, bpy.ops.export_scene.fbx.idname())
<class 'io_scene_fbx.ExportFBX'>

And lastly, read the type annotations on that:
>>> getattr(bpy.types, bpy.ops.export_scene.fbx.idname()).__annotations__

The results from this are a little long and also include information like minimum and maximum permissible values, so you may want to filter them through a dict comprehension to get something easier to use:
>>> {k:v[1].get("default", None) for k, v in getattr(bpy.types, bpy.ops.export_scene.fbx.idname()).__annotations__.items()}
{'filter_glob': '*.fbx', 'use_selection': False, 'use_active_collection': False, 'global_scale': 1.0, 'apply_unit_scale': True, 'apply_scale_options': None, 'use_space_transform': True, 'bake_space_transform': False, 'object_types': {'CAMERA', 'EMPTY', 'ARMATURE', 'OTHER', 'MESH', 'LIGHT'}, 'use_mesh_modifiers': True, 'use_mesh_modifiers_render': True, 'mesh_smooth_type': 'OFF', 'use_subsurf': False, 'use_mesh_edges': False, 'use_tspace': False, 'use_custom_props': False, 'add_leaf_bones': True, 'primary_bone_axis': 'Y', 'secondary_bone_axis': 'X', 'use_armature_deform_only': False, 'armature_nodetype': 'NULL', 'bake_anim': True, 'bake_anim_use_all_bones': True, 'bake_anim_use_nla_strips': True, 'bake_anim_use_all_actions': True, 'bake_anim_force_startend_keying': True, 'bake_anim_step': 1.0, 'bake_anim_simplify_factor': 1.0, 'path_mode': 'AUTO', 'embed_textures': False, 'batch_mode': None, 'use_batch_own_dir': True, 'use_metadata': True, 'axis_forward': '-Z', 'axis_up': 'Y'}


How to show the edge color from imported '.ply' file? I have a ply file new.ply.
ply
format ascii 1.0
element vertex 8
property float x
property float y
property float z
element face 7
property list uchar int vertex_index
element edge 5
property int vertex1
property int vertex2
property uchar red
property uchar green
property uchar blue
end_header
0 0 0
0 0 1
0 1 1
0 1 0
1 0 0
1 0 1
1 1 1
1 1 0
3 0 1 2
3 0 2 3
4 7 6 5 4
4 0 4 5 1
4 1 5 6 2
4 2 6 7 3
4 3 7 4 0
0 1 255 0 255
1 2 255 255 0
2 3 0 255 255
3 0 255 255 255
2 0 0 0 0

Can I show the edge color in Blender?

I know this isn't a complete solution, but I hope it will help you plan your next steps.
First read this: File format with per face colors
Blender isn't importing any colors from your .ply, so either it's a shortcoming in Blender, or the file isn't properly formated.
Once you managed to get the colors, use the material setup below. Where mine says "Col" your setup will be empty at the beginning, if you click on the empty field, there should be only one option, if there are none, the color import failed.
For triangulated view, you can use this setup:

Important: This only works with triangles!
If you want to show polygons > 3 vertices, use the Wireframe Modifier and delete the Wireframe and the Multiply node from the setup. The Wireframe Modifier can be used on top of your old geometry, to show both.


Transforming UV vertices using numeric values in Blender 2.7 How can I perform Move, Rotate and Scale transformations on UV vertices using precise numeric values?  Is there an add-on I can use?

When I transform most types of spatial elements in Blender, the Tools panel displays a panel of options for that transformation, particularly a list of numeric input fields.

When I transform UV vertices in the UV/Image Editor, no such options panel appears in the UV/Image Editor Tools panel, but an options panel does appear in the 3D view Tools panel.  When I adjust the numeric values in that options panel the mesh gets transformed instead of the UV vertices.

When I transform UV vertices in the UV/Image Editor, copy the logged python code used to perform that operation, and run that code in the python console, the mesh is transformed instead of the UVs.

It seems that Blender's UV transform UI is simply a half-hijack of the regular transformation workflow.

if you hit N, you open a panel which has a field by which you can move vertices precisely.  Blender also allows you to perform mathematical equations in these fields.

As for rotating and scaling, there is no field to type into, but you are able to do it in another way.  After hitting "r" to rotate, you can simply type in the number of degrees to rotate it by.  This also works for scaling, and this can even be applied in the 3D view.
Also, if you open the tool panel (t), you will find two buttons for quickly rotating in 90 degrees, shown by arrows on the picture below.  You can also use the snapping tool, which is circled below.  You can turn it on and off by clicking the magnet button which I circled, or by holding down ctrl.  This will rotate it by 5 degree increments, or scale it by increments.  Blender even shows by how much you are moving/scaling/rotating in numbers where I have drawn the square below.  It only shows it while you are performing the action, however.

Hope this helps you.  Good luck!


How to add dirt on a direction of the object I have modeled a car and now im trying to texturize it. I would like to make the materials proceduraly, so I have not unwrapped the model (if its necesary I will, but I dont want to bake the textures).

My problem its that I would like to add dirt at the bottom and front of the vehicle, and I dont know if there is a way to do that, for example, in Substance Painter you can set a direction and it will make a mask with that, but I dont know any way to do that.

I have seen this video: https://www.youtube.com/watch?v=ZmrCoGj9m2Y
but it doesnt seem to work to me

Im using blender 2.8. Thx

The model:

If you need to give your dirt a direction, other than the object-Z illustrated in Andrew Price's tutorial, you can 'shine' the dirt onto the surface from any point in the object's space.

If you take the normalized Dot Product of the Normal at the shading point with a vector (which you can visualize as a point in the object's local space), then the resulting 0-1 value looks much the same as if the object was illuminated from that point. You could also put the Normal Texture coordinate through a 'Normal'node, but that doesn't take numerical entries, and isn't quite as controllable.

... You can use the value as the factor in a mix between your clean and dirt shaders.

You also have the option of using a Geometry node > 'Pointiness' attribute as a component in the mask, to add dirt in crevices.


How to straighten distorted edge I'm using the subdivision surface modifier and noticed that on section of my mesh, the edges are very distorted. I've tried scaling along an axis, editing when subdivision modifier is off, tried pulling vertices to try and line them up properly but can't seem to get it. Lines look normal when I turn modifier off. (See 2nd image in object mode)

Sculpt mode seems to jack it up even more. But perhaps I'm not using the correct tool.

Any suggestions on how to straighten or smooth the edges so that the mesh is smoother?

So I may have fixed my own problem. It seems that there was a duplicate edge in there that was causing it. Removed and recreated the faces and that seems to have fixed my issue.


How to view Environment texture in Solid / Texture / Material view? I saw this happening in some tutorial, but have forgotten for the moment,
What I want is : To make the HDR environment texture appear in 3D viewport without going into Render Mode. I can use the following :

Material Mode
Texture Mode
Solid Mode

Actually, there is some Setting (i suppose)
through which this is achieved. Object textures are available but Environment texture is hidden in these 3 modes, and the Reason behind this question is that I dont want to burn my CPU, just in order to switch b/w modes to see the OBJECTs & HDR that they fit well or Not

In the N panel of the 3D View, check World Background under Display.

Note: This won't change the shading of the objects, like if it were actually rendered, but just show you what the texture looks like.


How to quickly position many different objects (not copies of a single object) in rows with an offset? Does anyone know a tool or an addon to quickly position many different objects (not copies of a single object) in a scene in rows with an offset?

Why do I need it? I make a mod for a video game. The script for exporting models from the game is not very convenient, all models are placed in one scene at the origin. There are several hundreds of objects on each map, and what object does it represent, as we say, "you can't figure out without half a liter")). With the help of this solution, I can pretty quickly place all the objects in the scene so that I can navigate to what is

The question is closed, thanks

You could use a particle systhem.

Group your objects in a collection
Create an plane with as many vertecies as you want to spawn objects.
Attach a particle systhem to this plane
Adjust the particle system to spawn all particles in the first frame.
Set the particle systhem to use the objects from the collection as particles.
Set the scale of the particles to 1