How to represent Box2D joints Back-story: I'm using blender as a level editor for a game I'm making, this means I write an addon in Python to export the relevant data in my format, and manipulate the blender interface to add options I need. Fixtures and Bodies (basically shapes) are easy to represent with 2D meshes, and I use Properties to add my specific options. Whenever I can, I exploit existing blender options (like the rigid body stuff) instead of adding my own. I am no avid blender user otherwise, so I guess that makes me a noob vs all everyday users.

[TL;DR: just read from here...]

What blender object resembles/represents Box2D Joints the best? And if none is perfect, what can I start with and how do I modify it to suit my needs?

I need it to have:

Two "object properties" (references to other existing objects) which will represent which two bodies to connect. In Box2D these are called BodyA and BodyB.
Two "point/vector" properties. These would represent what specific points on the two bodies to link together. Box2D name: AnchorA and AnchorB

What would also be nice:

Have it visualize the joint between the two anchor points, if it draws a line or something that'd be great.
Really nice if it actually restricted the objects to, say, a certain distance away from each other when I move them.

[...to here]

Then, I'm sure I could add more specific properties like joint type, break strength, etc. myself through Python Property registration.

Note: I am a programmer; I'm not afraid to code.

Oh, and before you mention it: I have seen "rigid body constraints", but among other things they don't satisfy condition 2. I've also found them generally messy and hard to understand (if the constraint is already applied to a body, what does it need two parent properties for?) I'm assuming a lot of this is because they are focused towards 3D not 2D, but am open for suggestions if someone still sees an opportunity there.

Storing the data in collection property:

import bpy

# specify the data structure - each item will be group of properties:
class Box2DJoint(bpy.types.PropertyGroup):
    # name = bpy.props.StringProperty()
    body_a = bpy.props.StringProperty()    # reference object name
    body_b = bpy.props.StringProperty()    # reference object name
    anchor_a = bpy.props.FloatVectorProperty()
    anchor_b = bpy.props.FloatVectorProperty()

# store them under scene:
bpy.utils.register_module(__name__)
bpy.types.Scene.box_2d_joints = bpy.props.CollectionProperty(type=Box2DJoint)

# populate like so:
new_joint = bpy.context.scene.box_2d_joints.add()
new_joint.name = "silly_box_joint"
new_joint.body_a = 'Some_object_name'
# ...etc.

# remove with index:
id = bpy.context.scene.box_2d_joints.find("silly_box_joint")
bpy.context.scene.box_2d_joints.remove(id)

The advantage of the data storage like this is you can also display it in UI lists which is nice: Populate a list with custom property dictionary data

If the user renames objects in blender or deletes them, the references must be adjusted: Execute a python function whenever the user interacts with the program. This offers the most flexibility, the code can catch almost anything. The handicap is that the frame change handler runs all the time.

Other approach would be to give objects some random hash which is stored with object name and searched for when the object is not found. Here is how to set it up for objects:

import bpy
import string
import random

def random_id(length = 12):
    return "".join([random.choice(string.ascii_uppercase) for i in range(length)])

bpy.types.Object.hash = bpy.props.StringProperty()
bpy.context.object.hash = random_id()

To check if object name exists:

if bpy.data.objects.get("FooBar") is not None:
    # do something with bpy.data.objects['FooBar']
else:
    # deal with it
    # look through all objects for hash and if found update name reference
    # if hash not found object is deleted or a ninja

Use bgl module to display such custom objects in view-port: Draw points on screen with bgl? (python)

The drawing code runs inside modal operator and has access to bpy.context, you can draw points, lines, triangles etc. in 3d float coords (init with 'POST_VIEW' tag) or in 2d pixel coords (init with 'POST_PIXEL'). BGL Wrapper Reference. The BLF module can be used to draw text. There are python templates in text editor for this.

Keeping this simple is good because drawing with python is not very fast. Too many draw-calls and Blender view-port fps will suffer.


Image sequence customizing I'm trying to do some scenes which use a mixture of 3D backgrounds with 2D animated characters.The best way I've figured this out so far is to use a plane with an image sequence of pngs which hold the frames.

The problem with this method is Blender seams to only load image sequences based on image numbering. If I wanted to do a sequence which loops say, frames 0-5, then repeats 4-0 for the 'return' of the animation, I would have to load frames doubled up.

Is there a way, maybe with a script, to change the sequence order? I can see it as a useful plugin but my python skills are pretty much non existent.

It is quite easy to do what you want, just learn how to use the Frames, Start Frame**, Offset and Cyclic controls on the Image Sequence node used as the texture of the plane's material.

Read: Same Video on each face, but with different time delay?

Then to change to another sequence of repetitions use a mix color node to start the next iteration and animate the Mix Factor

Read: How do you animate image texture materials in blender cycles with keyframes?


Depth of Field on glossy surfaces (cycles) I have made a scene in Blender where there is a glossy ball on an icy lake. I noticed that there is no Depth of Field on the reflection of the ball.

I could add a fake Depth of Field in post-processing, but are there any other options?

If the reflective ball is inside the FOV, it will probably still preserve the sharp image due to light path has been concentrate from outer light, it will be harder to tell the blur effect if a convex mirror is presented.

And also, they do have a Depth of Field reflection, if you turn down the F-Stop to extremely small,  and using a giant sensor that have ever been made in camera history. You should see the blur inside the Convex mirror

 You can notice that the little tiny Susanne is clear while the whole mirror even around the tiny Susanne is blur, due to the natural light path.

What you encounter is because normally, we don't have this kind of lens, way too impossible to make it perfectly. If we only get the ordinary lens with a long focus len (125mm) and big enough Aperture (F/2.8 or something). The depth of field should be narrow enough to see the blur effect in object easily. But that only occur in diffuse object not the convex reflective.

Assume that your reflective scene is in far far away (like an HDR environment map or sky). You should get the maximal blur effect right? See the figure below with a normal lens:

"Hey, the light path change a lot of angle. Reflective should be blur as well". Unfortunately, Blender didn't show the real effective aperture size in camera icon. So I made one for it:

See that ridiculous tiny circle in front of camera? That is the real effective aperture size in Blender default 1 meter as 1 unit. So it is almost a dot for that reflective mirror if you put it in a distance. And follow up the light path you should see clear image unless you properly setup the scene size.


How do i show the whole object in the camera view before i render? I am trying to render an animation, I have set up the camera in the right position but not all of the object is showing in the camera view, like its in shadow. how can i fix this?

Thanks

Increase the clipping end of the camera from camera setting.


Incorrect render image Hey there! Can you solve this problem? Scene is looking OK in rendered viewport, but something messed in final render. I am using volumetric matherial only in the ocean.

Try looking in the outliner to see if something that is hidden(the eye is grayed out) is set to render(the camera icon is NOT grayed out).  If you want to hide this object you can click the camera and it will not render in the final render.


How can I constrain a camera to focus on a face of an object? I have an object that I want the camera focus all time on the same face.

So if I move or rotate the object and so the face too, the camera should move/rotate to continue focusing the same face.
Can someone help me? Thanks

Lets say you have doing this suggestion :
Constrain camera

But that solution is just make the camera only looking to the center of the object, not the face you want.

The next step you need is just to create a vertex group on the face you want then assign it to the constraint :

Select your target object and go to edit mode.
Select your designed face.
Go to the mesh data tab and in the vertex group field, just add one by click + button.
Rename your vertex group and click assign ( to assign the face you selected )
Then select your camera, go to the constraint tab, and insert your vertex group to the vertex group field


Creating new tabs in properties panel As far as I know this was not possible on 2.7x, but with the new interface in 2.8, are we finally able to create new tabs (like the World or Materials tab) in the Properties window?
Otherwise, is there a good reason to prevent users from doing this? There are some cases where it would make a ton of sense to create separate tabs entirely (render farm managers, game engines like armory that have lots of settings making the existing panels look too crowded)

SpaceProperties.context
This is the enum property that used to go across the top of properties area, rendered as tabs.

class bpy.types.SpaceProperties(Space)
Properties space data
context
        TOOL Tool, Active Tool and Workspace settings.
        SCENE Scene, Scene.
        RENDER Render, Render.
        OUTPUT Output, Output.
        VIEW_LAYER View Layer, View Layer.
        WORLD World, World.
        OBJECT Object, Object.
        CONSTRAINT Constraints, Object Constraints.
        MODIFIER Modifiers, Modifiers.
        DATA Data, Object Data.
        BONE Bone, Bone.
        BONE_CONSTRAINT Bone Constraints, Bone Constraints.
        MATERIAL Material, Material.
        TEXTURE Texture, Texture.
        PARTICLES Particles, Particles.
        PHYSICS Physics, Physics.
        SHADERFX Effects, Object visual effects.

In the python console
>>> for a in C.screen.areas:
...     if a.type == 'PROPERTIES':
...         break
...
>>> s = a.spaces.active
>>> s.context
'DATA'

>>> s.rna_type.properties['context'].enum_items_static.keys()
['TOOL', 'SCENE', 'RENDER',
    'OUTPUT', 'VIEW_LAYER', 'WORLD',
    'OBJECT', 'CONSTRAINT', 'MODIFIER',
    'DATA', 'BONE', 'BONE_CONSTRAINT',
    'MATERIAL', 'TEXTURE', 'PARTICLES',
    'PHYSICS', 'SHADERFX']

Setting the panels bl_context class property to a value above defines which "tab" it is in.
Trying to set an enum to an undefined value will throw an error, as opposed to setting bl_category in a 'TOOLS' panel which creates a new tab.
To make a new tab would need to somehow add an item whilst un-re-registering the property.  Perhaps this is doable, in the back of my mind there has been a question either here or on the blender artists forum.
The property is inter-twined with context.  I wouldn't mess with it.
Alternatives

choosing one of the above for your Panel context. Remember there is the ability to subpanel in 2.8 by defining a panels parent panel.
appending or prepending draw methods to existing panels. Prepending to a panel that is always at or near the top gives high vis easy access. IMO this is under-utilized.
"take out" (unregister) panel classes that you wish to replacce.  Eg overtake one of the conexts by unregistering other panels when in "armory" mode.
or redraw an existing panel.  Panels have a _drawfuncs list that can be manipulated at runtime.


