EXCEPTION_ACCESS_VIOLATION Blender 2.8 Python

Do not use operators from Python, where possible. You will probably need to remake your code to just operate on bpy.types.Armature.pose.bones.

The problem I think comes from the fact that are you changing things like bone parenting from the pose mode context, while Blender expects that to be done in edit mode. But it is a bad idea to switch modes and do this with operators as they are slower than just assigning data with Python directly.


How to move object while tracking to mouse cursor with a modal operator?

You can get view origin and mouse location in 3D using:

self.view_point = view3d_utils.region_2d_to_origin_3d(region, region3D, self.mouse_pos)

and

self.world_loc = view3d_utils.region_2d_to_location_3d(region, region3D, self.mouse_pos, self.view_vector)

where self.view_vector is from:

self.view_vector = view3d_utils.region_2d_to_vector_3d(region, region3D, self.mouse_pos)

You can raycast on the scene from self.view_point to self.world_loc.

From that, moving an object is simply giving obj.location a value.

Here the value is either world_loc obtained above or the result of a ray cast on another object. In case of raycasting on another object coordinates are converted in this object space.

Commented script:

import bpy
import bgl
import blf

from bpy_extras import view3d_utils

def draw_callback_px(self, context):
    font_id = 0
    blf.position(font_id, 15, 100, 0)
    blf.size(font_id, 12, 72)
    blf.draw(font_id, "Mouse position: " + str(self.mouse_pos) + "/" + str(self.view_point) + "/" + str(self.view_vector) )
    blf.position(font_id, 15, 115, 0)
    blf.draw(font_id, "Location on plane " + str(self.loc_on_plane)  )
    blf.position(font_id, 15, 130, 0)
    blf.draw(font_id, "Object location " + str(self.object.location)  )

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

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

        if event.type == 'MOUSEMOVE':

            #Get the mouse position thanks to the event
            self.mouse_pos = event.mouse_region_x, event.mouse_region_y

            #Contextual active object, 2D and 3D regions
            self.object = bpy.context.object
            region = bpy.context.region
            region3D = bpy.context.space_data.region_3d

            #The direction indicated by the mouse position from the current view
            self.view_vector = view3d_utils.region_2d_to_vector_3d(region, region3D, self.mouse_pos)
            #The view point of the user
            self.view_point = view3d_utils.region_2d_to_origin_3d(region, region3D, self.mouse_pos)
            #The 3D location in this direction
            self.world_loc = view3d_utils.region_2d_to_location_3d(region, region3D, self.mouse_pos, self.view_vector)

            plane = bpy.data.objects['Plane']
            self.loc_on_plane = None
            if plane:
                world_mat_inv = plane.matrix_world.inverted()
                # Calculates the ray direction in the target space
                rc_origin = world_mat_inv @ self.view_point
                rc_destination = world_mat_inv @ self.world_loc
                rc_direction = (rc_destination - rc_origin).normalized()
                hit, loc, norm, index = plane.ray_cast( origin = rc_origin, direction = rc_direction )
                self.loc_on_plane = loc
                if hit:
                    self.world_loc = plane.matrix_world @ loc

            if self.object:
                self.object.location = self.world_loc

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

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        if context.area.type == 'VIEW_3D':
            args = (self, context)
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            #Keeps mouse position current 3D location and current object for the draw callback
            #(not needed to make it self attribute if you don't want to use the callback)
            self.mouse_pos = [0,0]
            self.loc = [0,0,0]
            self.object = None
            self.view_point = None
            self.view_vector = None
            self.world_loc = None
            self.loc_on_plane = None

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Edit:

Little update so that the cube orientation is along the hit normal:

From the norm obtained with ray cast:

norm.rotate( plane.matrix_world.to_euler('XYZ') )
self.normal = norm.normalized()

Then apply it to the object:

self.object.rotation_euler = z.rotation_difference( self.normal ).to_euler()

Updated blend:


If you run this baby script:

import bpy

idx = 1
vtx = 6
rad = 0.25
inc = 0.25

while (idx < 14):
    bpy.ops.mesh.primitive_circle_add(vertices=vtx, radius=rad)
    rad += inc
    vtx += 6
    idx += 1

It will create a series of concentric circles with the right number of vertices. (I'm sure a proper Pythonista could do it in one line, and automate some of the steps which follow...)

CtrlJ Join the circles into one object
CtrlE > Bridge Edge Loops each pair of loops in turn, and F..AltP, fan-fill the center.
You wind up with a mesh with one or two diagonals out of place. I'm not sure it would matter, but I cut 1/6 out as shown, corrected the edges, and arrayed it back to a full circle)
Select all vertices except those on the perimeter, and CtrlShiftB bevel them, and switch to Face mode. The future holes should be selected.
Loop-Tools or Space-Bar > 'Circle' with a radius setting, on the selected hole-faces.
Delete the faces
Extrude or add a Solidify modifier, and throw on a Subdivision modifier.

The holes aren't perfectly circular but maybe good enough?


How to put rotation- and scale invariant labels to three dimensional objects (motion-tracked insert effect)?

Frame change handler

Cube is moving further away, Suzy is scaling up and down, cone is rotating thru. Camera rotated.
Proof of concept script.
For each object that I wish to label have added a text object (arbitrarily, could be an image plane) as a child, and given it a custom property named "label" to mark it as the label for its parent.
Theoretically this could be set up with drivers and or constraints, will however use a handler method instead.
By default a text object faces Z up. Will rotate it such that it faces the plane of the scene camera.  Have used the highest (largest Y coord in camera space) bounding box corner as the origin of the text object.  Can see the switch with rotating cone.
The scaling is using same method explained here, https://blender.stackexchange.com/a/107005/15543 where it is implemented with drivers.  Just as RIchard has divided by 10, have used a scale factor of 0.1.
import bpy
from mathutils import Vector, Matrix

scale_factor = 0.1

def label(scene, depsgraph):
    cam = scene.camera.evaluated_get(depsgraph)
    mw = cam.matrix_world
    mwi = mw.inverted()
    R = mw.to_3x3().normalized().to_4x4()
    labels = [o.evaluated_get(depsgraph) for o in scene.objects
            if "label" in o.keys()
            ]
    for label in labels:
        ob = label.parent
        omw = ob.matrix_world
        bbox = [mwi @ (omw @ Vector(b)) for b in ob.bound_box]
        bbox.sort(key=lambda v:v.y)

        M = R.copy()
        p = bbox.pop()
        M.translation = mw @ p
        S = Matrix.Diagonal(
            (scale_factor * -p.z,) * 3).to_4x4()

        label.matrix_world = M @ S

bpy.app.handlers.frame_change_post.clear()
bpy.app.handlers.frame_change_post.append(label)

Setting Up.
Here is a quick little script that adds a font object to each selected object as its child and assigns it a "label" custom property to mark it as a label.
import bpy
context = bpy.context

for ob in context.selected_objects:
    text = bpy.data.curves.new("label", type='FONT')
    text.body = ob.name
    label = bpy.data.objects.new("Label", text)
    label.parent = ob
    label.matrix_world = ob.matrix_world
    label["label"] = ob.name
    context.collection.objects.link(label)

Empties
As suggested by @clutch-lemon here is similar, but adding an empty as a child of each selected object.
import bpy
context = bpy.context

for ob in context.selected_objects:

    label = bpy.data.objects.new("Label", None)
    label.parent = ob
    label.matrix_world = ob.matrix_world
    label["label"] = ob.name
    context.collection.objects.link(label)


While you can rig with a Mirror modifier on your mesh, it is best in your case here to just apply it, you won't be able to rig your character properly if it is active with your current naming scheme. You might also want to then change your Pivot center from 3D Cursor to Bounding Box Center by using , (comma) or selecting it from the view header, having it set to rotate around the 3D Cursor can also lead to some weird behaviour when trying to pose if you don't know what to expect. You might also want to recalculate your mesh normals at this point with CtrlN.

…and finally, try again..

For some help in parenting the mesh to the armature, you can refer to How can I automatically generate vertex groups for an armature?. It wouldn't hurt to add some more geometry (loopcuts) to the arms and legs to help the character deform better either.


how to modify blender to have real world particle physics?

Physics and particles are a tool to make movies. Not much else. They are intended to show how a steam engine works or a flock of birds in the distance. Force fields are meant to blow a smoke text away. Their job is to make stuff look good. They do not have the scope (yet) of being a physically accurate simulation of real world forces. 3D animation is the art of faking it.

When I was doing my little solar system I didn't even try the physics, I just coded a bit of python gravity myself. Also not physically accurate (no need) but I got some nice elliptical orbits. Managed some gravity slingshots, too.

So either you really need to work on the code or you might get away with python or python with C/C++ help, depending on the performance needs. Changing the source code of course means one of three outcomes: You need to merge your code every time a new version comes out, you get it committed and it becomes a part of the official release or you are stuck with a Blender version that slowly gets old.

At the last Blender Conference there was a talk about simulating quite a few million blood cells with a super computer. So there's some fancy stuff possible if you're determined.

If you want these features, start to make them happen.


Assigned material only shows up in Edit mode?

Your window rim material needs to be separate (and not the brick material).  Try putting a new material on the window rim and clear the UV mapped picture from it.
That's my best guess. A blend file would help reproduce.


Alt+Left mouse to orbit, while "pick with left mouse button" is enabled?

Here is a best addon blender sensei download here

In this addon there are much of shortcut and much easy to use.
There are various tutorial in the webpage how to install and use.

Note : In this addon blender will work as a normal but the shortcut and display view change.


You've selected Bone.009 but it's locked as we see in the left panel. Maybe you've locked this track by accident, for example with the shortcut Tab.


Paint high-poly mesh and then bake for low-poly, OR just paint low-poly with normal-map applied?

The upside I can see to that approach might be that if I need to
  adjust the resulting tri-count of the low poly model I don't need to
  repaint - I can just make now low-poly mesh and then re-bake
  accordingly.

Well, you could totally keep your old low poly and bake diffuse onto the new one, which would be basically the same.

To answer you question I would prefer to paint directly on the low poly, for the simple reason that what I see when painting will be the end result, and I don't have to unwrap my high poly. Any texturing software like substance painter is made in order to paint directly on the low poly for this reasons, and others (performance!).
Baking diffuse from high to low poly is useful though, in case where you didn't think you'd need a low poly version, but you find out that you actually do after painting your 'high poly' version.

Another reason might be if you want a very low poly version with lots of normal map details (typically, a robot or mech model with lots of screws and small parts). In this case you would texture every parts and bake normal and diffuse, and then do another painting pass to tie it all together and correct baking issues. You DON'T want to manually paint the diffuse of your normal details when they are already baked.

Substance painter is able to generate masks based on normal details 'geometry', which allows to texture normal details (I think it's called 'micro-details' in the software) but Blender don't.

  One thing I noticed in painting the low -poly mesh with normal-map
  applied is that occasionally the paint landed slightly off the target
  I was aiming for because of the real topology underneath

I see what you mean, but this might be due to some stretching in your UVs, or worst: overlapping (but you'd know). Or perhaps your texture resolution is too low compared to the details you want to paint.


Here the file:

I simply did these steps:

1) In your Hand.L I delete the Copy Location (it's useless) and delete your IK constraint connected with the bone Hand.R

2) I create a new bone(the one in the immagine called CHILD), named BONETARGET.L (no deform), and i set this bone near to the position where i would like to have my Hand.L, hanging my weapon.

3) I create a constraint between "body" (there is a bone you called body) and BONETARGET.L; theh my BONETARGET is the child of body

4) I create an IK contraint between my BONETARGET and the Hand.L; then my Hand.L has the BONETARGET like the target for its IK

