Different Color for region of intersection Is there a simple way to make a region or new object in order to change the material properties at the intersection of two or more objects?
For example:

Or this, where the intersection area of interest is shown in orange and is the intersection between 3 different objects

I have read a little about using the Boolean tool for Union, Intersection, and Difference between two objects, but when applied, it does not create a new region or object. It destroys part of the objects that are present and replaces it with the union, or whichever is chosen.
In addition, if the intersection is chosen, the resulting object is not the type of intersection shown below. The intersection given would be the plane with the bottom part of the cone sticking down for some reason.
Is there a better way to achieve the question above?

The "Boolean Modifier" doesn´t work as expected with non-manifold meshes. When you add a plane use the "Solidify Modifier" first, to give it a slight thickness (e.g. 0.0001).

Give the plane a "Boolean Modifier" afterwards and set the target to the cone. Set "Operation" to "Difference". Copy the plane with ShiftD and press Esc to avoid moving the copy. For the copy set the "Operation" of the "Boolean Modifier" to "Intersect".

Edit: The pictures show the Modifier Tab in the Properties Panel (click the wrench icon). Note that the order of the modifiers in the modifier stack is important.

You could also parent the two planes so they can be moved around together. Hold Shift and select both plane objects with RMB. Press CtrlP and select "Object".

Afterwards materials can be assigned on every object separatly.
You can then use Freestyle for line rendering.

The advantage of using modifiers is fast editing and your objects are easy to animate.


Can you use multiple rigs in Blender I'm new to blender, and am trying to make a Minecraft animation. I can get a single character in, but don't know how to have multiple rigs in a single animation.

How do you have multiple characters?

You can have as many rigs as you like it is pretty much the same as adding objects. You might be confused when you started your animation in the Timeline. You will only see the keyframes of the selected object.

I would recommend to learn about Actions ( parts of an animation like: walk, jump etc.) and the NLA-editor this allows you to reuse already created actions to assemble an animation from actions.


How to symmetrize shape keys? Basically I done all the facial animations on the +x axis but I want to make some shape keys symmetrical like when the character opens the mouth.

I tried using the mirror shape key and the new shape from mix like I'm doing with the eyes to make them blink at the same time but since the mouth has movement exactly in the middle vertices the mix ends up with the middle vertices in a different place.

I could do the mirror, reset the position on the middle vertices back to basic shape and do the mix, but is there a faster way?

If you want to mirror some shape keys without doubling the quantity of movement for the center line of vertices, you need to use at least one weightgroup with all vertex at 1 except for the middle ones which will be at 0.5.

Individual shape will have their movement on center line halved, but it's a common practice. Here I show one weightgroup (1-0.5-1) but you will often see two weightgroups (1-0.5-0) and (0-0.5-1).

You can watch this video tutorial from Angela Guenette for this process, and I highly invite you to watch the whole series.


Some vertices are hidden in edit mode (not using H) Some vertices are missing in edit mode as you can see in the yellow circles on the image. I did not press H to hide them. Why are they hidden?

This is because you have a Subdivision Surface modifier. They aren't really missing, it is just the surfaces being smoothed over those vertices, hiding them. You can either disable the modifier in edit mode:

Or you can toggle Limit Selection to Visible:

Here is an example:


Video Speed Changes when rendering I'm fairly new to blender. I mainly use it for video editing. This project is the first time I used the "speed" effect strip. In the project, a video plays, then a clip of it plays again faster, then a third clip plays at normal speed. When I run this in the editor, it runs fine and seems to work. However, when I render it, it seems like my first clip is also effected by the speed and ends up playing twice as fast. Then the video is blank until it hits the second clip, and from then on it seems normal. Im not sure what exactly I'm doing wrong. Here is a screenshot:

Thanks for any help!

EDIT: Removing the speed section did not seem to have any effect in final rendering. The video runs fine in the editor, but the rendered file plays much faster than normal.

Blender may be buffering the source video differently at render? Try transcoding the source files to another codec first, as it looks like a screen capture and they are notorious for having strange FPS (frames per second) values.

I'm afraid that Blender's video function is handled by a limited version of ffmpeg that may not recognize your file correctly.

Otherwise check your output settings, there might be something odd about those codec settings too?


Snap one (active) vertex in a selected curve + move all vertices in curve by snap amount? I have four vertices arranged in a curve. Is it possible to snap just one point in the selected curve (e.g. the backmost one) to some vertex on another mesh and automatically translate all the other vertices in the curve by the same XYZ distance? For instance, in the image, I would like to snap the selected vertex to the nearest one on the gray mesh (X-ray mode is on), and also translate the 3 vertices on the same edge-loop by the same distance. Thanks!
PS Since I just experimented with it: I would like the active vertex to snap and the rest to translate. My test seemed to snap the middle vertex in the curve instead.
PPS Seems by default, the vertex nearest the snap destination will snap. I wonder if there's a more intuitive way to control this.

In this example, 'Snap With' is set to 'Active' and 'Snap To' is set to 'Vertex'.
The snap has been set to 'Project onto Self', and set to work in translation, rotation, and scale.
The Pivot has been set to '3D Cursor'.. although of course, that wouldn't matter if you were just translating..

In the illustration, the active vertex starts off as the one at the bottom, and is then switched to the one at the other end.
When you move, rotate, (or scale) the active vertex, the other selected vertices will follow.
Note: the rotation has to be constrained to an axis to work.


Cloud has rectangle shadow Cloud made by cloud generator has rectangle shadow:

Make sure you have Receive Transparent checked for your map's material, if that is not checked the receiving material will only render shadows at full strength.

In the properties panel under the Material tab beneath the Shadow heading check the Receive Transparent check box.

Receive Transparent (quoting from the manual)

  Allows this material to receive shadows whose intensity is modified by the transparency and color of the shadow-casting object

In the case of a smoke simulation, it will definitely will have intensity, or alpha less then one.

The image below is an example:
Without Receive Transparent on the left and with Receive Transparent checked on the right.

 I changed the Receive Transparent on only the ground plane, the object casting the shadow does not need it checked unless it too will receive a transparent shadow.


Can't combine render layers when compositing I'm trying to add a glowing sun effect to my scene for an animation in "Blender Render". I put the sun in its own render layer, and the scene in its own. In the compositor I had the sun render layer go through its nodes, and then combine with the regular scene at a mix node. When I plug it in to the output, I get either the sun with its effects, or the normal scene blurred when I change the active scene.

Nodes inputs have this behaviour: the upper input is considered as the "background", the lower is overimposed as much as the fac slider goes toward 1.0, with the choosen blending mode (in your case: screen).

In your nodes setup the first mix (screen) node has the fac set to 0.0, meaning that the lower input (blur 5 and 5) is excluded, you only have the "35 and 35" working.

Iin the second mix (screen) node you should switch the two inputs.

In Blender generally we use a different way to manage the layers than Photoshop or others image editors:
you could render the "background" scene with transparent sky, set the sun scene as background (upper input of a mix RGB node, set to "mix"), normal scene on the lower input, use the alpha value of the normal scene as FACtor, so that the only part of sun scene is visible only on the transparent portions of the normal scene.

The image  in the fac input (alpha of the normal scene) means: black = show upper input only, white = show lower input completely mixed with upper according to the choosen blending mode, greyscale inbetween.

To inspect the images of the various outputs of the nodes: Ctrl click them more than one time: they will show their various values in a circular mode.

If you understand this general behaviour you will be able then to let the sunlight "bleed" on the normal scene.


Does Blender use a Python Virtual Environment? .. This is probably a daft question to even mildly experienced developers.. I'm deeply noob when it comes to managing the bureaucracy of versions, dependencies... Does Blender create a Python virtual environment for itself? If so, how would I ensure I was working in the same one, if working outside the internal text editor / Python console?

Current state of Blender's Python integration

Blender has its own Python interpreter, modules and libraries and is therefore entirely separated from your system's Python installation(s). The interpreter is linked into Blender's binary. It does not create or use  virtual environments. The add-ons and commands from the Python console are executed by the same Python interpreter and therefore have access to the same modules and libraries. There is no isolation or separate dependency management for each individual add-on. Hence, add-on developers need to be careful not to install packages that could conflict with other add-ons. Currently Blender has no unified way to install the required dependencies through the Python API. This also raises the question how the user is notified that the add-on requires additional packages. Depending on the location of Blender's directory, the installation may require elevated privileges.

Since the current design is not an optimal solution, alternatives are being discussed by the developers and the community (see T71420). Recent versions have solidified the separation of Blender's Python and the system's Python by ignoring the PYTHONHOME and PYTHONPATH environment variables, unless the --python-use-system-env command line flag is passed to Blender, which add-on developers cannot rely on. This implies that add-ons are no longer supposed to install dependencies to the user's site-packages  (see T76993), thus no --user flag should be supplied to pip when installing packages. Technically this is still possible, as detailed in the linked ticket, but it's apparently not the intended way.

What does this mean in practice?

Currently your add-on can install dependencies, but it has to:

Check if pip is available and install it if it isn't (only Windows comes with pip pre-installed, at the time of writing)
Install the required packages through subprocess.

An example for this can be found on my GitHub. As previously noted, the required approach can change in future versions. Add-on developers aren't (yet) forced to ask for the user's permission before downloading and installing packages. Every add-on developer is expected to honor the privacy and autonomy of the user. Independent of this common courtesy are the actual OS permissions. If Blender's directory is located in, e.g. C:\Program Files on Windows, the user will have to start Blender with administrative privileges for your pip install to succeed or install the packages manually. The same is the case on Linux and macOS. Therefore, the add-on developer should provide instructions for this use case. Alternatively you could go against Blender's current design and manually add the user's site-packages to the sys.path as described by MACHIN3 in T76993. This avoids the permission issue when used in combination with the --user flag, since Blender has the necessary permissions to install packages in that directory.

Answering your questions

  Does Blender create a Python virtual environment for itself? [...]

No.

  [...] If so, how would I ensure I was working in the same one, if working outside the internal text editor / Python console?

The add-ons will use the same interpreter and thus will be able to load the same installed modules. This also applies to scripts that are supplied to Blender via the command line with the -P or --python argument.