How to resume editing How do you resume your editing if its saved as a .blend file, I tried editing a video sequence I saved it with .blend, now when I open it with blender its showing a blank output with strips, How do I resume my editing ?

Found.. Had to do file->external data->Automatically pack into blend,
and then save as .blend unfortunately lost the edited sequence


How to make fog/ Fog is not showing? So I watched a tutorial on how to make fog and it showed just to add a volume scatter node, but when I do this nothing shows up, it's just blank. I'm basically trying to recreate the PS2 intro fog and need to be able to see it from a far distance looking downwards.
There are screenshots from my project:

Make sure that if you are using an older version than 2.8 to check volumetrics in render properties tab and adjust the end clipping if you scene is large.


How to make a (photorealistic) material similar to tomato placenta and inner circle similar to this? I'm trying to create a completely synthetic tomato slice, any suggestions on how do I achieve it to look more similar to a real tomato slice via only nodes setup? I’m trying to get a more realistic render. I feel that my biggest issue is my lighting and then my materials. However i’m not quite sure how to go about improving both.

synth:
real:

Hmmmm, as far as I understand,

the real thing does not have a solid 1/0 boundary between the liquid and the solid part
all surfaces have a lot of microbumps.

So what I can think of here is that you can try taking two different levels of noise textures, and using the one with larger scale value for the solid part and the one with the smaller scale for the gooey/liquid part of the tomato.

Also, try blending in the borders between the two, make it so that the boundary of hard part is more like a slope like the ocean shore rather than a straight-up vertical fall like the well.

And yeah, that's really it, the shine added by the correct displacement map would do most of the heavy lifting. Ofcourse you can do this manually with a fractal subdivision if you want.


Why my active rigid body objects not collide with passive rigid body objects Why my active rigid body objects not collide with passive rigid body objects?
I used rigid body for the hair and I want it to collide with the body,so I make some collider.I set the collider as passive and the hair as active,but they do noy collide.

Not sure your hair will be inlcuded in the rigid body simulation stack even if you apply a rigid body to the empties. Might want to look into the molecular addon as it calculates collisions for particles, etc


How can I switch from Single Image to Image Sequence in Compositor network, with a script? I have this piece of Python code:

import bpy
import os

# switch on nodes
bpy.context.scene.use_nodes = True
tree = bpy.context.scene.node_tree

# Clear default nodes
for node in tree.nodes:
    tree.nodes.remove(node)

# Create input image node
image_node = tree.nodes.new(type='CompositorNodeImage')
file_path = "C:\\DEV\\testSequence.1114.exr"
image_node.image = bpy.data.images.load(file_path)
image_node.frame_duration = 200
image_node.frame_start = 1114
image_node.frame_offset = 1114
image_node.location = 0,0

This script makes a node in the compositor tree and loads the file in C:/DEV/testSequence.1114.exr; however, instead of 'Single Image', I want to switch to 'Image Sequence'. how can do this in script?

Switching from still to sequence is actually part of the image data not the node itself. After you load the image used by the node you can set it's source to 'SEQUENECE'

image_node.image.source = 'SEQUENCE'


Issue with sculpting into cylinder I'm trying to carve into a cylinder for a project due next week, but its not sculpting the way I need it. When I try it just leaves these tiny polygons behind (see image linked)

http://prntscr.com/d2ghhd

I'm not sure why its doing this, any help is appreciated

It's because you have Dynotopo enabled in sculpt mode Tools option.It causes generating new geometry each time you use brush. Disable this option to avoid that.

And here is the way, you can make the element you need in much faster and easier way:


Can't seem to fix Eyedropper shortcut For some reason, no matter what file I open, when I press E I get a contextual menu about the brush's Stroke Mode, but not the color picker/Eyedropper. I have been using the default Shortcuts that came with Blender 2.8.
Changing the menu shortcut to something else causes E to do nothing, even when I check to make sure that the Eyedropper is setup with it as its shortcut key.

Not sure about your problem... The shortcut for the eyedropper is S. To set the shortcut: Preferences > 3D View > Image Paint > Image Paint (Global) > Sample Color.


How to construct a moebius loop using bezier curves How can I cut 2 bezier circles and then join them to make one continuous loop and then extrude a circle along the loop? Then texture it to make it look like a garden hose like my StackExchange profile picture.

This is not a duplicate. It is a different form of moebius loop.

