duplicate mesh along text? Is it possible to duplicate a mesh over text? e.g. in courier new I write Hello, and i want to cover that space in spheres (edit:arbitrary 3D object) without placing each object individually.

I've seen examples of using dupliframes along curves, but is it possible to do it along text?

Edit: I also found out I can convert the text to a curve, but it seems the duplication only follows the outline of the text. Can I do a "fill" with my object?

A group of particles. Note the outliner windows shows a group of two spheres.
Press keyboard t to show information panel.  To create a group you may select both spheres and press keyboard Control G. The information panel allows you to type in name.

In the forces you may want  to turn off gravity, gravity = 0.  You may also want to emit all particles quickly.  Start = 1. End = 2.

Single Object Particle

Convert the text to mesh and use particles. Note the vertices of the mesh in edit mode are highlighted. The particle object will be a sphere.


Using transforms when zoomed in? How can you use transforms like move when you are zoomed in too much to see the controls anymore? For example you are modeling an object that has the move controller on the bottom of the object but want to model some details on the very top of the object. If you zoom in to that area of the model you can't see the move controller anymore.

Are you talking about the 3D transformation "widget" or armature bones? Edit Mode? Object Mode? Assuming you mean the widget...

You may want to set the Pivot Point, which will control where the widget is displayed, along with the origin used for scaling and rotation. In EDIT mode (where most detailed modeling is done), if set to anything other than "3D Cursor", it should appear at the selected vertex. In OBJECT or EDIT mode, you could set it to "3D Cursor" and move it around by placing the cursor. (Of course this is of limited use when rotating or scaling)

But, the best solution is to not use the transformation widget at all. Blender was made with the idea of one hand on the keyboard, and one on the mouse. To perform transformations, just use keyboard shortcuts G to Grab (Translate), R to Rotate (and R again for Trackball style rotation), and S to Scale. You can also use the keyboard to constrain to a single axis with X, Y, Z, or the middle mouse button. Use Shift when selecting an axis to lock that axis and use the other two.


2.81: Where is the "Preferences option allows using the File Browser in full-screen layout."? I cannot seem to find this option.

Where is the "Preferences option allows using the File Browser in full-screen layout."?

Thank you.

It's in the Preferences, first tab.

Preferences->Interface->Temporary windows

And don't forget to save the preferences :).


Object lost in the space of 3d enviroment I had problems with the zoom, maybe because the scale of the object. I zoomed in and disapear, then out and i lost it, I tried to press the Numpad, but nothing

Select the lost object  in the outliner, move the cursor to the 3D viewport and press Numpad . (numpad period). To zoom the view to the selected object.


Freestyle Line Style noise modifier not working Solved. I recently started learning Blender and I was playing with the Freestyle option with Suzanne. I would like to achieve a "hand-drawn" effect, so I added a 2D offset type modifier to Freestyle Line Style and a noise modifier to each of its parameters. The idea is that the lines should change a little over time. The problem is that the parameters are not affected by the noise and I cannot find the error. The rendered images are always the same, am i forgetting something?

My file: https://drive.google.com/file/d/1bS_uk2HDjP6GwhqvwVlYHEG8E4wmzQq1/view?usp=sharing

Well, I found the solution. If anyone encounters the same problem, try installing Blender v. 2.82. I was using 2.81a, it seems it was a bug.


How to link the output of a Vector Math node to another node? I try to build a operator for some specific shaders by using Python but got stuck on how to make a node connection between ColorRamp (input) and Vector Math (output):

When I try to use shadername.links.new(VectorMath.outputs[0], ColorRamp.inputs[0]) both nodes are disconnected and I am not sure why:

Some coding excerpt:
 #colorRamp
    ramp = mat_ruby.node_tree.nodes.new("ShaderNodeValToRGB")
    ramp.location = (-800,100)

    ramp.color_ramp.elements[0].position=0.102
    ramp.color_ramp.elements[0].color = (0.215861,0,0.017642,1)

    ramp.color_ramp.elements.new(0.636)
    ramp.color_ramp.elements[1].color = (0.396755,0,0.032,1)

    ramp.color_ramp.elements.new (0.794)
    ramp.color_ramp.elements[2].color = (0.701102,0.147,0.016,1)

    ramp.color_ramp.elements.new(0.893)
    ramp.color_ramp.elements[3].color = (1.0,0.292,0.0,1)

    ramp.color_ramp.elements[4].position = 1
    ramp.color_ramp.elements[4].color = (1.0,1.0,1.0,1)

    mat_ruby.node_tree.links.new(ramp.outputs[0], glassA.inputs[0])

    math = mat_ruby.node_tree.nodes.new('ShaderNodeVectorMath')
    math.location = (-1000,100)
    math.operation = 'DOT_PRODUCT'
    mat_ruby.node_tree.links.new(math.outputs[0], ramp.inputs[0])

Q: How can I link the output of a Vector Math node to the input of eg. a Color Ramp?

The Vector Math node actually has 2 outputs : One of type Vector, and one of type float. They get hidden / shown depending on the node's operation.
The float type is accessed with the second index of the outputs. Change your last line to :
mat_ruby.node_tree.links.new(math.outputs[1], ramp.inputs[0])

Or (not advised since it is language-dependant)
mat_ruby.node_tree.links.new(math.outputs["Value"], ramp.inputs[0])


Armature: automatic weights not working correctly I've rigged a few models and automatic weights always worked pretty good, compared to what's happening to me now. Vertices assignment is all over the place and I don't know why. This happened only on 2.79 but it might be an accident. I know automatic-weights isn't perfect, but it used to work so much better in the past for me, way more accurately. Just asking whether maybe patch changed something, or did I mess some options?

Happend to my model as well, exactly as you described.
Weighting couldn't be solved on the model, so I removed entire head and then applied armature with automatic weighting. Weighting was solved as in the bottom image (some weight, though not visible, was all over model). Then I removed eyes, glued head back to the body and weighting was solved normally.
I had bones sticking out of mesh when got this wrong weighting.


How to change file output node's file subpath value in python I want to change the value of File Subpath of File Output node in Compositor from python. I'm able to change its basepath, but I'm unable to change the File Subpath. Is it possible to change this from python? If yes, how?

I found a solution here and it works
scene = bpy.context.scene
for node in scene.node_tree.nodes:
    if node.type == 'OUTPUT_FILE':
        node.file_slots[0].path = ''


How to get static particles centered on vertices? I am trying to get particles to render at the center of vertices in blender 2.81.
So far, I am trying to use the hair particles with the source emitting from vertices. It seems to work but I noticed quite a big gap between the supposed vertice and some particles as shown in the image.

I was wondering if there is a setting that I missed or if there is another way to achieve this.

Under the Properties Window > Particle Settings tab make sure your Particle Physics are off by changing from Newtonian to None, if you don't need them.

If are planning on animating them, or require physics try turning down the Initial Velocity parameter.

Also make sure you Particle Modifier is right after the base mesh, not after any other constructive modifiers.


Sequencer's OpenGL render crashes with Grease Pencil I am trying to render a sequence in the sequencer.

I want to add a scene strip and render an openGL animation (with the grease pencil), hence I have grease pencil strokes in the 3D view.