If you want to run scripts that depend on bpy outside of Blender, then you're likely looking to build Blender as Python module.

  I wondered whether I should have activated an environment, and imported into that.

No, you shouldn't have, because that is not supported at the moment. Allowing completely separated virtual environments as venv implements it, would requires major changes to Blender's Python integration.

  [...] and i wondered what Blender's python/lib/python3.7/venv/ directory was doing

Blender includes all libraries that come with every Python installation and venv is one of them. It's not actually used by Blender. It should also be noted that the Python binary in python/bin is only there for convenience, e.g. if you want to install packages with pip. It isn't the actual Python interpret Blender uses. Blender's binary includes the Python interpreter, it's not a separate binary.

Conclusion

There is currently no standard way of installing and managing dependencies through Blender's API and every add-on developer is required to handle this on their own. Future versions of Blender will hopefully improve the process.


When setting the 3D Viewport's Context to Texture Paint the previous Texture gets loaded I have a UV mapped mesh that I've painted a texture for, and I want to apply a different texture to it. When in Edit Mode, I can see the new texture applied to it, but when going to Texture Paint Mode the previous texture is suddenly assigned to the object.

See following video: https://streamable.com/ybn68

What am I missing here?

Seems like the solution was choosing the image from the 3D View's Properties Panel > Slots > Canvas Image


Can't select all vertices of circle I'm practicing blender 3d v2.79
By the last 3 weeks when get inside the edit mode i can't select the whole circle of vertices by hitting Ctrl+alt +left click

In the beginning i thought that my laptop keyboard is the problem and i connected an external keyboard and did the same and even my laptop did the same what is the problem

What is the reason, is my short cut wrong
Give me a suggestion

You have the wrong shortcut, it just Alt+Left click. It will select all the vertice lying along its path.

All the best!


I'd like it to move nearby vertices slightly when I edit a vertex When editing a mesh, I can select a vertex and move it, and it moves independently of the other vertices. However, I'd like for it to move nearby vertices with it, and the pull drop off with distance. For example, if I could select the vertices at the corner of the mouth and move them around, slightly modifying the upper lip, chin, and cheek slightly.

Use proportional editing.

(or press the O to enable and Alt+O to disable) and use the mouse wheel to determine the radius of the tool.

  Proportional Edit is a way of transforming selected elements (such as vertices) while having that transformation affect other nearby elements. For example, having the movement of a single vertex cause the movement of unselected vertices within a given range. Unselected vertices that are closer to the selected vertex will move more than those farther from it (i.e. they will move proportionally relative to the location of the selected element). Since Proportional Editing affects the nearby geometry, it is very useful when you need to smoothly deform the surface of a dense mesh.

Read the manual here: https://docs.blender.org/manual/en/latest/scene_layout/object/editing/transform/control/proportional_edit.html?highlight=proportional%20edit


How can I cap a cylinder with a hemisphere? How can I make this shape using a cylinder and not a cube? It is going to be a table chair leg so its not completely flat.

I'm not that experienced in blender yet and I've tried a few techniques across the web described for other objects but none have worked thus far so I'm at a stand point.

Thanks!

The Round Cube Method

In addition to the other answers here, which are totally sufficient for addressing your case, I'll just mention that you can also attach a Round Cube to a Cylinder if the vertex count of the circumference matches.

The benefit of doing this is that you get a nice evenly-spaced quad mesh that can be textured and deformed elegantly, without any pinching pole at the tip.

In order to add a round cube, first enable the Extra Objects add-on for meshes.

Add the round cube by pressing ShiftA.

Delete half of the round cube (X) and add a cylinder while still in Edit Mode. Rotate either the cylinder or the round cube so that their vertices align.

You can perform a Loop Cut (CtrlR) around the cylinder to form a holding loop that will keep your cylinder's edges straight up to the point where they join the round cube hemisphere.

Once the vertices that form the outer edge loops of the cylinder and round cube are overlapping and selected, (Border Select B should suffice) you can Merge them from the Specials Menu (W > "Remove Doubles"). Adjust the Merge distance as needed from the Operator Panel.

And here is the result:

For your particular case I don't feel this is necessary - beveling the bottom of a cylinder is faster. But it's handy to know how to do this, for times when you're making something larger and more noticeable, or when topology is important. Sometimes it's good to think outside of the UV sphere. ;-)

Finally, here is a shading comparison with round cube topology versus UV sphere topology:

Note the triangle fan shading artifact that results when a UV sphere is used, and how this is not present when a round cube is used.


How to enable animation for Eevee at this early stage on Mac I heard that Modifier is supported on Eevee via --enable-copy-on-write but then when running on Mac, I am not sure how to execute this on the command line? Any clue?

Ok figure it out myself, on the Terminal:

cd /Applications/Blender
./blender.app/Contents/MacOS/blender --enable-copy-on-write

cd /Users/username/Downloads/blender-2.80.0-git20180507.e3d30ffb920-x86_64
./blender.app/Contents/MacOS/blender --enable-copy-on-write


Event key for "TAB" and "TAB + shift" on add-on modal? I am finalizing a Blender add-on and I have an issue on the modal part with 2 events triggered by TAB or TABSHIFT.

Here is the actual code:

# TAB event
elif event.type == "TAB" and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

# TAB + SHIFT event
elif event.type == "TAB" and event.shift and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

The first event TAB works perfectly but the second event TAB + SHIFT does not work at all (never triggered).

So, without any success, I tried to:

group the event condition such as: ( event.type == "TAB" and event.shift ) and event.value == "PRESS"
replace event.shift by event.type == "LEFT_SHIFT"
remove event.value == "PRESS"

Any idea?

I finally found a correct solution using a better code semantic.

The code should be done in 2 nested conditions; the main TAB event and the SHIFT event as in the following code:

elif event.type == "TAB" and event.value == "PRESS":

    if event.shift:
        # ... (code for TAB + SHIFT)
    else:
        # ... (code for TAB)

    return {'RUNNING_MODAL'}

A second good solution, closer to the initial code, consists to put the TAB + SHIFT condition first (thanks to batFINGER).

# TAB + SHIFT event -FIRST-
elif event.type == "TAB" and event.shift and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

# TAB event
elif event.type == "TAB" and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

Hope that could help someone else!


Moving VSE sequences between files I am making a series of educational videos for my lab and have a separate blender file for each chapter. I have created an opening sequence that uses multiple lines of text that I metastrip-ed together. I would like to avoid reformatting the opening text for each file - positioning and sizing them to all be identical - for each chapter. Is there a way to copy the metastrip from one file and move to another?
I've been researching this problem for a few hours and realized that maybe I should have setup all the chapters in one file as different scenes. It appears you can move metastrips between scenes of the same file. Different facet of the same problem here - would there be a way to move all the work I've done from the VSE in one file to another. Append doesn't seem to work - just nothing shows up when I append a scene. Copy and Paste doesn't work. Would I have to export the file as something other than a .blend file and import into the other file? Would that save the ability to edit the text (since each chapter has a different title)?
Any help is appreciated. Maybe I just don't know what language to use, because I found very little info about this online.
Thanks in advance,
April

Q: Is there a way to copy the metastrip from one file and move to another?
Yes. You can Append a Scene from one blend file to another and copy&paste its (meta)strips you want, between scenes of current blend file.

Blender 2.8x and newer - if I open a blend and go to File > Append I can navigate to saved blend and choose existing Scene.A and Scene.B (from attached blend file here). From thouse appended scenes I can Copy ⎈ Ctrl+C any strip (image, text, color ... or metastrip) and Paste ⎈ Ctrl+V into another scene of the same blend file.