If you have activated the Add mesh: Extra objects, you can use the XYZ surface to create a shape that looks like your avatar. The parameter you'll want to experiment with in the image below, is the 1.5. It controls the size of the inner loop. The 2 controls the number of loops.
I used the formula for an epicycloid (http://en.wikipedia.org/wiki/Epicycloid) and modified it slightly, to give it depth.
Once it looks good, convert it to a curve and put a bevel on it.

EDIT: I realise that this isn't exactly what you wanted to do, but if you add bars between the loops, it should pretty accurately reproduce the kind of image you want.


converted particles on top of one another instead of simulation position (warning: contains bacon) Got some bacon problems.
I'm trying to fill a bag of bacon cubes and things were going well until was time to convert my particles.
I've gather 6 different pieces of bacon in a collection;
my bacon pieces are active collision and rigid bodies, applied transformations, each with it's origin set to geometry;

created a rigid body container with a transparent material and collision physics, displayed as Bounds only;

then I've set a particle system to a plane as emissor;
set to Render As Collection;
set the Instance Collection as my BACON collection;

alright, about frame 50 the container is pretty much filled as airtight packed bacon is supposed to look, so it's time to convert the bacon mayhemness in a mesh I can edit, shrinkwrap another mesh around it to make the 'real' container etc.

but then, when I convert it, all the 3174 pieces of bacon are sent to the same point, one on top of another. things go awry and I can't get my beautiful packed bacon.

the blue selection is all the bacon that was supposed to be in the bacon pack, as in the simulation.
here's the bacon looking like bacon, so ya'll feel motivated to help me! haha

** i'm taking suggestions on how to fill a container with bacon; i'd love to convert all the bacon to mesh, do some cleanup and use it, even if it's over 3k pieces, I was guessing that I could clean it up somehow and use it. i know it's a lot of bacon, but the container wouldn't fill up sooner. lots of trial and error on this part. taking advices!

I ended up trying to use hair particles on the container and after a ton of fiddling with the settings, got the bacon on the layout I wanted. things were awkward with the hair particles, as they were displaced on some kind of natural vortex (i say natural because there was no force field applied, and the bacon-hair was growing on a spiral pattern. then i copied one of the sides of the container and applied hair on it, so the sides wouldn't be emitting bacon.
after some more fiddling, i could convert all the particles to meshes. a ton of meshes, btw, 5k+. so i did some cleaning, and some more cleaning, and some more, and was happy with around 600 pieces.
then, i joined 'em all, shrinkwrapped my container on it, gave it some offset, applied the label on a set of the container duplicated faces and voilà!


Time Lapse Video-week to week transition animation somewhat new to Blender. Always have kept my eye on it, know enough to get in to trouble. Anyways, I am in the process of creating a time lapse video of a construction site. For the past 8 weeks I have been going to site and flying the site with a drone. Coming back and processing the data in another software, creating a 3D mesh and exporting it as a OBJ file then importing into Blender. I am quite impressed so far with the results.
Looking for input on how you all would approach animating the transition from one week to the next. Keep in mind I am a newbie. Familiar with making videos in a basic microstation or autocad, but it was really time for me to up my game.
I really don't want to render the video fully each week and process it in the video sequencer. Would like to progress past that point in my life ;) looking to grow as a modeler. Initially I was thinking of using  transformation with skin-wrap with shape keys. Any thoughts? Little concerned about going that route with the materials mappings. Is there a way to use two separate meshes with shape keys and keep their material mapping?
The site is a lift station for sewage, one of the holes is about 60 feet wide and will be going into the ground 50 feet other side will be going down 25 feet. Two story building on top.

That sounds like a really cool project, I'd be interested to see the results if you happen to post it somewhere.
As far as animating, if each stage of construction is a separate object, you can keyframe their visibility at different points along the timeline to have them transition.
For example, assuming 30 frames per second and each object stays in the scene for 2 seconds, you would start out the scene with the first object visible and the rest turned off (for rendering, not just in the viewport).  At frame 1, hold the cursor over the visibility icon for that object and press i to add a keyframe.  You'll want to have the other objects turned off and keyframe each of them the same way.  Notice that the color of the icons changes when they're keyframed:

Move the timeline to frame 60 (2 seconds) and keyframe Object 1 again, this will keep it visible for the entire two seconds.  Now, keyframe Object 2 as visible.  Move the timeline to frame 120 (0:04 in video time) and keyframe Object 2 as visible again and Object 1 as invisible.  Move the timeline to frame 150 (0:05 in video time) and keyframe Object 2 again to keep it visible.  I did a test in Blender with three objects and here's what the timelines looked like for all three:
Object 1:

Object 2:

Object 3:

The diamonds are the keyframes, the line in between them shows when the object is in a constant state (in this case, visible).
For the rest of the objects, keyframe them as follows:
-invisible at frame 0
-visible at the end of the last object
-visible 60 frames later
-invisible at the final frame
Doing that, you should be able to just keep increasing the total number of frames as you add more objects and, each time you add an object, just render only the new frames and assemble everything in your video editor of choice.  You can even add transitions between them, titles/captions, etc.
Good luck, hope that helps!


EEVEE Volumetrics disappears when I plug in a noise texture to density node Been trying to get this to work. Am I doing something wrong or is this a bug? The volumetrics disappears when I plug in any noise to the volume scatter node. I've also tried other textures.

Thanks in advance :)

This is a bug with Mac. I don't know if someone already reported it, but I saw a video on Blendernation ("Blender 2.8 Eevee Volumetrics tutorial from Chocofur") and there was a comment from someone with the same problem and Chocofur confirmed it on his Mac.


Photomatching in Blender possible? One function I'd like to see in Blender is the possibility of matching 3D geometry to photos. The method I have in mind consists of picking corresponding points between the mesh and a photo of the same mesh. When multiple points are picked this gives enough information for finding out the camera location in the photo.  Some (expensive) software already has this feature, like 3Ds max, Rhino and FormZ. I wonder if anyone knows of any script that makes this possible in Blender, or might be able to help me figure out how to setup this operation in blender. I'll describe the operation, step by step.

Load a 3D mesh.
Load a photo that features an identical 3D mesh from any angle as background image.
Pick point on 3D mesh (for example: left corner of building)
Pick corresponding point on photo (in this example: left corner of building).
Repeat step 3-4, X amount of times, picking different points.
Making use of information from step 3-X to position the camera so that the 3D mesh "matches" the background image.

It would be awesome if there might a way to do this in blender, either by a script or manually.

Thanks for any help, and have a wonderful day!

You are most likely looking for BLAM.

"A camera and projector calibration toolkit for Blender that also does automatic 3D reconstruction of geometry with rectangular faces."

https://github.com/stuffmatic/blam

See this introduction video:
https://vimeo.com/35153437 and other videos and documentation listed there.

It does not match an existing mesh though, it creates it for you...
There's other methods too, perhaps using the camera tracker over a sequence of images.


Step-by-step to baking a model for export, so that it looks smooth but doesn't have all the faces of a subdivided mesh What's even the point of baking? I want to learn it because I've been told it can help me with my issue. I want to make my mesh appear subdivided, but that would bring it over 100,000 faces.

Baking can be used to create the image texture for example a character. It can also be used to create normal maps. The below video teaches how to remove faces from a high poly mesh but still keep the detail in it by simply adding a normal.
https://www.youtube.com/watch?v=ApzVWuPa4A4


Is there a way to simulate water balloon physics in Blender? Trying to animate something in Blender and I thought I might try and give it water balloon physics. I don't know how to simulate these kinds of physics so I was wondering if anyone has any suggestions.

Do you want a physically accurate simulation ? Or just something that looks like a water ballon ?

If you want something that simulates the look of a water ballon I would suggest looking at soft body but If you want to go in depth, You would need to put a fluid simulation inside a soft body or a cloth simulation ( but you will need a pretty buffed up computer for that ).


Animation Nodes: Merge spline points I have been trying to use Animation nodes to create splines on certain edges, as can be seen in this question. It is working, but I am running into a problem: The splines that are generated by the Splines from Edges node are not connected to each other. Their points overlap, but do not connect. When given a bevel object, there are gaps at their corners, and the shading cannot be smoothed.

I need a way to remove these double points. If they were mesh, I'd use 'Remove Doubles', but such an option does not exist for Splines. And if I convert to mesh, remove doubles, and then re-make the splines from edges (all via nodes), it re-creates the same problem.

Is there a proper solution to this in animation nodes?

Spline From Branche

Starting from version 2.1 of Animation Nodes, the Splines From Edges node has a new method called Spline Per Branch which minimizes discontinuity by combining the vertices of each branch in a single spline. Below is a comparison between the Splines Per Edge (left) and the Splines Per Branch (right) methods:

Sking Modifier

The author suggested using the skin modifier to solidify the filtered edges from the referenced answer. Most of the work is handled by Blender's skin modifier. This, however, imposes certain difficulties. Each of the following sections will concert with one of those difficulties.

As a study case, we shall use the example from the referenced answer. This example filters the edges by Freestyle Marked Edges such that the node tree only outputs the edges that are marked as freestyle:

Vertices

You might have noticed by now that we can't output the filtered edges directly, this is due to the fact that the skin modifier will also skin individual vertices, that is, vertices that are not connected to any other vertices through edges. Such vertices were introduced because their edges may have been filtered (removed), so we should also filter vertices so as to only keep the vertices that are used by the edge list.

I will first initialize a boolean list of length number of vertices that we will use to filter the vertices where the the corresponding boolean to each vertex is True if it was mentioned in one of the edges and False otherwise. I chose to initialize all the booleans to be False by default, the significance of this choice will become apparent in a moment. The code to generate this list is:

BooleanList.fromValue(False, len(vertices))

Next, I will loop over the filtered edges, set the booleans at the indices they carry to True and reassign the list. After the loop is done, all the elements that are referenced in the edges will be true and we will have our filtered list. The implementation is simple and is very similar to the loops iterator loop in my answer in the referenced question, so head over there if you want more detailed explanations:

And you can see that the vertices we have are indeed the ones that are part of edges:

Edge Indices

The foregoing section introduces a problem, since we removed some vertices, the vertices indices changed and subsequently the edge indices are no longer valid or connect two entirely different vertices together. To fix this, we have to find the new index of each vertex after the removal of the vertices. We can find a function that maps the old indices to the new ones by studying what I like to call the Indices Train:

The upper row represents the original vertices, each have its own index. The middle row represents the filtered vertices, where you can see, some of vertices were removed. The last row represents our boolean filter list. If you notice, the indices of some of the vertices changed:

Blue: Became 1 instead of 2.
Orange: Became 2 instead of 4.
Green: Became 3 instead of 5.

I want you to take your time and try to figure a possible formulation for the function that maps the old indices to their new ones. The solution is simple:

   Each index is reduced by some integer n where n is the number of removed vertices before that index. For instance, Blue was reduced by 1 because only one vertex was removed before it, that is, the cyan one. Orange and Green were reduced by two because two vertices were removed before it, that is, the cyan and the violent one.

So the problem reduced to finding the number of removed vertices before each vertex. Notice that we have a boolean list that tells us exactly which vertices was removed, considering True to be 0 and False to be 1 (Contrary to the normal boolean representation), if for each element, we sum all the booleans before it, we will get exactly how many vertices was removed. For Blue, we have 0+1 = 1 as expected, for Orange, we have 0+1+0+1=2 as expected, and finally for Green, we have 0+1+0+1+0=2 as expected. We can implement this by using a loop:

We create an initially zero integer, at each iteration, we reassign it to be itself plus not boolean, the not is to implement the statement "considering True to be 0 and False to be 1". And then we append the integer to an integer list. Take your time to understand why this work.

All we have to do now is to subtract those from the old edge indices to get the new ones:

The New Edges loops over the edges, get the corresponding number of removed vertices from the Removed vertices loop, subtract it from its index and create a new edge indices from the result of the subtraction. Ending up with a new valid edge indices list. By outputting the filtered vertices and the new edges, we get the mesh that should be skined:

If we attempt to add a skin modifier now to get the skined mesh, we will be disappointed; because it will not work, the reason is explained in the following section.

Skin Root

The skin modifier requires one vertex to be a Root. A root is basically a vertex that blender uses as a reference to compute orientations for the output mesh. Upon adding a skin modifier manually, blender automatically adds the vertex at index zero as root, that's why you nearly never have to set the root unless needed. However, Animation Nodes keeps writing a new mesh to the object every execution, and since the skin modifier was already added in some previous execution, those new meshes don't have roots simply because nobody set them, this, in turn, cause the skin modifier to fail. The solution is simple, we just have to set the root to some vertex (A process that may be arbitrary if no fine tuning is required). Well, not really. You see, blender store the skin data in the data.skin_vertices data collection and as it turns out, blender doesn't allow us to create such data collection. So the only way to get this to work is by removing the skin modifier and adding it again, something that was described by zeffi in this question. Another method would be using the bpy.ops.mesh.customdata_skin_add operator which require context overwrite, something that we shouldn't really be doing in Animation Nodes. To remove the modifier and add it again, we can use the script:

#If there is a skin modifier by the name "ANSkin", remove it.
if 'ANSkin' in object.modifiers:
    mod = object.modifiers['ANSkin']
    object.modifiers.remove(mod)

#Add a skin modifier called "ANSkin".
mod = object.modifiers.new(type='SKIN', name='ANSkin')
#Edit the options of the modifier:
mod.use_x_symmetry = False

#Output the input object
outObject = object

If you are not familiar with the script node, please study this first.

We now have a working skin modifier:

One thing we can do is control the radius of each of the edges, which we can do using such script:

for v in object.data.skin_vertices[0].data:
    v.radius = radius, radius

Which when used:

Notice that we can control the radius per vertex, so one can use such script:

for v, r in zip(object.data.skin_vertices[0].data, radii):
    v.radius = r, r

Where radii is a float list with the radii, which is used as a random list, returns:

Notice that we can control the radius as two individual values in each direction, normal and cotangent to the edge. I will let you figure this out yourself.

Blend file for study and practice:


Array along the curve keeping rotation and equal steps along an axis Is there a way to control a position of arrayed objects by a curve keeping the rotation mode and equal steps of the array along an axis?

(Detailed explanation at the screenshot applied)

Thanks!

Here is a workaround using native tools, unfortunately it is destructive, so save a copy of your curve before proceeding.

Make an array of a simple plane object with the desired spacing.

Make a copy of you original curve (for safe keeping) and extrude it slightly in Z so it can encompass your plane size, then convert it to a mesh object.

On the arrayed plane add a Shrinkwrap modifier set to the mesh-converted curve. Adjust its settings to Project (so spacing remains even) and both Positive and Negative if necessary.

Now place your cubes using a particle system, adjust Count as necessary to match the Array Count$+1$ (due to a bug). Pick the cube as rendered object and turn on Unborn and Died.

Under Rotation set it to None so the cubes always face the same direction.


How do I make a delay between when a sensor is activated and when the controller activates? So I've been working on this car game and want the level to restart when you hit the ground outside the track.

I have a collision sensor on the car looking for colliding with an object with the property "Ground" Next, I have that running through an and controller into a scene actuator that restarts the level.

The problem is that the level restarts as soon as you hit the ground outside the track. How do i add a delay between the collision sensor and the scene actuator?

This is not possible. An event already happened. What you do is to describe the operations on the event.

But you can lift it to an higher abstraction level. Split the logic into two parts:

on collision start a timer
on timeout switch the scene

Reference:

How do you add a cool down timer?


How can I select every Nth edge in only one direction on a plane? Using Nth in shortest path requires selecting every every length of vertices.
I've tried manipulating checker select.
Select similar selects all edges in one direction. Adjusting the threshold doesn't help.
I don't know how to write for select pattern.
All the other similar questions don't help.

I'd like this pattern.

You can do this in 3 easy steps:

Edge select one Edge with Alt + RMB.
Click on Select > Checker Deselect (F6 for Nth Selection, Skip and Offset)
Click on Select > Edge Rings

You just have to deselect the top and the bottom edge. In the .gif it is done with Shift + Alt + RMB.

Further Reading on this answer.

Further Information:

After using Checker Deselect you can adjust the desired Nth Selection at the bottom in the Toolshelf Panel or by pressing F6.

  Nth Selection
        Number of points to select.
  Skip
        Number of points to skip.
  Offset
        Offests at what point to start at.

quoted from the Manual


When I save something as an OBJ file the texture does not save with it, why? I use Blender to render objects as this makes them look better. The problem is when I export one of my characters as an OBJ file and then import it back into Blender to render, the textures seem to not have been saved with it and the character's surface appears pink when clicking on 'Texture Solid'.
At first I thought I accidentally pressed a button without realizing but, I sent the file to my friend and it was also pink for him so I began to think I was missing the texture. I have been scanning forums and found the suggestion of: File>External Data>Find Missing Files. However, this did not work either. I am completely and utterly stuck on what to do and my hobby is now hold up until I can fix it. The second image shows the problem I am having. The first image shows it's how some textures don't export with the file when I export the character from 'Roblox Studio'

.OBJ (Wavefront) file itself only stores geometry data, it does not keep anything regarding materials or textures.

Materials (including references [paths] to textures) are stored in companion .MTL file/format. But it does not embed textures themselves either.

So you have to give .obj, .mtl and all your texture files (you can use 'Copy' option of the exporter to copy all needed textures in a subdir next to exported .obj).

But there is yet another issue with OBJ - filenames must absolutely not contain any space. This is simply not supported by the format, and if your mtl and/or texture files have some, they won't get loaded.


While in texture paint, make uv map edges visible (Cycles) i'd like to see the uv map while texture-painting. But the uv map in the uv editor shows only if the 3d view is in edit mode. I've seen in a tutorial that the map can also be visible in texture paint mode, how can i do this?

regards,
  Toast

If you switch back to BI then select texture paint, then you can go back to cycles to paint and the outlines should stay. I think it is a bug because it turns off sometimes until you switch back and forth again.


How to check if EEVEE or cycles is used? Is there a way for a shader/material to check if it is being render in EEVEE or cycles? I want to activate different nodes that immitate or indicate some effects that don't work so well in EEVEE, for previewing.

You can enable Material Output for a specific render engine. This will allow you to create a single material with one material output for Eevee and one for Cycles.


Blender won't start on Tails 1.4 (Debian) amnesia@amnesia:~/Desktop/blender-2.74-linux-glibc211-x86_64$ ls
2.74                    GPL3-license.txt       LICENSE-bmonofont-i18n.ttf.txt
blender                 GPL-license.txt        LICENSE-droidsans.ttf.txt
blenderplayer           icons                  Python-license.txt
blender-softwaregl      jemalloc-license.txt   readme.html
blender-thumbnailer.py  lib
copyright.txt           LICENSE-bfont.ttf.txt
amnesia@amnesia:~/Desktop/blender-2.74-linux-glibc211-x86_64$ ./blender
bash: ./blender: No such file or directory

I'm an actual Linux noob and googled for install instructions. I use Tails 1.4 which is Debian.

The problem is that you are trying to run a 64-bit version of Blender on a 32-bit system. Go to download.blender.org, click on the "GNU/Linux" tab, and click the 32-bit button. Then, extract the archive and run the blender executable.

For a more in-depth explanation of the error message, check out this answer on unix.stackexchange.com.


Is there a way to export each rendered layer as its own image? My scene uses multiple render layers.

I'd like to edit each rendered layer in Photoshop, and composite it in Photoshop.

Is there a way to export each layer as an individual image?

Use a file output node and save as openEXR multilayer:

The EXR multilayer format will allow you to save multiple render layers and passes in a single file.

The EXR format is the best way to preserve the integrity of your render layers, as it will keep them linearized and without any the constraints of display referred images (in other words you can keep values that exceed the 0-1 scale).

Saving as OpenEXR multilayer will help you also if you are compositing using Z-pass information.

You can create as many channels as you need.

See these links for more details: https://blender.stackexchange.com/a/18406/1853

Note: To open this kind of file in old versions of photoshop there is a plugin you can download from http://www.openexr.com/


How to texture a huge number of meshes in one uv? I'm making a car model for a game with interactable interior, so i have all buttons, pedals and other moveble objects as separate objects. How could i wrap them all into one UV map to texture them later?

The easiest way to get the UVs of all meshes of a complex model into one UV map would be using the Texture Atlas addon. It's in Blender's Community Addon Catalog and can be activated in "User Preferences - Add-ons" (Search for "atlas").

Once activated, you can find it in "Properties Window - Render - Texture Atlas".

For an in-depth tutorial I recommend watching Gleb Alexandrow's great tutorial on how to use the add-on.

In case you already have separate UV maps, I'd use the settings I described in this answer.

The difference between the add-on and Paul Gonet's method is that the major part of the tedious "join - unwrap - separate" process will be done automatically.


Rigging a pixar lamp I am rigging a Pixar lamp as shown in the screenshot above. The lamp bone is tracking 'bulbtarget' and the neck bone is copying the rotation of 'rotateneck'.
I want the rotation of lamp bone to be around the joint between rod and lamp like this:

I added an empty object at that joint and changed the pivot point of lamp, but this isn't working well. How can I make both parts move together without any gap?
If I connect the bones without all the fuss then the problem goes away, but the lamp object won't point towards the target, it will move at some offset angle.

  This big lamp bone won't do much good there because it's root is in a place where the lamp doesn't have any joints.

  I would solve that with two Locked Track constraints. The first one is for looking up and down. Parented to that is the second bone with another Locked Track to handle looking from left to right. Both are tracking the same target.

Here's the setup from Haunt's trick bag:

Bone 1 is the boss. It has a Locked Track with Z locked and -x tracking bone 3. It can only move up and down. The blue joint is parented to that.
Bone 2 is parented to bone 1. It has a Locked Track with X locked and Y pointing to 3. It can only move left and right. The red part of the lamp is parented to that bone. It doesn't matter at all how high bone 2 sits as long as it sits on the axis of the neck. It only rotates around the neck axis anyway.
Bone 3 is the target. One and two point there.
Bone 4 is there for convenience purposes. The root of bone 1 can't be in the middle of the lamp's head (bone 2 could be, but who cares, you'll hide them anyway), so there's an offset. Bone 4 has a Copy Location Constraint to bone 3 and a Copy Rotation Constraint to bone 1, so the tip of bone 4 is where the lamp is looking. You can make bone 4 unselectable in the outliner. That way you can't miss the target bone.

  In the end, you'll only have two bones visible, possibly with customs shapes: bone 4, so you see the exact focus of your lamp and bone 3, so you can animate the head. Btw, Luxo's neck seems to be perpendicular to his head which makes things a little easier regarding his focus.


Make landscape fade with distance I've got an huge landscape (32768 blender units) and i want to have a distance fade like in this photo. How could i do this?

The simplest method of creating mist is to simply use the Compositor to use the Z pass to control a Mix Color node.

The Divide node should be set to the range of the required mist in Blender Units - ie, the distance between the point where there is no mist to where the mist is fully obscuring the scene. The Subtract node can be set to indicate where the mist starts - with zero being at the camera and 1 being the distance specified in the Divide node. The color of the mist can be set in the Mix node.

EDIT : The above screenshot (and the one below) have Clamp enabled on each of the Maths nodes. While this appears to work in my specific example it will cause problems with different values and as the Subtract gets closer to ‘1’. Only the last node in the chain should be set as Clamp - so in this case just the Subtract node - otherwise the clamping on the previous nodes interferes with the result.

The Blend file linked in the question seems to be empty so here is a simple forest scene to use as a demonstration.

Varying the Divide node to control the depth of mist can produce different apparent density of mist.

Varying the Subtract node changes the 'closeness' of the mist.

Using a dark color can also be quite effective for a night scene (with local light).


Moving my camera around an constructing object I recieve a little program in which i have some cubes which are constructing like a crystal. I try to render it , but i have two problems:
1. i did not know how to move my camera around to the crystal
2. i did not know how to move away my camera in order to see my crystal perfectly , when he becomes bigger (100-200 cubes ).
Thanks for your help !
P.S. - in the last for i amplified my iteration i with 2 because i didn't know how to set a radius of 0.5 at my object
This is the program , so enjoy in helping me :) :

import bpy
from itertools import product

mesh = bpy.data.meshes['Cube']
objects_scene = bpy.context.scene.objects
objects_data  = bpy.data.objects
actions_data  = bpy.data.actions

def create_cube(name, location ):
    obj = objects_data.new(name, mesh)
    objects_scene.link(obj)
    obj.location = location
    return obj

def create_animation(obj, time):
    obj.animation_data_create()
    obj.animation_data.action = action = actions_data.new("Action")
    fcurves = [action.fcurves.new(data_path) for data_path in ("hide", "hide_render")]
    for fcu in fcurves:
        fcu.keyframe_points.insert(   0, 1, {'FAST'}).interpolation = "CONSTANT"
        fcu.keyframe_points.insert(time, 0, {'FAST'}).interpolation = "CONSTANT"
        fcu.extrapolation = "CONSTANT"

n = 7
time = 1
for i in range(n):
    for indices in product(range(-i*2, i*2+2 , 2), repeat=3):
        if sum(abs(j) for j in indices) == i:
            cube = create_cube("Cube", indices)
            create_animation(cube, time)
            time += 1

this is a picture with what i want to create , but in this the camera is no moving . I want that my camera to move around the construction :)