Pressing the sequencer openGL render button crashes Blender. (This doesn't happen when I remove all grease pencil items.)

Tested in 2.78c and 2.77.

(How) can I use the sequencer's openGL render with grease pencil animation?

(Bug or Feature-ish?)

I have found this bugtracker post, it mentions a similiar (?) bug was already resolved.

While the bug report you show has been resolved, it hasn't been included in a blender release. You will need a recent daily build (after nov 2016) or build your own from source to get that bug fix.

Note that the bug fix won't help, the solution to stop crashing was to disable grease pencil display in the VSE preview renders. I expect your solution will be to do an OpenGL render from the 3dview and then add the files to the VSE.


Edge split in Sverchok? You can have this effect by using Edge Split modifier, but can you achieve similar effect by using Sverchok?

Answer my own question:
Just found out that you can achieve that effect by using offset node in Sverchok.


Blender connected proportional edit in UV/Image editor not working I'm trying to proportionally edit some vertices using the connected mode in the UV/Image editor. According to the Blender manual on proportional editting, I should be able to edit vertices that are both close (in spatial coordinates) while simultaneously ignoring those that are far away topographically.

This is not what happens though. It seems as though it edits the vertices with normal proportional edit, ignoring the fact that some of the vertices are far away topographically.

Here's a picture

Is this the expected behavior for this tool or am I just doing it wrong?

Unfortunately proportional editing in the UV editor works differently to the 3Dview. In the 3Dview connected proportional editing will only move vertices that are directly attached to the selected vertices that you are moving. In the UV editor all points that are indirectly connected are influenced by proportional editing.

A possible solution is to select only the vertices you want to move (in the 3Dview), the unselected vertices will not be visible in the UV editor and will not be moved when you move the nearby points. Note that this can tear apart neighbouring faces at the edge of the selection.


How can I rotate particle instances on the X axis? So here's a throwaway scene with some particle systems:

And the thing is, I'd love to rotate those little 8-bit bushes. However, I am incapable of doing this under almost every circumstance. I have spent hours working through permutations trying this. I can't wait for particle nodes because I have to say, Blender's particle interface is hot crap on a plate.
I would love if any of you can help me. I'm not going to go into specifics and just offer up my BLEND because I'm basically exhausted by particle systems.
My Blend File
File/other notes:

I have found other similar threads in BSE, but none of the answers worked or were related directly to my problem.
There are separate particle systems for each 'foliage' item because rendering as collection also failed repeatedly every way I tried it.
All particle systems make use of the single weight paint texture for the DENSITY characteristic.

Thanks in advance.
Update on 10/5: Took a week off from this. Returned with no change to underlying issue. Per commenter below, I can create a different particle instance and rotate it, but I thought the point of particle instancing was that you could create controllable variations. That's why I'm doing this exercise.
Update on 10/14: I will let the community determine the appropriate answer. I gave up on this and am on yet another project where I cannot get foliage to populate on a plane. I can't believe how hard it is to get these systems working properly. I'm going to wait for Particle Nodes and until then, I'm going to get really good at manually instancing objects because it is far, far less time consuming compared to constantly failing at this in every subsequent project.

If you want to make the particles stand up and rotate on the Z axis, choose Orientation Axis > Global Z, as the object is probably not oriented the way you want on the surface, select the original object, go in Edit mode and rotate it correctly. Now play with the Rotation > Random Phase value.
Edit: Your question is not clear, either you want to vary the orientation axis, or you want to keep the same orientation but change the rotation values. For case #1, use the Randomize value, for case #2, use the Randomize Phase value:


Visualize some edges of a mesh with Blender (or MeshLab) Here's my problem :

I have a triangle mesh in .PLY file.
In this .PLY file I have a description for edges :

element edge N
property int vertex1
property int vertex2
property uchar red
property uchar green
property uchar blue

I want to observe the color of the edges. Actually, there will be just one color to tag some of the edges of the mesh.

Is it possible with Blender or MeshLab ?

Thanks.

Blender doesn't render mesh edges, it only renders faces. While you can display the mesh edges in the 3dview and see them when using an opengl render, they will be one colour for the object, normally black or orange when selected while grouped objects will be green when selected.

There are some ways to get around this, one is to use a wireframe modifier that turns the edges into a tube like mesh structure.

You can then apply the modifier and select parts of the mesh and assign different materials as explained before.

To get both outline and faces you simply need to duplicate the object and turn the duplicate into the wireframe tubing.

I don't know if the ply importer will maintain any edge colour information, but you may be able to adjust it to automate the process if you need to work with a complex mesh.


Problem overlapping two meshes for baking So I'm fairly new to blender trying to figure how to bake meshes.

I've been following this baking tutorial and the first step is to hit ALT + G with your two meshes selected to overlap them (1:50 in the video).

The problem is my blender refuses to do this correctly, if you watch the video his meshes seem to be overlapped perfectly, whereas I get this result (Image below).

What am I doing wrong? Is it suppose to look like this? I've been trying to find a solution for hours so any help would be appreciated. I've reset the 3D cursor to the center of the grid and the origin to geometry for both objects.

ALT+G clears location of any mesh. so it brings mesh to origin(0,0,0).
similarly Alt+s to clear scale and Alt+R to clear rotation.

The two meshes are different, resulting different center of masses (geometrical origins) one of the meshs center of mass may be higher, so even if you clear location i.e set to origin they are not quite over-lapping.

In order to correct it, select all bottom vertices of anvil ( easy in wire mode ) shft+s-> cursor to selection then tab out to object mode shift+alt+cltr+c change origin to 3d cursor. Do same for two meshes.

Then press Alt+G the should be overlapping. In fact Andrew specifically mentioned these in previous videos.


Blending modes in Blender In Photoshop and some other image editing programs, Blending modes allow you to composite images by creating various types of transparencies that adapt to other layers. The user can quickly cycle through different Blending Modes with a keyboard shortcut.

Here's an example of a composite image made with Blending Modes:

These are the different Blending Modes in Photoshop:

In Blender, transparency is usually done in the Cycles render engine, in the form of shaders applied to a material or an imported image. The Compositor can also be used, but usually applies to the whole image outputted (if I understand correctly).

However, I am trying to understand how this works better. Say I want to "fake" smoke with a 2D alpha layer, or use a Color Dodge blending mode for a mesh, how would I proceed?

I could only find this reference online, which seems obsolete and whose links are broken.

How would I try different Blending modes for 2D layers or meshes as can be done in Photoshop? How many different Blending Modes can be produced, and how?

(I understand the tools are very different, and I do know how Nodes and materials work pretty well.)

We can use this file for tests

Blend modes are implemented in the Color>"MixRGB" node, and are almost the same as in any layered 2D graphics software, like Photoshop or Gimp.

  Premise

  Such Nodes don't act in the 3D
  world, but either on the 2D space of a surface's material or on the
  (still 2D) space of the rendered canvas.

  In the 3D raytraced rendering, the color and intensity of each ray
  that hits the camera depends on its path through the scene's
  materials, that can be comprised of reflections, refraction,
  translucency, diffusion etc, in a way that is meant to be faithful to
  reality.

  In principle, you can't make two distinct objects "blend" their
  appearance in the 3D scene through 2D blending modes, i.e. by
  just arithmetically adding, subtracting,
  averaging the colors of different layers.  If
  you're looking for a way to fake this behavior, then my answer isn't
  the right one for you.

To create a textured material for Cycles whose (2D) texture is obtained by blending different layers, you can follow these steps.

Select your object and assign an UV map to it. I've done this by selecting it (in my example, half a cylinder) in edit mode and hitting U.

In the UV/Image editor window, open all the images that you will need as layers

Then create a new material and open the Node editor window.
Add new nodes by clicking "Add". You will need:

An "Input">"Texture Coordinate" node, and its "UV" socket to obtain information from the object's UV map
As many "Texture">"Image texture" nodes as your layers. Remember to connect their "Vector" input to the "UV" output from the Texture Coordinate node
Several "Color">"MixRGB" nodes to do the actual blending pairwise. They are displayed with different names in my screenshot, depending on the selected Blend mode.
Any "Shader" node (in this example, "Diffuse", that should be already present by default). This will take the Color output from the last MixRGB and its output will be plugged into the "Surface" socket of the Material.

Here's the complete node setup based on the example in your question

And here's the rendered result


Problem with knife project tool: the result is not smooth I use a circle to cut on a cube by knife project tool, but the result is not smooth as the circle, did i do wrong some thing, please help, i'm very new to blender.

Check camera position

Knife projection projects rays from the camera, trough the cutting geometry, till they reach the object to cut. The more your point of view is distant from the cutting geometry or your are not perpendicular to it, the less precise the operation can be.

Imagine that you have to redraw the cutting object on the plane by hand using, for example, the grease pencil. Would you be more accurate in tracing the contour by working close to the geometry or far away?

If you take the same cutting object and run the command far away and with the camera not perpendiculart to the cutting geometry (best fitting) plane:

While if we get close, we would get:


blender running so slow i can take a nap when clicking a menu I have a big problem. It's been happening for a long time and it's really urgent as this is payed work.

For some reason my project is running so slow I can't even click on the menus. I literally went to bed yesterday after clicking a menu just so it could load in the option to delete it.

I am like 4 days over the deadline and I need urgent help (tell me if you want the packed file, I'm uploading the normal one now, please tell me if you have the same problem as it might be my pc).

Oh  and yes i am working with really big particle systems but even with those completely deleted i get this performance. (for some reason the problems usually start after I have put in something really demanding so it might be that the demanding tasks are still doing the pc from behind even after I've deleted them)

thank you btw for any answers

Sounds like a memory shortage. Add more physical memory to your machine, reduce the complexity of your meshes and particle systems (when allowed) or pay for an outside cloud rendering service.

In any case, it may be more cost effective to just hard-reboot the machine instead of waiting for the File -> Quit menu to show.  I hate hard crashing my machine, but I'd likely get things rebooted, modified however needed, and running at normal render speed sooner than by shutting down properly.

But first, just in case - check if you're running some other apps at the same time that might be hoarding memory.  Email, web browsers loaded with pages with bad javascript, movie players, another instance of Blender.


How can I recreate this well-lit, vibrant, hi-contrast lighting setup? Above render by Peter Tarka
So, in this scene, the lighting is bright, vibrant and yet not over-exposed, and no details are lost. Every time I try something like this, my scene ends up becoming overexposed or washed out. How can I achieve this level of detail and clarity?
Here is a quick sample of my scene—

Use the concepts of three point lighting-
First is the Key light

It usually is quite bright light, facing the subject at certain angle (Basically to lit the subject from one angle)

Second is Fill light

To lite the subject from another side/Angle(To fill the Dark shadows created by the Key light).

Third Rim Light

A VERY Bright light from the back of the subject to create an outline of Brightness on the subject also it helps to highlight the shape of the Subject .

Now you have a basic 3 Point Light Setup.
Now you can use your Imagination and creativity to explore the lighting setup by changing the Intensity or Colors and the Size of the Lights also additionally, if you are trying to lit a subject/object and not a scene in particular; Then create a Backdrop or just a ground plane to have a nice bounced light on your subject. Also please consider the Size of your lights while lighting your scene as the Size of the light will affect the way the shadows are being cast and also it can change the look and mood of your subject or Scene."
Please, refer to this tutorial. This can be a good help for you for lighting in blender.


Exporting animated materials to Unity I'm using Blender 2.8.2 with the Evee renderer.  I have a simple object, with an animated material.  Is there a way to export the object for use in Unity with the animated material?
I've tried the GLTF exporter but it did not bring across the animated materials.

THe screen shot here shows the rendered material, the animation key frames and the nodes.

Reference: https://forum.unity.com/threads/can-blender-2-8-eevee-shaders-still-be-used-with-unity.645271/

Asking a Unity3D game developer about your question brought me to the conclusion that you can't actually export "animated materials" from Blender to Unity unless you recreate the shader IN Unity/ More info in the link i gave you.


Why in proximity the other character mesh is disappearing? Why in proximity or from some camera angles the other character mesh is disappearing?

I'm using GLSL.

The problem is probably NOT caused by clipping. I'm pretty sure the origin of the rig in this animation is from a certain key frame not inside the camera angle anymore. So the camera makes the mesh for the rig invisible because it concludes that the rig (or certain bones in the armature) can't be seen anyways from this point of view. Especially for walk animations, try to animate the rig as an object first (location) before creating the walk animation to make sure, that the origin is with your character every time.

If this didn't help or your project is too complex for this, you can also try to add a lattice modifier to the mesh. I'm pretty sure it will solve the problem :)


Reducing hard surface topology I have a blend file with really nice hard surface topology.

However, it's too detailleds. It's like a subdivision modifier was applied. I'm not sure if that is true.

I'm looking for an automatic way to reduce the dense topology while still keeping the "architecture" of the original topology (which I think is pretty good) intact. By "architecture" I mean that the geometry was started using primitives and not something like a 3D scan.

The goal is a low poly game model of around 2.000 triangles.

Here is what I imagine an automatic tool should do.
I would like to remove like every 3 of 4 vertices.

How could this be done?

Here is the blend file.

Edit: I have tried to apply the suggestion of Checker Deselect, but I think the geometry doesn't allow applying it the way it was suggested to me:

How could I select the "correct" geometry to apply the Checker Deselect?

Thank you very much.

You could use Checker Deselect and Dissolve Edges to get rid of this kind of pattern.

Select an Edge Ring. (Click Edge with Alt + Shift)
Choose Select > Checker Deselect
Set Parameters to Nth Selection = 2, Skip = 2, Offset = 0
Hit X for the Delete Menu and choose Dissolve Edges


Create a gradient dependant of distance to an object I have the following scenario in cycles:

I would like to know if it is possible to create a gradient on a plane like the one on the image above where the colours depend on the distance to an object (sphere in this case). In this case, the surface right below the ball would be the nearest one and hence would be of one colour. As we move away from the plane's center the colour should change accordingly to the distance to the sphere.
I would like to automatize the process so that blender takes the coordinates of the sphere and automatically draws a colour gradient on the plane's surface.
I have managed to create the gradient but I cannot make it dependant of the distance to an object.

Thanks in advance

You can do something like this with dynamic paint.  This solution does calculate proximity from the mesh, not just the center point.

The plane should be your dynamic paint canvas, the sphere (or whatever object(s)) the brush.  I suggest painting to vertices as that's easy to use in the material node setup.  On the brush object, set your paint source to "Proximity" and set a Paint Distance that gives you the gradient values you're looking for.

Then set up your material to translate the gradient into a color gradient input to a shader.  Here I've used the wetmap.


Hinge locked clockwise? Trying to setup some mechanics in Blender, I ran into a "challenge". I've used a hinge to setup at gear, so that it only rotates around it's z-axis - simple. But one of my gears should only be able to rotate clockwise. I can't find out how to lock a hinge rotation direction - Is it possible?

Trying to find another solution a tried to add a bar, hinged in one end, acting like a stop block. Now I would have loved this hinge to "auto close" (return to zero like loaded with a spring) But I can't find any info about this being possible either.

I've also tried to connect the bar and gear with a generic spring. This almost did the trick, but not 100% because the bar is to jumpy though bounciness is 0 on both elements. Besides hinge locking on the gear itself, seems like a far easier way then moddeling a one-way gear.

Does anyone have any suggestions? I have no experience with bone rigging, so I don't know if this would be a better way? Nor python, if this is the way to lock z-axis direction on a hinge..?

I believe you'd run a script at each frame that updates the Z-axis limit.
That way it can only go forward, 'cuz the limit will keep inching along with it's current rotation.

Something along the lines of this, but I'm not a pro at event handlers.
I got that bit of info from: How to make python script check some value every frame


A project without lighting? How can I render a scene in blender without any lighting? by that I mean I want to have textures, and if the texture is say #00FF00 green, then I want that to render exactly as #00FF00. No light or shadow or any such alteration of the texture color.

Is this possible?

(please excuse my use of hex codes to represent a color. I'm sure blender used something more involved to process colors)

Thanks.

If using Cycles Render, In Properties Panel, go to Render Layers tab, under Passes, under Diffuse, check Color, then render your scene, When render is done, in Compositor, link the Diffuse Color in the Render results node to the Output node, you'll get the diffuse only.

Edit: My apologies for the mistake, I mentioned earlier that you should check Diffuse Direct, I corrected the answer since Diffuse Color should be checked.


Bevelling a curve with object I've googled and also searched the answers here but couldn't find my problem so here goes:

I know how to bevel a curve using another object and when I try it with a normal circle it's fine. But I'm trying to use this flat oval shape to bevel a larger curve of the same shape and it's not following the curve at the correct rotation. I've tried everything, rotating the bevel object, clicking random options in the object data menu.. I can't seem to budge it from looking how it is in the screenshot. In the screenshot you can see the curve I've failed to bevel correctly and also the bevel object in the bottom right.

Basically, I want the flat part of the oval to be above and below the curve, not on the sides as it is. I hope that makes sense. Anyone know what I need to do?

If you want to change the rotation of the bevel, you need to rotate the bevel object in Edit mode.

Enter edit mode for the small oval that is the bevel object.
Select all the curve points and rotate by 90 degrees (I can't tell which axis from the screenshot).


Keep mesh strait with same scale when moving bones I need to keep the mesh from bending/scaling when I move the bones. What's the best way to do this? I tried the scale modifier for the bone, and that didn't help. I'm fairly new to blender. How do I do this?

EDIT:

This looks like issues with the weighting on the mesh, not any bone constraints, the bones are not changing scale in your images.

You can correct some of the minor bumpy issues by setting weights appropriately, this may require some experimentation to get the correct ones though. To fix this, set the armature modifier to affect the edit mode cage and go into edit mode on the mesh. Select one of the incorrect vertices and view the weights assigned to it in the 'n' panel (this will display the weights of the white, active, vertex). You can play around with these until you get it right. Whe you are satisfied, select the whole edge loop, with the vertex you modified as the active vertex, and use the copy weights on the 'n' panel to update all the weights in the edge loop. Repeat for each edge loop until it looks good. This is a slightly tedious way of doing weighting, but it guarantees accuracy.

The shrinkage at the bend though is a fairly fundamental artefact of the mathematics used to calculate how each vertex is affected by the armature (generally called Linear Blend Skinning). Checking the 'preserve volume' checkbox on the armature modifier tells it to use a different method to calculate this (called Dual Quaternion Skinning), which may give better results.

If there are still problems after trying these two options, look into corrective shape keys (dvd linked an example in the comments - 3.08m into https://www.youtube.com/watch?v=J7ezy20MU6g) or adding additional bones to correct the deformation (this usually requires some experimentation with constraints and weighting to get right).


How to alternate red/green color for a line chart based on segment direction? I am working on a project to create procedural line charts (e.g. share market charts):
https://drive.google.com/file/d/1WlDstmXDMZRSIO0d8xzP-R15kM1hdkp7/view?usp=sharing

Here's how I did it:

I took a plane and deleted three edges.
Next I subdivided the remaining edge 10-15 times to get some detail.
Then I used a displace modifier with a clouds texture.
Then I slapped on a skin modifier.
Now I can manipulate the chart by changing the strength of displace modifier and size, depth attributes of clouds texture.

Modifiers:

Texture:

Topology:

Problem: I want to shade the chart such that if the Y-axis value of a vertex is less than the vertex before it then the area between it and the vertex before appears red else it appears green(The color should also change if the chart changes). So that I get something like this:

Blend file: https://drive.google.com/file/d/16HB8sMU0jNejUW6g_YmPL77N9NuH3y76/view?usp=sharing

I've decided to use normals, as they are perpendicular to the direction of the line, so from them you can read the direction of the line:

Above red and blue vectors (arrows) mark the rising line, while cyan and violet vectors mark the falling line. Problem is, those are the normals of the faces that aren't actually visible by the camera - the camera only sees faces facing the camera, which all point in one direction:

Fortunately, by enabling Smooth Shading in Skin modifier, you can make those information bleed to the front and back faces:

Smooth shading is effectively faking more geometry - we could achieve a similar effect using Subdivision Surface modifier, so let's do that (and disable smooth shading for the time being):

In this case it should be apparent that the visible part of the shape no longer faces just one direction - because the geometry is smoothed. A single level of subdivision surface actually completely eliminates faces parallel to the camera.
Now, by separating XYZ, we can separately investigate Y:

From that we can see that the top half of the curve always has positive (approaching white) Y component of the normal, while the bottom half of the curve always has negative (clamped to black) component.
...And separately investigate X:

When the top part is rising, it has negative (black) X component, which gets positive (white) when it falls. For the bottom part it's the opposite. Our logic can therefore be:
If Y > 0: [top]

if X < 0: green [rising]
if X > 0: red [falling]

If Y < 0: [bottom]

if X < 0: red [falling]
if X > 0: green [rising]

Or in the nodes language:


Blender 2.8 render wireframe select specific edges I would like to render a plank with a notch, as shown below, in wire-frame mode.

It should only show the outer edges, means I would like to not show the edges highlighted with the white arrows.

Is there such an option?

Also, related, why are some edges thicker than others?

To hide the edges between faces that lay on the same plane, use a Decimate modifier above your Wireframe modifier.

Set it to Planar mode, and adjust the angle limit if needed.

The inconsistent line thickness is caused by the original mesh having been scaled up in the three dimensions with different scale factors. The mesh "remembers" these factors and applies them to the modifier results, making the wireframe stretched weirdly. To fix the problem, you must make the mesh "forget" that it has been stretched, and make the new scale permanent ("Apply" the transformation). To do so:

select the object
do Ctrl+A > Scale.


Animation not exported to COLLADA I have a model consisting of 4 meshes: 'base' and 3 'electron'.
electrons are quads with a transparent electron texture. Both 3, have an animation of quad rotation.
When I export to COLLADA, object exported, but without animation.

PS: I guess Blender export to COLLADA is crippled. Is there any other tool which loads .blend and exports .dae, with better COLLADA support?

Blender's collada export is indeed in a delicate state to say the least. I am not sure about exporting animations as collada, but I can say for sure that nothing in this world besides Blender can open .blend files. They are basically brain dumps. Trying another format could be your best strategy.


Python: process mesh so that longest edge length < x I need to process a mesh so that all of the edges are below a certain threshold, say x units.

(I am throwing a mesh into an acoustic simulator, which requires the longest edge length to be < 1/3 of the maximum wavelength)

How can accomplish this with a Python script?

Example subdividing the default cube.

import bpy
import bmesh

threshold = 0.1
obj = bpy.data.objects['Cube']
bm = bmesh.from_edit_mesh(obj.data)

#do ... while
while True:
    edges = [e for e in bm.edges if e.calc_length() > threshold]
    if not edges:
        break
    bmesh.ops.subdivide_edges(
        bm,
        edges=edges,
        cuts=1
        #use_single_edge=True,
        #use_grid_fill=True
        )
    #triangulate
    bmesh.ops.triangulate(bm, faces=bm.faces, use_beauty=True)

bmesh.update_edit_mesh(obj.data)


How can I view the camera through an object as a material in Cycles? Kind of like a TV, CCTV, or the portal for Portal and Portal 2, so I can see what the camera is seeing on an object. I don't care whether its a material or a modifier, or something like that, even if someone will make a script that is a node or whatever as long as it works, nothing specific as in how I would go about it.

I think you have two options: one in "real time" and another two-stepped.

The two steps workflow

This is the simplest one. You have your scene with two cameras and a screen in which we are going to see the view of one of the cameras.

The first step is rendering the view of the CCTV camera so you have an image sequence of what camera is seeing. For this, select the camera Ctrl Numpad 0 to make it the scene's active camera. Then render the scene.

Note that this render might have the same aspect ratio than your screen object.

After the render, simply add the image sequence as a texture on your screen material. Make the other camera the active one and render.

The "real time" workflow

With this workflow, which involves the compositor, you'll be able to see the real view of the CCTV camera in one F12 push.

Having your scene with the two cameras and the screen, these are the steps. (Also I've provided an example .blend below)

As a scene can only have one active camera in any given frame, we need another scene for rendering the CCTV camera. So create a new scene with Linked Object Data. Doing so, if you change datablock related stuff in any scene, it changes in both. But not transformations so I recommend waiting until the end to start this workflow.

In this new scene (lets call it CCTV scene) select your CCTV camera and make it the active one by Ctrl Numpad 0 it.
If necessary, change that scene's render dimensions to match the screen's aspect ratio.
In the main scene select the screen object and move it to another layer alone. Press M and hold Shift when you select the new layer so you can have it in both layers. Doing this you'll have your main render as expected.
Now go to the Render Layers tab add a new layer, name it "Screen". Enable only the layer where the screen object is and, in the Passes panel, enable the UV pass.

Now lets go to the Compositor.
Add the three render layers: the main one and the Screen one from the main scene and the main render layer from the CCTV scene.
Connect the CCTV node image output into the image input of a Map UV node. Then connect the UV output from the Screen render layer to the UV input of the Map UV node.
Now Add the output of that Map UV node to the main render layer.

And here is the example file:


How to put similar named objects into collection in python? I wrote a script that can detect similar objects based on the selected objects but can't put them in a collection named after selected objects.
It's not working.

import bpy

selected_objects = bpy.context.selected_objects

for selected_object in selected_objects:
    name = selected_object.name
    collections = bpy.data.collections.new(name)
    bpy.context.scene.collection.children.link(collections)
    bpy.ops.object.select_pattern(pattern=f"*{name}*")
    objs = bpy.context.selected_objects
    coll = bpy.data.collections[name]

    for obj in objs:
        cols = obj.users_collection
        coll.objects.link(obj)
        for col in cols:
        col.objects.unlink(obj)

I want from:

To:

I would do the same in python that I could do in the UI, which is to use Select Pattern, and then move these selected items to a Collection.
In python:
bpy.ops.object.select_all( action='DESELECT' ) # Deselect all objects
bpy.ops.object.select_pattern(pattern="Sphere*")

# if collection Sphere does not yet exist:
bpy.ops.object.move_to_collection( collection_index=0, is_new=True, new_collection_name='Sphere' ) # new collection
# else if collection Sphere does exist:
bpy.ops.object.move_to_collection( collection_index=2 ) # need collection index


adding effect strip using script I'm trying to construct a script to step through the active scene and:

1) find all the movie strips that the audio doesn't match the corresponding movie length

2) then add > effect strip > speed control to the movie strips that the, corresponding audio strip's frame length doesn't match.

3) not sure if this is possible, but would be nice to make the speed strip the same length of the audio strip. I think it would need to space out all the strips to give the script room to increase the movie strips length without bumping into the next strip along.

This is what I have so far, not sure why it doesn't work.

import bpy

for a in bpy.context.scene.sequence_editor.sequences:
    if a.type != 'SOUND':
        a.effect_strip_add(type='SPEED')

The type Sequences does not contain effect_strip_add , that's part of the sequences operators(bpy.ops). The correct way to add a strip(i.e. effect) is by using:

sequences.new_effect(name, type, channel, frame_start, frame_end=0, seq1=None, seq2=None, seq3=None)


Creating big number of arrary in blender I am trying to make visual comparison of money stacked upon each other in group of 100 notes(bills).

In screen shot, small stack on left is \$100 and on right it is \$1 million which i created through array modifier.

The problem is i have to make it till billions and already, my system is running out of memory.

Please suggest me a good technique for it (give bit details as i am newbie). Thanks

Create a single cube, scaled to the size you want to represent.  UV unwrap the cube. Add an image texture of the bill you want to use and set its scaling to match the number of bills you want across and along the surface.


Blades of grass didn't turn out what I wanted I was following a video on how to make your very own blades of grass and put it as a group then in the particles system.  I wanted this to be  that. I fallowed the steps but got this  I didnt miss anything. The only thing I did different was put it in a bigger plane that was subdivided! I dont get it!

Two problems i noticed was that there was very less number of grass blades and for some grass blades have problem with their rotation.

*Increase the number of particles inorder to increase the density of particle population. (you might already know this)

*If you have mentioned regarding the rotation of the grass, the problem might have caused due to the following factors.

1) Origin, Scale and Rotation of grass blade set incorrectly.

To demonstrate quickly, below image shows where the origin has to be if you consider the triangle is a grass blade (origin have to be at the very bottom of the model). Set the origin of every grass blades like this.

Also, apply the transformation to the object (all the grass blades used as particles). To do this press Ctrl+A in "Object Mode" and apply "Rotation" and "Scale". [Scale will be set to "1" and Rotation will be set to "0" by doing so]

2) Rotation in Particle settings set incorrectly.

Check this settings under the "Rotation"

(i) "Initial orientation" to be set correctly.

(ii) Randomization values of orientation and rotation shouldn't to be too high values.

Also, "Recalculate Normals" for the plane you are using as ground. This will set all faces in correct directions if there are any flipped faces. (You can do this by going into edit mode and select all faces and by pressing "Ctrl+N")


How is this icon called and how can it be used for an operator? How can the arrow icon that is displayed when calling the scaling operator be used for my own operator?

I know these to be 'relationship lines'. In this case it looks like blender is showing what origin your cursor is scaling around.


Curve not shrink-wrapping to some parts of mesh I have a path curve that I want to shrink-wrap to a backpack mesh. The curve does not wrap to the side of the mesh, and ends up looking like this.

When I scale the curve so that it will be longer, it looks like this:

The backpack has no modifiers, and the face orientations are all correct. Subdividing the backpack does not help. I've also tried different curves, like the bezier curve and nurbs curve, but I get the same results.
Why is this happening, and is there a way to fix this, or some workaround to the problem?
The settings for the shrink-wrap modifier looks like this:

And the settings on the curve are this:

Just increase the resolution (preview and render maybe, and keep the shrinkwrap to "project" as it is in your shared file):


How do I run a script on multiple .blend files from the command line? Problem: I have a bunch of .blend files that I want to make the same changes to as quickly as possible.

Solution: Run a python script on each file from the command line?

Here's the python script I'm currently using:

import bpy

#show all layers
bpy.context.scene.layers = ((True,)*20)

#delete the camera, sun and ground
for obj in bpy.data.objects:
    obj.select = False
    if obj.name == "sun":
        obj.select = True
    elif obj.name == "ground":
        obj.select = True
    elif obj.name == "camera":
        obj.select = True
    bpy.ops.object.delete(use_global = False)

#adjust object locations
for ob in bpy.data.objects:
    ob.location[0] = ob.location[0] / 10
    ob.location[1] = ob.location[1] / 10
    ob.location[2] = ob.location[2] / 10

#save the file and quit
bpy.ops.wm.save_mainfile()

And here's the .bat file:

cd C:\Program Files\Blender Foundation\Blender

blender -b "C:\[path]\file_01.blend" --python "C:\[path]\adjust.py"
blender -b "C:\[path]\file_02.blend" --python "C:\[path]\adjust.py"

The python script works inside Blender, but when I run the .bat file (in admin mode) it just closes. What am I doing wrong?

Bonus: Is there a way to simplify the .bat script so that it just runs on every .blend file in the folder without them being typed out?

There is nothing wrong with either script. The problem was the use of an ampersand (&) in the file path. Don't use special characters in your folder/file names. Newbie mistake on my part.


Adding multiple shape keys with python and bmesh while creating a mesh I'm using a python script to generate mesh geometry and to add multiple shape keys in Blender using bmesh. The goal is to have 10 shape keys and each generated vertex is modified by just one of those shape keys.

My first attempt was as follows:

import bpy
import bmesh

# Create mesh.
me = bpy.data.meshes.new('TestMesh')

# Create object.
ob = bpy.data.objects.new('TestObject',me)

# Bmesh.
bm = bmesh.new()

# Add default shape key.
ob.shape_key_add('Basis')

# List of shape keys to loop through after creation.
ShapeKeys = []

# Base name for shape keys.
KeyBaseStr = 'Shape'

# Create 20 vertices.
for iVert in range(1,21):

    # Index of shape key to add the vertex to.
    iGroup = (iVert-1) % 10

    # Check if group shape key has already been created.
    if len(ShapeKeys) < (iGroup + 1):

        # Name of new shape key.
        SetName = KeyBaseStr + '_Set_' + str(iVert)

        # Create shape key and append to list.
        ShapeKeys.append(bm.verts.layers.shape.new(SetName))

        # Shorthand for new key.
        sk = ShapeKeys[-1]

        print('created shape key #',len(ShapeKeys))
    else:
        # Select existing shape key.
        sk = ShapeKeys[iGroup]

        print('using existing shape key #',iGroup+1)

    # Add vertex.
    bv = bm.verts.new(tuple([iVert, 0, 1]))

    # Assign vertex coordinates in selected shape key.
    bv[sk] = tuple([0, iVert, 2])

# Bind bmesh to mesh.
bm.to_mesh(me)

# Link object to scene.
scene = bpy.context.scene
scene.objects.link(ob)

# Set as active and selected.
scene.objects.active = ob
ob.select = True

However, running the code results in an object with just one shape key rather than 10. All ten still appear to be created according to what gets printed and the ShapeKey list indeed seems to hold 10 BMLayerItem objects, but seem to not get binded to the mesh or the object. I also tried the same approach but created all of the shape keys layers before any vertices, but it made no difference.

The question is simple, how to add multiple shape keys while also generating geometry one vertex at a time, preferably using bmesh?

Also asked this question on BlenderArtists but received no answers so far:

https://blenderartists.org/t/problem-adding-multiple-shape-keys-with-bmesh/1122506

Alternative Route

Not using bmesh verts shape layers.
Created verts with a list comprehension, then reiterated over verts
using the vertex index to index which shapekey layer data.
Pre-made the 10 shapekeys.  Each key is a data layer on the verts that
holds the shapekey location.  The default if not set is the

Test script.

import bpy
import bmesh
from math import ceil
from bpy import context
N = 20 # total number of verts
g = 10 # verts per sk

scene = context.scene
me = bpy.data.meshes.new("Squircle")
obj = bpy.data.objects.new("Squircle", me)

bm = bmesh.new()
verts = [bm.verts.new((i, 0, 1)) for i in range(N)]
sk = obj.shape_key_add("Basis")
# make shapekeys
sks = [obj.shape_key_add("SK_%02d" % i) for i in range(g)]

bm.to_mesh(me)

for v in bm.verts:
    sks[v.index % g].data[v.index].co = (0, v.index, 2)
scene.objects.link(obj)


How to render an image through the text editor? Is it possible to render an image by calling the camera through a command with the text editor? I have a series of meshes that I want to upload into blender and take an picture one at a time. I want to upload the mesh, take a picture, delete the mesh and then upload the new mesh. I have my code to upload each mesh one at a time through a loop to create my mesh through faces and verts. I know the orientation and size that my meshes will be created. I have set up my lighting and camera angle that I want. I am using blender 2.82

Possible duplicate of: Rendering a cube as png file using Blender's Python API.
(I would put this in a comment if I had enough reputation.)

The above answer includes the following, with the assumption your camera is already set up (note that I have not tested the code):

  Set the render settings of the current scene, and render it. write_still is necessary if you want the result to be written to the filepath. There will be no visual feedback during the render process.

# render settings
scene = bpy.context.scene
scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = "F:/image.png"
bpy.ops.render.render(write_still = 1)


Modify shader via Angle of Shadow Simply put, I'm using two color ramps to add a texture X distance from the cartoon shadow and trying to subtract from the more horizontal parts of the shadow using True Normals as FAC, the result is fairly messy and I figure compositing might be a bit more controlled. This is in an attempt to mirror an art style, I need to be able to not use this noise texture at specific angles of the shadow and I really don't know how I'd be able to obtain this factor outside of normals, which have not worked particularly great so far.

Example:

Red = Texture, Black = Shadow - using 2.8 EEVEE

New Example: Trying to get sharper, more accurate results, rather than a blurry mess at some angles.

If you use the Shader to RGB node combined with Greater Than node. You can differentiate between light and shadow to create a cell-shading effect.

Simply add a texture to the original Diffuse BSDF, to texture the transition between light and shadow.

This is how the effect looks in motion.

You can sharpen or smoothen the shadows edge by decreasing the lamps energy, increasing its radius and lowering the threshold of the greather than node.


No active image found in material I think I'm following all steps to correctly bake multiple objects.
I'm trying to bake multiple objects (using procedural materials) into a single image.
I already got to do this with materials using image textures, but now I just want to use single colors for the objects.
Following all steps, when baking, I get: No active image found in material "Bege" (0) for object "Base" . However, all slots for the baked image are active. What's wrong?

Here a video with the steps: https://youtu.be/Ew1eclUXl6M

The problem of the "No active image found in material" error message was simply because the "Use Nodes" was unchecked in this material.

Checking it, solved the problem.


How can I align a model to three custom points with a Python script? I want to align the axis of a model to three points with a Python script.

How do I do this?

I pick three points that form a triangle with a right angle
like this:

I made point A the origin (0,0,0).
Then I think I should rotate the model around the point A
so that AB and AC are aligned to the axis, but I'm not sure how I can do this.
Should I get each vector's angle that separated x,y,z?
Or is there any option in Blender to use for this?

Create the matrix world

The rotation part of an objects world matrix is an orthogonal matrix where the columns represent the local axes.

To demonstrate, in test code below,  I have added a plane and removed one vertex to visualize the  three points A, B and C ensuring the angle between  BA and CA is 90 degrees.

Cube (orange wireframe) aligned to 3 vertex, 2 edge "plane" Vertex 0 for B, 1 for A and 2 for C

The vectors BA and CA, normalized,,  are used for the x and y axis directions.

The cross product of x and y is the z axis.  (The negated value would be the "flipped" option)

Finally build the matrix world from the 3 axis vectors, make it 4x4 and the translation A.

Test script. Move and rotate the "plane" then run script to align "Cube" such that its origin is at A, and the x and y axis align.

import bpy
from mathutils import Matrix
context = bpy.context

scene = context.scene
tri = scene.objects.get("Plane")
# global coords of 3 verts in plane.
b, a, c = [tri.matrix_world @ v.co for v in tri.data.vertices]

x = (b - a).normalized()
y = (c - a).normalized()
z = x.cross(y)

M = Matrix([x, y, z]).transposed().to_4x4()
M.translation = a

# Cube is the test object

ob = scene.objects.get("Cube")
ob.matrix_world = M

Note I have used blender 2.8. Replace matrix - vector multiplication @ with * for prior versions.


How to align 3D viewport along two 3D points using python I'm trying to figure out how to align my 3D viewport to the line connecting two 3D points.
For example, say I want my 3D viewport to be oriented such that it looks directly along the line connecting (1, 2, 3) to (6, 5, 4). As an added constraint, say I wanted to position the viewpoint a distance of 10 from the point (1, 2, 3).
I know how to query the current view_location, view_matrix, view_distance, and view_rotation, but I am unfamiliar with how to transform it to be in the correct position and orientation.
C = bpy.context
viewports_3D = []
for area in C.screen.areas:
    if area.type == 'VIEW_3D':
        viewports_3D.append(area)
viewports_3D[0].spaces.active.region_3d.view_location
viewports_3D[0].spaces.active.region_3d.view_matrix
viewports_3D[0].spaces.active.region_3d.view_distance
viewports_3D[0].spaces.active.region_3d.view_rotation

Track to quaternion.
Can get the quaternion rotation of any vector using Vector.to_track_quat(track, up) and assign an axis to track and an axis for up.
Test script to make the largest 3d view in the area track from the scene camera to the active object.
import bpy

context = bpy.context
scene = context.scene
cam = scene.camera
ob = context.object

start = cam.matrix_world.translation
stop  = ob.matrix_world.translation

norm = start - stop
norm.normalize()

q = norm.to_track_quat()

viewports_3D = [
        a
        for a in context.screen.areas
        if a.type == 'VIEW_3D'
        ]

viewports_3D.sort(
        key=lambda vp: (vp.width * vp.height),
        )

# use max area vp
if viewports_3D:
    vp = viewports_3D.pop() # largest
    r3d = vp.spaces.active.region_3d
    r3d.view_rotation = q
    r3d.view_location = start #lookat this point
    r3d.view_distance = 0 # from this far away

Note above uses default for track to so vector is flipped, more concise would be
norm = stop - start #start - stop
norm.normalize()

q = norm.to_track_quat('-Z', 'Y')

This is equivalent of the result of adding a track to constraint on camera to object. Have used to test


How do I delete an accidental Loop Cut? I have accidentally inserted an edge loop using "Loop Cut".
To remove it, I click an Edge, then I choose Select Loops -> Edge Loops.
Then I press Del on the keyboard, then Delete Edges.
This removes something else.
What am I doing, and how could I delete just the accidental edge loop?`
Thank you!

Select the loop cut, press X , and select Dissolve Edges.


Texture not appearing while in object mode I am trying to apply a texture to to my model, but it isn't working and I don't know what I am doing wrong.

I UV Mapped the model and colored my texture to fit to the model. When I am in Texture Paint mode the model looks fine, but when I switch to Object Mode the model becomes white, and I can't figure out why...

Here is Texture Paint Mode:

Here is Object Mode:

Does anyone have any suggestions?

Textures aren't displayed in Solid view by default. You can either switch to a higher level shading view which displays textures, such as textured view (⎇ AltZ). Or you can enable Textured solid in 3D view > Properties region (N) > Shading:

Note that this doesn't affect the final render, only the viewport.

See the wiki for more information.


Point Light not working properly inside a glass cylinder? I am working on an antique lamp and want a point light inside it that should work as normal lamp bulbs work, spreading the light all around. However, i have used glass material for the lamp central part and tried the putting point light inside it and now it is not spreading around rather it makes a complete shadow of the glass.I am working in EVEE.

Adjust the alpha that is controlling the shadow.


How can I delete uv layers with python? I'm using this code the access the uv maps array:

import bpy

selection_ = bpy.context.selected_objects

for selected_ in selection_:
    selected_.data.uv_layers[0]

How can I delete certain channel?

I'v got tons of objects with extra uv map in channel 0.
Isn't there something like
 selected_.data.uv_layers[0].Remove()?...

I think this is what you mean, but data.uv_layers doesn't provide that functionality. uv_textures does. If you hover over the UVMap menu item in UV Maps it's a uv_texture.

import bpy

uv_textures = bpy.data.objects['Suzanne'].data.uv_textures
uv_textures.remove(uv_textures['UVMap'])
# uv_textures.remove(uv_textures['UVMap.001'])
# uv_textures.remove(uv_textures[0])   or by uv index

You might want something like this:

import bpy

selection = bpy.context.selected_objects

for obj in selection:
    uv_textures = obj.data.uv_textures
    uv_textures.remove(uv_textures[0])


Strange clipping with the mesh So I made this cushion but it has this weird clipping or shading on the cushion part.

Here it is without subdivision smoothness and also with it. Any ideas how I can begin fixing this?

This was after i went through and deleted any double faces individually. Not sure why remove doubles didnt catch them. Still doesnt look right.

This definitely looks like two meshes. May be a duplicate, hidden in Viewport, but visible while rendering? If you can't solve the issue, consider uploading your blend file.

Edit: After checking your file, it's clear that overlapping faces are the reason for your problems. Look at the screenshots, I raised some part of your mesh. You need to remodel your mesh, to avoid intersecting faces.


How do I make these facial tattoos without messing up the topology using nodes in cycles? I made the black tattoos on the model on the left by sliding vertices and coloring the faces. Of course this messed up the topology of the face (which I would like to animate). I've been trying to use texture painting to achieve the same look of the model on the left on the model on the right without sliding the vertices and messing up my topology. I can't figure out how to do this. I've come close, but I'm sure there is some concept concerning texture painting that I don't understand that keeps me from getting the result I want. How do I make these black tattoos without messing up the topology using nodes in cycles?

If you want to do this with Blender texture painting, use the stencil brush mode:

https://www.youtube.com/watch?v=gacSqM7kHGg

Stencil will allow you to "spray through" a 2D image to project it's patterns onto the mesh.

To back up to a more general sense, the way I'd approach this is to build the tattoos marks on a 2D sheet using your drawing/image editing tool of choice (Illustrator, GIMP, Photoshop, whatever). Then you can either use a projection tool (like Blender's stencil paint or the projection brush in Substance Painter) to spray the appropriate symbols into place. Symmetry can help you keep them even on each side. Alternately, you can lay the symbols into place in a 2D editor, but this requires a UV sheet free of distortion and with seams out of the way (such as the back of the head).

Doing this via a texture will also allow you to use a lower resolution face mesh, as you might find the one in your file tricky to weight paint and set up shape keys for.


Export scene for my own game engine I am working on my own game engine for Android with OpenGL and C++, now if I don't want to create an editor to save time and effort, I use blender to create all models so can I use blender as levels editor where I can append models and put them all, make instances, adjust lights then export them as level file like xml or json where every item has its name and matrix?
for example:

<scene id="level1">
    <mesh name="tree" matrix=" 1 0 2.03 ....."/>
    <mesh name="rock" matrix=" 5.231 0 2.03 ....."/>
    <mesh name="grass" count="50" matrix=" 1 0 2.03 .. all instances matrices... 10.22"/>
    <light position="1,50,3" color="..." intensity="2.0"/>
</scene>

I am not a python programmer so I can't do it by myself so if there is an addon or a script which can do something like that ?

After some researches and reading on Blender API I created that script and it worked perfect, so I created my own exporter :), so happy

import bpy

class ExportSceneToBoddooo(bpy.types.Operator):
"""Test exporter which just writes hello world"""
bl_idname = "export.scene_to_boddooo"
bl_label = "Export to Boddooo"

filepath = bpy.props.StringProperty(subtype="FILE_PATH")

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

def execute(self, context):
    file = open(self.filepath, 'w')

    file.write("<Level> \n")
    file.write("    <Meshes> \n")
    for ob in bpy.data.objects:
        locX=str(ob.location.x)
        locY=str(ob.location.y)
        locZ=str(ob.location.z)
        rotX=str(ob.rotation_quaternion.x)
        rotY=str(ob.rotation_quaternion.y)
        rotZ=str(ob.rotation_quaternion.z)
        rotW=str(ob.rotation_quaternion.z)
        sclX=str(ob.scale.x)
        sclY=str(ob.scale.y)
        sclZ=str(ob.scale.z)
        if ob.type=="MESH":
            file.write("        <" +ob.type + " name='" + ob.name + "' location='"+locX +" " + locY+" " + locZ+"' rotation='"+rotX +" " + rotY+" " + rotZ+" " + rotW+"' scale='"+sclX +" " + sclY+" " + sclZ+"'/>\n")
    file.write("    </Meshes> \n")
    file.write("    <Lamps> \n")
    for ob in bpy.data.lamps:
        clrX=str(ob.color.r)
        clrY=str(ob.color.g)
        clrZ=str(ob.color.b)
        energy=str(ob.energy)
        file.write("        <" +ob.type + " name='" + ob.name + "' location='"+locX +" " + locY+" " + locZ+"' rotation='"+rotX +" " + rotY+" " + rotZ+" " + rotW+"' color='"+clrX +" " + clrY+" " + clrZ+"' intensity='"+energy+"' />\n")
    file.write("    </Lamps> \n")
    file.write("</Level>")
    return {'FINISHED'}

def invoke(self, context, event):
    context.window_manager.fileselect_add(self)
    return {'RUNNING_MODAL'}

# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
    self.layout.operator_context = 'INVOKE_DEFAULT'
    self.layout.operator(ExportSceneToBoddooo.bl_idname, text="Boddooo Exporter")

# Register and add to the file selector
bpy.utils.register_class(ExportSceneToBoddooo)
bpy.types.INFO_MT_file_export.append(menu_func)

# test call
bpy.ops.export.some_data('INVOKE_DEFAULT')


Face loop select options. Selecting faces between two faces When I clicked Alt and select the face its select all the faces in the horizontal direction , which is not not what I required I want to select the faces in the vertical direction. Is there anyway to do it. In other software I can shift select two faces and the faces in between automatically gets selected.
How can it be done in Blender?

To choose the direction the loop select will go, you should be in face selection and alt select an edge in the direction you want the edge loop to go. If you want it to go vertical then alt select the top edge while in face selection.


Where can I find the Decimate modifier? I need to decimate a 3d-scanned image.  I am in Object Mode, but I do not see the Modifiers Panel.  The wiki says that F9 will display the Modifiers panel, but this does nothing in my Blender session.  I am running Blender 2.70 on Windows 7.
Thank you for your time.

You must have an object selected for the modifiers panel to be visible.

Once you have an object selected (yellow outline), it will be in Properties > Modifiers. Then click on Add modifier and select Decimate:


Material won't apply to mesh Can anyone tell me what I'm doing wrong here? I'm attaching the file. Why are my materials not assigning to the eye? I have one for the inner eye mesh called "eyeball" and one for the outer eye mesh called "outereye".

Also, when you open the file, you will see a logo on the character's body. I followed the tutorial, which told me to use an empty, but the result is supposed to be one logo on his chest. As you can see, the logo is repeating all over his body.

EDIT: Actually I see the logo in the center now when I render. Is it possible to see it in center without having to render?

https://drive.google.com/open?id=0B85i1BKJ9r96Z0NCM3RoNFVpZzQ

Thanks

The material is assigned to the faces of the eyes, but the coordinates for the texture are wrong.

Set them to UV...

The other eye is a mess too... it needs to be UV unwrapped.


Why does rigid body physics not work in objects created by an object instancer? (Animation nodes) Simple setup:

When I've played an animation, an instanced cube has stayed put:

First, you are setting their locations explicitly using the Transforms Output node, so the simulation obviously won't take effect. Second, objects need to be linked to the RigidBodyWorld collection, so you can use the following expression:

[collection.objects.link(obj) for obj in objects if obj.name not in collection.objects]

So, your node tree should be as follows:


Metallic multiply shading works in Eevee render but not Cycles? Ive got 2 different meshes for one armature, one for base textures, one to give some parts of that texture a metal shine using a mask to avoid the non metal bits. In Eevee this works fine as I can set the metal shader to blend mode multiply, but Cycles doesnt have the blend mode, how can I work around this to use Cycles?

I ended up splitting the shader into places that need metal and places that weren't metal using a texture as a mask, then combined them into the same mesh and used a mix node.


rotating edge loops individually on their own axis I would like to know how to rotate edge loops individually on their own axis. I tried doing this with pivot point as individual origins and rotating along normals X with normal as the transformation axis. Actually, I tried all combinations with all the axis, but none worked.

I need the selected edges rotated individually 45 degrees forward.

It's all about the setup.

model your flower and delete all the rest of the petals leaving one.
since there is 5 sides each petals need to rotate 72 degree.
Using array modifier with a rotated empty I reconstructed the flower.
Now I can modify one petal to make sure all the rest of the petals follow.

Here is the blend file I created ...

Select edit mode.
Select edge mode.
Make sure to select the edge you want to rotate from last (The Active Element)
Set pivot point to "Active Element"
Hit N to open navigation panel in 3d view.
Look for Transform Orientation tab.
Hit the "+" button to setup Transform Orientation to the face you want to rotate.
Remember to choose from the list of newly created Transform Orientation called "face" if there are more than one it should look like "face.001 or face.002"
Activate rotation and hit Y to rotate in the Y axis.


I can't make my material transparent in Blender 2.80 I can't seem to have my material turn transparent in blender 2.80. Heres some screenshots, is there something I'm missing?

This is how it looks in EEVEE:

Here is my node setup:

If you want to make the object transparent, their are 2 ways to do that:

Use transparent material (as you have already used), Add it to a mix shader whith the respective shader you want it to mix with and change the blend mode for the object to "Alpha blend".

Now, you use this method when you want to create an object with just transparency, that means without any reflection (that doesn't quite exists in real world). Every transparent material has refraction and if you want your material reflect like glass you can use the second method.

Using a glass shader. It won't directly reflect the changes right away, you need to enable "Screen space Refraction" for both the scene and the material you. Then you need to change the refractive index of the material to the one you wish for, or just keep it anything else than 0.

Scene settings to enable refraction


Blender 2.8 mesh zfighting a mesh thats not overlapping I have separate closed meshes that are on top of one another, however the one behind still seems to show through unless im really zoomed in, as if zfighting with a mesh thats supposed to be infront of it.
This is with xray turned off ofc. it looks like zfighting but the meshes arent overlapping.

This happens in solid view with outline on, in lookdev mode and in eevee render mode.
However in 2.79 this DOESN'T happen.

2.8 lookdev, default cube for size reference

2.79 solid with matcap, no issues in any of the modes

hard to see but the orange and yellow meshes are separate, the orange clearly has thickness while the yellow is a plane underneath it

The mesh under is a plane with the groove in the middle, and the meshes above are the closed pane like things that have thickness with the bottom touching the mesh underneath, the face orientation is as it should be.
But things are showing through.

2.8 Zoomed in with face orientation setting on

2.8 nothing changed just zoomed out

I kinda need the mesh in the front to sit or go through the mesh behind but ofc the problem persists no matter how i build it.

I'm using the release version of 2.8.
Again none of this happens in 2.79, object zfight only when they are overlapping in 2.79.
Help appreciated!

I checked my viewport camera and its front clipping was set to 0.001, this was causing the zfighting because any amount of distance from the camera would cause major floating point errors.
I feel dumb, but atleast i resolved my problem.


How to mix destructive and non-destructive modifiers to maintain vertex order for mesh-cache? Say I have an instanced model (duplicated with alt+D) and I add a meshcache modifier with a .mdd or .pc2 file loading a different version of the model. Will this break the instancing and cause it to count as a different model for memory usage in rendering?

How about different shapekeys on instanced models?

How about modifiers that actually change the number of verts, like boolean or solidify?

Duplicating mesh data won't change its vertex order, so to answer your first question - yes this is supported.

As for destructive modifiers (boolean, decimate, build... etc). These will change vertex count and order, not for the mesh-datablock, only within the modifier stack.
So destructive modifiers must be applied after Mesh-Cache modifier, for this to work as expected.


How to show a tracked video in 3D view? In the Movie Clip Editor I have tracked a video. Now when I go back to the 3D view, I can see that my camera is following the trackings, however, I can't see the video.

How can I display a tracked video in 3D View?

PS:
I'm new to Blender, so please forgive me if this question already has an answer and/or if I'm using the wrong terminology...

For the sake of completeness on this site, I am extending my comments to an answer.

To view the footage from the motion track in the camera, go into camera view Numpad 0, and then add a new background image. To do this go to the bottom of the properties panel, check background images, add a new one, and then set it to movie clip and select your clip.


How to get all collections of the current scene? I'd like to get all collections in the current scene and can't find a way to do that. I found bpy.data.collections to get all collections stored in the blend and C.scene.collection.children to return the first level of sub-collections. However, I can't find out which collection is linked to each scene. I wonder if there is a simple way like iterating through the objects in context C.scene.objects?

Q: How to get all collections of the current scene?

Recursively walk the tree.

Similarly to https://blender.stackexchange.com/a/137866/15543 and Sorting Collections Alphabetically in the Outliner

import bpy

def traverse_tree(t):
    yield t
    for child in t.children:
        yield from traverse_tree(child)

coll = bpy.context.scene.collection

for c in traverse_tree(coll):
    print(c.name)


Curved glass reflections in Glass material Why is Glass material displayed fine on one object, but material with exactly the same settings shows some kind of nonsense on another? For example, glass of car. The one shown above has transparent glass, while the one below is black & has curved glass reflections.
I tried to add Subsurf, tried changing Light path settings, turned off Auto smooth, tried different glass settings, but nothing helped.
And this happens often. Please tell me what it depends on & how to fix it?

The simulation of refraction depends on light rays being bent twice. Once on the way into the glass, via a front-facing surface, and once on the way out, through a back-facing surface. Your 'good' glass has thickness, so it works. Your 'bad' glass doesn't.
No thickness:

With a Solidify modifier: (No rim. 'Fill' unchecked, so as not to bother with normals interpolating over the rim walls)

If you want a rim on your glass, you will have to bevel it too, to sharpen the interpolation of normals from rim to surface.


Script to output vertex coordinates and triangles I was wondering if anyone could help me. I'm hoping to come up with a simple Python script that exports data from an object in a scene.

I've written a little 3d renderer for fun, and my project relies on me manually setting vertices and triangles in script to set up objects. It would be a lot easier if I could just copy and paste from the python console into my script.

So far I've come across this script:

import bpy

current_obj = bpy.context.active_object

print("="*40) # printing marker
for face in current_obj.data.polygons:
    verts_in_face = face.vertices[:]
    print("face index", face.index)
    print("normal", face.normal)
    for vert in verts_in_face:
        local_point = current_obj.data.vertices[vert].co
        world_point = current_obj.matrix_world * local_point
        print("vert", vert, " vert co", world_point)

However this outputs the vertices in no particular order, and in the format

face index 4
normal <Vector (0.0000, -1.0000, 0.0000)>
vert 8  vert co <Vector (0.0000, -0.0000, -3.0000)>

I'd really like to get it in a format like this:

vertices[0].SetVertex (-1.0, -1.0, -3.0); //vertex coordinates
vertices[1].SetVertex (1.0, -1.0, -3.0);
vertices[2].SetVertex (1.0, 1.0, -3.0);

and

mesh[0].SetTriangle (0, 3, 2); //vertex indices

It would make copy/pasting into my script a lot easier.

Is this possible? Can anyone help me? I've never used Python before and I don't know too much about Blender.

current_obj.data.vertices contains all the vertices of the object. You can read these before you loop over the faces. As you already got the vertex indices of the faces, all is left to do is using the desired format string for your output.

import bpy

current_obj = bpy.context.active_object
verts_local = [v.co for v in current_obj.data.vertices.values()]
verts_world = [current_obj.matrix_world * v_local for v_local in verts_local]

print("="*40) # printing marker

for i, vert in enumerate(verts_world):
    print("vertices[{i}].SetVertex ({v[0]}, {v[1]}, {v[2]});".format(i=i, v=vert))

for i, face in enumerate(current_obj.data.polygons):
    verts_indices = face.vertices[:]
    print("mesh[{i}].SetTriangle {v_i};".format(i=i, v_i=verts_indices))

This will generate output like below. But it does not check whether the faces are really triangles and will call for the creation of “triangles” with four or more vertices if your object does contain quads etc.

========================================
vertices[0].SetVertex (0.0, 1.0, -1.0);
vertices[1].SetVertex (0.8660253882408142, -0.5000000596046448, -1.0);
vertices[2].SetVertex (0.0, 0.0, 1.0);
vertices[3].SetVertex (-0.866025447845459, -0.49999991059303284, -1.0);
mesh[0].SetTriangle (0, 2, 1);
mesh[1].SetTriangle (1, 2, 3);
mesh[2].SetTriangle (3, 2, 0);
mesh[3].SetTriangle (0, 1, 3);

If you want to differentiate between triangles, quads and so on then you might want to differentiate the format string based on the length of the vertex list.

N.B.: In my version of Blender, by default the text in the systems console can't be copied. I copied the text above from a text file that was generated by writing the output to a file instead of printing it to the console. Another option could be to start blender from a terminal from which you can copy text.


Creating armatures in python I'm relly new to Blender, so I must be missing something basic here.
What I'm trying to do is import a model and its skeleton previously exported from 3DSMax in a custom format (json serialized).

I've got pretty far, but I'm getting some weird effects on the vertices weights (I guess...)

As you can see below, the models and its skeleton is built correctly. The bones are correctly set in the skeleton hierarchy. Also, the vertex groups and its modifiers looks right.

But when I rotate the upper arm some non weighted vertices move too.

The movement of the head and some other parts are perfect, however

Thanks

After reviewing the exporter and Max importer, I found out that the correct way is to reverse the bone tips in Blender when comming from Max.

new_bone.parent = parent
new_bone.tail = parent.head
new_bone.use_connect = False

Also, the model cited in the question is kinda broken, so...

Tested with other models and everything looks fine.

Thanks, lemon, for the input.


A Line distrupting in front of my Donut model I was making my Donut... and when i have done it's icing(the creamy layering of a Donut) a line is coming in btw..
I am not able to find a way to fix it in edit mode
It is looking like this:

As some people would have guessed that i have made it from the tutorial of blenderguru... so if any person already made it(through the tutorial or not)  please to help me to make me my blender project...

I've made the donut before! This problem was mentioned in the videos somewhere, either in the same episode or the follow up episode. It is caused by an extra accidental layer of icing when extruding the region by extruding twice, the layer is probably meshed with your icing, so at this point the only thing you can do is delete the icing, and make a new one :D.


How can faces be added to a manifold mesh without losing the manifold property? The space marked by the selected vertices should be solid, but when faces are added the mesh becomes non-manifold. The manifold property is important for printing.

The faces should be here:

and also at the outer edge ring.

Non-manifold geometry basically occurs when you have an edge that is part of more or less than exactly two faces. For the sake of 3D printing this is important because non-manifold geometry is geometry that isn't describing the outer shell of a physical object. And edge that is connected to more than two faces means that you have faces that are 'inside' your mesh, for example.

Basically, if you add that face there, you need to delete some of your older geometry that is becoming internal. I'm not 100% sure this is what you're trying to accomplish, but it should give you the basic idea:

Delete faces that would become 'inside' faces, then select the edge loops around the hole you've created, and fill them. It's possible that you will want to clear away one more faces. As I've done it above, you have a hex shaped indent both inside and outside the cylinder. The same technique works if you want a smooth cylinder on the inside.


Forcefield as collider with dynamic hair Having a separate collision object works, but with fast movement I still get a lot penetration through the mesh.

Apparently it can be done better with a forcefield but I cannot get it to work like this
https://www.youtube.com/watch?v=OeFZbp_UC0o

or this
https://www.youtube.com/watch?v=ASFD9s0j6Ng

I have my emitter mesh with the hair particles and a second mesh that I set as force field with the same settings as in Video 1, but the force field has no effect on the dynamic hair. What am I missing? Maybe a setting in the particles system itself?

Well it does work afterall when I increase the strength to a much higher value like 500 or more.

As you can see I got another issue then though with the distance, which I will ask in a new post.


Using the 2.8 Keyboard short cuts in Blender 2.79 I'm planning on teaching Blender later this year, and it's likely I'll be using Blender 2.79. However, to avoid future confusion among my students I'd prefer to have the 2.8 UI & keyboard shortcuts.

Is this possible and if so is there a Keyboard & UI set for Blender 2.79?

Not entirely no.

While most keys can be customized in Blender 2.79 it is theoretically possible to create a keymap that mimics most functionality available in 2.8, however not all features are possible.

Blender 2.8 has been substantially changed under the hood and significant improvements were made to accommodate lots of new features, not only superficially at tool and UI level, but also keyboard shortcut definitions and settings, key press handling, and even at low level like keyboard and input device handling.

New features like being able to detect where a mouse click happened (over an object or empty area), button press vs button hold, hold and drag actions, active tools that allow simultaneous viewport manipulation, gizmos with tweak drag actions, among others make it impossible to fully recreate 2.8 input model in previous versions.

Otherwise most basic settings like left click select can be emulated or fully recreated.

Whether or not this is practical or worth the effort is a whole other matter.


How to calculate the distance between two selected vertices? Now I have got a new problem. I want to measure the distance between 2 selected vertices but I do not know how to do that in Blender. Can you help me? Thanks a lot.

You could use MeasureIt addon that you can enable from User Preferences (ctrl+alt+u), Add-ons tab:

Or you could also use an inbuilt ruler that you can find in the Tool Shelf(t panel), Grease Pencil tab that you can snap to vertices holding ctrl while dragging:


Most efficient way to apply textures to a model (Game Dev) This is a Game-Dev related question.
Let's say we modeled a simple piece of floor in Blender and applied a wood texture to it. From this plain texture, often referred to the base texture, we usually create some other maps, like:

A bump/normal map.
A specular map.
A displacement map.
An ambient occlusion (AO) map.
And some more...

Finally, right before exporting this model, we usually bake all textures into a master texture (which is a single .jpg or .png file that contains all of the aforementioned textures combined). And voilà. We have a master texture and ready to be used in Unity (or Unreal Engine, or the game engine of your liking).
However, the more I dig into this designing/game-dev world, the more confused I get. This is so because Game Engines generally give you the possibility to attach all of the previously mentioned maps (normal, spec, displ, AO, ...) separately to the model. For example, in Unity 5, you can do that right into the shader:

So, I can come up with two ways of texturing a complex model (for example, a WWII tank):

1. First way of doing it: Baking all maps (normal, spec, displ, AO, ...) into a MASTER TEXTURE. Then using this master texture right inside of the Game Engine.
2. Second way of doing it: Importing all maps (normal, spec, displ, AO, ...) into the Game Engine. Then importing the model as well, and tell the shader what texture corresponds to what map (i.e. manually select all maps; see the first image).
All in all, what is the "most correct" way to apply texturing to a model inside of a game engine, out of the two I mentioned right above?
Thanks.

Those two workflows you describe are not alternatives to the same end.

Baking is generally used to achieve effects that are either too complex, too expensive or unnecessary to be calculated in real time.
However, downside is after baking they become static, that means they no longer vary or react to user input.

You can't really bake a 'Master Texture' of all that, if you do you will be losing information. If you bake the specularity, bump and reflections they will become static, as if painted onto the object and will no longer react to in-game light changes or different user view angle.

Baking is more often used in an earlier stage of game creation, when transforming a high resolution model into a low poly version ready for consumption that the game engine can deal with in real time.

In your case without further info, I'd say you should use all those textures directly in game, which seems like what they were created for in the first place.


displacement detail problem I'm trying to set up some greeble panels and I keep getting these undulating faces when I use a displacement map. I am using a pretty high res 6000x6000 PNG to generate the displacement but I can't figure out why the faces aren't smooth. The subdivision level should be high enough to accommodate the details (its on level 4 with 10,000 polys to start) but it doesn't for some reason. This happens when I use the node render based displacement through cycles as well as the evee method with using subd and displacement modifier. Here are some screen shots to demonstrate what I am talking about.

I have a few possibly helpful pointers:

Foremost, I have noticed that Blender doesn't always play nicely with .png files (especially with normals and displacements). Try a .tiff, or other type.
I had the same issue of 'undulating surfaces', surfaces that should be smooth, but appear bumpy for no apparent reason.
Second, I notice thin, horizontal rectangles in your second image. Check that your mesh geometry is composed of squares, not rectangles. Otherwise you'll experience issues when displacing or otherwise deforming the mesh.
Lastly, double check that your UV's are unwrapped properly, same reason as above. If the UV is stretched in one direction and not another, it will distort the effect. Not sure if this is the problem here but thought I'd suggest in case.

One more thing: you might want to try using adaptive subdivision in this case.
Andrew Price does a good job explaining what it does and how to use it in this video.

I hope one of these helps!


Compositing output image shading Is it possible to control the shading via a node in the compositor? I would like to generate two output images, one which has material shading and one without any shading - just the colors from the texture.

So far I only found how to control this option with the UI (of course) and with Python, but with these methods I have to render the image twice, which is somehow an overhead.

Cycles:
Shadeless image:
You can do this in cycles by enabling the Color passes in Renderlayers > Passes:

Then add them together in the compositor with Mix nodes:

Original image:

Post composite:

Shading only:
You can get only the shading of the render by dividing the full render and the color pass:

The reason the large cube appears as if it is still textured is that it has a Glass material, so that is the shading result. To prove this we can multiply it back with the color pass and we will get the full render again:

Blender internal:
You could get a "shadeless" pass in BI with the Color pass in Renderlayers > Passes:

Result:

Saving multiple images from the compositor:
You could then save the shadeless images in a separate directory with the File output node:

Note that the output connected to the composite output node will be saved to the path specified Render settings > Output. In the absence of a Composite  node, the raw render will be saved.
The above node setup the raw render is saved to the path in Render settings > Output (in this case /tmp/) and the shadeless image is saved to /tmp/shadeless/.


Change FCurve handles from Python I am currently trying to make an import script that generates an animation on a camera. The animation requires that the values for the left and right keyframe handles be set.

I couldn't find a way to set handle values explicitly, so I have tried to use bpy.ops.graph.select_border to select the keyframe handle that I want to set and then use bpy.ops.transform.translate to set it into place, however when I try to do this from my import operator, I get a RuntimeError saying context is incorrect

Does anyone know if the x and y handle values for an FCurve keyframe can be set from Python?

You will find it here:

action=bpy.data.actions['yourAction']
#or
action=bpy.data.objects['yourObject'].animation_data.action
#
action.fcurves[fcurve_index].keyframe_points[kf_index].left_handle
action.fcurves[fcurve_index].keyframe_points[kf_index].right_handle

You can easily explore blender's data structures with the outliner using the datablocks option and the interactive python console using autocompletion (Ctrl+Space).

If you hover over properties in the editor with python tooltips enabled it often will show you the path to the property.

Hint:

If the object has not been animated yet and thus animation_data is None, use the object's method animation_data_create to create it.

Afterwards assign an existing action to animation_data.action or create a new one:

action=bpy.data.actions.new('Your Name')

Note to the developers of blender:

In this case the path shown in the graph editor is abbreviated bpy.data.objects...left_handle and it is not possible to right click -> copy data path. So the hint shown is kind of useless.


Cannot select individual bones of armature appeneded from 2.80 into 2.79 for some strange reason I can't select bones in pose mode on an armature I've appended from 2.80 into 2.79. It looks like all of the bones are selected, however I can still rotate and move bones if selected in the outliner. Bones will not display as selected either.

The 'selectable' icons are all on, meaning I should be able to select any bone, however this is not the case. No bone will become selected if clicked on in the 3D viewport only if manually selected in the outliner. This is a huge pain and I cannot seem to find a tool to make the skeleton normal again.

Any ideas?

I think I found a workaround for this problem in case anyone else encounters it.

Create a new armature with a single bone in your project file (Shift + A Armature > Single Bone).

In Object mode, select your problematic armature (the one you can't select bones from in pose mode), Shift select your new single bone armature, and join the two (Ctrl + J ).

When I did this I was able to select all of my original bones in pose mode.


Blender not rendering specified dimensions I was making a channel art photo for my YouTube channel, and everything went smoothly. But when I rendered the image it wasn't the resolution that I specified.
I wanted the image to look like this:

But the rendering came out like this:

How do I make it so it doesn't do this??

The stretched height comes from you having an 3:2 aspect ratio.

You would normally only want to adjust the aspect ratio when rendering video that is intended for older tv's with non-square pixels.

The reason you are seeing the distortion is that the uv image editor displays images in 1:1 aspect by default, you can adjust this to match your render settings in the Display panel of the UV/Image Editors properties region N.


How do I drop SVG files onto an VSE timeline? I have an SVG logo that I would like to drop onto a VSE timeline (organisation logo). How can I do this?

You need to use another application to convert it to a bitmap image of the resolution you want to use in the video and then use it in blender.

Blender doesn't know how to read svg files, there is an Import SVG addon which will read an svg file and create curve objects in the 3D view but blender doesn't know how to treat them as images.


Cutting out a part of a plane from sphere vertices I'm slowly trying to learn blender. I have a mini project I want to create and 3d print a catapult (just the 'ladle' part) that I could mount to a servo motor.

I would like to get rid of the part that is covering the half sphere and then connect the half sphere with the handle.

There are no vertices where the sphere and handle meet so I do not really know how to deal with it.

Here are some steps for you. (Since you'll will surely make your catapult like a solid object)

First create a Uvsphere with default options.

Now, in edit mode, Select the Top half Vertices of the Sphere.

Delete Them.

press Ctrl+A to select all the vertices , Then Press E to Extrude and immediately press ALT+S to Scale the Uvsphere. Scale it outward to get a shape like this.

Now, press Ctrl+Tab and Select "FACE" selection mode. Select the 2 faces on X axis.

Now, Simply press E to extrude and the G to move & X to constrain the movement on X axis. Move it out ward. then Press S & X & 0 to even out the extrusion.

And , Here is a link to file
Blend File


How to make an object completely transparent? I want an object to not be visible at all in a render. I am trying to contain some particles in a simulation and I need them to not get out of the enclosure so I want a transparent object there (when I render) to prevent them from escaping.

The following material setup should give you a completely Transparent material that cannot be affected by light etc.

You can add a material and set the specularity and alpha to 0 and disable shadows but the easiest way is to not render the object at all. Open the Outliner and untick the camera beside the object.


How do you freeze or reset a lattice? I have a complex object and I created a lattice around it. Before adding the lattice modifier I manipulated the lattice points so that it perfectly encompasses my object. Then when I add the modifier, my object gets translated and scaled down significantly. I am guessing this is because I scaled the lattice down to match it to the object size, and moved/rotated it to get it into place. I tried pressing Ctrl+A to Apply Location, Rotation, and Scale, but this did nothing but change the object translation (though it did not correct it; just made it wrong in another way.)

Here's my object with the un-attached lattice:

Then when I add the lattice modifier using this lattice:

Then I tried Ctrl+A to "Apply" the location, rotation, and scale of the lattice and the object:

And finally I tried positioning the origin of both the lattice and the object to the same spot (center of tire):

I am out of ideas. I saw this thread where someone ran into the same problem but the answer to his explicit question does not solve the implicit problem: Lattice modifier deforms object as soon as an object is selected
I hope it is not that a lattice has to always start as a perfect cube.

EDIT: I even tried unparenting the object so both the lattice and the object were top-level (not in a hierarchy) and origins both set to 0,0,0, so their rotation, position, scale values are identical and from the same origin. There should now be no reason this is happening yet it still behaves the same silly way.

EDIT AGAIN: It's hard to tell from my screenshots, but the lattice is NOT a perfect cube. It is more of a rhomboid or something more angular. I went into edit mode to adjust the corners to match the angle of the object, then I added more division to the U,V,W of the lattice. It seems certain that my manipulation of these control points is what the problem is, but how do I freeze the lattice so that this warped shape is considered the start shape?

Thanks for your help!
-Ben

I went into edit mode

You should scale the lattice only in Object mode to encompass your object.

And yes - it doesn't need to be a cube. When you're ready with x/y/z scaling do not Apply object transform (scale) to the lattice at all. It will result in the same outcome.

Scaling it in edit mode is applying deformation on the object as expected, in your case - scaling it up/down.


Textures go missing when I set new scene I have a game menu scene, and when I press start I set the new scene to be the main scene.

Problem is, most textures disappear leaving a light purple color behind them (not the default one for missing textures), like this:

In this image for example the ceiling has a texture. What am I missing? It works normally till I set the scene.

Viewport Shading

I think your starting scene is set to "Solid". Ensure it is set "Texture" or "Material".

Render tab shading

One scene might use Shading mode "Multitexture", while the other uses "GLSL". Ensure to use the same mode for all of you scenes.