Note: Just to prevent confusion. When you are in VSE editor and press Add ⇧ Shift+A > Scene this operator adds a strip with Camera view from 3Dview editor includede Compositor result as well (when used).
Like here I created Scene.C in a new blend, appended Scene.B, then copy-paste text strip to Scene.C and added "Scene" strip (that's 3Dview scene - default cube with Normal Matcap, plus Blur node in Node Compositor).


How to make node group of an existing material into a new group? (in python) This is what I would like:

I'm looking for an alternative to bpy.ops.node.group_make()
Because it seems like a bad approach.
I simply want to group a new group nodes of an already existing material, without having to recreate anything, after which I would add the inputs and outputs (the latter does not seem to me a difficult passage)
But the problem is that I can't find answers anywhere, I probably try badly, but basically I just want to move my nodes within a group, just like it does bpy.ops.node.group_make()This, however, has problems in the context area so I discarded it regardless

Edit: I want to clarify that this must happen in the context 3D_view the context nodes editor is not necessarily open

Edit 2: I was also thinking if it is possible to easily copy the nodes and their links / parameters without necessarily having to write an exaggeratedly long script, to then insert them in the group node

I have one method May be this is what you wan't this may work for you
if you do not wan't to use bpy.ops. .... then you have to create a node group

import bpy

for mat in bpy.data.materials:
    if "Material" in mat.name:
        nodes = mat.node_tree.nodes
        for node in nodes:
            if node.type != 'OUTPUT_MATERIAL':  # skip the material output node as we'll need it later
                nodes.remove(node)
group = bpy.data.node_groups.new(type="ShaderNodeTree", name="Test Group")

#Creating Group Input
group.inputs.new("NodeSocketShader", "Input1")
group.inputs.new("NodeSocketShader", "Input2")
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (0, 0)

#Setting Default Values For Node Sockets

group.inputs[0].default_value = (1.000)
group.inputs[1].default_value = (2.000)

#Creating Group Output
group.outputs.new("NodeSocketShader", "Output1")
group.outputs.new("NodeSocketShader", "Output2")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (500, 0)

# Creating Principled bsdf Node
#You can create any node here which you think are required to be in the group as these will be created automatically in a group

Principled_Bsdf_node = group.nodes.new('ShaderNodeBsdfPrincipled')
Principled_Bsdf_node.location = (100, 0)

#creating links between nodes in group
group.links.new(input_node.outputs["Input1"], Principled_Bsdf_node.inputs[0])
group.links.new(Principled_Bsdf_node.outputs["BSDF"], output_node.inputs[0])

# Putting Node Group to the node editor
tree = bpy.context.object.active_material.node_tree
group_node = tree.nodes.new("ShaderNodeGroup")
group_node.node_tree = group
group_node.location = (-40,0)

#connections bewteen node group to output

ShaderNodeOutputMaterial_node = tree.nodes["Material Output"]
links = tree.links
link = links.new(group_node.outputs[0], ShaderNodeOutputMaterial_node.inputs[1])


Lighting on the interface I have a problem with the lighting in my project. I can't see any type of lighting, I can see it only on the render result. A few days ago I saw my environment texture on the interface but now I can't see it here, only in render result. It looks like I have turned off lighting view on the interface but I don't know how.
Thank you in advance for any kind of help.
Everything is on the screenshots below.

The problem here is that either "scene lights", or "scene world" is unchecked in the Viewport Shading settings menu. See image:


Issue With Subsurface Scattering and Scale on a Human Model I scaled down my characters to real human measurements (around 1 m 70 cm), in meters units. I found it harder to manipulate because the characters are tiny in relation to the scene.
Also the skin shader seems to works differently. The smaller the size, the higher the strength the sub scattering is for my skin shader. I don’t understand why, it causes the facial features to lose in definition.
Then the scaling down seems to make the head and hair shrink too in viewport rendering (not so sure and not as concerned about this, but curious)
What is the scale recommendation for human model? The life-size scale doesn’t seem to work well for me. Thank you for your help.

Your subsurface radius value probably needs to come down in proportion to your model's scale.  Observe the following difference in SSS radius:

With a 60m model, 1 meter between light bounces is still fairly surface level, scaling it down the light could penetrate all the way through the model.  Here's the section from the documentation:
RGB Radius
This is not in fact the radius of the subsurface scattering, but the average path length between scattering events. As the light travels through the object it bounces around then emerges from the surface at some other point. This value corresponds to the average length the light travels between each bounce. The longer the path length is, the further the light is allowed to scatter. This is the main source of a material’s perceived “scatter color.” A material like skin will have a higher red radius than green and blue. Subsurface scattering is the diffusion of light beneath the surface. You control how far the light spreads to achieve a specific result.


Why do Rigify controls no longer move my figure easily? Why do the Rigify controls separate from the body parts of my figure and also barely move my figure until I increase the value of the FK / IK Switch setting in Rig Main Properties? I'm finding it's nearly impossible to move the "Legs" of the model even when I move the rig's leg controls -- the rig's control just separates from the leg and barely moves the leg. Previously, though, they moved appropriately with no effort. What have I done to make them not move easily when I move the rig controls?

Rigify's Controls
Blender's built-in addon Rigify provides the user with many "handles" or "controls" used to manipulate the position of mesh parts. Here, all of these handles/controls are shown highlighted:

Forward Kinematics (FK) vs. Inverse Kinematics (IK)
Forward Kinematics
Forward kinematics (FK) is one of the two ways Rigify uses to calculate joint movement of a rigged character. When using FK rigging, any given joint can only affect parts of the skeleton that fall below it on the joint hierarchy.
For example, rotating a character's shoulder changes the position of the elbow, wrist, and hand. However, moving the hand only moves parts from there down the joint hierarchy, i.e. only the hand & fingers:

When animating with forward kinematics, the artist typically needs to set the rotation and position of each joint individually -- to achieve a desired pose the animator would work through the joint hierarchy sequentially: root → spine → shoulder → elbow → etc. The final position of a terminating joint (like a knuckle) thus depends on the joint angles of every joint above it in the hierarchy.
Inverse Kinematics
IK rigging is the reverse process from forward kinematics, and is often used as an efficient solution for rigging a character's arms and legs. With an IK rig, the terminating joint is directly placed by the animator, while the joints above it on the hierarchy are automatically interpolated by the software. For example, when moving the hand's IK controls, all unconstrained joints above the hand will be effected:

IK is most appropriate when the animation calls for a terminating joint to be placed very precisely; a character climbing a ladder is a good example. Because the character's hands and feet can be placed directly on the ladder's rungs rather than the animator having to adjust their position joint-by-joint, an IK rig would make the animation process far more efficient. One drawback is that because IK animation uses software interpolation on all the effected joints, there's often quite a bit of cleanup work that must be done precisely positioning specific joints in order to perfect the pose.
FK / IK Settings
Each one of these handles/controls has it's own settings you can see and adjust in the Properties panel. To see these settings, do the following:

Select the rig

Switch to Pose mode

Select a control/handle on the rig

Press N to open the Properties panel, then scroll down to the bottom to see the Rigify settings in the Rig Main Properties section:

The first control setting listed in the Rig Main Properties section is the FK / IK Switch and it controls to what degree the mesh is controlled by the Forward Kinematic handle/controls or the Inverse Kinematic handle/controls. For example, here, the Left Foot's Inverse Kinematics control/handle is selected:

When the FK / IK (foot.ik.L) value is set to 0, the rig's FK handle/control position effects the foot's position 100% and the IK handle/control position effects the foot's position 0%. As the value is increased, the rig effects switch from being FK controlled to more IK controlled, until at 1.0, the foot's IK handle position effects the rig 100% and the FK controls effect it 0%.
So, when you say you are finding "it's nearly impossible to move the "Legs" of the model", that is because the FK / IK (leg parts) handles/controls are set to inappropriate values, so they barely exert any influence on the leg's position when you move them.
Solution
The solution is to set a handle/control's FK / IK Switch value to:

0.0 if you are using an FK handle/control

1.0 if you are using an IK handle/control

Unfortunately, I don't know of any way to do this all at once for all the handles/controls, so you have to do it one at a time. The easiest way to do this is:

Select the rig

Switch to Pose mode

Press A to select All of the handles/controls

Press N to open the Properties panel, then scroll down to the bottom to see the Rigify settings in the Rig Main Properties section

Set all of the FK / IK Switch values appropriately


How can I create hollow pipework? I'm trying to create a length of pipe with includes straight and curved lengths.

I'm wanting to create a mesh so I can import it into unity, add a mesh collider and run fluid through it.

Does anyone know the best way to approach this?

To model it I would add a cylinder, tab for edit mode, remove the caps of the cylinder.

Then in add and apply a solidify modifier.

You possibly should also create a simplified pipe with smaller amount of vertices to work as a collision mesh for a  mesh collider, because higher poly pipe might require quite a bit of collision calculations.


Have can I have a different texture on parented objects? I'm new to Blender, just started  learning.

I'd like to know how to have different textures on parented objects.
I have this object parented with another object but when I apply image texture to one, the other is affected as well. I want two different textures applied separately to those two objects.

I have a peeling off effect on a flying shuriken. I wanna add origami paper texture to the object thats being peeled off, and metal texture to the shuriken.

thanks in advance!

Probably you have them sharing the same material. In this case, you have to duplicate it or create a new one and assign to change independently.


Blender Python - exporting bone matrices for animation relative to parent I am making a homegrown 3d engine for my projects.
So far, I am able to export:

mesh
materials
Node hierarchy

Each node in my engine has it own mesh(optional), material(optional) and a PARENT-RELATIVE-TRANSFORMATION-MATRIX

While rendering, each node passes its own matrix down to each children.
This matrix get multiplied with the child node's transformation matrix and gets passed down further.

This is working fine for static meshes with node hierarchy.
However it is not working for Blender bones(I have a plugin for 3ds max also, and my engine is able to render bones correctly. So I think the issue is not on renderer side.)

I am getting all weird matrices for bone animations.
Here is my script where I save the animation data for bones.

for node in nodes:
    if node.pose_bone:
        (start_frame, end_frame) = (0, 100)
        animation = Animation(len(animations), int(start_frame), int(end_frame))
        animations.append(animation)
        node.animationIndex = animation.index

        print("==>>")
        for f in range(int(start_frame), int(end_frame) + 1):
            bpy.context.scene.frame_set(f)
            bpy.context.scene.update()

            if node.pose_bone.parent is None:
                bone_matrix = node.pose_bone.matrix_basis
            else:
                parent_matrix = node.pose_bone.parent.matrix_basis
                bone_matrix = node.pose_bone.matrix_basis
                bone_matrix = parent_matrix.inverted() * bone_matrix

            m = bone_matrix

            animation.translates.append( m.to_translation() )
            animation.rotates.append( m.to_quaternion() )
            animation.scales.append( m.to_scale() )

Please help me to get correct pose matrices for bones.
In my engine these need to be relative to their parent.

After a couple of days of frustration, I have been able to get skeletal animation working fine.

Here are the details:
1] Bind pose is obtained from bone.matrix_local

bone_matrix = bone.matrix_local
if pose_bone.parent:
    bone_matrix = bone.matrix_local.inverted() *   bone.matrix_local

2] Inverse bindpose also is obtained from bone.matrix_local. But this time it is not relative to parent bone.

offset_matrix = bone.matrix_local.copy().inverted()

3] Now the animation data is obtained from pose_bone.matrix as follows:

bone_matrix = pose_bone.matrix
if pose_bone.parent:
    bone_matrix = pose_bone.parent.matrix.inverted() * pose_bone.matrix

This code works fine for me.


Blender's video and audio don't sync when editing I imported my video file and for some reason (even though the video is one frame smaller than the audio) the video and audio do not sync after being played back for a certain amount of time. If I were to click on the sequencer and place it at any point in time, the audio and video would start off in sync, but if I were to play it from that point the audio and video would gradually de-sync. Also, the video was recorded in OBS but it plays back well and in sync using VLC.

Here is information about the video file and more info about obs and the video file itself (it was just for testing purposes):
https://mega.co.nz/#F!rRcSXCQT!fpjUOjGYzolRO-6zfZgpbA

The easiest way of understanding what I mean would be to listen for the sound of the clicks during the video then pause and start it mid way. You will then hear the video and audio re-sync and start off from where it should have but then gradually de-sync.

If they start off in sync at any point when you start playing, and gradually goes out sync, it means you don't have AV Sync turned on in the timeline panel.


Water not coming out in fluid simulation I am doing a practice project but in this water is not coming out of it. can you tell me what's wrong in it?
Here's the file:

The problem is your resolution. It is too low for your tiny little inflow.
You could either make your inflow bigger or did what i did: change the resolution to 100 and bake again.
Then it works.
Result:


Is it possible to use both rtx and amd cards at the same time? I bought a amd card recently but keep reading about how blender works faster with rtx cards. So can I sometime in the future buy a rtx card and combine it with the amd card or is there no way to do it?

It is not a good idea to mix different kinds of cards from different hardware architectures.


Frame Duplication with Changing transparancy and colors Is there a way to Change the colors and transparency of previous and post frames using the duplication frames, in object properties?

Construct an action from the target object and delay it with the required amount. Then instance the target object and transform it based on the delayed action. Then just set the the color of the object as you wish, in this case, I change the hue based on their offset amount:


Planetary/Atmospheric volumetric clouds I created a planet in blender a while ago, and now i'm interested in adding volumetric clouds instead of using a 2D texture. I considered adding a bump node to my material, but then it would remove the realism in the image.

This is what I've created:

This is the effect I want to create:

Any thoughts?

A 3D cloud effect with shadows on a planet can be generated using the experimental micro-displacement with adaptive subsurfaces and shader displacement. Using subsurface scatter and transparency in the shader given an appearance similar to a volumetric shader.

Procedure (tested on blender 2.79b)

Create the planet by adding a sphere to the scene. This will be the planet surface.
Add a second sphere for the clouds. This sphere should be slightly larger than the planet surface. The distance between the cloud sphere and the planet sphere will be the height of the lowest clouds.

Add a subsurface modifier to the cloud sphere. Enable the 'Adaptive' option.

Enable experimental feature support in the render panel.

Create an image for the cloud height

Create an image for cloud coverage. This image will be used to set the transparency used for the cloud shader. If you look carefully, you'll see that the cloud coverage in this example is set to cover more area than the image for cloud height.

Enable cycles and create a shader for the clouds. The cloud material is a mix of a subsurface scatter and a diffuse nodes. This is mixed with a transparency node using the cloud coverage image. The cloud height image is connected to the displacement input on the material output node.

Without displacement, the clouds are flat.

With displacement, adaptive subdivision, and experimental features, the clouds become 3D.

If clouds with overhangs are needed, multiple layers of clouds can be used.

Blend file:


Ho do i create edges like the one used on the corner of this object I am very new to Blender and 3D and have watched lots of videos which never show how to create a corner like the one in this picture.

Could someone tell me the best way to re-create it?

You have to select the edge, press Ctrl + B , that way you bevel the edge.

If then you want to replicate the difference in length, as in the picture, you have to select the two vertices on one side and press G two times to Edge Slide.

The vertices should slide on adjacent edges getting closer or further from each other.


Can't find VBOs in the system settings I want to enable VBOs (Vertex Buffer Objects) but I can't find it anywhere in the User Preferences.

I wanted better performance when sculpting because it freezes with more than 500k polygon meshes

My specs are

R9 280
i5 6600k
16gb ddr4
SSD 250gb
1Tb hard drive

Here is a screenshot

As of version 2.77 the option seems to have been removed.

With the OpenGL version bump vertex arrays are no longer supported, so Vertex Buffer Object are always enabled by default as of commit c402a379a23a so the option was removed from user preferences, according to the release notes.


Animation flipped 180 degrees in Unity with .fbx export I don't know if the problem is in Unity or in Blender. I'm asking both communities.

When exporting an armature animation from Blender with .fbx format and playing it in Unity, it always flips the model 180 degrees before playing it. It sometimes also moves the model to the origin. Both issues shown in the picture below.

Any idea what causes this and how to fix it? I've spent hours trying all kinds of things. The flipping issue I was once able to solve by adding a keyframe to frame 0 that contained the location, rotation and scale data, but that only worked once.

Well it looks like it's caused by the existence of LocRotScale keyframes in Blender, i.e. keyframes related to the objects rather than the bones. It can be cleaned up either in Blender if possible, or those keyframes can be removed in Unity from the animation window after import.

Also, exporting with FBX version 6.1 instead of 7.4 from Blender seems to eliminate the flipping problem regardless, but not the origin problem.


Extra torus on top of the donut I'm following the Blender Guru donut tutorial and it seems that there is some kind of extra geometry on top of the main donut. It looks like the duplicated part of the torus left over from the icing. What can I do to remove it?

In the Outliner (top right-hand corner), you've got a collection named "Donut" containing a "Donut" object. You've also got the "Donut.001" object outside of that collection that you're editing. I reckon that the "Donut" collection is a backup of the donut prior to applying modifiers?

Anyways, unchecking the "Donut" collection should fix it. That will hide the backup collection from renders (which you definitely want) and from the viewport.

Edit

The issue is that when you originally tried to duplicate part of the Torus to create the icing, you did it in Edit Mode. What this did was it created two meshes that are not linked (or joined) to each other but are part of the same object. To fix this, select the Donut object in Object Mode Tab into edit mode, select any part of the top duplicate mesh, then press Ctrl+L.

That will select all of the mesh that is linked to what you had selected. Then, you can press X and delete vertices.


How can you use vector blur in Cycles with fluids? I know (at least I believe this to be true) that using cycles motion blur wont work with fluid simulations when rendering, however, I know that vector blurs can be used in place of motion blur.

With that said, however, I seem to be unable to get the vector blur to work in a cycles render of fluid. I have generate vectors enabled as well.

This doesn't seem to make sense to me, since vector blurs are applied after the render in compositing and therefore, in my opinion, shouldn't be affected by the rendering engine.

Any thoughts? Help?

In short:
Cycles (as of Blender 2.67) does not support fluids blur yet.
A GSOC 2013 project might bring that feature soon.

For now, as a work around, you can try:

Render your primary pass in cycles. Save to EXR.
Render the same scene in Blender Internal, save the Z and Vector pass to another EXR.
Combine the two set of EXRs with Nodes with a vector blur node. Using the Color input from the Cycles EXR, and use the Z and Vector input from the BI EXR.


How do I download action strips? I have watched a few YouTube videos on how to create and animate with NLA Editor and Dope Sheet  (bake) but my thing ain't working out.

I want to get action strips but I cannot find any! I have tried use BVH files but I strongly do not think that's what action strips really are.

What are action strips? Where can I get them online? Can I use BVH files in some way?

When you set some animation keyframes to an object Blender stores your keyframes in an "Action". The dopesheet shows all actions of the scene. You can set the dopesheet window to "Action editor", select an action and press the "Push down" button to create an "NLA Action strip", which contains the same informations of the action, but can be manipulated with all the NLA options.

So, an "Action strip" is a Blender datablock, that refers to a certain object in a certain scene of a certain file: it's true that you can apply it to a different object, but when you have a rig maden of multiple bones it's very difficult to find an action strip that will work with a different rig, and this is the reason why no one share action strips on the internet: they would be pretty unuseful.

Bvh files are actions derived from a live action: they work well when you apply them to a rig identical to the one used to capture the live performance, but if you want to apply them to a different rig, you will have to perform a complex operation called "retargeting": there are various addon that can help you, but it's not a beginner task: if you want to follow this line, search for "Bvh retargeting" and "Bvh workflows".


How to get object's world rotation around z axis I have an empty as a parent for a sphere. I need to get the sphere's rotation around the z-axis relative to the world matrix.
I've tried the following:
matrix = bpy.data.objects['E' + str(i).zfill(1)].matrix_world
e = np.degrees(np.array(matrix.to_euler('XYZ')[0:3]))
print('Yaw %.2f Pitch %.2f Roll %.2f' % (e[2], e[1], e[0]))

but none of the values seems to make sense.

Without seeing the rest of your code, or even an example of your output, I'm assuming the result does not make sense because they are displayed in radians. Blender uses radians at it's core so all raw rotational data is in radians.
To get the Z rotation of an object, use import mathutils and to convert to degrees from radians, use import math
import bpy
import mathutils
import math

matrix = bpy.data.objects['Cube'].matrix_world # assign Cube matrix
eul = mathutils.Euler(matrix.to_euler('XYZ'), 'XYZ') # create an Euler from the matrix using mathutils
print (math.degrees(eul.z)) # print the Z value from the Euler converted to degrees via math


Blender game controller using arduino not working properly I have started learning blender game engine and arduino. Now I am trying to implement whatever I have learned in this simple game where I press a push button connected to arduino and Cube in blender game should move to left.
It is working but it is not smooth.
I want it like this: when I press the push button cube should start moving, when I release it should stop
What is happening: when I press the push button, cube doesn't move until move function finishes and then it moves suddenly my a large amount (amount depends upon for how much time I held down the button).

Python code is as follows:

import serial
import bge
from time import sleep

ser = serial.Serial('COM3', 9600)

movement = 0.1

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
    count = 1
    while count < 50:
        print("Count " + str(count))
        count += 1
        if (ser.inWaiting() > 0):
            var = ser.readline()
            print(var)
            var = str(var)
            var = var[2:-5]
            var = int(var)
            print('Int var : ' + str(var))
            print()
            movements = [var * movement * -1, 0, 0]
            local = False
            player.applyMovement(movements, local)
        sleep(0.1)
    ser.close()
    print("Serial port Closed.")

#left()

How should I write this to get desired output?

Arduino Code:

const int inputPin = 13;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(inputPin, INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  int var = digitalRead(inputPin);
  Serial.println(var);

}

It sends 0 if button is not pressed and 1 if it is pressed.

i don't have arduino but this should work, the problem its that you have an always sensor true level triggering = false (see the img), this means that your script will runs once.

Make it TRUE and now your script will run every frame.

And now your script should be:

import serial
import bge
from time import sleep

ser = serial.Serial('COM3', 9600)

movement = 0.1

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
#    count = 1
#    while count < 50:
#        print("Count " + str(count))
#        count += 1
    if (ser.inWaiting() > 0):
        var = ser.readline()
        print(var)
        var = str(var)
        var = var[2:-5]
        var = int(var)
        print('Int var : ' + str(var))
        print()
        movements = [var * movement * -1, 0, 0]
        local = False
        player.applyMovement(movements, local)
#        sleep(0.1)
#    ser.close()
    print("Serial port Closed.")