I don't know much about Python if that's what you're asking, but if you aren't and want to zoom the camera out through your animation, try moving the timeline cursor to the first frame, keying "I" and choosing LocRotScale. Then move to the end of your animation and repeat.

If you want to rotate the camera around the object, follow these instructions: How can I animate the camera in a perfect circular rotation around a fixed position?

I'm not sure if they work together, but they might. If they don't, look into camera focal length.

Hope this helps and happy Blending!


How can i install Blender 2.8 in ubuntu 18.4 with only console? today i use

apt-get install blender

in my Linux server (which has no screen or any display service but pure SSH remote connection)

,but the installed blender version is not 2.8 ,it is old version

and i tried

apt-get install blender=2.8

But end with not found 2.8

i google for a while but find nothing about install  blender 2.8 in Linux without screen device ,mainly of them are referred to install with display device like use snap software (a software shop mall in Linux)

is there any solution to apply?
Thanks if you have any ideas!!!

Installing from repositories is not recommended, they are hardly ever up-to-date.

Blender doesn't need to be "installed".

From a command line use wget.

wget "https://www.blender.org/download/Blender2.82/blender-2.82a-linux64.tar.xz/"

(or whatever is the link to the current version)

Then untar (uncompress) the resulting  file, and move the newly created blender folder to your home directory or a location that is convenient for you. From within the blender folder run the blender executable.

