How to Fade Transparency in Animation, and hence record in frames, frame by frame?

What you could do animate a a plane with mix shader with a transparent and diffuse and animate the factor value so that it goes from fully transparent to diffuse and have the background transparent then overlay it in the video editor. There probably another way but this how I would do it.


How do I use python to get the dimensions of a text object immediately after it is created?

Since there's no .update() method for Curve objects, you need to trigger a scene update:

t1.body = "Hail Bob!"
bpy.context.scene.update()
print(o1.dimensions)

Result:

<Vector (3.6080, 0.7000, 0.0000)>


How to split a Mesh with random_selection

Here is another take, that randomly selects from all faces using randint(0, len(faces)) pops the selected face from faces list and adds to selected until the desired length is achieved.

import bpy
from random import randint

context = bpy.context
obj = context.edit_object
mesh = obj.data
# check that percent is between 0 and 100.
percent = 40
# test code to run in edit mode
import bmesh
bm = bmesh.from_edit_mesh(mesh)
# deselect all
for f in bm.faces:
    f.select = False
# amount that need to be selected (to nearest int)
select_count = int(percent * len(bm.faces) / 100)
# unselected
faces = [f for f in bm.faces] # could use f.index
# selected
selected = []

while len(selected) < select_count:
    # choose randomly from faces
    i = randint(0, len(faces) - 1)

    # pop and select
    f = faces.pop(i)
    f.select = True
    selected.append(f) # or use f.index
bmesh.update_edit_mesh(mesh)

print("Selected %d of %d" % (len(selected), len(bm.faces)))


How to create a sphere with different ring vertex count by scripting?

I think, there is no perfect solution to this problem, though:

What is the problem:

Chords of each circle need to be regular in both directions (latitude, longitude)
But this chords length need to correspond to a latitude of this sphere
And this latitude may not correspond to an entire amount of the chord length

So the result is only an approximation.

The code without the UI:

import bpy
from math import pi, cos, sin

#Create a new mesh from a geometry
def CreateMesh( scene, name, location, vertices, edges, polygons ):
    mesh = bpy.data.meshes.new( name )
    obj = bpy.data.objects.new( name, mesh )
    obj.location = location

    scene.objects.link( obj )
    scene.objects.active = obj
    obj.select = True

    mesh.from_pydata( vertices, edges, polygons )
    mesh.update()

    return obj

#Merge new vertices (a ring) to previous one
def MergeGeometry( vertices, edges, newVertices ):
    base = len( vertices )
    vertices += newVertices
    newVerticesAmount = len( newVertices )
    if newVerticesAmount > 2:
        edges += [(base + i, base + int((i+1) % newVerticesAmount) ) for i in range( newVerticesAmount )]
    elif newVerticesAmount == 2:
        edges += [(base, base + 1)]
    return vertices, edges

#Calculate a circle
def Circle( z, r, verticesAmount ):
    baseAngle = 2 * pi / verticesAmount
    return [(r * cos(i * baseAngle), r * sin(i * baseAngle), z) for i in range( verticesAmount )]

#Calculate the sphere
def HomogeneousSphereBySegments( segments, r ):
    vertices, edges = [], []

    if segments % 2 == 0:
        ringAmount = segments // 2
        baseAngle = pi / ringAmount
        chord = 2 * r * sin( pi / segments )
        arc = 2 * pi * r / segments
    else:
        #If odd we have to shift the angle from the 'equator'
        ringAmount = segments // 2
        baseAngle = pi / ringAmount
        chord = 2 * r * cos( baseAngle / 2 ) * sin( pi / segments )
        arc = 2 * pi * r * cos( baseAngle / 2 ) / segments

    #First pole
    vertices += [(0,0,-r)]

    for i in range( 1, ringAmount ):
        angle = (i * baseAngle) - (pi / 2)
        z = r * sin( angle )
        localR = abs( r * cos( angle ) )
        verticesAmount = int( 2 * pi * localR / arc )
        vertices, edges = MergeGeometry( vertices, edges, Circle( z, localR, verticesAmount ) )
        print( ringAmount, baseAngle, angle, z, localR )

    #Second pole
    vertices += [(0,0,r)]

    return vertices, edges

Blend file with code usable as an operator (add mesh, 'Homogeneous Sphere'):


Unable to match bevel curve to reference photo

I think your best bet is to make the bevel manually (without a modifier). You can use a custom bevel profile when you first create the bevel (this option is present in the modifier as well, but is much harder to work with, and doesn't always give the best results). You can then chose whatever shape you want by modifying the curve. You can do multiple edges/verts simultaneously this way as well (not shown):


Does Blender create large cached files on Mac computers?

The cache files that you are probably referring to are BVH cache files created during rendering with Cycles render engine, if the Cache BVH option as been activated for the current file.

Unless you specifically activated this option Blender should not be storing those to disk. I don't think you have to worry too much though, as far as I know it has been removed from Blender 2.77+, so if you are running the latest version it may not even be available since recent optimizations have made it obsolete, I think.
The setting could be found under the Properties Window > Render Tab > Performance Panel > Final Render > Cache BVH.

Under Windows, if running the Zipped standalone Blender version these files end up in Blender/2.##/Cache folder I think, for standard system installations they probably end up in Blender's user preferences folder under AppData in the current user's profile folder. I have no idea where these may end up in MacOS, but guessing from Windows location they will probably be stored in your user profile folder too, right next to where your user Blender preferences are stored.

Other than that, the only cache files that Blender stores are physics, simulation and mesh caches that result from baking fluids or other mesh deformation data, but these are explicitly created by the user and require manually configuring paths through the Blender UI, so you will like know where they are stored. Most often they sit right by the side of the corresponding Blender file, and are regarded as user content, not garbage.


Rendered glossy texture does not match preview

Thanks for the help guys. After playing around for a while with this mesh I found that parts of it were reflective after all. But not the faces on the front. Flipping the normals and adding a bit more light gave me the result I was looking for.


You have overlapping curves.

Your choices vary depending on what the element is supposed to look like:

Edit your SVG file with a vector graphics editing program and make the different elements into separate paths.
On the imported SVG separate the elements:
Select one of the control points on the curve and press CtrlL to select the linked segment:

Then press P to separate it into a new object.


Is there a way to keyframe a modifier to turn on or off?

To achieve this effect you can use the Dynamic Fracture Mode for the object to be fractured. Note that the Dynamic threshold will cause the object to fracture on impact after falling if set too low. Make adjustments between this and the mass of other objects that interact with the simulation so that things work as desired.

The object that will fall onto this object needs to have a sufficient amount of mass in order for the fracture to work. Here, the sphere has a mass of 25, the rest of the rigid body settings are at defaults.

You may need to increase steps per second in the scene properties if the simulation seems to be unstable, just be sure that all transforms (rotation, scale) are applied.


The object is active (yellow origin visible):

But not selected (yellow or orange outlines visible):


Automatically setting the rendering frame range in compositing

Turns out I just wasn't accessing the right object type. The movie clip node contains a clip parameter, which contains the data I needed. The frame end range can then be set like this:

frameCount = bpy.data.scenes['Scene'].node_tree.nodes["MovieClip"].clip.frame_duration
bpy.context.scene.frame_end = frameCount

Full specification of the MovieClip datatype can be found here


Method:

The idea is to first compute the distance from the camera for all vertices of a polygon 2) then find the vertex that minimum distance from the camera 3) then project the remaining vertices of the polygon accordingly.

Follow the Method for Depth Map with AN+EN to get this node-tree,

We compute the distance from the camera for all vertices of each polygon then reproject according to the vertex that has minimum distance from the camera. This will give a new polygon(s) that is perpendicular to the camera view,

Now, we have vertices for separated polygons and we can get polygon-indices and edge-indices with the help of the Separate Polygons node,

Blend File:

To add spheres at the center of newly project polygons, first, we have to compute the scale according to the polygon size like so,

Then use Extract Polygon Transforms node to get the polygon transformation and use the Step 4 scale for matrices to instance spheres at the polygons' center,

Blend File:


How can I stop the grey tint that covers the viewport when I'm using edit mode?

Disregard, I had to unset 'fade inactive geometry' under the 'show overlays' dropdown menu.


Stretch To constraint with uniform scaling instead of stretching/deforming

Add a new bone, set it to copy loc and rot of the stretching bone (in world space), and use 3 copies of the same driver to drive its 3 scale values with the Y scale value of the stretching bone (local space).


bpy.ops.object.align( align_mode='OPT_4' ) throws: keyword "align_mode" unrecognized

To track down the cause of  the error shown :.

Could be a version issue, the docs linked are for current,  matching
those available circa 2.91

