Free division of a cube? I'm sorry if that's an obvious question (it probably is) but I'm new to blender and I couldn't find a solution to my problem so far. What I'm trying to achieve is
divide a cube into two unregular objects so that they fit (see the image). Normally I would use the CTRL+R tool, but it only works with straight lines. How can I do it, then?

Usually I would recommend use of the Boolean Modifier. But since Blender 2.72 there is a new mesh tool to intersect geometry in Edit Mode. Starting from the default Cube and a Plane in Object Mode, subdivide the Plane to your liking and use e.g. the Displace Modifier or Sculpt to give it some bumps.

Apply the Modifier and join the Cube and the Plane with CtrlJ and both selected. Go to Edit Mode (Tab), select only one vertex of the Cube and press CtrlL, hit Space and type "intersect". Choose Intersect from the popup menu. Note, that you need Blender 2.72.

Press P and select "By loose parts". Tab out of Edit Mode and delete (X) the part of the Plane, that lies outside of the Cube. Three objects should be left.

Two open parts from the cube, and the region of intersection. Copy the region with ShiftD.

Select a part of the Cube and one region together (ShiftRMB) and press CtrlJ. Do the same thing with the other two objects. You can now Tab back into Edit Mode and "remove doubles" (optional).


Some objects are not rendered in UV pass I created the sea and floating object - the ship's hull. The ship floats in the sea, using the method from this tutorial - https://www.youtube.com/watch?v=11F1NRpqrzY (dinamic paint).

Then I modeled the mast with sails, flags and ropes in another scene, and also modeled there a new hull, slightly modified, but almost the same.

I had to attach the structure (the mast, etc.) to the floating object (old hull of the ship), so that the structure repeats it movement.

I used parenting.

I transferred this structure with the mast and etc. to the first scene and parent it to the old hull of the ship. Then I moved it so that the new ship hull was in the same place that the old hull. Then I made the old hull invisible.

Then I noticed that the sail is shifting towards during the animation, so I delete the old Parenting of the sail and Parent sail to the mast.

Everything was ok. https://www.youtube.com/watch?v=65cdCvsL7pU

But when I export MultiLayer EXR, in UV pass the ship's hull and sail are black, looks like they are not used in the creation of UV pass.

Why is this happening and how to fix it?
Thanks in advance!

The UV pass display the UV coordinate from the UVmap so if an object don't have one they will be black, to solve this you have to unwrap these objects and render again.


How to change the top radius of a truncated cone with Python? My Blender version is 2.76. I used the python command

bpy.ops.mesh.primitive_cone_add(vertices=16, radius1=R1, radius2=R2, depth=L)

to create a truncated cone. In order to animate my scene, I need to increase or decrease the top radius (radius2) of the cone. How can I set its value from within my python script?

Cylinder to Cone via shape key.
Here is a take on this using shape keys, Can't use 0 as the radius on the cone tip as it will not be able to be joined as shapes.
import bpy
context = bpy.context
scene = context.scene
# no active object
scene.objects.active = None
R1 = 4
R2 = 4
L = 10
# create cone
bpy.ops.mesh.primitive_cone_add(vertices=16,
                                radius1=R1,
                                radius2=R2,
                                depth=L)
cone1 = scene.objects.active
# create opposite cone
bpy.ops.mesh.primitive_cone_add(vertices=16,
                                radius1=0.001, # can't use 0
                                radius2=R2,
                                depth=L)
cone1.select = True
# join as shapes
bpy.ops.object.join_shapes()
# remove cone1
scene.objects.unlink(cone1)
bpy.data.objects.remove(cone1)

Change the R1, R2 for the second cone to suit your needs.  Altering the shapekey value will give cone at 0.0, and cylinder at 1.0
context.object.data.shape_keys.key_blocks['Cone.001'].value = 1.0


Lightning issue - Constant light that doesn't enable the use of other lights I'm following Blender Guru's tutorials, and I'm doing the last part that consists of lightning the chair. When I try to put the spotlight, I can't really see the difference because it seems to have a global light that I don't know how to shut down. In the final render, you can see that only the screws have a shadow, the chair remains with constant light in it. Could someone help me? Thanks! ^^

That happens when you are not using a shader and plug a texture directly to the surface of the material.

.
Plugging a texture directly to the material output, the texture becomes  emission source.

Shaders define what happens to light rays on the surface of an object. Without a shader... well... there is no shading..
Use a shader and plug the texture as color.


Why does the 'energy' field on my lights keep disappearing (2.8 beta)? Noob question:  I notice that sometimes the properties display for my lights has an "Energy" field which can adjust the brightness, and sometimes it doesn't -- even for the same light object.   Have not been able to figure out the conditions which hide/show this field, or why it would ever go away:

Any ideas?

In Eevee, you will use "Energy", in Cycles, you will use what is in the image you placed, or Shader Nodes. So depends on the render engine.


Get or display normal vector / coordinates of selected vertex? I have a .stl file and want to get the normal vector of a selected vertex or face in relation to the origin.

Blender only shows the coordinates of that vertex/face. My blender skills are very limited so after a few hours of trying, I wasn't able to get information about the normal vector displayed.

Q: Is there a way to get the normal vector of the vertex or a face?

Unfortunately i dont know a way to display the normal vector in the viewport.
Here are two options to get the normal  vector. I'd say it depends on what you want to do with the normal vector after getting it...

Option 1 Python:

import bpy

mesh = bpy.context.object.data

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

selected_verts = [v for v in mesh.vertices if v.select]

for v in selected_verts:
    print(f"Vertex Normal: {v.normal}")

Option 2 Add-On Animation Nodes:

I filtered all the normals with a vertex group I did manually.

additional: here are some answers for modifiing the ui to display normal-information:
Display values of a normal of a selected face


Blender Cycles how to import image sequence? I have a green screen png sequence for trees and want to import this image sequence into Cycles on a plane. It's very simple but I am looking for answer but cannot find.

First, convert it to a video. You can do this with FFmpeg or a similar tool.
Then drag and drop it into a UV/Image Editor. This will get it into Blender.
Add an image texture node to your material. You will need to open a Node Editor, go to the Object Material section (the ball and the cube on the two tab bars in the header), and make sure your material is using nodes (the Use Nodes checkbox, or from the material section in the Properties panel).
Select your video in the node's pop-up.
Connect the Color output to the Color input on the Diffuse BSDF node.
Enjoy! (Hit ⌥ Alt+A to see it in action.)

I haven't actually tested this, but it should work.


Why won't my mask display a full image? I am trying to impose an image on a video, I made the mask and the alpha over with the video, image and mask, but it shows up like this:

Also, How can I get a mask to display multiple images, like a slideshow?

The reason it is not working like you expected is because you are using a mask. Right now all you are getting is a black and white mask that has no transformational information so all it is doing is "hiding" the part of the image outside of your mask.

What you want to do is use a Plane track and a Plane Track Deform Node. After setting up the plane track, that node will deform whatever image you give it as an input to match the skew of the plane track.

Switch to the Tracking mode in the Movie Clip Editor, add 4 tracking markers.
With the 4 markers selected go to the Solve tab in the Tool Shelf and click the Create Plane Track button.
Drag the corner points of the newly created plane track to match your frame.
Now in the compositor set up your nodes to look something like this:

The Plane Track Deform Node is the heart of this, that is where all the data from the actual plane track gets in to the compositor to distort the image.

My answer here show the whole process of setting up the track and the needed nodes in more detail.


UV Unwrapping Issue. No visible stretching, but part of the texture appears stretched I'm pretty new to UVs, so I imagine I've overlooked something basic. Can someone point out to me (based on the below image) why the texture appears stretched when the UV editor indicates that the face it's being applied to isn't stretched?

Any help is greatly appreciated. Thanks in advance.

It turns out I had a ton of ngons as a result of, presumably, dissolving edges needlesly.


How to avoid repeating Texture Paint edits when image is set to repeat in Shading I drew a line in Texture Paint but didn't expect it to repeat like this.

Unwrap object from top view and scale as needed.

Add new UV Map for line texture and cover whole field.

In Shader editor add UV Map node for each texture and assign propper map.


Extruding outwards from a cylinder Im trying to extrude points outwards like in this video at 24:50 https://www.youtube.com/watch?v=YbsYDOiph7U

This is what is happening.

It is most likely an issue with the normals of your faces (the way that blender thinks the faces are pointing). You also appear to have some duplicate vertices that are throwing things off.

I would do these steps (starting from before you extruded the faces shown in the image):

-Select everything with A

-Press W and select Remove Doubles

-With everything still selected press Ctrl+N which will force blender to recalculate the normals of the faces.

-Select the faces you need again and extrude with E and it should work.

Duplicated vertices are often caused when you extrude a face and then cancel the extrusion with right click. Despite it appearing that the extrusion has been cancelled, extra vertices will have been created that are in the exact same location as other vertices. This can get Blender confused about which way is out for some faces.


Cropping and/or editing an UV map with multiple objects without joining them I have this

and I'd like to stretch the contents to fill the UV map. How could I do that? Is there a way of editing a whole UV map containing multiple objects?

Thanks for the responses

A possible solution would be using the addon MultiEdit. You can edit multiple objects at once without joining them.

Download: https://www.dropbox.com/s/9h7bqe7aza4b16p/MultiEdit_05.zip?dl=0

Blenderartist Thread: https://blenderartists.org/forum/showthread.php?339369-MultiEdit-version-5-Multiple-Objects-Editing

To install it you have to go to File -> User Preferences -> Install from File, then select the .zip and click Install from File. Then tick the checkbox to activate the addon. If you don't want to repeat this every time you start up Blender you can click Save User Settings.

After installing it you can select all the objects you want to edit and click MultiEdit enter in the tool shelf (T). Then you can scale up your UV map. When you're finished you can click on MultiEdit exit to go out of edit mode. But be careful not to go back to object mode by pressing Tab or using the drop down menu at the bottom of the 3D View. This will join your objects.


Problems with viewport orientation and reverse camera view I have been experiencing quite a few problems with the rendered view. As you can see in the video, for some reason the camera view is flipped/reversed and I don't know why it has done this. Like I have the object rotated to the left and in the rendered view its to the right which is confusing. Not only this but whenever I go out of the render view and try to move around the object it rotates around the z axis but flipped on it's side.
I'm also facing problems with the rendered view, I am using a HDRI environment and the spot light I have added doesn't light up my object. Also I want the background to show as black whilst the render is still using the HDRI to light the object but it just appears as a grey background.
https://i.imgur.com/4UcH8cP.mp4
If someone could help me that would be amazing! thanks,
Mark

