shader nodes to make a realistic looking Amethyst

After a lot of tweaking, I came up with a result that looks decent:

Or how it is more likely to be:

I used a different reference so it's more purple than yours, but that's easily fixed since you seem to have no problem doing the actual crystal material.

Here is the node setup:

I'm sure you know what the top box does since you have already done that. It simply transitions from the transparent crystal material to the opaque white material.

The white material's surface is just a simple glossy add to a transparent shader. I have added it so as to not block any of the light going into the crystal.

I have separated out the purple crystal material into Refraction and glossy so as to have more control. I needed to blur the reflections slightly without adding roughness to the refraction.

The volume scatter is set to white with a really high density (around 50).

The real trick though, was to go to the Light paths and increase the volume bounces from 0 to 5. This causes the light to bounce around and some of it to come back out, causing the volumes to be a lot brighter.

This however increases the render times exponentially. But if you're going for realism, then it's a trade you have to make.

Note: I haven't added a scratch texture to this so the reflections are perfect at the moment. But I have included a procedural scratch texture in the attached blend file, but it isn't connected to the material. It isn't very good but works if it isn't going to be viewed close up.

Hope this helps you!


Alternative to the skin modifier - solid perferated pattern

You could use Array and Simple Deform modifiers:

Create a plane, subdivide it. Rotate it 45°.

Press i to inset, delete the inner faces.

Use the Snap and the Auto-Merge options to duplicate it.

Only keep one segment, duplicate it with the Array modifier.

Give it a Simple Deform modifier / Bend mode, 360° angle. If it's completely twisted it's probably because you haven't applied the rotation. You can modify the segment geometry until you're happy (add edge loops, thickness, etc).


Creating a custom menu of active grease pencil palette colors via Python Script (Blender 2.79b)

Here is the probable solution (but it gives an Anytype error)

import bpy
from bpy.types import Menu

class GPcolorsMenu(bpy.types.Menu):
    bl_label = "GPcolors"
    bl_idname = "gpencil.GPcolorSwitch"

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

        #display active palette
        palette = bpy.context.scene.grease_pencil.palettes.active
        row = layout.row(align=True)
        row.label(palette.name, icon_value=layout.icon(palette))

        col = layout.column(align=True)
        col.separator()

        #display GPcolor [keys()] for switching in a menu

        key = bpy.context.scene.grease_pencil.palettes.active.colors.keys()
        for i in key:
            row = layout.row(align=True)
            row.prop(i,'name',text='')

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

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu(name=GPcolorsMenu.bl_idname)


Key frames appear in dopesheet but not in the timeline

An update if anyone is still having problems seeing keyframes on the timeline even though the object is selected. On the far left of the timeline there is a tiny arrow, if you click and drag this open you will see a summary of keyed items. Opening all of these and selecting one or two will, kinda reset your view.
Hope this helps someone.


The simpler method to achieve the result is to animate the screw in vertical position, set the screw to be child of an empty and then tilt the empty 30 degrees (in this way you can even animate the tilt angle).


You can use a Noise Texture node (or another one) plugged into a Bump map. To get the crater effect you need to put a ColorRamp between the Noise and the Bump, and tweak the black and the white needles.


How Do I Bring Up The Same Properties Menu As In This Video?

The author of the video is adjusting the parameters of a newly added object.

In 3d view, add a new object and press F6. But there is a catch: if you do anything else other than press F6 after creating it, you don't get the window.

Many tutorials I've seen over the years teach you to do this through tool shelf, which isn't visible in that video.


I want to smooth only the outer faces of a circle

OK, for 3d Print this should work fine:

Add 2 edge loops along the sides.
Press CRTL num plus to extend your selection, so it covers the entire rim
W -> subdivide
Choose these options (lower left at your VP imediately after hitting subdivide)

You might need to tweak the rim, bc. it may become concave. Easiest would probably to delete the new edge loops around the "coin" again.


How to render surface divisions for subsurface modifier?

If you want small gaps in the tiles you can use the edge split modifier and the solidify modifier. make sure you set the offset to +1 on the solidify mod.

Another thing you can try if you want the mesh lines to be extruded outwards,you can duplicate the object that you want to see the subdivisions on and use the wireframe modifier on it.


If you clicked "Apply" the only way ctrl + Z to undo, but if you already close the file or made other changes, you can't go back and you need to start over.


Extruding along vertex normals gives weird result

Hard to say where you've messed up, anyway, here is what you should do, if I've correctly understood what you try to do (?):

Create your edge loop at the middle of your cylinder with ctrl R.
Bevel it with ctrl B.
Press E to extrude then Enter right away.
Press S to scale your extrude, and shift X (or Y depending on the orientation) to constraint your extrude on both Y and Z axis.


Game Engine: Can I load objects and scenes into memory?

You want to prevent lag when changing scenes? Add them all in the first frame (so you get a massive lag spike), and have each scene pause itself. Then you can resume them as needed.

To remove it from memory, end the scene.

I don't feel that I actually understand what problem you are having.


I think it has to do with the sculpting engine. What is happening is the faces are being smoothed or deflated, etc. (basically shrunk) and one will go into another. you can see this if you deflate a default sphere or something. To fix it, smooth, inflate, flatten until it appears to be fixed again.


How can I recreate an Icosphere made of separate triangles with AN?

This here is maybe not the fastest method but it is quite easy to implement:

You see it already takes more than 8ms, maybe it would be good to "bake" the triangle objects before you continue to work on your animation. To do that you can eg copy all the objects and remove the node tree afterwards. Alternatively you can also go into the advanced settings of the Object Instancer node and click on "Unlink Instances from Node" and remove the node tree then.


Difficulties centering the object on the middle of the screen

I have solved your problem by Centering the thing I want to look at in every angle. Go to top view [numbpad 7], drag things I want to look at to the centre of my view by holding [shift] and [mouse 3]. Do the same with view from the front and from the right/left. When that's done you should be able to interact with your thing perfetly.

Another way to zoom in slowly is by holding [ctrl] nad dragging with [mouse3].

Yet another way to wiew you object is by using [shift]+[f] shortcut. This shortcut lets you use your WASD keys and mouse as if you were playing a videogame. With [Q] and [E] you can move up and down.


I'm not 100% sure what the question is, but give this solution a try.

Go into edit mode, select all the vertices of your mesh with the A key, split the view to where you have a uv editor window, and the 3D view window, then, in the uv editor window, select all the vertices, s key to scale.

Hope it helps!


How to use the textured material from a multi-mesh object onto a single mesh obj?

Quick mapping (sloppy) of your image on single sphere mesh on the left to simulate your starting point. Middle image is placement of the two participants of the bake. Then baked onto another final mesh on the right side.  The 3 images are different stages of the baking process.
The created texture has black background which becomes transparent via color ramp and transparent shader.  I nested the hemisphere askew to increase readability.  All the hemisphere shapes below are a single mesh.  Your are seeing objects below with transparency so you may need more time to get the orientation of the object.  I may correct this.

Created texture with black on left.  Mapped texture with black.  Objects baked in alignment.  Below.

Two alternatives.

Consider Baking in Cycles Render or Blender Render.  You will use a new texture to record the color reflection of one source mesh to the other target mesh.
Your finished original bushy mesh can be illuminated or set to emission material.  We assume your shapes are roughly hemispheres. Hemisphere is sphere cut in half.  The target mesh is hemisphere with reflective surface.  Original mesh in placed over the reflective target.  Bake target mesh.  See video references for detailed instruction on baking in cycles render or blender render.

Consider creating a regular rectangular tile of leaves texture, which is expected to be modest work. Leaves in this texture can all be same size. New mesh is cylinder.  UV Map cylinder to leaves texture.  Leaves appear all same size as in the soup can model.  Use proportional editing to reshape cylinder in to hemisphere.  In this scenario your original bushy collection of meshes is discarded completely... rather I mean ... placed gently in the experience bin.

Abbreviated Picture Notes
Blender Cycles Texture Baking Setup

In the following the red object is your texture object with emission material.

Red emission object is next to green reflective object follows

Bake Result is the New texture follows

Texture placed back on green inner object and rendered follows

Original Red object has been set to No Render.


In Edit mode, and on edge mode, select the edges you want to create a face with and hit the F key.


If there is only one connection area between the inner and the outer shell:

select a ring of edges/vertices around this connection
press Ctrl + E and then click on "Select Loop Inner-Region".
this will either select the inner shell or the outer shell. If it's the wrong one, press Ctrl + I (invert the selection)

If there are several, but not outrageously many holes between inner and outer shell:

mark them as seams (Ctrl + E -> "Mark Seam")
then press U -> Unwrap with everything selected to unwrap the model
go into UV/Image Editor, select one of the vertices and press L to select one of the two shells, pull that away far enough so that it becomes easy to box-select
Press "Keep UV and Edit mode mesh selection in sync"

select one of the islands, it will select the corresponding mesh, too.

If there are outrageously many holes between inner and outer shell:

I don't know. You could try box-selecting the outside with "limit selection to visible" active, but you'll get a few inside faces, too. Some of them may disapper if you "Select less" a few times, and then not re-appear if you "Select more" the same amount of times.

You could try selecting the outer shell in Wireframe viewport shading just because it's further outside at the edge, rotating around your model.


What is "Factor" in Point Scale (Geo Nodes)?

You can use this node to scale points by amount in a specific attribute. For example, I generated an attribute using Attribute Proximity node.  Attribute Proximity generates attribute based on distance between vertex and closest point in geometry, I called it "new_attr":

Next I scaled vertexes by this attribute. Of course, to view scale you need to have some instances distributed by them, so I distribute Suzannes.


Failed to read BLEND file..... TYPE error in SDNA file

I do not know if this is your case, but if the .blend file was opened in another version of the blender you were editing or even in another engine (eg upbge and armony3d), it may no longer work in the blender.


grouping texture nodes changes the coordinate space

Based on Gandalf3's comment I have to change the socket to blue to work around this bug.  Unfortunately, based on Setting Group Node Socket Type I conclude there is no procedure to change the type of an existing socket in 2.74.