If you are using an older version, consult the appropriate version
docs, or consult the python console.
 >>> bpy.ops.object.align(

 align()
 bpy.ops.object.align(
         bb_quality=True,
         align_mode='OPT_2',
         relative_to='OPT_4',
         align_axis=set()
         )
 Align Objects

and to quickly see the valid values of any argument, crunch in an invalid one as shown above with align_mode='FOO'.
>>> bpy.ops.object.align(align_mode='OPT_4')
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/home/batfinger/blender/vers/blender-2.91.2-linux64/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties:  enum "FOO" not found in ('OPT_1', 'OPT_2', 'OPT_3')

    >>> bpy.ops.object.align(align_mode='OPT_4')
    Traceback (most recent call last):
      File "<blender_console>", line 1, in <module>
  File "/home/batfinger/blender/vers/blender-2.91.2-linux64/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties:  enum "OPT_4" not found in ('OPT_1', 'OPT_2', 'OPT_3')

It could be the case some addon you have enabled has overridden the
default operator.

As displayed above this will be evident by typing
bpy.ops.object.align( to autocomplete, into python console to
display the operator docstring

With API calls (ie no operators).
As is the case for most operators can be replaced with API calls.
eg Here I've simply placed a text object, each sharing the data (single letter "T") at global location of each of the selected objects, before removing.  Changing transform  based on whatever the desired align operator properties would be little to no hassle.
import bpy
from bpy import context
# font
font = bpy.data.curves.new("Foo", 'FONT')
font.body = "T"

for ob in context.selected_objects:
    text = bpy.data.objects.new("Text", font)
    text.matrix_world = ob.matrix_world
    context.collection.objects.link(text)
    bpy.data.objects.remove(ob)


Follow Path constraint moves object away from curve?

Positioning the camera to the starting point of the curve isn't necessary.

The camera's location defines an offset from it's constrained location. So to remove this offset, reset the camera's location to 0,0,0 by selecting the camera and pressing ⎇ AltG.

As an example of how this works, the camera is positioned at the start of the curve (2 BU above the world center):

When the constraint is defined, the camera is now 2 BU above the start of the curve, instead of the world center:

This is because the camera location is now relative to a point along the curve defined by the constraint, in this case the beginning.


How to create segment a large model of landscape into smaller sections that can be higher resolution?

To answer your question. Slice down your original hight map into smaller parts. So you can assemble multiple so called map tiles into one high resolution map.

For large detailed enviroment usualy tiling maps are used in game engines. The heightmaps are loaded directly in a shader - in modern games with adaptive generation of geometry depending on the distance you can actualy see (Tesselation).
If you generate a high resolution mesh for each map tile you most likeley will run into memory issues.


Works fine for me in all views using 2.78 build 2016-8-11. On Windows no special driver and I have a sucky standard display chipset that gives me OpenGL grief. You're sure that its in Ortho mode?


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

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


Why is only the first frame rendered repeatedly when rendering my animation?

This is usually caused by the physic simulation that is not cached / baked.
Go to "Physics Properties" tab, then Cache, then Delete all Bakes and then Bake all dynamics. This should be enough.


How to select all faces with the same material?

In edit mode there is a button for that in the materials tab:

This button will add the faces that have this material to the current selection, so make sure you have unselected everything else before clicking that button.


Solved it! I just set the camera's clipping too high, apparently!


How to convert selected vertices to mask?

import bpy
import bmesh

Om = bpy.context.object.data
vertm = [v.select for v in Om.vertices]
bm = bmesh.new()
bm.from_mesh(Om)
if not bm.verts.layers.paint_mask:
    m = bm.verts.layers.paint_mask.new()
else:
    m = bm.verts.layers.paint_mask[0]
for i, i2 in zip(bm.verts, vertm):
    i[m] = i2
bm.to_mesh(Om)
bm.clear()
Om.update()

this will work in Object and Sculpt modes. Not while in Edit mode.


my node set up for transparency in cycles. hope this helps


In the render properties for cycle find the Light Paths and increase the Transmission value till the dark spots go away.


Navigate normally from camera perspective?

If you wish, you can lock the Camera to the perspective view. That means that whenever you navigate in the 3D viewport the camera will 'follow' you in the view, copying the location and rotation of your navigation. In effect, in this mode it will look like you have never left the camera perspective as the dark border around the camera and the camera border itself, will remain visible.

It can be enabled in the properties panel (N) under the 'View' section:

At any point you can then disable the option and the camera will remain at the position you navigated to meaning you can use this to move you camera into position and then leave it at the desired location.


How come Blender does not reconize a mesh from my makehuman program?

First: It would be helpful to know exactly which version of makehuman and exactly which version of blender you are using. The advice on how to proceed will be different depending on these answers.

At least DAE should work out of the box for exporting a makehuman character to blender, although material transparency might need to be tweaked after import.

This said, the recommended approach for exporting a character from makehuman to blender is still MHX2 rather than FBX or DAE. MHX2 has been ported to blender 2.80, but the import button is now available on the T-shelf rather than in the import menu.

I would thus recommend trying to get MHX2 up and running rather than try working through FBX or DAE, when the end target is blender.

As an alternative, and if you are using makehuman 1.2.0 alpha 2 or later, you can use the new blender integration to import a fully rigged character. See https://www.youtube.com/watch?v=tAwfR-G813g for a general introduction and https://www.youtube.com/watch?v=eEaVZVbTJOQ for notes specific to blender 2.80.


Render preview looks different than material preview

Material preview uses a hidden HDRI image for a source of lighting and reflections. if you want to add one yourself, go to the shading tab, and change the box in the middle left from "object" to "world. Then add an Environment Texture (Add > Texture > Environment Texture) to the graph (not an image texture) and select an HDRI for your image. The ones that come with blender are in the Blender Folder at .../2.93/datafiles/studiologhts/world (.exr files). You can also find them online for free in many places - one of the most popular is HDRI Haven (https://hdrihaven.com/hdris/)


Why is a text not rendering with glow effect but other objects are?

I've solved this. Glow/glare is determined by a background (it bleeds out past the object). Text and shapes have no background like a transparent image plane would.

Solution: Add a plane behind your thing that won't glow, and make sure to add it to the object/mesh. Make this plan transparent, and it won't render but it WILL provide the background needed to show the glow. It's a coding thing that shouldn't exists.


Is one sample rendering in Cycles sufficient for a simple texture shot?

As cegatron mentioned, if your happy with the result then you only need one sample. Something to consider is that one sample also effectively eliminates anti-aliasing.

By choosing Branched Path Tracing you can also get more control over the samples used. You might have a scene that uses SSS so you can increase the subsurface samples but keep the glossy samples at one.


You should be able to use neural networks in Blender for instance with Tensorflow and Keras. There are several problems though, while Blender has several ways to simulate physics, it does not have muscle simulation. The interaction between neural network an physics may be very complicated. Adjusting the state based on the output of the neural network will require different adjustments to depending on the physics sim. For some there may not even be a way to adjust parameters mid-way. Interactive display and performance will require that the NN is run in a different process so the UI isn't locked.

It may be technically possible, but as of now this would require extensive work and likely modification of Blender's source.


thanks for the file, it was easy: it's the unapplied scale for all chain rings (even the bigger one). They all have some scale like 1.846...

applying each (with CTRLA then "scale"), it becomes 1.0 and it behaves well...


Strange specularity in Blender Internal reflection

The reason you can't see any specular reflections on the cube is because they are just that, reflections. Since the cube's faces are flat planes, you will only see specular reflections if you are at the opposite angle of your light source.

The reason they show up in the reflection is because the light is bouncing off of the face of the cube, (just away from the view/camera which is why you can't see it) and then reflecting off of the mirror.

I tested this on some other objects as well, all using the same materials. The mirror reflects the specular light based on where it reflects off of the object and then off of the mirror.

What it comes down to (as far as I understand) is that we expect the light to behave like diffuse light (the mirror reflects what we see exactly) but instead the light bounces off of the object, then off of the mirror and into the camera, we just can't see when it bounces off of the object since we are at the wrong angle.

You can test this in the real world as well, by using two perpendicular mirrors and a light source. When set up like you have it, you will only see the light source in the horizontal mirror.


How do I create a star extrusion to circle?

First of all, your Circle should have the same amount of vertices as your Star (or it can have more but then it will be more complicated).

Also you can add Circle in Object Mode and join (Ctrl+J) it with Star or you can just add Circle while being in Star Edit Mode.

Then select both shapes (outer edges) and press CtrlE > Bridge Edge Loops.

After that you will want to select all and Recalculate Normals - CtrlN.


How to iterate through nodes and display them as a template

Here's the quickest way possible

for node in bpy.context.object.active_material.node_tree.nodes:
    print (node)


Get vector location list from matrix list via script node in Animation Nodes

I eventually worked out how to make the loop in the script nodeto extract the vectors into a vector list.


Weird sharp vertices with subdivision modifier

This is typical of inverted normals.

To fix it, go in edit mode, select all the vertices and use ShiftN to recalculate normals.


Not sure if I am understanding correctly. Also not sure what render engine you are using. If its cycles I recommend downloading 2.79 (if you don't have it already) and use the Principled BSDF shader with the Metallic set to 1 and play with the roughness value until you are happy with the results.

Also keep in mind you need a light source to actually reflect the light. I used an HDRI in this image but you can just use a plane mesh and put an emission shader on it. Then position it how you like best.


At the moment, Grease Pencil is not integrated with Eevee, but this is planned for the future.


I tried to obtain what you describe: it wasn't extremely simple, but I think the result should be something near, at least:

How it is done?

added the path
added a 5 vertex segment
added a curve modifier to the segment (highlighted in the above image), targeting the curve, along X
now moving the segment along X (animating with loc keyframes) it follows the curve
then added 5 spheres, each snapped to each of the segment vertices, then each vertex parented to the segment
alternatively, and more efficiently, you can parent one sphere to the segment, then select the segment and enable duplication on "verts".

the following images show the alternative method, and also a movement along a more complicated curve:

there are probably other ways, but this should be near.


Open Blender

Go to Blender User Preferences (File>User Preferences or Ctrl+Alt+U)

Go to Input

In the search box, type "View Selected"

Find the one that is under 3D View and is currently binded to Numpad .

Change that to whatever key is convenient for you.

Click Save User Settings

Viola.


Getting edges of the camera's view on the scene XY plane

From the camera view frame.
bpy: How do you find the corners of a camera frustum?
A camera points in the -Z direction. For a perspective camera can find the vectors of the origin to the frustum and if and where they intersect with the XY plane.
Test script.  Have kept it simple. Uses the scene camera, finds the frustum, adds a cube on XY plane given image (0, 1) coordinate.
Please note: have used (0, 0) as bottom left and (1, 1) as top right.
import bpy
from math import inf
from mathutils.geometry import intersect_line_plane as ilp

# Global XY plane
plane_co = (0, 0, 0)
plane_no = (0, 0, 1)

context = bpy.context
scene = context.scene

cam = scene.camera
mw = cam.matrix_world
o = mw.translation

camdata = cam.data

tr, br, bl, tl = [
mw @ f for f in camdata.view_frame(scene=scene)]
# offset vectors from bl.
# eg middle would be bl + 0.5 * (x + y)
x = tr - tl
y = tr - br
# roll around in CCW direction
for image_coord in ((0, 0), (0, 1), (1, 0), (1, 1)):
    cx, cy = image_coord
    # vector pointing from cam origin thru image point (PERSP)
    v = (bl + (cx * x + cy * y)) - o

    pt = ilp(o, o +  v, plane_co, plane_no, True)

    if pt and (pt - o).dot(v) > 0:
        print("Adding cube at ", pt)
        bpy.ops.mesh.primitive_cube_add(
                location=pt,
                )

    elif pt and (pt - o).dot(v) < 0:
        print("BEHIND THE CAMERA")
    else:
        print("NOT POSSIBLE")

A plane to represent this.
Make a plane outlining the possible locations seen by camera. Tweak to make a plane mesh based on the points.

Plane defining allowable locations in default scene
coords = []
for image_coord in ((0, 0), (1, 0), (1, 1), (0, 1)):
    cx, cy = image_coord
    # vector pointing from cam origin thru image point (PERSP)
    v = (bl + (cx * x + cy * y)) - o

    pt = ilp(o, o +  v, plane_co, plane_no, True)
    if pt:
        coords.append(pt)
print(coords)
if coords:
    name = f"{cam.name}_ViewPlane"
    me = bpy.data.meshes.new(name)
    faces = [range(len(coords))] if len(coords) > 2 else []
    me.from_pydata(coords, [], faces)
    ob = bpy.data.objects.new(name, me)
    context.collection.objects.link(ob)

Tests

59 random scaled dots per click at random(), random()

150 Foos
Related.
How to find all objects in the Camera's view with Python?
Camera coverage calculation inside a room
projecting onto a mirror and back?
https://blender.stackexchange.com/a/160388/15543


Your scene doesn't have any particular issue. I think that on a powerful pc it would render smoothly. The freezing of the viewport is an effect of a low FPS count as your computer takes a while to calculate the position of the polygons from the simulation and render them.

The issue with the "rendered" version is probably caused by the usage of the AVI raw format that is not perfectly compatible with your video player

By exporting to another video format and waiting some time, you should obtain something like this without further adjustment.

Things that may affect 3D viewport performance:

Number of polygons:

While your scene is composed by only two object, your polycount is surely considerable. You may try to reduce the resolution of the text object, expecially in the areas where the mesh is more dense.

Simulations

You don't need to setup another level of collision (unless you are trying to achieve a particular effect) as the explode modifier is based on the particles system which have is built in phyiscs options.

Number of particles

In this particular case, the more benefit cames from reducing the polycount. By roughly applying a 95% decimation modifier you can see how the preview gains about 25fps, making it usable.


If you can, just separate both into two separated scenes rendered at different frame rates. This will be the case if your final footage doesn't change too often (ideally, one time).

If the amount of footage is manageable, use the speed control effect strip to make both the same speed.

Otherwise, put all your raw 25fps into one large edit and render it at 24fps. Now you can import it into your actual project and edit it like the rest of the video.


Solution: Problem was the object data properties frames. It was 100. Thanks guys.


Correcting perspective distortion for an angled projector (Keystone effect)

I don't know whether this suits, you might be wanting more of a simulation of real lenses. But we have an unusual advantage here in CG-world .. the projector can know how far away it is from the points it's projecting onto, via a Ray Length output of a Light Path node.

By similar triangles, (multiplying the normal by the ray-length) the spherical look-up, using the lamp's normal direction, can be corrected back to an orthogonal look-up into the texture, correcting the keystone.

Assuming the lamp is rotating around its X axis, that angle can be used in a driver to correct the aspect ratio of the resulting rectangle.A sine is taken only because the wall is at 90 degrees. If the lamp was projecting onto the floor, or the lamp was parented to a screen with its Z pointing towards it, that would be a cosine.

I've also set the lamp's falloff to 'Constant', so the image is evenly bright. You may want to switch that out.


Your model is not constructed with x-mirror perfectly and the armature is not placed in the exact middle of your mesh as shown below:


How to lock object rotation along a path

Select your path / curve object
Go to Properties Editor > Object data
Find the Path Animation panel
Untick Follow to disable the rotation along path


How to i add a gradient to particles, normal to the emitters surface?

Gradient texture upon Generate coordinates

To assign a gradient texture to the single particle object you can use the built-in node available for cycles. You can control the gradient with a color ramp node as well.

The tricky part in your setup is that you would like to access the data of a different mesh that doesn't belong to the particle. One possible way is to take advantage of the Object option in the Texture Coordinate node.

You didn't share your setup for the colored shader (the one you show with particles baked and joined), so I'll assume by guessing that you are using the Generate texture coordinate of the object. We can't access that data, but we can try to transform the Object's texture coordinate from an empty object.

In the following example I'm using the Mapping node to translate the empty's (which was created in the same location of the object's origin) coordinates.

An altenative would be to simply move the empty in one of the corner of the object's bounding box and scale it appropriately:

The following image sequence is showing the node in action. The shape on the right is the mesh with particles baked with a shader showing the Generated coordinates to use as reference.

Note: accessing data from other objects may not be possible for all the attributes. Object's texture from another object can only provide location, rotation and scale of the object.


Is it possible to write a script which opens Blender's existing FBX exporter window?

Use bpy.ops.export_scene.fbx('INVOKE_DEFAULT').
More info about "Execution Contexts": https://docs.blender.org/api/2.79/bpy.ops.html?highlight=invoke#execution-context
I'm not sure what the best way to run something after the operator is complete is though. Maybe try: Running code after a modal operator finished its job


Blender 2.8 crashes when entering particle edit

In case it helps someone: if you have a baked hair simulation and try to go into particle edit (i.e., combing) without deleting the bake first, it will crash blender.


Need help with creating a globe in Blender

First, you need the sphere. I suggest you start with a cube. This way you get almost evenly spaced quads all around the globe.

Add a subdivision surface modifier to the cube and crank up the view subdivision to 4. Click "apply". It should look like this:

Go into edit mode with Tab.

Go into Mesh select mode: Vertex with Ctrl+Tab and selecting Vertex.

Select everything. Hit A until all vertices are orange.

Make it a true sphere. Hit Shift+Alt+S. Type 1 and then Enter.

Use the knife tool to cut out pices of the sphere. Start the knife tool with K. Click around until you are satisfied. Finish with Space.

Go into Mesh select mode: Face with Ctrl+Tab and selecting Face. Right click all the faces you have cut out. They are still part of the big sphere. Hit Y to make them separate from the sphere. Hit E to extrude them out from the surface.


Why does a plane turn black in texture view after rotating?

It's most likely not untextured, just shadowed or backfacing.

Either rotate the plane 180º so the it's normal is facing outside or add a lamp to light that face up


Setting constraint influence in Python behaves differently inside vs outside 'If' statement?

This answer warns that for performance reasons,
Blender does not update certain attributes (like obj.matrix_world) until necessary.
I think your experiment suggests that bpy.context.selected_pose_bones[0] falls into this category.

The same linked answer shows that you can force an update using

bpy.context.scene.update()

Let's try it here:

armature = bpy.data.objects['Armature']
if (armature == None or armature.type != 'ARMATURE'):
    print("Selected object must be an armature")
elif (bpy.context.selected_pose_bones == None or len(bpy.context.selected_pose_bones) != 1):
    print("Select at least 1 pose bone")
else:
    bpy.context.selected_pose_bones[0].constraints[0].influence = 0.0
    bpy.context.scene.update()
    mat1 = bpy.context.selected_pose_bones[0].matrix.copy()
    bpy.context.selected_pose_bones[0].constraints[0].influence = 1.0
    bpy.context.scene.update()
    mat2 = bpy.context.selected_pose_bones[0].matrix.copy()
    print(mat1)
    print(mat2)
    result = "Good" if (mat1 != mat2) else "Bad"
    print("Result: %s" % (result))

yields

<Matrix 4x4 (1.0000, 0.0000,  0.0000, 0.0000)
            (0.0000, 0.0000, -1.0000, 0.0000)
            (0.0000, 1.0000,  0.0000, 0.0000)
            (0.0000, 0.0000,  0.0000, 1.0000)>
<Matrix 4x4 (1.0000, 0.0000,  0.0000, -0.0494)
            (0.0000, 0.0000, -1.0000, -0.0543)
            (0.0000, 1.0000,  0.0000,  0.1240)
            (0.0000, 0.0000,  0.0000,  1.0000)>
Result: Good

When you enter the commands individually on the command line,
Blender seems to call bpy.context.scene.update() in the background for you.
When all the commands are placed in the body of an if-statement, then the commands are not executed until the entire if-statement is written and sent to the Python interpreter.
The interpreter then executes all of the statements in the body of the if-statement very quickly, one after another. Now, Blender does not have time to call bpy.context.scene.update() in the background between each statement.

This explains why you saw a difference in behavior.


As metaphor_set said, you need better geometry, and more of it, for good displacements. That's your issue here - it's trying to displace the geometry as the map is telling it to, but there's only 5 vertices to displace.


Im modeling a Aircraft(Mig9) but i don't know how to procced with the cockpit

Watch/follow any "make a car in blender tutorial" and you will know how to make the cockpit of your plane.

try (Modeling a Car: Honda HSV-010 GT):
http://darkscarab.com/view/43


In the 3D view header, at the bottom of the 3D window change the snapping type pulldown menu to Increment, after that a button will appear by it's side allowing you to change the increment type to Absolute Grid alignment.

I am not sure but I think you can control the size of the grid in the 3D View Properties Shelf > (N menu) under the Display Panel > Grid Floor > Scale


Why do my unwrapped UVs appear outside of the UV canvas?

It appears that something went wrong in a proccess of your unwrapping since there is that line that take up all the space in your grid. Maybe missed some seems? Though, for a sword blade i would use project from view

It also appears that tou havent applied the scale for you mesh. If you ever rescale, rotate or move around your object (in object mode i believe), you have to press CTRL+A while you have your object selected in object mode and select one of the options you need.

If you are unsure what you have changed, while having your cursor inside the 3D View area (where you can see your objects basically), press N and in the window that came out of the right side, check if the locations and rotations are all set to 0 and if the scales are all set to 1. If they are not, that means you have been transforming your objects without applying the changes


I assume you are referring to the "join" (ctrl+J in Object mode) and "seperate" (P in Edit mode)

You can think an object as a grouping of mesh data with a name. Which mode you need depends on what you want to do:

What join does: Takes the selected "objects" (therefore use object mode) and merges the mesh data from the selected objects into one single "object"

What separate does: Takes the selected vertices, edges and faces (therefore use edit mode) and writes them to a new "object" (which is different from that you are currently in.

So for example join (as in ctrl+j) doesn't make sense in edit mode since you already are in a single object. However if you want to make seperately selectable and modifiable groups of vertices, edges and faces then you could use "vertex groups"
Equally seperate (as in "P") doesn't make sense in Object mode, because for that operation you need to tell blender what vertices, edges and faces you want to seperate.

Happy Blending! :)


Can I display two language for ui in Blender at the same time?

I think a good solution is translate tooltips only:

Interface will stay the same, but if you want to know that some button or element do, you can hover cursor over this element and see the hint in native language.


You need to go to the filter >>> Globally disable in viewports and turn it on.

Hope that helps

Good Luck


How do I fill a texture with another texture?

Easiest way how to blend textures is mix them together using "Colors" -> "MixRGB"  node in node editor:

Second option is use external image editor Like GIMP, Krita, Photoshop etc.
For fast and easy workflow you can set path to your image editor in

"File: -> "User Preferences" -> "File" -> "Image editor"

Now you can send your texture to your external image editor from Blender UV/Image editor by

"Image" -> "Edit externaly".

If you finish editing in external Image editor, just overwrite original image and In Blender Image Editor use

"ALT+R" for reload your edited image.


You can find it in the Properties Editor, in the Object tab:

You might also find it useful to use a very simple Python script to set different object indices for multiple objects(all selected in this case) at once:

import bpy

some_starting_number = 15

for i,o in enumerate(bpy.context.selected_objects):
    o.pass_index = i + some_starting_number

(You would copy this into a new text block in the Text Editor and hit Run Script with some objects selected)


The edge split modifier affects the angle above which a corner will be treated as sharp by the Shade Smooth setting. It does that (I assume) by telling Blender that the faces are discontinuous (i.e. split) at those edges. So if you then apply a subsurf to those faces they get rounded off at free edges, which is what you are seeing.

If you want the subsurf for other reasons, then just move it above the edge split modifier in the stack. Use the little white arrows in the top right of the modifier panels to do that.

It looks like you might want to try the bevel modifier in order to get the effect you are after. Subsurf and edge split will still be useful to you, but bevel might give you a bit more control over the fine details.


Your second screenshot is of the header in the 3D view, but the setting you are looking for is in the header of the UV/Image editor:


2.8: How to enable Eevee on a Macbook pro?

It's not something you have to enable, EEVEE is just here and you have to chose it as your current render engine, just like before.

Go in the properties editor, you'll find a drop-down menu for choosing your render engine at the very top of the render tab :

EDIT: As the OP is already in rendered view in EEVEE and without materials, then it looks like a bug.


Update animated texture on plane when NOT selected?

(Enhanced) Answer from OP moved here:

In Object Mode simply Add -> Empty -> Image

then open the desired movie or image sequence file(s) under the Empty's Properties -> Data

set the source to Match Movie Length and Auto Refresh.

This way the sequence not only updates correctly when the Empty is selected but also, when working on another object!


How to make this object child of another object, and conform to a curve at once?

You can't do it this way, because an object with a Curve modifier will only correctly follow the curve if you move it on one of the 3 straight axis (X, Y or Z). If you move it on another axis, which happens if you ask him to follow an object which follows a curve, it will go messy.

I see at least 2 solutions, but maybe there are simpler ones?

1) Use a Curve modifier for your tail

In that case you must deparent the tail from the asteroïd. The asteroïd will follow the curve with a Follow Path constraint, and the tail will follow the curve with a Curve modifier. You must make sure that the tail have the same speed as the asteroïd, as if it was parented to it even if it's not, so you have to play with the Dopesheet keyframes and the Graph editor parameters.

2) Create an armature for your tail, that will follow the path

Create an armature with several bones and with the same length as your tail.
Parent your tail to this armature and place the armature at the beginning point of your curve.
Create an Empty a this beginning point, give it a Follow Path constraint with the curve as the Target.
Parent your armature to this Empty.
Duplicate this Empty with shift D + Enter, then, in its Follow Path constraint, change the Offset so that from Empty 0 to Empty 1 there will be the length of one of your armature bones.
Repeat the Duplicate + Offset operations so that you have as many Empty as your number of bones (+ the parent Empty)
Select the armature and, in Edit mode, give each bone a Track To constraint, with the right Empty as the Target.
Move each Empty along the curve with the Follow Path Offset, so that they are exactly at the position of their bone's head.
You can switch your armature from Octahedral display to B-Bones, and divide each bone in several Segments to smooth the shape of your tail.


Translation and rotation axes not locked

Go to Blender Render. Under the "object" tab, you can also fix translation and rotation, but now it will show in the preview animation (see picture). If you press "P" in your screen, you will also see the effect, but then in Blender Game.


Does an Obj important contain UV mapped textures?

No, a .obj file does not contain textures. This is not a problem with Blender, but just an inherent thing to .objs. It stores the mesh information and actually includes UVs, but not the textures. You will have to import textures separately just like with any other application that uses .objs.


Script working on an object but not on another

Custom properties not set
The driver script as is will throw an error if the custom properties "z" and "prev_z" are not set on the object.
Look for errors in the console.
Where does console output go
Add the appropriate custom properties to the object being driven for it to function as expected.
Note.
The object referred to as self in a driver is an  evaluated copy of the object.
Silly test script to ensure the original object has a custom property "foo" set from within the driver.
Returns the evaluated value of the custom property, if it exists, else 0.0.
from bpy.app import driver_namespace as dns

def test(ob):
    ob.original["foo"] = ob.original.get("foo", 0.0)
    return ob.get("foo", 0.0)

dns["test"] = test

copy and paste this driver into any object to create a "foo" custom property if one does not already exist.


I guess you are talking about more topology question, if so see the attached i have quickly put together a basic example, Its about gradually change the shape over a certain amount of edge loops with supporting loops.


I think you've already identified your problem: Your card isn't officially supported. Combine that with a non official build and it's not surprising to run into errors every now and then.

You can check out the blender wiki article on AMD cards for more info: https://wiki.blender.org/index.php/OpenCL

The wiki article directly says that GCN 1.0 cards aren't supported in builds after March 2017 and that 2.78c (available form https://blender.org) should be used if you have one of those cards. It also says that the limitations are considered a TODO rather than a bug.

Basically there are known limitations with Blender's interaction with certain cards, and unfortunately you have one of them. You should definitely give the latest builds a try to see if anything has been updated, and there is a GPU+CPU option in the newest builds that might be worth checking out.


How to create variable wall thickness with Solidify Modifier?

For this, I wouldn't even bother with the modifiers. Instead, try duplicating the faces then extruding along normals.
Start with your cylinder:

Select half the faces (front side), and press Shift+D to duplicate, and then let them snap back to their original position by right-clicking the mouse. This will make sure the inner faces stay in place when you extrude. Once this is done, right click again and select "Extrude Faces Along Normals" (you must be in face select mode for this to appear in the menu). You can enter an extrusion value - I entered 0.02 to represent 2mm, as my base units are set to 1M.

Now, select the other (backside) faces, and do the same thing, this time using 0.04 as an extrusion depth. Don't forget to duplicate the faces first (I only mention because I forgot twice while testing). Once this is done, you will notice a small gap between the two sets of extruded faces. Luckily, because of your unit length, fixing this is easy. Simply add a loop cut (Ctrl+R) around the larger extrusion and right click to leave it right in the center (coincidentally the 2mm mark).

From here, select the vertices on either side of the "gap" and press M (Merge) and select "At Center". You will have to do this for each set individually - top and bottom, both sides.

Finally, select the whole mesh and do a "merge by distance" operation to clean up any leftover duplicates. The final result should be a watertight cylinder to your specifications.


Added .FBX doesn't follow armature "head" bone

I think I figured it out. The problem is that you did not parent the object to the armature. Simply adding an armature modifier will not make the object move with the armature. To parent, select the object, then the rig, and press CTRL-P, then armature deform.


bring the output of compositing into blender material node editor

Compositing is a process that happens after rendering. Materials are input for rendering. Basically it is not possible to change these steps expect when rendering out to an image and then import it in a material node.

This fixed pipeline is normal in animations and vfx. Compositing in these kings of pipelines are used to tweak the renderings without doing full re-renders.


Blender crashes constantly since v2.80 on Linux when using Nouveau driver

Nouveau drivers aren't officially supported, the minimum requirements state that the official Nvidia drivers have to be installed when using one of their graphics cards.

NVIDIA: GeForce 400 and newer, Quadro Tesla GPU architecture and newer, including RTX-based cards, with NVIDIA drivers (list of all GeForce and Quadro GPUs)


Why is my edited video not rendering all as one?

I do not have much of an answer for the malfunction, except that your frame numbers are huge. The blender manual recommends rendering as frames if it is longer than 2,000 frames, but in this case I recommend rendering it in parts.
PS: The question does not have very clear information, and leaves alot of questions for the answerers to ask. What exactly do you mean by ghost? Does the video show 25 minutes of blank, or does the player just skip ahead? What codecs are you using with FFmpeg? There are several available. How do you do the pan and zooms?
That aside, what is your operating system and graphics card?


How can I get rid of the black dots or black pixels in a float 32-bit EXR baked displacement map?

In Blender, use compositor's despeckle node to get rid of those. The threshold setting is very important, this should do:

Then save the image as OpenEXR.


Theres something wrong with my viewport shading

The default in viewport shading uses an HDRI, which is an image that emits light from all angles, but your scene world has very low light, other than your area light that is pointing straight down.  The house "turns black" because nothing is lighting it.  You can go to the world properties and increase the strength of the world light or add an HDRI to your world.


Here is an example based on this answer. Once it's registered you can press ShiftQ to toggle your BoolProperty. Also notice that  tagging the area for a redraw via context.area.tag_redraw() is requiered after the assignment call in oder to  update the Panel properly:

Once it's enabled (or registered) the shortcut is created automatically:

custom-toggle-shortcut.py

bl_info = {
    "name": "Add-on Template",
    "description": "",
    "author": "poor",
    "version": (0, 0, 1),
    "blender": (2, 70, 0),
    "location": "3D View > Tools",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

import bpy

# ------------------------------------------------------------------------
#    my properties
# ------------------------------------------------------------------------

class MySettings(bpy.types.PropertyGroup):

    my_bool = bpy.props.BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False
        )

# ------------------------------------------------------------------------
#    operators
# ------------------------------------------------------------------------

class ToggleOperator(bpy.types.Operator):
    bl_idname = "view3d.toggle_mybool"
    bl_label = "Toggle My Bool"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        context.scene.my_tool.my_bool = not context.scene.my_tool.my_bool
        context.area.tag_redraw()
        return {'FINISHED'}

# ------------------------------------------------------------------------
#    my tool in objectmode
# ------------------------------------------------------------------------

class OBJECT_PT_my_panel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool
        layout.prop(mytool, "my_bool")

# ------------------------------------------------------------------------
#     register and unregister
# ------------------------------------------------------------------------

addon_keymaps = []

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=MySettings)

    # handle the keymap
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new(ToggleOperator.bl_idname, type='Q', value='PRESS', shift=True)
        addon_keymaps.append((km, kmi))

def unregister():

    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

Gist: https://gist.github.com/p2or/8a37617c4565e4ff143b736a0e4a1660

Alternatively using an update method

Rather than create a new operator use the wm.context_toggle operator, and set up an update method on the property that will redraw the area when run.  If the panel is in same area as key press then would only need update=prop_update

def prop_update(self, context):
    context.area.tag_redraw()
    return None

In example below area_ui_update('VIEW_3D') returns an update method  where if area.type == 'VIEW_3D' in screen.areas that area will redraw.  Useful when your panel is in an area other than context.area eg if your panel was in 'PROPERTIES' you would area_ui_update('PROPERTIES')

import bpy

def area_ui_update(type):
    ''' tag redraw on areas of type '''
    def ui_update(self, context):
        areas = [a for a in screen.areas if a.type == type]
        for a in areas:
            area.tag_redraw()
        return None
    return ui_update

class MySettings(bpy.types.PropertyGroup):

    my_bool = bpy.props.BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False,
        update=area_ui_update('VIEW_3D')
        )

# ------------------------------------------------------------------------
#    my tool in objectmode
# ------------------------------------------------------------------------

class OBJECT_PT_my_panel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool

        layout.prop(mytool, "my_bool")

# ------------------------------------------------------------------------
# register and unregister
# ------------------------------------------------------------------------

addon_keymaps = []

# register
def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=MySettings)

    # handle the keymap
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new("wm.context_toggle", type='Q', value='PRESS', shift=True)
        kmi.properties.data_path = "scene.my_tool.my_bool"
        addon_keymaps.append((km, kmi))