Since i dont have arduino i tested with this script.

#import serial
import bge
#from time import sleep

#ser = serial.Serial('COM3', 9600)

movement = 0.001

def left():
    print("Function Started")
    cont = bge.logic.getCurrentController()
    player = cont.owner
#    count = 1
#    while count < 50:
#        print("Count " + str(count))
#        count += 1
    if True:
        var = '0.005564256'
        print(var)
        var = str(var)
        var = var[2:-5]
        var = int(var)
        print('Int var : ' + str(var))
        print()
        movements = [var * movement * -1, 0, 0]
        local = False
        player.applyMovement(movements, local)
#        sleep(0.1)
#    ser.close()
    print("Serial port Closed.")

#left()


.blend object appears black on Web4Web Fast Preview So i got this .blend object from a website and i transported it into my blender file that I'm working. Everything works fine except when i go to blend4web and i pressed "Fast Preview", the object turns completely black even though i added some color

I'm really new to blender. I tried everything but i have no idea what the problem. I feel stupid because it probably something simple. Thanks ahead for all the help guys

You need a source of light. You can add a simple point light : Shift+A / Lamp / Point


Animation jumps as if it isn't interpolating properly I have an animation of a character walking, but the arms appear to jump back between two of the key frames, as if it isn't interpolating properly. It seems it should work fine when I look at the animation with interpolation set to constant.

If you watch carefully, you can see the arms jump

Bezier

Constant

Ok, I figured out the problem. I had edited the rotations manually, and the w of one of the quaternions was negative, which seems to mess with the rotation. You can normalize it by setting the rotation to a format other than quaternion, then putting it back to quaternion.


Load/import settings from one project to another? I have created a new startup file in order to improve my workflow.  One example among many others, I've created new Screens Layouts. It really makes a difference. But when I open old saved files, they use old settings like old Screen Layouts. It's time consuming to re-adjust the settings one by one to my new liking. It's also the same problem if I open blend files created by other people, I'm forced to use their settings.

So, is there a way to override the settings of old files with the ones from my new startup file?

When opening a file uncheck the Load UI option.


Is it possible to assign a bevel curve to an armature like an object? I couldn't find an answer for this, so I'm asking here:

I have some bevel curves on my player model and I've used automatic weights to rig the character except the bevel curves that I've used for the hair aren't following. Is there a setting or trick to make the bevel curves follow the armature?

Also due to this model being used for an upcoming game, I cannot upload or share it sorry :(

If you're gonna export the model, the best way is to select the curve and Alt+C convert it into a mesh.


Is it ok to remove NGons with triangulation in order to import a model in a game engine? Sometimes the model ends up having a very messy geometry, is it a problem in games engines such as Unity?

It depends. The potential problem you can run into with n-gons is that different programs break them up into triangles in different ways. Depending on how you've configured your mesh's shading, this can alter the way smooth shading is averaged across the face.
If your n-gons are flat-shaded and planar, you shouldn't encounter problems. If you're using smooth shading, or weighted normals, and are relying on a normal map to get your final shading result, it can potentially look different in different programs.
If you bake you bake your normal map in a program that triangulates ngons one way, and then move it into a program that does it a different way, you will get a bad result.
Generally you can't go wrong triangulating your mesh before baking normals. It removes the potential for error.


bmesh.ops.scale how to scale vert selection relative to active edge, but not along the edge vector? I am looking into vectors and matrices but don't yet understand how I could achieve one of my goals for a script I'm making. I want to use bmesh.ops.scale() and scale selected verts relative to my active edge. It would be similar to setting Pivot to Active Element for the regular resize command in blender. The bmesh scale should also ignore the vector of the active edge itself. That would be similar to only scaling on X and Y but not Z for example. So in my case the axis exluded in the scaling would be my active edge vector, instead of Z.

Thanks for help!

Intersect point with line.

Rather than use the bmesh scale operator, another technique using the method

mathutils.geometry.intersect_point_line(...)

  Takes a point and a line and returns a tuple with the closest point on
  the line and its distance from the first point of the line as a
  percentage of the length of the line.

To find the radial from each vertex to the axis of scale ie the active edge. For each vertex v in selection, find the closest point o to the line defined by the edge . Translate the vert along vector v.co - o
from the point o by a scale factor.

Quick code, the verts of the edge could be removed from the selection. Since they are on the line there will be no (except error tolerance) transformation anyway.

import bpy
import bmesh
from mathutils.geometry import intersect_point_line

context = bpy.context
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
scale_factor = 2
edge = bm.select_history.active
# if isinstance(edge, bmesh.types.BMEdge):
verts = [v for v in bm.verts if v.select]
for v in verts:
    o, pc = intersect_point_line(v.co, edge.verts[0].co, edge.verts[1].co)
    v.co = o + scale_factor * (v.co - o)

bmesh.update_edit_mesh(me)

Result of running on default cube, with active edge and its diagonally opposed edge selected


How do I use Proportional Edit Correctly? I've tried everything to fix this. Restarting my computer, closing Blender and opening it again, uninstalling Blender and installing it again. Unless it's a bug, I don't know how to fix this. Advice anyone?

Also here's a screenshot of the issue I'm having.:

I made the mountain after selecting "Spherical Falloff", I'm trying to make a hill, and it's obvious that is no hill.

When the proportional editing tool is activated and being used useful usage information is displayed in the 3D View header.

The tool makes use of the mouse wheel for adjusting the radius of proportional influence, bigger values meaning more proportional movement.


How do I remove light from Material Preview Shading in the 3D viewport? How do I remove light from my viewport so it's completely black?
I have deleted the light and adjusted world settings. However, there still seems to be some light.

By default Material Preview Shading uses a different environment and lighting than the Rendered Shading so it ignores the world settings.
In the Options tab, you can choose to use scene world and lighting .


Exporting cloth simulation to Collada results in static cloth instead of a waving one I hope this thread is not a duplicate since I have been exploring the subject for a few days and found no solution that works for me.

I have to export an animation in .dae format to use in SceneKit/Xcode for iOS. I have created a ghost made of sphere covered with a pinned cloth that waves (I have used wind force field). No armature, the only movement is a waving cloth simulation.

I have found that frames 82-116 are fine to loop them for a ghost idle mode. I tried to export it to .dae (Blender v2.79, default Collada / Better Collada) but the output file always contains static cloth instead of a waving one.

For a few days I have been searching the web to understand what exactly I need to do. I followed https://blenderartists.org/forum/showthread.php?387461-Bake-Cloth-to-game-engine and the workflow I have applied is:

Bake the cloth simulation

Select cloth and export to .mdd
Remove the cloth modifier
Select cloth and import the .mdd file

This is the result:

Then, I export to default Collada .dae - but the output file contains static cloth.

The same happens when I export to Better Collada .dae - the cloth is still not waving.

I also tried Mesh Cache modifier, following How can I bake the cloth simulation into keyframed vertices or shape keyed vertices? :

Bake the cloth simulation
Select cloth and export to .mdd
Add Mesh Cache modifier

After I hit „Apply”, the cloth freezes. After I hit „Apply as Shape Key”, the cloth freezes and I have basis and singular shape key:

I don’t get it. What am I doing wrong? Is anything missed in my workflow? Is it a problem with export settings?

A collada file supports a static mesh, while an armature may be included to deform the mesh using some animation data. For a mesh deformed from a simulation, you need to use a file that supports an animated mesh, that is, different mesh data is used for each frame.

This can be done in files such as Newtek .mdd, a .pc2 pointcache file or an alembic .abc file. Both mdd and pc2 can be exported using addons available in the standard blender release that just need to be enabled. Alembic should be available in release builds, but as alembic support is compiled into blender, if it isn't available you will need to find a different copy of blender that has it included. Blender can use this exported data in the Mesh Cache Modifier for mdd and pc2 or the Mesh Sequence Cache Modifier for alembic.


How to create realistic steam in blender? Situation
I created a fluid simulation of boiling water in a pot. Now I am trying to create photo realistic steam in blender. I want to show the steam rising up from the pot. Here you can see what I had in mind (only a picture; I want an actual animation of course):

Problem
I was trying to realize this using a smoke simulation. But due to the reason that I am new to this I ran into some problems. I was not able to change the color of the smoke to a seethrough white. I also tried to make the smoke look less dense, but I couldn't find any ways to do so.
Question
Can someone tell me which settings I need to look into and what values to change them to? I attached my .blend file so you can check out what I got so far
.blend File

this might help some PS i hope you have success https://www.youtube.com/watch?v=I2m9Re8N78I
also try this node set up


Specularity map vs Fresnel I'm confused about when to use Specularity map (like the one made in CrazyBump) vs Fresnel node. Both are recommended to make materials look more realistic, I use them to combine Diffuse node with Glossy one (white colour), but everytime I'm using Specularity map, material looks too glossy and bright, while Fresnel gives more realistic look. What's the actual difference between that two?

In an ideal situation you would use both actually.
The Fresnel node will simulate the real physical property of many surfaces that causes more light reflection grazing angles. Think looking through a glass pane perpendicularly (transparent, see through) or sideways (you will see more reflection).

The specular map will deal with differences of reflectivity along the surface of the material due to uneven or varying surface properties (more polished areas versus more rough surfaces)

To achieve to most realistic results your could mix both with a Color Mix node and tweat blending values to the desired result

Edit: Here are two examples, either add the texture to the roughness input of a glossy shader

Or add the image texture to the mix value of a shader mix node.

Or both, and if desired you can additionally use it for bump mapping if necessary


Compositing video footage into a 3d scene? I am trying to composite some footage of a person that has been chroma keyed into a scene of a dark room with flickering lights. My problem is that I don't even know how I would get close to making it seem somewhat realistic.

How would the lights affect the person if they aren't actually a 3D model, just a flat video? For reference, this video is basically what I am trying to replicate, minus the robotic camera movements.

Video Link

It will depend on a number of things, not the least of which is your footage device. If your footage device can capture a log encoding, there’s a trivial way to get from the camera code value encoding to the reflectance level and colours that the camera saw.

In order, you will loosely need to consider the following:

Illumination of the scene. Any CGI will need to have the illumination / emissions of the scene pushed back into the CGI context. HDRIs or proper camera footage captured from the location can help with this, with further work.
Tracking. If the camera moves at all, it will require tracking.
Distortion. The camera will have a degree of lens distortion that will need to be removed, then reapplied.
Proxy geometry. For certain emission effects and shadows, a loose idea of the scene will be required in terms of geometry.
Proper footage. Log encodings that capture scene reflectance is more or less mandatory here.
Decent camera rendering transform. The CGI and the footage will need to be composited under a reasonable camera rendering transform to make the effect as seamless as possible within the limitations of your toolset.

Paul Chambers has done a fantastic series of blog posts that leads down this rabbit hole, and is well worth researching. From using loose proxy geometry to exploring how scene referred lighting ratios work, his posts are tremendously insightful. There is a wealth of information hidden away over there.


After exiting blender, texture I was painting shows up black So I didn't save it, as I didn't know you had to but in this screenshot is what I have. You can see in the UV selector menu thing it shows my texture, highlighted in red.  Now how do I restore it?

In Blender, when you texture paint in Blender, it doesn't save the images when you save your file or close Blender (unless you have Blender pack, or save, all images into the .blend file).

It keeps the slot (that's what you observed) because the texture is being pointed to by your materials, but if you don't save it externally, you've lost your textures.


How I can export complete scene from blender to json file to use it with three. Js I can export single object to json file..but most free models which I downloaded it from the internet consist itself from multi objects in the scene .. so I need to download the scene
Ex : the building model consist of
Door object - window object..ect

The Blender exporter might still support this, but you'd need to switch from THREE.ObjectLoader to THREE.JSONLoader to import your model into three.js. I'm not sure how well-supported that is overall.

The other option, possibly more reliable, would be to use another of Blender's export formats that three.js also supports. I'd suggest trying FBX and glTF (addon) to get started. These work with THREE.FBXLoader and THREE.GLTFLoader respectively.


no tracking node in blender I want to do single point tracking. For this to work I need to import the X and Y position of the tracked point. This should be done by the "track position" node, but it seems the current version of blender (2.77a) is missing this node.

It gets mentioned in the blender manual (although there is no description),  but it's missing in my application.

Not sure where you have tried to find it, but it is a compositing node.

And if not familiar with compositing i found this one for single point tracking:
http://cgi.tutsplus.com/tutorials/single-point-tracking-in-blender--cms-24286


How to make textures in Blender without any flat work with a painting program? (3D painting) I've made a complex model, what would be a nightmare to texture in gimp. So I'm asking you, if there is an option to paint in Blender itself, watching my 3D creation? It would be a lot easier and faster that way. If you need the model, just ask for it. Oh, and I've added armature to it. Will the texture follow the body while it is deformed?

I think you can use a Texture Paint mode and paint the textures using a Stencil option.

Add a new material to your object. Join all the meshes using Ctrl+J. Unwrap the model using Smart UV Project.

In Uv Editor add a new image texture and name it. Then save it (Image-->Save as Image).

In CYCLES Setup the nodes as pictured below. In the Image Texture node open up the newly created image.

In BLENDER INTERNAL RENDER add a new Paint Slot-->Diffuse Color in a Tools bookmark of a Tool Shelf (T).

Enter the Texture Paint mode and set up the shading type to Texture. Add a new texture in the panel on the left, then go to the Texture header on the right, select Brush and open a texture, which will be used as a stencil for painting.

Enable a Stencil option in a panel on the left. Press:

-LMB to paint through the stencil

-RMB to move it

-Shift+RMB to make the stencil bigger and smaller

-Ctrl+RMB to rotate it.

You may also uncheck the Occlude, Cull and Normal boxes to paint on the invisible parts of the mesh.

Save your image when you're done with painting.


Remove edge loop from selection in 2.8 What is the best way to remove a whole edge loop from an edge selection in Blender 2.8?

The Process is as follows:
a) in edit mode, select three (or more) Edge Loops with double click shift + LMB
b) with three edge loops selected, remove loop "A" from selection without losing the selection of "B".