We must add a node to the group that has a blue (vector) input.  The texture Output node is suited to the task.  Connect that input to the blank input on the Group Input and a vector input is created to match it.  Wire the blue input into the various places that the yellow goes, and then delete the yellow input from the node group.  You can delete the Output node now.  Shift-tab out to the rest of the nodes and connect the coordinates to the now-blue input of the group.

When constructing groups in the future, a solution is to shift-drag across the connection between the vector output and the Separate RGBA node's input. This creates a blue Reroute node. Including the reroute node during the creation of the group codes the input as blue (vector).


How to maximize any Blender View Port without resetting Quad View?

Use workspaces. See the Layout, Modeling, Sculpting, tabs on top?

Right Click Layout and duplicate it, rename to "Quadview". Put the quadview in that tab and single window in the layout tab.

Switch back and fourth between layout and quadview from those tabs so it does not reset.

Ctrl + Page Up, Ctrl + Page Down back and forth to cycle through the views.


Either unpack the PySide/PyQt folder(s) to Blender's site-packages

\Blender\2.xx\python\lib\site-packages\>>HERE<<

You should then be able to import them normally.

Or install them to add them to your system's python installation and use sys.path.append() in your script to add the required folders to Blender's module search path temporarily and import as usual.


Can you shrinkwrap some vertices in edit mode?

The best way would be to assign the fragment to some Vertex Group and use that group in Shrinksrap modifier.Like this:


How make UV Textured mesh with material instead of specific colour?

Just figure it out. Need to add RGB BW and do some math rules, but would be glad if someone will present more correct or convenient way of doing that


Applied texture is deformed or pixelated?

Before applying a texture to your object you have to properly uv-unwrap your object. You can do it by going into "Edit Mode" than hitting "U" on the keyboard and selecting "Unwrap" form the drop down menu.

With a complex model like yours a simple unwrap is not going to solve all of your issues.
So you should go get some more informations about uv-unwrapping from the Blender Wiki or other web tutorials.


Select the entire mesh in edit mode, then press Ctrl + N to recalculate the normals.


No! There is not a single reason, why this should work. Manually adding HSV-System values will not necessary result in the same color as different other mixing methods.

Counterexample:
Mix the turquoise colors [H=0.49,S=1,V=1] and [H=0.51,S=1,V=1] and a similar turquoise color will be the result. But if you add the values the result is red [H=1,S=1,V=1]

The reason for this behavior is purely based on the mathematics of color mixing and is not a question concerning blender.


Render shows no image, just a color screen

There were two reasons.

you had no light in the scene. (I just added a sunlight)
You had your camera aperture set to .2 ( I just disabled DOF)


Driver: Scripted Expression (Copy and invert some Objects Rotation and apply it to another Object)

Scripted expression expects a mathematical function using the variable you set underneath (default name is "var", but you can choose your own, avoiding blank spaces or others special sign).

In this example I've set the Z rotation of the child object to be driven by Z rotation of the parent Obj. The name of the variable is "var_ob_par", and the scripted expression is " - var_ob_par".

It works!


What you need to do is select Wall_1_Room04, then select Wall_1_Room05. once they are both selected, with Wall_1_Room05 being the active object press Ctrl+J. This will join the walls, the origin will be at the location of Wall_1_Room05's previous origin.

After that, tab into edit mode, select all and press Ctrl+V > Remove doubles. repeat the process for Wall_7_Room_04.


Why does the apply_pose operater not work when invoked from a script?

If an operator is called from the UI it is implicitly given a context which depends on the area the operator has been called from and contains specific information about that area.

In your case you are calling an operator from the text area which is supposed to be called from the properties area. It is given the wrong context and can not retrieve the information it needs from it.

See

How to override a context
An overview of the different contexts and their contents
Gotcha Operators

In the text context
there is only edit_text available. The global context does not contain information about the active object and the selected pose bones, neither. But the screen context does.

However here is an example how to override the context in this case:

import bpy
#get your armature
obj = bpy.data.objects['Armature']
selected_bones = [pose_bone for pose_bone in obj.pose.bones if pose_bone.bone.select]

context = {}
context['scene'] = bpy.context.scene
context['active_object'] = obj
context['selected_pose_bones'] = selected_bones

bpy.ops.poselib.apply_pose(context, pose_index=1)

This is the minimal content which is required to run the operator. It still gives warnings. Messages about window, screen, area, region not being found often can be ignored. You might pass None for these entrys to suppress the warnings.

Example: How to refer to an area in the same screen where the operator is being run from

context['window'] = context.window
context['screen'] = context.screen
for area in context.screen.areas:
    if area.type == 'PROPERTIES':
         break
context['area'] = area
context['region'] = area.regions[1]
context['space_data'] = area.spaces[0]


Resolution of the mesh vs Resolution of the simulation
There are two possible mode to take advance of the Ocean modifier.
As stated by the Blender Manual's page:

Generate
Creates a tiled mesh grid that exactly corresponds with the resolution of the simulation data

or

Displace
Uses the existing geometry rather than replacing it. Vertices are displaced along the local Z-axis.

Basically, with Generated option enable a new mesh is generated. It resolution is the same of the simulation, and what it is inheriting from the starting objects are just transformation properties (location, rotation, scale, keyframes... and things like that). The geometry of the object doesn't matter

Switching to Displace option, means you are asking Blender to move the vertices of the mesh on the local Z axis (so keep an eye on the mesh rotation) according to a simulation.
If your starting geometry is made up of a single plane, increasing the resolution of the simulation won't result in a more detailed output, as it can be express only with already existing vertices only (4).

You'll have to increase the mesh-to-be-displaced too. You can use, for example, a subdivision surface modifier stacked above the Ocean modifier:


Poliigon textures reflection map with PBR

This is how Andrew Price set up his wooden floor.


Transparent faces even with Limit Selection to Visible

Your 3D View far clipping distance is set to a very high value. The floating point representation of depth in Blenders Viewport is not layed out to handle these high values.

You can easily recreate the problem, by

Opening a new Blender file.
Selecting the cube and going into edit mode.
Switching to orthographic view.
Setting the View > Clip > End to 100000.

In your file, the end clipping distance is set to 1km. However, since your Scene > Unit Scale is set to 0.001, this value translates to ~1000000 BUs.


The Camera Size in the 3D viewport will make no difference in the qualities of the rendered image. Changing the size is meant to help you find and visualize the camera while you set the scene.
The Sensor Size will make a difference in the characteristics of the image, if it used in combination with the Lens Size and f-Stop to control depth of field (meaning how sharp, or blurry, the objects will be if they are closer to the focus distance or further away from it).
The Render Size in pixels, or resolution will determine how large the image will be, and how it is represented in a monitor (or whatever other media is used to display it). The more pixels the image has will have an impact on the amount of detail and how large the image can be displayed, or printed, before it is no longer sharp.


Water not coming out in fluid simulation

The problem is your resolution. It is too low for your tiny little inflow.
You could either make your inflow bigger or did what i did: change the resolution to 100 and bake again.
Then it works.
Result:


Firstly, you should ensure that you have Applied Scale to each of your objects (Ctrl+A, select Scale). Then, you can improve the accuracy of the simulation by increasing the Steps Per Second and/or the Solver Iterations settings on the Rigid Body World panel of the scene properties. See also Why my active rigid bodies are vibrating Continuously?


Bake animation from complicated IK rig to simpler rig for export to Unity

I succeeded in saving our character but the way I did it was hard-won. I hope this will be helpful to others who learn the hard way that their armature is not setup to be interpreted properly by Unity. Note that I have been advised by a professional that this is over-complicated compared to the minimum that really needed to be done to "save" the character, but the optimal solution apparently does involve a copy-transform rig.

I duplicated the armature I had and removed all the non-deformation bones from it.
Then I cleared all its ("Armature.001") bones' constraints, disconnected and de-parented all of them, and re-parented all of them to the root bone.
I put a "Copy Transform" constraint on the root with the other Armature as the target, but did not set the bone target.
Then I copied that constraint to all other bones at the same time.
One-by-one, I set the bone target to the bone with the same name in the other rig. This took about 10 minutes just to be thorough.
Now I was ready to re-create  the actions:
In the Action Editor, I set the active action for each armature to the same action.
With the new armature selected, I clicked the button to make a new action: "ActionName.001"
In pose mode, I selected all bones, set my Keying Set to "LocRotScale", and re-keyed every single frame.
(I did this for every Action).
Through trial-and-error, I determined that I needed to bake these actions one-at-a-time with the following options activated:

Only Selected (not required, probably)
Visual Keying (most important)
Clear Constraints (equally most important :) )
Overwrite Current Action (preference)

I was only able to remove the constraints ^ and have the new armature continue to respond to the keys when it was done this way. I also remembered to delete the channels belonging to the non-deformation bones that didn't exist anymore. I did this after baking just to make sure it wasn't causing problems.
After clearing constraints, the other actions break. I anticipated this, and every time I baked an action, I saved it in its own file.
Finally, from the file version before all this baking happens, I removed all the actions, deleted the original armature, and appended THE ONE BAKED ACTION from each new file I saved. DO NOT FORGET to append JUST THE ONE YOU BAKED from each file each time, otherwise you will think you messed up when you are just appending the wrong action from the wrong file. Obviously, I got very nervous for a second because I forgot!
When all the animations were appended, I was able to export.
Before I did, I de-parented all meshes and rotated everything about the X-axis by -90 degrees, applied that rotation, and rotated it back 90 degrees. This corrects the axis disparity between Blender and Unity.
Here is evidence of my success (sorry, it was too big to embed):
https://imgur.com/a/zv8MtqU


When applying a picture texture to an object it comes out as kind of cut in half diagonally and distorted, is there a fix for this?

Blender doesn't know how to apply the image to the object, so it does all that stuff because it doesn't know what else to do. You need to tell it how to apply the image by making a UV map. The default cube in Blender comes with it's own UV map so you can follow these steps:

1) With the default cube selected open up the UV tab in the top bar

You should see a layout like this:

2) Export the UV map

Make sure you have this box checked and export

3) The UV map will be exported as a PNG. Edit it in whatever photo editing, drawing program you want to use. (eg. Photoshop, Illustrator, Firealpaca)
In your case you would take your tree image and place it in the same spot that I put my blob.

4) Export your edited UV map and go back into Blender. Click the Shader Editor tab in the top bar and you should come up with a window that looks like this:

5) Copy the node setup shown below. In the image texture node press open and select your UV map that you put your picture on.

If everything is done right you should end up with something like this:

Hope this helps! IDK if I explained this very well. If you have any questions pls ask. Blender has a steep learning curve but once you do learn it it's great. :D


A very flexible way to make the texture is to make it from scratch with the nodes, not relying on the built-in, a bit limited wave texture. Using some math nodes and adjusting the value results in a pretty nice wood texture.

Here the two vector inputs define a line that passes through both (the core of the three), and the distance from that to the object surface is calculated inside the distance node.

The surface positions are distorted a bit by adding a bit of noise to them, the distance calculation is done per the equation here.

Using modulo makes the distance from the surface to the line a looping range of values from 0 to the distance between the waves in the wood. Multiplying that by the inverse of the distance brings the range to 0 - 1, which can then be mapped into a nice gradient using a map range node. That can be used to multiply or mix the color value to achieve the final result.

See also:

http://www.minimaexpresion.es/?p=690&lang=en
http://materialw.wordpress.com/materials/wood-material/
http://blenderartists.org/forum/showthread.php?246113-A-fine-procedural-wood-material-for-Cycles
http://shiny-dynamics.blogspot.fr/2012/04/wood-texture-for-blender.html
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Procedural_Textures
http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Types/Procedural/Wood
http://www.blendswap.com/blends/view/52626 (mirror of previous link)


Problem of selection after a subdivision surface

There is no problem with selection, but with so many edges, the edge info : Length looks messy.

You just need to deactivate it.


Baking normal maps in blender: "Error: No objects or images found to bake to"

Cycles
Cycles bakes to the last selected image texture node in the object's material. Note that the node doesn't need to be connected to anything.
Blender Internal
This one is a bit confusing and non intuitive. You are mostly correct, you must assign all the faces to the texture as a Face texture.
This is done by selecting the target image in the UV image editor while all faces are selected in edit mode.


On the Object Data tab, you need to go to Relations Extras (Just below Duplication) and under the Tracking Axes pick Axis: +Z and Up Axis: Z.


Spine003 keeps stretching book in undesirable way

If you look at it in edit mode and show the item properties, you'll see that the vertices are linked to several groups and two of them corresponds to two bones.

Depending on what you want to do, you may remove the unwanted bones influences from all the vertices of the book.

If the book is not supposed to be bent maybe you should keep only one bone influence for it (all its vertices).


How to precisely resize an edge or face?

Use the Dimensions sliders in the 3D view properties panel. Press N in the 3D view, or go to View -> Properties. To use the units you want, go to the Properties panel -> Scene -> Units panel. In your case, select "Metric". Then change the dimensions as needed. You type in the number followed by the units (you don't need a space between the number and units). In the screenshot below, I set the X and Y axes to 10cm so the cylinder ends are a circle with diameter 10cm.

For separate edges, you can't directly make an edge 10cm. For some edges, you can use vertex snapping to get what you what. In the example below, I used a plane instead of a single edge because it's easier to see.

So for a face in edit mode, you'd have to consider it as edges you have to resize and change your select mode to Edge Select.

Other notes about Dimensions:

Note that 1 Blender unit ["None"] is equal to 1 meter. (Interestingly enough, this may not be right when 3D printing. When I tried it for the first time at my university, I found out that the machine I wanted to use read 1 Blender unit = 1 mm, so when I was using "Metric", 15 cm = 0.15 m = .15 Blender units = 0.15 mm, which is like microscopic. Got a good laugh out of that.)
You can't type unit abbreviations when the units are set to "None".
You can type imperial unit abbreviations even when you select "Metric", and vice versa. This can be handy when you need to convert units.
Dimensions represent the bounding box of an object. So if you rotate an object in edit mode, the Dimensions won't reflect the object's actual dimensions.
Dimensions are independent of scale, whether you Ctrl + A to Apply Scale or not.
Dimensions are relative to Local axes. This can make things confusing, like if the cylinder in the first image was rotated 90 degrees in on the y axis, changing the X dimensions would make it seem like it's being scaled along the z-axis. Change the Transform orientation in the 3D view to "Local" if you need to.

See also this and this.


How do I bake/add material colors onto my UVmap?

Befor baking you need to open the Node editor and there add an image to bake to.

It is very important that this Image Texture node is selected before baking.

1: Open a node editor window.

2: Put a check against the Use Nodes option.

3: Add an Image Texture node.

4: Load the image that you want to bake to into the Image Texture node.

5: Before leaving the Node editor make sure that the Image Texture node is selected.

6: Hit that bake button.

Hope this helps some  :)


Whenever i try to render my video its just all white?

First of all, set your exposure and gamma to 1:

Then you have a complete powerful sun (strenght 1.0) with a complete powerful environment lighting (strenght 1.0) resulting in too much light!
This is a test render with both set to 0.1.

Lighting is very complex and very powerful, so .... good luck!


This can be done with Fluid Simulation.

From the wiki:

  In general, you follow these steps:

  set the simulation domain (the portion of the scene where the fluid will flow),
  set the fluid source(s), and specify its material, viscosity, and initial velocity,
  eventually, set other objects to control the volume of the fluid (inlets and outlets),
  eventually, set other objects related to the fluid, like:

  obstacles,
  particles floating on the fluid,
  fluid control, to shape part of the fluid in the desired form,

  eventually, animate the fluid properties,
  Bake the simulation (eventually, revise as necessary and bake repeatedly).

A quick way to setup the domain is with Space> Search > Quick Fluid

If you want to make something exactly like that image, check this tutorial on Blender Guru.

Otherwise you could:

Create the domain object (You could select an object and use Space> Quick Fluid, but here is how to do it manually):

Add a cube (ShiftA> Mesh > Cube)
Add a Fluid modifier in Physics and set the Type to Domain:

Add a second cube for the fluid:

Add a fluid modifier in Physics and set the Type to Fluid:

Create the falling objects:

Create the motion. You could either animate the motion or use rigid body physics, in the above case it's probably easiest to animate them.
Add a Fluid modifier to one of the objects and set the type to Obstacle.
Select all the objects which will be falling in (selecting the one with the fluid modifier last so it is the active object) and press CtrlL> Modifiers. This will copy all the modifiers on the active object to the selected objects, including the fluid modifier.
Configure the fluid settings of the domain object as desired (see below)
Select the domain object and bake the fluid simulation in Physics > Fluid > Domain.

Domain Settings:

The settings in the domain object are as follows:

Fluid panel:

Simulation Threads: The number of threads to use for multithreading the baking process. (0 automatically picks, you can probably leave it the way it is)
Resolution: You can bake two different resolutions, this is useful for having a low resolution place-holder in the viewport.

Final: The resolution to bake the Final quality results at.
Preview: The resolution to bake the Preview quality results at.

Render Display: The bake quality to use in the render. The options are:

Final: Use the Final bake resolution in the render
Preview: Use the Preview bake resolution in the render
Geometry: Use the original geometry of the domain object in the render

Viewport display: The bake quality to use in the 3D view. The options are the same as Render Display
Time: Note that baking always starts on frame 1, these settings control the behavior of the fluid (e.g. for slow motion effects)

Start: The number of seconds into the simulation to start caching data.
End: The simulation time of the scene End frame in seconds.

Generate Speed Vectors: Record vector information in the cache (useful for motion blur)
Reverse Frames: Reverse the fluid frames
Speed: Rate of motion of the fluid. (0 = static, 1 = normal)
Offset: Number of frames to offset reading of the cache. This is the only setting which you can still change after baking.
Bake Path: Location on the system to read and write fluid cache files.

Fluid World panel:

Gravity: Force of gravitational pull on each axis. If Gravity is enabled in Scene > Gravity, this setting will not be editable from the physics panel. Instead change the values in Properties editor > Scene > Gravity.
Viscosity:

Base: The viscosity of the fluid
Exponent: The exponent that is used to make entering small values in the Base value easier. The end Base value is equal to base*10^(exponent*-1).

Real World Size: Size of the longest axis of the domain in real world meters. This setting does not affect the size of the domain in the scene, but rather the way the fluid behaves. (e.g. If you wanted to simulate fluid in a glass and your domain is slightly larger than the glass, you would set this to roughly the size of a glass in the real world)
Optimization:

Grid levels: Number of lower resolution grid levels to use in the simulation. -1 is automatic.
Compressibility: Amount to allow standing fluid to be compressed

Fluid Boundary panel:

Slip type: Collsision settings for the domain boundary. These settings are the same as on Obstacle objects. The options are:

No Slip: Fluid sticks to the obstacle surface
Free Slip: Fluid runs freely on the obstacle surface.
Partial Slip: Mix of No Slip and Free Slip. (0 = No Slip, 1 = Free Slip)

Surface:

Smoothing: Amount to smooth surface. (0 = none, 1 = normal, >1 = more than normal). Note that you can also non-destructively smooth the fluid after the back with a Smooth modifier.
Subdivisions Number of subdivisions on the mesh

Remove air bubbles: Remove the gap between the fluid and obstacles. Note that this can result in a dissolving the surface in other places.

Fluid Particles panel:

Tracer: The number of tracer particles to be created in the fluid when the simulation starts.
Generate: The number of fluid particles to generate. Note that you must have Subdivisions set to at least 2 for this to affect the result.

See the wiki for more info.

Some things to note:

Modifiers must be applied in order to affect the fluid simulation