# unregister
def unregister():

    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()


Weird rendering issue: "Rendered 387/390 tiles"

It turned out that after restarting my computer and blender a few times, the issue disappears; it was probably just an error of blender. I would however still be interested in what causes this and how it can be avoided.


Can Grease Pencil get light / shadows like a regular mesh?

Realized as visual effects->shadow in current version 2.91.
https://docs.blender.org/manual/en/latest/grease_pencil/visual_effects/shadow.html


Using game property to control actuator values (BGE Logic Bricks)

I don't think there is a way to achieve that with logic bricks but a small python script can. Simply paste this into a text block in blender's text editor and use the text block name in the python controller.

import bge
from mathutils import Vector

cont = bge.logic.getCurrentController()
own = cont.owner

sens = cont.sensors['Keyboard']
actu = cont.actuators['Motion']

actu.dRot = Vector((own['sp1'],0,0))

if sens.positive:
    cont.activate(actu)
else:
    cont.deactivate(actu)

The script should explain itself fairly well. By getting the controller object we can then get the owner and the sensor and actuator that we are interested in. We use the owner to access the game property own['sp1'] to alter the actuator values.

If you place the line print(type(actu)) you can find the type of actuator and lookup it's properties in blender's api reference. eg the simple motion actuator identifies as a KX_ObjectActuator