To use blender as a global command from the terminal, add the path of the blender executable to your path environment variable.


How to generate texture image for home interior and how to use it in OpenGL ES? I designed a home interior and it includes wooden floor also. I used the UV/Image Editor to generate images to draw home interior in Open GLES but I failed to generate the image.

Another problem is that the Texture Coordinate array is not complete, that means many numbers of the coordinates are not available in the array it only shows comma separated blank spaces(using obj2opengl.pl to generate the array). I added an example image, I have to generate images like this.

Blender exports the .obj file correctly I can't see a reason why empty values ",,,," are written in the converted file.

mtllib Musium.mtl
o Plane.275_Plane.229
v 138.827621 -14.357000 -71.175812
v 145.607269 -14.357000 -71.175812
v 138.827621 -14.357000 -123.266418
v 145.607269 -14.357000 -123.266418
vt 0.882195 0.266138
vt 0.983474 0.328281
vt 0.122201 0.759672
vt 0.020922 0.697529

It seems to be a bug/issue in the obj2opengl.pl converter possible it expects optional values which do not occur and therefore it writes empty values (between the commas).

I would recommend to write your own exporter, to get started you could use the code I posted here: How do we access Vert, Norm and UV data then print to a text file using Blender/Python?


Apply hole pattern to mesh I'm looking to apply hole pattern to make this shoes. I've look up methods to create hole pattern but normally it'd be used to create something as simple as a cylinder (gun) or a ball (karaoke mic).
So i wonder if there is any way to create the hole pattern for (a more rather) complicated mesh like in the photo.
Thanks!

Here are a scrshot of what i'm working on

Here is just an example about doing something like that with booleans, as I stated in my comment above...

starting form a shape like this:

and then from a copy object, using a cylinder as duplivert (faces), later converted to real object, like this:

then using booleans to subtract the second from the first, to obtain this:

As said, this would require some more regular base mesh topology, and could not be applicable to your model, at least as it is now, but could give you some inspiration to find a setup that works...


Attach vertex to a circle with a line? I have a basic circle with lets say 20 vertices.
I then do a ctrl+right click to place a vertex somewhere outside the circle.
I then select the vertex outside the circle, hold shift, select a vertex on the circle and hit f.
And nothing happens.
I can ctrl+right click around and shift select and f lines all day. But can't seem to get the vertex to join the circle with a line.

In curves, the vertices cannot be linked to more than two segments, curves cannot be forked or bifurcated.

To create such shape you would need to add a new disconnected curve segment and place it on top of an existing one.


How to turn a linked group into independent objects? I created a group and added objects to it,
then Add -> Group Instance. How to turn this linked instance into
a completely independent, ungrouped "deep" copy of the objects in the group?

I've tried the options I get by RMB on the outliner, to no avail.

PS: I need this to export collada; the exporter code won't output the objects within a group if they're linked/instantiated from another scene.

You can make objects instantiated by group to be real ones.

While group instance selected, execute Make Duplicates Real operator (or press Ctrl+Shift+A if in 2.79 or prior) to make objects from group as real ones. You can now deal with them as with meshes, because they already are.

Then you can run Make Single User operator from Object menu (or press U > Object Data if in 2.79 or prior) to make these objects use their own mesh datablock (if there is needed possibilty to edit them individually).

While this will work, it has it downsides:

Pros

Make objects from group finally editable (sometimes may be useful)

Cons

Additional geometry will be added that can lower scene processing or rendering time.
Additinal objects will appear in Outliner (if objects were made to use their own mesh datablocks), so in case of there are many objects in the scene, you may want to avoid this so not to slow down 3D View.


When to (not) use normal maps Learning to model and I've got a question about what I've surmised about normals mapping so far (correct me if I make a mistake):
We create a normal map from a high poly model, in order to export the detailing into a texture to be used on a low poly model. This normal map contains information for the lighting of bumps, dents, etc. so that these do not need to actually be rendered and use no geometry, making your model take up less resources which is important in games.
So my question is: say I am modelling for a still image render and would like to experiment with the positions of lights or I am modelling to create a 3d-printed miniature, would it then be wise to skip the normals entirely and have the details sit as geometry in the model?
From what I understand the low poly model is still needed to UV-unwrap for texturing, as high poly counts seem to be impossible to unwrap, but in the mentioned examples would there be any other changes to a general workflow of base mesh->retopology into lowpoly->unwrap->high poly detailed model->bake normals->paint ?

Not only do normal maps increase performance in games, but they also increase the speed and performance of renders. Normal maps are only supposed to be used for small details such as small dents, scratches, marks, etc. For small details, you should probably use a normal map.
However, normal maps do not modify the actual geometry of the object. They only change the direction light hits the mesh in certain areas, known as a normal (hence the name). To modify the geometry of a mesh with a texture, use a displacement texture.
So, for 3D printing, do not use a normal map as they only affect the shading of an object and not its geometry (3D printing only uses geometry for slicing the model). Use a displacement texture with the Displacement Modifier instead and apply it.


Unable to pack files/can't find missing files I'm using Blender 2.78 to mesh clothing (obj file imports) created using CLO3D software.
For several months, I'm been making clothes, exporting them as objs, importing them into Blender, and meshing them for a game. However, this week, I'm having an unusual problem.
Some of the clothing that I've made and exported use mesh fabric properties.
The properties render properly in Blender.

I noticed 2 changes:

The mesh portion shows up in the 3D view port as a purple patch on the obj when before it showed up as whatever color I had the mesh fabric set to (usually black).

When I have my obj imported and I try to save my blend file I get the following error message:

Unable to pack file, file source (CLO fabric title.jpg) not found.

Which is strange because I have been able to properly mesh items containing mesh fabric from CLO's program in the past. I always use Blender 2.78 and I haven't changed my settings. CLO3D is installed on my computer including the folding containing the fabric .zfab files (which is typically what Blender uses to recognize the fabric properties).
I don't know what prompted this change. I have tried resetting my computer and reinstalling Blender and CLO3D, but the error still remains. I have no idea how to remedy this and when I try to find missing files in the external data menu, it keeps saying files not found.

It is happening because Clo no longer supports JPEG files for fabrics.
You now have to spend $5K for their fabric kit to render your own textiles.


If a blend is saved with missing linked libraries, is that data now permanently lost? Lets say I have an asset named "John.blend" that I link into my animation "Shot_005.blend".

I animate my awesome character, John, over several days and am eventually happy with it.

Unknown to me, someone renames "John.blend" to "John_FINAL_v1_USETHISONE.blend".

A while later, I open up my "Shot_005.blend" file (without noticing the warnings about the missing library, "John.blend", or the empty space in the scene) and make some tweaks to the render settings. I then save the file and close Blender.

The next time I open Shot_005.blend, I notice that John has mysteriously vanished, leaving behind only a ghostly Empty object in his place.

I then realize that the John file was renamed, and attempt to solve my problem by renaming the file back to "John.blend", however upon reloading the shot file, John is still gone (because the library data block no longer exists)

Is there any way I can recover my awesome animation that I spent several days on?

Currently there is no solution, but this will be fixed soon, I think. Remember you can open a backup by opening your FILE.blend1, if its the first wrong save or .blend2, if its the second time, you saved it after your mistake. just activate the Failsave Filter () in the Blender Filebrowser to open your Backup File.


Eevee - Baking soft shadows I have a question about soft shadow option in eevee. Is there a way to bake them in eevee?
What is a problem - when I turn on soft shadow option it instances light depending on it size, and it looks nice but I need atleast 1000 eevee samples to make them look good and soft and well its not an option in Eevee(it will be faster in cycles). So my question is how to manage that to render everything with 32-64 samples which gave me results I want but shadow setup much higher or bake them that I will not waste time and calculating power. Thanks for any help

There is a way to bake indirect lighting in Eevee. Have you ever tried using irradiance volumes? They're in the light probes menu when you add a mesh. The basic concept is that the specific lighting contitions are baked within the boundaries of the irradiance volume. You can scale it up if you want, and increase it's resolution, but I wouldn't go over 20, seems like overkill to me, but if you want to test it, don't hold back. To bake it you go to the render tab, and click "Bake indirect lighting" under the "Indirect lighting" tab


Accelerating looped rotation -animation I have spinning wheel with 2 keyframes (from 0 to 120 degree). Its rotation is constant (linear interpolation) and it is looped using f-modifier so it look like endless animation. Now, I want this wheel to accelerate speed smoothly from lets say 0 to maximum speed and stay on this for the rest of animation. How can i achieve that?
I could rotate wheel many times and edit its curve in Graph Editor but it's sound stupid and also can't be used for linear movement.

Driver solution

Looking at the equations for Uniform Acceleration in the wiki, and assuming we start with zero velocity and displacement. The frame number is our time part, convered using fps to seconds, which will make it far easier to visualise.

frame = scene.frame_current
fps = 24
v = 1.0
a = 3.0
t = frame / fps

s = min(v, a * t / 2) * t

Calculated velocity will accelerate at a until it reaches velocity v. The displacement s is the calculated velocity times how many seconds t.

Setting up a driver expression

A simple case where fps is hard-coded as 24 ( 24 squared is 576), our maximum velocity is 1.0 blender units per second, and our acceleration is 3.0 blender units per second squared.

min(1.0 , (0.5 * 3.0 * frame / 24 )) * frame / 24

Upon re-reading your q, noticed I'd used location as an example, whereas you were asking about rotation.  The same concept works for rotation as every revolution will travel 2*Pi*r where r is the radius.  Change the equations accordingly for revolutions per second.