In other words i have created a chain,

you move the Hand.R that moves in the same way the "body"
the BONETARGET.L will move like the "body", and at the same time will be the target for your IK left arm that will move following this bone (BONETARGET.L)

In the end I add other 2 things:

4) I tick "Perserve volume" to mantain the volume of your mesh while you are animating, and i add a modifier (PS this one is available from the last blender verison, 2.77) called Corrective Smooth. It helps a lot and keep the mesh clear from strange and tricky deformation.

Tell me if this is the solution you were searching


Move imported model to the center of the scene via python

If you import a model, the origin is typically at (0,0,0) - setting the location to the center has no effect. The trick is to set the geometry to the origin via origin_set operator:

bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')

Related: How to place objects on the center of the ground plane via python?


Blender rendering makes my pc randomly die and restart

Sorry didn't quite understand, did you mention you made a pc upgrade to your motherboard RAM and graphics card? Did the cashes start happening only after the upgrade?

If it's crashing your whole computer it is likely a hardware problem, and not Blender related, though it is hard to say.

Rendering is a pretty demanding task that taxes your computer hardware, it may be overheating, or your power source may be insufficient for all your hardware and that is only revealed on heavy tasks,hard to tell this way.

Have you tried using some sort of hardware or system monitor with logging capabilities while rendering? Maybe it provides some insight into what is happening.


Add the lamp shader object. (I used the default cube.)
Add a solidify modifier to give the wall some thickness.
Add a shader: Translucent BSDF.

Add a lighting object and place it inside the cube. (I used a Sphere.)
Add a shader: Emission BSDF. Increase the strength.
Use a realistic color management like the filmic lookup.

First screenshot is pbr cycles, second is EEVEE.

For realism, mix the Translucent Shader with Diffuse, Glossy and Refraction and implement the fresnel effect to allow less light through when viewed at an angle.


Linking the mesh and location of objects with different materials in different scenes

No, I don't think you can, as far as I know.

You can link objects from two scenes or even files, their positions will be kept in sync.

You can also have materials applied to Object or Object Data, so two objects can share the same object data but have different materials.

You can't however move them independently. If you use U > Make Single User > Object, you will be able to change materials but they will move them independently.

One possible workaround is to use parenting. Create an empty object, for example, and link it between the two scenes so their positions are kept in sync. Then in each scene parent a differently colored sphere to the empty.

That way the empty will guarantee they move independently, but their visual appearance will differ.


How to export 3d object as a .tri file? blender 2.77

There doesn't appear to be an english version of this page - translate.google provides the following -

Export of creations made with Blender to Raydium is possible using the Python script triEXP * comes with sources Raydium.
Use:
Load this script into Blender (BlenderChargerScript), "triangulate" the object in Blender (CTRL + T, in edit mode, after you select all the point with the key), and run the script (ALT + P in the window contains the Python script). This operation performed, a file dialog appears where you can choose the export and the name of the file directory.
You will have a little more information in the console from which you started Blender, especially in case of errors.
!! Warning !! verify that you are in object mode before running the script.
Note: This script does not export the path to the textures, and therefore considers that the textures are always in the same directory as the exported .tri.
See also, for other import / export solutions ImportExportTri

If you look in the source download you will find a blender folder that has several scripts, the startup/tri_import_export_264.py can be loaded in blender's text editor and run to add the .tri import/export options. A simple test shows it to work, if it fails with your models than ask for help improving it with info and examples of what fails.


Real-time symmetrical modeling with distinct objects in Blender

This is what Groups and Group Instances are for, you just don't add modifiers to them.

Create your selection of objects you want to belong to this symmetry group, then group them together with Ctrl + G. Give it a descriptive name

Now from the Add menu add a new group instance with the previously given name. Scale it a factor of -1 in X so it becomes mirrored.

You may optionally want to make the instance non selectable in the Outliner so it doesn't accidentally get in the way.

Now freely work on your original group of objects and see them symetrized automatically. Whenever you feel like adding a new one just link it to the existing group.

You can do this by selecting any new objects, then Shift selecting one already belonging to the group so it remains the active one. Then press Ctrl + L > Make Links > Group.


Modeling How to solidify or scale an irregular shape, maybe flip vertices?

You have converted it to a mesh, and then extruded the points in edit mode.
Another way you could try is to keep it as a bezier curve and remain in object mode and go to
object data properties>geometry>extrude
You can set the bevel and offset at that point, and then convert it to mesh afterwards.
This seems to result in very smooth geometry.


How can I manually fix nonplanar geometry?

I will compile multiple methods here from various sources.

The methods for a single face will work for multiple faces if you choose
Individual Origins as the Pivot center for rotating/scaling. However, this will only work for faces which aren't adjacent. If they share common edges, the single face options will treat them as one large face.

Scale along normal (single face)

Select the vertices of a face, choose the Normal Transform Orientation, then scale along the Normal Z axis. You can do this with the scale manipulator or by pressing SZZ. You can make a single face planar by scaling to 0 with SZZ0.

LoopTools Flatten (single face)

If not already, activate the preinstalled LoopTools Addon. Select the face and choose the Fatten operation from the LoopTools addon. It is available in the 3DView toolshelf T under tools > LoopTools or in the specials menu W > LoopTools Flatten.

Make Planar Faces (multiple faces)

From this answer, there is a tool to make faces planar.

Shift single Vertex

In this answer is a script to make a face planar by only changing a single vertex. Select the three vertices of a face, which shouldn't change, then Shift select the vertex which should be shifted, marking it as the active vertex.
Then, call the Flatten Vertex operator (see the linked answer for details).

Note, that this will not update the Mesh Analysis display. But that will update after a Zero operation, like G0.


How do I make this twisted surface on a bottle?

I would do it this way:

Create a plane, rotate it 90° on the X axis, apply the rotation, mirror it, create your slot.
Give it an Array modifier with a Count of 8, enable the Merge option.
Give it a SimpleDeform modifier / Bend mode, with an Angle of 360°. Now it's a cylinder.
To make it twist give it a SimpleDeform modifier / Twist mode, create an empty to give it a correct origin and choose it as the Axis, Origin. Choose your Deform Angle (probably 180° and not 120° though).
Now, as you want the shape to reduce at its top, and as a simple scale with Proportional Editing risks to mess up your topology, you should use a Lattice: Create a Lattice that contains your object, subdivide it in the Properties panel > Data > Lattice, then in the same panel > Shape Keys, create 2 shapekeys, one basic, and a second that you will model in Edit mode.
Back in Object mode, give your object a Lattice modifier, select the lattice you've created as Object, select the lattice and in the Properties panel > Data > Shape Keys, put second shapekey at a value of 1. Now your object will deform according to the lattice second shapekey.
Give your object a Subsurf modifier, press Shading > Smooth in the Tools panel of the 3D view.
Once you're glad with the shape, apply all the modifiers except the Subsurf, go in Edit mode and remove the doubles to join at the 360° junction.


Saving texture painted material externally?

Open the texture in the UV image editor. If you have multiple textures beside the one you want to save, click the little PNG icon and select the proper image.

To save the image, click Image*> Save As Image.
You can also hit F3 while viewing the image.

You will be asked to give a file location.


You can retrieve the required matrix from the view_matrix attribute of the 3D View space. It needs to be transposed and values in the 4th row and column be reset. Finally, you may set the translation components to the cursor location to get the behavior in line with the standard mesh add operators:

import bpy
import bmesh

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.mode == 'OBJECT' and context.area.type == 'VIEW_3D'

    def execute(self, context):

        scene = context.scene

        bm = bmesh.new()
        bmesh.ops.create_cube(bm)

        me = bpy.data.meshes.new("Cube")
        bm.to_mesh(me)

        ob = bpy.data.objects.new("Cube", me)
        mat = context.space_data.region_3d.view_matrix.transposed().to_3x3().to_4x4()
        mat.translation = scene.cursor_location
        ob.matrix_world = mat

        scene.objects.link(ob)
        scene.update()

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            ctx = bpy.context.copy()
            ctx["area"] = area
            ctx["region"] = area.regions[-1]
            ctx["space_data"] = area.spaces.active
            bpy.ops.object.simple_operator(ctx)
            break