The last few lines activate or deactivate the motion actuator based on the output of the sensor.


Character Rigging and Mesh Deformations rotating and shrinking strangely around joint

Select your Mesh and delete all vertex groups and all modifiers as shown:

Select your Mesh then select your armature using Shift+RightClick and hit Ctrl+P then choose With Empty Groups:

Switch to Pose Mode then select the two bones LWrist and LShoulder then select the mesh using Shift+RightClick as shown below:

Switch to weight painting mode and select Assign Automatic From Bones from the Weights menu as shown below:

Done, now the mesh will have weights assigned to these bones with good deformations as shown below:


Having trouble with adding a section to a panel at runtime: IgnitProperties has no attribute 'Add'

Ok so there were a whole lot of small errors that contributed to fixing this. Here were the steps required to fix it.

1) Change bpy.types.Scene.ignit_panel = bpy.props.PointerProperty(type=IgnitProperties) to bpy.types.Scene.ignit_panel = bpy.props.CollectionProperty(type=IgnitProperties)
(PointerProperty to CollectionProperty)

2) All of the scene.ignit_panel in the draw function had to be changed to ignit_options

3) The last for loop had to be removed (this was not actually shown in the code above, but it was after if not ignit_options.collapse:)

4) The collapsible menu if statement had to be moved into the for loop just above it