The scripted expression  can be pasted directly into a property (appending a # to start tells blender it's a driver) which on which should turn purple. [Editors find me a link]

This can be applied to x, y, z locations and having a terminal velocity of (vx, vy, vz) and acceleration of (ax, ay, az), and use the values in the relevant driver.

To further the approach a custom property for v and a could be added to the driven object, and variables used to put that value into the expression.

Note the fps from the render settings could also be used a var in a driver to make it changing render fps proof.


Alpha transparency in Blender 2.90 I've been trying to learn from a tutorial where the author uses Blender 2.8. He uploads a reference picture and makes it 50% transparent by ticking "use alpha" box and setting "opacity" to 50%. When he does that, the sketch in his reference images is still visible, but a bit transparent.
However, I'm using Blender 2.90 where there's "transparency" setting. I enabled that and set the opacity to 50%. I was using the exact same pictures as reference pictures but the images became empty white sheets after enabling "transparency". How can I change my reference images so I can see through them while modeling? Here's a reference to the tutorial I'm talking about:  https://youtu.be/Hf2esGA7vCc (the relevant part starts from 5:47).

If you added it as a reference image, it should be under the Image Properties tab:


Different objects selected on different tabs I am currently rigging a character and every time a make a vertex group for a bone, I want to test to see how it does. However, switching from edit mode from one object, to pose mode on another object takes time, and with a complex rig, this could stack up to lots of wasted time.

I want to have one tab on pose mode of the armature, and one tab on edit mode of the character. However, when I change the selected object, it changes it for all of the tabs. Is there a way to do this?

Maybe it won't make the process as fast as you'd like, but if you disable the Lock Object Modes option it will speed up a bit when you'll switch from the armature to the object and back to the armature.


How to slide a vertex group to make new edge loop? I want to slide that vertex group like shown to make 2 new edge loops connecting to each other like a cylinder. Or transforming these 4 vertices into one edge loop would work out. How can I do so?

Here in another perspective ^

That's what I really want on front ortho

Either use the Loop Cut and Slide operator Ctrl + R keyboard shortcut to manually place a cut on each side.

Or alternatively use the Bevel Edge operator on the whole existing edge loop CtrlB. Make sure you set the Bevel Profile factor to 1 so your current edge loop wont be moved


How do I switch to Sculpting mode? I have my model selected, and I click "Sculpting" in the upper menu.
However, "Sculpting" is not possible, only "Object", "Edit" and "Pose".
What do I have to do to go to Sculpting Mode?
Thank you!

I had to manually left-click to select the model, not the armature.
Also, I had to switch to Object Mode first. Here is a video of my workflow:
Workflow


2.8 box selection does not select everything, tiny objects not selected? I have a lot of problems with box selection on objects,
there are always not all objects selected !!

I don't have any fancy collections or wrong settings in the outliner,
also when I zoom in - I can select them - whats wrong !?

When I use "Origins (All)" - selection works ....

^ I try to find an example, because I'can't supply this (customer) data ...


Should I model my animation assets to real-world scale? I would like to know what would be considered the best practice when creating assets for animated movies (i.e. I don't need to integrate my models into any live-action plates)

When using Blender, I switch it to the Metric units as it makes it easier for me to measure things. My question is, let's say I am modelling a character that should be about 1.6m tall, should I model that character as 1.6m or is it better to scale it down a little bit (maybe 1m=10cm)?

I tried both methods, but I feel both give some issues, and I am not sure what is usually done when working on big projects?

When I model to real-world scale, the scene size gets really big really fast, and navigating it seems to be a bit harder. But modelling scaled down versions means I have to make sure I don't forget the conversion, and it also makes it a bit more difficult to control the small models as I have to zoom in a lot to see them or go to their local view and lose their relationships to other models in the scene.

What do you think?

I would say: stick to real world scale. At the end, in very very small scale there will be rounding errors when placing vertices.

And for your navigation difficulties in large scale: In Preferences > Interface, check Auto Depth and Zoom To Mouse Position - this really helps. And when editing an object, place it in an empty layer and switch off all others, this also improves pan and view functionality.

Update for Blender 2.82: These settings are now to be found by clicking Edit > Preferences > Navigation.


Importing external python module into bge I have done lots of searching around but nothing has really answered this question directly. I want to install the Pillow library to make use of in blender. Pillow Link I want to be able to get it accessible by blender while editing and later when I export to a runtime. Anyone know how to do this

Use pip to install it! In the blender polder you can navigate to 2.78/bin/python(.exe)
Run that and you have a typical python shell from which you can install pip the usual way (ie getpip.py). Then you can install whatever modules you like.
I have used this method to intall lxml for bge use. And I have used PIL inside blender (installed with a different method though)

When exporting, all python libraries are automatically copied.

But as monster said, first investigate the bge.texture module. You can merge images, set individual pixels etc. The only thing you can't do is resize them (as fas as I know)


How can i make a color transparent in node editor I have these renderlayers:

In compositor I subtracted the second renderlayer from the first one (or used the difference node, since in this case they result to the same image)

But where the cube is, is now black (of course, since this is where the cube is, in both renderlayers). Is it possible to make transparent only where it's black on the image, so not object related, but just regarding the color of the pixel?

You can use the object index mask and the alpha over node to make the object transparent in the node editor.

Set object index:

Add the object index render pass:

Node setup:


How to change the location of an addon in the UI Some addons allow the user to select or name the tab in the N panel, most do not. Too many addons want their own tab.

How can I edit the ini script to change the location of the tool/addon?

I would like to move some addons into existing tabs and/or create new tabs to group the addons to my liking.

I know very little about Python scripting. I have Text Wrangler on my Mac and Notepad ++ on my PC. I've looked at many of the scripts and seen an entry for "Location" but I'm not sure exactly how to format the changes.

Where exactly can I find the necessary Python information. I'll do the required homework, I just need to know what to look for and where to look for it.

Thanks

It's not a good idea to do that, but here is how anyway. Be aware that this may break add-ons.
What you need to be looking for is were the panels because they determine were UI elements are placed. The panel classes can be identified by their inheritance from bpy.types.Panel, although depending on how modules are imported it might just say Panel. Starting from Blender 2.8 there is a mandatory naming convention by which the class name of the panel should also contain _PT_.  Take as an example the following excerpt that defines a panel:
class SOME_COOL_ADDON_PT_settings(bpy.types.Panel):
    bl_idname = "SOME_COOL_ADDON_PT_settings"
    bl_label = "Setting for cool addon"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "View"

    ...

The placement in the UI is determined by bl_space_type, bl_region_type and bl_category. This means the panel is created in the 3D View in the right hand panel (which can open/close by pressing N) in the View tab. You could change the tab to Tool by changing the bl_category = "Tool".


Can Freestyle draw lines when an object is behind a transparent plane? Can Freestyle draw lines when an object is behind a transparent plane (or any other transparent object)? The render below shows the issue, the freestyle lines that should be drawn on lower arm and hand don't get drawn.

Visibility is computate without considering textures alpha.

From the a Blender reference manual's page on the topic, one of the known limitation is:

  Transparent faces are treated as opaque faces

Blender is currently (2.76b) not able to distinguish transparent surfaces from opaque surfaces, I would guess it will unlikely be able to use the alpha channel of a texture the way you planned.

A possible workaround for your particular situation may be to separate the freestyle render layer, move all the object that could occlude the freestyle lines on a separate layer and exclude it from the freestyle render layer.

Masking the layer would be the perfect option, but sadly is currently another of the known limitations:

  Layer masks do not work with Freestyle.

'Suzanne in Hell'

In the image above you can see how the selected plane is on the layer 10 (the yellow dot in the layer selector), which is the same layer not highlighted in the freestyle render pass (just behind the cursor).

Next step is to hide the lines behind the "solid" texture of the plane. In this example I used the Z channel of the first render layer:

With a "Greater Than" Math node filled with an appropriate value (must be animated if the camera is moving fowanrd and backward) I isolated the part of the scene far away from the camera and used this mask as a factor form alpha mixing the layers.

Note: Z-pass is not anti-aliased; in a the previus scene this doesn't reperesent a big a problem, but, if needed, you can use in the same way the Mist pass (which is anti-aliased, but take a few more steps to be set up)


Is it possible to create Radial scrolling UV motion without scaling? Inorder to show the winddirection in a turbine animation, the UVs (parented empties with  a UV wrap modifier) are to be scrolled radially .
Scaling the empties does provide radial motion but it scales them as well.
Is it possible to create radial scrolling motion without scaling?

It's hard to say in detail without knowing exactly what you need, but some variation on this might serve your purpose:

Here, the nodes are being used to control simple color bands, keying the offset on Length, but they could be used to control the UV look-up of a suitably mapped texture, for hand-drawn, or other effects


Object not rendering correctly from a distance I am trying to render an image of a solar panel in the final render there will be multiple solar panels, some in the forground and others in the background.

I have noticed that as soon as I zoom out I get black lines/triangles going through the image. These lines appear on the 3D view as well as the blender rendered image.

I have tried loading in OBJ and FBX versions of the model, I have tried turning off the "use shader node to render the material" option in the material properties and I have also tried messing around with different lighting conditions. None of the options have worked.
The texture applied for the solar panels is a simple jpeg file.

I have included 2 screen shots of the rendered image of the solar panel, one from close by and another form a distance.

Any information in this subject would be greatly appreciated,

Kind regards,

Thomas

You probably have faces that are very close together (or on top of each other).
Check your mesh for mistakes (e.g. select all in edit mode, then press W -> remove doubles).

Another thing to check is the scale of your model. If it is excessively large or small, this can cause numerical precision problems.
In such a case, scale your model, then apply the scale with Ctrl+A -> Scale.

If the problem still persists, try to adjust the start and end clipping in the camera settings. The end clipping should be just behind the object (e.g. if the object is 10 Blender units away, you could set the end clipping value to 15 or so).
Note that this tip only applies to OpenGL and Blender Internal renders, not Cycles or other engines that don't use a Z-Buffer to calculate occlusion.


How to import parametric objects from a x3d file I have a x3d file with several cylinders (they're not meshes but parametric cylinders defined according to the x3d spec). Here's a minimal working example

<X3D><Scene>
<Shape>
   <Transform rotation="0.000000 0.000000 -1.000000 0.025000"
   translation="0.999375 0.024990 1.000000"
   scale="1 0.024997 1">
       <Cylinder radius="2.000000" top="true"/>
   </Transform>
</Shape>
</Scene></X3D>

When I try to import them to Blender nothing happens. I guess Blender can't handle primitives which are not polygonal? Is there a way around this?

The problem seems to be the way the x3d is formed. This for instance does work

<X3D>
<Scene>
 <Transform rotation="0.40 0.20 -1.00 1.025000"
   translation="2.999375 1.024990 1.000000"
   scale="1 1 1">
      <Shape>
        <Cylinder height='1.8' radius="0.200" top="true"/>
        <Appearance>
          <Material diffuseColor='0 1 1'/>
        </Appearance>
      </Shape>
    </Transform>
</Scene>

</X3D>

from your comment on the removed post:

  The problem is that I have tons of these cylinders (I am trying to visualize a 3d polyline), so writing all of them to meshes creates a very large file.

Blender has an Object type called 'Curve', which can be given a thickness and therefore be renderable. Curves can behave like polylines, with straight segments. If your intention is to render a polyline, instead of letting the x3d importer convert primitive-commands into mesh based primitives, you might devise a way to import a sequence of edges as a Path Curve and set its bevel thickness instead.

For example:

import bpy
from mathutils import Vector

# weight
w = 1

# we don't have to use the Vector() notation.
listOfVectors = [(0,0,0),(1,0,0),(2,0,0),(2,3,0),(0,2,1)]

def MakePolyLine(objname, curvename, cList):
    curvedata = bpy.data.curves.new(name=curvename, type='CURVE')
    curvedata.dimensions = '3D'
    curvedata.bevel_depth = 0.3
    curvedata.bevel_resolution = 4
    curvedata.fill_mode = 'FULL'

    object = bpy.data.objects.new(objname, curvedata)
    object.location = (0,0,0) #object origin
    bpy.context.scene.objects.link(object)

    polyline = curvedata.splines.new('NURBS')
    polyline.points.add(len(cList)-1)
    for num in range(len(cList)):
        polyline.points[num].co = (cList[num])+(w,)

    polyline.order_u = len(polyline.points)-1
    polyline.use_endpoint_u = True
    polyline.order_u = 2

MakePolyLine("NameOfMyCurveObject", "NameOfMyCurve", listOfVectors)

Now, this creates one polyline, but it can easily be called again and again to make different sections if they need alternating colours.


Tentacles Curve Wave Effect Anyone have any ideas on how to animate curves to perform like a wave effect instead of this side to side animation I did?

Took me a while to find an example but found one by James Curran:

You can use the wave modifier and press play animation.

In my example I rotated my object by 90 degrees without applying the rotation, so to have the desired effect.

Make sure to have enough geometry in your mesh, with evenly distribuited quads.


a fast way to join NLA strips? In the NLA editor, splitting strips is just a matter of one key press.
I did not find a similarly easy way to join them again (except ctrl-z :D)

So far, what I usually did, was:

copy the last strip for reference
delete all but the first strip
adapt the length of the strip

If the strips belonged to two actions, it would even involve joining the actions by copy-paste and careful "trimming" of each action before.

Obviously, this cannot be the way how it's meant to be done :)

So my question is: How to do it correctly / efficiently and beginner-friendly?

(apologies if there is an answer to this question here. I searched the web for hours yesterday, but didn't find any)

There is a menu option and keystroke Ctrl-g to create a Meta strip that groups multiple strips.

It sounds like you want to undo the splitting of a strip, but that same operation also has to have a defined behavior if the two strips selected were not originally split from the same source.

The logic to detect that two strips were originally split from the same source would be non-trivial and have a fairly long set of test cases for a QA team to perform.


Problem with curve modifier on zipper I'm trying to create an animation of a zipper unzipping, and I'm having some problems with the curve modifier. The flat planes on the sides of the zipper are deforming to create a crease in it. The planes are part of the same zip object that has an array modifier applied to it. The blend file is here. Could someone please explain how to fix this, and maybe even send me an updated file for reference along with the explanation?

I'm trying to follow this tutorial, so if anyone can point out to me where I went wrong, that'd be great. Also,

(Creator of the tutorial here)

One of the curve handles of the curve that deforms the plane is pointing the wrong way, causing part of the mesh to be flipped upside down, as shown below by the directional arrows of the curve:

Enter 'Edit mode' for curve (Bezier Curve.001).
Select the middle curve point, which is the one that is flipped.
Rotate the curve point 180 degrees on the 'x' axis (R,X,1,8,0)
Exit edit mode, and if the error hasn't gone, simply turn the curve modifier on and then off and the mesh should refresh.


Rendering seems slow, am I getting the most out of my hardware? So, started my Blender journey yesterday working on a tutorial to create some mountains and animate a fly-through of them. They are made with the A.N.T. mesh tool and microdisplacements. I've worked my way through the tutorial to a point where I'm actually rendering frames, and it's much slower than I anticipated it would be. It's taking 5-7 minutes per frame. I am using Cycles with Auto Tile Size addon, and am using an 8k HDR texture (I think that's how I should refer to it) to light the world.
My PC specs are RTX 3090, Ryzen 3950X and 128GB of RAM. During each frame render, the GPU and CPU are essentially idle until the last little bit when Blender starts actually showing tiles, then my GPU kicks in and renders those out in a matter of seconds. Is that to be expected? Is there any way to get Blender to actually utilize my hardware during the first several minutes of rendering, where it seems like it's just barely using it?
I'm rendering using Cycles in Blender 2.91 and here's a screenshot with what I'm rendering and all of the associated settings.
This is the tutorial that I am following: https://www.youtube.com/watch?v=qSafYNQrodk
Thanks for any insight!

I never used it but the e-cycles plugin might help if you had to keep the subdivision :
https://blendermarket.com/products/e-cycles
« What’s more, thanks to a new option called "Persistent Data", for fly-through animations where only the camera moves, E-Cycles only needs to do the pre-processing step once for all frames. In the example above, rendering takes just 3 seconds per frame on a single GPU. In this case, the persistent data option saves 7 seconds of pre-processing per frame. »


How to move baked curves in graph editior? I just baked sound to the animation which works fine. What I want to know if there is a way for me to move the curve of the sound I just made backwards (to - frames) so it will start half way through the sound. So I basically need to move the curve or baked sound backwards so that it will start where I want it to. I've tried using some modifiers and pressing G etc. but none of that works.

Here's a screenshot:

So I'm baking the sound to animate the speed of the rigidbodies as a test. I want to put the baked sound backwards so the speed will start changing in time of later on in the song, instead of the beginning.

Is this possible or if not, is there an alternative?

I do a lot of sound baking, and always bake at frame 1 then use the NLA editor to change start frame, simply and quickly.  You don't want to be baking large sound files again to move a frame to the left 8^).

If you are going to use the NLA, it  also pays to create an empty action (how you want it to be with silence) and add that to the stack.


Why won't my model unwrap? For some reason, my model won't unwrap.
I have uploaded the model here: http://www.pasteall.org/blend/37735

One thing that surprises me is that if I try to select a ring, the ring stops at a certain vertex:

I have extended the ring manually, then clicked "Mark Seam", then I selected the upper lid and the lower lid of the barrel and also clicked "Mark Seam" for each of them.

When I now click 'u' and then 'Unwrap', nothing happens. I have been able to unwrap other models, but not this one.

Does anybody see where I might have missed something? Blender does not show any error message, it just doesn't unwrap.

Thank you for the help.

Edit: I have uploaded a new model here to reflect the suggested changes: I removed all doubles, I applied rotation & scale, and I put the same in a location where Blender could select a whole ring automatically.
But it still won't unwrap:

http://www.pasteall.org/blend/37739

Edit 2: Now here is a simpler model without the handles. It is really absolutely simple geometry (I think), but it still won't unwrap:
http://www.pasteall.org/blend/37741

Could anybody have a look again? Thank you!

I think it is impossible to select the whole edge using Alt+RMB. It is a matter of geometry you've got there.
 What you can do is select the upper edge/vertex and then (while holding the Ctrl button) the bottom one.

You may also select the upper vertex/edge, then (holding Shift) the bottom one and then go to Select-->Shortest Path.

QUICK TIP: I figured out that your origin point is located outside the mesh. It is a good habit to keep it inside. Being in Edit Mode select the whole mesh (A), press Shift+S-->Cursor to Selected and then (being in Object Mode) Shift+Ctrl+Alt+C-->Origin to 3D Cursor to place an origin point inside a mesh.

Note: You'll probably have to delete the top and bottom ngons to make a proper unwrap. And make sure to remove the doubles (being in Edit mode select the whole mesh [A]), then press W-->Remove Doubles).

EDIT: I've unwrapped a mesh and the UV islands look like this:

Here's the .blend to download:
http://www.pasteall.org/blend/37742


Vertex color gradient is not linear I am painting the default cube through vertex coloring. I paint the bottom four vertices as (0.25, 0.25, 0.25) and the top four vertices as (0.75, 0.75, 0.75).
When I inspect the result in VERTEX PAINT mode (using hotkey S to get the color), the bottom of the cube is indeed (0.25, 0.25, 0.25) and the top is (0.75, 0.75, 0.75).
However, the middle point of the cube is not (0.5, 0.5, 0.5), it is ~(0.56, 0.56, 0.56). Somehow the gradient is not linear. I don't think its an issue with sRGB vs Linear, because otherwise the bottom and top values would also be wrong, but it's just the values in between. So what is the issue here? I really need a linear gradient.
EDIT. related issue: https://developer.blender.org/T71835 This says it has something to do with how the vertex colors are stored (8-bit sRGB apparently).
Code to reproduce this issue:
"""Script that checks vertex color interpolation error on the default cube.

run command: `blender --python gradient_error.py` (opens blender)
"""

import bpy

# Set up scene
sce = bpy.context.scene

# Select cube
scene = bpy.context.scene
for ob in scene.objects:
    ob.select_set(False)
    if ob.name == 'Cube':
        ob.select_set(True)
obj = bpy.context.view_layer.objects.active

# Get cube data
mesh = obj.data
vert_list = mesh.vertices

# Get the color map
if mesh.vertex_colors:
    color_map = mesh.vertex_colors.active
else:
    color_map = mesh.vertex_colors.new()

# apply colors
i = 0
for poly in mesh.polygons:
    for idx in poly.loop_indices: #vertices
        loop = mesh.loops[idx]
        v = vert_list[loop.vertex_index]

        z_coord = v.co.z

        # Paint bottom 4 vertices 0.25, top 4 vertices 0.75.
        if z_coord < 0:
            color_map.data[i].color = (0.25, 0.25, 0.25, 0)
        else:
            color_map.data[i].color = (0.75, 0.75, 0.75, 0)
        i += 1

# Give it this new material
mat = bpy.data.materials.new('vcolor_material')

# Deactivate shadows
mat.shadow_method = 'NONE'

# Apply material
mesh.materials.append(mat)

# Set Flat lighting and show Vertex Coloring
my_areas = bpy.context.workspace.screens[0].areas
my_shading = 'WIREFRAME'
for area in my_areas:
    for space in area.spaces:
        if space.type == 'VIEW_3D':
            space.shading.light = "FLAT"
            space.shading.color_type = "VERTEX"

bpy.ops.object.mode_set(mode='VERTEX_PAINT')

print("\nRan succesfully.\n")

The gradient is linear but not in the colourspace you are expecting - as evidenced by the following :

Here the Attribute node is making the Vertex Color (Col) available to the shader. This is split into separate RGB components and compared with the Generated 'X' coordinate (which runs from 0.0 at the left to 1.0 at the right of the cube).
The gradient is linear but the end points are not as you expect (ie, the blue vertical grid-line is at X=0.5 and the gradient line runs from about 0.05 at the bottom through to around 0.525 at the top). This is due to sRGB colourspace conversion.
Your values of 0.25 and 0.75 relate to those 'absolute' values of approx 0.05 and 0.525 when converted from sRGB into the 'true' brightness - the sRGB colourspace is intended to make the most of an 0-bit integer representation of the brightness to make it as visually diverse as possible - so values at the start/end of the range and compressed/expanded to suit what would be noticable when displayed on a screen to the human eye.
See https://en.wikipedia.org/wiki/SRGB and note the red line on the following graph :

Using the axis values at the bottom and right of the graph you can see that 0.75 on the x-axis converts to around 0.5 in 'intensity' - your Python code is applying the sRGB value of 0.75 and producing an 'intensity' of approximately 0.525 for the upper limit. Similarly, the lower 0.25 is being converted at the bottom end of the graph to a much smaller 'intensity' value. That 'intensity' is what is being linearly interpolated to produce your resultant vertex colour gradient - not your original sRGB values.


Composition alpha to color I rendered my object with a transparent background.

I now want to replace the transparency with a specific color for exporting.

How can I replace the alpha values (= the transparency) to a specific color using the composition node editor?

Use the Alpha Over node, as in this screenshot:


Splitting vertex at end of 4 lines, to fix tris I am making a handle on a trunk. I beveled the inner corner on the handle. But it added 3 lines that end at a single vertex. Now i need to split the vertex ( one for each line) so i can fix the topology, and fix the tris. Not sure how to do this. Sent a pic so you get the idea. Whats going on and what im going for. Please help.

I don't think there is any magical way to do it, anyway I would do it with the knife tool:


Rendering with NN Interpolation I have a high resolution texture with only seven colors that I apply to a makehuman model and I want in my rendered result also just those seven colors (plus a black background).

So far I have tried to to deactivate MIP Map and Interpolation, and different filters with small filter sizes in the Image Sampling panel. However, the result is as depicted in the following image:

Further, I tried to deactivate the Anti-Aliasing in the Render options, but still I do not get the desired result:

You see that the color fades, especially on color borders. The rendered image is rather small (160x120), but also if I increase the dimension, the problem remains.

Deactivating AA and MipMap + Interpolation is the right thing to do. The filters are used with interpolation. The bigger the filter size the smoother the result becomes. But since you don't want any smoothness you should deactivate interpolation. That way you can forget about filters.

Nevertheless Blender seems to sample textures internally with some interpolation.

As a workaround you could use an image manipulation program like GIMP or Photoshop and reduce the colors there. In GIMP you can do it like this: Image > Mode > Indexed.

To automate this task for multiple images you can use BIMP. It is GIMP plugin which is probably already installed. You can find it in File > Batch Image Manipulation...
You can use the filter called "gimp-image-convert-indexed"


blender reports non existant tris I am using Blender 2.76. When I go to the default scene with
the cube I get what seems to be an error. Up top Blender lists
the cube as having 12 tris. Is this a bug or do I have something
wrong with the Linux Mint 17 version of Blender?

This is not a bug, it's a feature! :-D

Joke aside, blender is letting you know how many triangles you would have had you converted all your polygons to triangles.

The tri-count is an important number for lots of purposes, including game asset creation (where you always try to maintain the lowest polycount possible), 3D printing and other areas,

Several file formats support only triangles (STL for instance), and convert everything to tris implicitly (while others, like Collada, support quads too but convert to tris by default). So this gives you a preview of the number of tris you will have after converting.


Python, How to Convert Rotations of T-pose Pose Bones in Armature 1 to Pose Bones in Armature 2? Finding Rotational difference The goal is to get the rotational difference of the bones between Armature 1 and Armature 2 in its T-pose(not exactly), then apply the difference to a pose of Armature 2.
The purpose is so the model of Armature 1 follows Armature 2.
Below is my approach using code from other answers. The code is just for the Right Upper Arm bone, not the entire model which is the goal
Lets say I have two Armatures in normal poses. I want Armature 1 to follow Armature 2. The Armature 1 on the Left is the Source and Armature 2 on the Right is the Target:

But the Bones are not Aligned so the rotation is values are different:

First, Save the rotation variable of Armature 2 Right Arm, then set the Right Arm bone vector of Armature 2 to vector of Armature 1
Code:
import bpy
from mathutils import Matrix
from mathutils import Quaternion

context = bpy.context
scene = context.scene
RobloxRig = bpy.context.scene.objects['__Rig']
UpperRightArm = RobloxRig.pose.bones["RightUpperArm"]

CloudRig = bpy.context.scene.objects['CloudRig']
CloudRig_UpperRightArm = CloudRig.pose.bones["r_uparm"]

def snap_rotation(source, target):

    Ms = source.id_data.convert_space(
       pose_bone=source,
       matrix=source.matrix,
       from_space='POSE',
    )

    Mt = target.id_data.convert_space(
       pose_bone=target,
       matrix=target.matrix,
       from_space='POSE',
    )

    _, q, _ = Ms.decompose()
    t, _, s = Mt.decompose()

    M = (
       Matrix.Translation(t) @
       q.to_matrix().to_4x4() @
       Matrix.Diagonal(s.to_4d())
    )

    target.matrix = target.id_data.convert_space(
       pose_bone=target,
       matrix=M,
       to_space='POSE',
    )

if __name__ == "__main__":
   context = bpy.context
   scene = context.scene

   scene.frame_set(720) #Frame of Normal pose
   bpy.context.view_layer.update()

   Mt = UpperRightArm.matrix

   loc1, rot1, scale1 = Mt.decompose()

   NormalRot = Quaternion(rot1)

   snap_rotation(
       CloudRig_UpperRightArm,
       UpperRightArm
   )

Output:

Now that Bone Vector of Armature 2 is aligned with Armature 1, Save the new rotation, Set it back to normal and get the rotational difference.
bpy.context.view_layer.update()

Mt = UpperRightArm.matrix

loc2, rot2, scale2 = Mt.decompose()

#New Rotation
NextRot = Quaternion(rot2)

#Setting back to normal using from code above values
M = (
    Matrix.Translation(loc1) @
    rot1.to_matrix().to_4x4() @
    Matrix.Diagonal(scale1.to_4d())
    )

UpperRightArm.matrix = M

#Getting Difference
RotationalDifference =  NormalRot - NextRot

Output, Just back to normal after taking the value:

Now I Change the Frame which moves Armature 1:
scene.frame_set(730)
bpy.context.view_layer.update()

This Final part which Doesn't work I set the vector of the Armature 1 to Armature 2 like before then added the difference.
snap_rotation(
    CloudRig_UpperRightArm,
    UpperRightArm
)

bpy.context.view_layer.update()

Mt2 = UpperRightArm.matrix

loc3, rot3, scale3 = Mt2.decompose()

FinalRot =  RotationalDifference + Quaternion(rot3)

M2 = (
    Matrix.Translation(loc3) @
    FinalRot.to_matrix().to_4x4() @
    Matrix.Diagonal(scale3.to_4d())
    )

UpperRightArm.matrix = M2

Wrong Output:

Here is what's expected:

A small difference is that it applies to all bones. If I get one bone it would be easy to get the rest.
Please help, Thank you.

The primary problem is that blender doesn't update matrices automatically after setting by code and the secondary problem is setting correct matrices. check the same kind of problem which I have answered here:
How can I copy the location and rotation of multiple bones of a skeleton and paste them to an identical skeleton?


What is the key combination in 2.8 that brings up the cursor moving pie menu? I saw it in some tutorial but I don't remember what it is called or where I found it and I can't find it again.

It was a pie menu that opens with a combination of hotkeys that has a bunch of options like "cursor to selection", "move to cursor" or similar. There might have been origin stuff in there too.

What is the key combination in 2.8 that brings up that cursor moving pie menu?

It's called the "Snap" menu, opened with Shift+S.


A part of an object is not visible in the camera view - how can I fix it? After all i've done the works, but suddenly when im rendering
the plane object in my works wont show up fully.
And maybe the problem is in the camera perspective, or I dont know what happened.
Plese anyone who knows tell me how to fixed it. Thank you.

You have to check camera clipping settings. Try to increase the End value.


How to make multiple float property in python What is the python code to make multiple float property like in the mapping node?

Use a FloatVectorProperty and set its subtype to 'XYZ' or 'TRANSLATION'.

Currently other available subtypes of that property are: 'COLOR', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'COLOR_GAMMA', 'LAYER'.

Ripped from: How to create a custom UI?

import bpy

from bpy.props import (FloatVectorProperty,
                       PointerProperty
                       )

from bpy.types import (Panel,
                       PropertyGroup
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MyProperties(PropertyGroup):

    my_float_vector: FloatVectorProperty(
        name = "Float Vector Value",
        description="Something",
        default=(0.0, 0.0, 0.0),
        min= 0.0,
        max = 0.1,
        subtype = 'XYZ'
        # 'COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY',
        # 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION',
        # 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER'
        )

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_idname = "object.custom_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

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

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

        layout.prop(mytool, "my_float_vector", text="")

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MyProperties,
    OBJECT_PT_CustomPanel
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()