How can this be achieved?
Thank you in advance!

You cannot select loops by double-clicking Shift+LMB in default Blender's 2.80 keymap. The hotkey for selecting edge loops in 2.80 is Alt+LMB by default. If you wish to add to the selection or subtract from it something that is already selected you hold Shift while using Alt+LMB.

So the answer to your question is:

When you select a few loops with Shift+Alt+LMB click, you can deselect them the same way clicking LMB while holding Shift+Alt on a loop that is already selected.


Align object after Motion Tracking: Edited I am tracking an object in a video, which I want to replace with a 3D object in Blender.  After tracking, I solve motion, and apply an object solver to the 3D constraint.

This is where I get lost.  I don't know what I am supposed to do to get the computer to align the object, using the trackers I have placed, so that it fits the rotation and position of the original object in the footage.  The only way I know of is to manually rotate and move my object, but I know there should be a more professional way to do this.  Could you guys help me find my options?

P.S.  I'm using Blender 2.8rc

Here is a picture of the object I am trying to replace with a 3D object.  I am don't know how to get the computer to correctly place my object, using the trackers as shown on the image.

The 3D object I'm trying to replace the box with is almost the same size.  I'm hoping that it's dimensions are close enough that it won't cause a problem, though.  If it does, I'll make another model.

I do not fully understand your question, which is probably why it didn't receive much attention, but I'm still going to try to explain the problems that I do understand.

From what I understand, you go onto explain how you tracked the object in the video, and then ask how to align it now using the tracked info.

In the Tracking, after you have successfully tracked the object, under Reconstruction, hit Empty to Track.

After doing this, switch back to the 3d viewport, and then you will have a bunch of empties wherever Blender thinks your trackers were. You will find that these form a box (If you have tracked successfully. Also, you may need to take footage from other angles as well, and perform the same steps on them). If you did take footage from other angles as well, then delete the overlapping empties. Now, it is just a simple matter of assigning the vertices of your box to the corresponding empties.

Or, if that is too hard, then you could just do it by hand, which isn't too hard either.

Again, this is pieced together by what I do understand of your problem, which isn't a lot, because your question isn't quite phrased together too well.

I hope this solved your problem, and have a wonderful day.


Update edges in UV map after editing mesh I was working on a mesh to create a new UV map for it. The UV unwrapping showed me some places in which the topology was awkward (tris in places that they could be quads), so I popped back over to edit mode, and fixed it by dissolving the bad edges and creating good ones. I neither created nor destroyed the existing vertices in this process.

Now my UV map has some rather large holes where there should be new edges. Is there a way to ask the UV editor to update where it has its edges placed?

The problem, I just found, was with the faces created by dissolving edges. Rather than create two new faces, it merged the entire strip into a single face.

Suggestion for others with the same problem: Enter face select mode to make sure that new faces exist where you would expect them to.


