text:
Ubuntu 18.04 and Background Rendering produces transparent image
So I upgraded my system from Ubuntu 16.04 to 18.04. With that I had to upgrade Nvidia drivers from 384 to 390, and a reinstall of modprobe and cuda-toolkit. Blender works ok, GPU live rendering works, and final GPU rendering works in the GUI.
Now, I have figured that I can render a little faster if I drop into a tty (aka "close" the desktop) and do a background rendering from the console, giving 99% of the GPU power to Blender.
However, after waiting 3 hours, the output image is all transparent. A file that should be about a megabyte is only 14 kilobytes.
This is what I used to render the scene:
./blender -b "/home/edward/Projects/20180520-CC/Chapter01/001_Basement.blend" -o "//Page070.png" -f 18 |grep Remaining

The grep is there because I think the console output has slowed down in 18.04. It would take up to 20 seconds just to list all the objects used in the blend file, where as in 16.04 it would be closer to 10 seconds or less.
So, any ideas why the image is transparent when I do background rendering, but shows up fine when rendering in the GUI?
EDIT Decided to >output what Blender is saying to a text file (blind render) and left it alone for more than 3 hours. Had a look at the text file for any errors and found the following:
write exr tmp file, 2560x1440, /tmp/blender_xSVx3E/001_Basement.blend_cloth.qc_RenderLayer.exr
Fra:18 Mem:1177.66M (0.00M, Peak 1308.13M) | Time:00:00.24 | Mem:0.00M, Peak:0.00M | cloth.qc, RenderLayer | Synchronizing object | Window Panel
...
Fra:18 Mem:5296.60M (0.00M, Peak 7712.33M) | Time:03:04:38.91 | Mem:8767.59M, Peak:8791.54M | cloth.qc, RenderLayer | Finished
read exr tmp file: /tmp/blender_xSVx3E/001_Basement.blend_cloth.qc_RenderLayer.exr
failed being read /tmp/blender_xSVx3E/001_Basement.blend_cloth.qc_RenderLayer.exr
cannot read: /tmp/blender_xSVx3E/001_Basement.blend_cloth.qc_RenderLayer.exr

This sounds like the file got corrupt, or Blender doesn't have read permission to tmp. This means that Compositing had nothing to work with, and so a blank image.

The following works for me: blender --background file.blend --render-output //result --render-format PNG --use-extension 1 --render-frame 1

Long switch names did not work.


text:
Cannot select certain vertices
Blender 2.79

No matter which mouse button I click, I cannot select or deselect any of the vertices on a curve. This seems to also apply to when I am editing vertices on a mesh and "Limit Selection to Visible" is disabled. However, the shortcut keys of "(De)Select All", "Invert Selection", and so on do work. I've tried rebooting the entire computer and still I have this problem.

Pressed every single side of the mouse.

Please update your gif. Delete the current gif and show a new one. Show where you press [a] to deselect. Then show box select or click on a single point.  Please tell us what happens when you close Blender completely, Start Blender and start a new file with a curve.

Answer updated with exclusive information

Do you have any unusual mouse such a mouse [without wheel button] requiring slight special configuration for use with Blender?

Basic SteelSeries Sensei, Middle-Click = Mouse Wheel, 2 extra buttons on either side.

In Object Mode, select the curve you want to edit.
Navigate from the Layout workspace to the Geometry Nodes workspace.
Go into Edit Mode and from there the points are selectable.
I'm unsure if this is a bug or if there is a better way to fix this (like some random button I may have pressed at some point messing things up), but it worked for me.
(Using Blender 3.5)

Click with the other side of the Mouse

Press
a
 one or twice so that nothing is selected and the image looks dim not bright.  Its a toggle.
Then Click Only

Then use
b
for box select and you should see a difference.
My opinion is that everything is selected in you original question.
You can also press
W
then select subdivide to have more variation in your selection.
Perhaps you  already know this.

a does make a difference. b does not make a difference. w just splits the line, but still cannot select anything.

Updated the image.

"The other side of the Mouse" isn't especially more "exclusive information". If you see the link (because gif went over 8mb) you'll see I have pressed every side of the mouse.

Exclusive information was a failed joke.  I cannot recreate your problem.  I have seen on rare occasion such problems with Blender.  I would close Blender and restart your machine.

Check these in top right in Edit Mode, might be on a different selection mode.

I'm not seeing these icons in the top-right of the picture I posted.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Emitting smoke off a curving mesh
I am making a scene which I want to be a static image. To this scene I am trying to add smoke. And seeing as I'm quite new to these things in Blender (last time I remember playing with particles was 3D Max) I may not be doing things right.
So, I've put together a bit of an elaborate scene that consists of a number of curves that have been fleshed out by a circle (forming a tube) that go in large sweeping arcs around the scene. Now I want to flesh them out more by having smoke emit off of them.
I start with the longest one, convert it to mesh, create a domain that is larger than the scene, apply smoke flow to the tube, advance the frames, and it looks like the smoke isn't emitting from the surface of the tube but rather that the domain cube is just filling with smoke.
In the tutorials I've looked at, they simply say make box, make object, set box to domain and object to flow, and the result is smoke rising from the object. But when I do these same steps, the tube isn't smoking like in the tutorials. Either it is one big blob of smoke or patches of smoke all over that scales when I scale the domain.
So, what values should I set in the many settings in the domain and flow so that it looks like the smoke is emanating outwards from the tube's surface by about twice the tubes thickness, rather than filling the whole screen?
Also, in Rendered View it looks black, like if it is blocking all the light.

Ok, so I've learned a lot since then, and after a long while of putting it off because I didn't like having to redo stuff, I managed to fix it myself. This is what I've learned:
First off, size does matter. Having a kilometer large room doesn't help (Source models are huge so always scale down).
Secondly, I figured out that the smoke is created on a grid-based system, which is determined by the Divisions. Though by amplifying that number tends to cause the program (or whole computer) to be unresponsive.
Because of these things, it felt best to make several smaller Domains that surrounded the tubes rather than the whole room.
And finally, I removed a few elements from the smoke material, and that was the color Attribute and the additional Add shader.
The results finally came together nicely, even with a few redos...
http://fav.me/dbmid4o

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Planar clipping/merge with Mirror modifier
I am looking at work-flows for building roofs.  Below was promising until I hit a snag...

Setup

Rotated Plane + Mirror modifier.
Alt+Space (Transform Orientation) > Normal
Ctrl+Alt+Space > Create Orientation for sloped plane
G, X ...
When the two planes meet, they 'climb' up the global Z-axis, which I don't want (below)