What you need is the "Inset" tool. This tool has an "Outset" option which works for your situation.

First select the face
Press I then hit Enter
Either press F6 to bring up the operator settings or go to the Tool Shelf (if it's not visible bring it up using T)
Check the Outset option.
In the operator settings, increase the Depth as desired.

Update

If you don't want the height to change, simply set the snap element to "Vertex" and move the face in the z-axis while holding the Ctrl key.


Need Help to recursively import RDCs from a Folder and store each element into a Collection

OK, so this code works with the test data on my rig:
import bpy
import os
import sys
import glob

directory_im = 'C:\\LowPoly2\\'
files = glob.glob(directory_im + "*.rdc")

# helper method to create a new LayerCollection
# also setting it to the active LayerCollection
# the Google Maps importer then puts the objects into that LayerCollection automatically
def create_coll(parent_layer_collection, collection_name):
    new_col = bpy.data.collections.new(collection_name)
    parent_layer_collection.collection.children.link(new_col)
    new_child_layer_coll = parent_layer_collection.children.get(new_col.name)

    bpy.context.view_layer.active_layer_collection = new_child_layer_coll

    return new_child_layer_coll

# create a master collection to batch import the files to, or re-use the currently active collection in the scene - up to you
master_collection =  bpy.context.view_layer.active_layer_collection

# iterate over files
for f in files:
    head, tail = os.path.split(f)
    collection_name = tail.replace('.rdc', '')

    # create a new LayerCollection to import the objects to
    # I am storing the reference to it here in case you need to run further actions on it
    # e.g. changing color etc etc
    myCol = create_coll(master_collection, collection_name)

    # run the importer, it will work within the new sub-collection
    bpy.ops.import_rdc.google_maps(filepath=(f), filter_glob=".rdc", max_blocks=-1)

It becomes rather tricky because you need to deal with both Collections and LayerCollections, to be able to set an active layer collection. The first function creates just that, and returns a LayerCollection to be used, which is also set as active collection on the way. By doing that, the importer automatically places its objects in there "for free".


Exporting information of multiple objects?

this script work for all the mesh in the scene and save the data.txt in the same path as you blend file is save..... If you don't save the blend file the script don't work

best

    import bpy

def grados(radianes):
    x= (180*radianes)/3.141516
    return x

#open path_file where I will save
full_filel = bpy.data.filepath.split("\\")
#print(full_filel)
#print(len(full_filel))
contador = 1
path_file = full_filel[0]

while contador != len(full_filel)-1:
    path_file = str(path_file) + "\\" + str(full_filel[contador])
    contador +=1

#path_file actual
print(path_file)

#file name

file_name = "data.txt"

#path blend file
file1 = open((path_file + '\\' + file_name), 'w', encoding = "utf-8")

objects = bpy.context.scene.objects

for ob in objects:
    if ob.type =="MESH":
        name = ob.name
        loc = tuple(ob.location)
        sc = tuple(ob.scale)
        rot = [grados(ob.rotation_euler[0]), grados(ob.rotation_euler[1]), grados(ob.rotation_euler[2])]

        #print(name, " ", loc, " ", sc, " ", rot)

        dato = (ob.name," Location: ", loc, " Scale: ", sc, " Rotation: ", rot )
        #write data in file
        file1.write(str(dato) + "\n")

#close the file
file1.close()


Avoid curve modifier distortion when making a chain

I have solved it!
Using this video, I made the vertical links and then duplicated and rotated it to make the horizontal links and set the right number of them by changing the frames in the data tab of properties of the bezier. The links used DupliFrames to do this with 'speed' unticked.

Here I'm using a bezier circle (although the concept remains the same).


How are textures generated in 3D in compared to 2D

Many procedural texture generation algorithms can be generalized to be n-dimensional. And even if a given algorithm cannot be generalized, the concept that the texture is based on most likely can be, so a new algorithm can be devised for higher dimensions.

Usually, the procedure for generating, let's say, 2d musgrave noise is not much different from the one used to generate 3d Musgrave noise, which is not much different from one used to hypothetically generate 4d musgrave noise, or 5d, and so on...

Also, almost always a high-dimensional texture generation algorithm can be generalized for lower dimensions by discarding high dimensional information. For instance : if you generate perlin noise in a volume (as in 3d noise) and take only a slice out of it, discarding the rest, then you've effectively generated perlin noise on a plane (as in 2d noise), this is most likely what blender does. (in reality most procedural textures are generated per-sample-point so this procedure doesn't really play out as described, you just don't generate samples in the whole volume, just ones that lay on the plane that you are interested in)


There isn't any problem with the SVG (you may just need to increase the size). I hope you know the convert to mesh option (invoked by pressing space bar in 3d view / object mode) to convert the SVG paths to a mesh.

Just in case you haven't done this, you need to select the imported object first.


strange face appears in edit mode (concave quad)

Short version: Never use concave quads.

Long version: Your topology is not good. I think it can be summed it up this way (the 3D nerds will tell me if I’m wrong):

To create a 3D surface, a software needs 3 vertices, no more (real quads or polygons surfaces would be way too complicated to calculate for a computer), no less (2 vertices make an edge, not a surface, 1 vertex is a point).

So triangles are the basis of 3D. It’s true that we mainly work with quads because it’s much more convenient than triangles but actually the software will always create 2 triangles within the quad to be able to make it a 3D surface.

Now, if you create a ABCD quad, the software has 2 solutions to compose it with 2 triangles: either do it with ABC + ADC or with ABD + BDC. I don’t know how it decides, I guess it’s randomly. Most of the time you won’t notice what way it chose because it won’t make any difference.

But in your case, the triangles choice will indeed make a difference! If it chooses ABC + ADC it will give a correct shape and you won't notice anything, but if it chooses ABD + BDC it won’t give what you want. You would like it to choose the first solution but the software has absolutely no clue that it’s the good way to do it.

So what you need to do is to correct your topology, at least create an edge between A and C.


Weird see through geometry in orthographic view

On the 3D View N panel > View > View > decrease the Clipping End, it was a bit too high (don't know why it has this effect though).


Try the Cylinder Projection mode, just make sure that you are in an orthogonal frontal view.


UV maping and textures for low poly mesh

Yeah. Basically you need to bake the hi-poly model's texture upon the low-poly model.
So:

retopo your hipoly model to get the lowpoly.
UVmap the lowpoly one and create a new image upon wich you'll bake the hipoly texture. Make sure this is the image asigned to the lowpoly model when you go into edit mode. If it's not, just select it from the dropping menu, it should stay.
with both models in the same location (overlapped) and selected (being the lowpoly the active one), go to properties bar > render > bake. Choose TEXTURE in the bake mode menu, and make sure SELECTED TO ACTIVE is checked. I usually uncheck CLEAR too. And press BAKE.
this way the texture from the hipoly model should be baked upon your new image, using the lowpoly model's UVmap.

hopefully thatll help. Im a noob myself so take that with some reserve tho.


AttributeError: '_RestrictContext' object has no attribute 'space_data'

The solution was as easy as replacing

script_path = bpy.context.space_data.text.filepath
icons_dir = os.path.join(os.path.dirname(script_path), "icons")

by

icons_dir = os.path.join(os.path.dirname(__file__), "icons")

Problem solved.

Full example script:

import bpy
import os
import bpy.utils.previews

bl_info = {
    "name": "Icon problem as addon",
    "author": "X",
    "version": (1, 0, 0),
    "blender": (2, 76, 0),
    "location": "",
    "description": "Test",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "User Interface"}

# ¸¸♫·¯·♪¸¸♩·¯·♬¸¸¸¸♫·¯·♪¸¸♩·¯·♬¸¸¸¸♫·¯·♪¸¸♩·¯·♬¸¸¸¸♫·¯·♪¸¸♩·¯·♬¸¸¸¸♫·¯·♪¸¸♩·¯·♬¸¸¸¸♫·¯·♪¸¸♩·¯·♬¸¸

def addon_button(self, context):
    layout = self.layout

    global custom_icons

    row = layout.row(align=True)
    row.operator("object.mode_set", text="", icon_value = custom_icons["icon_not_available"].icon_id).mode = 'OBJECT'

# global variable to store icons in
custom_icons = None

def register():

    bpy.types.VIEW3D_HT_header.prepend(addon_button) # Here we add our button in front of the View 3D header.

    # Our external Icons
    global custom_icons
    custom_icons = bpy.utils.previews.new()
    # Use this for an addon.
    icons_dir = os.path.join(os.path.dirname(__file__), "icons")

    # Use this inside a script
    #script_path = bpy.context.space_data.text.filepath
    #icons_dir = os.path.join(os.path.dirname(script_path), "icons")

    custom_icons.load("icon_not_available", os.path.join(icons_dir, "NOT_AVAILABLE.png"), 'IMAGE')

def unregister():
    global custom_icons
    bpy.utils.previews.remove(custom_icons)

# This allows you to run the script directly from blenders text editor
# to test the addon without having to install it.

if __name__ == "__main__":
    register()


Is there a fast way to render an obj+mtl file to PNG

We can't help you without knowing what it is in your scene that is taking the time. Two seconds is almost nothing, so presumably it is a very simple scene and rendered using the Eevee or Internal engine.

Simplest answer is to lower the resolution. Beyond that, I would suggest that this question would be better on BlenderArtists, where there is more room to discuss things like render settings and their impact on the final image.

Regardless, I suggest you post an example file here: PasteAll.org


Unable to select specific faces in shading mode

You appear to have overlays turned off. This means that selected objects (and Faces, Vertices, etc) will not appear to be selected, because the blue/yellow/orange highlighting that indicates an object is selected is considered an overlay.

You can turn overlays back on by clicking the relevant button here:


Is it possible to be able to hold the spacebar to make a player jump higher? Game Engine

Yes, it is possible.

Typically you measure the time between pressed and released. Minimum is one frame, so you will always been able to measure the time.

You need to define how you want to convert the time to jump height (or force or velocity or whatever.

Due to it's dynamic nature I suggest to implement the usage of the result that in Python.


How to achieve a sharp tip/edge for a blade?

You can choose whatever you feel is best.
You can scale it down a lot. You can merge it and have less geometry.(Preferred)
I'm not sure what exactly your question is.


There are a bunch of very good fracture add-ons out there. Some of them only support fracturing the entire object at one time, while others actually let you control the places that the object fractures. You may want to consider this add-on as it lets you do that kind of thing with objects. I am positive that there is no way to automatically generate fractured edges based off of the rigid-body simulation, but this add-on should help a lot.


The easiest way is to go to your node editor and add a RGB Curves node inbetween your wood node and the diffuse node (where the circle is in the pic)

Then just bring down the curve.

You could also TAB into that wood node and look for the colored squares (like your glossy one has) and change the color that way.


Knife project tool is looking rough after I extrude on a curved surface

Apply an Edge Split modifier to your object and then select the loop edges one for each letter-symbol (if I count correctly there should be 5) and then once you select them press Spacebar and search mark sharp and press Enter

Then in your Edge Split modifier select only Sharp Edges.

However this will only fix the solution 90%. If you zoom in really close to the area with the letters you will see some "unwanted" shading. In that case I would suggest to delete the letters and try what comments suggest.


Why does render to texture camera make armature animation freeze in the Game engine?

There is a "animation culling" build in. This means anything that is not seen by the active camera will not be animated. This is to skip processing time.

This is not always a correct assumption, e.g. when the animation influences physics or as in your case you see it by a different camera.

I know this issue was raised as a bug to allow disabling this sort of culling for certain objects. Just now I do not know the state of that feature.


How to limit the rotation of a bone in an FK chain?

just add the limit rotation bone contraint to that bone, and uncheck the axis that you wont use and then play with starting and ending rotation, for example if you want it to have a limit of 90 degrees just add 0 deg as starting and 90 as ending and thats it.


VSE: Preview of current frame when dragging strip handle isn't working anymore

Hold down shift and use the Right mouse button on the strip you wish to scrub.

Very non-intuitive.

Found about about it from the great Blender Frenzy who is investigating VSE in 2.8 after creating a great free series of videos on VSE in 2.79


I will assume you are talking about an external GPU in this case, say a Nvidia GTX 660 etc..
Excerpt from the Manual

...GPU rendering makes it possible to use your graphics card for
rendering, instead of the CPU. This can speed up rendering, because
modern GPUs are quite designed to do a lot of number crunching...

In short, No, you do not need an external GPU. Not to get too technical but except for drawing and viewport stuff amongst some other things, much of Blender's core functionality relies very little on a fully fledged GPU.
For modeling in your case, you are perfectly fine with just a decent CPU and an onboard graphics card that supports OpenGL (which in these modern times is pretty much every one of them).
Having one would be nice though as this can greatly improve the viewport performance among other things but it is not a major requirement unless you are going to be doing very heavy or demanding production work.

Graphics card note: Blender runs on all OpenGL compliant cards,
although there are some issues with cheap onboard cards (Intel, Via).
We therefore can't officially support and guarantee that Blender works
fine on those systems.

You can see the system requirements for Blender here.


Cycle's image sequence texture not playing

I was able to solve the issue by upgrading to Blender 2.9 as it recently came out.
I am still not sure exactly what caused the problem in the first place but I made sure to reset my settings and preferences over from scratch and I now have full image sequence functionality.


Why are my objects invisible and in the wrong places?

For the out-of-place issue. Your Origin is not centered on the Object. Select the cube when in Object Mode and use this tool to put realign the origin


Enable the '3D Print Toolbox' addon.

2.79

Open the '3D Printing' tab in 3D view > Tool shelf.
Under statistics, press the Area button. (there's also option for volume and other checks for geometry).

2.8+
The Addons shelf has been moved on the right of the screen. Press N in the 3D Viewport or click the arrow in the top right of the area to expand it.


Shadows distorted and enlarged upon rendering

It appears from your image that you have two lamps lighting the scene. The properly sized shadows from your sun lamp are visible, but you also apparently have a spot lamp near the surface of the water, and that is causing the enlarged shadows. Look in the Outliner panel to make sure you have this spot lamp disabled.


Is it possible to change power of zoom in /out in viewport with respect to distance from active object

When zooming in blender, the viewport camera will move closer to its centre of rotation. You can move the centre of rotation by panning (holding shift and the middle mouse button), or the easier way would probably be to press the decimal key on your numpad to centre the camera on the selected object.


The schrinkwrap modifiers are disabled in viewports but not for rendering:


blender 2.69: Texture is not shown correctly

This could happen if both objects already have a material before being joined. Blender will copy all materials assigned in the source object to the destination object, all faces still assigned to the same material prior to joining. When you're creating a new texture, it's only assigned to one material, so it doesn't show up on faces still assigned to other materials when rendered.

The object's UV image could still be shown as you intended in the viewport, because it's assigned through image attribute of the object's UV map. It doesn't rely on Texture data at all. But what's rendered, do rely on it.

If this is the case, remove the unwanted material's slot, assign faces from the other object to the intended material, or assign the same texture to all materials in the object.


Animate a tube cylinder with "build" modifier - problem with round shape

Instead of using the build modifier, use the bezier's bevel end property.
After adding a bevel object or increasing the depth, you can change the Bevel End value and animate it by hovering over the property and pressing I or clicking on the circle to its right.


This seems like a job for the basic view tools which are hotkeyed by default to the numpad.

Just have a single large polygon with the same orientation as your model and then select it when you want to re-adjust your view press Shift + NumPad 7, Shift + NumPad 3 or Shift + NumPad 1


I want to unwrap a label which has a transparent area

Your problem here is not so much in with unwrapping but more with the material setup.

I would say your UV unwrap seems to be correct and would be suited for what you are trying to do, now all you need is to correctly setup your label material. You could do this two different ways:

Either copy your glass material node setup into the "Label" material node tree, and then use a Shader Mix node to mix the label "paper material" with the "glass material". In the mix input socket you should connect the alpha output of your image. Roughly, this:

Another way around is to use the same material on all faces of the bottle, including the label and glass. Use the same technique with the Shader Mix node setup as above, but make sure all faces have blank no UV coordinates (like setting all vertex to X0,Y0) except for the ones with the label so that the glass material shows up allover except for the parts with paper label.

EDIT
You an achieve this in two different ways:

Either model the label as a simple cylinder around the bottle with a radius slightly larger than the bottle itself like the example on the right (exaggerated radius for visibility purposes) then use alpha channel transparency in the material to hide the excess geometry. (just leave it like this, people will take care of it in their software)
Or model it as above and then after unwrapping select the top vertices and move them down using GG(double press G button) and make sure you select the Preserve UVs in the operator options. That way you can manually adjust the top vertices without distorting the UVs.


Your texture coordinates are set to Generated.
To fix your problem change mapping coordinates to UV


How to use a weight to check if an object is stable?

Ok, so I think I found a solution

def create_cubes():
#board=table without the legs
h=board_height
d=board.dimensions
l=board.location
r=0.3
#First cube
bpy.ops.mesh.primitive_cube_add(radius=r, location=(l.x-d.x/2+3*r, l.y+d.y/2-3*r, h+d.z+r))
add_rigidbody()
cube1=bpy.context.active_object
cube1.name = "Cube" + str(1)
validation_cubes.append(cube1)
bpy.data.scenes['Scene'].objects.unlink(bpy.data.objects["Cube" + str(1)])
#Second cube
bpy.ops.mesh.primitive_cube_add(radius=r, location=(l.x, l.y+d.y/2-2*r, h+d.z+r))
add_rigidbody()
cube2=bpy.context.active_object
cube2.name = "Cube" + str(2)
validation_cubes.append(cube2)
bpy.data.scenes['Scene'].objects.unlink(bpy.data.objects["Cube" + str(2)])
#Third cube
bpy.ops.mesh.primitive_cube_add(radius=r, location=(l.x+d.x/4, l.y-d.y/2+3*r, h+d.z+r))
add_rigidbody()
cube3=bpy.context.active_object
cube3.name = "Cube" + str(3)
validation_cubes.append(cube3)
bpy.data.scenes['Scene'].objects.unlink(bpy.data.objects["Cube" + str(3)])

Now you have defined the locations for three cubes. These locations will be the same, no matter how you scale the board or the radius of the cube.The cubes are named and placed in the list validation_cubes, unliked from the mesh

Then you simply need to create a loop that links back each cube, one at a time, so that the cubes don't affect eachother

def validate_table():
create_cubes()
for x in range(0,3):
    bpy.data.scenes['Scene'].objects.link(bpy.data.objects[validation_cubes[x].name])
    append_physics()


The passport is made from a dissected cube with one half hinged up a little from the fully opened flat state.
The paper is from duplicating the two upper faces of the green cover and separating those with 'P'
(in Edit mode) so paper and cover become two individual objects.  The paper is raised a little so it's a whisker above the cover, then parented (CTL-P) to the cover to form the complete passport.  (child=paper)
The paper is given it's own material slot and coloured white.
The complete model is animated face up to slide down the 'escalator' and into it's workings at the bottom.  The descent keyframes are set to 'linear' and that changes to a much lower speed when it's being drawn into the mechanism.  It's also rotated a little as it's being drawn in.
Two (invisible) emitters are placed at the bottom. One to eject shredded paper, the other to eject torn pieces of (fabric) cover.  Both use identically shaped 'particle objects' (debris) which are held in Layer 2. Layer 2 is not rendered out.

Each debris object uses the same material slot as it's non-shredded kin and the cover debris is scaled up in it's emitter to be much larger than the shredded paper.  It's also ejected a little further than the paper.
The passport begins to enter the base cube at frame 73 and particles start ejecting a frame later.
The number of particles for each has to make the ejection dense enough and with enough particle velocity to appear like the machine is shredding with enthusiasm until a few frames after the passport disappears.
The Paper's emitter has 800 particles in all, the Cover's, just 200.
The base cube and floor are set as 'collision' objects so particles can't can't penetrate and fall through.
Both the floor and base are set to 'kill particles' on contact.
-==============-
The details for Newbies -  The Paper shredding...
The emitters are merely subdivided planes and have different settings so they eject cloth and paper a little differently.  They are placed a fraction above the base cube. i.e. OUTSIDE the cube, not in it.
(They'll be invisible)
You can experiment with the emitter sliders & buttons but keep a reference copy of the Blend file intact.
Set the velocity etc to have them ejected as far, as high, and in the direction desired.  That's all taken care of in the particle's 'velocity' and 'rotation' panels.
Make a particle object that will become the shape of the paper debris'.  Store that in a spare layer or collection.  Don't allow Blender to render that object.  It's there as a reference object only.
The debris object itself is an ordinary plane (or any other object) that's deformed manually and coloured white.  Give it a name.
Open the Particle's "Render" panel and tick "Emitter" & "Died" boxes only.
Click the "Object" button.  That directs Blender to use an object for the particles.
Enter the name of the paper debris object you created in the other layer/collection.
Tick the "Scale" & "Rotation" boxes, set the "Size" value as required.
In the Particle's "Display" panel, click on the 'Rendered' button.   (that's usually the default anyway)
The physics shouldn't need anything changed from the default "Newtonian".
Once it's working right, give the emitter a Material slot and set it to fully transparent and without Specular so it won't be ghosted.
-================-
The Cover Shredding -
Duplicate the paper's emitter and in the Particle settings, click the minus button where you see it's name at the top.  If you don't, you'll be adjusting the paper emitter instead.
Click on the plus button to produce a separate one. Name it  'Cover'.
Raise it a fraction so it's off the other.
This emitter behavior needs to be a little different from the first.  You an see it's settings in the Blend file.


Question about a driver rotation expression

Rotating how much?  What about when thigh bone isn't rotated that much?
The form of a single line "If" is something like the following:
((var * constant1) * (var>(30.1 * pi/1800))) + ((var * constant2) * (1.0- var>(30.1 * pi/180)))
What that's saying:
a) If var's rotation is greater than 30.1 degrees, output var * constant1.
b) Else, output var * constant2.
Constant2 can be zero.  You can understand this by recognizing that a statement like var>n returns 1 if the statement is true and 0 if it is false.  Multiplying 1.0 - whatever instead of flipping > for <= is just style in this case, but it's style informed by the situations where the things you're measuring aren't exactly 0 or 1.
And the reason for var>(30.1*pi/180) is because, for drivers, you're working with radians, not degrees.  (Don't ask me why, it's a developer decision than I don't necessarily agree with.)


How to hide all subdivision to optimize viewport

first select all the meshes with subdivision and select one active object(indicated by yellow)

then turn of subdivision surface modifier on that mesh.

after that click on that eye thing and right click

then just click on copy to selected and you shouold be fine


IMO your question is incomplete.

  Will this build be sufficient for the task

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

  Budget PC

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


Blender 2.8 drivers, trigonometric functions not working?

Domain Error

My suspicion is rather than asin being unavailable, you are getting a math domain error.

in python console

>> "asin" in bpy.app.driver_namespace
True

>>> bpy.app.version
(2, 80, 74)

Indicating the math.asin(angle) method is known to driver namespace.  Would seriously consider not filing a bug report re it missing

To test have typed #asin(frame) directly into x location of an object (frame , also in driver namespace, is current frame)

and as expected at frame 1, returns $\pi/2$ (or 90 degrees).

Remember the values passed to $\arcsin(x)$ need to be in domain [-1. 1], hence if i change to frame 2

ERROR (bke.fcurve): ../fcurve.c:2084 driver_evaluate_simple_expr: Math Domain Error in Driver: 'asin(frame)'


How do I composite a transparent texture over a masked Render Layer

Your "skydome" renderlayer is masked, and it shouldn't.

Remove the mask from the background renderlayer and the alpha over operation will produce the right result.

The skydome renderlayer should look fully opaque, without any transparency (your screenshot shows that it is masked by the objects of the foreground renderlayer).

Keep in mind that masks in the renderlayer panel are z-masks, created by geometry, and not affected by alpha transparency.


So 2 solutions:

I've tried with B-Bones, it works fine. Don't forget to put the Subdivision Surface under the Armature modifier, otherwise you'll have bad shading:

You could also use both bones + shapekeys:

Create your flat object. Give it 3 bones, one main, one for each face hinge:

Give your object a basis shapekey and a second shapekey, modify the object:

Mix both shapekeys and bones animations, use the bones to move and close the object:


I assume the problem is this:

This flickering can have a few reasons, in your case it is an accident that happened while modelling. You duplicated that wall and left the duplicate in the same place. It has a different UV Map than the original, so both walls try to show their (different) texture to the viewer, resulting in a heavy fight.
To resolve it, delete one of the walls. Select one arbitrary face, and run the Select Linked command. Then delete those selected faces:

Do this for all problem walls, and make sure to check the ones that seem right as well. As long as the UV Map is identical, you might not spot the issue at all.


I want to apply an additional texture to my cup on the faces selected in the top screenshot. But the Normal UV map currently takes up all space

You're almost there. Here's how you do it.
First add a new material: Select your object and in materials settings press the +, then press New and name your material.

Next create a new UV vertex group, and unwrap it: Switch to UV Edit mode. Select the vertices or faces you want to add your new material too. Add a new UV Map and name it, then U unwrap your selected vertices, make sure you have your new UV Map selected in the active UV layer in the upper right corner of the image editor window.

Assign your texture: Back to Layout mode. In Edit Mode. Keep your vertices or faces selected, make sure the new material is selected in the Materials settings window, click Assign. Then you have to add the image texture. Go to the Shader Editor. Shift+A to add nodes. Add an Image Texture node and a UVMap node, set it up like in the image below. Depending on the look you're after, you may want to adjust some settings, like Transmission and Roughness.

Yours will look better than this with some fine adjustments.


You can (and should) select half of the model even if it's not symmetrical. Unfortunately, once you activate the mirrors modifier the model will look like it's been torn up the middle.

To fix, enable clipping in the modifier panel, then select all of the vertices but the head. View your object from the front (numpad1), and hit R to rotate the crookedness away until all of the vertices are aligned straight up the middle.

You may need to do a little tweaking to get it to look right again, but the crookedness should be gone.

If your only blocking out a body, and it's a pretty low density mesh, it might be easier to delete it and start again.


How to make objects "look bright" with a haze of light?

I tried that but couldn't get a convincing result that reproduces the image but at least it could be a starting point.
For detailed material settings see the attached .blend.

Compositing adds the red glow:


Rendered texture mapping is different than in the viewport

I think your problem is that you are working on a different UV map from the one you've set to actually render.

Under Properties Editor > Object Data > UV Maps, you can click on the camera icon next to a UV map name to activate it for rendering :]