Somehow, your camera is showing a negative scale transform.
I would:

Swipe the camera's 'Scale' fields in the Item tab and set to 1.
Readjust the camera using its internal settings (Focal length, or Lock Camera to View,  etc)..

Maybe even swipe the padlocks next to the camera's scale to lock it off. You need special reasons to alter it.


Spotlight not illuminating. Cycles Little trouble here.
i've got spotlight emitting light on the cube (in rendered view), but the cube does not get illuminated.

Thanks!

it does, but it's really weak: try  setting background to grey, and disable sun rendering, to see it better, then enhance spot strength to 10.000:

here it is:


Rigging a robotic arm I made a model and an armature, which I did not parented yet to the mesh. I want the robot rotate towards a specific bone. Through IK I can move the whole armature towards this bone but I want the robot only to be able to rotate on the z axis. So when I move this controller bone, the robot armature should rotate towards this position on the z-axis. Is this possible in blender?

Yes it is.
In every IK chain you can select a bone and set some constraints in the IK tab of the bone section of the properties panel. The XYZ constraints are referred to the bone axis, not to the global orientation.


Motion Tracking works in viewport, but not in Render Everything works fine on the viewport and on the Motion Tracking Menu tab. I have a solve error of 0.839 and 26 trackers. If I do a viewport render, there's no problem. However, when I do a normal render (either in eevee or cycles), the objects start moving around unpredictably as if not recognising the motion tracking. I would really appreciate it if someone could help :)

It is impossible to help with motion tracking without looking at the shot, and the nodes used on the compositor.
A few comments:
An error of .8 pixels is still too high, you should aim for an error of .3 or lower.
Use the graph and dopesheet to see if any trakers have a high error value.
The most common error in tracking happens if you try to use the default solver on a shot where the camera is not moving, or where the camera is stationary and just tilting and panning. Those shots can only be solves as "tripod". And will not give you any 3d information.
If you haven't already please read the detailed post on this site on motion tracking:
How can I get better results when doing camera motion tracking?


How can I apply some kind of pattern on a mesh? How can I prepare this type of mesh? With these kind of curved strips. How should I proceed?

The bottle is whole like this:

I've trying some stuff like this:

I created some separate strips to shrinkwrap on the bottle, and join it. After that, I create a label to shrinkwrap all of these two objects. Or maybe use a lattice to fix it on the bottle. But it doesn’t look good. And I know there is a best way (correct one), but I don't know exactly how.

It's not clear if the shape itself is made of this repetitive pattern or if it's a round shape with an added line on its surface.
In the second case you can use the method I describe, except keep only the lines and create another object, a subdivided cylinder that will be deformed with the same Mesh Deform modifier, so that both the 2 objects, lines and cylinder, have the exact same shape.
In the first case, you could begin with a 16 vertex circle, keep only 7 of its vertices, duplicate, flip:

Extrude, flip, bevel:

Array along the X and the Z:

Use the Simple Deform modifier (Bend mode) to bend along the Z axis:

Use the Mesh Deform modifier to shape it:


Joining as shape breaks model I have this problem where I have two models with the same number of verts and the same UVs and I want to have one of them join the other as a shapekey. The problem is that whenever I do that, A shape key is created, but when I slide it to 1 it totally breaks the model
here's a look at the two heads and the end result.

How can I fix this problem?

Check if your vertex indices match on both objects.
To display them enable as Overlay > Developer > Indices


Mirror flip not working https://gyazo.com/418be66571a2d28978515c3095f17450

It matches.

They are all the same

@ItsRay, it looks like you copied then inverse-pasted, but as long as you don't press i to insert keyframes, no keyframe, and therefore no pose, will be saved, unless you've activated the Automatic Keyframe Insertion button in the Timeline header bar, which would allow to automatically create the new keyframes, but I don't think you've activated it.


Properties won't change? Here is my code:

import bge
from bge import logic

def property(controller):
    own = controller.owner

controllor = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()

target = scene.objects['Target']
ray = controllor.sensors['Ray']

if (ray.hitObject and 'Collide' in ray.hitObject and not 'Body' in ray.hitObject):
    target.worldPosition = ray.hitPosition
elif (ray.hitObject and 'Collide' in ray.hitObject and 'Body' in ray.hitObject):
    target.worldPosition = ray.hitPosition
    own['Body_Track'] = True

I have not finished with my code, but that is what I made so far. I am trying to make different props true and false depending on what you are aiming at: an object, and enemy (, rest WIP). This is to determine what color bullethole/blood should be added. For some reason, the last line of the code won't work. I always have issues with making multiple outcomes after an if. How can I fix this? Any help is appreciated. Thanks!

I suggest to redesign your code:

import bge

scene = bge.logic.getCurrentScene()
controller = bge.logic.getCurrentController()
owner = controller.owner

raySensor = controller.sensors['Ray']
if raySensor.positive:
    if 'Body' in raySensor.hitObject:
        target = scene.objects['Target']
        target.worldPosition = raySensor.hitPosition

    owner['Body_Track'] = True

Recommendations:

Filter "Collide" at the ray sensors configuration. All hitObjects have a property called "Collide". This way you get much less hitObjects and you do not need to filter by yourself.
No need to import bge and bge.logic. One of them should be enough.
Writing the exact same code several times is a sign of the need to redesign the code.
Nothing in this code ever resets the property "Body_Track". That might lead to confusion.
No call to "property()" - this makes this function obsolete.


Rendering only missing frames on animation I'm rendering an animation in blender as image files and I wanted to render some parts of it first, just so I can see these particular parts first.
Also, some parts of the animation, I rendered jumping a few frames (with the frames step config set to 3).

Is there a way to easily render only the missing frames? Maybe by making blender read the image files names and identifying the missing ones.

And I wanted to know aswell if there is a way to insert the rendered frames in the video editor but with the "right position". For example, I rendered frames 1, 3 and 5. As I insert it on the editor, the frames 2 and 4 would be blank, but my video would still have 5 frames.

Thanks in advance!

In the Render Settings under Output you will find the overwrite option will do what you want.

  Overwrite - Overwrite existing files when rendering.

What that means is that when overwrite is disabled and blender goes to render frame 12 and the file for frame 12 already exists it will not render that frame and go onto the next one.

For the VSE, if a bad (or empty) file exists for a frame when you add the image sequence to the VSE it will read the updated file for the bad frame/s once you have rendered them.


Why is one of the lines / edges visible on my mirror All edges / phases have been created in the same way, by the extrusion tool. So I do not understand why one of them seems to be unique.
Can anyone help me understand what is happening here?
Here is my project file

If you (try to) select one of the triangles defined by the problematic edge, you will see that it's actually a quad:

So the edge there is not defining any face. Blender doesn't display edges defining faces in Object Mode, but it does display edges that don't define a face. In a way your problem proves the usefulness of this approach, as thanks to that, you noticed a problem with your topology.
You can simply select the edge and press X, then E to remove it. If you want to divide this quad into two triangles, then after removing current edge select appropriate vertices and press J to Join them. This will cut through the existing face like with a knife tool, instead of adding an edge on top of existing topology without changing it.


Why does my rig fly away in game engine I am trying to change my rig to be dynamic so it can stand on top of the static floor.
I tried all the tutorial solutions and I can't solve it. Why does my character fly off screen, and not stand on the floor?

The file is here:

You have all the parts of your robot set as Static, thus your Dynamic rig is colliding with the parts of the robot, which does not work.
To fix that just set every part of your robot, except for the rig to be No collision.

A easy way to do it is to, is set one piece as No collision. Then select all of your robot (I used Border select B in wireframe mode so I would not miss any pices); make sure that piece you set to No collision is the active selection, meaning it is lighter orange (selected last) and press space and search for Copy Game Physics Properties to Selected.

Animation showing setting all pieces as no collision


Does decimate modifier decrease render time or memory usage? Because I have completely opposite result during this render. Cube was subdivided 10 times in edit mode + 3x subsurf modifier = more than 40k faces. And 582 faces after Decimate

Principally, the decimate modifier reduces face count. A smaller geometry leads to less memory usage and a shorter render time.

BUT: The modifier is slow. Really slow (Don't blame it, reducing geometry isn't a simple task). Before rendering, all modifiers are "applied" so that they can get rendered in the "Syncronizing object" phase as Jerryno said. This will add some overhead to your rendering time.

If you can afford it, apply the modifier. Then it will calculate once and for all instead of at every render. Eventually back up your object somewhere else just to be sure.

Also please keep in mind that the decimate modifier is a "I messed up the polygon count" quick fix. If you need it, in most of the cases that's a hint that you made a mistake somewhere. See here for alternative solutions.


How to store area of each quad mesh from a mesh? Somewhere knows how to store the area from each triangle/quad from a mesh into a txt file or something like that in Blender instead of simply showing it?
(It is possible to show all the areas doing Display -> Face info Area, but I dont know how to save all the measurements it provides)

Thanks a lot!!!

B.

To output the areas of each face to a file, you would need to use a python script. It is easy to use python to create and write to a file. You can use str.format() to control how the data looks in the file.

The area is a property of each face in the objects mesh data, faces are called polygons here.

import bpy

with open('face_data.txt','w') as out_file:
    for f in bpy.context.object.data.polygons:
        out_file.write('{}, {}\n'.format(f.index, f.area))


How do I animate a single face of a mesh? I have my mesh which began as a plane and which I have extruded along the z-axis so it looks like a simple narrow block. I've edited the mesh to take the shape of a country with numerous states. In my animation I would like each of states to 'grow' upward from the plane along the z-axis. I've tried placing the object in its initial location at frame 1 and adding the first keyframe, moving to frame 72, extruding and individual state along the z-axis and inserting the second keyframe but this doesn't work. When I go to play the animation the extrusion doesn't return to its initial state at frame 1 and no animation occurs.

Any help is appreciated, thanks.

You cannot keyframe vertices directly, but several possibilities to do that.

For instance:

Using an armature:

Create an armature, create bones in it and assign the wanted names to the bones (ie states names), in the map assign the wanted vertices to groups which are named the same way. Parent the map to the armature using 'with empty groups' option (as the groups are already created).

pros/cons: can grab, rotate, scale the parented group as you wish

Using a shrinkwrap:

Add a shrinkwrap modifier which applies on a vertex group. Here you can animate the plane target use in the shrinkwrap.

pros/cons: fast to do but static: only up and down movements

Using shapekeys:

Add a base shapekey, then a second one and this last selected, move the vertices to the target place you want. Now you can animate the shape key.

pros/cons: you can place the vertices exactly where you need, but static once done

Using scale:

Here, simply separate the country or state you want and play with its scale.

pros/cons: only for up/down movements

Edit:

Using a hook:

In edit mode, select the vertices you want and CtrlH to hook them:

pros/cons: nearly like bone here: grab, rotate, scale the hooked vertices (or group) as you wish

Using a lattice

Again with a vertex group but here with the lattice modifier.

pros/cons: not the simplest to setup but can grab and scale too.


How do I save a certain workspace as the default workspace (not default upon opening blender) I want to save the default compositing workspace a certain way so that when I open the compositor, it's the setup I like. I've figured out how to save the interface for opening blender however, I'm wondering: how do I save the default interface to only that interface (basically the compositor won't be the default opening blender scene)

Any changes you make to any of the workspaces can be saved as part of your Startup File.
Here's my Compositing screen, I also enabled the denoising data passes so I could denoise renders by default.

Just open a new file, make any changes, and go to this menu.  Whatever workspace you're currently in will be the one Blender opens to.


How to change default sculpting color? On many sculpting tutorial videos when they enter sculpt mode their mesh becomes a rich red as in here. On mine, it remains in the same black/white layout as in edit mode here. It's much easier for me to see gradients on the red so how do I go about changing this?

You can change the Viewport Shading in the top right corner of the 3D editor. Open up the drop-down menu by pressing the upside-down ^, then select MatCap. Then, press the ball to change which MatCap you want to use.

I believe this is the one you're seeing in the video.

Note that these settings will only be visible if you're in the Solid Viewport Shading mode.


Why are color values rounded in Themes? Why is this?

For example, if I type in 0.65 to one of the RGB channels, after pressing Enter it changes to 0.651:

This sort of thing seems to happen for all different color settings in Themes, even RGBA ones:

What is the technical reason for this?

internally the value is stored as an 8-bit value (char C type, range 0..255). This means to get from the 0..1 range to the actual stored value, multiply by 255:

0.65 * 255 = 165.75 ~ 166 (rounded to integer)
0.1  * 255 = 25.5   ~ 26  (rounded to integer)

When 166 is in turn displayed in 0..1 range again, it gets divided by 255:

166 / 255 = 0.650980392... ~ 0.651 (rounded to 3 digits)
26  / 255 = 0.101960784... ~ 0.102 (rounded to 3 digits)

So the double rounding when entering and then displaying the value causes this slight error. If you read the same value and set it back again these errors will mount up, but otherwise it's not a big problem.

In addition to cases like this where a color value is actually an 32-bit integer (8 per component) internally, there is also the usual issue of floating point representable numbers. But in this case the integer rounding overshadows it.


How to control which edge loop is selected? Sometimes when I'm in edit mode, there will be maybe 3 or 4 possible edge loops I can select. About 95% of the time it selects the edge loop which I don't want.

Is there anyway to control which edge loop gets selected when I right click on the same vertex?

Which edge loop gets selected when pressing ⎇ Alt RMB is controlled by the edge clicked, not the vertex.

Click an edge which belongs in the edge loop you want to select in order to select that loop:

Note that the edge clicked also becomes the active edge (white).


BLAM add-on does not work with Blender 2.79 I tried installing both the latest version(v 0.6) and the original one. I downloaded the zip file and then clicked on the install addon from file button. Turns out it does not show in the addons list at all.
   I don't know whats the error. A few days ago there was some kind of numpy error in Animation nodes as well. To fix that, I uninstalled and then reinstalled Blender. When I tried installing BLAM, it still does not work.
Any help is appreciated.

Thanks everyone for the help. Apparently it was not BLAM which had the problem. The problem was with the version of Blender 2.79 that I was using. Apparently it had a lot of bugs that I would keep run into which the previous versions did not have. I downloaded the recent Blender 2.79a (release candidate) which worked for me.


How can I animate a 2D face rig on any 3D object? So I've been trying to animate 2D textures on a 3D mesh as in this tutorial.

It was made on Blender 2.79 and the differences are driving me crazy.

First a simple solution with the UV Warp modifier. Then an alternative with Image Sequence as explained here by SouthernShotty.

UV Warp solution:

Create a PNG, with transparent background, of your facial expressions:

Give your object a material. Assign another material to the face area: Unwrap this part, add a UV Map node with the new UV map loaded, plug it into an Image Texture node, open the PNG, plug the Image Texture into a Mix Shader, plug the Image Texture Alpha output into the Factor of the Mix Shader, plug the skin material into the other input of the Mix Shader.

Create an empty at the same position as the head. Give the head a UV Warp modifier. Choose X and Z as UV Axis, From > Choose the head object, To > Choose the empty.

Create a bone at the exact same position as the empty. Parent the empty to this bone (the bone will probably be part of a whole armature):

Now the bone controls the empty and the empty controls the position of the PNG. To save all the different expressions, you can use the Pose Library in the Properties panel > Object Data. Move the bone in Pose mode and press the "+" button to save the pose. Continue until you've saved all the poses. "+" button is also used to replace an existing pose. Use the Apply button to call a pose. Give each pose an appropriate name (Smile, Sad, etc...).

Image Sequence solution:

Create your facial expressions on transparent (alpha) backgrounds, name your images 0.png, 1.png, 2.png, etc:

Select the part of your mesh where the expressions are supposed to happen, unwrap and give it its own material. Create an Image Texture node, click on its Open Image button, select and load all the PNGs, plug the node's color output into a Mix Shader, use the other Mix Shader' socket for the skin color you've used for the rest of the head, plug the Image Texture's alpha output into the mix factor socket so that you can see the expressions over the skin:

When you've imported your PNG, the Image Texture node has automatically switched to its Image Sequence mode. Set the Frames value to 1. Now you just need to create some keyframes on the Offset value to switch between the different images along the timeline. The Offset begins at 0, so Offset > 0 will be image 0, Offset > 1 will be image 1, etc. In the Dopesheet, once some keyframes created, press T and choose Constant Interpolation so that each keyframe switches directly to the image you want.

It should work:


Undo operation keeps resetting my settings im using blender v2.83.2, since this release I'am experiencing unwanted undo behaviour.
Every time I undo for example a brushstroke, at the same time, I am resetting the most recent changes in settings like, shapekeys oder simple brushsettings. Is there any toggle or other workaround for that which I have overseen?
best regards.

Yep, known problem:
https://developer.blender.org/T71759

Sculpt/Vertex/Weight Paint Brush Size Gets Undone After Undoing a
Stroke
Short description of error
After changing the size, then doing a
strike and immediately undoing it, the brush size gets undone as well.
Steps to reproduce

Splash Screen > Sculpting or File > New > Sculpting.
Change the size of the brush ]
Sculpt: Only one stroke.
Undo


How do I stop my white background from becoming grey due to lighting? I'm trying to make a 3D rendered shot of my product model. I want the background to be plain white.
However, when I use a plain without material, it's greyish, depending on the lighting. If I use a material on the plane, there are artifacts/fireflies on my product model.

What's the best approach to solve this problem?

"it's greyish, depending on the lighting".
Indeed the solution is exactly in that statement. Use brighter sources and the "gray" can look like white.

Just increase the "power" of the lamps, or use a higher number than 1 on the strength (if you are using nodes)


Easy way to format mathutils.Matrix Vector as tuple (or list) for json? Hi I am currently making simple pose preset system with json for specific Armatures. It just discribe non driven bone matrix as json (export), then import and apply for pose bones when there is same name bone in context armature.
Then is there good format function which convert blender Matrix or Vector as tupul for json?
when I get Matrix of bones, bpy return like this
'''Matrix(((1.0, 0.0, 0.0, 0.0),
(0.0, 1.0, 0.0, 0.0),
(0.0, 0.0, 1.0, 0.0),
(0.0, 0.0, 0.0, 1.0)))'''
then,,  mat_z[0] rerturn Vector
Vector((1.0, 0.0, 0.0, 0.0))
I know, I can divide each component, then compose as tupul, for each 4*4 element, (or make function which convert matrix avlue as tupul,) But I think if I miss easy step which bpy or python already offered?
or python json module auto format them without convert tupul? (Though I do not suppose so)


UV Project modifier doesn't line up with background image I am using a UV Project modifier to add a video to a plane that matches to my camera view. But the image is the wrong aspect, and its dimensions (1080 x 720) don't match my project dimensions (1280 x 720) How do I fix this?

You can simply type the dimensions of the preferred output into the UV Project modifiers Aspect values fields.

If you want the image to be distorted (anamorphic), then enter the scene's dimensions. If you want the image to fit the camera view (and therefore crop the overshoot), use the source image dimensions.


How can I move a PoseBone to a specific world space position? I have written some code that calculates the world space coordinate I want to move the bone to but i am having trouble figuring out how to get that back into the bones coordinates.

from bpy import context, data
from mathutils import Vector

def test_empty(matrix, name):
    # view matrix by applying it to an object
    obj_empty = data.objects.new(name, None)
    context.scene.objects.link(obj_empty)
    obj_empty.matrix_world = matrix

armature = data.objects["Armature"]
pbones = armature.pose.bones
root = pbones["root"]
hips = pbones["hips"]
test = pbones["test"]

# calculate root
root_matrix = armature.matrix_world * root.matrix
test_empty(root_matrix, "Root")

# calculate hips
hips_matrix = armature.matrix_world * hips.matrix
test_empty(hips_matrix, "Hips")

# calculate bone
test_matrix = armature.matrix_world * test.matrix
test_empty(test_matrix, "Test")

# get offset of hips from root bone
offset = root_matrix.translation - hips_matrix.translation
print(offset)

# calculate new location in local space
new_position = test_matrix.translation + Vector((0,offset.y,0))

obj_empty = data.objects.new("TEST", None)
context.scene.objects.link(obj_empty)
obj_empty.location = new_position

# obviously something wrong here
new_position = armature.matrix_world.inverted() * new_position

# move bone to new location
test.location = new_position

Use Object.convert_space

There is a handy method on the object to do this for you.  Example below, adds an empty at each pose bone (to test pose to world) and then uses this to convert back to pose and checks against bones matrix.

import bpy
context = bpy.context
ob = context.object
scene = context.scene

for pb in ob.pose.bones:
    # convert from pose to world
    mw = ob.convert_space(pose_bone=pb,
            matrix=pb.matrix,
            from_space='POSE',
            to_space='WORLD')
    mt = bpy.data.objects.new(pb.name, None)
    mt.name = pb.name
    mt.matrix_world = mw
    scene.objects.link(mt)
    # now back from world to pose
    mp = ob.convert_space(pose_bone=pb,
            matrix=mw,
            from_space = 'WORLD',
            to_space = 'POSE')

    print("Pose bone matrix", pb.matrix)
    print("Matrix World to pb.matrix", mp)
    print((mp - pb.matrix)) # zero matrix if all is good