Question
How do I constrain the merged verts to the selected Orientation (i.e. staying in line with the roof?

Why not using Clipping option of Mirror modifier ? It won't anwer your question, it should prevent that situation.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How can I resize a displacement map in cycles?
So I followed a texturing tutorial by Blender Guru that shows you how to add bump-, specular- and displacement maps with nodes in cycles to make your texture look more realistic. I used my own texture to make things a bit more interesting for me but it ends up being way larger than I anticipated.
This is what it looks like:

This is the size that I'd like (but with a displacement map for added realism):

Now I know how to change the size of my image textures for the basic texture and the bump- and specular maps - via changing the values in the textures' mapping-section

but when it comes to the displacement map

there is no such mapping-section there, just an image mapping-section which isn't helpful regarding the size of the texture.

If anyone knows how to deal with this, I'd greatly appreciate your help.

If you are using the UV (also default) texture coordinates mode (with Point or Vector mapping), you can use the Crop Maximum XY values to scale the Displacement Texture up and down with the same values you used for Scale on the colour texture.

Ok great, if it solved your problem, please mark the answer as accepted. Thanks!


text:
Stamp Cut another Mesh
I've imported some svgs, converted them to meshes, and I'm trying to stamp-cut one using the other.
Essentially, I have two cookie cutter meshes (no thickness, but has depth) at the same location. I've z-rotated one of them a bit, left the other, and now I want the intersection of the two.
I tried the boolean modifier, but it says it can't complete the operation. I also tried mesh > faces > intersect, also didn't work.
Any help is appreciated.

Boolean modifers con fail if the meshes are not "clean" enough: self intersecting faces, double vertices, wrong normals... If you are not able to make it work, I would suggest to upload your blendfile. Consider also if Project Kinfe command can be useful for your situation.

@Carlo - I've added a screenshot, and updated.

Probably filling end faces of the "cutter" object and setting the Boolean for the object to cut to Difference may help (if the meshes have clean topology as is already mentioned).

Could you describe the screenshot a bit? Look like you have one object, not two. I would suggest to split them, close caps (bool work with volumes) and than use the modifier. Avoid coplanar faces.

Boolean modifier is the correct option. It is failing because your meshes are not closed. Booleans do not work on open meshes. Select the ending loops of your meshes and press F to add a face. You can delete it again after the boolean has run.

I've added a screenshot, and updated.

You can use the Knife project tool :
1- select the one to cut with (in object mode ) and click Shift+1/3/7 to go in local ortho view so only the outlines are visible.
  2- press Shift and select the other object and switch to edit mode.
  3- deselect all and use Knife project and enable cut through.
  4- reverse the selection with Shift+I and delete the vertices.


text:
Removing doubles on imported 3DXML ngon mesh
Pertaining to building objects created from the script shown in the answer here https://blender.stackexchange.com/a/42590/15543

The import data has seperate vert data for each surface, so each face can be selected and moved ( as shown in image ) which produces a lot of doubles. For example a simple cube would have 6 x 4 verts which after remove doubles would be reduced to 8.
Each surface has uv texture coordinates.

To vastly reduce the amount of verts in the scene I thought I would remove doubles.  However,  running the bpy.ops or bmesh.ops remove doubles also removes faces such as the one highlighted, leaving gaping holes in buildings.
Any suggestions on how to approach removing doubles on such meshes leaving faces intact, which can be ultimately be scripted?
If the poly is opened up like shown then remove doubles works well. If remove doubles is run on the separated but "closed" poly then remove doubles fills the holes with edges.

Blender also removes the face when I execute Remove Doubles within the UI (Merge Distance is set to 0.00001), seems there is something wrong with the mesh...

@poor Yep, same result as script.  The import data simply gives a list of 3d verts and their corresponding 2d texture coords, which leads to some out there polys.  Added a pic of the corresponding UV map.  How to handle the verts on the "closed" edges is the hassle it seems.  Architects are to blame lol.

Hmm ok probably worked out how to do this.. if the surface has more than 1 double, remove those verts from the remove double op.

All 'Clean up' operations tested, without any success.

EDIT
A better approach would be to look for the two "ripped" edges in a face that share the same geometry. (edges parallel with same mid point test or similar), and remove the edges verts from the remove doubles list.

Thanks for your help guys, The answer kinda came to me when I was creating pics to explain the situation and opened up the poly.
The trick was looking at faces with more than one double and removing them from the remove doubles operator, otherwise will end up trying to make a poly with holes, which ends up being a hole.
The following reduces vert count of building.014 from 4205 to 1258... and leaves the roof intact.
import bpy
import bmesh
context = bpy.context
obj = context.object
print("X" * 80)
bm = bmesh.new()
bm.from_mesh(obj.data)
bm.faces.ensure_lookup_table()
ignore_doubles = []
for f in bm.faces:
    verts = f.verts
    dubs = bmesh.ops.find_doubles(bm,
                                  verts=verts,
                                  dist=0.00001)
    double_verts = dubs['targetmap']
    if len(double_verts.keys()) > 1:
        for k, v in double_verts.items():
            ignore_doubles.append(v)

verts = list(set(bm.verts) - set(ignore_doubles))
bmesh.ops.remove_doubles(bm, verts=verts, dist=0.00001)

bm.to_mesh(context.object.data)

It appears that if you triangulate your mesh before removing doubles, it will prevent the deletion of these faces.
I hope the original n-gon topology isn't important to you :)

Thanks, Certainly an option. I ended up with some rips in buildings when using ctrl-T. What did you use to triangulate?  As in a comment to poor, the trick will be looking at faces with more than one double and removing them from the remove doubles operator, otherwise end up trying to make a poly with holes, which ends up being a hole.

Great! Converting 'tris' to 'quads' afterwards could also be an option, but has (apparently) no effect on the n-gons.

I used the ordinary Ctrl-T shortcut to triangulate in this example. It does appear that there are still some rips after this operation (selecting non-manifold shows this nicely, should have tried it before). Not all verts are double, it would seem. Perhaps you can use a higher distance threshold.

OK, used a higher distance threshold for remove doubles and it did get rid of most non manifold verts, but some still persist due to other issues.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Render Animation, Start Frame is doubled
Not sure if this is a bug or what, but when I change the Start Frame and click Render Animation, it starts at a frame double of that which I typed in. If Start Frame is 0, it starts rendering at frame 0. If Start Frame is 1, it starts at frame 2. If 2 starts at 4 and so on...
The funny thing is that this seems to only happen with this project. I started a new fresh one and tested it out and all seems to be working. Also, in all places, it steps forward one frame (as Frame Step is 1), not skipping any.
I'm wondering if I have accidentally set something somewhere without me realizing it.
Blender 2.78c, 30 fps, 1920x1080 at 25% for preview reasons.
EDIT:
The project has some VSE tracks with sound and video, and the scene ontop of that. Time Remapping is set to Old: 100 New: 100. Also, when given to Sheep-it the frames aren't doubled. Yet running blender as command line on my computer the set frame is doubled.
EDIT:
Under Render Properties, Post Processing, there is an option to take the rendered product through the Sequnecer (checkbox named Sequencer). Turning that off did so that the start-frame isn't doubled. Wonder what in the VSE is messing things up? Video Cross Blend? FPS difference?
Besides, that processing isn't necessary at the moment. The video (and audio) was there for reference.

I have noticed the same behaviour if I add a scene to the VSE, but not if I render the same scene normally. I have described this in detail here. I'm guessing it's a bug, but waiting for a response before I file a bug report.

Do you have any time remapping set?

gandalf3: Time remapping is 100:100. Though Thailandian may be on to something... I am using the VSE and I have a few tracks of sound and video and the scene on top of that. Wanna know the fun part? Sheep-it Render Farm doesn't double the frames.

Without a sample file Blend Exchange  Or some screen shots that shed some light....  it's a bit of conjecture.   Turning VSE and/or Compositor off in Render Properties > Post Pro will indicate whether it is a VSE/Compositor issue.

@batFINGER Sorry for the late reply. Been rendering other things in the mean time and gathering points at sheep-it. I went to the Render Properties and looked and found under Post Processing a checkmark in sequencer. Turned that off and now the start-frame isn't doubled. Wonder what in the VSE is messing things up? Video Cross Blend? FPS difference?


text:
eevee smoke/volume not being occluded
Been touching upon EEvEE every so often depending on what kind of image quality I'm looking for at the moment, and for the first time I am adding smoke. More specifically Glowing Smoke, as in "Magic". However, the volume material shows through other objects in front of it.

You can see more clearly on the right the yellow magic outlines the entire horn, even the part that is embedded into the skull and hiding behind the hair. I have played around with the material's Blend and Shadow Modes, Refraction and Subsurface Translucency, and all the settings connected with Volumetrics (and Shadows), but it does not seem to make a difference. Anything I am missing or is this a bug?
Blender 2.92.0 2021-02-24 16.25
EDIT
I made a new project with nothing in it, I imported the right model, and applied the smoke on the horn, and brought up the Emission Strength only. The whole thing still shone through.
EDIT2
When putting in the ordinary geometry from the Add menu and shaping them approximately to the model, the smoke is occluded.

Share blend - smoke+hair only if issue persist ...

@vklidu Here is the blend, no bakes, all domains set to Replay. Still big tho.
https://www.edwardleuf.org/x/intro2b.zip

You can try this file (2.93) or try with some new file to eliminate something specific to your issued file.
Left Smoke sim / Right only Volumetric material ... both seems to be working.

Edit
That was real issue hunting ... the main reason is this Question ... for Eevee it is too small step in depth when volumetric is calculated. And I'm not sure there would be solution for you. Here is example with solved issue ...

... but the only one solution I found ... crop the area under Render Properties > Volumetrics > Start/ End and increase Samples up to 256 ... also don't use Distribution around 1, use some low value.

That means very limited range of volumetric effect depend on Camera distance.
Your file has other things that can cause some issues ... like extremely high Viewport Clip End that generates flickering, some of your objects like unicorn's hair use wrong Normals direction, and it is always better to have Applied Scale for all objects if possible ... not the case for volumetric issue, but any time I tried to switch to Eevee all computer crashed that never happened for many years to me.
Here is a file in condition that I expected you will share (hair+horn) that takes only 0.6 MB.

If you are looking for just an effect like glowing horn, you can use new object type Volume with Mesh to Volume modifier instead of Smoke simulation ... or even easier animate emission material for horn with some high value and enable Bloom in Render Properties.

Well, can't figure it out. I've tried to make your file mimic mine and visa-versa but the results don't seem to change in either (yours is blocked and mine isn't). I even made a new file, imported the model above, applied the smoke and it shines through.

You are saying that my file opened on your PC is OK? Try "Load Factory Setting" ...

Ah, there we go. Clipping. I always forget about that. Most often I set these things as close and as far as possible, but only if I have a large environment. And I know I can use Emission or static volumes, but I do want that little variance that comes with smoke simulations. Anyways, thanks.


text:
Why vertices are changing their position during Weight Paint Mode?
I am new to Blender. I am making a MineCraft character.
In the Weight Paint Mode, When i am assigning weight to vertices they are changing their positions. Like, a small change in global z axis or along x axis.How can i solve this problem.[![enter image description here][1]][1]
Thankyou.
ImageBeforeWeightPainting:: [1]: https://i.sstatic.net/P7xiG.png
 ImageAfterWeightPainting::   [1]: https://i.sstatic.net/lhDpy.png

Via weight painting, you increase or decrease influence of the bones on vertices. That's why they change position. If f.ex. some bone influences a vertice with strength of 0 nothing happens, but when you give this vertice weight of 1 it starts to be influenced by this bone with strength of 1 and it's moving closer to it. This is normal and expected behaviour. Although your example looks weird.Could you provide the .blend?

Thankyou for your answer. I got it. Yes i will.

http://wikisend.com/download/548744/41-minecraft-char_3.blend

This armature is basically perfect for this character, so just unparent it and delete Armature modifier from Happy Tounge mesh and parent it again by selecting mesh first and then Armature, pressing CTRL+P and choosing With Automatic Weights. You won't need no weight painting then.

Okay, i got the problem. The problem was that the "face-jaw" bone is not correctly at its position.When i have reset its position, there is no change in the position of vertices(In weight Paint mode). Thankyou mate.


text:
VSE: One video overlays another - bottom one plays as expected, top one does not
I'm trying to overlay a screen recording of my phone on another video. Both videos are 1920x1080 and 50fps. It renders as expected, with the screen recording taking up a third of the image on the left and the other video playing on the back. My problem is with seeking in the VSE: jumping to a frame, the bottom video jumps to the correct frame, whereas the top video will always start from its first frame.
Why is this?
UPDATE: The video of my phone's screen was taken with AZ Screen Recorder. I'd set it to 50 FPS, but VLC tells me the framerate is something else. I was able to work smoothly with these videos using DaVinci Resolve, where I had to set the phone video's frame rate to 200.
Top video settings:

Transform settings:

Related: http://blender.stackexchange.com/a/49219/2843

That answer is a muddled mess. The issue is a combination of discontinuous frame rates and I/P/B frames.

Make sure your footages are conformed to identical frame rates. You will, for example, almost never find any North American device that will record at a flat 24, 50, 60, etc. and the actual value will be 24000/1001, 50000/1001, 60000/1001 etc. Assert that your framerates are identical, if they are not, you will need to conform them to identical rates, with the below caveat.
Conform to a motion picture codec that uses only I frames, which represent a whole frame. The FFMPEG library behind the scenes will be calculating offsets into the overall time stamps, and this will yield wonky results when you are dealing with compressed codecs leaning heavily on groups of pictures, or GOPs. The only way to avoid this, and have your cuts match perfectly 1:1 is to enforce codecs that avoid those I and P frames.