Can you email a blender model from one device and open it on another?

I can't see why you wouldn't be able to do that. There might be small problems, but nothing major.


what would setting W as the way to default exit out of other tools cause in terms of conflict?

What do you want?

If you want to discuss a modelling process - it is off-topic because it is to broad. Question must be about specific problem with enough detail to identify an adequate answer. Blenderartists.org is better place to discuss broad questions.

If you want to ask is it correct to edit keymap - Yes, it is correct. Feel free to edit keyboard shortcuts as you want.

If you want to suggest it as default - use devtalk.blender.org forum to create discussion about it.


Appending collection from broken file to new did the trick. Everything works fine now


Keyframing emission shader colour/strength using python

You need to get a bit closer to what you want to keyframe. It is the socket that keyframes one of it's values, not the material. So you want to tell the input socket to insert a keyframe.

So this slight variation of what you have will work (only over two lines for clarity) -

node = bpy.context.active_object.active_material.node_tree.nodes['Emission']
node.inputs[1].keyframe_insert(data_path="default_value",frame=10)


Need help with creased edges connected to uncreased with subsurf modifier

Well... bulging out to not bulging out :


How can use the mapping node for two noise textures

You can use a geometry node which allows to use the rendered position to do this kind of thing.

The additional nodes can be plugged before the top left colorramp of your material:

From left to right (the top nodes line):

Rendered position: the position is given from the object origin
Separate XYZ, in order to keep only Z (for the poles)
Absolute: the sphere here is 2 meters height and its origin is a the middle, so "absolute" gives a value between 0 and 1
A color ramp to be tuned so that the earth surface is more or less far from the poles
Multiply: to mix your noise input with the previous ramp which translates the Z value
The last output is injected in the color ramp of your initial material (or at least I've tried to mimic it)


How to get the truly width and height of frame when rendering? (It would be good if I can render without saving images)

You can get the Python expressions needed by enabling Python Tooltips in the User Preferences, "Interface" tab. Then you can just hover over the resolution settings in the render panel, and see you can use bpy.data.scene["Scene"].render.resolution_x. It's better, though, to use the currently active scene, rather than hard-coding the scene name. Also you'll want to multiply with the resolution scale percentage. This leads you to:

render = bpy.context.scene.render
scale = render.resolution_percentage / 100
rsize_x = render.resolution_x * scale
rsize_y = render.resolution_y * scale


If I got it right, I think you could just model a thin (but thick enough to be printed) "pin", then duplicate it and and move to desired position, even rougly overlapping pin and bones shapes.

When all bones are connected by pins, you could join allo bones and pins, export to STL and print. In my experiencem 3D programs usually don't complain about overlapping meshes, they calculate a single overall shape and print a single object, anyway.


How can a cube/ a group of cubes be painted?

you have to use opencv a python library for image processing so that you can map a full image.


Texture that only effects faces that are facing upwards

Use this node setup for your material:

The dot product of the face normal with vector (0, 0, 1) is 0 when the face normal is orthogonal (= horizontal) and maximal when equal. When pointing downwards the dot product is negative.

With the color ramp you can control the angular tolerance. If you don't want to have a smooth transition between texture and green you can move white handle to the black one.

This is used as the factor of a Mix Shader mixing the texture with a green diffuse material.

Result:


It's a python type error

Python error is telling you that a type in this line is wrong.  It's getting a list instead of BMVert

Note this piece of code comes from your question and is WRONG

verts=[myarray, myarray1]

since verts is expecting a list of BMVerts (as pointed out in the documentation you linked) without even seeing your code it suggests  myarray, myarray1 are both lists.
Agree with sentiment here to post code

Recommended change

If both myarray, myarray1 are lists of verts sum them

verts = myarray + myarray1

  I did google for few hours and could not find any usefull help Anyway
  your code gives me the same error verts=[myarray, myarray1] TypeError:
  verts: expected (BMVert), not 'list'

  I used your piece of code to combine the variables vertstomerge =
  [verts_start_a, verts_start_b, verts_start_c] Then I did this
  bmesh.ops.remove_doubles(bm, verts=vertstomerge dist=0.001 ) Error
  TypeError: verts: expected (BMVert), not 'list'

No I recommended adding them together.  Could it be that type(verts_start_a) b, c, d is a list?, if it is it will lead to a type error, getting a list, expecting a BMVert.
.

Tip: Search stackoverflow, or google on the cause of errors.  Probably find the solution quicker than writing this question.


I would do it like this:

of course you have to drag the "to sphere" command action to get the desired amount (1 = maximum effect)


How to move the time cursor with the mouse in python?

Here's an adjustment of the answer to this q Getting area (region.view2d) pixel coordinates of 2D views (VSE, NLA)

Run the script, use the spacebar to search out the "Simple Modal Sequencer Operator" and the current frame will change with the mouse.

The key method is region.view2d.region_to_view which returns, in this case, the frame in x and the strip channel in y, from the regions pixel coords.

import bpy
import bgl
import blf

def draw_callback_px(self, context):
    print("mouse points", len(self.mouse_path))

    region = context.region
    strip = context.scene.sequence_editor.active_strip
    if strip is None:
        return

    x = strip.frame_final_start
    y = strip.channel
    x, y = region.view2d.view_to_region(x, y)
    font_id = 0  # XXX, need to find out how best to get this.

    # draw some text
    blf.position(font_id, x, y, 0)
    blf.size(font_id, 20, 72)
    # region_to_view gives the region coords.  x is frame, y is channel.
    x, y = region.view2d.region_to_view(*self.mouse_path[-1] )
    blf.draw(font_id, "Hello Word %d %d" % (x, y))
    # move the frame to the mouse
    context.scene.frame_set(x)

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

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

        if event.type == 'MOUSEMOVE':
            self.mouse_path.append((event.mouse_region_x, event.mouse_region_y))

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceSequenceEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'FINISHED'}

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

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'SEQUENCE_EDITOR':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceSequenceEditor.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            self.mouse_path = []

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "SequenceEditor not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