Script for getting Camera Look At co-ordinates (I'm new to Blender)

Using a script, how can I get the an X, Y, Z set of co-ordinates showing me where the current camera is looking at?

My use case is that the user just moves the camera visually but I need a look at point. I have a manual way of creating an object and then getting the camera to track the object, but I don't really want to introduce this manual step in the workflow.

Thanks

If you want the first surface point of where the camera is pointing at, you can use a variation of this script.

It casts a ray from the camera and checks for collision using the ray_cast function of the BVHTree module. I have documented the script with lots of comments. Paste in Blender Text Editor and press Run Script.

Demo of the raycasting.

import bpy
import bmesh
from mathutils.bvhtree import BVHTree
import mathutils

# the epsilon value for the BVHTree calculations
EPSILON = 0.00001

# maximum ray distance from camera
MAXIMUM_DISTANCE = 100

# make sure you have a Camera and an Empty named like this
camera = bpy.data.objects["Camera"]
empty = bpy.data.objects["Empty"]

# create the BVHTrees from bmeshes
# the bmesh conversion makes it easy to apply the individual objects transformation matrices
trees = []
for ob in bpy.data.objects:
    if ob.type == 'MESH':
        bm = bmesh.new()
        bm.from_object(ob, bpy.context.scene)
        bmesh.ops.transform(bm, matrix=ob.matrix_world, verts=bm.verts)
        trees.append(BVHTree.FromBMesh(bm, epsilon=EPSILON))

# the main method for calculating the distance
def measure_distance(scene = bpy.context.scene):

    # create a direction vector (dir) by applying the
    # camera's transformation matrix to (0, 0, -1)
    mat = camera.rotation_euler.to_matrix().to_4x4()
    if camera.rotation_mode == 'QUATERNION':
        mat = camera.rotation_quaternion.to_matrix().to_4x4()
    dir = mat * mathutils.Vector((0, 0, -1))

    # use the min_dist variable to keep track of the nearest collision location
    min_dist = MAXIMUM_DISTANCE

    # if no rays collide < MAX_DISTANCE, we'll display the Empty
    # at the camera's location
    vloc = camera.location

    # loop through each bvhtree and check if the is a collision
    # casting a ray; if the distance of the collision is smaller
    # than min_dist, we'll use this newfound location
    for bvh in trees:
        loc, no, i, d = bvh.ray_cast(camera.location, dir)
        if d is not None:
            if d < min_dist:
                min_dist = d
                vloc = loc

    # assign the location to the empty to visualize the ray collision
    empty.location = vloc

# remove all handlers, then create a new one with the measure_distance function
for h in bpy.app.handlers.scene_update_pre:
    bpy.app.handlers.scene_update_pre.remove(h)
bpy.app.handlers.scene_update_pre.append(measure_distance)

You can now use the found coordinates in the vector vloc to do whatever you want.


Equivalent tool to Modo tack tool? is there any tool in blender that is similar to the tack tool in Modo?

here is a video of the tool in action:

https://www.youtube.com/watch?v=9aeRkIkQl1c

it use snap to mesh surface + duplicate

Thank you!

Shrinkwrap modifer + Duplifaces

Green cone is instanced while snapped to Suzanne's geometry:

Add a Plane, scale it down in Edit mode to something like 0.01
Add Shrinkwrap modifier to the Plane, switch to Project mode, enable both directions to shrink, set Target mesh and enable Adjust edit cage (all icons near modifier's name)
Add object to be duplicated, parent it to the Plane
In Plane's object settings enable Duplifaces

Now in Edit mode you can start copying Plane (SHIFT-D), move copies and in realtime see result of their placement. If direction of Dupli gone wrong then flip normal of a plane (Edit Mode->W->Flip Normals)


Object rotate in a strange way today i run into another problem. i dont know how i have done it (probably i clicked sth what i should not click) - anyway - since that moment my objects are behaving totally different when i try to rotate them. the objects are now rotating around the pivot point but they keep their alignment - not sure if i am clear. eg. if u would rotate a plane which is lies flat on the ground it makes the rotation but the faces of the plane would still be up and dont which shouldn't be the case with the "normal" rotation that i know. so i want to understand what i have done (because this kind of rotation could be also usefull sometimes for me) and how can i return it in the case it happens again.

Probably you have turned on "Individual origin" Pivot point.


Best way to add a face if I modeled the body first? I'm modeling a character and am pretty far into it. I modeled the body first though and the face is in the center of the body (it's a cartoonish character). This means I'm gonna have to mess with the vertices in the center of the body to make the face. Can I make a face and then add it to the face or should I move the bodys vertices to make y face? I'm new to all of this so help from those of you is greatly appreciated.

I would say that it depends on your level of detail. If your face is mostly a texture and you can get the geometry you need by just moving vertices around on the body, then I would take that route.

But if you need to add significant amounts of geometry, then you will need to change your body geometry to keep good topology. See this article from cg cookie.

Topology (basically having your edges flow cleanly) is important for animation and texturing. Too keep good topology you will probably need to modify your body's geometry. Whether you want to split edges as needed and keep the body mesh, or just start over with a new face mesh, is up to you.


How to rotate scene via python script? I'm super new to Blender and working on a script for Blender. My question is how to rotate scene via python script, just like using middle mouse?

Thank you.

Thanks to batFINGER I've found the answer

import bpy
from mathutils import Euler

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces.active.region_3d.view_rotation.rotate(Euler((0, 0, 0.01)))


"No compatible GPUs found" - Arch Linux When I open Blender through terminal it has no error messages, however when I open settings I am greeted by this message.

I am using an AMD Radeon R9 390X graphics card with the amdgpu driver. I know that my GPU is supported.

Is there anything that I can do?

You might need to install the proprietary AMDGPU-PRO drivers, or at least the OpenCL part of it. The quick fix is to install opencl-amd from AUR:

git clone https://aur.archlinux.org/opencl-amd.git
cd opencl-amd
makepkg -s
sudo pacman -U opencl-amd-*-x86_64.pkg.tar.xz

(You might have to downgrade libdrm for opencl-amd to work, see here.)

Note that Arch Linux is not officially supported by AMDGPU-PRO.

Resources

Arch Wiki: "Blender does not show the AMD card as an OpenCL rendering device"
Arch Wiki: AMDGPU PRO


Painting on OpenEXR MultiLayer images I always render my animations in OpenEXR MultiLayer format with various render passes turned on. Is there a way with Blender's integrated paint editor to paint to the render passes of such an .exr file? It seems I can only paint to the "combined" pass, which I am not using at all though. If I try to paint to any other render pass of the .exr file I get the error message "Image requires 4 color channels to paint".

Purpose: Often I just have to correct few pixels in a particular pass of a rendered .exr file. I could also add a complex node network to the compositor just to correct those few pixels, but in such cases editing/painting the pixels of the respective render pass inside the affected .exr file would be much faster.

I saw there is now also a plugin for Gimp, which allows to import OpenEXR files. Has somebody tried it with multi-pass .exr files? Does the Gimp plugin work reliably without screwing something? Because I still need it to be in multi-layer .exr format after editing for the subsequent compositor stage.

I just grabbed Blender 2.72b source files to check this issue.

In short: with current Blender (2.72b and older) it is only possible to draw to the "combined" and "vector" passes of a multilayer OpenEXR file with Blender's paint tool.

Reason: Blender's low level paint tool C algorithms (filling, painting a stroke, etc.) are all solely working on 4 channel interleaved float buffers internally. The "combined" and "vector" passes are always stored as 4 channel layers to .exr files by Blender, so those are fine, but most other render passes are stored as 3 channel layers or even 1 channel layers to .exr files and when Blender opens those other layers from .exr files it allocates 3 channel (or 1 channel respectively) interleaved float buffers internally for them.

It also does not make any difference BTW whether you select "RGB" or "RGBA" in the render settings, you will get the same .exr file and end up with the same problem.

UPDATE: I wrote a patch against Blender 2.72b which solved this problem for me. Feel free to test it, forward it to Blender developers or whatever you think might be appropriate. Please note that this patch is neither optimized, nor thoroughly tested, so make sure you have a backup of your .exr file(s) before painting to them.


add panel to invoke_props_dialog im creating a popup menu with invoke_props_dialog and i want to add a already existing panel, kind of like layout.popover but i want the content directly in my menu.

import bpy

class Test_Popup(bpy.types.Operator):
    bl_idname = 'test.popup'
    bl_description = 'test'
    bl_label = 'test'

    bl_options = {'UNDO'}

    @classmethod
    def poll(cls, context):
        return True

    def invoke(self, context, event):

        return context.window_manager.invoke_props_dialog(self, width=250)

    def execute(self, context):
        return {'FINISHED'}

    def draw(self, context):
        layout = self.layout

        #NOT this, like this but i want the content directly in the panel
        layout.popover('CYCLES_RENDER_PT_sampling')

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

register()
bpy.ops.test.popup('INVOKE_DEFAULT')

Import the classes, use their draw method.

If you enable developer tools in preferences you can right click in the UI and choose view source.  Doing this for the cycles render panels you will see the classes are defined in ui.pyof the cycles addon.  Can import them with

from cycles.ui import CYCLES_RENDER_PT_sampling, CYCLES_RENDER_PT_sampling_advanced

Note: some areas have their own context members.  Eg PROPERTIES might use context.speaker for the data panel of a speaker object. This may lead to errors using the method outlined here.

Test run in text editor

Test code.

import bpy
from cycles.ui import CYCLES_RENDER_PT_sampling, CYCLES_RENDER_PT_sampling_advanced

class TEST_OT_popup(bpy.types.Operator):
    bl_idname = 'test.popup'
    bl_description = 'test'
    bl_label = 'test'
    bl_options = {'UNDO'}

    @classmethod
    def poll(cls, context):
        return CYCLES_RENDER_PT_sampling.poll(context)

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self, width=250)

    def execute(self, context):
        return {'FINISHED'}

    def draw(self, context):
        layout = self.layout

        CYCLES_RENDER_PT_sampling.draw(self, context)
        layout.label(text="Advanced")
        CYCLES_RENDER_PT_sampling_advanced.draw(self, context)

# for testing
def register():
    bpy.utils.register_class(TEST_OT_popup)

register()
bpy.ops.test.popup('INVOKE_DEFAULT')


Blender Eevee Vector Motion Blur? So I am trying to use Eevee to render this animation, and I want to add motion blur. I like using the vector blurs in cycles but is there a way to use the nodes in Eevee?

I don't see a way to add a vector pass for eevee like in cycles

You can use a mix of both renderers to get a mask. The Cycles scene would be super extra low fi to give you a fast render, and then you grab the Vector and the Depth from it and use it on the Composite screen to mix with your new Eevee render.
Here is one example of how to do it:
http://blenderboydiaries.blogspot.com/2019/01/how-to-get-motion-vector-blur-in_17.html


How to merge surfaces that lie in the same plane? I guess it's like undoing a subdivision, except it's not always neatly subdivided into even quads. How can you merge a surface made up of multiple triangles and quads/gons into a single one?

Since I'm dealing with a 500mb obj file I'd really appreciate if there's some fast way to do it for the entire model automatically.

Edit: I tried googling "merge coplanar faces" and I got the suggestion to do a "Limited dissolve (object mode: press x, then limited disolve) but this crashes blender. Any other ideas maybe?

I'm running 16gb ram, ryzen 5, nvidia tu116

There is the Decimate Modifier, with it's Un-Subdivide option.
Very useful for undoing unwanted subdivisions.

Set the number of iterations as needed.
Use 2 iterations to undo 1 subdivision step.

To better see the end result, you can enable wireframe overlay in the 3D viewport.


I parented a light source to an object, Is there a way to apply a modifier to both?[cycles] I'm trying to make a street lamp, so i parented a light source (an area light) to the lamp object. The problem is when I add an array modifier to the lamp it only applies on the lamp mesh leaving me with only one light source.
Is there a way to make it applicable to both the object and the light.

Thanks!!

I have also been trying to add lamp posts along a road path via blender scripting, and here's the solution I applied:

Add a lamp post mesh which will become the parent of your light source (If your mesh consists of multiple parts, join them by 'Boolean Modifier > Union')
Add array modifier (and curve modifier if your road path is a curve) to your lamp post object to copy it along the road, then apply the modifiers
Apply 'Seperate > By Loose Parts' to your lamp post object to get multiple objects instead of one
For every lamp post, add a light source and make the lamp post the parent of light source

You can see my approach in code down below:
bpy.ops.import_mesh.stl(filepath=os.path.join(os.path.dirname(bpy.data.filepath), "models/lamp.stl"))
lamp_ob = bpy.context.selected_objects[0]
bpy.data.collections["Lights"].objects.link(lamp_ob)
bpy.context.scene.collection.objects.unlink(lamp_ob)

if laneCount == 3:
    lamp_ob.location = (0,4.2,0)
else:
    lamp_ob.location = (0,3.2,0)

lamp_array_mod = lamp_ob.modifiers.new("LampArray", 'ARRAY')
lamp_array_mod.fit_type = "FIT_CURVE"
lamp_array_mod.curve = road_curve
lamp_array_mod.constant_offset_displace = (15,0,0)
lamp_array_mod.use_constant_offset = True

lamp_curve_mod = lamp_ob.modifiers.new("LampCurve", 'CURVE')
lamp_curve_mod.object = road_curve

for modifier in lamp_ob.modifiers:
    bpy.ops.object.modifier_apply(modifier=modifier.name)