Bluntly, for this sort of an application, Blender is a poor tool, as still image formats are going to be vastly more reliable. In the context of your particular project, still image formats seem outside the scope.
See Audio/Video out of sync in rendered video, but not in VSE for more information.


text:
Colors will change in scene when I use RGB node as shader
I am trying to create a scene with absolute no shading and depth. I created a basic material using nodes in the shading tab. I connected the color output from an RGB node with surface at material output. It looks wrong in the material prview and render using evee or cycles.

On the screenshot I am using Blender 2.92.0 using evee on default settings to render.

https://blender.stackexchange.com/questions/164677/images-as-emitters-constantly-come-out-dull-white-emission-not-actually-white

I just found out, that you can change the at "Render Propeties">"Color Management">"View transform" from Filmic to Standard.
I don't need further awnsers.


text:
Animation Nodes available for Blender 3.3?
Can anyone let me know if "Animation nodes" plugin still available for Blender 3.3

Why don't you check the official homepage? https://animation-nodes.com/#download

yes it is. it even runs under 3.5 alpha

Thank you Chris


text:
How to combine large scale and small scale in one project
I want to animate a space scene of stations and ships in the orbit of Mars.
I thought about two ways to do this:

Planet as a rendered picture on the World texture
I cannot make this to work as the picture is deformed - not suitable for a proper skybox. I tried texture mapping.

Actual Planet as a large (cubic) sphere
Either the mesh become too large (artifacts on surface when zooming out) or the planet still looks too small.
I will also try to move the Planet together with the camera to make it look static/large by connecting the coords. Have just to pay attention to shadows and mesh "collision".

Are there any general ideas on how to approach? I will post pictures or even the scene later on today.
I am quite inexperienced. Using blender 2.9+
Thank you in advance.

If you just want Mars to be a static background, you could create a HDRI image as explained in this video. You basically render a equirectangular version of your scene and use it as the background in your second scene. Note that you have to switch to Cycles, a step not mentioned in the video.

I think this is exactly solving my issue. Did not know about that feature, opening a new world to me . Thank you. Will try it tomorrow.

Maybe you could work with some kind of Level-of-Detail approach?
Model the spaceships and the full planet as a sphere with displacement map in one scene, then a section of the planet with some geometry detail and low-detail structures and finally a small patch of terrain with structures with high detail.
Then render separately and blend between the detail levels in post processing?
If you match the colors and contours just well enough and make the transition either very quickly or very smoothly, hardly anybody will notive the transition


text:
Running simulations and extracting data from Blender for analysis
Suppose I want to build a scene in Blender where many balls collide. Once everything has settled, I want to find out if a particular ball has rolled outside the circle, where the collisions occurred. I have a couple of questions in that regard:
A) How can I extract data from Blender to learn if the ball has left the circle?
B) How can I vary the initial conditions of the scene slightly and simulate many instances of the scene to discover the relative frequency with which the particular ball leaves the circle?

So this is my attempt to answer your B). This is a complete Blender scene entirely created in Python. It features 16 balls that collide around a table, the initial impulse to get everything started is a key-framed stick. All the balls and bumpers are created in a loop, so its easy to change their physics properties. The position of the 15 colored balls is tightly packed, but multiplying the location vectors by a value slightly larger than 1 will allow looser packs. Random numbers are possible, too, even though I did not explore them here.
import bpy
from mathutils import Vector, Matrix, Color
from math import radians
import numpy as np

if bpy.context.scene.rigidbody_world:
    print('Rigid Body World Found')
    bpy.ops.rigidbody.world_remove()

bpy.ops.rigidbody.world_add()
bpy.context.scene.rigidbody_world.collection = bpy.data.collections.new('Pool Game')

triangle = [Vector( ( 0, -20, 0.5 ) ),]

balls = []

ball_color = [
  ( 0.8, 0.8, 0.8, 1),## 0 is white
  ( 0.9, 0.8, 0.0, 1),## 1 is yellow
  ( 0.0, 0.0, 0.8, 1),## 2 is blue
  ( 0.8, 0.0, 0.0, 1),## 3 is red
  ( 0.4, 0.0, 0.8, 1),## 4 is purple
  ( 0.8, 0.2, 0.0, 1),## 5 is orange
  ( 0.1, 0.6, 0.1, 1),## 6 is green
  ( 0.2, 0.0, 0.0, 1),## 7 is burgundy
  ( 0.02, 0.02, 0.02, 1),## 8 is black
  ( 0.9, 0.8, 0.0, 1),## 9 is yellow
  ( 0.0, 0.0, 0.8, 1),## 10 is blue
  ( 0.8, 0.0, 0.0, 1),## 11 is red
  ( 0.4, 0.0, 0.8, 1),## 12 is purple
  ( 0.8, 0.2, 0.0, 1),## 13 is orange
  ( 0.1, 0.6, 0.1, 1),## 14 is green
  ( 0.2, 0.0, 0.0, 1),## 15 is burgundy
]

slate_color = ( 0.21, 0.47, 0.15, 1)
felt = bpy.data.materials.new('Felt')
felt.diffuse_color = slate_color

root3o2 = np.sqrt(3)/2

for row in range(5):
    for col in range(row + 1):
        triangle.append( Vector( (row/2 - col, row*root3o2, 0.5) ) )

i=0
for loc, col in zip(triangle, ball_color):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=32,
        ring_count=16, radius=0.5, calc_uvs=True,
        enter_editmode=False, align='WORLD',
        location=loc, rotation=(0, 0, 0))
    bpy.ops.object.shade_smooth()
    ball = bpy.context.object
    balls.append( ball ) # grab a reference to each ball as it is created.
    ball.active_material = bpy.data.materials.new('BallMat')
    ball.active_material.diffuse_color = ball_color[i]
    ball.active_material.roughness = 0.1
    bpy.data.scenes['Scene'].rigidbody_world.collection.objects.link(ball)
    ball.rigid_body.collision_shape = 'SPHERE'
    ball.rigid_body.restitution = 0.9 # Bounciness
    ball.rigid_body.friction = 0.2

    i += 1

# make the slate:
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, -10, -0.05))
slate = bpy.context.object
slate.scale = (10,20,0.05)
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
slate.active_material = felt
bpy.data.scenes['Scene'].rigidbody_world.collection.objects.link(slate)
slate.rigid_body.type='PASSIVE'
slate.rigid_body.friction = 0.3
slate.rigid_body.restitution = 0.8

#make the bumpers
bumper_locations = [
    (  0,-30, 0.5),
    (  0, 10, 0.5),
    ( 10,  0, 0.5),
    (-10,  0, 0.5),
    ( 10,-20, 0.5),
    (-10,-20, 0.5),
]

bumper_rotations = [
    ( radians(45), 0, 0),
    ( radians(45), 0, 0),
    ( radians(45), 0, radians(90) ),
    ( radians(45), 0, radians(90) ),
    ( radians(45), 0, radians(90) ),
    ( radians(45), 0, radians(90) ),
]

bumper_scale = (18, .707, .707)

for loc, rot in zip(bumper_locations, bumper_rotations):
    bpy.ops.mesh.primitive_cube_add(size=1, enter_editmode=False, align='WORLD', location=loc )
    bumper=bpy.context.object
    bumper.scale = bumper_scale
    bumper.rotation_euler = rot
    bumper.active_material = felt
    bpy.data.scenes['Scene'].rigidbody_world.collection.objects.link(bumper)
    bumper.rigid_body.type='PASSIVE'
    bumper.rigid_body.restitution = 0.7 # Bounciness
    bumper.rigid_body.friction = 0.3

# finally the Cue
bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=0.1, depth=5, end_fill_type='TRIFAN',
    calc_uvs=True, enter_editmode=False, align='WORLD', location=(0, 0, 0), rotation=(radians(90), 0, 0))
cue = bpy.context.object
bpy.data.scenes['Scene'].rigidbody_world.collection.objects.link(cue)
cue.rigid_body.type='ACTIVE'
cue.rigid_body.kinematic = True
cue.rigid_body.restitution = 0.7 # Bounciness
cue.rigid_body.friction = 0.8
cue.rigid_body.collision_margin = 0.1
cue.location = (0, -25, 0.5)
cue.keyframe_insert(data_path="location", frame=1)
cue.location = (0, -10, 0.5)
cue.keyframe_insert(data_path="location", frame=13)
cue.location = (0, -10, 5)
cue.keyframe_insert(data_path="location", frame=21)
bpy.data.scenes['Scene'].frame_current = 1

This is a very interesting question, and I would love to see what you come up with. I just spent some time trying to figure out A). I've looked before without luck, but today I discovered the object matrix_local contains the current translation matrix of an object. That means you can do this to find out the location, rotation, and scale:
import bpy

C = bpy.context
D = bpy.data

loc, rot, sca =  D.objects['Sphere'].matrix_local.decompose()
print('Location:', loc, '\nRotation:', rot, '\nScale:', sca)

You can find distance from the origin with:
loc.magnitude

And finally:
 (Vector( (1,1,1) ) - loc).magnitude

gives the distance from the point (1,1,1).
See the docs on Blender Matrix and Vector types and this answer on accessing matrix elements


text:
Import coordinates from CSV and create sphere at each position
I have a CSV containing x,y, and z coordinates. The CSV also has a fourth column containing information on sphere diameter. I need to create a sphere at each coordinate, having the corresponding diameter. Can someone provide me a basic Python script that performs this task? My actual task is much more involved, but I think I can solve it if I have the basics in place.

From the linked questions on the right

It has been a while since I have done any scripting, but the below should work based on your description. Note that the CSV file I made for testing included a header row, and the creation of objects for ease of testing was bpy.ops.mesh.primitive_uv_sphere_add()
bl_info = {
    "name": "Blank1",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "View3D > Tools panel 'T' > Blank1 > Blank2",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "category": "",
    }

import bpy
import csv
from bpy.types import Operator
from bpy.types import Panel

class MeshGenTool():
    @classmethod
    def main(cls, context):
        scene = bpy.context.scene
        objs = importCSV(scene['CSVFile'])
        for obj in objs:
            bpy.ops.mesh.primitive_uv_sphere_add(size=obj[1], location=obj[0])
            MyMesh=bpy.context.object
            MyMesh.name = "MyMesh"