PS I slapped this together pretty quickly and put code in the draw hander rather than the event loop of the operator. Will fix later...


How do you customize Rotate, Scale and Grab?

Change Pivot point from this menu:

Also, you can switch between Bounding box and 3D cursor using .  (point on keyboard) and ,(comma)

Turn off Proportional editing:

Also, you can turn on/off Proportional editing using O


How to apply on subdivision modifier in 2.91

Those options have been condensed into this dropdown menu.


Alberto, I'm not sure to see exactly the same thing as you, but anyway here is how I would do it. First I show how I would correct your own topology so that you can have a curved face. And also it looks like there's a slot in the middle of a face, so I also tried it.


Easy manipulation of transparency in BGE

I've found an interesting workarround - If you save a very low rez. image with part color and part transparency you can adjust the transparency by moving the texture -

Maybe will work for some cases because there is a transition between the color and the alpha which means there is no even distribution of color and transparency over the plane.


Yeah in the link you provided there was a good answer.

I made a clear answer out of it: Just animate the Velocity of the particles.

You can automate the curve with F-Curve Cycles modifier (Shift+E):

If it annoys you that the 0-velocity particles keep popping up, you can model a structure around the emitter:


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

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

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


How to get hip/buttocks armature to bend correctly

You need extra bones to controll the inner part of the gluteus, the lower part of the butt and the buns. All of those extra bones are child of the leg. Then you can further deform the butt according to the rotation of the leg. Most principal you need to have distributed weights between all 4 new buttock bones.


Shading artifacts / Tricky modelling situation

You should simplify your topology. Something simple is more controlable.


Are you using fbx in the process? If yes make sure you are embeding doge textures within the fbx. You have to set this in export options:


Wicked mesh deform: Misusing bones, meshes or both?

Actually... I threw away everything and recreated, using face masking to assure good delineation of weights.... but that leaves two variables to explain it: better bone alignment to the intended motion of the critter, and more precise weight painting. Face masking rocks.  This is the final one... I did not get a weight view of the faulty one.


Rigging problem with IK: why do the bones turn around?

The floating bone controls which direction your knee bends. (or which direction you want your leg to direct). I assume you have 2 knee bone controllers instead of one controlling both. Play with the knee bones, I'm sure you will put 2 and 2 together real quick.


I don't know if you have a reason to make your loops exactly equidistant, if so, I've missed, with this one.. This is really to reduce geometry, while preserving curvature.
Enable the shipped Add-on 'Simplify Curves' and..

Select, duplicate, and make a new object of one vertical half-loop from your cone (BTW, straighten it out in your chosen plane, and make sure it has verts at directly above and below the object origin)
Convert the profile to a Curve
Call up 'Simplify Curve' from your F3 search menu and tweak to acceptable preservation of curvature
Convert the profile back to a mesh, and Screw modifier turn it back into a cone.

You can save a lot of polygons..

Without that much difference in curvature .. (both examples subdivided once) and if you want to keep the shape flexible, Curves can be given a Screw modifier, before conversion.
This .blend includes some discretionary manual edits to the profile just before spinning .. bevelling vertices at very sharp corners to hold up under subdiv. The simplifying step is from 'Plane_005' to 'Simple_Plane_005'.


import bpy
import bmesh

mat_c1 = bpy.data.materials['c1']

for ob in bpy.context.scene.objects:
    if ob.type == 'MESH':
        # get all the slot indexes to which mat_c1 is assigned
        c1_slots = [id for id, mat in enumerate(ob.data.materials) if mat == mat_c1]

        # you can also change active_material with
        # ob.active_material_index = some_number
        # and then run operators to deselect all faces and select material with
        # bpy.ops.material_slot_select()
        # but operators are bad so we will do it differently

        faces_mat_c1 = []
        bm = bmesh.new()
        bm.from_mesh(ob.data)
        # no need to swith into edit mode

        for face in bm.faces:
            if face.material_index in c1_slots:
                # face has mat_c1 assigned
                faces_mat_c1.append(face)

        # delete faces with mat_c1
        bmesh.ops.delete(bm, geom=faces_mat_c1, context=5)
        bm.to_mesh(ob.data)
        bm.free()
    else:
        ob.select = False


Blender 2.8 / Windows 10 / Python - import Module fails, pip install Module fails, pip install Wheel fails

I'm not sure if the reinstall and admin rights are necessary for all cases but the following solved my problem:

Uninstall Blender and reinstall as Admin
In Blender Python shell run

import sys
sys.exec_prefix

Open Powershell as Admin
Go to directory listed by Blender Python shell
Ensure pip

.\bin\python.exe -m ensurepip

Install modules

.\Scripts\pip3.exe install vtk

Thanks to @rgj for troubleshooting and this blog for Blender/pip instructions


How to use different offset for each duplicate created with array modifier?

You can use duplication (instancing) on the faces of a different mesh

Create a mesh, with one face per each intended duplication location

Select the object to duplicate, then Shift + Select the newly created mesh. Do CtrlP, then Parent to Object.

(optional) make the origins of the two meshes coincide

On the "S" shaped mesh, under Duplication in the Object panel, choose Faces

(btw, the "S" mesh won't be rendered: only your object's instances)


Having trouble with multiple animations triggered by key presses in the game engine

The problem is that the action actuator is broken since 2.62. When you play different actions one after the other at the same object, some animations will not be shown. The bugtracker contains several reports already.

To avoid that problem you can play the animations with python via playAction().

It is not my preferred solution, but as long as the action actuator does not work as expected, it is a solution.


Can't bevel - Invalid boundary region to join faces - edge dissolve

Got the answer thanks to advice on: Can't bevel an NGon

I learned that blender 'needs' the extra edges, and that having an ngon is a bad idea. So I created all the extra geometry (by extruding along normals and manipulating some vertices/faces), and then the bevel works:

(I also now created the whole mesh without doing a boolean operation).


How can viewport shading functionality be used to preview render result in Blender 2.80?

Switch to Cycles, Add a glass shader, press Z and set the viewport to rendered:


Moving a parent object is not influencing child objects at all


Can't change positioning of item after keyframe

The keyframe fixes the property (in this case the position) not only for a certain frame but also influences the future ans past values of that property. By adding only one keyframe that value is fixed for all time on that property. (think of this as a piecewise defined function).

Your solution should be to add a new keyframe i on the frame you want to change the position. This should turn the property field yellow and you can set a new value for that frame. In the sidebar you can change the transition from one value to another over time.

No keyframe: the values are grey

keyframe on current frame (frame 0), values are yellow

frame 12 without keyframe, but a keyframe at frame 0 value is green (and cannot be permanently changed)

changed value and added new keyframe at frame 12. Values are yellow

frame 6 without keyframe, between frame 0 and 12, value is green and interpolated between these frames

Tldr: to have multiple values over time for one property you need multiple keyframes.


Baking - UV's Outside UV Window Don't Bake

You can scale the image inside the Shader editor with the Mapping node, just make this setup:

Make sure you change X and Y scale together, so you don't stretch your texture one way and not the other.