Other notes from the wiki:

  Unique domain
   Because of the possibility of spanning and linking between scenes, there can only be one domain in an entire .blend file.

  Selecting a Baked Domain
   After a domain has been baked, it changes to the fluid mesh. To re-select the domain so that you can bake it again after you have made
  changes, go to any frame and select (RMB Template-RMB.png) the fluid
  mesh. Then you can click the BAKE button again to recompute the fluid
  flows inside that domain.

  Baking always starts at Frame #1:
   The fluid simulator disregards the Sta setting in the Anim panel, it will always bake from frame 1.
      If you wish the simulation to start later than frame 1, you must key the fluid objects in your domain to be inactive until the frame
  you desire to start the simulation. See below for more information.

  Baking always ends at the End Frame set in the Anim panel:
   If your frame-rate is 25 frames per second, and ending time is 4.0 seconds, then you should (if your start time is 0) set your animation
  to end at frame 4.0 × 25 = 100.

  Freeing the previous baked solutions
   Deleting the content of the “Bake” directory is a destructive way to achieve this. Be careful if more than one simulation uses the same
  bake directory (be sure they use different filenames, or they will
  overwrite one another)!

  Reusing Bakes
   Manually entering (or searching for) a previously saved (baked) computational directory and filename mask will switch the fluid flow
  and mesh deformation to use that which existed during the old bake.
  Thus, you can re-use baked flows by simply pointing to them in this
  field.

  Baking processing time
      Baking takes a lot of compute power (hence time). Depending on the scene, it might be preferable to bake overnight.

  If the mesh has modifiers, the rendering settings are used for exporting the mesh to the fluid solver. Depending on the setting,
  calculation times and memory use might exponentially increase. For
  example, when using a moving mesh with Subsurf as an obstacle, it
  might help to decrease simulation time by switching it off, or to a
  low subdivision level. When the setup/rig is correct, you can always
  increase settings to yield a more realistic result.


"Extrude Faces Along Normals" works exactly as "Extrude Faces"

Make sure your pivot point is set to median.
Otherwise it won't work as expected.


How could one unwrap/morph/project a complex 3D mesh to a flat surface?

This script can help you to prepare the animation:

The script should be run in object mode.

The script will report UV map coordinates into a shape key, so that you can animate the shape key.

You need to prepare the mesh: mark seams and make your UV map (you may need to move rotate, scale the uv isles as you wish). If you modify the UV map, run the script again so that the shape key will be updated.

The seams are important because the script will use them to split the original mesh (so your mesh will be modified by the script).

These splits are done because we want each vertex to have only one correspondent uv vertex in the uv map.

It is commented, below, but if some more details are needed, please ask:

import bpy
import bmesh
from mathutils import Vector

print( "------------" )

shape_key_name = "test"
object_name = "Suzanne"
uv_map_name = "UVMap"

obj = bpy.data.objects[object_name]

# Prepare the shape keys

if not obj.data.shape_keys:
    obj.shape_key_add( name = "Basis" )

shape_key = obj.data.shape_keys.key_blocks.get( shape_key_name )

if shape_key:
    obj.shape_key_remove( shape_key )

shape_key = obj.shape_key_add( name = shape_key_name )

# Cut the mesh

# Get a bmesh from the object mesh
bm = bmesh.new()
bm.from_mesh( obj.data )

# Prepare the mesh
bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table()
bm.faces.ensure_lookup_table()

# Split edges that have seam and link to 2 faces
edges = [e for e in bm.edges if e.seam and len(e.link_faces) == 2]
bmesh.ops.split_edges( bm, edges = edges )

# Give the new geometry back to the object
bm.to_mesh( obj.data )

# Get the uv map
uv_map = obj.data.uv_layers[uv_map_name]

# Assign the coordinates to the shape key
for loop, uv_data in zip( obj.data.loops, uv_map.data ):
    uv = uv_data.uv
    vertex_index = loop.vertex_index
    shape_key.data[vertex_index].co = Vector( (uv.x, 0, uv.y) )


How to bring back Archipack measurement diagram when I click other tools?

Select your object, then press "N" to display right panel of 3d view, find "Archipack" tab, and press "Manipulate" on top of this tab.


Without Python:

You can simply select one of the objects and use Shift+L > Material to select all the objects that share the same material. If the object has more than one material, it'll check for the one that's currently active.

With Python:

It's a bit of a workaround. Each material has the attribute users, but this is only the number of users and not actually a list of objects/data.

So in order to get a list of all the objects that use a certain material, we have to loop through the objects, then through each object's material slots:

import bpy

objects = bpy.context.selectable_objects
mat = bpy.context.object.active_material

for obj in objects:
    for slot in obj.material_slots:
        if slot.material == mat:
            obj.select = True


For a fluid simulator like the one you want to create you need:

emitter: the mesh where water comes from (choose flow > liquid & inflow)
effector > collision: the mesh that will act as the collision terrain
domain: it's the area where the simulation should run. Emitter and Effector should be inside the domain

The core steps to create the simulation are:

Put all the stuff in place
select the Domain and press the CACHE button
play the animation and check if everything is ok
select the domain, goto Mesh, select it and CACHE MESH
check result and goto 1 to fix settings if you are not happy with the result
apply shader and similar...

here's what I have to share:

here's the source file of my simulation (you need to cache):
https://pasteall.org/blend/5ff62299dac24ba7adec6d04e350173c


To access the frame info you could create a simple OSL script:

shader frame_node(
    int  frame= 1,
    color Color1 = color(0.8, 0.0, 0.0),
    output color Diffuse = 0)
{
    Diffuse = frame * Color1;
}

and keyframe the frame input socket accordingly.
e.g.:


How do I add custom options to an export script (like triangulate faces, unwrap UVs, etc.)?

To add user adjustable options you add properties to your export operator.

If you want to customize the way the options are displayed, add a draw(self, context) to your operator, which works the same as a panel draw method.

import bpy

class ExportData(bpy.types.Operator):
    """Export objects to file"""
    bl_idname = "export_scene.data"
    bl_label = "Export data"

    do_triangulate = bpy.props.BoolProperty(
            name="Triangulate faces",
            description="Triangulate all faces.",
            default=True,
            )

    sample_float = bpy.props.FloatProperty(
            name="example",
            description="Just an example.",
            min=0.0, max=1000.0,
            soft_min=0.0, soft_max=100.0,
            default=0.0,
            )

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

        row = layout.row()
        row.prop(self, "do_triangulate")

        row = layout.row()
        row.prop(self, "sample_float", expand=True)

    def execute(self, context):
        # do your exporting here

You can find examples of how this works in most of the import/export scripts included with blender such as the obj exporter


Why is my render darker after joining geometry?

So I figured out what was happening. Shadow ray visibility was disabled for the glass. When I merged the glass with the frame, shadow ray visibility got enabled again.


What is the difference between passive and non-dynamic rigid bodies?

here you can find the subtle difference:

https://www.blenderguru.com/tutorials/quick-tutorial-make-a-wrecking-ball-with-rigid-body-physics/

It says:

"We want our chain to swing, so we need the top link of the chain to be stationary. Select it then go to the Physics panel and uncheck Dynamic. This is different to Passive, because it’s still using it’s Mesh collision data but it won’t move."


Animated objects not consistently making contact with rigid body physics objects

In the 6 weeks since I posted this question, I have found solutions and/or work-arounds for the problem.

Here are the relevant points that contributed to the fix:

1) The objects that sit on the conveyor belt were actually imported from an OBJ file that I built outside of Blender.  Independent of my physics issues, I found that these objects were not rendering correctly. The issues seem to be related to normals being strangely wrong. Other users have also noted that OBJ imported objects have normals issues in Blender. I did a bulk swap-out of these imported objects using Ctrl-L Object Data, with a Blender-modeled object. This fixed my render issues.  Was this OBJ issue impacting physics also?  Perhaps.

2) The objects on the conveyor belt each have a Curve Modifier, and animation is done by key-framing the location of one of the objects that is the parent of the other objects on the conveyor belt.  The fix involved creating a set of non-rendered objects that move on a plane in concert with the objects on the belt. These super-simplified "ghost" objects are setup with rigid body physics, and their only purpose is to trigger the mallets.  I was fortunate that all of the mallets are on the same plane.  I removed physics from the belt-mounted objects.  This did the trick!!  My observation is that the critical difference is that not using a curve modifier on objects that need to be part of the physics was the break-through that I needed.

3) Other lessons learned (painfully):

a) I accidentally changed the scene physics speed from 1.0 to 0.1.  This caused everything to react very slowly which took me a while to find the root cause, as I was in the midst of tweaking various rigid body parameters and constraints.

b) Baking - Once I did a full bake on all frames (it took two hours), the scene simulations were much smoother.


I found a hacky way around my issue using ctypes. It's not perfect, but it's something.
The magic line ended up being ctypes.windll.user32.mouse_event(self.MOUSE_RIGHTUP)
With the full code now reading:
import bpy, ctypes