class MeshGenButton(bpy.types.Operator):
    """Execute generation"""
    bl_idname = "object.simple_operator"
    bl_label = "Generate"
    def execute(self, context):
        MeshGenTool.main(context)
        return {'FINISHED'}

# This is based on CSV file having a header row with the descriptions 'x', 'y', 'z', 'd'
def importCSV(CSVFile):
    obj_loc = ()
    obj_dia = 0
    obj_data = ()
    objs =[]
    with open(CSVFile) as csvfile:
        reader = csv.DictReader(csvfile)
        for row in reader:
            obj_loc = (float(row['x']), float(row['y']), float(row['z']))
            obj_dia = float(row['d'])
            obj_data = (obj_loc, obj_dia)
            objs.append(obj_data)
    return objs

class VIEW3D_PT_Blank1_Blank2(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Blank1"
    bl_context = "objectmode"
    bl_label = "Blank2"

    def draw(self, context):
        layout = self.layout
        scene = bpy.context.scene
        row = layout.row()
        col = layout.column(align=True)
        scn = bpy.context.scene
        col.label(text="Blank2")
        col.prop(scene, "CSVFile")
        col.operator("object.simple_operator", text="Add items", icon='MESH_ICOSPHERE')

def register():
    bpy.utils.register_class(VIEW3D_PT_Blank1_Blank2)
    bpy.utils.register_class(MeshGenButton)
    bpy.types.Scene.CSVFile = bpy.props.StringProperty(
        name = "CSVFile",
        description = "Path of CSV File to read from",
        default = "",
        subtype = 'FILE_PATH')

def unregister():
    bpy.utils.unregister_class(VIEW3D_PT_Blank1_Blank2)
    bpy.utils.unregister_class(MeshGenButton)
    del bpy.types.Scene.CSVFile

if __name__ == "__main__":
    register()


text:
Recreating headlight on FBX car model
I have been learning more about Blender rendering and in the process, trying to recreate scenes from pro modelers. My current attempt is the very nice Audi R8 model from Federico-Cuomo.
The part of the model that has me stuck are the headlights as shown below:

The mesh itself does not represent the individual lights:

The model does not have an included texture from what I can tell. I have two possibilities in mind:

Would there be something in the FBX format that Blender is not importing?
Is this an emission texture or shader that is draped on the headlight mesh, which the artist simply didn't include as a downloadable asset?

I want to verify I'm not missing something important before going any further, thank you!

the only mesh we see from your screenshot is the external "glass" of the headlights. If the inside is modeled, gotta look in xray or wireframe to see them through. If it's all done in shaders, then you should have the textures somewhere. Though the materials might not be imported correctly, depending on whether they were made in a standard way understandable by both the FBX  format and Blender.

Wow you're right, I had previously shifted the headlight objects out to see if there was anything special, but it does appear to be fully modeled on the interior. I may just need to play around with the glass material then. I'll post back here if I figure it out!


text:
preventing hands going through floor
I'm really hoping someone can help - been stuck for months now. I'm completely new to blender and animation in general. I've managed to find a pre-rigged model online - I want to create an exercise animation using the model - while the feet dont go through the floor when animating; the hands do for example when trying to create a push up animation. Is there anyway to get round this? I am completely new to all of this so any help with simple instructions would be much appreciated. I would have attached the blender file - but dont think you can on here.

you can use https://pasteall.org/blend/ if you want to upload a blend file

Blend file below...

A lot may depend on how your rig is set up but placing Empties as 'ik targets', (not pole targets) at limb extremities does lend itself to this sort of thing quite well. By that I mean hand and foot targets as against lower arm and leg.  The hand targets are simply placed on the floor, the feet versions placed where they're needed.

For push-ups, some upper-arm Quatemion adjustments (pose mode) will likely be necessary due to extreme bending at the joints.
The character's origin point needs to be set at the feet so the armature can be rotated from there -
Once the first push-up is done, it's a simple matter of either duplication in the Dopesheet or cycling the action.
A "Nav"(igation) handle, an Empty would also be placed at the OP and the armature and targets parented to that.  This would hold it all together and provide a 'handle' with which to drag the whole thing about -

While I am no expert, it strikes me that when posing a rigged character you are completely in control of where things are placed.  Perhaps I am a little confused about your problem.  I am pretty sure you are able to post a blend file of at least a link to it.

thanks Mark. What i mean is for example, if the model is standing up - and you move the middle part of the body downwards - the feet stay where they are and the model squats down as the legs bend. However if say the model is in a plank position - and you move the middle part of the body down towards the mat - the hands go through the mat (floor) - essentially I want the arms to bend automatically (like the legs) when you move the model down. Its quite hard to explain - I'm hoping this is a bit clearer. I cant see anywhere to add the file - but will look more.

This may sound silly but when the hands go through the floor, you should be able to move the hands only back up to where you want them.  Then you press i to keyframe that position.


text:
Rigid body following path
I'm trying to make a rigid body sphere follow a path while it rests on another rigid body, which I'm tilting in different directions in order to balance the sphere, but I'm not having much success after several failed attempts. It ends up staying in the same place, like the image below, unless I manually keyframe the path but then it instead ignores the physics.

If I remove the path constraint and just treat it as a rigid body, it does react to the tilting plane below but quickly ends up rolling off the plane due to the physics, even if I only rotate the plane along one axis. I also want to be able to loop this which is another reason I want to try and solve this by applying a path constraint.
Is it possible to solve this in some way without having to manually keyframe everything? Any help would mean a lot to me.
Here is a link to the blend file if it helps: https://pasteall.org/blend/0f5d12df4024418d935c5e435661f760

it's not clear this part: "make a rigid body sphere follow a path while it rests on another rigid body". Do you have a reference video of what you are trying to achieve?

Do you just want the ball to roll back and forth?

you can only have one thing at a time: physics OR animated. you can change this behaviour per frame, but you can never have that at the same time

Yup, I want it to roll back and forth - but in a rather straight path. I realise I would probably have to keyframe this manually in order for this to work. Thanks so much for the clarification as well, Chris!

just clear that "animated" checkbox in your sphere and it works.

result:


text:
Multiple textures with displacement
I've created a sphere where I've displaced parts of the mesh using a noise texture and now want to add a separate metallic material to the displaced areas but can't seem to achieve this despite hours of trial and error. Any help would be much appreciated!

Here's a link to the .blend file as well:
https://pasteall.org/blend/d52534ba777f445a91cf529ca8022754

It looks like the ColorRamp you're using to drive your Mix Factor has too soft of a falloff (because it's set to linear). You can overcome this rather easily by using a Separate ColorRamp to the one you are using for your displacement for your Mix Factor, and setting it to Constant.


text:
How to reset all settings and get back initial blender setings?
I did some changes in user preferences, but I forgot that changes and where I did them. How to I get back the initial blender settings?

In a 3D ViewPort, press F3, then enter 'load factory'. You'll see an operator called 'load factory settings'.

When you execute that, you get the Default Scene back, and the settings as well. Remember to save your user settings now by going to the User Preferences, and hit 'Save User Settings', as well as hitting Ctrl + U in the 3D Viewport and save the startup file.

great! could you please mark my answer as the answer to your question? Thank you!

spacebar just starts playing the animation..

That depends on user preference settings (nowadays operator search and play animation hotkeys can be configured). In latest Blender releases, spacebar indeed plays the animation. The key for operator search has been changed to F3.


text:
Retopologize mesh to achieve uniform face size
I am trying to use Blender to remesh a vtk/stl file to create uniform face size- I have failed using paraview, meshlab and MIRTK tools- all result in substantial errors on remeshing!
I am very new to Blender, and the answer may be obvious. Is there a way to achieve a uniform remeshing?mesh of left atrium

Possible duplicate of Resize different sized faces to 1 uniform size?

Detail flood fill
An useful tool for lower the difference in faces resolution along a surface (expecially if you are working with tris) could be the Detail Flood Fill options available in Constant detail  mode whyle you are sculpting with Dynotopo enabled.

From the manual's page:

When using Constant Detail mode, this option is made available, allowing you to fill the entire object with a uniform detail, based on the detail size.

With the eyedropper you can pick the target resolution (something between high and low in the image sequence above), then the operator will decimate the areas that are more subdivided and subdivide the areas with lower face resolution while tying to keep the overall surface profile untouched.

Retopology
It depends on how uniformal your faces should be. So far Blender cannot automatically retopologize meshes automatically in a way that the result would contain only evenly remeshed quads.
There are some addons for Blender which might be helpful with the task, "free" ones like this and also paid ones like Retopoflow.
Another free tool you might want to try is Instant Meshes.

Remesh Modifier
If you don't need to have square faces, you can try the Remesh modifier. Depending on the topology of the source mesh, it also might need some work after applying.
My original mesh looks like this:

Go to the Properties Area, select the Modifier Panel, click "Add Modifier" and select "Remesh".

The Octree Depth controls the amount of detail and Scale defines the size of the grid. Depending on how much sharp details your mesh has you want to choose between "Smooth" and "Sharp".  "Remove disconnected Pieces" might be handy if you have lots of "Ghost" pieces floating around.
Click "Apply" to finalize the remeshing process. You should then have something like this, which still has unevenly sized polygons but at least they are all quads and the amount decreased significantly.

"If you don't need to have quadratic faces" actually, remesh generates quads only. ;)

@Róbert László Páli Yeah, that's a language thing. Quadrat = german -> Square = english. Fixed.

Remesh
The linked image suggests that your mesh is good for this:
Properties Panel / Modifiers / Add Modifier > Remesh
Play with the parameters until the result are good. You should probably use the smooth mode.


text:
How to build a street gradient with a curve (Avoiding rotation)
i'm new. I want to build a street, which follows a curve. The street has a 270° curve with gradient.
Here a picture to illustrate it:

The picture show also my problem. The street rotates on the second end.
How can i avoid this effect?

You can twist the curve points using Ctrl+T :

Or you can use the Z up curve option :

You can also adjust the twist at each control point using the Mean Tilt value in the Transforms panel.