You're using a procedural texture with generated coordinates. It's normal if it doesn't mirror.
If you want this blend texture to mirror while keeping the mirror modifier you'd have to use UV coordinates with an equirectangular projection and using a linear blend texture.
Or you can simply apply the mirror modifier, separate the eyes and put the origin of each one at its center.


Just a wild guess here, but it might to do with your settings under the hair particles.  If you are using Child Hairs (Children) there is a setting for "Display" and "Render" - if you have render set to zero, you won't get any hair rendering.

Another possibility is that you have shut off the rendering of the hair by clicking on the "camera" icon beside the name of the particle system in the particle list at the top of the particle property tab - it should NOT be greyed out.

A third possibility is that you have inadvertently turned off hair rendering in the Render tab by un-checking "Use Hair" (under Geometry).


Hanging lamp attached to a cord animation

You can use Object Constraints:
Add a new vertex group to the cord, and add the bottom vertex to it. Add a "Child Of" object constraint to the lamp, select the cord as target and the new vertex group as Vertex Group. Then position your lamp so it sits under the cord. The lamp now moves with the bottom vertex of the cord.
Result:


My Image Texture is not Affecting Geometry Node Point Distribute

maybe you just expect "too much". It might be that your cube is just too big and your density is too low so that you really can "see" the influence of your texture. As you can see i tried out a really sharp texture and i had to make the cube really small and put the density really hight to "see" the effect at all.


Rigify doesn't seem to allow me to shift the pole target

By defualt the widget that looks like two arrows is used to rotate the elbow/knee. You can also select that widget then click Toggle Pole as indicated in the image. That will enable you to use the standard pole target.


Texture painted in Cycles Render, but the painted texture doesn't show up in Blender Game

You will need to set up game materials - the game engine doesn't use Cycles as a renderer, and that is why you paint or bake to image and then use those UV mapped textures to create the game assets.


One way to get stripes is to use a 'Checker Texture' and use a 'Mapping' node to stretch the texture in one axis. Of course this would only produce a two-color striped texture and it appears that you want a multi-colored texture. In that case I think you could layer some 'Checker Textures' using Alpha and offsetting their mapping coordinates. I'll give it a try to see if it's a viable solution and let you know how it goes.

This seems to work (if I understand your question correctly). You would have to play with the values to achieve the thin black line.


Animating the front of the curve
Assuming, as you say, that you have already created your Bezier Curve, all you need to do is:

make sure that the Curve has a Fill Type = Full and a Bevel Depth greater than zero

animate the Bevel End value using keyframes, from 0 at the start frame to 1 at the end frame.

Shading
You say that you have already found a shading solution. Let me share my solution anyway:

Enable "Use UV for mapping" in the Curve properties.

Use this node setup (the "Add" node is from "Converter > Vector Math").

Animate the Y coordinate of the Combine XYZ node. This will allow you to create the moving blobs of light along the line.


How to align one vertex to X, Y or Z of another vertex

To do that quicker,

first method

set the pivot point to active element and start your cut from the existing point (as this will keep this point active).

Then scale to 0 using the wanted axis :

second method

Use 'offset edge slide' Shift+Ctrl+R.

During the movement place the mouse along the shortest edge and hit E.

After that you'll need to remove doubles or merge the vertices.


Hide handles that belongs to non-selected vertices in the bezier curve editor

As far as I know this isn't configurable at the moment.

One possible workaround is to tweak your current theme and dim the colors of unselected handles, or make them closer to say, the world color or viewport background, so they are less visible or intrusive, though they will still actually be visible and selectable.

It is only a workaround, and you have to manually tweak colors for every handle type manually, it would no longer really work once your background color changes, but if you always use the same theme or don't activate the World Background option often, this should not be a problem.


Blender is very slow in Pose Mode but only with one character?

Ok I finally found the problem,the model was too heavy in poly (yes I know, this is a really stupid mistake, but I didn't think about that, you can laugh ;) ). I decimate it, bind and skin, and it works normally.


To move the smoke you don't have to move the domain. You have to move the "flow object"

I have done a simple and basic blender file with two cubes, one named domain and the other named flow. The flow object has two location keyframes at frame 0 and 90.

Hope this replies to your question


To get started with your project you could enable the addon Import Images as Planes in Menu: File / User Preferences.

It will be accessible from the menu File / Import / Image as Plane and create a plane an UVMap and assigns the image texture.
Note: You need to set the Viewport Shading to texture otherwise you won't see the image texture.

Bones are used to deform geometry you should ask another question (perhaps add an illustration) on what exactly you want to achieve.

You can tweak the subdivided edges in the UV-Editor and scale to maintain the proportions. Separating P By Selection for e.g. the legs allows you to have single objects for this part of the image which can be animated using bones as shown in the image above.


Download a specific Blender source version from Git

You can check out the versions Tags and commit hashes here:
https://git.blender.org/gitweb/gitweb.cgi/blender.git/tags

git clone git://git.blender.org/blender.git (and be patient as
this is a monster repo!)
cd blender
git checkout v2.79 (or whatever version you need)

You can also fetch only a specific tag from blenger.org however, not sure that will save you much ban(note that the blender git repo does allow only fetch from tagged or head branch commits, no arbitrary commit from hash) following those instructions:
https://stackoverflow.com/questions/3489173/how-to-clone-git-repository-with-specific-revision-changeset

All that said, good luck with the build!


Accessing another script in the same directory using python

Nevermind, I found what I was looking for.
I just had to type 'import filename' without *.py and reload my main script in blender.


How can I save and close and reopen a blend file with a script?

Just call save_as_mainfile() and open_mainfile() operators:

import bpy

bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)


Pivot Point

You set the 3D Cursor as transformation pivot point while the youtuber is using Median point (see the icon pointed by the mouse arrow in the orange box):

With the pivot point in the middle of selection he is able to scale the geometry from its center, not from side in your case. You can clearly see the pivot location by looking for the trasformation gizmo (colored arrows pointing towars axis)

You can change the pivot point in the button menu:


Process of turning groups of animation nodes into templates for easy reuse?

A part of a node tree can be made reusable by encapsulating it in a subprogram, something analogous to functions in python. One can create multiple subprograms in a node tree and save it in an empty blend file, this file can act as a module where if one wants to use the subprograms defined there one would simply append the node tree previously defined. Note that subprograms can be invoked across node trees, so no further interaction from the user is required after appending the node tree.

If you want to go the extra mile and implement your own nodes in Animation Nodes using Python and Cython, have a look at the Developer's Guide.


How do I prevent rigid body objects from falling down before they are hit?

The simplest answer to this is to apply transforms to all of the cubes. Ctrl+A>Scale and then in the physics panel, enable deactivation and start deactivated for all cubes so that the simulation does not take over the objects until they interact. Just enable the option for one, then choose copy from active in the Tool shelf with all cubes selected.


Why can't I use put Render Layers in a node group? (Compositor)

Probably because that is a group in its own. A render group. And so Blender just will not let you do that.


Blender Blendshape meshes, UVs, and textures

You already have the MESH part covered in your setup (standard) shapes. Good.

Now you also need to setup drivers to the SHADER aspect of this.

And it´s due with a simple FACTOR setup (greater than) Evaluation. If it returns a number above ZERO, expression is true, it SHOWS the texture. If it´s false, return TRANSPARENT (or default texture).
You may thank me enough to have searched for you this jewel, and thank you for voting me up as the answer.
https://www.youtube.com/watch?v=0glf-acMvcw


Your mesh appears to have backwards "normals". Flip the normals, then try the parenting method again with automatic weights. It should work!


Volume emission not working in blender 2.8 eevee

update blender 2.8 and it worked again so most likely a bug.


How to convert different contrast parts of image to curve?

Go to this website

Right click on the image and click Save page as (The download file will be in svg format)

Import File

File -> Import -> SVG (If svg is not enable, enable from the addon)

Now u need little cleanup.

Delete the unwanted parts (scale,etc)

Go to edit mode and select the outer edge and delete vertices

Now you have a clean India Map with the curve

If you need to download separate state download here. Color the different state and place it.

How to Bevel

Go to the curve tab

Change the shape from 2D to 3D

Add a curve circle.

Select the Map curve and in the bevel object select the circle.


Add a 'Scene' actuator in 'Add Background Scene' mode and add a Scene to the background of the current scene. You have lots of options when doing this.

See the example file, where I mixed two scenes and (using Python) I copied the rotation of the 'game' scene camera to the 'skybox' scene camera. Try to read the script, see the logic bricks, explore the scenes and you will understand how this method is powerful, allowing you to make a dynamic skybox in a scene and simply adding it to the main game scene.

http://pasteall.org/blend/index.php?id=48431

Alternatively, make a skybox object and parent to a single vertex of your game character. The skybox will follow your character location, but not the rotation, which is good for a sky.


how to do custom animation in a mhx file made using Makehuman

You should read or watch a few of the available tutorials or 100 'best', the mhx addon adds buttons for the rig-layers where you can select which manipulators are shown in the viewport.
The following animation was recorded in Pose Mode. You should read about the difference between IK/FK.
After that just record your animation by keyframing the poses setup by the controls.


How can I remove a prop that is used in an action but not needed in another?

Found something even better! Mentalist gave me much better search terms and I've now found the best answer to the solution. I didn't even know the eye (visibility) icon in the Outliner could be keyframed before =P

Thanks all for the help!

Animate the Viewport Visibility of an Object within the Timeline?


Extruding mesh with holes creates weird artifacts

Your problem is that you have ngons that create this kind of artefacts. Also you have a lot of useless edges, if you use a Subdivision Surfaces modifier you won't need so many.

If I were you I would redo the object, it would take less time than correct your version:

Keep the profile only, mirror it, use the Checker Deselect and the Dissolve Vertices tool to keep only the necessary amount of vertices.

Now extrude the profile, give it some edge loops and bevel where the cut are supposed to happen, then delete the faces.