class UnrealRightClick(bpy.types.Operator):
    """Timer that decides whether to display a menu after Right Click"""
    bl_idname = "blui.unreal_right_click"
    bl_label = "Unreal Right Click"

    _timer = None
    _count = 0
    _threshold = 0.2
    MOUSE_RIGHTUP = 0x0010

    def modal(self, context, event):
        if context.space_data.type == 'VIEW_3D':
            if context.mode == 'EDIT' or 'OBJECT':
                if event.type in {'RIGHTMOUSE'}:
                    if event.value in {'RELEASE'}:
                        self.cancel(context)
                        return {'CANCELLED'}

                if event.type == 'TIMER':
                    self._count += 0.01
                return {'PASS_THROUGH'}

    def execute(self, context):
        bpy.ops.view3d.walk('INVOKE_DEFAULT')
        wm = context.window_manager
        self._timer = wm.event_timer_add(0.1, window=context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        ctypes.windll.user32.mouse_event(self.MOUSE_RIGHTUP)
        wm = context.window_manager
        wm.event_timer_remove(self._timer)
        if self._count < self._threshold:
            if context.mode == 'OBJECT':
                bpy.ops.wm.call_menu(name="VIEW3D_MT_object_context_menu")
            # if context.mode == 'EDIT_MESH':
            #     if context.tool_settings.mesh_select_mode = (True, True, True)
            #         bpy.ops.wm.call_menu(name=”VIEW3D_MT_

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

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

if __name__ == "__main__":
    register()

Hope this helps someone else, I'll update it if I can figure out a better solution for the new problem of mouse focus!


What is better for rendering in cycles? A network? Or a single monster workstation?

That will depend on the task and the level of effort you want to put into it.

If you are rendering an animation then you will easily benefit from using multiple machines, each machine can render a single frame at the same time giving a very linear speedup based on number of machines. There is a network render addon included with blender. You may want to look at Flamenco which is the new render farm being developed for the gooseberry project. You could also manually start each machine with a different range of frames. There are also a few render farms available that you can pay by the hour or some similar metric.

If you are rendering a single image then a single machine is the easy way to go. There is no freely available way to break up a single image to render it on multiple machines, it can be done but currently you will need to break up the image and combine it yourself or create an automated way to do it.

There are no restrictions to number of machines you can use on any of the render farm options.


My video is greenish, how do I correct it?

Load your clip on the compositor. Add a Color balance node and move the gamma in the opposite direction of the dominant hue of your scene. If your scene is green you want to make it more magenta.


Parenting provides an important convenience in organizing assemblies of objects - as mentioned in the commentary to your question.

But I guess the most important distinction between joining or grouping objects and parenting them is that, as far as transforms are concerned, the parent-child relationship is one-way. Children inherit the transformations of their parent - but a parent does not inherit the transformations of its children. This is vital to animation and rigging.

Consider a fairly simple animation of, say, the Earth orbiting the Sun, and the Moon orbiting the Earth (even without rotating at different speeds on their own axes) .. try it without parenting, and you'd soon be convinced of the need for it. There would be a lot of maths to do :)


Make sure your fluid inflow has a velocity in the correct direction, and your fluid inflow object is filled (try using a sphere rather than a circle if it doesn't work) Check out one of the basic fluid tutorials on YouTube, as the majority of the techniques you need for this kind of simulation are covered there.


This problematic behaviour can't be changed.

But since it is only a viewport problem, it won't affect the render. The backface and the frontfaces are both visible and don't get rendered properly. There are two temporary options.

Don't show transparency in the viewport. Toggle off show transparency under Properties > Object. To preview the effect you'll have to use the render preview ⇧ ShiftZ.

Enable backface culling, that way the backfaces don't get involved in the viewport render. Transparent frontfaces are combined correctly.


Actually you've joined several objects to make one object but it is still made of several separate meshes. As long as they are separate you won't be able to create any welding, except a fake one with this welding node but I don't know if it's already available. So the simplest is to use the Boolean tool: Go in Edit mode, select all your meshes except one (use L to select a mesh), go in the horizontal header menu > Face > Intersect (Boolean), and in the operator box (bottom left of the 3D View), choose Boolean > Union. Now your meshes are merged into one and you can create a welding effect, in sculpting mode if you want, or with bevels...


Baking animations on a Rigify rig with child of constraints does not preserve constraint

Ok, maybe this is not the best answer but it worked:
I duplicated the skeleton (just the deform bones from the original skeleton, NOT the rigify stuff). Then I added copy-transform constraints to all these new bones, mapping them back to the original.
Now on the new skeleton I can bake and everything works. I suspect the issue is that "clear constraints" does something that does not play nicely with Rigify, but am not sure. Duplicating to a new skeleton that copies the original worked.


Unexpected result adding the Array modifier

Go to your curve settings and change the Twist Method from Minimal to Z-Up.
To get the look in the image (one facing the back of the next) I had to rotate the Suzanne head (in edit mode) 90 degrees on the Z axis. I also added a subdivision surface modifier, simply because the smoothed models seemed easier to see in the screenshot.


Bones move out of mesh when changing from Edit mode to Object mode

You have a bit messed up your armature in Pose mode, so you need to switch back to Pose mode, select all your bones, then alt s, alt r, alt g (reset scale, rotation and location)


How does BGE handle Python class definitions?

There are a couple of ways. Here is a simple one:

Write your class e.g. Character.

Character object knows the game objects of the character.

class Character():
    def __init__(self):
        self.skeleton = None
        self.leftHand = None
        self.rightHand = None
        ...

# builder
character = Character()
character.skeleton = scene.objects["Armature"]
character.leftHand = scene.objects["Hand.L"]
...

The game objects might need to know the Character object too:

character.skeleton["character"] = character
character.leftHand["character"] = character

This way you get a cross reference. When you know one of the game objects you can get the according character:

character = gameObject["character"]

When you know the character instance you do not need to dig through the properties anymore.

You could create a factory that establishes these cross references. This keeps this "management" code away from the character's behavior.

You can dynamically exchange references. E.g. the character grabs a book. So you can assign the book to the right hand. You character eats the apple it holds in right hand, you can remove the link between the apple and the right hand, then you can end the apple.

Be aware the BGE events are always applied to game objects (such as collision, ray ...). As said you can get the python character via property.

myCharacter = owner["character"]
hitObject = sensor.hitObject
hitCharacter = hitObject["character"]


The answer for me was to download from blender.org instead of installing using apt.


Bokeh or defocus in Blender's default render engine?

If you select your camera, and go to the camera tab on the properties bar, there should be a Depth of Field tab.

You can change the object that will be the focus point, or you can input a distance instead. Change the value of F-Stops to achieve the Depth of Field/Blur effect you're going for.
As for Bokeh, tick the High-Quality box and you can change the number of blades to whatever bokeh effect you're trying to achieve.


Changing filename format based on current animation frame?

To make the output direct to specific directories dependent on frame you could add a handler to automatically set the scene.render.filepath before rendering the frame.

As an example, open a Text Editor window, click 'New' and enter the following code :

import bpy
def handler_set_filepath_based_on_frame(scene):
    scene.render.filepath = '//WalkingAnimation/%i_%i' % (scene.frame_current // 12, scene.frame_current % 12)
bpy.app.handlers.frame_change_pre.append(handler_set_filepath_based_on_frame)

Click the 'Run Script' button to run it and every time the frame changes the File Path should be automatically updated. Check the 'Register' checkbox to make it automatically run each time the .blend is opened.

If you then manually skip through the frames you should see the render output filepath automatically updating.

The calculation 'scene.frame_current // 12' is for the prefix and will increment by 1 for each 12 frames while the 'scene.frame_current % 12' will count the individual frame within each 12.


Probably this is what you are looking for:

Use the Mapping node to move the orientation.

Good Luck


adding new letters/symbols from character map? How do you do it?

You can't paste this symbols because standard blender font has no this symbols.

Select different font, that has this specific symbol (for example Times new roman), from your text object here:


Origin of individual faces don't show up

To move faces along their individual normals, you need to change the Transform Orientations to "Normal" as well as the pivot point to individual origins. Then use G -> Z to move the faces along their individual normal direction.

If you wish to add geometry, use "Extrude Along Normals"

And to visualize the normals, the setting is in the Viewport Overlay dropdown:


The mirrored half can still be manipulated

looks like you applied the modifier. Now your mesh is one. Select all the verts on the left side, delete them, than add the mirror modifier again


There are a few ways to use Python to inspect an objects properties, but in this case you're best off using getattr, setattr.

In the case you describe I think the best option is to store a list of properties,
mainly because there isn't a good way to know which properties you created. (Blender doesn't track a properties owner).

for prop_id in prop_names:
    setattr(scene, prop_id, value)

... for completeness, to copy scene_src -> scene_dst

for prop_id in prop_names:
    setattr(scene_dst, prop_id, getattr(scene_src, prop_id))

Note, theres nothing spesific to custom propertes here, this is typical Python and world with any properties (called attributes in Python)


Normal/Bump/Color created in Substance Painter doesn't appear correct in rendered model material

Turns out I hadn't created a UV unwrap of my model, and thus the texture/heightmap/normal map wasn't being applied.


Change color of PNG background (transparent to color)

I would just add in a MixRGB node between your transparent image and the color of the principled shader.

Make sure you plug in the alpha socket into the factor of the MixRGB node and change the color to your liking.


This is a simple one keyboard shortcut thing to do. With the "trapped" node, or nodes selected press AltP.

As the manual says:

  To remove them select the node(s) and use the Alt-P shortcut. This uses the same default keyboard bindings as Parenting and can be thought of as a similar concept.

If you really wanted to, you could always delete the frame node with Delete which would leave any nodes that were in the frame in place (the nodes inside the frame do not get deleted unless they are selected too).

Also you do not have to drop the nodes over the frame to get them in the frame. With the nodes selected and the frame active, press CtrlP (keeping with the parenting concept) to add them to the active frame.


@pycoder is right. You have different rotations on the curve and text object.
To double check the rotations, check Axis under Display in the Object context in the Properties area.
Select all objects, then Alt click on the Axis checkbox, to change the property of all objects at once.

The axis will be displayed in the 3D viewport. Notice, how the lower curve is oriented different than all other objects.

The Bottom curve has (0, 0, 0) rotations (image above), but all other curves have different rotations.

If we zero out the rotations (Alt + R), the behaviour of the Text On Curve is now obvious.

Step by step solution

Since we can't apply the rotation of the text. We will have to recreate the curve with the text's orientation.

Duplicate the curve.
Select the text, Shift select the curve, then press Ctrl + Shift + R and select Copy Rotation. We now added a copy rotation constraint to the duplicate curve. They have the same orientation.
Select the duplicated oriented curve and make its visual transform real. (Ctrl + A > Visual Transform)
Remove the constraint.
Delete the (wrong) vertices of the correctly oriented duplicate curve.
Select the curve, Shift select the duplicate curve and join them (Ctrl + J).
Apply the text on curve property.


Save the bounding box position of an object in a text file

This is an interactive tool, a modal operator that draws the x, y, width and height of the bounding box corners viewed from front (use ortho to check):

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

class G:
    top_left = Vector()
    bottom_right = Vector()

def draw_poll(ob):
    if ob is not None and ob.type in ('MESH', 'CURVE', 'SURFACE', 'META', 'FONT'):
        return True
    return False

def draw_callback_view(self, context):

    ob = context.object
    if not draw_poll(ob):
        return

    mat = ob.matrix_world

    # 50% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(1.0, 0.0, 0.0, 0.5)
    bgl.glLineWidth(2)

    bbox = [mat * Vector(b) for b in ob.bound_box]

    bgl.glBegin(bgl.GL_LINE_STRIP)
    bgl.glVertex3f(*bbox[0])
    bgl.glVertex3f(*bbox[1])
    bgl.glVertex3f(*bbox[2])
    bgl.glVertex3f(*bbox[3])
    bgl.glVertex3f(*bbox[0])
    bgl.glVertex3f(*bbox[4])
    bgl.glVertex3f(*bbox[5])
    bgl.glVertex3f(*bbox[6])
    bgl.glVertex3f(*bbox[7])
    bgl.glVertex3f(*bbox[4])
    bgl.glEnd()

    bgl.glBegin(bgl.GL_LINES)
    bgl.glVertex3f(*bbox[1])
    bgl.glVertex3f(*bbox[5])
    bgl.glVertex3f(*bbox[2])
    bgl.glVertex3f(*bbox[6])
    bgl.glVertex3f(*bbox[3])
    bgl.glVertex3f(*bbox[7])
    bgl.glEnd()

    min_x = min(b.x for b in bbox)
    max_x = max(b.x for b in bbox)
    min_y = min(b.y for b in bbox)
    max_y = max(b.y for b in bbox)
    min_z = min(b.z for b in bbox)
    max_z = max(b.z for b in bbox)

    bgl.glColor4f(0.0, 1.0, 0.0, 0.5)
    bgl.glBegin(bgl.GL_LINE_STRIP)
    bgl.glVertex3f(min_x, min_y, min_z)
    bgl.glVertex3f(min_x, max_y, min_z)
    bgl.glVertex3f(max_x, max_y, min_z)
    bgl.glVertex3f(max_x, min_y, min_z)
    bgl.glVertex3f(min_x, min_y, min_z)
    bgl.glVertex3f(min_x, min_y, max_z)
    bgl.glVertex3f(min_x, max_y, max_z)
    bgl.glVertex3f(max_x, max_y, max_z)
    bgl.glVertex3f(max_x, min_y, max_z)
    bgl.glVertex3f(min_x, min_y, max_z)
    bgl.glEnd()

    bgl.glBegin(bgl.GL_LINES)
    bgl.glVertex3f(max_x, min_y, min_z)
    bgl.glVertex3f(max_x, min_y, max_z)
    bgl.glVertex3f(min_x, max_y, min_z)
    bgl.glVertex3f(min_x, max_y, max_z)
    bgl.glVertex3f(max_x, max_y, min_z)
    bgl.glVertex3f(max_x, max_y, max_z)
    bgl.glEnd()

    G.top_left = Vector((min_x, min_y, max_z))
    G.bottom_right = Vector((max_x, min_y, min_z))

    bgl.glColor4f(1.0, 0.9, 0.0, 1.0)
    bgl.glPointSize(5)
    bgl.glBegin(bgl.GL_POINTS)
    bgl.glVertex3f(*G.top_left)
    bgl.glVertex3f(*G.bottom_right)
    bgl.glEnd()

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

def draw_callback_px(self, context):

    ob = context.object
    if not draw_poll(ob):
        return

    font_id = 0
    blf.size(font_id, 20, 72)

    region = context.region
    rv3d = context.space_data.region_3d

    text = "%.2f / %.2f" % G.top_left.xz[:]
    dim = blf.dimensions(font_id, text)
    loc = location_3d_to_region_2d(region, rv3d, G.top_left)
    loc.x -= dim[0]
    blf.position(font_id, *loc.to_3d())
    blf.draw(font_id, text)

    text = "%.2f / %.2f" % tuple(map(abs, (G.top_left - G.bottom_right).xz))
    dim = blf.dimensions(font_id, text)
    loc = location_3d_to_region_2d(region, rv3d, G.bottom_right)
    loc.y -= dim[1]
    blf.position(font_id, *loc.to_3d())
    blf.draw(font_id, text)

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

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

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

        return {'PASS_THROUGH'}

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

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

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

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

if __name__ == "__main__":
    register()

    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            context = bpy.context.copy()
            context['area'] = area
            bpy.ops.view3d.modal_operator(context, 'INVOKE_DEFAULT')
            break

The relevant part for you (front view only):

import bpy
from mathutils import Vector

ob = bpy.context.object
mat = ob.matrix_world
bbox = [mat * Vector(b) for b in ob.bound_box]

min_x = min(b.x for b in bbox)
max_x = max(b.x for b in bbox)
min_z = min(b.z for b in bbox)
max_z = max(b.z for b in bbox)

top_left = Vector((min_x, max_z))
bottom_right = Vector((max_x, min_z))

# x and y
#top_left

# width and height
#tuple(map(abs, (top_left - bottom_right))

And here's some code to write out what you asked for (front view):

import bpy
from mathutils import Vector

def main():

    # specify the object
    ob = bpy.context.object

    # change to your desired output location and file name
    filepath = r"D:\temp\bounds_2d.txt"

    scene = bpy.context.scene
    frame_current = scene.frame_current
    frame_start = scene.frame_start
    frame_end = scene.frame_end

    write_bounds_3d(filepath, ob, frame_start, frame_end)

    scene.frame_set(frame_current)

def write_bounds_3d(filepath, ob, frame_start, frame_end):

    with open(filepath, "w") as file:
        for frame in range(frame_start, frame_end + 1):
            bpy.context.scene.frame_set(frame)
            file.write("%f %f %f %f\n" % get_bounds(ob))

def get_bounds(ob):
    mat = ob.matrix_world
    bbox = [mat * Vector(b) for b in ob.bound_box]

    min_x = min(b.x for b in bbox)
    max_x = max(b.x for b in bbox)
    min_y = min(b.y for b in bbox)
    max_y = max(b.y for b in bbox)

    top_left = Vector((min_x, max_y))
    bottom_right = Vector((max_x, min_y))

    # make flat tuple, x y width height
    return top_left.to_tuple() + tuple(map(abs, (top_left - bottom_right)))

if __name__ == '__main__':
    main()


How to export grease pencil's layers to another Blender file?

I found a way to do this using Link or Append Data Block from Blender file, on the File menu.


Bevel vertices on a flat subdivided plane

In 2.79 (or 2.9), I don't think you can have it in one step.
You can extrude along Z EZ, bevel the corner edges CtrlB, delete the extrusion X:


By default a particle emitter has some velocity relative to the normal of the emitter and is affected by gravity.  You can turn the normal velocity to 0 and turn off gravity, and then use the Object Aligned velocity to do what you want.


Why do automatic bone weights paint distant meshes

Yes, there are some issues with your work. Several objects have their origins misplaced, rotations and scale unapplied, non-uniform scales, ... You must always fix this before even creating the armature. And never scale your armature unless the rigging and skinning are completed and you really have to.

Also, automatic weight never does a perfect job, and it surely works better when you have your bones and meshes correctly placed, not set in a pause which may lead to confusions (like the arms stuck along the body) and with enough bones and vertices to make the assignations obvious.

In your case, you have a very simple mesh and with not mathematically logic needs for the weights, so you will be way faster by assigning your weights in edit mode or weight paint.


My renders are showing these distortions and I can't see why

These look like artefacts from the denoising process, with too much of low samples in that area. Add more samples to the rendering.


The problem was that the rig's maximum draw type was solid. changing it back to wire solves the issue.


Click Append in File menu
Browse file \ Brush and select brushes you need (b for box select)
In Sculpt mode click on brush preview image and select one

Updated:

Brushes will be saved in you curent file.

  Thought I had it once but they disappeared once I click on one.

That mean you have not saved your brushes in Startup file. If you need these brushes in each your project - you need to save they in Startup.

Be careful - with brushes all other data (objects, UI and so on..) will be saved as Startup! Preferably create New file, import brushes and then save Startup file.

Blend file with brushes


One easy way is to use the Rigify add-on.
Check the tutorial « Quick Rigging With Rigify in Blender » from CG Cookie.


Gradient texture not showing up in rendered view

Shaders

A shader is the function that describes the lighting interaction at the surface or of the volume. That is different from the color of the surface itself.

A red carpet's surface is still of the same shade of red even in a dark room, we just perceive it dark because there is no light around.

At the moment you are defining only the "color property" (yellow socket) of the surface, but not how this property should interact with light. You shoud use one of the nodes you can find under the "shaders" menu. It will acquire the color data as input and output a shading data (green socket) that should be connected to the Surface's socket of the MAterial output.


Nevermind I think it was a bug! I closed the program and opened it up again and got this pop up window!


Use fSpy. It’s designed specially for what your dealing with.
https://fspy.io/


Boolean does not slice correctly using difference

First select both of the objects you are going to use to cut, and join them as a single object (CtrlJ:

Then set the boolean to intersect:

To see the results you can move the cutting object to a separate layer or hide it.

Just for fun, here are the other possible booleans with these two objects:


Node single property variable not working?

You should use node_tree.nodes["Math"].inputs[0].default_value

When you open Outliner and select Datablocks in the header you can see and list the data structure.


I would say there are two criteriae for the machine: speed of the UI and 3D-tools and speed of the renders. For the UI you are very well covered. (I have been desperately sculpting with dyntopo on a 15-year old two-core no physical (integrated or other) graphics card (I had to virtualize an old OpenGL-compatible card). It was awful, but OK for the very desperate cases)

So everything 3D or UI, you are good. Then there is rendering. If you want to render with Cycles, you want to use a CUDA enabled (ie. Nvidia-brand) graphics card. There should be changes to this on the way, but for now that's the deal. So while you would have a powerful graphics card, you couldn't practically use the card for rendering.


You have already got your image map and UV done? Then all you need to add is the bump, roughness map for the emboss. For the metal look you will need a metallic map for the metal text. If you don't know what a metallic map is then you will have to do a quick search on shading for blender.


How to make objects appear when I want to see without clicking 'Disable/ object in render'

Keyframes can be added for the visibility settings. Select the object and open the Object tab. In the Visibility panel you can adjust the settings and insert a keyframe either through the context menu or by pressing I.

For your specific problem, you could insert a keyframe at frame 0 with Show in Viewports and Show in Render disabled, then a keyframe at frame 100 with Show in Viewports and Show in Render enabled, followed by a keyframe at 201 with both disabled again.


Rounded bevel for selected vertices in a plane

Option 1: Setting with Scroll wheel

If you use the scroll wheel while in bevel mode the bevel uses more edges, giving the corner a more rounded look.

Option 2: Using the advanced tool menu popup:

There is also another way (which doesn't need a scroll wheel) to set more advanced settings for the bevel function (actually works for any tool and add primitive actions).

After you did the tool action (in your case bevel) a small popup is seen in the left corner of the 3d-view screen (in Blender 2.80) which you can click to expand it. There you can modify the action you just did.

PS: In Blender 2.79b this advanced tool menu was located in the tools tab

Option 3: Use the +/- keys

As quoted from the comment from @lemon you can also

  "use + or - from the keypad." - lemon

to increase the segments of the bevel tool.

Happy Blending! :)


If there are no materials applied to the mesh, first material that is created will be applied to whole mesh. There can not be part of mesh without a material. You have to create additional material for those specified faces.


Blender 2.82 animation nodes toolbar is missing

Since the new version (2.17) of Animation Nodes the Node Tree Options are present in the Sidebar (Right panel). Use N to reveal the panel.


Cycles material node set-up for diffuse, specular, reflection/refraction, normal and illumination/emission map

Here is how the maps you mentioned are usually arranged.

There is an error in the image, the normal map node should be plugged into both the glossy and diffuse shaders.

The diffuse texture is just plugged directly into the color of a diffuse shader.  The diffuse shader is mixed with a glossy shader using the spec map as a mix factor; for further control of the specularity I stuck an RGB curves node in to adjust the falloff curve, that part is optional.  The normal map is put through a normal map node which is then plugged into the normal input sockets on the shaders.  The emission map is plugged into an emission shader, which is added to (not mixed with) the rest of the shaders.  If your emission map is colored, plug it into the color of the emission shader, otherwise plug it into the strength and set the color to whatever you want.

Note: make sure all maps which are used to drive values (e.g. specularity), not colors (e.g. diffuse color), are set to non-color data.

I noticed that you said you have a specularity map, and a reflection map.  But I am not quite sure what the difference between these two maps is, since for cycles (as in the real world), gloss and specularity are the same thing.  And technically all surfaces you see reflect light (you couldn't see it if it didn't reflect light to your eyes); though what people usually mean when they say reflective is glossy.


Line of Bones to Travel and Conform to Curve (Train or snake following path)

Mesh and curve modifier.

Once set up, can travel along curve by displacing our dummy edge object
Having tried a method similar to @moonboots answer in writing a train addon found using the method outlined below kept the wheels on track (better if the curve is too tight nothing will help).  This may not matter too much with a deforming object like a snake. However it only requires making one very simple mesh object, with vertex groups as tagets for bone constraints.
Trying to place empties on the curve with offsets will cause the "train to derail" as the offset is looking at curve length rather than where the line segment next meets the curve.  For example a unit circle radius  1, can hold a square with edge lengths sqrt(2)  each corner touches the circle.  The arc length is p1 / 2  Trying to get the empty locations right on a complex curve is IMO too hard.
If a mesh is created and threaded onto a curve with a modifier the edge lengths are preserved.
Create a simple mesh as shown. With edges and verts emulating bones.

Here the mesh is moved 1 over for visual

Add a curve modifier to the mesh. I've made the mesh z up to cooncide with bones global orientation, so I track the mesh on curve using Z.  The mesh can "run on the tracks" by animating its Z location property. Can switch tracks by changing this one modifier target

Next we add a copy location constraint of root bone to our mesh object, with base vertex group as a subtarget, and a track to constraint along the axis of bone "Y" to the next vertex group.
For all subsequent bones in chain add track to constraint to next vertex group.


You can add UV maps using the '+' button in the ObjectData tab (on right on the image).

Then use it in the node editor, from the 'input' category (on left on the image).

Then you can use them in the node tree as you want.

How to switch UV maps in the UV Editor window:


Run an edit-mode operator on every object in the scene

There are 2 ways you can do this:

Standard API (bpy) - the most straightforward is to set each object in editmode and run the tool.

Notice I'm not using bpy.data.objects, This will operate on all objects in your blend file, not just your scene, instead use bpy.context.scene.objects.

import bpy

scene = bpy.context.scene
for ob in scene.objects:
    if ob.type == 'MESH':
        scene.objects.active = ob
        bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        bpy.ops.mesh.reveal()
        bpy.ops.mesh.select_all(action='SELECT')

        # execute any editmode tool
        bpy.ops.mesh.tris_convert_to_quads(limit=0.9,
                                           uvs=False,
                                           vcols=False,
                                           sharp=False,
                                           materials=False)

        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

Note:
You need to be careful trying to edit all objects, some may be hidden, not on a visible layer, or linked in from an external file (and can't be edited). For this reason its often better to use context.selected_editable_objects

bmesh module (Docs) - bypass bpy.ops modes and edit the mesh directly.
In this case using the bmesh api. Note that this is specific to meshes, curves, metaballs etc will need to use bpy.ops still since they don't have an equivalent to bmesh.

import bpy
import bmesh

scene = bpy.context.scene
for ob in scene.objects:
    if ob.type == 'MESH':
        me = ob.data
        bm = bmesh.new()
        bm.from_mesh(me)

        # execute any bmesh operator
        bmesh.ops.join_triangles(bm, faces=bm.faces,
                                 limit=0.9,
                                 cmp_sharp=False,
                                 cmp_uvs=False,
                                 cmp_vcols=False,
                                 cmp_materials=False)
        bm.to_mesh(me)
        bm.free()

Note:
The examples above may touch the same mesh multiple times since many objects can share the mesh, You almost never want this, at worst it gives invalid results because the tool runs many times, at best the script just runs slowly and does a lot of useless calculation.

Here is an example which ensures meshes are only edited once.

import bpy
import bmesh

scene = bpy.context.scene
unique_meshes = set([ob.data for ob in scene.objects if ob.type == 'MESH'])

for me in unique_meshes:
    bm = bmesh.new()
    bm.from_mesh(me)

    # execute any bmesh operator
    bmesh.ops.join_triangles(bm, faces=bm.faces,
                             limit=0.9,
                             cmp_sharp=False,
                             cmp_uvs=False,
                             cmp_vcols=False,
                             cmp_materials=False)
    bm.to_mesh(me)
    bm.free()


How do I apply a light/dark mask to a mesh?

It is a bit difficult to understand what you are describing. I would have to assume you are using Cycles, and that you already have a mesh that is UV unwrapped to match the layout of this image.

If the above is true, you would "apply a light /dark mask"  by using a mix node set to overlay mode. You would plug your underlying surface into the top of the mix node, and plug this image into the bottom of the mix node. Overlay ensures it will lighten or darken as appropriate to your image. You would then increase the factor to get a level of mixture that you desired.

Hope that helps.


Blender system console character encoding

I realized that the Translation option in the Interface tab of the User Preferences causes this problem.
I hope there is no interference between UI Translation and the Systeme Console.


Export add-on error: rna_uiItemO: operator missing srna 'x.y'

The registration of the operator was broken. The bpy.utils.register_classes_factory() generates a register() and unregister() function for all supplied classes, but doesn't call them. There was also a , missing in the class tuple.

classes = (
    ExportUrchin,
)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.TOPBAR_MT_file_export.append(menuFunc)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    bpy.types.TOPBAR_MT_file_export.remove(menuFunc)


First make the arrow point in X direction by editing the mesh:

Then enable Rotation tab for particle system and check Dynamic:

Your particles will now rotate along the Curve guide accordingly:


How to model a complex shape like this ornate window?

There are many possible ways you could go about it, but perhaps this will give you some ideas.
Instead of thinking of the window as a solid chunk, think about the separate parts (sill, frame, bar things, glass, etc.) as, well, separate.
For example:

Model the frame:

Add the bar things as separate parts:

Add the glass:

The result here is admittedly pretty terrible, but in my defense I was hurrying so that the the gifs wouldn't be too big.. If you spend a little more time adding details to each of the components, you can get something more like this:

By adding even more detail (e.g. screws) to the places were parts are attached, you might make it even more believable.


Where is Add / Subtract button on sculpting in Blender 2.8

On the right in the Tool preferences, you can find them there.


How to obtain/enable Blender 2.8 "shortcut properties"?

In 2.81 ic_keymap removed, and this function you can use now from object.mode_set_with_submode.

If you open 2.81 with industry compatible keymap, you will see, that now it useobject.mode_set_with_submode for this shortcut


Is it possible to create a Voronoi RadialLine?

Here, working in Object Space. The Position output of the Voronoi node is the location of the feature point from which the attributes (distance, etc) of the local cell are measured. If you subtract it from the shading point, you get the vector from the feature point to the shading point .. a mini UV map for each cell, with its origin at the feature point.

If you Nornalize those coordinates, you get a measure of direction from the cell origin expressed as XY (all the points in the same direction from the cell origin will all have the same unit vector), so that can be used for radial effects. Here, the vector is used to look up into a Noise texture.

Edit: Working in 3D, and normalizing at every stage, effectively ensures all the points used in the direction calculations are projected onto the unit sphere, towards or away from its center:

..and so straight lines become arcs:

(but this will work only on a sphere, not on any curved surface, and, to work in Object Space, the origin of your sphere-object should be at its center)
Edit 2:
You can animate the effect by scaling the sphere onto which the feature-point is projected:

With this sort of result:

This is the simplest way. To get more specific effects, you may have to extract, say, the Normal Z to work with, which would be a bigger tree.


If anyone sees this and knows what I did wrong I would appreciate it if you post, but for now, I just manually keyframes my model to stay in the right position so to avoid wasting peoples time I'm going to mark this as an answer.
Have a nice day!

I guess I'm waiting two days to be able to mark my own post as an answer.... Why?


The problem might be in the camera end clipping distance value. Try to increase it if low.


I think you should use IK constraints, expecially with this stretch function:

Also "Mantain volume" bone constraint can be useful.


Rigging objects to Second Life Armature Issue

I have somehow fixed my issue.

I re-opened Blender and started completely over.
Staying in scene one, I uploaded the Second Life Avatar. Then I opened the foot file I wanted to attach and rig. I realigned the foot to match exactly vertex for vertex again.

Once perfectly aligned, I pressed shift + D to duplicate it in case I somehow mangled it. I moved this to a new scene.

In the new scene, I placed a box inside my foot so that I could apply a mirror modifier to create the opposite foot. I then went into edit mode and chose faces and deleted the cube faces inside the foot so that it won't be seen in Second Life. I took a copy of the mirrored foot into scene one and aligned it to the SL Avatar.

I then chose both feet, rigged them to the armature by pressing Control + P and chose Deform with empty vertex groups.

Lastly, I chose the legs of the avatar (which included the original feet) and then chose the feet, changed to weight paint mode and chose transfer weights.

I checked the rig by going into pose mode and rotated the feet to make sure it was all working correctly. It was!


It looks like these two vertices mess up the topology:

For the left one, press V, choose Aligned, move it a bit and and move the handles (or even delete it), for the right one, select and move the handle on the X axis so that it doesn't collapse with the vertex:

And it should work:


How to add shadows to material properties in cycles?

Those settings are for either Blender Internal rendering engine, or for the Blender Game Engine, displaying shadows in the viewport for Blender Cycles materials and shader is not currently supported.

Either switch rendering engines (on the pulldown menu that reads Cyckes Render in the header of the Info Window on the top blender screen) and rebuild your materials for the new render, if your priority is getting viewport shadows; or if you wish to remain with Cycles then use viewport rendered preview  (Shift + Z)

Edit: To achieve a shadowless material setup in cycles you can use a light path node to drive a mix shader between a glass and a transparent shader as illustrated bellow.


So, here is the solution we've found:

Create a controller for your foot, deparent it, parent the foot to this controller.
Choose this controller as the Target of your calf's IK.
The Chain Length of your calf's IK constraint must be 2.
Create a new controller at the bottom of your bone D.
Parent this second controller to the foot controller (Keep Offset).
Parent the pole target of your calf to the foot controller (Keep Offset).
Add a Copy Location constraint to your foot so that it sticks to the calf.
Add a Damped Track or an IK constraint to the bone D and choose the new controller as your Target

Also note that you can limit the IK bones rotations in Properties > Bone > Inverse Kinematics, or with a Limit Rotation constraint, depending on the bones and the chosen solution.


The first problem is the context view3d.select_border() should be called inside the 3D_VIEW region,
the second problem is the gesture mode which should be 3 for the function to work.

A minimal code example will be :

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        override['region'] = area.regions[4]
        bpy.ops.view3d.select_border(override, gesture_mode=3, xmin=0, xmax=600, ymin=0, ymax=600, extend=True)
        break

And this is more extended example which implement the border selection tool ( when you press B ) the following script is a modal operator with bgl drawing function to draw the box of selection.

run the script
in the 3d view hit Space and type Simple Box
start selecting by holding the LMB and end selection by releasing it

import bpy
import bgl
from mathutils import Vector
from bpy.props import IntProperty, BoolProperty

def draw_callback_px(self, context):

    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(1.0, 1.0, 1.0, 0.5)
    bgl.glLineWidth(2)

    if self.selecting :
        # when selecting draw dashed line box
        bgl.glEnable(bgl.GL_LINE_STIPPLE)
        bgl.glLineStipple(2, 0x3333)
        bgl.glBegin(bgl.GL_LINE_LOOP)

        bgl.glVertex2i(self.min_x, self.min_y)
        bgl.glVertex2i(self.min_x, self.max_y)
        bgl.glVertex2i(self.max_x, self.max_y)
        bgl.glVertex2i(self.max_x, self.min_y)

        bgl.glEnd()

        bgl.glDisable(bgl.GL_LINE_STIPPLE)
    else :
        # before selection starts draw infinite cross
        bgl.glBegin(bgl.GL_LINES)

        bgl.glVertex2i(0, self.max_y)
        bgl.glVertex2i(context.area.width, self.max_y)

        bgl.glVertex2i(self.max_x, 0)
        bgl.glVertex2i(self.max_x, context.area.height)

        bgl.glEnd()

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

class SelectOperator(bpy.types.Operator):
    """simple box selection """
    bl_idname = "view3d.box_select"
    bl_label = "Simple Box Select Operator"

    min_x = IntProperty(default = 0)
    min_y = IntProperty(default = 0)
    max_x = IntProperty()
    max_y = IntProperty()

    selecting = BoolProperty(default = False) # just for drawing in bgl

    def modal(self, context, event):
        context.area.tag_redraw()
        if event.type == 'MOUSEMOVE': # just for drawing the box
            self.max_x = event.mouse_region_x
            self.max_y = event.mouse_region_y

        elif event.type == 'LEFTMOUSE':
            if event.value == 'PRESS': # start selection
                self.selecting = True
                self.min_x = event.mouse_region_x
                self.min_y = event.mouse_region_y

            if event.value == 'RELEASE': # end of selection
                #we have to sort the coordinates before passing them to select_border()
                self.max_x = max(event.mouse_region_x, self.min_x)
                self.max_y = max(event.mouse_region_y, self.min_y)
                self.min_x = min(event.mouse_region_x, self.min_x)
                self.min_y = min(event.mouse_region_y, self.min_y)

                bpy.ops.view3d.select_border(gesture_mode=3, xmin=self.min_x, xmax=self.max_x, ymin=self.min_y, ymax=self.max_y, extend=True)
                bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
                return {'FINISHED'}

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

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):

        if context.space_data.type == 'VIEW_3D':
            args = (self, context)
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Active space must be a View3d")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()


How to make animation like this using array?

You don't need an array, what you need is a curve with the shape you want and then use dupliframes.

To set it up read How can I duplicate a mesh along a curve?

Then, animate the "duplication end" for the object used along the curve Read: How can i add more duplicates to a curve?


Can I have both 2.79 and 2.8 on my system? Will one interfere with the other?

You can install multiple versions of Blender alongside without them interfering.

They will each have their own Preferences and scripts folder. On windows, there will be a folder for each version.

You can also use a Blender version without "installing" it by downloading the portable version.


follow a straight line on an already made mesh

You can use the Knife tool:

To make it perfectly lined up:

Set your starting point and hover until the vertex (of the line you want to extend) turns red:

I hope this works!


Bone "Mirror names" function makes bones parented

In the 3D View N panel, deactivate the X-Axis Mirror option, it makes the opposite bone move when you move a bone.


How to get the 3D coordinates of the visible vertices in a rendered image in Blender

A partial solution, due to some approximation in ray cast (or some bug in my script?).

This solution uses 'world_to_camera_view' from bpy_extras.object_utils module. 'world_to_camera_view' returns the projection of a vertex in camera's coordinates, which means that the vertex is inside the camera view if the projected coordinates are between 0 and 1.

From that, the script is testing if the corresponding vertex is visible from the camera (and not hidden by another part of the mesh). To do that, it's using a ray cast from the camera location to the vertex.

Unfortunately, some of these ray casts fail... but this script is close to your need and that's why I provide it as an answer.

Hope that can help though.

import bpy
from mathutils import Vector
from mathutils.bvhtree import BVHTree
from bpy_extras.object_utils import world_to_camera_view

# Create a BVH tree and return bvh and vertices in world coordinates
def BVHTreeAndVerticesInWorldFromObj( obj ):
    mWorld = obj.matrix_world
    vertsInWorld = [mWorld * v.co for v in obj.data.vertices]

    bvh = BVHTree.FromPolygons( vertsInWorld, [p.vertices for p in obj.data.polygons] )

    return bvh, vertsInWorld

# Deselect mesh polygons and vertices
def DeselectEdgesAndPolygons( obj ):
    for p in obj.data.polygons:
        p.select = False
    for e in obj.data.edges:
        e.select = False

# Get context elements: scene, camera and mesh
scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']

# Threshold to test if ray cast corresponds to the original vertex
limit = 0.0001

# Deselect mesh elements
DeselectEdgesAndPolygons( obj )

# In world coordinates, get a bvh tree and vertices
bvh, vertices = BVHTreeAndVerticesInWorldFromObj( obj )

print( '-------------------' )

for i, v in enumerate( vertices ):
    # Get the 2D projection of the vertex
    co2D = world_to_camera_view( scene, cam, v )

    # By default, deselect it
    obj.data.vertices[i].select = False

    # If inside the camera view
    if 0.0 <= co2D.x <= 1.0 and 0.0 <= co2D.y <= 1.0:
        # Try a ray cast, in order to test the vertex visibility from the camera
        location, normal, index, distance = bvh.ray_cast( cam.location, (v - cam.location).normalized() )
        # If the ray hits something and if this hit is close to the vertex, we assume this is the vertex
        if location and (v - location).length < limit:
            obj.data.vertices[i].select = True

del bvh


Fluid simulation not baking when an obstacle is present

I think i figured it out. Messing with the Volume Initialization (Volume, Shell, or Both) seemed to fix the baking issue. Thank you Yohello 1 for the response!
I had the obstacle set to both, which wasn't working. Switched it to shell and it worked fine. Pretty sure volume worked as well, just not both.
Hope this helps others too.


Should I find a way to assign them?

Yes. If the vertex group option is checked:

You can use the weight paint mode to change the weights of the active vertex group (current selection in the properties panel):

Assign/Remove the selected vertices to/from the active vertex group in the properties panel:

and change their weights in the viewport:


Different animations for different scenes for a linked armature

When you link an Object from one Scene to another all changes are transferred from one Scene to another, even animations. That is because the same Object and Armature are used. There is a quick way of fixing this for your case: Add a new armature object in each scene, then select each one of them and make sure they use the same Armature. You can make the selection here:

All changes to the Armature in Edit Mode will be transferred to all other scenes but changes made in the Pose Mode will be Scene specific.


This is a duplicate question, but it’s a duplicate of something I asked. Yes, thankfully you can easily limit how bones behave with IK. Go to the bone properties tab, and look for “IK settings.”


Semi-transparent lightning image rendering incorrectly

Your Less Than node is looking for values below .9, and so is picking up the subtle glare around the lighting in your image.

Perhaps you meant to set it to Greater Than?


How to find out the cause of a wrong weight paint?

See this answer. With the vertex weight panel, you can at least select several vertices and see, which bone is affecting them. Also, you can copy weight setting from the active vertex to all selected vertices. This is helpful e.g. for the head, where you like to make sure that only one bone alone is affecting it.


In edit mode Select all of the geometry a. Choose Mesh > Clean Up > Delete Loose


Check if you have more than one UV Map on the object
If your object already had a UV Map for some reason, TextureAtlas will simply create another UV map. In Blender, per mesh object, at the moment up to 8 different UV maps per mesh are supported. You can see a list of your UV maps in the mesh data tab of your object:

As you can see, by simply clicking at the names, you can switch from one map to the other. The render icon at the right determines which UV map gets passed on to the Texture Coordinates node in the Node Editor:

If the TextureAtlas UV map is all you need, just remove all other maps using the - Button.