text:
How to transfer rigged model from Blender to Maya?
What is the best way to export a rigged model from Blender to Maya?
Which format is preferable, should some settings be tweaked? Or is the whole idea wrong and the rig won't work properly after importing to Maya?

Maya's rigging system is completely different. You may transfer bones and weights, but that's about it. Constraints, drivers and scripted functionality is without guarantee with most things needed to be redone.

@Jerryno Thank you for the response! At least bones and weights should work fine, or it's  also not for sure?


text:
Problems Exporting FBX from Blender?
Hello I have been having some problems exporting my fbx model from blender to unreal. In blender there are no issues, but when I import it into unreal, the front part of the mesh is extruding.

Any Suggestions? Thanks for reading this!

Is it possible you did not apply scale/rotation/position to the model and that is messing something up?

it would be very helpful if you could upload your blend file to http://blend-exchange.giantcowfilms.com/ for examination

Possible solutions:

apply all modifiers before exporting
apply rotation location and scale (ctrl+a)
Check your export options in Blender
When importing in UE4, import the skeleton first and then the skeletal mesh

Maybe those vertices have not received any weights at all yet? You can check that by going to vertex select in Edit Mode, and then choose Select by Trait --> Ungrouped Vertices from the menu:

If that does select vertices, those are not weighted at all yet and could cause artifacting later on. Add them to the vertex groups they should belong to and try again to export.


text:
How can I set a default value on a Dynamic EnumProperty?
I am trying to fix a bug in the Animation Nodes addon.
The loop nodes has a dynamic EnumProperty and I need to select a default value. But only when the EnumProperty contains Items.
For that I need to know what the value of default is when I don't give it a value. I thought it was an empty string
selectedLoop = bpy.props.EnumProperty(
    items=getStartLoopNodeItems,
    name="Selected Loop",
    default="",
    update=updateActiveL)

but this does not have the same behaviour as if I left out the default parameter
selectedLoop = bpy.props.EnumProperty(
    items=getStartLoopNodeItems,
    name="Selected Loop",
    update=updateActiveL)

Does anyone know what I have to pass to default in order to have the same behaviour?

EDIT: I discovered that when I add the default parameter the EnumProperty is not created apparently because when I try to add it to the layout later it gives me this error:
rna_uiItemR: property not found: mn_LoopCallerNode.selectedLoop
/home/mathieu/.config/blender/2.73/scripts/addons/animation-nodes/nodes/system/mn_loop_caller.py:66

is it just   None ?

I just tried that after posting my question, but it doesn't seem to work either

it could be "NONE" as the getStartLoopNodeItems() will add this if it's empty

Tried but got the same result again.

items[0][0] if that is acceptable, or you can force the getStartLoopNoodeItems() to add the empty item in any case and put it as default

That's weird.. I did what you proposed (forcing getStartLoopNoodeItems() to add the empty) but it doesn't work.. It should though

Let us continue this discussion in chat.

There is no default when items is a function (you'll get an error if you try to specify it).
I'll update the doc, this info is missing currently…
Note even with 'static' enums, not specifying the default is not the same as giving "" or None, currently. Not very pythonic, but a consequence of our current C <-> python code.

Ow.. well that sucks. I figured it could be a problem caused by the internal implementation. But now I know for sure :) Thanks a lot for the answer!

Committed 'fix' for that, now it will be possible to pass 'None' as default and get exact same behavior as if not specifying any default (and updated doc, too).

That is great ! Any chance for a possibility to give a default when items are created with a function? Anyway I'm very grateful for your answers, without you I would have gone mad at searching for a fix ;)

Eh, well, not really… This would have to be a callback too, way overkill imho. Note however that, since, when no default is specified, item with '0' value is used, you are kind of able to control what's default item from items function.

Perfect, it is not the easiest way but it will do. Many thanks! I really appreciate your time :)

I don't think it's possible. Because it seems that internally the EnumProperty is just keeping the index of the selected Item. So if I change the order of the list the stored index is not the correct value anymore. Does that make sense what I say?

Not sure I follow you, if you return five elements tuples (identifier, name, description, icon, number), the fith one is the (internal, C/property) value of each choice. It's that value which is kept by enum prop, and it does not need to match the order of the items (it just happens to do so by default, because most of the time there is no need for something more precisely controlled).

Well in the function that generates the list passed to items I do the following: I append every element to the list except the active one, I prepend this one. So active element gets index 0 and is being used as default. I have also an update function that updates the active element when it you change it via de dropdown list. Imagine El1 - El2 - El3 element 1 is active. I click El2. The order changes El2 - El1 - El3 The active element is El2 but the dropdown shows El1. That's why I assumed that the index was stored internally. Do you understand what I mean? :)

Yes, but again, this is not the index (i.e. position) of the item which is stored, it’s its value (which by default matches its index, if you do not specify it).

Ok I understand, I did not specify it. I will try and see what happens when I do :)


text:
blender automatically add faces in object mode
I'm having some problem with blender, I was working on a sphere in edit mode but as soon as I turn to object mode some faces automatically reappear.

Could you perhaps provide us with the blend file?

The only reason I can guess so far is that you have hidden the faces with H instead of deleting them. Go into Edit Mode and press ALTH. The missing faces might appear.

Agree, another reason could be if he had a mirror modifier along Y, but in edit mode he would see the "shadow" of the mirrored side... this should not be the case...


text:
Shift/Ctrl: Bind to mousebuttons 4+5 as secondary key
I'm using a 5-button mouse and like to assign Shift to MB4 and Ctrl to MB5. I could do this with the mouse software (Razer Synapse) itself, but often it does not switch back the profiles and I have the Blender keybinding in other applications.
So, is there a way to bind the MB as secondary keys for Shift/Ctrl inside Blender?


text:
Why are these faces acting like an n-gon?
It should select these faces one by one, since they are quads as you can see from cuts, but its like, selecting a n-gon. Why?

It looks like you may have an additional mesh (The one you have selected). Try deleting it.

Yeah, looks like that was the case. For those that has the same problem and wonder why did it happen, dont connect edges with "F". Use the knife tool.

Glad it helped. Happy Blendering!

@Ceroder Use J instead of F. No need for knife tool. Also if you have an answer of your own please post it so this question can be finialized.


text:
"'blender' is not recognized as an internal or external command" error when using blender from the command line
How to render a scene using DOS in blender. Every time I try, an error occurs in the DOS window like the following;
C:\blender 2.9>blender
'blender' is not recognized as an internal or external command,
operable program or batch file.