Blender Cycle's z-coordinate vs. camera-centered z-coordinate (orthogonal distance)

The aforementioned formula is the correct, only that Blender provides the depth at $(x+0.5, y+0.5)$ at pixel $(x, y)$. The general solution is

$$z_c=\frac{fz_s}{\sqrt{f^2+((c_x-x)^2+(c_y-y)^2)d^2}}$$

respectively with the offset:

$$z_c=\frac{fz_s}{\sqrt{f^2+((c_x-x-0.5)^2d_x^2+(c_y-y-0.5)^2)d^2}}$$

if density in x and y differs:

$$z_c=\frac{fz_s}{\sqrt{f^2+(c_x-x-0.5)^2d_x^2+(c_y-y-0.5)^2d_y^2}}$$


How do I update old blender projects to the newest version of blender?

You don't need to update your .blend file.
You just need to open them with a newer version of blender.
Uninstall older version of blender and install new one (you can also install a new version without uninstalling the older one).
Start new blender version (to open the newer version of blender go to the folder where you installed it and launch it), then open your blend file from the blender software.


Object is black in 3rd and 4th viewport shading

This can happen when you turn down the scene lighting.
It's a wild guess, but I couldn't reproduce your issue in any other way.


Smooth icon, left bar 2.8. Doesn´t work like 2.7

Select the wanted vertices.

Select the smooth button on the left.

Then left click on the 3D view and drag the mouse left or right.

Additionally, the operator panel allows to set the smooth value manually.

Note: a long click on the smooth icon makes appear another operator which is 'randomize vertices'.


meshes being generated at target instead of at 0x0y0z

Shift S

Snap Cursor to Center.
Then add Cube

or

Shift S

Snap Cursor to Center.

Click on Cube

Shift S

Snap Selection to Cursor.