bpy.ops.mesh.separate(type='LOOSE')
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME')

for index, obj in enumerate(light_collection.all_objects):
    bpy.ops.object.light_add(type='POINT', radius=2.0, location=(0,-0.25,1.25))
    light_ob = bpy.context.selected_objects[0]
    light_ob.name = "Light" + str(index)
    light_ob.parent = obj
    light_ob.data.energy = 500
    light_ob.data.specular_factor = 10

This may not be the best scripting practice and there are some lines not related to the solution, so anyone can reach me out if any further explanation is needed :)
Footnote: I use .stl models since texture is not required for models in my case.


How to create a material that is part solid, part transparent wireframe? For a 3D rendering of an organ, I would like to make part of it a transparent wireframe so the contents become visible (similar to this image, only I would like to have a much smaller area as the transparent wireframe). Could anyone point me to a tutorial, our explain me a bit how to approach this? Thanks!

In Blender Internal render engine, you can use Freestyle. To enable freestyle - Go to the render panel and click freestyle -

Then go to edit mode, select the edges that you want to render and press "Crtl+E"
and click "mark freestyle edge".

Then go to "Render Layers", click on the Line set that should be automaticly created and click only on "edge mark"

Then on the tab "freestyle line style", you have options for the lines.

Then you can click on render.


Animation Nodes: How to cut copy and paste functions For example I want a function who is
cossinus from less infinite to zero (time info)
then square root frome zero to 100
then end here.
How could I combine this ?
More explanations:
I got a funtion cossinus who use time frame for x. I want to cut it for the x value from less infinite to 0.
Then I have an other function who is square root and have frame time for x. I want to cut it for the x values from 0 to 100. Then I want to paste both cut to make one function.

Use a switch node and a compare node to evaluate the input x.


Bump map appears pixellized Since this morning I can't make any bump map work properly, they always appear pixellized, in OpenEXR format or with 32 bit Float, either in 2.8 or 2.9, it doesn't seem to be the Terminator effect either, so I don't know what I'm missing here, can it be a graphic card problem (even though it used to work fine before)?.
Here is a screenshot of the result:

The file is here:

My problem is that my picture is not 32 bit Float contrary to what I thought, and probably also low quality. That said it looks like since 2.8 there's a problem of pixellisation of bump maps in Eevee (link provided by Lemon).
You can smooth the bump by switching the Image Texture from Linear to Cubic.
Another trick to smooth the bump is to give the material a bit of Subsurface Scattering as explained here by Melting Prod (in french). Keep the Radius value low:

Before and after:


How display and use operator properties in a Python Blender UI panel? I have try to make an UI Panel with my operator, but i can not create a panel with the 2 choices (axis and widht).

I can create a button who launch a menu in the tools pannel, and the operator works fine with this :

layout = self.layout
layout.operator(ChooseAxis.bl_idname)

But i want to have exactly this menu in the UI panel, not in tools, so I have try to write this :

layout.prop(obj, "axis")
layout.prop(obj, "newdim")

But that doesn't works, values are modifiable but are ignored and do not modify the object.

How can i have the operator directly on the UI Panel ? (Not a button to launch the operator, but the operator himself with its Properties.)

Moreover, how i can keep the object size value when i launch the operator ?
Because when i launch it, it the default value of the newdim property is set to 1 (for example), the object is directly resized. Is it possible to have a default="object actual value" ?

here the entire script with the ui panel created :

from bpy import *
import bpy
from bpy.props import FloatProperty, EnumProperty

class ProportionalDimensions(bpy.types.Panel):
    """Creates a Panel in the Object UI window"""
    bl_label = "Proportional Dimensions"
    bl_idname = "prop_dim"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    #bl_context = "object"

def draw(self, context):
    obj = context.object

    #row = layout.row()
    #row.label(text="Active object is: " + obj.name)

    layout = self.layout
    layout.operator(ChooseAxis.bl_idname)

    layout.prop(obj, "axis")
    layout.prop(obj, "newdim")

class ChooseAxis(bpy.types.Operator):
    bl_idname = "object.choose_axis"
    bl_label = "Choose_the_Right_Axis"
    bl_description = "This is to choose the axis"
    bl_options = {'REGISTER', 'UNDO'}

axis  = EnumProperty(
        name="Axis",
        description="Axis selection",
        items= [('x', "X", ""),('y', "Y", ""),('z', "Z","")],
        default='x'
        )

newdim = FloatProperty(
        name="Width",
        description="Scale",
        min=0.01, max=100.0,
        default=1,
        )
# your code
def scale(self, axis, new_dim):
    ob = bpy.context.active_object
    d = ob.dimensions

    x = d[0]
    y = d[1]
    z = d[2]

    scale =  axis

    if( scale == "x"):
        indice = 0
    elif( scale == "y"):
        indice = 1
    else:
        indice = 2

    old_dim = d[indice]
    factor = new_dim / old_dim

    scale_x = ob.scale[0]
    scale_y = ob.scale[1]
    scale_z = ob.scale[2]

    ob.scale[0] = scale_x * factor
    ob.scale[1] = scale_y * factor
    ob.scale[2] = scale_z * factor

def execute(self, context):
    self.scale(self.axis,self.newdim)
    return {'FINISHED'}

def register():
    bpy.utils.register_class(ProportionalDimensions)
    bpy.utils.register_class(ChooseAxis)

def unregister():
    bpy.utils.unregister_class(ProportionalDimensions)
    bpy.utils.unregister_class(ChooseAxis)

if __name__ == "__main__":
    register()

You usually run an operator and adjust the settings afterwards in the Redo panel, or the operator should prompt the user before execution using invoke_props_dialog():

import bpy

class SimpleOperator(bpy.types.Operator):
    bl_label = "Simple Operator"
    bl_idname = "object.simple_operator"

    my_enum = bpy.props.EnumProperty(
        items=(
            ('ONE', "One", ""),
            ('TWO', "Two", ""),
            ('THREE', "Three", "")
        ),
        default='ONE'
    )

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

    def execute(self, context):
        self.report({'INFO'}, self.my_enum)
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

    bpy.ops.object.simple_operator('INVOKE_DEFAULT')

If you really want to display UI elements in a panel to be set before clicking the button, you will have to register global properties and pass them to the according operator properties (you can't add operator properties to a panel).

import bpy

class SimpleOperator(bpy.types.Operator):
    bl_label = "Simple Operator"
    bl_idname = "object.simple_operator"

    my_enum = bpy.props.EnumProperty(
        items=(
            ('ONE', "One", ""),
            ('TWO', "Two", ""),
            ('THREE', "Three", "")
        ),
        default='ONE'
    )

    def execute(self, context):
        self.report({'INFO'}, self.my_enum)
        return {'FINISHED'}

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

    def draw(self, context):
        layout = self.layout

        ob = context.object

        row = layout.row()
        row.prop(ob, "my_global_enum", expand=True)

        props = layout.operator(SimpleOperator.bl_idname)
        props.my_enum = ob.my_global_enum

def register():
    bpy.utils.register_module(__name__)

    bpy.types.Object.my_global_enum = bpy.props.EnumProperty(
        items=(
            ('ONE', "One", ""),
            ('TWO', "Two", ""),
            ('THREE', "Three", "")
        ),
        default='TWO'
    )

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Object.my_global_enum

if __name__ == "__main__":
    register()


Freestyle animation has delay in cycles When rendering my scene as an animation, on particular frames (in this instance, 17), I often get a delay in the outlining, like it's trying to outline the next/previous frame.

This doesn't happen when rendering the frame normally - as in not an animation.

It looks like this:
When animated

When rendered normally

It's like the actual render is delayed by a frame, but only when animated.
Is this a known bug?

I found using cycles and freestyle so slow (like minutes) that its easier to clone the project file, then replace all the cycle materials for a simple diffuse transparent BI material and run it with BI.  Then composite the frames with the other rendered frames. Of course, I have thousands of polys so it may not help if the model is low poly.


My object appears jagged with shape keys and subsurf So, I made a human face model and tried to animate some basic animations with it using shape keys. I was using subdivision surface to make it appear smooth as well.
(Also, if this could be the problem, I had just assigned everything to an armature)

In the middle of a blink animation, I noticed something strange about the eyelids as they were in mid blink, I paused the playback to see if I was right

And this is what I saw.

I turned off subsurf and I saw what it used to look like

Can I get an answer? I want this done soon, (tomorrow is best).

After doing a little exploration, it seems that the shape keys are only affecting one vertice at a time, and not vertices created by subdivision surface

Ok, so I figured out what the problem is;
So you know the list with all the modifiers on it?

Well, the subdivision has to be on the BOTTOM of the list, I moved it up to be able to access it quickly, but that made it so that it subdivided before the hook modifiers, making it appear jagged!


General request regarding render engine i'm a newbie in BLender 2.82 and i'd love to have some tips. At the moment, i have difficulties to render well while i'm using an RTX 2070 super ventus...CUDA is selected but do i have to check GPU and CPU rendering or only GPU? i'm running on Linux UBUNTU FOCAL FOSSA maybe it is slow down no?
Also, what are the best settings to render animation in evee and cycles. I know each projects are different but i was thinking mainly or on average what settings should i use? (sampling, passes...etc...)
Hope an expert or several could help!
Cheers

OptiX

Quick answer is:

To take advantage of RTX hardware raytracing, select OptiX
otherwise GPU + CPU is mostly faster than pure GPU if you select the CUDA option, unless you would have a very weak CPU

Official blender announcement one year ago

https://code.blender.org/2019/07/accelerating-cycles-using-nvidia-rtx/

Some benchmarks by random users

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

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

https://www.reddit.com/r/blender/comments/cwx14w/some_rtx_optix_benchmarks/

Render settings

Regarding the render settings, that is very subjective and highly depends on the lights setup, types of materials you use and other factors. I can't answer that in a general sense. The defaults are good for start. Diffuse-only scenes with simple direct lights will look fine with much less samples per pixel than complex scenes with glossy objects and many lights or indirect lighting only. The new adaptive sampling in 2.83 will help towards more universal settings, but it will still remain a matter of experience and subjective judgement.