text:
Fireflies plague my render!
I'm trying to render out an animation, but I keep running into a lot of fireflies. I would like to try to avoid the denoise addon since Im rendering an animation, but at the very least I would like to get my samples down (I'm using 500). My scene is relatively simple, its two low poly hallways with lights and doorways, and the emission on the lights is cranked up the 60 (I use filmic blender color management so it doesn't blow out the image). The only thing in my scene that I think could cause all of these fireflies is the lights, but Im not sure why as Ive used bright lights with filmic blender before and it worked just fine. Also most materials in the scene are over .5 roughness, and I got rid of the metallic materials in my scene and the fireflies were still there. Any help would be appreciated, thanks!
Blend File:

I think the fireflies are mostly due to your lights being ONLY at 60, this is a very small number for filmic, it produces a small amout of light rays hence you get the fireflies.
What I did was crank up the lights to about 3000 to get plenty of light in there, that got rid of majority of the fireflies, I also added a weak sun lamp to add some extra ambient light.
Than I went to the compositor and used curves to bring the render closer to the draker moody lighting (I assumed that's what you ware going for)
Either way the settings can be tweaked in the compositor as you please, the scene is not over exposed by any means so you can take the curves node off if you prefer it brighter. I'll attach the modified blend file:

Keep in mind that firefly free does not mean noise free, if you don't want to use the denoiser be perpared to render each frame at like 4000 samples or higher (even than I don't know if you'll get rid of all the noise)
Here is a render at 512 samples:
Before compositing

After compositing

As you can see there is no firelflies but still plenty of noise.
Using the denoiser for animation is not as bad as people make it out to be, it mostly gets lost in compression. I've rendered out a section of your animation at 128 samples and half the resoulution with the denoiser on: https://youtu.be/Rs4SdF9vNUU
There was some flicker but it mostly looked like film grain and in this youtube clip most of it got lost in compression anyway. If you up the samples to 256 or 512 it will definitly look fine, maybe not perfect but it's better than rendering for a month.
In the end it's your animation so you can do whatever you want with it, either way the fireflies are fixed.

Thanks Geth270! That totally solved my problem, I can't believe I forgot about something as simple as the light strength lol :)


text:
Which keyframing option should be chosen to animate movement and scale?
Which keyframe from a the following list should be used for animation of moving and scaling:
List:

Available
Location
Rotation
Scaling
Locrot
LocRotScale
Rot scale
Delta location
Delta rotation
Delta scale
Visual location
Visual rotation
Visual scaling
Visual locrot
Visual locrot scale
Visual locscale
Visual rotscale

Can you provide me with the details of the each of these as I am a beginner.

I'm not sure how you're trying to animate but from the list you gave you probably need Location and Scaling.
One way of animating is to have an object in the position, and with the scale you want, on the part of the time line you want the animation to start from.
With the object selected, and the mouse within the viewport, press I and select Location. Repeat and select Scale.  Or you can just do it once and select Location/Rotation/Scale, even though you don't need the rotation.
Move the time slider to the part of the time line you want to end that animation on, and move your object and scale it as you want.  Then press I again and select Location and Scale again, one after the other.


text:
Why is blender rendering entire tile?
As you'll see, my blender is strangely (i think) rendering the image as an entire tile and not a "one by one tile".
I'm using GPU (if using both GPU and CPU it shows the tiles). I'm also using Auto Tile Size plugin, but even when i check the 64px box it renders the entire tile.
My assumption is that render is not properly using my GPU, as i had to format my pc and install windows, then got a blue screen error and had to re-install windows using repair option (so i think the drivers doubled (?)).
Does anyone have an answer or assumption?

Cycles has an option for progressive render, it's in Cycles Render Properties > Performance > Tiles > [_] Progressive Refine. Maybe you have checked this checkbox?

it can be the progressive refine setting "on": Progressive rendering will make a tile as big as your image -> render time will be long


text:
How to remove reflected light from glass? [Blender 2.92]

As you can see, at the image above, I used 4 lights to illuminate my scene but their area light squares is showing up and I don't want it to show up. What can I do using Blender 2.92?

Try changing the light's "Size" property to zero

You can disable the direct light reflections by un-checking the Glossy Ray visibility in the Object Properties of the light (you will need to do this for each light you don't want reflected):

Neat!   It appears that this checkbox only appears if Cycles is selected as the Render Engine, didn't know that there are sometimes properties that are tied to render engines!  If I choose Eevee I still see a reflection.  Any cure for Eevee?

Yeah, sorry, didn't mention that. You tagged the question under "Cycles", so I didn't think it would be a problem. I'm not sure how it works in eevee, because light is approximated and "rays" don't really come into play as they do in Cycles. If anyone knows a solution for eevee, I would love to know what it is.

How are you makes those nice support gifs?

Simple, free program called "Screen to GIF".


text:
Tweening drawings in Blender 2D object mode
So this seems like and obvious thing, but It's got me beat, and I've scoured the internet for threads about this problem and I haven't found them. I'm doing a rough frame-by-frame animation and so I have a layer of the rough background, to be replaced by the finished background layer later. Then background is supposed to move in one sequence, so I go into edit mode with a keyframe of where it was and I drag it to where I want with a keyframe there in an appropriate place. Then I go to Interpolate-> interpolate and it says "Cannot find a pair of grease pencil frames to interpolate between in selected layer." Same result if I click interpolate->sequence. I know I'm not technically editing strokes, but surely there's some way to drag an object and tween it between points A and B? Thanks for your help all.

I recently had this problem myself, I fixed it by making sure I was on the frame between two different keyframes. Not sure if it's necessary but try going into edit mode as well. Also make sure you have the right layer selected for good measure.

This totally worked! THANK YOU!


text:
Keyboard shortcut set using python disappears when blender is reopened
I set a blender shortcut for a custom operator in my addon using the code described here: Create keyboard shortcut for an operator using python?
When I install the addon the shortcut is registered and works fine. But when I close and reopen blender the shortcut has disappeared from the keymap in edit > preferences. However, the addon is still activated. When I deactivate and reactivate the addon the shortcut reappears and it works. How do I make the shortcut stay?
I tried using the code in the link above instead of my own code as a test and the same problem occurs.

Do you have auto-save set for preferences? Otherwise, you have to also save your preferences in python, or the shortcut won't appear.

Yes I have auto-save enabled. It works fine when I first install the addon and then stops working when I reopen blender. I also tried enabling auto-save within the python script but that did not work.

I suppose you could force the preference save with bpy.ops.wm.save_userpref()  If that doesn't work, then perhaps the code you're using is broken, although it looks OK to me at a first glance.


text:
Problem writing custom AN Sockets
I have written a custom AN socket that passes instances of a custom class between custom nodes. The socket works when connecting two nodes (1 output to 1 input). However when connecting an output to two inputs, only one of the input nodes is activated and the second is ignored.
My socket code follow. Any suggestions?
Thanks, Mike
class ChannelMessageSocket(bpy.types.NodeSocket, AnimationNodeSocket):
bl_idname = "an_ChannelMessageSocket"
bl_label = "VN ChannelMessage Socket"
dataType = "BaseChannelMessage"
allowedInputTypes = ["BaseChannelMessage"]
drawColor = (0.32, 0.32, 0.18, 1)
storable = False
comparable = False

value = None

def getValue(self):
    return self.value

def setProperty(self, data):
    self.value = data

def getProperty(self):
    return self.value

Appending Requested Materials:
This is the screen shot. The 1-2 relationship is between the instrument to Control Change / Note-Object Mapper nodes.

Code:
import bpy, mathutils, sys
from mathutils import Vector, Matrix, Quaternion, Euler
from time import perf_counter as getCurrentTime
animation_nodes = sys.modules.get('animation_nodes-master')
random_number_cache = animation_nodes.algorithms.random.getRandomNumberCache()
_node_execution_times = animation_nodes.execution.measurements.getMeasurementsDict()
nodes = bpy.data.node_groups['NodeTree'].nodes

# retrieve nodes
_82vvj6ef83nt43p = nodes['VN Instrument Three.001']
_czn2u5yds18qy65 = nodes['Note Object Mapper.001']
_w96de9hsfi7vkpd = nodes['Logic Operators']
_gelmvdkn0lh08oy = nodes['Object Attribute Input']
_kmfum7gowyg3hy5 = nodes['Convert']
_uzyd2z9777am3qs = nodes['Combine Vector']
_xxo7ksek4tpgj17 = nodes['Vector Math']
_t7x899vo7iw5ed1 = nodes['Object Transforms Output']
_yu5oo5wqbz73ttf = nodes['Object Visibility Output']
_9540zjn74dmanlk = nodes['Keyframes']
_8xw1ztvfxj8r5si = nodes['Control Change.001']

# get values
_textBlock_czn = _czn2u5yds18qy65.inputs[1].getValue()
_x_uzy = _uzyd2z9777am3qs.inputs[0].getValue()
_z_uzy = _uzyd2z9777am3qs.inputs[2].getValue()
_b_xxo = _xxo7ksek4tpgj17.inputs[1].getValue()
_location_t7x = _t7x899vo7iw5ed1.inputs[1].getValue()
_rotation_t7x = _t7x899vo7iw5ed1.inputs[2].getValue()
_hideSelect_yu5 = _yu5oo5wqbz73ttf.inputs[3].getValue()
_showName_yu5 = _yu5oo5wqbz73ttf.inputs[4].getValue()
_showAxis_yu5 = _yu5oo5wqbz73ttf.inputs[5].getValue()
_showXRay_yu5 = _yu5oo5wqbz73ttf.inputs[6].getValue()
_controllerNum_8xw = _8xw1ztvfxj8r5si.inputs[0].getValue()

# Node: 'NodeTree' - 'VN Instrument Three.001'
_channelNum_82v, _channelRec_82v, _channelMute_82v, _channel_82v = _82vvj6ef83nt43p.execute()

# Node: 'NodeTree' - 'Note Object Mapper.001'
_objectOut_czn, _channel_82v, _noteNum_czn, _frameNumber_czn, _enabled_czn, _enabledNot_czn, _velocity_czn, _instObjects_czn = _czn2u5yds18qy65.execute(_channel_82v, _textBlock_czn)

# Node: 'NodeTree' - 'Logic Operators'
_result_w96 = _enabled_czn or _enabledNot_czn

# Node: 'NodeTree' - 'Object Attribute Input'
try:
    _gelmvdkn0lh08oy.errorMessage = ''
    _value_gel = _objectOut_czn['velocity']
except:
    if _objectOut_czn: _gelmvdkn0lh08oy.errorMessage = 'Attribute not found'
    _value_gel = None

# Node: 'NodeTree' - 'Convert'
try: _new_kmf = float(_value_gel)
except: _new_kmf = 0

# Node: 'NodeTree' - 'Combine Vector'
_vector_uzy = Vector((_x_uzy, _new_kmf, _z_uzy))

# Node: 'NodeTree' - 'Vector Math'
_result_xxo = mathutils.Vector((_vector_uzy[0] * _b_xxo[0], _vector_uzy[1] * _b_xxo[1], _vector_uzy[2] * _b_xxo[2]))

# Node: 'NodeTree' - 'Object Transforms Output'
if _objectOut_czn is not None:
    _objectOut_czn.scale = _result_xxo

# Node: 'NodeTree' - 'Object Visibility Output'
if _objectOut_czn is not None:
    _objectOut_czn.hide = _enabledNot_czn
    _objectOut_czn.hide_render = _enabledNot_czn
    pass

# Node: 'NodeTree' - 'Keyframes'
_9540zjn74dmanlk.execute(_result_w96, _channelRec_82v, _objectOut_czn, _instObjects_czn)

# Node: 'NodeTree' - 'Control Change.001'
_controllerValue_8xw = _8xw1ztvfxj8r5si.execute(_controllerNum_8xw, _channel_82v)

hmm can you share a Screenshot of the node setup? and maybe take a look at the generated execution code (you can print it in the developer Panel)

also what exactly do you mean with "activated" and "ignored"?

I placed print()'s in the socket's get / set property & value methods so can see them activated, which they are not when the output is connected to two inputs. Can you provide an email to make it easier to send the screenshot and code? Mine is mikechristiansen2000@gmail.com so you do not need to expose on this board.

Ahh I see. The get/set property functions are only to copy the value from one socket to another. Only the getValue method is called when you have an unlinked input socket of that type. (somehow your mail adress does not work.. it gives me an error, not sure why. However we will be able to fix this here on stackexchange!) For my mail adress look on github.

Jacques, Please hold off on any further analysis. I see that both nodes are activated but that nothing is being passed to the ControlChange across the socket.

I am closing this question. The source of the problem had nothing to do with the custom socket, but was caused the results returned by a custom node I've written. Thanks for your time. Mike


text:
Do high end cards have better rendering performance?
A lot of times I try to render meshes with millions of polygons in a scene, and the performance is exremely slow. I tried using CUDA but without luck. I'm using a GeForce gtx 960, 10GB Vram, and have an eightcore CPU. Should I get a different card or use SLI? Or maybe look into a workstation card?

what do you refer to when you say 'I've used CUDA but without luck'? Did Cycles not render? Did Blender crash? Or did you not get more speed out of it?

cuda out of memory error

Rendering on GPUs has a few limitations, the most crucial one is the amount of VRam on the card. Basically, the whole scene that you're trying to render needs to fit into it. If you 'only' have one GPU available, the situation gets worse, because the 3D scene needs to be displayed on the same card, reducing the amount of free RAM as well.
Besides geometry eating a lot of RAM, textures can be a surprisingly effective GPU rendering killer. Check if you have many high resolution textures in your scene, and if so try to reduce their pixel size. I've had scenes where the geometry would take less than 1GB VRam, but the textures would blow the rest of the 11GB available (we have a few Titan X cards here). I reduced the texture sizes, and in the end the scene rendered on a card which only had 3GB VRam - without a visual difference.
SLI is pointless when rendering, it only makes viewport display faster, and only if the application fully supports it. GPUs cannot share memory with each other, each GPU is like a dedicated mini-computer.
Regarding workstation cards: I have access to Quadro cards here in the company. My own experience is, that they actually render a bit slower than consumer cards. If that's a CUDA implementation thing or Blenders code being more optimized towards consumer card I am not aware.
The only recommendation for your system - besides optimizing the scene itself - would be to get an additional GPU (if your motherboard can fit it) and use that one dedicated for rendering, and your primary GPU for viewport display only. What you get is:

more available VRam on the GPU
rendering does barely slow down your machine, you can continue to work while a render is running in the background
much faster viewport rendering updates
technically, a second rendering machine, because you can fire off a CPU render at the same time while the GPU is rendering on a different Blender instance

All of this we tested here in our company.

@cegaton it will, if you don't run out of memory, which is the OPs issue  :)  If one of the two cards exceeds the memory limit, the render fails for both. And what's really nice about NOT using the viewport card for rendering is when you preview render: It's just a totally smooth experience.

@cegaton You're perfectly right of course. But for the record: I have a rig here with a Quadro 4K and three TitanX for rendering on a Dual Xeon machine. And I experienced a very strange effect: When I render a high resolution scene on all 4 GPUs , the rendering will be considerably slower than when only using the three Titans. Only on high res images (that was more than 20 Megapixel)! No idea why. If the resolution is 'normal', the 4 cards outrun the three as expected.


text:
How do I animate influence of follow path
I Have been using blender to make/modify objects for 3D printing and now I thought I would try some animation.
I am trying to start the camera moving along a path starting at frame 40.  From frame 1 to 40 it moves via key frames with loc.  Starting at frame 40 I would like the camera to follow a circle path for a couple of iterations.
How do start / stop the influence of the path at specific frames.
I in my googling have seen mention of a start/stop but I am not seeing in properties/constraints.  I see noting to control the constraint in the dope sheet or the NLA editor. (Which I just discovered)

You can animate the influence slider at the bottom of the constraint.. (hover over it and press I to insert keyframes). Is that what you want?

Ok, that helps.  Now where does/should that gem exist in the wiki?  I see the influence animating but the camera does not move sigh.

There are so many reasons that might happen.. Here's a .blend with it working: http://www.pasteall.org/blend/31333 As for the wiki, see the many pages on animation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Animation

The reason was too much experimenting...  I fixed it by removing and adding a new camera.  Now how do I actually delete the old messy camera from the blend file?, do not answer here... I will ask a new Q if I cannot figure it out.

This can be done by animating the influence slider at the bottom the the constraint.
Most interface elements in blender can be keyframed by pressing I while hovering over them.


text:
Removing a dot vertex at coordinate center of wrl import?
I'm trying to get a .wrl 3D circuit, exported from kicad 3D rendering | SourceForge.net, into Blender, and I'm getting an element I cannot remove. Here is my procedure:
First, I'm using this .wrl (short version of /usr/share/kicad/modules/packages3d/smd/generic_bga.wrl) as my part model, which I call bga.wrl:
#VRML V2.0 utf8
#Exported from Wings 3D 0.98.34
DEF cube1_sep3 Transform {
  children [
    Shape {
      appearance Appearance {
        material DEF metal Material {
          diffuseColor 1.00000 1.00000 0.786667
          emissiveColor 0.00000e+0 0.00000e+0 0.00000e+0
          specularColor 1.00000 1.00000 1.00000
          ambientIntensity 0.922222
          transparency 0.00000e+0
          shininess 1.00000
        }
      }
      geometry IndexedFaceSet {
        coord Coordinate { point [
          4.15121 -4.12469 6.77561e-3,
          4.15122 4.12652 6.77561e-3,
          -4.17102 -4.12467 6.76384e-3,
          -4.17101 4.12654 6.76384e-3,
          4.15121 -4.12469 0.225658,
          -4.24526 -4.12467 0.225643,
          4.15122 4.12652 0.225658,
          -4.24525 4.12654 0.225643,
          3.74080 -3.71428 0.326457,
          -3.83485 -3.71427 0.326446,
          3.74081 3.71612 0.326457,
          -3.83485 3.71613 0.326446 ] }
        coordIndex [
          0, 1, 6, 4, -1,
          0, 2, 3, 1, -1,
          0, 4, 5, 2, -1,
          1, 3, 7, 6, -1,
          2, 5, 7, 3, -1,
          4, 6, 10, 8, -1,
          4, 8, 9, 5, -1,
          5, 9, 11, 7, -1,
          6, 7, 11, 10, -1 ]
      }
    },
  ]
}

Then, in the "3D rendering" pcbnew (board editing program of Kicad; I run it under wine on Ubuntu 11.04), I make a new part in the module editor, reusing the footprint (2D) of the resistor module R4, and assigning it's 3D model to be the above bga.wrl. Then I place two of these custom parts on an empty board at the left edge, one at top, one at bottom. I check if the 3D rendering works; and then I export a .wrl of the whole board (I've tried to include that file, which I called _2r_bga_export.wrl, 460kB in size, below).
Now, I try to import that file in Blender (deleting everything in the default file first); everything works fine, except:

... there is this "dot", which apparently refers to the top left corner of the PCB, appearing! (on the image, the 3D cursor can be placed on it by right-clicking)
It irritates the hell out of me, so I'd like to delete it; using TAB, I can go into edit mode, and with B I can box-select that vertex; however, after I delete it, it is again there! What's more, in that file, only ShapeIndexedFaceSet.008 to ShapeIndexedFaceSet.011 show that dot/vertex - but even if I delete those vertices from each affected shape individually, I still get the darn orange dot - except after that point, I cannot box-select any vertices at that location anymore?
So how do I delete that "PCB coordinate center" dot vertex?

EDIT: here is a minimal standalone test.wrl file, which demonstrates the same issue upon import in Blender (orange dot at coord. center, but this time unselectable):
#VRML V2.0 utf8
WorldInfo {
  title "Jaj"
}
Transform {
  # translation -1.175 5.725 0.0
  children [
Transform {
  children [
    Group {
      children [
        Shape {
          appearance Appearance {
            material Material {
              diffuseColor 0.831373 0.686275 0.215686
              specularColor 0.831373 0.686275 0.215686
              emissiveColor 0.831373 0.686275 0.215686
              ambientIntensity 0.8
              transparency 0.2
              shininess 0.2
            }
          }
          geometry IndexedFaceSet {
            solid TRUE
            coord Coordinate {
              point [
                # these are coordinates indexed 0, 1 and 2:
                1.16 -2.5 -3.15
                1.156926 -4.3121 -3.15
                1.156926 -4.3121 3.15
              ]
            }
            coordIndex [
              0 1 2 -1
            ]
          }
        }
      ]
    }
  ]
}
]
}

PS: To get _2r_bga_export.wrl, save the below as tmp.txt, and then in a Linux shell (see also ascii output of string compression in C - Stack Overflow), do
cat tmp.txt | base64 -d | tar xJvf -

; that should unpack the file.
[encoded data, 12528 characters]

Can you share the blend file in question with the problem vertex.

Thanks @iKlsR - I just added a smaller example as an edit to OP; save the text of test.wrl above as a text file - and do File > Import > X3D Extensible 3D (.x3d/.wrl) and import this test.wrl file in Blender, you should be able to see the problem. Cheers!

That "dot vertex" you cannot remove is the object origin. I haven't tried the main file since I don't have access to the unix commands so I will try to explain the problem(s) using the test example.
First, the origin is quite off from the main model which is why it is possibly so irritating when transforming the model so you can try to snap or center it to the model with CtrlAltShift + C. This will move the object origin slightly but won't work as desired as you actually have a loose vertex so the tool will try to average the center using the main mesh and this point, simply enter edit mode and delete it.
Next, run the Set Origin tool again and this time the origin will be snapped to the geometry. I think having the origin offset being unselectable and the duplicate vertex was what was confusing you. You can tell where the origin point is on an object by enabling the 3d manipulator widget. . If you don't want to see the origin, keep the widget disabled.
Also note, you cannot select or delete the object origin . It is fixed to your mesh and will move with it in object mode, to manipulate it use the tool I mentioned above along with the 3D cursor (left click).
You might also want to see, Change pivot or local origin of an object or spend a few minutes in the transforms tag.

Wow, fantastic, thanks so much @iKlsR - I started only late to suspect that the orange dot I see is maybe not a vertex :) It works both for the minimal test.wrl - and with the "big" _2r_bga_export.wrl: in the big, I just select all ("A") in object mode, do Ctrl+Alt+Shift+C, in "Set Origin" choose "Origin to Center of Mass" - and that is exactly what I needed! Thanks for clarifying this - cheers!

That's Blender's representation of the origin point. It represents the point around which transforms are applied. You cannot delete it.

Thanks for that @someonewithpc; indeed - and it turns out, what I wanted to do was not to delete, but to recenter the origin point. Cheers!


text:
Scene color/contrast changes based on camera perspective
I have a multi-camera setup for viewing the scene at different perspectives. The top perspective view looks correct but my straight on view looks washed out without changing any of the settings. The cameras are at the same distance from the scene. I can change the render settings before I render but I would like to know why it looks so different.
Perspective View

Straight View with same render settings.

Hello :). Isn't that just a light/world reflection?