Do not be concerned with [it wasn't always like this.]
Be ready for new ideas in Blender


I figured it out thanks to this question:

First, you want to look for the 'window selector' icon, and click it, and choose the 'Video Sequence Editor' option:

Next, if you don't immediately see the video preview, you want to click a button on the bottom of that window that has a red-and-white checkerboard pattern, that will switch the window to be a video preview:

Finally, if the zoom is somehow messed up so that you don't see the entire image in the window, click the 'View' dropdown and choose the 'Fit preview in window' option:

And when all that's done, this is what the window should look like:


How would you select the outer edge of a hideously fragmented terrain?

Because it is rectangular, you can just go into an overhead ortho view, and use box select (B) with vertex selection mode enabled.

Once you've selected it once, go ahead and make a vertex group out of it. Click the add button, then assign the selected vertices to it. Now, you can select those vertices simply by hitting "select" in the vertex group panel.


Particle hair material with random streaks for Cycles

Try using a noise texture and plug it in the factor of your mix shader.
Play with the settings of the noise texture and maybe add a color ramp in between for even more control!


How to run scripts in the background of the game engine without freezing or opening new Blender instances on Windows?

The threading module should take care of it. Just create a separate python thread and run your blocking code (e.g. networking code) in there.

import time
import threading

def main():
    thread = Worker(None)
    thread.start()

class Worker(threading.Thread):

    def __init__(self, args):
        self.args = args
        threading.Thread.__init__(self)

    def run(self):
        print("Starting worker")
        ...
        print("Finishing worker")

Note that Python 3's threading model does not map to the OS threads, all the threads will run under the Python interpreter anyway. Because of this, threading is only useful for executing blocking operations, not for performance gain.


Change Texture Resolution inside Blender

Render Properties > Simplify feature:

Moreover since 2.80 you can resize image directly in Image or UV Editor:


animate pixels (time series) of a raster

You can use your images as an image sequence in Blender.

If the names of the images files are like this :

You can setup this image sequence for the displacement modifier (like in the tutorial of your question).

Simply, use these parameters in the texture panel :

1 : indicate here the first image
2 : set the image sequence option
3 : indicate the number of frames you need

Now to animate you can or use Alt + A (Esc to stop), or open a timeline view and move it manually.

Note : your second approach let think about "shape keys", but a shape key only allows to interpolate between 2 shapes of the mesh and not through the several steps you need (or there is something I don't know).


How to mass refresh textures and say blender to look for them at different location

you can  do that using python script to alter the path of every image located in the older folder to be looked for in the new one; the nodes will automatically be updated after this :

import bpy

images = bpy.data.images

for img in images :
    if img.source == 'FILE' :
         img.filepath = img.filepath.replace('\\old_folder\\','\\new_folder\\')
         img.reload()


Newbie question: Where is my rendered PNG saved to?

If you render only a single frame, you have to save your image manually, by going to menu Image > Save as..
The output path is only for rendering animations or video sequences. This is relatively standard in other 3d packages too.


How do I extend the amount of frames on a 2d animation?

You can change the number of frames for the project if you type it at the bottom right of the timeline window.

Note that you've enabled an alternative preview range, that is different than the project's frame range.

Preview Range(clock icon)
This is a temporary frame range used for previewing a smaller part of the full range. The preview range only affects the viewport, not the rendered output.

Read:
https://docs.blender.org/manual/en/latest/editors/timeline.html?highlight=preview%20range


I fixed the problem, the issue was that the weight painting of the shoulder and the thorax was intersecting a little bit with the arm weight paint, and caused the vertices to get dragged when posed like that.


Can anyone explain to me what the advantage is of the current Child Parent location is?

there are 2 types of assigning a parent you might be interested in:

regular one:

and keep transform one:

as you can see both have a 0.1 vector transform but they are not positioned the same from the parent.
read more about it here:
https://docs.blender.org/manual/en/2.79/editors/3dview/object/properties/relations/parents.html


How do I extrude in the direction the vertices are facing?

It's a real pity, but Blender is indeed broken like that. It does not do what it says. If you choose to Extrude and move on normals it works only if you have faces selected and with edges and vertices it does not work. This could be considered to be a bug, since the functionality does not work as intended or as it's label suggests at least. Luckily, it is not a huge inconvenience since it can be fixed very easily - you can just hit Enter without moving the vertices when extruded and then use Shrink/Flatten(alt+s) to move them in the direction of their normals:

You can also use the functionality of the transform operators to move them as you wish after they are extruded:

Edit: who could have thought?.. - it is broken here as well - you can see in my example gif that the vertex normals change when they are extruded with regular e. Well, if you use Extrude Only Vertices from the Space menu, it seems to work. This is a complete mess when you think about it... I am surprised they managed to leave it like that.


How do i make a inset with rounded shape?

Sure you can sculpt it, but you can also just mesh model it...

The edge requires a loop that you can bevel depending on how sharp you want the edge. The challenge is smoothing out the geometry at the pinch...

Also just added a mirror modifier and of course the sub-division...


Is there any way to turn off pop-up UI windows (dialogues)?

I've found how to do this for the Render and File Browser (applies to the save dialogue) windows: Edit > Preferences > Interface > Editors > Temporary Windows.
However, this does not prevent the preferences window itself from opening up as a new window, so this doesn't fully answer the question.


How do I make my walking animation to continuously move instead of stopping at the end of the frame

You can do that by changing how the interpolation is in the Graph editor.

1.Open up the graph editor and make sure you're on F-Curves;

2.Select all necessary keyframes and press Shift + E;

3.Now a little menu will appear, click on "Make Cyclic (F Modifier).

There, now your animation should be what you want.


You can select them with AltRMB (or AltShiftRMB to keep the existing selection), and then delete them with Delete > Edge loops, or DeleteG if you want to take advantage of menu hotkeys.

If you have many loops which you want to select, but don't want to click on each one, you can use Multi select loops, either from 3D view > Header > Select > Edge loops, or Space> Multi select loops.


No. Unless you want to multiply the number of frames with the speed per frame of the object.

You can, however, use the Near sensor for this effect. For more details on how to do this, please add some more info on what you want to do.


Can i "execute" the Compositor node graph without re-rendering?

If I understand your question, when you render an image and set "use nodes" in the compositor, you can check the "backdrop" function, then Ctrl Shift click on a node to create a viewer and see the output of that node on the backdrop. You can see the result anlso in an UV/image editor, if you change the header's dropdown menu from "render result" to "Viewer node".

As soon as you change a value in the compositor, the change is reflected in the Viewer (Backdrop or UV/Image window), without any need to push any button to trigger the compositor, and without the need of redoing the render: it's automatic (maybe a little slow and not realtime: check the upper info header for a compositing Time bar)


Switch between turntable and trackball rotation

Go to User preferences, then change the tab to Input then toggle the orbit style to your liking.


ok I found the mistake.
you had the view layer set to coposite, and this means it goes throu the compositor first and then goes to the output,

and when I then look at your compositer you can see that you you selected IndexOB in the Alpha channel, using the viewernode I was able to see that the IndexOB output ist empty (Black) and thus everything was transpatent

This was an easy fix, I selected the object and added an Pass Index in the Object menu, then in the compositor I added the ID Mask node between IndexOB and the output to select this specific Index

and now the render is as you wanted it to be


This issue is caused by having extra edges or faces between contiguous edges or faces in a mesh. In this case, I had extra faces where I extruded off of quad faces.

An example of extra edges is shown, where the orange line is an extra edge because it doesn't contribute to the face data. Edges that don't cross faces and don't contribute to face data will cause the subsurface modifier to have issues, since it checks edges and faces without regard to their usefulness.

(Answered originally by Denis)


How can I return to the 3D view after rendering?

A completed render doesn't hog the memory on your computer anymore. To get back to the 3D View from the Image Editor window, either press Esc, F11, or just change the view.

I'm surprised nobody else answered it using the most simple way of changing viewport windows. :P


The only way I think you can solve that is by pressing alt-p to clear parent and keep transformation then set the origin to geometry, after that you are free to delete the useless empty and start animating.


There is a subtle difference between the "Film" exposure setting and the CM panel exposure setting that may elude many folks.

The "Film" version, while functionally equivalent to the CM version (IE 2^EV_adjustment * scene_referred_render_value), is applied on the data. In the colour management panel, on the other hand, it is applied purely on the view.

If you are rendering out to display referred imaging encodes, such as JPEG, TIFF, etc., in all instances the impact will appear identical as the data is baked into the display referred format, with all view transforms.

However, if you save as a proper image pipeline format such as EXR, you will see the difference. In the case of the Film variant, the exposure adjustment ends up baked into the EXR's scene referred data. In the colour management variant however, being only on the View, the EXR will bear the original scene referred values as present in the direct render. If you save both versions, only in the latter will the data be saved at its original exposure value, while the former will actually adjust the encoded data.


Adding custom property to VertexGroup class

Quote from the api documentation:

  Custom properties can be added to any subclass of an ID, Bone and PoseBone.

VertexGroup does not inherit from ID.


Strange new Blender Video editor Hard Cut change?

This issue has been resolved in Blender 2.79b. If you're experiencing this issue, odds are you're on 2.79a and should update.


Seeing that it's not in the list of programs, it seems like you downloaded the zip version, rather than the msi version, which means blender isn't actually installed on your system.

Just delete the folder where blender.exe is, and it's gone!


Custom Properties value in Animation Nodes

You can use expression node to control property of object. Use ctrl+shift+alt+c on a property to get code. use that code inside expression node to get or set the data.

For example an object Empty has two custom properties A and B. We can get value of A
using bpy.data.objects["Empty"]["A"]. Similarly we can set value to B using bpy.data.objects["Empty"]["B"]=x where x is the data we provide.

Or you can replace the object name and property name by,


If you go into weight paint mode with vertex select mask selected...

...and selected all your vertices, you can use the smooth button which works both ways.


I'm using Blender 2.79b rendering on the same GPU but in Google Colab, I force using GPU with a Python script.
I had some difficulties but I found that Google put some restriction on the GPU. I just had to remove libtcmalloc-minimal4 package and reinstall it from Ubuntu repositories and now every thing is okay. Something like
    sudo apt-get remove libtcmalloc-minimal4
    sudo apt-get update
    sudo apt-get install libtcmalloc-minimal4


Why the mirror modifier ruins the boolean shape

If you take the mesh with only the mirror, you can notice that the mirror will not merge the parts:

Here in the top part of the image, the mesh before the mirror is applied and on the bottom, after its application (both parts are not merged).

As they are not merge, Blender can only see opened meshes, so the boolean differences operate on open meshes too and that's why the result is opened too.

To fix that, just move the empty a bit along X.

Secondly, and for the same reason, the mirror needs to be set on top of the stack (at least before the booleans), as if it is not, when a boolean operates, the mesh is opened and you have the result shown in your question.

So the best is to set the mirror on top, then the subdivision and last the booleans:

Here is the result (after the empty is moved a bit along +x and the modifiers reordered:


"'NoneType' object has no attribute 'action'" error when looping over objects with Python

Add keyframes to all objects.  Keyframes are associated with actions.  Simplified explanation.

You have stated you 4 days of experience with Python, if I understand you correctly.  Thus my answer is based on working with that context.  Keyframes may be more familiar to you than Python. You may prefer to know more about Python slowly.  The choice is yours.

Remember you can pose related [idea questions] here at BSE with a single web page but try to limit it to a reasonable small task.

On the other hand some people actually get lucky and get people to write the entire script for them.

The following search here at Blender Stack Exchange with keywords

animation_data is not none

can you show you different approaches to handling the problem situation via Python.

I do have concern about the Python in the question with regard to file writing.  But you may consider asking that as a separate question.  One file name is used for writing in the Python at this point.  The file seems to be rewritten every time with only the last write being actually being persistent. That seems defective. I imagine you want to have data for all objects in the same file.

I suggest when the file writing is top priority, you pose another question.  The changes needed seem achievable in 88 seconds.  You should consider how many times you open the file.  I believe it should be one file open per invocation.  You know how to use for loops so if you think about it you will find the better placement of existing Python.

The file mode is 'w' which can mean ... delete and create fresh.
I would suggest you change it to 'a' for append. Once the code is more correct you may decide to use 'w' with a different filename everytime. The filename can include the time and date.  blender_data_D20180318_T120037.txt as as example you can improve. D for Date. T for time including seconds. Thus you would have a history to compare file versions.

You can delete parts of the file or the whole file for testing. I have not executed the Python so this is just a computer simulation mental simulation.  Currently the Python seems to write info for the last object only which seems defective.


Where can I find remaining time for preview render completion in 2.8?

Change the way the render will be displayed in Render (Blender's header) > Display Mode > Image Editor.

Render again. Now see if a status bar appears inside Image Editor with the information you need.

To preview in Render Preview (Rendered Viewport Shading), enable Overlays and check the Text Info checkbox. Now the remaining samples will probably appear.


How to set random X Y Location from script?

random.uniform(a, b) returns a random float between a and b

import bpy
from random import uniform
from mathutils import Vector

context = bpy.context
obj = context.object
minloc = 0
maxloc = 3

# set frame with scene.frame_set()
# setting scene.frame_current wont always work.

scene.frame_set(frame)

for axis in "xy":
    setattr(obj.location, axis, uniform(minloc, maxloc))

obj.keyframe_insert('location', frane=frame, group="Location")

Scripts that loop thru frames and change frame using scene.frame_current = frame often appear to fail because only the first frame value is keyed as changing frame_current doesn't call a scene update, whereas set_frame does.


Why does model look thinner in Cycles than in Eevee?

It isn't actually thinner. This is the lighting. Adjust your world background color, sun lamps, and any other lamps, reflectors, and mesh lights you may have in the scene to get a better result. My advice would be to place a sun lamp pointing directly above your model for best lighting, with the strength set to 1.5.


Object with wireframe modifier not showing up on render in Cycles

To make the object visible on the render you need to turn Duplication to None.Otherwise you will see only children of this object duplicated based on set value


Gradient that depends on an absolute value (several objects)

You can make the texture coordinates depend on another object, or an empty.


Finding the parameters necessary to generate such a shape should be possible with python.

From the wiki:

  The Shape setting determines the collision shape of the object. The
  following shapes are available:

  Primitive shapes - these are best in terms of memory/performance but don't necessarily reflect the actual shape of the object. They're
  calculated based on the object's bounding box. The center of gravity
  is always in the middle for now.

  Box: The size per axis is calculated from the bounding box
  Sphere: The radius is the largest axis of the bounding box
  Capsule: This points up the Z-Axis.
  Cylinder: This points up the Z-Axis. The height is taken from the z-axis, while the radius is the larger of the x/y-axes.
  Cone: This points up the Z-Axis. The height is taken from the z-axis, while the radius is the larger of the x/y-axes.

  'Mesh based shapes' - these are calculated based on the geometry
  of the object so they are a better representation of the object. The
  center of gravity for these shapes is the object origin.

  Convex Hull: Convex approximation of the object, has good performance and stability.
  Mesh: Allows to simulate concave objects, but is rather slow and unstable.

To build these shapes using the UI:

Box:

Select the target object and press CtrlShiftAltC > Origin to goemetry, and then press F6 and select bounds center.
With the target object selected, press ShiftS> Cursor to selected to move the cursor to the objects origin.
Add a cube to be the bounding box. It will automatically be centered at the 3D cursor, which is snapped to the target object's origin point.
Copy the Dimension and Rotation values from the target object to the bounding cube. These values are located on the Properties region (N in the 3D view):

You can quickly copy and paste values by hovering over the number field and pressing CtrlC/CtrlV accordingly.

Since this process of copying and pasting the values of each channel can be a bit tedious, you can use a quick bit of python to do this for you:

import bpy

active = bpy.context.active_object
selected = bpy.context.selected_objects

for obj in selected:
    obj.dimensions = active.dimensions

This copies the dimensions from the active object to the selected objects.
Parent the bounding box to the target object so the relative location, rotation, and scale is kept the same. You can also set the bounding cube's Draw type to Wire in Properties > Object > Display > Maximum Draw Type.

Sphere

Do steps 1 to 3  from the Box instructions, adding a sphere instead of a cube.
Copy only the largest dimension value from the target into all three dimensions of the sphere.
Do step 3 of the instructions for Box (Parent the bounding mesh and set the draw type to wire)

Cylinder

Do steps 1 to 3  from the Box instructions, adding a cylinder instead of a cube.
Copy the largest dimension value of the target excluding the Z axis, so the value of either X or Y into both the X and Y dimensions of the Cylinder.
Copy the Z dimension value of the target to the Cylinder.
Do step 3 of the instructions for Box (Parent the bounding mesh and set the draw type to wire).

Cone

Do the same as for Sphere.

Convex Hull

This is more complex. you could try to generate your own using python, or you could try one of these existing options:

The Convex Hull operator built into blender.

Duplicate target object (ShiftD)
With the duplicate selected, enter edit mode (Tab) and select all (A)
Run the convex hull operator (Space> Search > Convex Hull)

This Convex Hull generator written in python.

Existing addons

I also found a couple existing scripts/addons from a quick google search:

One for exporting to YAML
Niftools Wiki - Blender 2.49 nif import/export - Collisions
Niftools - Blender 2.6x nif export collision code


How to understand the math behind Andrew Price's embedding his beer within his glass

Putting the liquid inside of the glass wall forces the ratio given by Snell's law. Blender gives the inverse of the refraction index when exiting the glass. This brings the refraction back to that of the environment. So, if the ray enters the fluid just before it exits the glass, you get the ratio you're looking for. Yes, this means an inaccurate IOR for the small distance between these surfaces, but unless you're doing an extreme closeup of the edge of this manifold, I don't think you will ever see it in a render.

Your other options are creating a mesh for the liquid that has an ior that corrects for this ratio, but where does that mesh lie? Is it exactly on the glass mesh? In this case you get the same flickering artifacts seen with doubled faces elsewhere. If you space this mesh just beyond where the ray exits the glass, you will have inaccurate results which are more visible in renders. You can of course make a completely new mesh at the interface that is a combination of the glass and the beer, but what happens if you need the beer to slosh around? This turns into a very complex animation.

So, basically putting the beer slightly inside of the glass gives you semi accurate results that seem to give the best trade-offs for accuracy and usability. It's easy to animate, it eliminates the need for multiple meshes and separate materials for the sides and top of the beer. I'm trying to explain this without illustrations, but hopefully you follow.


Smoke material- viewer node or through rest of noodle?

Surprised this has remained unanswered...I believe it's pretty straightforward...

The viewer node is nothing but a run-of-the-mill Emission node with color: white and strength: 1. Hit the little triangle on the left side of the Viewer node to expand it and you'll see for yourself.

As for "ruining your render"...not at all. It's perfectly valid to plug an Emission node into the Material Output Volume socket. In fact, some people utilize this as "poor-man's volumetrics". You'll get a somewhat similar effect to a light-infused volume with absorption/scatter but with nearly instant renders versus the noise-fest of the real thing.

Attached image shows examples with a simple object made up of intersecting cubes with an arbitrarily chosen texture to add some color variation. The left instance of each pair uses standard volumetrics nodes and has a point light embedded at it's center. The right instances use an Emission node (with same settings as a Viewer node) and plugged into the Volume socket.

(That demonstrates the rendering requirement differences. Your real-world example may demonstrate the appearance similarities better.)

Oh, and FYI, Ian Hubert uses the technique in at least one of his famous Lazy Tutorials. Don't blink or you'll miss it!


How can I add text in a non-english language?

First of all, Blender does not support Right-to-Left text rendering, however there are ways to use a wide variety of character sets.
In a 3D text object:
The default Bfont has a very limited character set which does not include arabic.
To add arabic text to a 3D text object, you need to use a font that has the relevant glyphs (e.g. a unicode font).
Once you find a font that contains arabic characters, you need to load it into blender.
Note that you cannot use bitmap fonts, as blender needs vector data for generating curves.
##Loading a font:
You can load a font into blender from the Object data > Font panel:

Add a text object ShiftA> Text

With the text object selected, click the file icon for the appropriate styling (e.g. regular, bold, etc.) in Properties > Object Data > Font:

Navigate to a font file (.ttf .otf etc.)  on your system and click Open Font:

The font should now be used for the active text object.
##Entering characters:
If you don't have a keyboard that has Arabic characters, here are some alternate ways to input text:
method one:

Select the text object and enter edit mode Tab. You should see a bar appear that indicates the location of the cursor:

Delete the existing characters (Backspace) and enter a character. You should see a text field appear in the Redo menu at the bottom of the Tool Shelf (T in the 3D view):

Select the text box and paste the your text into it, then press Enter:

Note that you can enable International fonts in User preferences > System to display arabic charecters in the UI, making the arabic characters visible in the text field:

More about this later.
Method two:
As mentioned by kivig, there is a Paste from file feature.

Select the text object and enter edit mode (Tab)

Click Paste file in 3D view > Header > Text:

Navigate to a text file containing the text you wish to put in the text object and press Paste File.

In the Interface:
You can enable International Fonts in CtrlAltU> User preferences > System to display arabic characters:

This also enables options to translate the UI into many languages, including arabic. See the wiki for more details:

From version 2.60, Blender supports international fonts and a range of
language options for the Interface and Tooltips. To enable it, open
the User Preferences window, System tab, and toggle the International
Fonts option in the bottom right-hand corner.
This displays three new settings:

Language
drop-down menu where you can select your preferred language.

Interface
to translate the User Interface itself (e.g. controls and menus).

Tooltips
to translate tooltips.


How can I copy part of a texture to another part of the same texture?

Activate the Magic UV addon

After unwrapping the mesh

Select a single face and set the face with the uv texture.

Press U and you get the extra option with UV Magic Addon below

Select Copy/Paste UV -> Copy UV- Default

Then select the face you want to paste or face with similar texture on other
side

Press U

Select Copy/Paste UV -> Paste UV- Default


What causes the gap in shadows underneath an object?

Try enabling contact shadows;

You may also need to adjust the bias settings (also pictured)


Why does boolean cut out some shapes and not others

Boolean operations have issues with number precision as they are stored by computers. Booleans are sensitive to overlapping geometry and vertices or other mesh elements being very close to each other.
In general Booleans should be avoided as much as possible while modelling precisely because of the issues you are experiencing.

You could try to switch between different modes and using different solvers, also to adjust the forms of the objects slightly to see if you get better results, but it might also be a very good idea to just choose another method for modelling what you need as you will get nicer topology as well if you model everything using other modeling tools.
Sometimes Booleans just do not work as expected - this is common in most surface modelling applications, not just Blender. So if they work for you in your situation, that's great, if they don't, just use something else.


If you are using Blender render then check the Shadeless option in the Material tab:-

And if you are in Cycles then use this node setup to create a Shadeless material:-


why does my smoke animation shown in the viewport shading but not shown in the render shading

I guess you are missing the text in the attribute node, but in my opinion if you use Blender 2.8, instead of using the old way, you can try the new way using new volume shader, Principled Volume Shader


How can I achieve this lighting in blender..?

Like you would do in the real world, by adding lights behind the columns. You can do it with long planes and an emission shader or with long area lights.

The blue the light is the effect of white light reflected on a blue surface.


Diamond Material on Blender Render engine?

As suggested by user277143 I created a Gradient Texture using Photoshop and then overlapped the mesh to give an internal refraction effect. The effect is very subtle but is there.
On the screen shot you can see that I added (perhaps too many) flat meshes as light sources, additional to a Sun and Hemi lights, in order to create some additional reflection. (The Material reflective is 0.25)
I think it looks marvelous, just like I wanted it. :)

Edit: user277143 also suggested using Shade smooth (Ctrl+F > Alt+H), which I did, and the results on the borders are marvelous, albeit for some reason it changes the reflections on the flat areas. ;)


Why the middle mouse button in Blender 2.80 changes the orthographic view to perspective?

It seems that you have Auto Perspective enabled, which causes the switch to perspective projection once you're changing the view from the top/front/left/right/bottom viewpoint. Open the preferences (Edit > Preferences) and disable Auto Perspective in the Navigation tab.

The defaults for Blender 2.80 where discussed in the design task T54943. Currently I haven't found any reasoning behind the changed default for Auto Perspective on developer.blender.org, bf-committers or devtalk.


Install the Measureit addon

For more details watch this video : https://www.youtube.com/watch?v=crMAa5tG-l8
To download : https://github.com/Antonioya/blender/blob/40b63abde362555d0cf3cfb00454f0691871f144/measureit/measureit_v1_6_7.zip


Texture scaling to real world measurements?

If you only work with planes or meshes in which all faces have 90° angles between them, following the local object's coordinates, yes (typically planes and cubes which were only rotated in object mode and on which you didn't apply the rotation). You have to apply scale first with Ctrl + A -> scale.

1) Unwrap in edit mode with U, select the cube projection mode. By default it will make the smallest image's side to be 2 Blender Units long.