To move a bone to the cursor

pb = ob.pose.bones.get("root")
mw = ob.convert_space(pose_bone=pb,
        matrix=pb.matrix,
        from_space='POSE',
        to_space='WORLD')
mw.translation = scene.cursor_location
pb.matrix = ob.convert_space(pose_bone=pb,
        matrix=mw,
        from_space='WORLD',
        to_space='POSE')

Note: If the pose bone has a joined parent bone this may not work as expected as it wont break that bond.

Links

How can I manually calculate bpy.types.PoseBone.matrix using Blender's Python API?


Problem - dark Border around Render Frame with Eevee Reflection Plane I'm just testing Eevee and got a strange border in the reflection on the ground.
The ground has  an easy shader wich is very glossy.
In the viewport all is corect but if I render it, I got this strange result.
I've play around with the settings of the material, render settings and the object data of the Reflection Plane (Light Probe).

I hope anyone can solve this problem.

Thank you

Solution!
Render Settings > Film  set Overscan to Active

It seems that Blender trimms the area outside the camera frame and dosen't consider this informations. That's the origin of the problem. A falloff starts form there. The overscan option let some information outsite the camera frame and the effect dosen't occure.

Why this musst be like that - I don't know.


How to use absolute value in Loopcut and edge slide? I want to make for example edge slide by 0.5 unit. How can I achieve this ? I don't want to use in edge slide fraction (from -1 to 1), instead real slide value.
I found that in previous versions of Blender there was in Edge Loop Proportional option, but I can't find it in newest Blender :/

http://wiki.blender.org/index.php/Dev:Ref/Outdated/Release_Notes/Modeling/Meshes/Advanced_Tools

From old manual:

Pressing P while positioning the loop cut will enter non-proportional mode, which keeps the shape of one end of the faceloop regardless of where the cut is positioned. Pressing F while in non-proportional mode flips which side of the faceloop is used to determine the shape of the cut.

Maya have this, Absolute Value.
http://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/Edit-Mesh--Slide-Edge-Tool-htm.html

When you press Ctrl + R you actually perform two actions: Loop Cut + Edge Slide.
The easiest way to slide edges a certain distance from a vertex is to slide to a vertex first, then slide the desired distance.

Ctrl + R + LMB to select the ring to cut
1 (or -1) to place the loop at the very last vertex of the edge you are cutting
Ctrl + E + Edge Slide + relative distance

NOTE
In this way you can set zero at a vertex instead at the center.
It helps to calculate the absolute distance (as Carlo suggests), but actually doesn't allow to set edge slide by unit.
You don't need to calculate the value manually: use Python expressions instead, simply typing = followed by the operation
Check Edge Info: Length in Property Panel (N)

Even off
If you're sliding proportionally (Even off), you have to choose the edge wich the absolute slide amount refers to.
In this example, I want the edge to slide 0.5 units along the shortest edge.

Now the tricky part: type this simple operation (thanks @Carlo):
= absolute_distance / edge_lenght

in my case:
= 0.5 / 1.13

Even on
From Blender Manual

Even E
Forces the edge loop to match the shape of the adjacent edge loop. You can flip to the opposite vertex using F. Use Alt-Wheel to change the control edge.
Flip F
When Even mode is active, this flips between the two adjacent edge loops the active edge loop will match

In this case, the operation is a bit longer, because zero is at the median point of the edge :
  = absolute_distance / edge_lenght - edge_lenght / 2

in my case:
= 0.5 / 1.13 - 1.13 / 2

note:
You'll notice a rounding error (the value is not exactly 0.5), because some approximation


How to specify multiple restrict frame ranges for the F-curve Noise modifier? It's a simple problem but one I can't seem to get my head round. I'm using a noise modifier which seems to perfectly mimic a realistic rotation of some equipment I'm deploying. My problem is I need to restrict this twice.

1 start noise at 3000 and end at 3400

2 start again at 4400 and terminate at 5000

I thought about key framing the strength but I can't add any keyframes to the noise panel

Basically I want the F-curve to look like it would do if the lime green line was added

Thanks for any help
Sean

One way to let the F-Curve modifier affect the animation in several frame ranges is to setup several F-Curve modifiers. So one modifier will be responsible for the 1-st frame range, another one - for the second and so on.

You can copy / paste modifiers with buttons in the top part of the Modifiers tab in the Properties region of the Graph Editor. Once modifier was copied change its frame range to make it affect another part of animation.


How to accurately shade an object while texture painting I'm trying to initiate the process of texture-painting in this object but when I turn to the texture paint mode, the object turns flat. All the shadows are gone.

Searching for some explanations, I found out that the solution is just to open the overlays menu and turn the Texture Paint opacity to zero. Turns out this does not solve the problem, since I need the shading elements to a texture-painting I can see, like in the second image, down below.

How can I solve that?

Perhaps you just need to turn on the Shadow and Cavity in Viewport Shading tab as below:


How to bind a series of commands to a custom hotkey (scripted macro)? How would I go about creating a hotkey that would operate as follows?:

With an object selected in the modeling viewport:
Press Shift + D (this would be the custom shortcut to trigger what follows ,not the default 'duplicate' command)
Selected Object gets a catmull-clark subdiv modifier added with default settings bpy.ops.object.modifier_add(type='SUBSURF')
Subdivision modifier gets applied to mesh (bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subdivision")

?

I am new to Blender as of 2.8 and am interested in customizing the UI to make it more like the software packages I am coming from (Maya and Modo). At the moment I am interested in understanding how to consolidate multiple commands into a single operation that can be bound to a hotkey. I figured this would be a simple enough one to start with. I have some limited python experience from Maya and have been looking at the API but I have been having difficulty understanding how it all works. I understand I would likely need a hotkey .py file to bind the operation to a key and an operator .py file to define the operations and possibly to include the commands. How would I get this working?

I tried a hotkey file in startup that looked like this:

import bpy
import os

    km = kc.keymaps.new('Window', space_type='EMPTY',     region_type='WINDOW', modal=False)
    Global_Keys()

    kmi = km.keymap_items.new('mesh.testSubdivide', 'D', 'PRESS', shift=True)

With an operator .py file that looked like this:

class testSubdivide(bpy.types.Operator):
    bl_idname = "mesh.testSubdivide"
    bl_label = "testSubdivide"
    bl_options = {'REGISTER', 'UNDO'}

def execute(self, context):
    bpy.ops.object.modifier_add(type='SUBSURF')
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subdivision")
    return {'FINISHED'}

I know this is wrong...but i'm blocked. How would I do this?

If you just want to apply a subsurface modifier you can just press CTRL+2..., where the number (2 in this case) is the number of subdivisions you see in the viewport.
If not, i always prefer AutoHotkey (https://www.autohotkey.com/) to bind keystroke sequences to a custom hotkey, it's very easy to program and you can turn it off insantly...


I can't add nodes in node editor the add options are greyed out (in all tabs) I can't use them. Any help?
BLENDER VERSION: 2.78

Check Use Nodes at the bottom of the Node Editor.


How can i add more duplicates to a curve? i'm using the Dupliframes method.

But the curve is pretty long compared to the size of the objects, and i need them to be near one of each other.

When i add the maximum number of Frames that is 100, the object appear like this:

And while i can put them near one with another with a number of frames of 400, the mesh just moves to the first part of the curve, like scaling itself, but i need it in every place of the curve, from the start to the end.

How can i add more duplicates, or tell the option to make them one near the other?

Thanks in regard.

You can adjust the amount and density of dupliframes from two different parameters.

Adjust the density of duplicated objects from the number of Frames in the Curve Object data > Path Animation > Frames*. A higher number will yield a denser amount of duplicated objects.

If increasing the value high enough gives too few objects to fill the whole curve, then select the duplicated object and under Object > Duplication increase the End Time value so it fills the whole curve again.


Copying a rigged object and having it use the same armature Is it possible to copy a fully rigged object and connect it to the same armature with the same rig weights?,  i have been having issues with this

Shift-D is the way to copy a specific object.


Blacklight CFL Bulb Effect? I have been searching everywhere, and I can't find an answer so I'm coming here!

I'm trying to create a CFL Blacklight bulb. I've attached a couple images below of what I've tried to make. I'd love to have an effect like this:

Does anyone know how to recreate this? It seems like the color is affected by time as the bulb heats up, eventually being all white-ish. That would be fine, too, but I can't even seem to get the lighting effect of the pink glow around it and whatnot. I can post pictures of my node setup if you need it, though I think I made it necessarily complicated.

Thanks in advance!

UPDATE:
This is what I have now:

I want to adjust the colors, but that isn't the issue now... The way I made this is a glass spiral that acts as the bulb. Inside of that bulb (that has a glass-like shader) is a purple material that I made that mimics the phosphor coating blacklight light bulbs have to filter light. Then, a separate mesh spiral is inside of that, and it has the emission stuff on it.

As Duarte suggested, I used the node setup he had for my emission, but used a transparent node instead of glossy. Why isn't the emission light from inside my glass causing the glass to be glossy? If I put a point light in the scene, it looks glossy.

Thanks in advance!

This is trivial to achieve using normal based effects like Fresnel.

You can use it both for the color gradient, and the shader transition from glossy to emission shader.

A layer Weight Node should give you both the Facing socket for the colors and a Fresnel socket for the shaders.

Drive it through a Color Ramp node to control the color progression gradient, and link the Fresnel socket to a Shader Mix node for shader mixing, between say an Emission node and Glossy, or Emission and transparent if you will.


Origin to geometry by default Is there a way (can't find in preferences) to set the origin to geometry by default to imported objects? Very time consuming to set each time manually, I'm working a lot with svg's...

I took the python template Simple Operator and inserted the operator that sets the origin to geometry (found when pressing the button and looking in the Info window). I then selected a few objects and set them up with origins at the cursor so I could test, and ran the script. With all of them selected, I pressed the space bar and chose "Origin to Geometry All", the name of the new operator.

Maybe it could help, though it isn't as clean as it could be with some work.

edit: turns out you don't need all that since the operator works on multiple objects at once already. Simply select all the objects you need to change origins to geometry and then press 'Origin to Geometry' in the tool bar. So if you have imported 30 objects and need to fix their origins, select all and then press the operator.


How to construct a stretchable array? I'm new to Blender, and coming from an Acad background; so apologies if my terminology is a little off...

I'm trying to construct a 'stretchable array' comprising a module that can stretch and deform within defined limits and repeat itself such that it exactly fits a given length.

I'm attaching an image which hopefully illustrates what I'm talking about:

I'm happy to explore solutions which incorprate Sverchok, Tissue, etc.

Thanks

Here's a first shot using drivers, with a set-up to keep the expressions as simple as possible to begin with.

The X location of an Empty('End'), marks the length of the array. Moving 'End' in X changes a collection of driven values, and stretches the array. Everything is parented to another Empty at the origin, ('Start') so the rig works in Start's space, and can be moved about.

The arrayed object is a rectangle with 2 shape keys. The Basis key is set to width 0. The 'Width' key is set to width 1 at relative value 1, so the Value directly encodes the width.

The Count of the array is driven as follows:

The shape key of the rectangle is driven by the 'End' Empty, too:

... and the rectangle is rounded top and bottom by a driven Bevel modifier:

..with this result, so far:

I don't know whether this satisfies your requirements directly, but I'm sure it could be adjusted?


properly UV unwrapping "edge loop" geometry? Think of a geometry like this (blend attached):

Now imagine you have a texture image such as this, which you want to have tiled horizontally on that selected surface (polygons).

To get a result akin to this:

How can you do that without starting from scrach?

PS. Cylinder unwrapping only works to a degree, the texture gets noticeably stretched at places compared to other places.

First remove doubles (W-->Remove Doubles) and apply transformations (Ctrl+A-->Apply Rotation, Scale). Then hide the non selected part of your mesh with Shift+H. Mark seams (select edges as pictured below and press Ctrl+E-->Mark Seam). Then select it with A and unwrap it U-->Unwrap.

Now straighten the UV islands ( How do I straighten UV maps? ).


How to restore the panel with viewport navigation tools I remember there being a panel with buttons to zoom in or out or pan in the viewport but it seems to have gone somehow. How can I add it back?

The tabs on the toolbar come from addons, if one is missing then the addon that put it there has been disabled or uninstalled.

The steps you list are available using the mouse and keyboard, use ⇧ Shift MMB to pan, the  scroll wheel as well as ⎈ Ctrl MMB will zoom in/out.


snap edge to edge in edit mode Pls see my attachment , i'm in edit mode and i want to move the selected edge along the red arrow direction so the edges will perfectly snap and overlap to target edge ( vertex A will snap to B). I tried using snap set to vertex and closest and doesn't work. Any idea how to do this ?

Here is one way: switch to vertex mode, select the vertex you want to move, and then edge slide (GKEY GKEY) it until it is adjacent to the node.  You now have a doubled vertex.  Select both vertices and merge them (ALT-M -> merge at center).  Alternately you can enable Auto merge before you edge slide.


Where is autonormalize in 2.8? I saw a tutorial on YouTube, he used Auto normalized which used to be under brush. In the today version of 2.8 isn't there anymore.
Where can I find it?

Make sure you have the latest Blender and press N on your keyboard >> Tools >> Options >> Auto Normalize

Good Luck


How does Manhattan and Euclidean distance combine to control grease pencil input? I read the wiki (https://wiki.blender.org/index.php/Doc:DE/2.6/Manual/3D_interaction/Sketching/Drawing)
and I can understand the difference among the definitions, as I understand it says the same with different words, also the hints.

if I set Euclidean value to 100px I can predict that Manhattan distance will control the minimum distance to draw the new gp point, but if I set a 0 or 1 or 10 on the Euclidean changing the Manhattan distance doesn't do any evident change.

So I'm trying to understand this and I'm feeling a bit lost here.

On this picture from Wikipedia green is Euclidean distance , rest - Manhattan distances. If the square was 10 by 10, then  Mathattan distance is 20, Euclidean sqrt(200), so around 14. So Euclidean distance  will be the real distance the mouse traveled, Manhattan - the number of pixels it travelled. Although it seems Blender uses the number of pixels per axis (probably taking maximum rather than summing them). In this case Manhattan distance will be 10.


Recreating toggle shading mode hotkeys in 2.8 I'm preparing myself to transition to 2.8, and I need help to recreate hotkeys removed in this version.

Before 2.8 you could use Shift+z to toggle the Rendered mode in the 3D view. The python for that was view3d.toggle_render. Yes, I'm aware it's on the pie menu, and I find cumbersome and impractical.

In Blender 2.8, according to this ticket, the code is (VIEW3D_OT_toggle_shading, RENDER). "Render" is supposed to be the type (View3DShading.type). I don't know how set that in the hotkey field. Using only the first part makes toggles between Wireframe and whatever view mode you were previously at. The behavior I'm trying to rescue is going to and from the rendered mode to the mode you were previously seeing.

I was so distracted hunting down 2.8 methods I completely overlooked the seemingly disabled dropdown that appears when you use the VIEW3D_OT_toggle_shading method:

Despite being grayed out, it's interactive. That's where you set the type, not through the code.


Suddenly camera becomes so thin and not being scaled From View, I selected Camera .

And my camera became like this. I'm unable to scale this camera.

How to revert the camera back to the normal size ?

You've probably changed the resolution settings (or the aspect ratio). Set them back to the size you need for the final output.


I need more subdivision levels to apply textures I'm modeling a dinosaur with the multiresolution modifier but I already have 8 levels of subdivision. I needed more subdivisions in some places of the mesh to be able to apply the textures, but my pc blocks when it increases one more level of subdivision. How can I solve this problem? And then to make an animation, do I need to do a retopology?

Having more mesh data allows you to have more detail on the surface of your mesh. The mesh data only defines the shape of the object, you don't need more mesh data to add more texture detail.

While we can apply a different material to each face of a mesh, or a vertex colour to every vertex, these options give limited results. To get more texture detail you UV unwrap your model. The UV data allows you to define how much texture detail is used by each face. Often this is used to map an image to different parts of a model, but UV's can also be used to adjust the scale of a procedural texture on different parts of your model.

By scaling up the UV's of one face you can see that one face can use more of the image than the rest of the model.


Join/see UV's of different objects I have to export an object to a game engine, and Id like to keep the different parts of it as seperate objects but while unwrapping I have a hard time knowing if they overlap. Is there anyway to see all the UV's or join them?

Just previewing other UVs
There is an option in the UV Editor which - under certain circumstances - allows to see the UVs of other objects. Those circumstances are:

both objects use the same material, the material is active, and the texture is assigned
before entering Edit Mode, both objects have been selected
the Draw other Objects option is checked in the Image Editor (see screenshot below)

Editing other UVs at the same time
Use the Texture Atlas Add-on shipped with Blender to do this. After enabling it in the Add-on manager, you'll find a panel in the Properties Editor of the Render Settings tab. Select all objects which should receive the same UV space first, and then hit the + key to add a new Atlas. Then, hit the Start Manual Unwrap button.

All objects will be joined, you can edit the UVs as if they were one. In fact, at the moment they actually are one object, so pay attention beforehand to your modifiers. When you're done, hit the Finish Manual Unwrap button to separate the objects back to their original state.


Blender Cycles Diffuese Material - Why it stays so light? Blender Cycles Diffuese Material - Why it stays so light? I can't figure out how to get id darker!

Thanks,
Manolo

Here's a scene with a light that is set at a low intensity:

Here's the same scene with a brighter light:

Here's the same scene with a much brighter light:

Cycles uses lights that try to resemble how light works in the real world:
The brighter the source, the more light that will be reflected by the object, making it brighter.

The "color" of a diffuse object thus depends on the light it reflects.

Other factors that might be affecting your scene:

The brightness of the environment (world)
The Exposure setting in the film section (default is 1 don't change it unless you have a very good reason, and know what you are doing)
The Exposure setting in the Color Management section (read: Which Exposure control to use?)
The settings for color management:

The view transform used. (Read: Render with a wider dynamic range in cycles to produce photorealistic looking images)

Any changes in the settings for gamma or the use of curves.
The use of ambient occulsion (in cycles you don't need it. Read: Ambient occlusion in Principled BSDF and Adding Ambient Occlusion to Material)


How would I join an imported road from OSM to the terrain? I am new to Blender (and very impressed).

I have imported a terrain, 3D buildings and roads into Blender using the OpenStreetMap add-on.

The roads are elevated well over the terrain and offset in position.
If z is the altitude, I would like to zero z so that the roads rest on the terrain.
The roads are off in x and y as well. The roads run off the terrain and pass over and directly through buildings.
The default Blender mesh would essentially be underground.

Ideally, I would like to be able to apply actual distances to the Blender model in imperial or SI units and if possible include a light grid throughout a volumetric model.

A possible workflow might be:

Use OpenStreetMap add-on to import an approximate rendering of the location of interest.
Correct placement of roads and buildings.
Apply a scale to the scene in units of miles, kilometers, etc.

I am currently researching 2 and 3.

Blend file:

Overview:

Change Clipping to some really high value to see whole thing at once.
Go to Object Mode.
With still selected roads, go to Modifier tab and remove Boolean.
Change Shrinkwrap to Nearest Surface Point and mark Keep Above Surface.


Translate by metric string Hey does anyone know how I can convert a string with mm/cm/m to translate it?

if test:
    offset = "99cm"
else:
    offset = "1.2m"

bpy.ops.transform.translate(value = (0, 0, offset))

or

bpy.context.object.location[2] = offset

You need to parse the string to work out how to calculate the offset to use.

If you say that one blender unit equals one metre then :

offset = '99cm'

if offset[-2:] == 'cm':
    true_offset = float(offset[:-2]) * 0.01
elif offset[-2:] == 'mm':
    true_offset = float(offset[:-2]) * 0.001
elif offset[-1:] == 'm':
    true_offset = float(offset[:-1])

offset[-2:] extracts the last two characters, while [:-2] gets everything execpt the last two, which is the number. A more complete solution would scan the string for characters and digits to extract the two parts.

Depending on where the measurement data is coming from, you may also need to account for thousand seperators and spaces.

If you want to support imperial measurements then you will also want to take into account imperial suffixes and possibly do imperial to metric conversions.

You may also want to take into account the scenes unit settings. You can get these settings from the scene

scn = bpy.context.scene

scn_system = scn.unit_settings.system # NONE METRIC or IMPERIAL
scn_scale = scn.unit_settings.scale_length
true_offset = true_offset * scn_scale


Render times for standard non-3d video? There is a lot of info on how to speed up 3d rendering, but not for standard video as I'm starting to use it.

I'm doing just a few crossfades, mastered audio done in another program, with 1920x1080 resolution of about 1 hour of video at 60fps.

This is pretty high quality video, so I understand it would take a bit to render.

However, to render to H.264, it took 6 hours.

Is there anyway to reduce this? I would do lossless, but that takes nearly a terabyte of space.

Note, my encode settings are a bit rate of 8000, 60fps, 30 GOP, and 384 audio AAC.

Lots of speculation, so I decided to do some some tests on the sequencer performance:

Performance Options

Global Prefetch set to 30frames, 4096MB of cache, AVI JPEG 50% quality: 2m28s

+ UI Locked and no image Display: 2m28s

+ Sound track caching, MPEG seek per-track set to 60 rather than 25: 2m28s

+ Immediate re-render, to test for effect of disk caching: 2m28s

Conclusion 1: Surprisingly, none of the performance-enhancing options seems to do anything.

Encoding Options

Same setting as above, AVI JPEG: 2m28s

+ Encoding set to Quicktime H264 @ 50% quality: 4m08s

+ Quicktime H264 @ 75% quality: 4m02s

+ Quicktime H264 @ 95% quality: 4m11s

+ Encoding set to FFMPEG H264, H264 Preset @ 600kbit: 8m18s

+ Encoding set to AVI RAW: 1m58s

Conclusion 2: The encoding engine makes a huge difference in speed. AVI RAW is the fastest if you have the disk speed to back it up. FFMPEG H264 is the slowest.

Quality Options

+ With antialiasing, AVI RAW: 1m58s

+ without antialiasing, AVI RAW: 1m18s

Conclusion 3: Antialiasing makes a difference, but the quality loss is huge, especially when all the input clips have different resolution.

Test Details:

Scene used: 2000 frame long sequencer with 6 different 720p MPEG4 video input, 3 1080p PNG sequence inputs, dozens of images, dozens of transitions, 1 audio track. Output is 720p with Antialiasing.

Test Methodology: System is restarted after each test, so the effect of disk cache is minimal.

Test system: 2.2Ghz i7 Macbook Pro, 8GB RAM, Radeon HD6750, 500GB SSD


Need this type of sine wave animation without the cuts as like it is a wire. How to make? [Link for the video

https://drive.google.com/open?id=1tTYkHJjxdJkd1SB3rI5Rcoxq1GttfyQU

this is the link for the video that i have already made but it have cuts

The answer you posted was similar to the required animation by me.
But The spline is in square shape, I need a circular one. Can u help me with that.

and also how can we decrease the speed or increase the length of the spline.

The curve you are trying to create can be described by the following parametric equation:

$$
\begin{bmatrix}
p\\
\alpha p \sin({\beta t + p})
\end{bmatrix}
$$

Where $\beta$ and $\alpha$ are arbitrary constants, $t$ is the time, and $p$ is the parameter. We can implement this in Animation Nodes as follows:


Object rotation in 360 Is it possible to make an object rotate, when the viewer rotates the screen on YouTube in 360? So, it wouldn't depend on the camera, rather than the viewer himself/herself.

Yes.

Keyframe the rotation on the axis you like.
For example

Object mode, select object,
select frame 0, insert keyframe rotation
select frame 40, rotate z 180, insert keyframe rotation
select frame 80, rotate z 180, insert keyframe rotation
play the animation frames  0-80 and witness the revolution
improve the animation

If you need a video tutorial please state so in the comments.


How to change 3D Viewport Color in Blender 2.49b? I need to change the 3D viewport background color from the default gray to a higher-contrast color like white, but I can't seem to find an option to do so. This question has been asked and answered for other versions of Blender, but apparently not for 2.49b (i.e. the steps given don't match my interface, so I assume they're for different versions). How do I change the 3D viewport color in 2.49b?

Bonus question: how can I change the grid line color?

Expand the top Info window bar, navigate to the Theme tab, and press Add to create a new one.

From the menus make sure you pick 3D View, then choose Background and adjust the color from the sliders or the color picker as desired.

You can also adjust the grid color by picking Grid from the second dropdown.


Convert gpencil to curve, python, crash I'm not well versed in scripting and I'm trying to write a script that involves converting grease pencil to curve, I have discovered that the operator

bpy.ops.gpencil.convert(type='CURVE', use_timing_data=True)

needs the 3D view context to work, however if i set the correct context Blender crashes without any crash log

i have tried these two options

import bpy

area = bpy.context.area
old_type = area.type
area.type = 'VIEW_3D'

bpy.ops.gpencil.convert(type='CURVE', use_timing_data=True)

area.type = old_type

and

    import bpy

    win      = bpy.context.window
    scr      = win.screen
    areas3d  = [area for area in scr.areas if area.type == 'VIEW_3D']
    region   = [region for region in areas3d[0].regions if region.type == 'WINDOW']

    override = {'window':win,
                'screen':scr,
                'area'  :areas3d[0],
                'region':region,
                'scene' :bpy.context.scene,
                }

bpy.ops.gpencil.convert(override, type='CURVE', use_timing_data=True)

How to explan the crashing and is there maybe a different approach for creating curve from grease pencil?

The custom context has an invalid region set, which results in the region data rv3d pointer being NULL in gp_camera_view_subrect() (gpencil_convert.c).
In your custom context region is set to [bpy.data.screens['Scripting']...Region]. Instead of a list it should be a single bpy_struct. This can be fixed by modifying your override dictionary:

override = {'window': win,
            'screen': scr,
            'area'  : areas3d[0],
            'region': region[0],
            'scene' : bpy.context.scene}

Alternatively you could copy the current context and modify the area and region.

import bpy

context = bpy.context.copy()

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for region in area.regions:
            if region.type == 'WINDOW':
                context['area'] = area
                context['region'] = region
                break
        break

bpy.ops.gpencil.convert(context, type='CURVE', use_timing_data=True)


Cycles: Emission Shader does not bring enough light Since two or three month I'm building a Titanic Model in Blender 2.74.
I'm using Cycles Renderer and a GTX750TI for rendering.

On A-Promenade I built the Windows with a Diffuse-Material for Frame, a Glas-Material for (guess what!) the Glas and an Emission-Material on the Backside of the Window. This works pretty well and makes a nice light on this Deck.

But I also need some white light from Lamps so I built these Lamps in a Diffuse- (For Frame) and an Emission-Shader (For "illuminated" Glass) but I get no light from the Emission of the Lamp-Material.

When I turn off the Emission from Windows the whole Deck is black (except the Faces themselve). Even if I set the Strength from Lamp Emission to 100000 or more there would be no light.

I don't want to add a Point-Lamp for every Lamp I built so what else can I do?

Here's the simplified .blend File:

https://www.dropbox.com/s/nyb7i004kgdt77r/Titanic%20%282%29.blend?dl=0

The reason your scene is so dark and don't see any light, is because you are clamping all of the Direct and Indirect light to 0.5:

What that means is that NO LIGHT WILL BE BRIGHTER THAN 0.5 (0 being black, 1 being White).
Even if you make the lights extremely bright they will never be white!

You where probably trying to cut out fireflies, but by bringing the values so low you are clipping all of your highlights too!

With more reasonable Clamp Values you can regain control of your lights. Now the emitters on your lamps can be brought down:


How do I generate random cylinders, with random height on a predefined area? I am using the following python script to generate an amount of random cylinders that do not overlap with each other:

     import bpy
 from random import random
 from mathutils import Vector

 cylinderRadius    = 1
 maxIterations = 500 # Max iterations to prevent while loop from running
 forever

# min and max values for each axis for the random numbers
ranges = {
   'x' : { 'min' : 7, 'max' : 10 },
   'y' : { 'min' : 7, 'max' : 10 },
   'z' : { 'min' : 0, 'max' : 0}
  }

# Generates a random number within the axis minmax range
randLocInRange = lambda axis: ranges[axis]['min'] + random() * (
ranges[axis]['max'] - ranges[axis]['min'] )

size  = 50 # Number of cylinders
cylinders = []  # Cylinders coordinates list

loopIterations = 0
while len( cylinders ) < size and loopIterations < maxIterations:
   loopIterations += 1

# Generate a random 3D coordinate
loc = Vector([ randLocInRange( axis ) for axis in ranges.keys() ])

if len( cylinders ) > 0:
    # Search for overlapping points (within the cylinder radius radius)
    overlappingPoints = [ p for p in cylinders if ( p - loc ).length < cylinderRadius * 2 ]

    # if any found, skip this location
    if overlappingPoints: continue

# Add coordinate to cylinder list
cylinders.append( loc )

# Add the first cylinder (others will be duplicated from it)
bpy.ops.mesh.primitive_cylinder_add( radius = cylinderRadius, location =
cylinders[0] )
cylinder = bpy.context.scene.objects['Cylinder']

# Add all other cylinders
for c in cylinders[1:]:
    dupliCylinder = cylinder.copy()
    dupliCylinder.location = c
    bpy.context.scene.objects.link( dupliCylinder )

However, I do not get the 50 cylinders I am asking for when compiling. Does anyone have an idea on how to actually avoid setting a number of cylinders to be generated, but to fill in a pre-defined area (e.g. a square) with randomly placed cylinders, that do not overlap with each other, on it ?

Thanks!

Test run, settings as posted Placed 66 of 68

Algorithm for random distribution of circles in a square

  This simple script to place a number of num_circles circles with
  radius radius in a refined rectangle (aligned to global axes) speficied
  by xmin, xmax, ymin and ymax by trying random locations until it not
  colliding with an existing circle. This is certainly not the most
  efficient way of doing it, but it should be fine for smaller problems
  and if the relative area covered is not too high.

Test code after making a couple of edits to https://blender.stackexchange.com/a/89658/15543 to make it add cylinders of random height to a rectangle.

from mathutils import Vector, Matrix
from mathutils.noise import random, seed_set
import bpy

# Specify parameters
seed = 0
xmin = -10
xmax = 10
ymin = -10
ymax = 10
radius = 1
num_circles = 68
max_tries = 10000
max_height = 4
# Init
seed_set(seed)
sx = xmax - xmin - 2 * radius
sy = ymax - ymin - 2 * radius
xminm = xmin + radius
yminm = ymin + radius
existing_locations = []
sce = bpy.context.scene
bpy.ops.mesh.primitive_cylinder_add(
    location=(0, 0, 0),
    depth=1,
    radius=radius)
ref_circle = bpy.context.object
ref_circle.data.transform(Matrix.Translation((0, 0, 0.5)))

# Loop
for i in range(num_circles):
    j = 0
    searchOn = True
    while searchOn:
        if j > max_tries:
            print("Placed", i, "of", num_circles)
            bpy.ops.object.select_all(action='DESELECT')
            ref_circle.select_set(True)
            bpy.ops.object.delete()
            raise ValueError('Found no more room for another circle')
            break
        j += 1
        new_location = (xminm + random() * sx,
                        yminm + random() * sy,
                        0)
        for existing_location in existing_locations:
            if (Vector(existing_location) - Vector(new_location)).length < 2 * radius:
                break
        else:
            new_circle = ref_circle.copy()
            new_circle.dimensions.z = max_height * random()
            new_circle.location = new_location
            sce.collection.objects.link(new_circle)
            existing_locations.append(new_location)
            searchOn = False

ref_circle.select_set(True)
bpy.ops.object.delete()
context.view_layer.update()


writing a batch code to enable video card to support blender I have desktop Intel core i7 920 quad core
windows vista
ATI Radeon HD 4870
1 GB discrete memory
9 GB DDRS

I need a batch code file to enable my video card to support my blender. please help. I have tried this code which I found it in youtube but it worked on PC with AMD Radeon video card.
                         @ECHO OFf
cd "c:\program files\blender foundation\blender"
set CYCLES_OPENCL_TEST=ALL
start  blender.exe

exit

this is won't work with my video card type. any line I need to add in a batch please let me know. thank you

I have almost the exact same setup. i7 920, HD 4870 1GB GDDR5, and 12GB of DDR3. I say with a fair amount of certainty that it's not possible to render off of this GPU. According to Blenders documentation GPU computing for AMD/ATI is only supported on the GCN architecture. In the video when he enables GPU compute, his GPU is listed as Pitcairn.

Pitcairn is a 28nm GCN1 chip from 2012, where as the HD 4870 is a 55nm chip from 2008. Not that fab size matters, but it just goes to show how old each series is. In case you were wondering, the HD 4870 is on the TeraScale1 microarchitecture. GCN only started with the 7000 series. Essentially all discrete desktop AMD/ATI GPU's 77xx and up will work. Anything lower, like the 4870 just won't. Don't believe me? Try searching for results on Blenchmark. For those wondering about desktop Nvidia cards it's a bit more convoluted, but here's a list.

NVIDIA TITAN X, GTX 1080, GTX 1070, GTX 1060, GTX 1050, GTX TITAN X, GTX TITAN Z, GTX TITAN Black, GTX TITAN, GTX 980 Ti, GTX 980, GTX 970, GTX 960, GTX 950, GTX 780 Ti, GTX 780, GTX 770, GTX 760, GTX 750 Ti, GTX 750, GTX 690, GTX 680, GTX 670, GTX 660 Ti, GTX 660, GTX 650 Ti BOOST, GTX 650 Ti, GTX 650, GTX 560 Ti, GTX 550 Ti, GTX 460, GTS 450, GTX 590, GTX 580, GTX 570, GTX 480, GTX 470, GTX 465, GT 740, GT 730, GT 730 DDR3,128bit, GT 720, GT 705, GT 640 (GDDR5), GT 640 (GDDR3), GT 630, GT 620, GT 610, GT 520, GT 440, GT 430.

*The GT 545, GTX 645, GTX 745, and GT 710 all appear to work despite not being listed on Nvidia's site. You can also find my source plus supported mobile GPU's in the link below.

http://blenchmark.com/gpu-benchmarks
https://developer.nvidia.com/cuda-gpus

Note: Going back to the original question, just for some context, the Radeon HD 4000 series was competing against the GeForce 200 series which also doesn't support GPU rendering. It was two years before the release of the GeForce 400 series, the first to support GPU rendering. The card is just to old.


My cpu overheats when rendering Rendering seems to have a high toll on my computer. I render with my gpu but it is my cpu that overheats. I guess the cpu is conected someway even though i dont know in what way.
So i wonder if there is a way to limit how many cores is being used when blender renders? Is there something else i can do, the more i can do the more potential to reduce the temperature there is.

I havent tried anything because i dont know what to try!

There is an addon known as auto tile size which comes with blender you just have to enable it in blender user preferences you can limit how many cores are used for rendering and it also offers advance sizing options.
If still this doesn't works you may reduce voltage given to your cpu and limit its rpm speed in your computer's bios


How do I link multiple meshes to one armature and apply Inverse Kinematics without distorting mesh? I’m trying to to rig and animate a set of meshes that are 3d scans of a horse’s leg bones. Each bone is a separate mesh. I only need the bones to rotate on one axis (y-axis in the screenshot) and move up and down along Z-axis.
The screenshot shows the 4 main positions I am attempting to achieve. I followed the Blender 2.8 fundamentals tutorials and attempted to achieve these positions following the basic IK elbow rig, but to avail. I think I’m having trouble with the fact that my objects are all separate meshes and I’m not sure who to parent to what, and which bone to reference when setting up the Inverse kinematics (or maybe this isn’t the way to do it?)
So far the closest I got was parenting all of the meshes to the uppermost leg bone mesh, then created the armature by extruding each armature bone from the last, and parenting the armature to the meshes. I duplicated and disconnected the lowest leg bone as if it were the hand, but had no luck being able to rotate the boney column with it.
The other issue I encountered was that I can’t seem to keep the mesh from distorting, when really all it needs to do is pivot at the articulations as the actual leg would. I first tried automatic weights and then found the closest I could get to no distortion was to fully weight paint each bone, but there is still some mesh distortion, and I wasn’t able to create the full range of motion I was hoping for.
If anyone has any suggestions your help would be greatly appreciated.

Alright, so what you want to do is first make a bone rig that follows the mesh. You then want to parent each bone to the mesh, using empty weights. If you move the armatures now, nothing happens. There are empty weight paints that are parented to each armature.
Now, you want to select the armature, go into the Object Data properties tab, go into viewport display, and select names. This will show the name of each of your bones. Then, select the horse bone, and figure out which armature bone should move it. Since you have "Show names" enabled, you  should be able to see the name of the armature. THen, with the horse bone selected, go into edit mode, and press "A" to grab all vertices. Go into the object data properties with your horse bone selected, and under vertex groups you should see the name of the armature one that you what it to be parented to. Select the vertex group, (while in the horse bone's edit mode) and click assign. now if you move the armature, it should move that horse bone.


How can I set the maximum draw type for multiple objects? I'm currently working on a scene containing 1000+ objects which all need to be set to a different draw type to save on computationally expenses in the viewport. But doing this for every object separately is really tedious.
Therefor I'm wondering if there's a way to change the maximum draw type of multiple objects simultaneously. Preferably only the selected objects.

Just right click on the "maximum draw type" list and choose the "copy to selected" option:

Note: this function is available in many contexts (not all).

Additional information:

As said Duarte Farrajota Ramos in the comments, you can use the Alt key whilst clicking on/choosing the wanted 'maximum draw type'. And that will apply it to all selected objects without using the menu indicated above.

But this Alt key won't work here if you have the 'Emulate 3 Buttons Mouse' in the user preferences (which allows to use the alt key to replace the middle button features, if you are using a track pad for instance).


'bpy_prop_collection' object has no attribute 'link'? I'm using Blender 2.8+ and I found a web page containing a nice python script to generate a labyrinth. I copied the script in Blenders text editor and an error occurred at line 88:

bpy.context.scene.objects.link (object)

  AttributeError: 'bpy_prop_collection' object has no attribute 'link'
  Error: Python script failed, check the message in the system console

Unfortunately, I have no idea what a 'bpy_prop_collection' is and I don't know where to start fixing this issue. What I need to do in order to make the script work for Blender 2.8x?

If you are interested: As of Blender 2.8x SceneObjects.link(object) is gone due to the new collection system. You can use CollectionObjects.link(my_object) instead so you just need to replace a single line to "update the script" for Blender 2.8x:

- bpy.context.scene.objects.link(object)
+ bpy.context.collection.objects.link(object)

Blender 2.80: Python API Changes

blender labyrinth generator 2.8x:

from random import shuffle
from array import *
import bpy

N=1
S=2
E=4
W=8

odir = {}
odir[N] = S
odir[S] = N
odir[W] = E
odir[E] = W

WIDTH=40
HEIGHT=40

coords = []
faces = []

d = [[0 for col in range(WIDTH)] for row in range(HEIGHT)]

for i in range(0,WIDTH):
    for j in range(0, HEIGHT):
        d[i][j] = 0

def carve( x, y ):
    dirs = [N,S,W,E]
    shuffle(dirs)

    for i in dirs:
        print(i)
        nx = x
        if i == E:
            nx =  nx + 1
        if i == W:
            nx = nx - 1
        ny = y
        if i == S:
            ny = ny +1
        if i == N:
            ny = ny - 1
        if nx >= 0 and nx < WIDTH and ny >=0 and ny < HEIGHT and d[nx][ny] == 0:
                d[x][y] = d[x][y] | i
                d[nx][ny] = d[nx][ny]  | odir[i]
                carve(nx, ny)

carve(0,0)

idx=0
step = 0.1

for x in range(0,WIDTH):
    for y in range( 0, HEIGHT ):
        if ( d[x][y] & N ) == 0:
            coords.append((x * step , y * step, 0 ))
            coords.append(((x+1) * step, y * step, 0 ))
            coords.append(((x+1) * step, y * step, step ))
            coords.append((x * step, y * step, step ))
            faces.append(( idx, idx+1, idx+2, idx+3))
            idx+=4
        if ( d[x][y] & S ) == 0:
            coords.append((x * step , (y+1) * step, 0 ))
            coords.append(((x+1) * step, (y+1) * step, 0 ))
            coords.append(((x+1) * step, (y+1) * step, step ))
            coords.append((x * step, (y+1) * step, step ))
            faces.append(( idx, idx+1, idx+2, idx+3))
            idx+=4
        if ( d[x][y] & E ) == 0:
            coords.append(((x+1) * step, y * step, 0 ))
            coords.append(((x+1) * step, (y+1) * step, 0 ))
            coords.append(((x+1) * step, (y+1) * step, step ))
            coords.append(((x+1) * step, y * step, step ))
            faces.append(( idx, idx+1, idx+2, idx+3))
            idx+=4
        if ( d[x][y] & W ) == 0:
            coords.append((x * step, y * step, 0 ))
            coords.append((x * step, (y+1) * step, 0 ))
            coords.append((x * step, (y+1) * step, step ))
            coords.append((x * step, y * step, step ))
            faces.append(( idx, idx+1, idx+2, idx+3))
            idx+=4

mesh = bpy.data.meshes.new(name="MyMesh")

object = bpy.data.objects.new( 'MESH', mesh )
bpy.context.scene.objects.link( object )

mesh.from_pydata( coords, [], faces )
mesh.update( calc_edges=True )


Rounded shapes with hard surface modeling (lubricant bottle) Working in Blender 2.82a and I’m working on my hard surface modeling skills.I keep getting stuck. One of the things I find most difficult, and cannot find many answers too, is how to create something like swirls or rounded indents (don’t really know how else to describe it).

To illustrate what I mean, here is the image of the motor oil packaging I'm trying to recreate. The swirl with the dots is what I have the msot issues with. This is something you also see a lot on laundry detergent packaging or bleach packaging::

To illustrate what I have started to do is this:
1.  Create a cube roughly the shape I need.
2.  Add edge loop, remove half of model, add mirror modifier
3.  Add in subdivision surface modifier
4.  Create supporting edge loops to keep a rounded square appearance
5.  And I thought creating the swirls would not be so difficult. I’ve tried to move the vertices to get a more rounded shape, but I failed. To be more precise, I went around every view and tried to model it exactly how it looks from every view, but I get stuck at making it look more rounded. I thought that maybe something like sculpting would help, but the edges are either not crisp enough, or I can’t get the shape I want. It almost seems so simple that I cannot find anyone talking about this specifically.

Here is were I got to:

As an example something like this would be my goal. Different shape but the same types of swirls and indents I'm looking for:

How do you handle a model like this? I've tried to figure this out for a long time, but I really need someone to at least point me in the right direction. Any help is appreciated!

Here are 2 methods.

You can use the picture of your object as a blueprint and draw its profile on a flat plane, then make some extrusions, bevels to round the edges, etc...

Or you can use a method like yours, directly beginning with a 3D cube, then edge loops and extrude, but you have to keep in mind that you need to go from the general shape to the details, don't begin with details like bevels unless the general shape is good.


Adding Date via Python from csv - works fine in Viewport but can't be rendered - what's wrong? I try to add the Date from a .csv file as text in Blender 2.91 via Python.
It creates for each row a new Text and works fine in Viewport (one date per frame) but when I try to render this code as animation Blender crashes, if rendered as image it shows all Dates layered on each other:
import csv
import bpy

def render_stock(csv_path, start, start_frame):
    with open(csv_path) as stock_csv:
        stock_ob = csv.reader(stock_csv.read().splitlines())

    stock_header = []
    stock_data = []

    for v in stock_ob:
        if not stock_header:
            stock_header = v
        else:
            v = [(float(v[0])),
                 (float(v[1])),
                 (float(v[2])),
                 float(v[3]),
                 str(v[4]),
                 str(v[5])]
            stock_data.append(v)
            scale_factor = 0.3

    frames = start_frame
    objs = []

    for counter in range(len(stock_data)):

        v = stock_data[counter]

        bpy.ops.object.text_add(location =(9,15,0.5), rotation =(1.7,0,-1.9))
        bpy.context.object.data.body = (v[5])

    def ani_handler(render):
        name = 'Text'
        objs = [obj for obj in render.objects.values() if name in obj.name]

        for i, obj in enumerate(objs):
            obj.hide_set(i != ((render.frame_current-1) % len(objs)))
    bpy.app.handlers.frame_change_pre.append(ani_handler)

render_stock('/"filepath to" .csv', (0, 0, 0), 0)

Thanks to batFINGER, the new code from this link:
blender.stackexchange.com/a/161107/15543
gives a workaround.
First step: Inserting the Dates from the csv file into a new text file named "text".(by hand)
Second step: Putting the text_add line from above behind the csv loop with the text_body_handler as linked here. (run code and enjoy the Date in the rendering)
:)


How to merge vertices of a ripped model? After I spent like 2 hours rigging a model with riggify I've realized the model I've ripped the other day has the articulations unmerged (shoulders, knees, etc), after moving one arm.

Is it possible to merge all the holes without going arm by arm, knee by knee, and making sure all is properly merge?

Ok, I solved using "remove doubles".
Thanks anyway.


3D Medical implant designing and Printing - Perfect Adaptation to Surface with Complex Geometry I want to make a patient specific implant for 3D Printing. I have the stl model of the patients mandible and i have designed the basic shape of the implant.

I need the Implant thickness to be 1 mm even thickness.

First and Second picture is the mandible from the CT data made from the 3D Slicer stl model.

Third Photo is the concept implant which needs to be 1 mm thickness.

Fourth photo is the implant adapted to the mandible. I need the inner surface of the implant to adapt perfectly for to the contours of the mandible surface and have 1 mm even thickness after adapting perfectly for 3D printing.

How do i make this implant inner surface adapt perfectly to the surface of the mandible. Then have 1 mm even thickness for 3D Printing. I tried boolean with difference but the thickness become uneven when i use it.

Edited.

the shrinkwarap does the trick. But i only want one part of the implant to adapt to the surface.

You need a shrinkwrap modifier on the plane, targeting the mandibule, then after that you use solidify modifier with 1mm thickness (turn on high quality normal too). Make sure your plane has plenty of geometry to shrinkwrap onto the mandible, do so by adding a subdivision modifier before the shrinkwrap if necessary.

If the shrinkwrap act weirdly try decimating the mandible a little bit with a decimate modifier since it's very high poly and might glitch the shrinkwrap.


Attach the grease pencil to the camera I want to be able to look through the camera and draw in the camera view. and have the grease pencil stay attached and oriented with the camera even if I adjust the position of the camera.

Setting Stroke Placement to View should do the job.

In Blender 2.8, you can find the option here:


How to mix multiple Enviroment texture (not in the compositing) If i want to join 2 different HDR called A & B. I want to create a new Enviroment whith 180° of "A" and other part of "B". I don't want to use the compositing because i need the real effects of the 2 enviroment.

There is a genius of nodes able to do this?

Thak you!

No need to be a genius. Just mix it with a mask:

As you can see you can use a radial gradient clamped at some value with a color ramp, but image texture masks would work as well.


Quick Exploding animation I've made an animation that explodes a box and reveals text that's inside it.
However, I can't make it explode from the left->right. For some reason it starts from the right hand side of the cube.
I've tried to google it but cant find it. Also tried to check the settings but cant find it.
Some help would be awesome!
EDIT 1:
Hi. 30Mb max limit on that page.
So i uploaded the blend file here
https://forumfiles.com/j942T5Hdoe/killlah_wood_blend

select the exploding box then press:
R, Z, 180 --> done!

R = rotation
Z = rotate on Z axis
180 = rotate 180 degree


How to calculate the angles between axis and bounding box normals? I would like to determine the torsion of an object bounding box in reference to the global coordinate system (such that for a axis aligned object all angles will be 0).

My idea was to create a bounding box object bb via bpy.ops.mesh.primitive_cube_add() and copy its parameters from the object obj:

centre = sum((Vector(b) for b in obj.bound_box), Vector())
bb.dimensions = obj.dimensions
bb.rotation_euler = obj.rotation_euler
bb.location = (centre[0], centre[1], centre[2])
bb.location = obj.matrix_world * bb.location

Than I tried to calculate the angles:

for poly in obj.data.polygons:
    # angle of bb normal against z axis
    angle = Vector((0,0,1)).angle(obj.matrix_world * poly.normal)
    print("%6i  %.3f°" % (poly.index, degrees(angle)))

But the values don't make any sense. I am not sure whether this is a good approach at all.

Any suggestion to solve this problem?

The orientation of an object is obj.rotation_euler or obj.rotation_quaternion (and whichever one does not match the object's rotation_mode can be invalid or inaccurate).

The orientation can also be recovered from obj.matrix_world.decompose()[1], but that's a little bit of overkill.

For a slightly deeper dive down the rabbit hole, check out Relationship between global vertex coordinates and mesh object's matrix attributes .


How to save unused data (materials, images, meshes... etc) It is my understanding that when materials for eg, are not attached to an object and you save the blend file - the materials are gone when you re-open the file?

How can you keep your materials - even when they are not attached to an object ?

Click the F icon:

This adds a fake user which acts like an object using the material, preventing it from being deleted.

See the reference manual page on the topic.


why are my cylinders stretched if i use this geometry setup i have this very simple geometry nodes setup:

result is:

my cylinders are stretched. I would have expected that the cylinder form is the same, but the just got bigger distances. Why is that?
blend file:

This is happening because you're doing the operation (in this case add on x-positions) after instancing the cylinder. So, you're modifying the x-position of each vertex of the instanced cylinder instead of the x-position of the points that you used for instancing.
Thus, you have to first modify the x-position points then use them for instancing of cylinders,


Modelling complex, planar faces (from imported DXF) How can I make a n-sided ( n > 4 ) irregular polygon in Blender?

Context: I import a SVG or DXF file of a paper template (dielines) into Blender. I'd like to make a 3-D 'folded' rendering of it (paper model). Neither SVG nor DXF gives me faces, so I have to make them myself. I try to manually select the vertices or edges, and then fill them. This works quite nicely, until the shape gets too complex (for example because of wholes in the geometry). In the following screenshot from a current project, you see the problem. I can only create a series of triangular faces,... but that is cumbersome. Cumbersome is a bad thing, isn't it? :) I would like to have one face for each 'aspect'/side of my paper model, not five. Is that possible?

This is question/problem I've been struggling with for quite some time. Fortunately, there are enough work arounds, but I'd like to know what the proper solution would be.

I tried dissolving the edges and 'tri to quads' but that didn't help. Neither did beauty-fill of grid-fill.

// Update:
-After posting, I saw this post, Cutting hole into a face with a line loop? that mentions 'dissolve limited',... that helps quite a bit already. And it seems that flipping normals is also needed, to keep them al facing the way.

After trying @Mr Zak 's responses (thanks), I feel I should summarize my findings in something more visible than a comment.

Blender should be able to create a polygon from vertices. If it doesn't, the geometry of the vertices is too complex, somehow. To overcome this, fill the shape with less complex planes (tri's, quads, maybe a pentagon) and combine them using "dissolve limited".

If 'dissolve limited' doesn't work, then check the normals of the faces. They should all point the same way. Flip them if needed and try again.

It also helped to remove the edges, while keeping the vertices.

See also Cutting hole into a face with a line loop?


We are unable to find animation of exported object as Collada (.dea) if animation is a modifier animation while using Blender 2.82 We exported an object with an animation as "dea" and imported in other application to use.
Object's animation was movement animation.
It worked great.

Then we changed animation type and made a modifier animation like surface subdivision.
It worked in Blender.
But when we exported the object exactly the same way with previous one.

There seems to be no animation in imported application.
In previous one we could find name of the animation Blender gave but at modifier animation
we even could not find the name of the animation.

There must be something we skip, I think.

This is because of the type you are exporting it. Collada(.dae) is used for exporting objects or meshes not armature action you should use the export type bvh motion capture, this allows you to export armature action with the object.