If your material has some specular/glossy, that's totally normal that the reflection change according to the camera angle

Thank guys! There is just so much to learn when it comes to 3D design.

I lowered the "Specular" slider for the objects material that has the image using the shading tab. I did this for each object that has an image.


text:
How do I disable 'Restrict viewport selection' for multiple objects?
I accidentally turned on 'Restrict viewport selection' for each object. How do I turn them all back off without having to click the objects one by one?

Related https://blender.stackexchange.com/questions/60544/how-to-toggle-selection and https://blender.stackexchange.com/questions/6786/how-to-toggle-visibible-selectable-renderable-for-multiple-objects. There isn't as fast way as renderability / selectability, but there's a way in Outliner, border select datablocks and press S

Can try shift click and drag.


text:
Why does my appended object start to distort when I move it?
I'm appending a tree into another scene. After I try moving it to set up my scene, the branches start to distort. What am I doing wrong?

http://g.recordit.co/rJuzSYSsHw.gif

Does your tree have any armatures or rigging?

Check their transformation (rotation/scale) and apply them if needed with Ctrl+A

yes, there was rigging applied. Problem solved after removing the rigging. Thanks!


text:
How can I use the 'Copy as driver' and 'Paste driver' functionality in Python?
I'm writing an addon for Blender 2.8. I have an object and want to drive the Y & Z Scale with the X Scale. Doing it manually with right click on the Scale shows me these commands:
bpy.ops.ui.copy_as_driver_button()