2) In Node Editor: Connect a Texture Coordinate Node with UV output to a Mapping node. Connect this Mapping node output to the vector input of your Image Texture Node.

3) Choose the appropriate Scale values in the Mapping node. "Scale factor" = 2 / "image's smallest side in Real World distance". The 2 is because of the cube projection scaling the smallest side to 2 BU. If you know your image is 1m on x and on 4m on y (in the real world), then give 2/1= 2 for x an y scale in the Mapping node

Other UV projection modes aren't predictable. If you want an always working solution, I think you will have to write it in OSL, but your render time will be 4-5 times slower.


Can only Extrude or move vertices/edges in a pre-set distance

You've turned on Transform Snapping in increment mode.
All transformations will be done in increments determined by the size of the grid.

Press ShiftTab to exit snapping

Please read the manual page for more information on the usage of snapping.


load and change material with python script

Set the active material not the name

The line

bpy.context.object.active_material.name = "Gold"

sets only the name of the material on the object to "Gold", not the material to the "Gold" material. Do something like this

ob.active_material = bpy.data.materials.get("Gold")

Please Note: blender is case sensitive, the material in file is either named "gold" or "Gold", there is a mix of both in your question.

Using the link / append operator adds a new material to the file. If there is another material already in blend of same name, the naming convention will append numbers to it, meaning above will only ever link the first material named "Gold" from file.

