Update
This feature has now been added, the official documentation can be seen here.
So now you can do just what you suggest in your question:

Have a look at this post: Rendering smoke in Cycles?
The volume rendering socket in cycles is not currently implemented, but it's planned for 2.69-2.70
Presumably, it will be used for rendering volumetric materials. (clouds, smoke, fog, etc. it may also mean the spot lamp will be able to use "halo" like BI)
Also see what the wiki has to say:

The volume shader is currently under independent development.
When the surface shader does not reflect or absorb light, it enters into the volume. If no volume shader is specified, it will pass straight through to the other side of the mesh.
If it is defined, a volume shader describes the light interaction as it passes through the volume of the mesh. Light may be scattered, absorbed, or emitted at any point in the volume.
A material may have both a surface and a volume shader, or only one of either. Using both may be useful for materials such as glass, water or ice, where you want some of the light to be absorbed as it passes through the surface, combined with e.g. a glass or glossy shader at the surface.

There is a patch by Storm for Bi-directional path tracing and Volumes in cycles. If you don't want to compile blender yourself, there are a few builds on Graphical. (see here and here for some tests)
Also see the Gsoc project to add cycles volume texturing with openVDB, and this.


Adjust physical bounce of the emitter particles

With Rotation checked, set Randomize to 0, and turn off all velocity in the Velocity segment, like this:

Now your particles should spawn based on the initial rotation of your blueprint object, and only rotate once they bounce off of something.


Blender 2.8 Text Editor OSL Script Node Update Disabled

OSL scripts will compile only if you are rendering in Cycles, on the CPU.
When both of those are true, an 'Open Shading Language' checkbox becomes available in the Properties region, Render tab, just under 'Device' (CPU)


How to make an animation play in the blender game engine?

First you had the logic bricks on the wrong object. You needed the Action actuator on the Armature not the mesh object, because it is the armature that is animated.

Your second problem was the mirror modifier (I applied it). The mirror modifier was causing the animation to not play in the BGE. Just another one of the differences between the game engine and blender.
In general you should not have any modifiers or transforms (scale or rotation) on your objects in the BGE.

Your working blend file.


Sorry but there's no way to make motion blur rendering in cycles any faster for now. how blender developers made motion blur 10x faster

As you can see in the article that they have already improved and sped up motion blur rendering by a lot. Compositing is your only choice left if you want it fast.


never mind I had to change blender render to cycle render


The basic principle is the same as this:

https://blender.stackexchange.com/a/39509/1853

Where you have an array of light bulbs.

An empty in the scene to control the size and placement of the texture.
And a texture to control the strength of an emission shader:

Animating the texture mapping of the texture you can make the lightbulbs make any pattern:


How to select objects based on texture data?

In the outliner editor window, at the right hand side of the menu bar, where the default item in the selection window is "all scenes", activate the drop down menu by pressing the arrows at the right side of the button, and select the menu item "data blocks". In the data blocks list, find "textures", and click on the plus-sign-in-a-circle to the left of the entry, and click on that to expand it. This will show all textures in the scene, and allow you to select them, or if not, to at least determine which objects in the scene are using the texture.


How do I texture paint symmetrically in blender 2.8?

In the 3D View N panel > Symmetry, or in the Properties panel > Active Tool > Symmetry.


How to export to FBX without baking animations?

Unfortunately, no; as far as I know, you can't export unbaked raw animation using the FBX exporter.

According to this post, unchecking Baked Animation disables all animation export, meaning the FBX is created without any animation information at all.  I realize it's tantalizing that perhaps disabling baked animation would have somehow exported keyframed "unbaked" animation, but that's unfortunately not the case with this particular exporter.  Unchecking this option works like an off switch with respect to animation.  Check it and you get baked animation, uncheck it and you get no animation.  :(


Is it possible to change the order of objects in a group?

You can sort the group (actually any list type) by using Sort List node:

Tip: You can apply multiple/cascading sorting rules to a list. For example, in my case , I first sorted all objects based on their Y location, then sorted the result again by X location.

Update:

You can try applying round math here for better sorting, due to the precision, for example:

round(e.location.y, 3)

round(e.location.x, 3)


Eevee viewport exposure (?) different in layout configurations

The environment Strength setting is a per-layout shading setting.

It is a multiplier for the environment's color values.
A quick look at the data path will show why it is per-layout:


Launch failure after Download of 2.80 & 2.79 on windows 10

I think what's going on here is that double clicking the zip file in the file browser doesn't actually extract the zip file contents, it just gives you a view of the zip file contents. That looks just like if you had extracted the zip file.

What you should do is:

Download the zip file
Right click it and do "Extract all"
After extraction is done, you should now be able to execute blender.exe from within the extracted folder.

One thing to look out for is that inside the not-extracted zip file, blender.exe will have a generic (non-Blender) icon.

After "Extract all", blender.exe will have the Blender icon.

The above instructions solved my problems when trying to run Blender 2.80 RC2 from a zip file on Windows.


Why my Eevee material with Alpha won’t show correctly

2 Solutions were found.
#1 by Benny_G: Instead of using Alpha Blend for the Blend mode, use Alpha Hashed.
#2 by NewVisitor: Use the Principled Shader instead of the Diffuse BSDF Shader, plugging Alpha to Alpha from the Image node to the Principled Shader.

What caused the need for this fix, it's still unknown.


I don't know exactly but I have some ideas. I tried to recreate the problem and couldn't, but I created other problems and here's how I fixed them.

If I have a non-manifold mesh (meaning the bottom of the fretboard doesn't have a face, just the top and sides) and I unwrapped, it would unwrap the mesh into 2 pieces... even though I just added edge seams in the same places you did, along the 4 curved "short" edges. And, I got stretching for no reason. https://i.imgur.com/GJlvNxP.jpg
Just as a guess I tried recalculate normals, and it shows the stretching is worse?? https://i.imgur.com/ElknAqI.jpg
So I decided maybe the missing face is the problem. I added a face to the bottom, and added edge seams to 3 out of 4 edges so that everything would stay attached in the UV editor as 1 piece. The stretching is gone, but it's still two pieces, wtf? https://i.imgur.com/PpWyCpE.jpg
Next I figured the problem must be the seams, so I cleared them and carefully added them again in the same places. Almost correct, but 1 small piece is still detached, and it does NOT have seams on all 4 sides. ... hrm. https://i.imgur.com/kU9N4sU.jpg
Finally, I figure out there's an extra vertex somewhere that I didn't want. I did mesh - clean up - remove doubles. This removed the 1 vertex. When I unwrapped again, it's perfect. https://i.imgur.com/92dwf8e.jpg

I think a hidden extra vertex can create this stretch problem... the mesh is attached to it, but you don't see it, because it overlaps some other vertex that it separated from without problems, due to the edge seams you created.

So my advice is... make sure the mesh doesn't have missing faces. Clean up any extra points or edges or doubles. Recalculate normals. Confirm cuts are in the correct place, then unwrap again. Hopefully one of those ideas fixes it.


Edit - After reviewing comments it was just a weird occurance that I cannot re-create. Multi-ressing a cube and than sculpting it works just fine!


Cycles SSS Rendered image has a strange "noise" coloring artifacts

This is caused by Blender trying very hard to render slight amounts of each shader. I.e. if you have a small amount of subsurfacing, and a whole lot of glass being shaded, it will be harder to render than an equal amount of both. Even trickier, if you have a large complex node setup with many different shaders mixed in.

My advice to fix this problem, if you want to keep the subsurface low, would be to increase your samplings for rendering by a large amount. Increase the rendering samples by about 100 per render, until you find a good amount. If that doesn't work, then you will have to either lower the denoising strength, which is what actually causes those spots to appear, or increase the subsurface strength.


How to find the number of loose parts with Blender's Python API?

Recursive Bmesh version

Similarly to the way  other bmesh operators, BMesh.Ops are used,

get_islands(bm, verts=[])

bm the bmesh.
verts  iterarable of any or all of the verts in the bmesh.
 returns -> dict(islands=[])

A dictionary is returned with each island as a list of BMVerts, within  the "islands" key list.

It's Quick
Uses BMVert.tag so doesn't naff up prior selections.
Works in both edit and object mode
Requires no operators.

.
Test code: Run in object mode, checks for all islands in all meshes in file.

import bpy
import bmesh

def walk_island(vert):
    ''' walk all un-tagged linked verts '''
    vert.tag = True
    yield(vert)
    linked_verts = [e.other_vert(vert) for e in vert.link_edges
            if not e.other_vert(vert).tag]

    for v in linked_verts:
        if v.tag:
            continue
        yield from walk_island(v)

def get_islands(bm, verts=[]):
    def tag(verts, switch):
        for v in verts:
            v.tag = switch
    tag(bm.verts, True)
    tag(verts, False)
    ret = {"islands" : []}
    verts = set(verts)
    while verts:
        v = verts.pop()
        verts.add(v)
        island = set(walk_island(v))
        ret["islands"].append(list(island))
        tag(island, False) # remove tag = True
        verts -= island
    return ret

#test code
context = bpy.context
ob = context.object
me = ob.data
bm = bmesh.new()
from time import time
t = time()
for me in bpy.data.meshes:
    bm.from_mesh(me)
    islands = [island for island in get_islands(bm, verts=bm.verts)["islands"]]
    print(me.name, "Islands:", len(islands))
    print([len(i) for i in islands])
    bm.clear()

bm.free()
print(len(bpy.data.meshes), "meshes processed in", time() - t, "seconds")

Given the new answers, thought I'd time them.  Simple 10 x 10 x 10 applied array on default cube.

This

Cube Islands: 1000
0.0809781551361084 seconds

@Денис Колесников

1000
0.11966490745544434

@lemon

islands 1000
0.18735790252685547

@zebus_3d  (note leaves the object in edit mode)

# by faces
total islands:  1000
total time (seconds):  6.521913093005423
# by verts
total islands:  1000
total time (seconds):  10.745814517998951

JakeD

1000
18.090813398361206  seconds


How would you go about reading a .blend file? I mean all of a .blend file, not just the .obj information

One way is to use Blender's bpy python module.

import bpy
dir(bpy.data)

As you will see from the output, you can access everything from object data to materials to screen layout. Here is the API for BPY.

The bpy module is typically built into Blender, but there are ways to compile it into a standalone Python module that you can load from a regular python file.

Someone has also taken the effort to write and open source a .blend reader in Java here http://homac.cakelab.org/projects/JavaBlend/index.html.


The best way to go about doing this (that I know of at least) is actually very close to what you are doing already. There are a few minor (but important) differences though.

First, we will have to enable vertex snapping, and we can leave it at the default setting of Closest.

Next, we will need to go into edit mode, select your entire building, and hover your mouse over a vertex that will line up exactly with a vertex in your terrain. A corner is a good choice for this.

Then, with the mouse hovering over the corner vertex, move the building while holding Ctrl  and move your mouse over to the corresponding vertex in the hole in the terrain. The building should snap to this vertex. This is exactly how the Closest setting is supposed to work: the closest vertex to your mouse on object 1 will snap to the closest vertex to your mouse on object 2.

Now you can confirm that operation. Select just this corner vertex on your building now, and set the Cursor to Selected from the ShiftS menu. Set the pivot point to be the 3D cursor using ..

Select the entire building once again, and pick another vertex on the building that will exactly line up with another vertex in the terrain. The opposite corner is a good choice, or something similar. All that matters is that there is a corresponding vertex in the hole in the terrain.

Hover your mouse over that vertex, scale the building, and move your mouse to the corresponding vertex in the hole and the building should snap exactly to the hole.

Since we've done all the transformations in edit mode, you may want to re-position the origin of the building in object mode just to keep things organized (Ctrl+Shift+Alt+C and choose Origin to Geometry).


After adding Subsurf modifier, some UV is distorted

Using subsurface modifier will not 100% guarantee that has perfect uv result. I already told in comment, however if you want to add more geometry after finish modeling, should be careful to not messing up the UV to watch carefully while adding additional geometry.

This especially messing up that adding more edges in curved geometry, so it's just better to remap your UV to new Geometry.

If you using Substance Painter for creating texture, don't be afraid, the program will automatically repaint all your previous works even the geometry and UV's are changed(but not 100%).


Getting an outline with backface culling blender render

The way they achieve the outline in the show rwby is unique in that it is not rendered at all.
They use what are called "playblasts" which is a feature in maya where the animation is recorded in real time and not rendered. This is why yours is not coming out right the outline will only appear in the texture view of blender. I like to animate in this style because you can have good looking low poly character but anyway how you achieve this is:

copy object in object mode
scale the object up slightly and while in edit mode press w and select flip normals(this will cause only the inside faces to show)
give the main object a skin color and make sure the shadeless option is selected
give the outline mesh a black shadeless color and adjust in edit mode where needed

It will not come out in rendered view and will only show in texture view (still pretty cool though)


How to join or articulate a group of bones?

My approach would be to have one bone as root to move the whole thing around, a second bone is then attached to the arm to control lifting it up. I placed a Limit Rotation constraint on this so that it can only be moved within a reasonable range of motion.

For the hydraulics lifting the arm, I have two empties (shown as circles), one is parented to the arm, the other to the main chassis. A cylinder is then made as a child of each with a TrackTo constraint that keeps it pointed at the opposing empty.

As the arm is raised and lowered, these piston pieces imitate the hydraulic piston.

The bone for the "pivot" arm that is used to rotate the bucket is simply an unconnected child of the arm bone, again I have a Limit Rotation constraint to keep it sane.

For the bucket I have another unconnected bone that is also a child of the arm bone. To this I have added a Transformation constraint. While this constraint can be hard to grasp, it takes an input transform and maps it to the output transform, the input and output do not have to be the same type or axis, but in this case I use it to vary the ratio of movement. A little experimenting and I found moving the pivot bone between 20 and -20 degrees and having the bucket to move between -28 and 28 degress gives a close to static length in the connection between the pivot arm and the bucket. Note that I inverted the angle values so that the rotation happens in the opposite direction.

Similar to the arm hydraulics I have a cylinder with a TrackTo constraint, but here I only have the one.

With this setup you animate the main arm bone to raise and lower the whole mechanism and animate the pivot arm bone to adjust the bucket position.

I have parented the various parts to the bones, the same constraints could be applied directly to objects without using an armature.


How much space does Blender take up on a computer?

Taken from https://www.blender.org/download/requirements/

Blender 2.66a - Needs about 186Mb of harddrive space
Blender 2.78b - Needs about 330Mb of harddrive space
Blender 2.83< - Needs about 395Mb of harddrive space

Minimum (basic usage) hardware
32-bit dual core 2Ghz
CPU with SSE2 support.
2 GB RAM Physical Ram
24 bits 1280×768 display
Mouse or trackpad
OpenGL 2.1 compatible graphics with 512 MB RAM

Recommended hardware
64-bit quad core CPU
8 GB RAM Physical Ram
Full HD display with 24 bit color
Three button mouse
OpenGL 3.2 compatible graphics with 2 GB RAM

Optimal (production-grade) hardware
64-bit eight core CPU
16 GB RAM Physical Ram
Two full HD displays with 24 bit color
Three button mouse and graphics tablet
Dual OpenGL 3.2 compatible graphics cards with 4 GB RAM

For Your reference My Production system Built...
Windows 10 64bit
Asus COG8580 i73770K 3.5GHz 4 Core 8 Logical Processor
16GB Ram Physical Ram
2 X Eizo Screens
Basic 3 button wired Logitech mouse
Nvidia GTX970 + Nvidia GTX680 (Dual Graphics)
2 X Solid state drives 260GB + 120GB
1 X SATA 1TB drive

For learning purposes blender should run just fine with any system that isn't too old to begin with. If you are having problem I do suggest installing an earlier build since those versions are less intensive and a learning tool before investing on a more appropriate system.


How to set driver distance max and min influence?

Here's the magic formula for the driver:

1.0 if (var <= 0.0) else 0.0 if (var >= <maxval>) else (<maxval>-var) / (<maxval>)

So if I want my max value to be 5.0, then the formula would look like this.

1.0 if (var <= 0.0) else 0.0 if (var >= 5.0) else (5-var) / (5)


Why isn't the perspective/focal length correct in this camera track?

Delete the trackers with errors (like the one that tracks a reflection in the window, and one that has only one keyframe).
Then set origin, X and Y, and solve again.
Set the tracking scene again.
You can always fine tune placement manually by grabbing any of the tracking markers and moving them so that they align with the grid (presuming of course that the house is really square, which most of them are not). Keep in mind that the camera solve is a constraint, so moving one element will move everything, including the camera, so there is no danger of having any of the tracked elements be misplaced relative to the camera.

Try to line up markers that belong in the same axis (like a wall, for example).
Then just get a cube in there and try to match the features. Start with the edge of the wall that is closest to the camera, then start moving faces to get the height, width and length.
With a minimum of guesswork and re-orienting the markers manually, will get your camera and geometry in the correct place.
For more detail read:
How to align the camera in a solved motion tracked scene?


Is it possible to convert movement animation of the floating object into animation keys?

Yes, it is possible! :) You can use the "Bake action"!

If you have an ocean, and an object that "floats" on the surface of the ocean using the method, described in this tutorial (https://www.youtube.com/watch?v=11F1NRpqrzY)

do the following:

1) Select a floating object

2) Press T and in the left pane, select the tab "Animation"