bpy.ops.anim.paste_driver_button()

How can I get these commands in my Python script to work?

P.S.: I managed to insert a driver at X Scale like this:
driver_scale_y = bpy.context.object.driver_add("scale", 1)

Maybe this could be a starting point.

Had the same problem, Maybe this answer will help you too

Here's explanation how to add a driver via python https://blender.stackexchange.com/questions/282140/how-can-i-add-and-configure-a-driver-through-a-script

The bpy.ops.ui.copy_as_driver_button() and bpy.ops.anim.paste_driver_button() functions are operators in Blender's Python API, which means they are designed to be called from the Blender interface. As far as I know, it's not possible to call these functions directly from a Python script.
Instead of using these functions, you can achieve the same result by accessing the data that the operator manipulates directly. For example, you could use the driver_add() method of a property to add a new driver. In the following example, I add a driver to the default cube's X and Y scale properties, which are indices 0 and 1, respectively:
import bpy

obj = bpy.data.objects["Cube"]

def add_driver(ob, idx):
    fc = ob.driver_add('scale', idx)
    d = fc.driver
    d.type = "AVERAGE"
    v = d.variables.new()
    t = v.targets[0]
    t.id_type = 'OBJECT'
    t.id = ob
    t.data_path = "scale[2]"

add_driver(obj, 0)
add_driver(obj, 1)

Now you can adjust the Z scale and have X and Y scales update to the same values.
See the thread How can I add and configure a Driver through a Script for more information about scripting drivers.


text:
What does 'Distortion' in the 'Mesh Analysis' panel do?
I have a few questions in regards to some of the options in the Mesh Analysis panel in the Properties panel in the 3D View. I pretty much understand all the different categories except for "Distortion". Can someone explain in detail the reason behind distortion and the varying "degrees" you can set the two options to right above "Samples (sample per face)? What do 'Minimum angle to display' and 'Maximum angle to display' do?

From Blender's Manual:
Distortion

Distorted geometry can cause problems since the triangulation of a
  distorted n-gon is undefined.
Distortion is measured by faces which are not flat, with parts of the
  face pointing in different directions.

Let's examine simple four sided n-gon

Before 3d printing each n-gon is being converted to triangles. Our four sided n-gon can be triangulated in two ways marked with yellow and purple line:

On a complex model leaving non-planar (not flat) polygons can lead to triangulation in a way that is not desirable for the final product. 'Distortion' option can detect all n-gons which vertices don't lie on a plane (flat surface)
The color of those n-gons is defined by the minimum and maximum angle that the resulting triangles may form - blue for minimum angle and red for maximum angle with color transition in between.
If the polygon is flat the color will remain gray.
Here is an example of the same n-gon but with one vertex rotated at 5 degrees (minimum angle for detection) around polygons center:

Here the vertex is rotated at 30 degrees:

Here the vertex is rotated at 45 degrees (maximum angle for detection):

Any angle above maximum will color the n-gon red.
Now by looking at Monkey mesh, can you tell which polygons are not planar and which are most distorted?


text:
Why is the camera in the viewport smaller than the focal length suggests it should be?
I launched Blender, in the default "Startup file". I changed the Camera Location X, Y and Z, halving them.
Then I changed the "Units" in the "Scene" to Millimeters as you can see in the following screenshot; in the same screenshot you can see the cube "Dimensions" is 2mm.

The rendered image is fine:

But I do not understand the mutual size of the cube and the camera Focal Length: the cube side length is 2mm and the focal length is 35mm, so the focal length should be ~17x longer than the cube side but in the following screenshot the focal length seems shorter than the cube side.

What am I missing?

The size of the camera in the viewport is not the same as the focal length. Scaling the camera object won't change the focal length or the rendered image, but will change the size in viewport.
For focal length = 32mm, the camera object will look like the principal plane is 1 BlenderUnit away from the camera center. This is probably an intuitive scale so that the camera object does have a fitting size for a usual scene. If it were acutally 35 BlenderUnits big, everyone would scale it down right away.

is this documented anywhere? Thank you.

I couldn't find any documentation about, sorry.


text:
Get the transformed value from given frame to initial frame
For animation purposes I set a few keyframes manually.
Now I want to get the transformation difference between frames, so the difference in two frames of this property:
bpy.context.object.location

Using the code above I can only get the current position of the current frame.
How can I add a diagnostic box where I input two frames, and calculate the difference in location between them?

Slapped together a quick test script from Panel template. A custom property '["frame"]' on the object is used to hold the other frame, calculated against movement from current frame.
Script simply queries the location fcurves of the object, and uses fcurve.evaluate(frame) to retrieve the value at obj["frame"].

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    @classmethod
    def poll(cls, context):
        obj = context.object
        if "frame" not in obj.keys():
            return False
        if not hasattr(obj, "animation_data"):
            return False
        if not obj.animation_data.action:
            return False
        return True

    def draw(self, context):
        obj = context.object
        scene = context.scene
        layout = self.layout
        # get current frame location
        loc_current = obj.location.copy()
        row = layout.row()
        col = row.column()
        col.prop(scene, "frame_current")
        col.prop(obj, "location")
        loc = loc_current.copy()

        # using fcurves
        frame = obj["frame"]
        action = obj.animation_data.action
        col = layout.column()

        col.label("Moved")
        col.prop(obj, '["frame"]', text="From Frame")
        row = layout.row()
        for index in [0, 1, 2]:
            fcurve = action.fcurves.find('location', index)
            if fcurve:
                loc[index] = fcurve.evaluate(frame)
            row.label("%7.4f" % (loc - loc_current)[index])

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

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

if __name__ == "__main__":
    bpy.context.object["frame"] = 33 # set another frame in custom prop
    register()

Wow this works amazing! I am trying to get additional result from object.rotation_euler but no luck, any suggestions? / Can this script modified for local axis instead of global axis?

Would have thought ob.location is local?  You can't subtract Eulers like Vectors.  Converting to quaternions and back could be one way to go.  Subtracting the components of eulers would I suppose give an "indication" of rotation difference.

ob.local is global vector. I'm trying to covert it into local vector which is more direct to see the change of individual objects. Eulers is another hard issue to overcome. however your script inspired me a lot.

If I have an object with location (0, 0, 0) parented to another object with location (3, 4, 4), are you saying the child objects global location is (0, 0, 0)?

I want to change the objects differ_global(X,Y,Z) vectors into local(X,Y,Z) to evaluate the change amount alone local axis. and see the differ in local orientation.

@FrancisWeiMing-Wei  ave  a look at http://blender.stackexchange.com/a/26857/15543


text:
How do I combine these two Render Layers?

How would I combine these two images without losing information?
I have tried the mix node, the alpha over node, and the z combine node, but can't get it to work. Hope someone can give me a helping hand.

First, the word is 'node' :)
Second, Ensure you're rendering transparent layers for your leaf.

Third, the Viewer node is just a shortcut to see what the image looks like after a branch of other nodes have processed a node branch. To build both of these render layers into a finished picture you'll need a Composite node. The Viewer node just gives you the background under the node tree. You can use both: just feed both the Viewer and Composite nodes the same input.

Have fun :)

thank you very much, for the blender and grammar lesson =)


text:
Script to store name of selected object / curve, so that I can select again
I'm looking for a way to store selected object / curve name so that I can reference it in a script.
The idea is to select a curve (with the mouse), then copy another object to its location(with a script). I would also need to reference the original object so I can fill in some modifiers. Problems I'm having now: In order to duplicate that "other" object, I need to select it... which causes me to lose focus from the currently selected original object.
rough code is...
bpy.context.selected_objects

bpy.data.objects['OBJ1'].select = True #select an already created object

bpy.ops.object.duplicate() #duplicate OBJ1

# move duplicated object to same place as originally selected.
# figure out a way to copy location info from original selection.
bpy.data.objects.new.location

bpy.ops.object.modifier_add(type='ARRAY')
bpy.context.object.modifiers["Array"].fit_type = 'FIT_CURVE'

#curvename would be the original thing selected
bpy.context.object.modifiers["Array"].curve = bpy.data.objects[curveName]

Thank you very much for your help.

You can add modifiers without the ops with eg http://blender.stackexchange.com/questions/58676/add-modifier-to-selected-and-another-to-active-object/58683#58683  Also you can dupe an object with ob = obj.copy() and then link it to scene with scene.objects.link(ob)    Oh and btw to get code formatting indent all lines of code by 4 spaces.

Thanks for the response. Aye, that's just some place holder code. Main problem I'm having is referencing the originally selected object. Is there a way to store it's name and then bring focus back to it. I've only really needed to bpy.context.selected_objects and bpy.context.active_object, in the past... so this is a bit more difficult for me.

Plain and simple curve = context.active_object Then after dupe or other operators that change the active object  dupe = context.active_object after which curve will still refer to the curve that was the active object when you assigned it.  To set the active context object back to curve use scene.objects.active = curve

You would want to store the object by doing:
object1 = bpy.data.objects["Cube"]

then you can use:
object2.location = object1.location

to set object2's location to be the same as object1's location.

for the selection part of things: Why not simply make the user select both items in a specific order? Blender stores the objects in selection order in this property:
bpy.context.selected_objects

That means, if you first select a cube, then a sphere, then a circle, the property content will be:
[bpy.data.objects['Cube'], bpy.data.objects['Sphere'], bpy.data.objects['Circle']]

To access them, you could use the index:
bpy.context.selected_objects[0]  # = first selected object
bpy.context.selected_objects[1]  # = second selected object
bpy.context.selected_objects[-1]  # = last selected object

Also, the last selected object will be the active one:
bpy.context.active_object