Simple API methods to link append rather than the op

How to Link/Append a data-block using the Python API?

# Append material named "Gold"
filepath = "C:/Users/ME/Downloads/78-gold.blend"
with bpy.data.libraries.load(filepath, link=False) as (data_from, data_to):
    data_to.materials = ["Gold"]
    #data_to.materials = data_from.materials #  append all materials from blend

Copy an object (and optionally its data)

Second lastly rather than call the add sphere operator 400 times, can call it once outside loop then copy and link to our collection

collection = bpy.data.collections.get("Blahs") or bpy.data.collections.new("Blahs")
bpy.ops.mesh.primitive_blah_add()
blah = context.object
for i in range(copies):
    copy = blah.copy()
    copy.data = copy.data.copy() # a copy of data (mesh) also
    collection.objects.link(copy)

Apply transforms directly to mesh

and lastly rather than the transform apply scale operator

from mathutils import Matrix
# don't set ob.scale = scale do
S = Matrix.Diagonal(scale).to_4x4() # a 4 x 4 scaling matrix

ob.data.transform(S)

Changes suggested will reduce operator calls from 801 to 1, could get rid of add primitive operator, but nuffnuff one is ok.. lol.

Related

Python performance with Blender operators


Open or extract parts of a very large .blend file

Borrowing an extract from RolandiXor's answer, you can create several new files and append pieces out of the large.blend file.

  Appending

  This creates a full copy of the existing data, which you can modify without issue and include in the file you are editing. You do not need to keep both files together. You are also fully able to edit the appended data (such as an object, material, or scene) without affecting the original file from which you appended.

  Appended objects have an orange outline when first appended (with the default theme), but once you deselect them, then select them again, they show as normal objects do.

When you enter the blend file, you will be shown several directories, these are the categories in which a general scene is grouped. I would suggest moving large models (located in Objects) into their own files (and adjusting any modifiers that might be on them such as subsurf) and if you need to recreate the scene again, use the other technique which is Linking which will allow you can attend to specific models without all the overhead of a cluttered scene.

It is a very good idea not to keep large scenes that consist of several models, multiple textures and effect systems in one file but to rather distribute these over several files and then link these into one file. The advantages of doing this are numerous.

To efficiently work with a heavy scene or dense meshes, you can find several tips here.


Trying to fake "God Rays"/ Stage Lights with materials

Well I think the gradient might be at least some help to you, if you hook it up to the density.  Here is an example with a linear gradient:

Here is the same image with the gradient disconnected:

It is true that if there is ambient lighting, a certain amount of volume particles may be visible:

Some of that could be mitigated by strategic repositioning of your spot lamp:

and/or dialing back the gradient, for example by altering the "location" component of the mapping node (here I set the X coordinate to -0.2):

Hopefully these give you some ideas for tweaking your setup.  (By the way, I did not end up making use of the Multiply node in the group below, but it's another parameter you could play with).


Removing internal mesh to make object hollow

If you model the cylinders as a separate object, you can use a boolean modifier on the sphere/ellipse to 'subtract' the cylinders. Then, if you turn off the cylinders (you don't have to delete them), you'll have the sphere/ellipse with holes where the cylinders should be.


How to make visible an object from different layer in bge

There's probably a way to do what you want; but there's a better way! I recommend the Visibility sensor.

Assuming one object is called Circle, the other one Character and the other Ground, start by moving the Circle to the main layer; Then, in the Outliner, disable it's render-ability, by pressing the camera icon next to it.

After that, select your Character and add a Message actuator to it; Set the To: field to be Circle, and the Subject field to be Set Visible. Then, select the Ground add another Message actuator, with the To: field set to Circle and the Subject set to  Set Invisible.

Then select the Circle and add two Message sensors to it; set their subjects to be the same as previously, and connect each to a Visibility actuator, set to either set visible or invisible, depending on the message subject.


Driver python expression doesn't work as intended (doesn't calculate if else properly)

I wouldn't trust the value in a quaternion to exactly equal a whole number.
There are decimal numbers that a base two floating point number can't represent, for the same reason that you can't represent 1/3 exactly in base ten. While -1 isn't one of those numbers, it's conceivable and probably to be expected that some minute inaccuracy would have been introduced in producing the number that's used for that driver channel.
Try this:
0 if abs(-1-var) < 0.001 else 1
or
0 if var < -0.999 else


You can use script for the export. Or command in Python Console

The standard fbx_exporter is bpy.ops.export_scene.fbx():

A quick example:bpy.ops.export_scene.fbx(filepath='C:/tmp/test.fbx') (the directory should exist!!)

For more option you want, see the documentation and change the default value to what you want. And short cut, is some what more complicated. Use Alt+P in text editor will be lot of easier.


Face rotation results with deformation in modifier stack

Your issue comes from Scale transformation that is set to x=5 y=3 z=1 now.

To fix the issue go to Object > Apply and choose Scale...

... scale transformation become to x=1 y=1 z=1 ... issue is gone. For more info see Manual.

Quite important is to understand transformation hierarchy. Modifiers are calculated first, object transforms after that. It means your Solidify modifier extrudes a thickness and after that is calculated Scale transformation on object. Since your object is scaled x=5 y=3 z=1, result is squeezed object.

It's always recommended to Apply Transformations to an object before using modifiers and armatures to avoid strange behaviour.

If you will have a default plane (dimension 2x2), you scaled to 2 (= dimension 4x4), than you add Solidify modifier with Thickness set to 1m ... object appears in a scene with "Dimension" 4x4x2 and not 1, because modifier is calculated before object transformation (like Scale) setup.