3) Press Bake Action, select the frame range and check "clear constraints"

4) Voila! You will see a lot of yellow strips in the timeline - the key frames of animation.

Now, if you delete the ocean and sphere by which you drew in the dynamic Paint mode, floating object will continue to move as before.


Strange face transparency artifacts in Eevee

You have an Alpha sorting issue. (Z fighting) When you have an Alpha channel in your texture the renderer has problems sorting which face is closest to the camera (or viewer).

This can be corrected if you tell the renderer to ignore Transparency or Backfaces.

First screenshot shows your present alpha Blend Mode :

You have a choice, either set the Blend Mode to Opaque :

or deselect the option Show Backface :

Third option create a new material and assign that to your model. The default settings work as is.

BTW. Your model also shows Alpha sorting issues in Cycles (and Eevee, when Viewport Shading is set to Material View.


Object being distorted when fixing lighting

When dealing with sculpting it's very important to check whether your model doesn't have any flipped normals before adding Multires modifier (if you flip them after subdivided and sculpted, recalculating shouldn't make any problems. But making any changes in Edit mode on the sculpted model anyway will make you some distortions). You still can recalculate them at any time, but that will result in a mess you see in your case (or even worse).

There are several ways possible taking into account that sculpting must be saved:

Smoothing faces with flipped normals

Enter Edit mode of the corrupted object, select faces with flipped normals and assign them to temporar Vertex Group.
Add Smooth modifier to this object, set created vertex group in the Vertex Group option of the modifier to make it influence only on it.
Set the Repeat value to something high, like 30 or 50, so to make messy vertices return to their place.
Recalculate flipped normals using Ctrl+N.

The Smooth modifier will let you make those faces / vertices stop being distorted and moved far away, at the same time the original sculpting in other areas will be preserved.

This way has disadvantages, of course:

if there are a lot of faces with flipped normals it won't really help you - nearly all faces will be added to group smoothed by the Smooth modifier and that will be the same as just using Smooth brush in Sculpt mode or recreating from scratch all the sculpt.

Leaving inverted normals

It's pretty straightforward - the inverted normals are left as they are, and you continue sculpting, including them if needed. You'll need to recalculate normals after applying Multires modifier (and probably make some adjustments even then).

The trick here will be that as the normals are flipped, the brushes will behave in the opposite way, so on these faces you'll need to use Subtract mode of any brush.

The disadvantages:

It may be quite complex to create any smooth transitions on the areas where flipped / unflipped faces meet as brush may act somewhat unpredictably.

Smoothing in Sculpt mode

It should be possible to see messed vertices while in Sculpt mode (but I managed once to see them only while in Object mode), and it's possible to smooth them using Smooth brush (press S while in Sculpt mode). Probably it won't be easy to smoothen with brush exactly tjose distorted areas, but it may be worth trying if there isn't big amount of them.

So it's a lot easier to check that there aren't any flipped normals in the model before you add sculpting then to deal with repairing that after and trying to preserve hours of sculpting work.


Is there anyway to match a sun lamp to the direction of the sun in an environment map?

If the sun is clearly visible in the HDR, you can put a camera at scene origin, look around in rendered viewport mode and locate it.

If the sun is hard to locate precisely, you need to put a sun clock into the scene: put a vertical pole into the scene and measure the angle and distance of the shadow. Then you know where the sun is and how best to match the shadow.

It will work for sunny HDRs with clear shadows the best. Also to get accurate shadows from HDR use environment setup like this.

For diffused shadow HDRs you will have to guess where the center of shadow is and how long it is, and substitude sun lamp for a point/spot lamp with some size. You can get the distance-size ratio from how the penumbra of the shadow looks:


This is a bit of a duplicate of this question, but just to complete the picture, to get the global location of your pose bone, you need to multiply the bone's location by the armature and the bone's transform matrices (sounds complicated, but is actually simple):

p = bpy.context.active_pose_bone  # Our pose bone
o = bpy.context.object            # Our armature object
global_location = o.matrix_world * p.matrix * p.location


Blender 2.8 - Is there a way to retrace or resample the whole scene?

Are you on a Mac? This is a bug in the current MacOS build of Blender 2.8:

https://developer.blender.org/T616411

A workaround is to make another change and then undo it by pressing ctrl+z


You can  use the outliner to choose groups and then hit the + to select the object in the group.

One of the best settings I ever changed in Blender was having a double RT Click automatically select the group. No need to Shift + G or anything.


Assign Material Slot to no material via python

Its as easy as bpy.context.object.data.materials[0] = None. Check this answer How to assign a new material to an object in the scene from Python? to see why and how it works.


How can I extrude all faces evenly and scale faces inwards separately?

i  to inset, i to toggle individual, Alt + S to move along normal


All you have to do is ray cast in the direction of the lamp starting from the vertices locations and use the points of intersection as the new vertices locations.

The foregoing example showed an orthogonal projection, another kind of projection would choose the ray direction based on the vertices locations as follows.


Can't extrude edges with individual origins

Perhaps the Edge Slide tool is better suited for this.

Select the edge and use the Edge Slide tool
Press C to disable Clamp and slide it outwards
Done.

(The yellow guides appear when you press C (disable clamp))


In the latest 2.79 daily build, is it possible to convert the Bevel node's RGB normal maps to BW edge highlighters?

Final result and node setup:

After many tryouts with complicated setups it seems that this effect could be easily achieved by using Vector Math > Cross Product from Bevel > Normal output and Texture Coordinates > Normals.

After this the most efficient way is to use Color Ramp to change softness/sharpness of the edges.


Those aren't Normals, those are Doubles
Just select "Remove Doubles" in mesh options (W)


Poly Curves and Bevel Object

You could try to take advantage of curves instead of meshes.

This way you'll just have to control the cylinder main axis with two control points for each connection, you don't have to worry about the deformation because the cylinder is being built automatically and it's much easier to change the section size/shape.

To set up the curve like in the shown image sequence, choose a "Poly" Spline type once in edit mode and fill the Bevel Object field with the wanted section shape (in my case the little black bezier circle you can see near the origin).

Note: it's not your case, but if needed the cylinder ends can be capped by enabling the Fill Caps option in the Geometry panel of the Curve tab.


Blender can't open blend file using Append. Says "Listing Dirs..." but does nothing

Sounds like a bad blend file.

You mentioned having purchased it, so I am assuming you downloaded it from some kind of online store, right? Have your tried downloading it again, file might be incomplete or have become somehow corrupted.

Is the file very big, does it contain a lot of images (like say textures for the trees or something) or very big meshes? It might just take a while to load all information.

Can you open the file directly?


Your mesh is displaying dots along some of the edges. There are quite a few in the video, I marked a few below. These are actually face centres and show that there are hidden faces:

In edit mode select everything and choose W> Remove Doubles and this should get rid of the extra faces by merging close vertices.
From the blend file you supplied I also found many internal faces:

These need to be deleted (X> Faces). You can then also use Ctrl+N to recalculate normals to make sure all your faces are pointing the right way
 before unwrapping again.


In camera tracking how do i figure out the settings for the cannon 6d

Optical center should be the center of your image height/2 , width/2 ,  unless you have cropped the image. Then it should be the original center of your image. There is button for this labeled center. This is relevant to accounting for lens distortion.  The

Pixel aspect ratio should be one unless you used something like an anamorphic lens, which stretches the pixels when the image distortion is countered in post.


You should align the orientation of your bones in Edit mode with some CtrlR + angle value (I don't know why, technically, it makes it bug when non-aligned though):


Hiding transform panel from 3D view properties 'UI' Panel from user?

I use this to draw it in the tool shelve

class ObjectTransformation(bpy.types.Panel):
    bl_label = "Transformation"
    bl_idname = "Transformation"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Modeling Toolbox"

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.column().prop(obj, "location")
        row.column().prop(obj, "rotation_euler", text="Rotation")
        row.column().prop(obj, "scale")
        row = layout.row()
        #Calls the CTRL A menu
        #row.operator("wm.call_menu", text="Apply Tans").name="VIEW3D_MT_object_apply"
        row.operator("object.transform_apply", text="Apply Rot").rotation=True
        row.operator("object.transform_apply", text="Apply Scale").scale=True
        row = layout.row()
        row.column().prop(obj, "dimensions")


bpy remove duplicate images (.001 .002 .003 etc.)

img.name=img.name[:-4] is renaming the image to match the original image name, as this name already exists a numeric suffix is added to the other image with that name, which just undoes the change.
You need to go through your material nodes and get each image node to use the same image.
for mat in bpy.data.materials:
    if mat.node_tree:
        for n in mat.node_tree.nodes:
            if n.type == 'TEX_IMAGE':
                if n.image is None:
                    print(mat.name,'has an image node with no image')
                elif n.image.name[-3:].isdigit():
                    n.image = bpy.data.images[n.image.name[:-4]]

Note that the last line doesn't just change the name used, it changes the image data block that the image node is linked to.
Once you have removed the users of the duplicate images they will be removed after you save and re-open the file.


glTF export has twice the vertices it should

glTF is a last-mile format.  It stores its mesh data in a ready-to-load-onto-the-GPU kind of state.

But the graphics hardware doesn't want the same vertices that artists want to see in Blender.  At the hardware level, there are "vertex attributes" for things like normal vectors, UV coordinates, etc., that must be specified per-vertex, not per-face.  Likewise, quads and N-gons are not welcome at the hardware rasterization layer of many devices, including mobile devices, which generally accept only triangles at that layer.

So a finished, exported glTF will be fully triangulated, with all discontinuous UVs and all discontinuous normals separated into co-located vertices.  This way, when the glTF arrives on a client device for rendering, it should not require the client to spend much in the way of cycles or battery power processing the raw mesh data.  It should just load into the local graphics API and render immediately.

This does mean that if you load one back into Blender though, you'll end up with these un-merged verts, and any faces that weren't triangles will be cut into multiple faces.


Texture paint without affecting other object with same texture/material

Select 'Face Selection Masking' from the icon on the view header just to the left of the layer dialogue and that will limit by selection in the Texture Paint mode. You can make use of Vertex Groups here to go back and forth with selections, or you can use the 'L' key to select linked mesh while still in texture paint mode.

edit: If the image area falls under the same as another part, then the shared pixels will show no matter what. Your uv map has to give separate space for all mesh parts similar to Smart Unwrap in order to keep from painting two areas at once in the mapping.


How do I create a physics interaction followed by an explosion (that continues the physics)?

From OP is not clear if Explosion Modifier is requirement or you just went the way you know.

version Fracture Modifier
Primarily designed for this was Fracture Modifier (non destructive), but it is not included in recent official experimental builds. One build I found in early 2.80 version on Graphical.org so you can check.

In this example

Rigid Body set to all three objects (as you did)
Sphere increased to 10 kg
Cube - Fracture Physics Properties enabled Constraints with Breaking lowered to 0,5

With additional setup you can achieve explosion effect as well.

version Cell Fracture
Similarly you can achieve it with destructive way Cell Fracture add-on to generate shards + add Rigid Body, but with more manual setup. Destructive means - once generated you would have to care about a bunch of objects (sure they can be placed in one collection). In this example they are generated from Particle system, but you can use GreacePencil to draw breaks in your style.

In this example

add Particle System to Cube (Emit from Volume)
search for Cell Fracture (after you enable it User Preferences > Add-ons of course (usually useful to set some low Margin like 0.001, that creates gaps between shards so its more stable in later Rigid Body sim.)
Move Shards to Collection so its easier to manipulate with them or parent them to Empty
select Shards (with one active) and search for Rigid Body > Add Active
for explosion you don't need Constraints between shards, so I just animated Dynamic checkbox by keyframes (OFF/ON) on frame 45 under Physics Properties > Rigid Body > Settings panel (I just could not find how to do for all shards at once ... hm)
to let shards explode I used another Icosphere in center of shards as Collider Rigid Body – Static with animated Scale (and disable from visibility)

Note: When Cell Fracture was in golden age of 2.79 there was an another add-on Constraint Builder that generates connections between shards with breakability. But I didnt find any similar for 2.8x


Angle measurement shows only integer values, is it possible to increase the precision

The shipped add-on MeasureIt Tools allows you to set precision:


Check your prefs in the systems tab. This is just the default viewport lighting. You can change it. It does not effect your renderings.


How to move a complex object to the origin without destroying it?

Go into edit mode, select all and press Shift-S and Cursor to selected.

Then go back to object mode, press Ctrl-Alt-Shift-C, Origin to cursor, and then press Alt-G (clear location).


Can i use a "Image texture" node as a "colorramp" node?

Sure.  If you have an image describing some gradient, you can use a texture lookup in the exact same way you'd use a colorramp:

This technique is actually pretty common with some old game techniques.


Unintended movement when animating a character in blender!

While playing with the scene I learned how to fix the unintended movement! Go to the outliner and delete the animation data there, then start setting new key frames and everything animates as intended, no extra parts are moving around!
Hope this is helpful to anybody else who encounters a similar situation.


Images as emitters constantly come out dull. White emission not actually white. What am I doing wrong?

Set the color management as standard instead of filmic, and read this answer for detailed infos.

Render with a wider dynamic range in cycles to produce photorealistic looking images


Is it possible to simulate an adjustable lamp's limbs using armatures/bones?

@sambler provided a link to a tutorial by Jonathan Williamson of Blender Cookie. (Thankyou)   The part where the bucket connects to the rest of the arm contains similar mechanics to what I'm looking for.  By following that part of the tutorial I've used the 'track to' constraint and I think this will work.

http://youtu.be/r-V8ihRUsTE

Screencast keys have been removed from blender 2.73 (rc at least)

So I used edit mode to extrude one extra small bone.  ctrl-d (copy) to copy the large bone (in edit mode so it's part of the same group of bones)   then ctrl-shift-c to bring up the menu where I choose 'track to'    then in the bone constraints menu change the head/tail value to 1.


How can i feed the output of the Dynamic Paint into the input of the Wireframe Node?

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

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

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

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

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

This can produce the following results :

Blend file attached


Run multiple Python scripts in Blender from the command-line

You can have multiple --python tags. For example:

blender --background --python script1.py --python script2.py

This will execute the scripts in the order they are added in the command above. Add as many --python arguments as you need (there is no limit on the number of scripts you can run).


You could do it this way:

Select the edges and bevel:

Enable the Transform Pivot Point > Individual Origins option, select the front faces and press AltE > Extrude Faces Along Normals, in the Operator box enable the Offset Even option:

Enable the Proportional Editing option/Connected Only and give some corrections in Edit mode:


When I swich scenes in blender game my scene gets darker

Make sure both scenes have the same settings (e.g. Shading Material Mode: MultiTexture/GLSL). The BGE will use the settings of the startup scene throughout the whole game.


Why does refraction + volume scatter cause a much darker result?

Solution

Set Properties panel / Scene / Bounces / Volume value to at least one.

Explanation

Probably your volume bounces is set to zero because it is the default setting. That means only direct lighting on volumes are allowed, however caustics¹ are not. The same goes for the diffuse bounces value: If you set it to zero, caustics will not be present² and the perfectly transparent refractive object will cast shadow.

¹ Caustics is actually simply indirect lighting, but is handled specially due to its noisy nature.

² No recursive indirect sampling (also known as bounce, hence zero bounce) allowed.

Alternative Solution

You could also disable shadow casting on the refractive object and leave the volume bounces zero. The result will have less noise, but will lack proper caustical shadows. Or you could set up fake caustics like this one: https://urchn.org/post/fake-caustics-in-cycles


How does Blender decide in which window it shows the render

By default it picks the largest area, unless an image editor already exists.

You can alter this behavior by setting the Display option in the render settings:

Keep UI

Does not change the UI. The render will not be automatically shown.
New Window

Opens a separate window containing only an image editor  showing the render.
Image Editor (default)

Renders into an image editor. Turns the largest area into an image editor if one doesn't exist.
Full Screen

Replaces the UI with a full screen image editor showing the render.


How to get rid of white and black border on PNG

Blender's 3D view has some problems compositing planes with alpha in OpenGL mode. You can mitigate those effects to some extent (by changing the alpha clipping in the preferences or the different viewport alpha settings in material properties) but don't expect to have a perfect compositing of RGBA texture in the viewer, as Z compositing and Alpha compositing sometimes fight each other when selections are involved.

Render should turn out ok. If it doesn't, then there is a problem with your PNG images (wrong alpha association).

Wrong alpha association could be fixable (using the CM panel of the Image viewer if it) ONLY if the halos are the result of an incorrect alpha interpretation. If the image is encoded incorrectly, then there is no way to solve it, other than recreating the image textures properly.

Blender usually interprets PNG textures correctly if they are properly encoded, so check with a test render first. If it renders ok, and the halos pop up and disappear based on what's selected, then it's just the problem described first and you can't do really much about it other than trying to mitigate it as much as possible (which is probably a waste of time since it doesn't affect rendering)


Dark conical shape appeared in solid view clipping display of objects

By accident you set View Clipping Border with Alt+B shortcut, to disable it hit Alt+B again.


there's nothing wrong, and actually you can look inside of those objects. your lamp (probably a sunlamp) is directly above your scene and lights everything inside of the objects in the same way. so there are no shadows or reflections that would indicate holes in the cups. try repositioning your lamp if the look bothers you.

Edit:
Don't feel like a fool. perpendicular light always looks a bit odd.
Take this image for example. It's taken on the equator at noon. Looks like a computer game from the early 2000s.


Hide by axis in the Graph Editor (multiple objects)

i am using 2.8 but i believe it's the same in 2.79 , in the graph editor you'll find magnifier with filed string called "f-curve live filtering string" type there what they called  like "X Location or just X Loc" etc and you'll get only the axis you want...u can see on the side how the string is written like rotation is Euler, type that and you'll get only the rotation of all objects...etc :)


This is because the models were transformed in world space (Object mode) in Blender. To fix, you need to make everything have a common origin or space by resetting their transforms to 1. Otherwise whatever package imports these will try to fit it into their world using said transforms. To fix, simply apply the rotation and scale and maybe even the location as well with Ctrl + A.

Related Animated mesh has incorrect transforms when exported to Unity


Apply Transformation Matrix to Existing Mesh

Mesh.transform

import bpy
from mathutils import Matrix

ob = bpy.context.object
me = ob.data

M = Matrix(((1, 0, 0, 0),
     (0, 0.707, 0.707, 0),
     (0, -0.707, 0.707, 0),
     (1, 0, 0, 1)))

me.transform(M)
me.update()


Loading an image to a texture from a python script file

Blender v2.79
Load image to texture:
bpy.ops.image.open(filepath='full_path_to/your_image.png')
bpy.data.images['your_image.png'].pack(as_png=True) # Pack an image as embedded data into the .blend file
ui_tex.image = bpy.data.images['your_image.png']

Don't forget to replace 'full_path_to/your_image.png' to your own values.
EDIT:
I think this method is easier, you simply load the node, given its name and then set the path:
im_node = scene.node_tree.nodes["Image"]
im_node.image.filepath = 'full_path_to/your_image.png'


In order to edit an object, you must be in Edit mode.

You can set the mode in 3D view > Header, or by pressing ↹ Tab:


Double-click "g" not working as expected

While you're waiting for an answer, you can try using Shift + V. That's an alternative hotkey to slide edges in Blender 2.79.


There is a hidden cube (Arm.Hand.Target) and a hidden sphere (Arm.Elbow.Target) in your scene, which are blocking the camera.

Rendered shading in BI doesn't work quite the same as in cycles, the render visibility setting (camera icon in the outliner) is used in the viewport when in rendered view.


How do I align a component to another like in maya or max?

To anyone experiencing the same issue as I did: enable vertex snap, then drag your vertex along the desired axis while aiming your cursor at the target vertex.


No shadows cast/shown in viewport Material View for Blender Cycles

Blender does not currently support Shading in the Material Viewport while in cycles. (I'm only reposting this as the answer so you can mark this post as resolved by clicking the green check mark)


I believe that's how Sketchfab works -- the model comes in without the texture and you have to add it back in manually within Sketchfab's interface. Of course, if you're using a Cycles procedural material, that will be lost as well and you'll have to try and replicate it within Sketchfab.


I do not know that a mesh can have more than one item for users_collection.  Assuming not then this works.

def shouldBeCulled(self, object):
    collectionName = object.users_collection[0].name
    return self.collectionExcluded(bpy.context.window.view_layer.layer_collection, collectionName)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def collectionExcluded(self, viewLayer, collectionName):
    print('looking for ' + collectionName + ' in ' + viewLayer.name)
    if collectionName == viewLayer.name:
        return viewLayer.exclude

    for childViewLayers in viewLayer.children:
        result = self.collectionExcluded(childViewLayers, collectionName)
        if result is not None:
            print('result for ' + collectionName + ' is ' + str(result))
            return result

    return None


Is there way to make an object gravitate or lock to the surface of another object?

As far as I know, there is no way to specify the force of gravity per object. However, in world settings, you can set the global gravity to 0, and then you can apply whatever forces are actually required (to simulate desired gravity effects) via python.

For example, if I wanted to attract physics-enabled objects to the faces of a cube, I could do it with the following script, running on that cube:

def apply(cont):
    cube = cont.owner
    for o in cube.scene.objects:
        normal = o.rayCast(cube, o)[2]
        if not normal: continue
        g = -normal * 9.8
        o.applyForce(g)

As you can see,  I iterate over all objects in the scene, and I cast a ray from the object to the cube, in order to get the normal vector of the intersected face, which, when negated, represents the direction of the desired force I wish to apply.

After that, it's just a matter of scaling that vector, and passing it to applyForce.

Here's a .blend that shows this script in action: custom_gravity.blend


You should have added that picture; I'll bet a hundred would know in a second. It's the inside of the glove poking the wrong way. It's weight is too strong and possibly to the wrong bone. It's outpacing the outside of the glove (assuming it's a glove specifically) and moving faster than the positive-facing normals. That gray strange color is the dead giveaway; those normals are flipped and display like that when you haven't enabled 2-sided. (I'm glad you didn't enable 2-sided or it wouldn't show up so clearly.)

Less weight will reduce your swelling. That will keep the gap between outside and inside from inverting. Depending on your needs, you might paint that portion to another bone? I understand the problem but can't tell you the perfect solution for you.


Remove F-Curve Modifier from all selected keys in Graph Editor

You can remove it the same way you applied it
Go into the Graph Editor and select the keyframes that you wish to loop over (over their respective time period), press Shift + E, and select "Clear Cyclic (F-modifier)".
hope it helps somebody else (I just needed it myself)


What do the preferences keyframing options actually mean?

Auto Keyframing:
Enable it and create a new scene, add a cube for example, then move the cube, scroll to a different frame on the timeline, and move the cube again. Keyframes will automatically be created for the transformations (inserts a LocRotScale group if you e.g. use G to translate the object).
You can find the same toggle in the timeline header (icon only, red circle).
Show Auto Keying Warning:
If Auto Keyframing is active, a notice will appear in the upper-right corner of the 3D View during transformations, to inform/remind the user, that new keyframes are going to be added (if one confirms the transformation).
Only Insert Available:
Keyframes will be added to existing F-Curves only, and no new groups are implicitly created for you. So manually keyframe e.g. Location once, then change time and move the object around. Keyframes will be created for its translation, but not for rotation or scale, because rotation and scale don't have keyframes / F-Curves yet.
Visual Keying:
From blender wiki:

  This is to be used with objects or bones that have
  certain constraints that can affect the key values. For example,
  setting a key on an object with a Copy Location constraint would
  normally set the key for it’s unconstrained location. Enabling this
  option causes the key to be set for the constrained location.

Only Insert Needed:

  Will add keys only when needed (i.e. only to F-Curves controlling
  properties that are changing).

For completeness: the documentation on Timeline has more detailed information.


Object disappearing whenever it's not selected

Just figured it out. Somehow I ended up duplicating all vertices for that mesh, which caused rendering issues apparently. Removing duplicates fixes it.


Some technics to do that (I won't make here the exact same bottle...):

Knife cut

The cut is straight, but the result is parabolic due to the bottle shape.

Knife project

Again a curved shape obtained from a flat curve.

Create a cutting shape (here a plane)
Scale/orientate it
Shift select the bottle and enter edit mode in the bottle (both are selected and that indicates to Blender which shape(s) will cut the bottle)
Use 'knife project'
In your situation, make sure that 'cut through' is checked

Beveling

In edge selection mode
Select the wanted edge loops
Use CtrlB
Choose bevel depth with Numpad + and Numpad -

Once done, give a shape, for instance selecting the two face loops as below and scale them:

Draw it flat and bend the shape

Use a mirror to make so the future cutting lines will match
Add a simple deform modifier to bend the shape to 360°
Make the cuts/bevels as previously
Apply the modifiers and remove doubles when the shape is as you want
Add a subsurface modifier
Scale and merge (or extrude and model) the shape to fit your bottle


How to write __annotations__ (scene property) in new scene?

Free you mind and think simple: new_scene.scene_prop.my_bool = first_scene.scene_prop.my_bool

If however you need to batch-set properties from a list of strings, like the __annotations__.keys() method returns, you can use Pythons setattr and getattr methods:

for s in first_scene.scene_prop.__annotations__.keys():
    setattr(new_scene.scene_prop, s, getattr(first_scene.scene_prop, s))

So in the end, your function from above could be turned into:

def my_function(self, context):
    first_scene = bpy.context.scene

    ### new scene creation comes before the loop:
    new_scene= bpy.data.scenes.new("New scene")
    context.window.scene = new_scene

    ### copy attributes from source to target scene:
    for key in first_scene.scene_prop.__annotations__.keys():
        source_attribute = getattr(first_scene.scene_prop, key)
        setattr(new_scene.scene_prop, key, source_attribute)


It seems you have added a curve modifier which will 'bend' the object along the curve.

What you want to do, is to go to the Constraints-panel and add a Follow Path constraint to the parent. From there you can tick Follow Curve and press Animate Path to make the train drive along the rail.


I actually solved the problem. I have now >30fps. The solution was the following:

Change

imageData = np.array(currentImage, dtype=np.uint8)

to

imageData = np.asarray(currentImage, dtype=np.uint8)

will let numpy try to get the values using the buffer protocol of numpy (maybe np.array will also do this, didn't check). For more informations about the buffer protocol: https://docs.python.org/3/c-api/buffer.html

Then I extended the source code of Blender by implementing the buffer protocol in the bgl.Buffer code. Now, the numpy call will access the buffer of the given buffer object.

The following lines will need to be inserted into the bgl.c source file:

static int itemsize_by_buffer_type(int buffer_type)
{
    if (buffer_type == GL_BYTE) return sizeof(GLbyte);
    if (buffer_type == GL_SHORT) return sizeof(GLshort);
    if (buffer_type == GL_INT) return sizeof(GLint);
    if (buffer_type == GL_FLOAT) return sizeof(GLfloat);
    return -1;  /* should never happen */
}

static const char *bp_format_from_buffer_type(int type)
{
    if (type == GL_BYTE) return "b";
    if (type == GL_SHORT) return "h";
    if (type == GL_INT) return "i";
    if (type == GL_FLOAT) return "f";
    return NULL;
}

static int BPy_Buffer_getbuffer(Buffer *self, Py_buffer *view, int flags)
{
    void* buffer = self->buf.asvoid;
    int itemsize = itemsize_by_buffer_type(self->type);
    // Number of entries in the buffer
    const unsigned long n = *self->dimensions;
    unsigned long length = itemsize * n;

if (PyBuffer_FillInfo(view, (PyObject *)self, buffer, length, false,     flags) == -1) {
        return -1;
    }

    view->itemsize = itemsize;
    view->format = (char*)bp_format_from_buffer_type(self->type);

    Py_ssize_t *shape = MEM_mallocN(sizeof(Py_ssize_t), __func__);
    shape[0] = n;
    view->shape = shape;

    return 0;
}

static void BPy_Buffer_releasebuffer(Buffer *UNUSED(self), Py_buffer *view)
{
    MEM_freeN(view->shape);
}

static PyBufferProcs BPy_Buffer_Buffer = {
    (getbufferproc)BPy_Buffer_getbuffer,
    (releasebufferproc)BPy_Buffer_releasebuffer,
};

Last, but not least, you need to change the following line:

/* Functions to access object as input/output buffer */
NULL,         /* PyBufferProcs *tp_as_buffer; */

into

/* Functions to access object as input/output buffer */
&BPy_Buffer_Buffer,         /* PyBufferProcs *tp_as_buffer; */

I also created a patch for that and I'll hope that this will make its way into a future version of Blender: https://developer.blender.org/D2734


[Few minutes later.]

That is the Grease Pencil Eraser.

Make sure there are no other inputs except for the mouse. In this case there was a graphics tablet with the pen in near proximity.


How to render world-space surface Normal maps using Blender Internal?

Create a "Normals" material using nodes:

Apply it to all objects. The Material Override option in Properties > Render Layers may be useful for this, but if you want to preserve transparency of existing materials you may have to tweak every material individually, ideally with python scripting:

I'd suggest making a node group containing the geometry node (so future tweaking is easier), connecting that group's output to the Color input of every material's output node, and setting the Alpha according to however you decide a material is transparent or not.  Here is an example of some node scripting, hopefully that helps.
Enable World Space Shading in Properties > Shading:

Render:


How do I get the selected object's distance from the camera?

To get the distance between two objects in the scene :

setup a driver with the following settings

type : Scripted Expression
expr : var

add new variable 'var' of type Distance
set the targets to the objects of interest
Now the driver value is the distance between these two object


What units are the hair particles' diameter are measured in?

Cycles hair particle size units, like most other settings in Blender are expressed in Blender scene units.

The Scaling parameter is the actual width of the hair in scene units. The confusion might stem from the fact that on top there are scaling factors applied that may induce doubt.

Setting a Scaling value to $1$ and leaving the Root at $1$ and Tip at $0$ will yield a hair particle of length $N$ (set in the length property at the top) that is exactly $1$ Blender unit wide at the root, and progress to zero width at the tip.

Tip and Root are scaling factors applied to the base Scaling property, having a root value of $0.5$ over a Scaling of $1$ will lead to a root of $0.5$ Blender units. Likewise having Tip at $0.2$ will yield a hair particle with $0.2$ BU at the end.

The Shape property will control how the width shape progresses from root to the tip.

Here we se a single hair particle with $1$ unit of lenghth applied over a $1\text{ x }1$ plane, and starting with a Scaling of $1$, Root of $1$ and Tip at $0$.


Why does knife project cut only one hole into a disc?

I got it to work by subdividing the target object a lot:

When the target was not subdivided, not all of the knife circles would cut, but once I subdivided, they all cut. I have no idea why though.
However, trying to get it to work on a cylinder is more difficult. The way I got around it was:

Add a circle mesh and set the Fill type to Triangle Fan:

Then when you do the knife projection, all the circles will cut:

Then you can extrude the cut circle into your cylinder


How to update compositing nodes via script?

Did you try to activate the composite node like this:

scene = bpy.context.scene
scene.node_tree.nodes.active = scene.node_tree.nodes['Your composite node']
scene.render.use_compositing = True


Part of object disappears when viewed through a transparent material

My guess their normals are pointing to the opposite direction. One solution is to add a solidify modifier to it, or check in double sided in object data. The second option is maybe better for performance.


it varies with render engine. Although with cycles this setup should give
basic variance

There's many more solutions


How must I adapt my workflow to work with Scene Referred Data?

I'm a little bit lost.

Don't be. Just learn a little bit at a time and build up your knowledge in smaller steps. We are all learning more at every moment.

I laughed at the red pill.

  But now, how and what must I change in my workflow to really benefit of working with scene referred data?

There isn't too much to get too swamped with too soon. Start by experimenting with how larger amounts of light influence your materials.

To do this, simply use an emission mesh with a wide dynamic range view transform. That is, if you are using the testing kit I put together for example, the -10-+6.5 view. You will need to set the emission strength quite high as compared to what you were using under the "Default" previously.

Typical questions and concerns are:

"It looks washed out!"
"How can I control the look?"

The reason the image looks 'washed out' is that it is mapping of scene referred values to the display referred domain, and there is a very wide range to map. To achieve this, a "shaper" or "perceptual quantizer" mapping happens. This is typically a 'flat' look in terms of an artistic sense. While not an aesthetic look for a final shot, it is a wonderful entry point to evaluate your data for a grade.

Once you have rendered out a simple shot, try grading it. I strongly recommend doing a simple, single node grade using the CDL node. It is in the Color Balance node. Simply change from the Lift, Gamma, Gain (which does not work with scene referred data) to ASC-CDL.

The reasons for this are many, and it is a forward looking tool to learn. It is also very easy to get to a pleasant looking shot simply by adjusting power up (1.5-2.5) and slightly adjusting the Slope downwards slightly. Remember that shift key can help you use the interactive sliders on the RGB values with small increments.

0.18 middle grey scene referred ends up mapped to 0.6 in the display referred -10-+6.5 view. You probably would want to grade this down a little, although that will happen naturally when you tweak the power and the slope.

  Is my hdr lighting well suited for that workflow?

HDR and IBL lighting is well suited for the workflow, assuming the HDRs are correct and have the proper range of values. This can be tricky to find good quality images. EXR are ideal.

  Must i have to throw all my rgb textures and only find exr ones?

Some textures will behave brokenly with proper light levels. This isn't because using a wide dynamic range broke them however, but rather that they were broken to start. If you are using an emission, then you must use scene referred imagery. Diffuse textures and such are not "colors" per se, but rather albedo values, which are a measurement of reflectance. Given that nothing reflects at 100% in the physical reality, diffuse textures of sRGB values 1.0 will likely lead to very strange results, for example.

There are a good number of very talented and wise people here, that you might be able to summon to help you learn. @jtheninja and @gez are two folks with good experience on materials for example.

Hope this helps. Take small steps and hopefully you will enjoy the results.

For the ones interested by the subject, check the Wide Dynamic Range post


Why (actually) does it take me so long to make 1000 cubes?

I followed the code from bpy.data.objects.new and will put this here.

Call Hierarchy

rna_Main_objects_new               /* called by python - bpy.data.objects.new */
    BKE_object_add_only_object     /* set default values for the object */
        BKE_libblock_alloc         /* allocate memory for the object */
            new_id                 /* name validation - fallback, not \0, utf8 */
                check_for_dupid    /* check for collisions and find new name*/
                    is_dupid       /* linear search for duplicate name */
                id_sort_by_name    /* sort list */

Links

rna_Main_objects_new
BKE_object_add_only_object
BKE_libblock_alloc
new_id
check_for_dupid
id_sort_by_name

Condensed body of new_id

bool new_id(ListBase *lb, ID *id, const char *tname)
{
    bool result;
    char name[MAX_ID_NAME - 2];

    BLI_strncpy(name, tname, sizeof(name));

    result = check_for_dupid(lb, id, name);
    strcpy(id->name + 2, name);

    /* however all data in blender should be sorted, not just duplicate names
     * sorting should not hurt, but noting just incase it alters the way other
     * functions work, so sort every time */

    id_sort_by_name(lb, id);

    return result;
}

Body of is_dupid called in check_for_dupid

static ID *is_dupid(ListBase *lb, ID *id, const char *name)
{
    ID *idtest = NULL;

    for (idtest = lb->first; idtest; idtest = idtest->next) {
        /* if idtest is not a lib */
        if (id != idtest && idtest->lib == NULL) {
            /* do not test alphabetic! */
            /* optimized */
            if (idtest->name[2] == name[0]) {
                /* STREQ - macro for strcmp */
                if (STREQ(name, idtest->name + 2)) break;
            }
        }
    }

    return idtest;
}

Body of id_sort_by_name

void id_sort_by_name(ListBase *lb, ID *id)
{
    ID *idtest;

    /* insert alphabetically */
    if (lb->first != lb->last) {
        BLI_remlink(lb, id);

        idtest = lb->first;
        while (idtest) {
            if (BLI_strcasecmp(idtest->name, id->name) > 0 ||
               (idtest->lib && !id->lib)) {
                BLI_insertlinkbefore(lb, idtest, id);
                break;
            }
            idtest = idtest->next;
        }
        /* as last */
        if (idtest == NULL) {
            BLI_addtail(lb, id);
        }
    }
}

So indeed blender checks for duplicates and furthermore removes the id from the list again and inserts it alphabetically.

You can't even trick it by choosing names in the right order C, B, A because is_dupid will search the full list regardless.

Though if you specify a non colliding name it exits check_for_dupid early and does not have to find a name on its own.

Additionally as others have mentioned you should not use operators unless you have to and only need to create the mesh once.


Rendering an animation then saving it as a video is black

The box called Sky has a Background shader. This shader is only meant for the world, and it is ignored on anything else. While the box is hidden from the vireport, it is still enabled during render, and it occludes the background light coming from the world. If I give it an Emission shader, I get this.

If I disable it altogether, I get this.

The sun lamp is a special type of light, that basically only gives a direction and a strength, and act like it is always outside the scene, regardless of where you actually put it, so even if it's located inside the Sky box, the box occludes its light. Take a look at Lamps in the Blender online manual.


Exporting trouble. Bone tail and head positions change quaternion rotation

Short Answer: No.
Long answer: it likely isn't worth it.

You can do things like this by shifting the rotational axis of the animations once you have adjusted your bones as described by this question/comment set:
Rotate a particular bone in edit mode without offsetting animation?

But, from experience, you should not make adjustments to your armature once animations are created.


2.9x Why can't I see my scripted print function results in the console?

Things have not changed from 6 years ago. The console is not a window that is part of the blender's user interface, but one that belongs to the operating system.
In widows
You can enable the system console from blender using the top menu's  Window > Toggle System Console.

That will open a totally different window, with the console and all messages from python will appear there.

In Linux
There is no option to open a terminal window from within blender, the terminal window must be opened before and the blender program should be run from terminal.

On Mint/Cinnamon, the app launcher can be set to Launch in terminal. That way the terminal window is always available.


I recall a few techniques for this. As mentioned by futurehack you can render twice with low samples using different seed values which puts the fireflies in different locations, when mixed together the fireflies get cancelled out.

An example of two renders with 10 samples and different seed values -

Turning up the filter glossy value (in light paths panel) can help.

Over at CGCookie you may find help with Sebastian's tutorial on reducing caustic noise. To summarize, for the glossy material you can use the 'Is Diffuse Ray' from a Light path node to choose between a glossy or diffuse material. This allows you to still get indirect lighting with 'No Caustics' turned on in the light paths while reducing noise.

I think the most helpful will probably be using the bilateral blur by Bartek. This tutorial gets a bit more in depth with compositing but essentially discusses different ways to define a mask that can be input into a bilateral blur node and which render passes can be blurred and combined for the best result. The determinator input of the bilateral blur node is used to define the edges of the area that gets blurred. This lets you limit the blur to specific areas that for example have fireflies.


Correct way to render crepuscular rays in cycles?

This is really a tricky one.

First off, world surface shader and sun lamps dont work for world volume shading for now (as stated in the manual). Also, if you use object volumes the camera can not be inside the volume. But you can make a cube bubble around the camera and parent it to the camera. E.g use a "Boolean Modifier" with the bubble (intersect) to cut it off. Of course this only works when your bubble sticks out of the volume but you can extrude it in any direction that doesnt point forward anyway.

Here is an example of the node setup for a volume:
volume scatter shader and volume absorbtion shader as input to an add shader. Thats it.

For the sun lamp use simple emission with strength of e.g. 9 to get deeper shading for the rays. Also helpful is to set the sampling size for the shadow to 0 to get crisp lines. Background can be set to a Sky Texture.

To keep render settings simple volume scattering events can be set to 0. For the Volume Sampling it might be necessary to tweak the Max Steps (e.g. 2048) and Step Size (e.g. 0.04).

This is what it would look like:

To get more crepuscular rays (like in the image you provided) you could add some shadow shapes between the sun and the volume (acting as clouds). Of course this example looks horrible but you get the idea.


Can I access the particle system through Python to build custom simulations?

I managed to get it to work by modifying this script phonybone posted to Blender Artists:
Point Cache Doctor Script (BA)

For the most part I just took that script and ran with it although I did some minor changes to get some extra functionality. - My PyFu isn't strong so it might be that I made it worse in style that way but it worked for me. Here is my version (the portion that does the importing/exporting - Most of it is completely unchanged)

import os
import struct
from os import path
from math import *
import random

def pack_string(v, size):
    return struct.pack('%ds' % size, v.encode(encoding='UTF-8'))

def unpack_string(b, size):
    return struct.unpack('%ds' % size, b)[0].decode(encoding='UTF-8')

def pack_uint(v):
    return struct.pack('I', v)

def unpack_uint(b):
    return struct.unpack('I', b)[0]

def pack_float(v):
    return struct.pack('f', v)

def unpack_float(b):
    return struct.unpack('f', b)[0]

def pack_vector(v):
    return struct.pack('fff', v[0], v[1], v[2])

def unpack_vector(b):
    return struct.unpack('fff', b)

def pack_quaternion(v):
    return struct.pack('ffff', v[0], v[1], v[2], v[3])

def unpack_quaternion(b):
    return struct.unpack('ffff', b)

def pack_color(v):
    return struct.pack('ffff', v[0], v[1], v[2], v[3])

def unpack_color(b):
    return struct.unpack('ffff', b)

class ParticleTimes:
    __slots__=('birthtime', 'lifetime', 'dietime')

    def __init__(self, birthtime, lifetime, dietime):
        self.birthtime=birthtime
        self.lifetime=lifetime
        self.dietime=dietime

def pack_particle_times(v):
    return struct.pack('fff', v.birthtime, v.lifetime, v.dietime)

def unpack_particle_times(b):
    birthtime, lifetime, dietime=struct.unpack('fff', b)
    return ParticleTimes(birthtime, lifetime, dietime)

class BoidData:
    __slots__=('health', 'acceleration', 'state_id', 'mode')

    def __init__(self, health, acceleration, state_id, mode):
        self.health=health
        self.acceleration=acceleration
        self.state_id=state_id
        self.mode=mode

def pack_boid(v):
    return struct.pack('ffffhh', v.health, v.acceleration[0], v.acceleration[1], v.acceleration[2], v.state_id, v.mode)

def unpack_boid(b):
    health, acc0, acc1, acc2, state_id, mode=struct.unpack('ffffhh', b)
    return BoidData(health, (acc0, acc1, acc2), state_id, mode)

_flag_map={
    0x00010000: 'compress',
    0x00020000: 'extra_data',
}

class TypeDesc:
    """Data type descriptor"""

    def __init__(self, index, name, size, pack, unpack):
        self.index=index
        self.name=name
        self.size=size
        self.pack=pack
        self.unpack=unpack

    def __str__(self):
        return self.name

    def __repr__(self):
        return "TypeDesc(name=%r, size=%d)" % (self.name, self.size)

_data_types_softbody=(
    TypeDesc(1, 'LOCATION', 12, pack_vector, unpack_vector),
    TypeDesc(2, 'VELOCITY', 12, pack_vector, unpack_vector),
)

_data_types_particles=(
    TypeDesc(0, 'INDEX', 4, pack_uint, unpack_uint),
    TypeDesc(1, 'LOCATION', 12, pack_vector, unpack_vector),
    TypeDesc(2, 'VELOCITY', 12, pack_vector, unpack_vector),
    TypeDesc(3, 'ROTATION', 16, pack_quaternion, unpack_quaternion),
    TypeDesc(4, 'AVELOCITY', 12, pack_vector, unpack_vector),
    TypeDesc(5, 'SIZE', 4, pack_float, unpack_float),
    TypeDesc(6, 'TIMES', 12, pack_particle_times, unpack_particle_times),
    TypeDesc(7, 'BOIDS', 20, pack_boid, unpack_boid),
)

_data_types_cloth=(
    TypeDesc(1, 'LOCATION', 12, pack_vector, unpack_vector),
    TypeDesc(2, 'VELOCITY', 12, pack_vector, unpack_vector),
    TypeDesc(4, 'XCONST', 12, pack_vector, unpack_vector),
)

_data_types_smoke=(
    TypeDesc(1, 'SMOKE_LOW', 12, pack_vector, unpack_vector),
    TypeDesc(2, 'SMOKE_HIGH', 12, pack_vector, unpack_vector),
)

_data_types_dynamicpaint=(
    TypeDesc(3, 'DYNAMICPAINT', 16, pack_color, unpack_color),
)

_data_types_rigidbody=(
    TypeDesc(1, 'LOCATION', 12, pack_vector, unpack_vector),
    TypeDesc(3, 'ROTATION', 16, pack_quaternion, unpack_quaternion),
)

_type_map={
    0: ('SOFTBODY', _data_types_softbody),
    1: ('PARTICLES', _data_types_particles),
    2: ('CLOTH', _data_types_cloth),
    3: ('SMOKE_DOMAIN', _data_types_smoke),
    4: ('SMOKE_HIGHRES', _data_types_smoke),
    5: ('DYNAMICPAINT', _data_types_dynamicpaint),
    6: ('RIGIDBODY', _data_types_rigidbody),
}

def cache_file_list(directory, index=0):
    """Cache frame files in a directory, sorted by frame
    """

    return sorted(cache_files(directory, index), key=lambda item: item[0])

def cache_files(directory, index=0):
    """Cache frame files in a directory
    """

    for filename in os.listdir(directory):
        try:
            base, ext=path.splitext(filename)
            parts=base.split('_')
            if len(parts) in (2, 3):
                cframe=int(parts[1])
                cindex=int(parts[2]) if len(parts) >= 3 else 0
                if cindex == index:
                    yield cframe, filename
        except:
            pass

class CacheFrame():
    def __init__(self, filename):
        self.filename = filename
        self.totpoint = 0
        self.data_types = tuple()
        self.data = tuple()

    def get_data_type(self, name):
        for dt in self.data_types:
            if dt.name == name:
                return dt
        return None

    def get_data(self, name):
        for dt, data in zip(self.data_types, self.data):
            if dt.name == name:
                return data
        return None

    def set_data(self, name, values):
        self.data = tuple(data if dt.name != name else values for dt, data in zip(self.data_types, self.data))

    def read(self, directory, read_data):
        cachetype = ""
        data_types = {}

        f = open(path.join(directory, self.filename), "rb")
        try:
            cachetype, data_types = self.read_header(f)

            if read_data:
                self.read_points(f)
            else:
                self.data = None

        finally:
            f.close()

        return cachetype, data_types

    def read_header(self, f):
        bphysics = unpack_string(f.read(8), 8)
        if bphysics != 'BPHYSICS':
            raise Exception("Not a valid BPHYSICS cache file")

        typeflag = unpack_uint(f.read(4))

        cachetype, data_types = _type_map[typeflag & 0x0000FFFF]
        self.cachetype = cachetype

        for bits, flag in _flag_map.items():
            setattr(self, flag, bool(typeflag & bits))

        self.totpoint = unpack_uint(f.read(4))

        data_types_flag = unpack_uint(f.read(4))
        # frame has filtered data types list in case not all data types are stored
        self.data_types = tuple(filter(lambda dt: ((1<<dt.index) & data_types_flag) != 0, data_types))

        return cachetype, data_types

    def read_points(self, f):
        data = tuple([None] * self.totpoint for dt in self.data_types)

        if self.compress:
            raise Exception("Compressed caches are not supported yet, sorry ...")
            return data

        def interleaved():
            for k in range(self.totpoint):
                yield k, tuple(dt.unpack(f.read(dt.size)) if dt else None for dt in self.data_types)

        for k, data_point in interleaved():
            for data_list, value in zip(data, data_point):
                data_list[k] = value

        self.data = data

    def write(self, directory):
        f = open(path.join(directory, self.filename), "wb")
        try:
            self.write_header(f)
            self.write_points(f)

        finally:
            f.close()

    def write_header(self, f):
        f.write(pack_string('BPHYSICS', 8))

        typeflag = 0
        for index, (name, _) in _type_map.items():
            if name == self.cachetype:
                typeflag = typeflag | index
                break

        for bits, flag in _flag_map.items():
            if getattr(self, flag):
                typeflag = typeflag | bits

        f.write(pack_uint(typeflag))

        f.write(pack_uint(self.totpoint))

        data_types_flag = 0
        for dt in self.data_types:
            data_types_flag = data_types_flag | (1<<dt.index)
        f.write(pack_uint(data_types_flag))

    def write_points(self, f):
        if self.compress:
            raise Exception("Compressed caches are not supported yet, sorry ...")
            return data

        for k in range(self.totpoint):
            for data, dt in zip(self.data, self.data_types):
                f.write(dt.pack(data[k]))

class PointCache():
    def __init__(self, directory, index=0):
        self.files = cache_file_list(directory, index)
        if not self.files:
            raise Exception("No point cache files for index %d in directory %s" % (index, directory))

        self.start_frame, self.info_filename = self.files[0]
        self.end_frame, self.last_filename = self.files[-1]

        info_frame = CacheFrame(self.info_filename)
        cachetype, data_types = info_frame.read(directory, read_data=False)

        self.cachetype = cachetype
        self.data_types = data_types

        for flag in _flag_map.values():
            setattr(self, flag, getattr(info_frame, flag))
        self.totpoint = info_frame.totpoint

    def get_data_type(self, name):
        for dt in self.data_types:
            if dt.name == name:
                return dt
        return None

I hope I made no mistake in the indentation there.
Most of it is just utility functions.
In usage, you'll first load the cache you have thus far:

cache = PointCache(my_directory,my_cache_index)

Then you can load frames from the cache. For instance, if you want to get the very last frame in the cache (I believe that was one of my changes), you can go:

frame=CacheFrame(cache.last_filename) # at this point only parts are loaded
frame.read(my_directory,True) #now everything actually is in place

And now you can access all the data you might want. - phonybone used this in the Tube project for cloth simulation. My usage is for particle simulation. Both works just fine. For instance, if you want the location of all your particles, you can go:

locdata=frame.get_data('LOCATION') # [(x1,y1,z1),(x2,y2,z2),...]

You can modify it somehow and then save it again with

frame.set_data('LOCATION',new_locdata) #at this point it's only in python
frame.write(my_directory) # this updates the cache

Make sure you spell the data strings right (I had a minor crisis because I accidentally added an extra I in 'VELOCITIY' - in the current implementation this just fails silently rather than leading to an error. Maybe that should be changed.) and you can do completely arbitrary changes to your cache.
Furthermore, for this to show up in Blender, you gotta set the storage location to "External". - I recommend keeping a backup around. - And in fact, the original version of this script had an utility function to do just that. I only copied over what's strictly necessary to read and write your caches though.

Happy Blending!

P.S. I made this a Community Wiki in case somebody has some clever/useful revisions for the above python script.


You can do this with a lattice and shrinkwrap modifiers.

Starting with a scene like this:

A landscape and a hemisphere

Add a lattice object, make it so it has only 1 subdivison on the W axis.
In edit mode make resize the lattice it so that it is slightly larger than the landscape.

Place the lattice so that it lays under your landscape, not touching but the very bottom vertices of the object.

Then select the landscape, add a lattice modifier and select the lattice as deforming object.

Select the lattice object and add a shrinkwrap modifier to it. Set the hemisphere as Target. Change the Mode to Project, Direction to negative on the Z axis.


How do I make a weapon shoot at the center of the screen?

You can use a bit of Python to get started, without knowing your exact implementation of the weapon system, i can't give you the full code.

# get vector from centre of screen
cam = logic.getCurrentScene().active_camera
# vector in world space
vect = cam.getScreenVect(0.5, 0.5)
# get length of vect
length = -cam.position[2]/vect[2]
p = vect * length
# position of p (somewhat ahead of camera)
pos = cam.position + p

With that, you should be able to either ray cast the bullet, or have it go toward that direction.


You do this correctly like this:

import bpy

class MyButton(bpy.types.Operator):
    bl_idname = "object.my_button"
    bl_label = "My Button"
    flag = bpy.props.BoolProperty(default=True)

    def execute(self, context):
        if self.flag:
            print('Called by button')
        else:
            print('Not called by button')

 bpy.utils.register_class(MyButton)

 #usage:
 myBox.operator("object.my_button").flag = True
 bpy.ops.object.my_button(flag=False)


What's the best way build surface around vertices?

Try the F2 addon. It's already built into Blender, but isn't enabled by default. When it's active, pressing the 'f' key with a vertex selected extrudes an entire face from it instantly and allows you to continue adjusting its position afterwards. Really speeds up modeling and retopology efforts.


Where can I connect my OCC texture on a principled node?

Assuming the OCC texture is ambient occlusion, there's no direct input for it on a Principled Shader.

It's also really important to note that it's not really a sensible texture to use with the Cycles renderer.  See these other questions.  Cycles already does, using ray tracing, what the ambient occlusion texture is trying to "fake".

If you're using Eevee, then there's an ambient occlusion option in the rendering tab, though it's only an approximately, and you might not like the results.  For Eevee, a reasonable thing to do would be to use the ambient occlusion texture as a factor to mix the diffuse texture with black.  If you use it, it's probably a good idea to make sure Eevee's own ambient occlusion feature is shut off.

Using the low-res versions of this crate texture, here's the node set-up I used to incorporate the diffuse, normal, ambient occlusion, and reflective occlusion maps:

Here's the result in Eevee with Eevee's own ambient occlusion turned off.  The middle crate is shaded using the above node network.  The left crate shows what happens if you leave the ambient occlusion texture out (just diffuse).  The right crate, for reference, isn't shaded by Eevee -- it's just the exact texture (displayed using an emission node) from the reference photo for the texture.


(Internal) Fire looks blocky in final render


I would suggest that it's simply broken at the moment - the button on the modifier to 'Display modifier in Edit Mode' is still there, it just doesn't do what it's supposed to do right now.
I'm sure they'll get round to it eventually!


How to append/link Screens from other blendfiles?

A screen layout created in one .blend file cannot be linked/appended (manually or with python) into another, because Blender does not support this.

With python you can create new screen layout (bpy.ops.screens.new()) and change it's areas how ever you like.

You can access data inside external .blend files and read them with Blender-file.

This can be turned into addon for ease of use.


Need help flattening one mesh onto another

I discovered i need to use the shrinkwrap modifier for a projects similar to this.


Do UV islands scaled to 0 have anything applied to those surfaces?

If those islands are used to map a texture, they will map a solid color (representing one pixel of the texture).
Such technique can be used to create pixelation.

If they aren't used to map any texture, it doesn't matter.
Then I'd reccomend scaling to 0,0001 instead of 0, so they can be scaled back up if needed :).


Show split 3D view with and without rig?

In blender 2.8+, you can disable to overlay button in the top right corner. In 2.79, you can press N and check "only render" to only see the object in your scene. Hope this helps!


Does anyone upload to Second Life from Blender?

I have now successfully answered all of the questions to all of the issues I was having previously!

Too high vertex count - reduced

Small triangles that added material upon import into Second Life - removed

Mirrored object showing two left feet - still unsure how this one fixed itself

Avatar being offset (flung) along the Z axis - upon import into SL, don't include joint positions

Frankenstein mishap, click only feet, export, manually choose the default settings for rigged open sim instead of choosing the automatic one, not sure why.

I may have graduated from Grasshopper level Blender user!


How to make a bone translate on a tilted Axis?

To set up the rig that you're looking for, you can use the Transformation constraint on the Target bone. Using your set up, you would use the following steps:

Select the RotationArmPos bone.
Shift+select the Target bone.
Add a Transformation Constraint (Ctrl+Shift+C→Transformation).
In Bone Constraints, find the Transformation constraint that you just added. Make the following adjustments:

For the Source, set the Max Y value to 1.000. Leave all of the other numbers the same.
For the Destination, do the same.
For the Space drop-down menus, set your Source space to Local with Parent. Set your Destination space to Local Space as well.
At the top of the Transformation Constraint, enable the Extrapolate checkbox. This ensures that movement happens beyond the values you entered for the Y-axis on the Source and Destination.

Now, when you rotate the Rotation bone about its local Y-axis (in your image, that's also the global Y-axis), the Target bone will move along its own local Y-axis. Since RotationArmPos is a connected child of RotationArm, its Y-axis values are only going to go in the negative direction, so you should expect the Target bone to move towards its head as you rotate. From here you can tweak values to get the behavior your want. You may even want to remove the parenting of Target from RotationArmPos.

This constraint gives you a lot of flexibility. In fact, if the Rotation bone is your primary controller, you could even drive Target directly from that bone's rotation and skip using the RotationArmPos bone's position altogether.

I've put an example .blend file on pasteall.org.


How can I reuse a class between a few addons

Inside your scripts folder you have addons and maybe addons_contrib and a modules folder.

The modules folder can added if it's not there and used to store files that you want to access from various add-ons. In this case I have a file which stores functions, but it could store classes (anything a .py file is used for).

Imagine the modules folder has a folder inside called 'some_name',

and some_name contains a python file called functions,

so the path is scripts/modules/some_name/functions.py . To import that module in an addon you write

from some_name import functions

Potentially this makes installing your add-on a little bit more involved for the average novice user, unless you write code that places the files in the modules folder automatically


No Viewfinder Box / Blender renders out entire scene

Few things come to mind:

You may have pressed / and entered local view. This will allow you to only view (in the viewport) the objects you had selected when you pressed the key. This does not affect renders or the hidden/shown state of objects.

If you've hidden the objects by pressing the "eye" icon, you've only hidden the objects from the viewport. If you pres the Filter button which looks like a funnel, you can see all the restriction toggles.

If you enable the icon with the camera, you'll see that camera icon next to each object. Toggling that will show/hide an object from the render.


Blender Video Editor: How to move a picture or movie from place a to place b and capture the movement into the video?

Yes, keyframes will allow you can automate your goal.

Select regular strip.
Add a Menu/Effect Strip/Transform strip to a regular video/image strip.
Select new transform strip.

Keyframe the position.  Frame 1.

In the image above the mouse was used the to get the [Insert Keyframe] menu option.

Next a second keyframe on frame 100.  Yellow indicates key frame.

Next Blender places the images on frames 2-99 via interpolation.

There are tutorial resources here a blender.stackexchange and other video websites.


What I've realized, after watching the tutorial, putting this together myself, and then looking at your node setup again, is that by disconnecting ID Mask: Index 1 you have broken your node setup. And with the Mix Node's Factor set to 1 there is no meaning in having a Mix Node at all (combining 0% of one image with 100% of another). Sliding it to anything less than 1 won't help either, because it needs the ID Mask to mask your car object back in.

If I were you, I would revisit your original problem with eliminating the jagged edges instead of trying to hack the node setup.


You can start with a simple plane.

First set modifiers to it:

Mirror on X and Y
Array on X (merge option checked)
Array on Y (merge option checked)

In edit mode grab the plane to set the origin point to bottom left.

Poke face CtrlF then choose 'poke'.

Select the outer edges.

Subdivide them W then choose 'subdivide'.

Select the bottom left and upper right corner.

Scale them down using S.

The modifiers:


Try choosing File > Load Factory Settings. This will discard any customizations you've made to your settings. Your file will close and be replaced with the default scene, so any unsaved work will be lost. For this reason you should save your project before loading factory settings, and re-open it after doing so. If this solves your problem you can then save the reset (fixed) settings from the "Save User Settings" button at the bottom of the Preferences window so that you won't run into the problem again.

This solution was suggested on Blender Artists by user "mib2berlin" to a user experiencing the same issue. The issue is apparently not specific to the spiral options, but can happen with other tools that use the Operator Panel.


How to automate the conversion of objects generated by Python script to fbx or to obj?

The following script will allow to execute Blender in command line as so:

"<your path to blender>\blender.exe" --background --python exportFbx.py -- "<your py file name>" "<your output directory>"

Thanks to this answer and considering:

"exportFbx.py" is the file where the script below is saved into
the command line is run where the script is
"your py file name" is the complete name of one of your object generating .py scripts
"your output directory" is the directory where to store the exported result

The script, in short:

Get the arguments
Compose the output file name
clear the scene
execute your .py script
exports

Each part is commented below. Save it as "exportFbx.py".

import bpy
import sys
import ntpath

#Extracts file name from file path
def get_filename(path):
    path, name = ntpath.split(path)
    return name or ntpath.basename(path)

#Clears the scene
def delete_all():
    bpy.ops.object.delete({"selected_objects":[o for o in bpy.context.scene.objects]} )

#Executes a py file
def exec_py_file(filepath):
    file = open(filepath)
    exec(file.read())

#Gets command line arguments
def get_args():
    argv = sys.argv
    argv = argv[argv.index("--") + 1:]
    return argv[0], argv[1]

#Obtain arguments
filepath, output_directory = get_args()

#Get the file name
filename = get_filename(filepath)

#Compose the fbx file name
output_filepath = ntpath.join( output_directory, filename + ".fbx")

#Clean the scene
delete_all()

#Run the py file
exec_py_file(filepath)

#Export to fbx
bpy.ops.export_scene.fbx(filepath=output_filepath, check_existing=False, use_selection=False, use_mesh_modifiers=True)

Now you'll have to iterate over your py file using your operating system commands in order to apply the command line above to all the .py file.

In Windows Powershell, that can be something like (not tested):

$files = Get-ChildItem "<your path to py files\*.py"
foreach ($f in $files){
    $filename = $f.FullName
    "<your path to blender>\blender.exe" --background --python exportFbx.py -- "$filename" "<your output directory>"
}

If you run:

"C:\Program Files\Blender Foundation\Blender 2.81\blender.exe" --background --python exportFbx.py -- "<Essai.py>" "C:\Users\user\Desktop\Bank2Son Zone Originale II\Command line"

That won't work. You need to have:

"[The path to blender.exe]"
--background
--python
"[The path to exportFbx.py or just exportFbx.py if you run that in its directory]"
--
"[The path to one of your py file]"
"[The path to the output directory]"

Surely all what is inside "[]" above needs to be replaced by the good things as they are in your environment. And all that in one single line (I've separated things above for the explanation) with a space between each part.


Mystery solved.
New features are shown on blender.org on older version. It confused me.

I feel so stupid. Sorry for taking Your time.

Thanks for responses
Best Regards


Add an joint object to a wireframe modifier

A possibility, to avoid the duplicate object to be influenced by the wireframe modifier is simply to use another object of the same shape and set the dupli on it.

This second object could be hidden at rendering or simply composed of vertices and edges but no faces:


How to display the edges of a mesh while in Object mode?

If I understand your question right, then you just need to enable Draw All Edges and Wire under the Object properties.

Wire draws all edges in the mesh that are not coplanar (edges not lying on the same mathematical plane). Draw All Edges draws these coplanar edges in wire display and wireframe mode.


Go into the editmode, select all vertices and press P: By Loose Parts
Blender splits all unconnected vertices into an object


Fire Animation from Particle System Does Not Render

I'm not sure exactly what I did, but I opened a new Blender file and built the fire animation from scratch—using what I think are the same settings as the previous project—and it renders out just fine now.


I am having issues subsurf-ing my object, part of it is deformed

Which version of blender are you using?  I downloaded your blend file to 2.78c, and it does not show the problem.  Having just finished that tutorial myself, as far as I can tell, your mesh is correct.


Cycles material What is the syntax to access texture mapping location?

Let's assume Mapping is the unique name/identifier for the Mapping node in question. To find the unique node name, select the node and view the Side panel (N key).

The code to access the Location vector for Mapping is:

>>> bpy.data.materials['Material'].node_tree.nodes['Mapping'].translation
Vector((0.0, 0.0, 0.0))

or more structured

mat = bpy.data.materials['Material']
nodes = mat.node_tree.nodes
mapping = nodes['Mapping']
mapping.translation = 1.0, 0, 0   # accepts tuple

Hover over the properties and the tooltip will give a hint as to where to find most properties. But for materials, the path is via data.materials and not data.node_groups as the tooltip suggests.


Set Camera Depth of Field so that the character is not blurry, but the scene behind it is

Depth of field is the area in which elements are acceptably in focus. Objects closer of further away from that area will be progressively blurry.

Image from https://expertphotography.com/understanding-depth-of-field-photography/
By changing the focus and the $f$ stop (iris) on the camera, you can determine where objects are in focus and when they are not. The wider (lower value) on the $f$ stop, focus will be more critical. As you close (higher value) the iris to a higher $f$ stop more of the scene (in front and behind the object) will be in focus, or less blurry.
Here's an example from wikipedia:

Play with the values for focus and $f$ stop, until you find the point where you get the results you are after.


How do I subdivide all faces in a mesh equally?

Welcome to Blender Stack Exchange!

I know of a couple of options that will do what you're looking for.

The first is using sculpting like you're doing already. However, in the dynamic topology settings, there is a button called Detail Flood Fill. This applies the selected detail level to the whole object without having to manually sculpt.

Blender also has a modifier called Remesh. Add this modifier (second column about halfway down in the list of modifiers), set the mode to Smooth, and turn up the Octree Depth a bit.