Give it some additional edge loops to make the holes square, give your object a Solidify modifier to give it thickness, keep a copy of the object somewhere, apply the Solidify modifier, bring some additional edge loops to sharp the edges again.


Mesh distorted/stretched out with Array along curve

In order do be well-deformed by a curve, an object must have a location of 0.0.0, rotation of 0.0.0 and scale of 1.1.1.

This can be done selecting the mesh and "applying" its loc rot and scale (Ctrl A).

Then you'll have to adjust the modifier's parameters and tweak the Z rotation of the mesh.


It looks like it's both a topology and a Weighted Normal modifier problem:

You should avoid tris if they are twisted and stretched, so you should correct your topology with quads.
I don't know a lot about Weighted Normal modifier, here is an explanation by Cgslav on how it works, it looks like it's mainly made for bevel, I'm not sure it's made to fake a smooth shape like yours, rather use Subdivision Surface if you can, or add a bit of geometry?


How to assign different scenes for workspaces in Blender 2.8?

Just to clarify (or what I think the problem is):  It's annoying to constantly change the active scene when switching between Video editing and any other operation.

The workaround is to use "Window->New Main Window" and use the first window for 'Video Editing' and the second window for everything else. I realize the convenience when you change the scene for Layout/Modeling/Sculpting/Animation etc. But this becomes an INconvenience for the 'Video Editing' workspace. It seems it takes another monitor to go smoothly.


you can use vertex colors, or a blend texture or just use a bitmap gradient you should be able to look all of those up on youtube..sorry this is not a very specific answer, but if you look those up on youtube you will see how many options you have and which one suits your needs and skill set the best to cover each one would take far to much typing here.


Displaying vertex indices in Blender 2.8 using debug mode

You need to enable Developer Extras in the Interface settings, then you can enable vertex indices in the Viewport Overlays panel from the 3D viewport. You don't need to set the bpy.app.debug flag. Also, make sure to be in the Edit Mode. Object Mode will not show any vertex-related options.


You might have accidentally extruded twice earlier. If you press E and right click, it looks like nothing happened, but you actually extruded to the same place. Hope this helps somehow.


blender game engine objects ramdom duplicate

You'll likely want to use a particle system. Add a particle system to your mountain mesh, set it to hair, and set it to render your particles as your tree mesh. See the example below.


How to play a sound after script finishes?

You could play a MP3 file using the aud module

import aud
import time

sound = aud.Factory.file(pathToMP3 )
device = aud.device()
handle = device.play(sound)
# omit this to play full sound file
time.sleep(5)
handle.stop()

Alternatively you could launch any external application as described here: Run an external application with the bge


Is the Mesh deform modifier supported in BGE?

The Mesh Deform modifier is not supported by the BGE.

You can play deforming via armature actions or shapekey actions.


Any idea when GPU volumetric rendering will be added?

It is already there for CUDA GPU's in 2.77 and 2.77a. The other kind of GPU is not yet supported. Read the blender.org page for more on 2.77 and enhanced GPU capabilities.


Would it be practical to use the formula for a Bezier Curve (wikipedia article)?

You can evaluate it for t varying from 0..1.  One complication is that the distance between evaluated points will vary, so if you want constant speed you'll have to compensate by adjusting your time->t mapping.  P0..P3 correspond to the points and handles of each segment of the bezier curve.

Here is a short python example of how to inspect the control points and handles of a bezier curve (in case you are unable to inspect them in the N-panel pop-out of the 3D view):

import bpy

def mission1(curve):
    for spline in curve.splines:
        for kp in spline.bezier_points:
            print("%r"%[kp.handle_left, kp.co, kp.handle_right])
        print("")

mission1(bpy.context.active_object.data)

See also Mathematical formula for Bezier curves  and How can I know the data paths of certain point of bezier curve?


Cycle through Materials with Animation Nodes

You can just add your materials to a list, get a list element based on the frame, and set that material to the object using the Object Material Output node.


Here are two ways to do it: Shear tool or Mesh Deform modifier


Smooth shader and subsurf shadow problem

Some of the normals are incorrect. Select everything in edit mode and press Ctrl-N and that will recalculate the normals and fix it.


Different Color for region of intersection

The "Boolean Modifier" doesn´t work as expected with non-manifold meshes. When you add a plane use the "Solidify Modifier" first, to give it a slight thickness (e.g. 0.0001).

Give the plane a "Boolean Modifier" afterwards and set the target to the cone. Set "Operation" to "Difference". Copy the plane with ShiftD and press Esc to avoid moving the copy. For the copy set the "Operation" of the "Boolean Modifier" to "Intersect".

Edit: The pictures show the Modifier Tab in the Properties Panel (click the wrench icon). Note that the order of the modifiers in the modifier stack is important.

You could also parent the two planes so they can be moved around together. Hold Shift and select both plane objects with RMB. Press CtrlP and select "Object".

Afterwards materials can be assigned on every object separatly.
You can then use Freestyle for line rendering.

The advantage of using modifiers is fast editing and your objects are easy to animate.


Is there a way to render on my NVIDIA card without having to run the entire Mac OS on it as well?

Rendering is a very resource-intense task thus I'd highly recommend you to avoid doing anything else on your machine while rendering: it will either clutter the system or simply work out poorly.

Anyway, I suggest you to try rendering your final scenes or animations from the command line. I noticed that renders done that way tend to be kinda faster and the machine is more stable without the overhead of Blender's GUI.

Make sure to set up your blend file so to make it use the GPU for rendering and make sure to specify all the output options (select a path, a filename, the file format, etc.). Save the blend and close the GUI.
Copy the path to your blend file. Then, move into your Blender's executable path via Terminal (note that your path might differ, so I suggest you to also see this answer):

cd /Applications/Blender/blender.app/Contents/MacOS/blender
Run:

./blender -b "pathToYourBlendFile" -f 1

(-b tells it to run in background, -f 1 tells it to render the first frame only).

Now the render should start with all of your preferences. Try to see if the system is more usable while rendering this way (mine usually is, but I suppose YMMV).


Is there a way to change the phase of a wood texture?


How can I get the dimensions of an object using script?

Some blender basics

The console is a great place to figure stuff out

where C = bpy.context and D = bpy.data for our convenience.

>>> C.object
bpy.data.objects['Cube']

>>> C.object.dimensions
Vector((2.0000009536743164, 2.0000009536743164, 2.0))

>>> C.object.dimensions.y
2.0000009536743164

>>>

The height of an object in blender is its Z dimension.  Blender uses Z up and -Y forward.

The buttons in blender run operators.  In code these start with bpy.ops  The translate operator for example is bpy.ops.transform.translate()

The python console has autocomplete, hence you can peck around and nut somethings out.


How would I recreate this arched pillar from Vanishing Realms?

Final result:

Modeling:

It's extremely simple.

Just add a Cube. Go to Edit Mode. Select bottom face and extrude (hit E) it down in the Z axis, after extrude - scale it down (hit S). Repeat for every segment.

After that make object Smooth and add Autosmooth or Edgesplit Modifier.


UPDATE: As of version 2.91 we now have a Holdout option in the material settings which makes life much easier:

Create a new material, check Fill and Holdout
Use the paint bucket to fill in any area you want to be see-through, or just draw the inside of the ring using this material.

Old answer:

Create a new layer and name it "hole"

Draw a filled circle matching the ring's inner circle

Turn down the opacity of the "hole" layer to 0.000

Switch to the fill layer (that filled the entire ring) and enable mask

Add "hole" to the mask list and invert it by clicking on the square/circle icon


How to save an image created from python script including the alpha channel?

This is a bug in Blender, I've reported it on your behalf.

Setting image.colorspace_settings.name changes the alpha at the moment, reported (now fixed!)

This script works, notice it sets filepath_raw, which prevents reloading to the new path.

import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.use_alpha = True
image.alpha_mode = 'STRAIGHT'
image.filepath_raw = "//Sprite.png"
image.file_format = 'PNG'
image.save()


All sorted. In Orphan Data (the Outliner) I found the 'Purge' button which deleted everything I didn't need.


How to: High poly to low poly normal map + high poly texture + normal map of texture detail

You said you know how to bake a normal map from hi-poly to low-poly. It's the same for color texture.
If you use blender internal, bake textures instead of normals in the menu.
In cycles, you can choose 1 of the 3 diffuse maps (color, direct, indirect). The diffuse color should be what you need but if you want to combine the 3, you have to add direct to indirect and multiply the result with color.

About normal map : painting a normal map is a bad idea. Some softwares allow you to do it but if you want to paint details, use a bump map (B&W). I'm not sure about that but I think the normal baking adds the bump map inside the resulting normal map (blender internal). Else you'd better paint it on the low-poly mesh.


Play multiple videos in EEVEE starting at different time

Change "Offset" in the image input. To have one show black before starting, use the Mix RGB node with black as one of the inputs, and animate the factor to change from 1 to 0 (or vice versa) right when the video starts.


Use just the information for the Z (vertical) axis.

You can place the gradient where you need it by modifying the coordinates.


Parent-Child object relationship disappears after exporting Wavefront(obj) format

From the Wikipedia page for Wavefront obj :

"Obj files also do not support mesh hierarchies"

If you want to keep the hierarchy, you'll have to use another format such as fbx.


How do you restore previously tracked footage?

In the Movie Clip Editor use the footage settings.
Click on the folder icon and navigate to the place where the video clip is stored.

Alternatively you can use the outliner. Set it to  Data-block and manually edit the path to the Movie CLip file.


Python: Imported Curve points lose Z coordinate in Edit Mode

I'm not much into scripting or coding and now very little about Python myself, so apologies if this doesn't fix your problem, but I believe this is happening because your bezier curve seems to be in 2D mode (in your first screenshot), hence when entering edit mode it will automatically ignore any Z coordinates that it should not have in the first place.

Set your bezier curve to 3D either through the Properties Window > Object Data (Curve) > Shape > 3D or using the Pyhton API through bpy.types.Curve.dimensions setting it to 3D