Blender renders always frame 1 on 2nd computer I'm using a second computer to CPU cycle render an animation on Windows 10. I have the "common" setup to use the same project file (network drive mapped) on both computers with the same output directory, same Blender version, same OS version, render single PNGs, unticked overwrite and ticked placeholders. While the computers pick the right frame numbers to render, the second computer always renders the first frame (into the picked frame number). Any idea what I could do wrong ?

The preview on the second computer looks right in every display mode but single rendering one frame seems also to be animation messed up (wrong position) when I jump to a frame number and render this single frame (but I assume that this is also the case with just one computer).

Any help would be great !

EDIT:
I have recognized, that both computers use the same blendcache directory, could this be a problem ?

I answer the question on myself. I can't excatly describe what the problem was, but I...

a) updated from Blender 2.79 to 2.80 beta
b) baked animations and physics
c) corrected dope sheet animations with start and end points

As side effect I have a ~5x performace gain, what is great, I'm not sure if the new blender or the baked animations did this.
Now parallel computation on 2 notebooks and 1 desktop runs fine, resulting in another ~3x performance gain. :-)


Blender freeze for minutes while saving Blender freezes for minutes when i save a project , a render etc ... even if i try to save a simple box the issue is here .
i have a surface book 2 GTX 1060 and CPU I7 , blender was working nicely until recently .
Does anybody has an idea ?

thank you .

When you save a file, it actually adds to the amount of memory being used in Blender currently. This happens to me quite often. When this gets bad enough, I usually save the file a last time, and then open the Blender file again. When I re-open the file, the previous saves' memory and history is not accounted for, and saving again is very quick.


How to visualize a value resulted from math node? How to visualize a value resulted from math node,or just to know it.
I tried the way of scaling this value to the scene size and then pick the color and get the value but I want more effective way to do this.

Just plug the value directly into compositor output:

Check the Auto Render option in the header to have your composite update.

In the Image Editor see the value with right-clicking on the grey rectangle:

You will see values less than 0 or more than 1 also. No need to scale them.

But you can't see it always, you have to fiddle with the nodes then right-click and check value, can't change node while seeing the output. Blender lacks this functionality.

Theoretically one could make some value visualizer from translating and cropping a picture of numbers with some math involved..or something similar..so here you go:

Image (no need to download its packed in blend):

Blend File with node group:

It will replace your composite with numbers on black background:

This node-group for every decimal of input crops that number from the number-strip (image texture inside the group) and then translates it onto its position.

Due to some rounding artifacts sometimes you might get weird result but its good enough. Its a floating-point limitation.


How create perfect mask using ID Pass ( "clown pass" in Photoshop)? Has anyone looked at the tutorial? regular ID Pass so that later in Photoshop it will be easier to select the necessary objects. But what I don't understand is that even if you have this ID Pass (Clown Pass), you still can't make perfect masks, the first picture shows how bad everything is. How did the dude come out of the video? How? He has perfect masks in the channel, perfect, how simple? How? (second picture - ideal masks that I'm talking about)
Video Tutorial i am talking about

Workbench
It is not that easy :) and in some cases just impossible. If you want to just make parts darker or brighter, there is a change you just dont notice, but it would be there.
This "imperfection" comes from anti-aliased pixels generated on object edge to make them smooth. They consists partly from foreground color and partly from background color. So they are not purely defined only by single color.
To get a pixel perfect for selection you would have to render with Workbench > Render Properties > Sampling > No-Anti-Aliasing, but this renderhas ugly pixelated edged. What people use to do is render double size of final render and downsize after compositing.

Cryptomatte
Feature designed to work with "passes". Check some tutorials. Image saved as Open EXR Multilayer can store cryptomatte data and can be used also by other programs (like Fusion or Nuke). For work with Photoshop EXR – IO plugin should work for you (seems like only for Win).
Blender Manual – Cryptomatte
Cryptomatte tutorial example
Here I got a solution in Blender Compositor. Since this node tree based on InPaint node is technique before cryptomatte time it could work also on Workbench render too.
Result of default setup (issue on edge)

Result of edge refined by node group

Node Group

Detail default issue on edge vs refined edge. For the best result adjust ColorRamp nodes.


How can I create a template for a class of objects? I would like to create a program for generating a class of objects using Blender and Python. Basically, I would like to create an addOn or a program that can generate different types of the same object, as different models of cars. Let's say that I have a basic model and I would like the user can modify some parameters as the wheels, the length of the car, the seats and so on in a really user-friendly interface. The final effect I am achieving is something like MakeHuman, the tool in which you modify some characteristic of a human being in order to obtain your personalized one. Obviously I am not trying to create a tool with the same complexity of MakeHuman but I would like to have something simpler but in the same time similar for the class of objects I have in mind.
How do you suggest to start? Do you have some recommendations? Do you thing that using Python in Blender is a good choice?

The choice of the technology is quite subjective but yes, blender and python could be a great solution depending of the complexity of the transform you need to do. I've made some addon that can generate complex object based on parameters and it work pretty well.

You could begin by defining a list of properties that can be displayed in a Blender addon panel, and add an update function on each of them that will redraw your car or parts of your car based on this parameter, change the size of the wheel base on a FloatProperty , the type of wheel or vehicle with an EnumProperty, ...

So, this is possible but keep in mind that if you want to make really complex operations, like mesh transform on high poly models, load complex parts, ... the update function will take more time and the properties update could make blender a little laggy. You can also decide to forget the real time idea and the update function in this case, to change the parameter and the clic a "process" button for more complex operations.

The question of the user friendly interface is another point. Do you think that blender is user friendly enough? The solution I gave you would be a Panel in the blender interface, surrounded by other blender functionalities. This is an easy and quick way to do what you want but your interface wont be dedicated to your app.  (It is maybe possible to do something better with blender games but this is out of my area of knowledge)


should i delete these empty keyframes? say, an animation clip has one piece animated, which moves along one axis, but keyframes will be created for other two axes too. should i delete those?

example: should i delete keyframes in red box, blue box or should i not touch anything at all?

//edit: does having these affects performance?

To extend Delagone's comment: It does not matter.

But every time you delete these keys (autokey), you're doing unnecessary work. Time which you could spend setting new key, which you need. I advise you to get used to having lots of keys around.

Another pitfall is to accidentally change the transformations later, if you have channels, which aren't keyed, you're going to loose the values you had before. Leave your additional keys in place, even if they don't seem necessary. Quite a lot animators even key all channels regardless how small the amount of channels (bones, etc) is that they changed, just so a characters pose if fixed, no matter what attributes / channels are changed later.

If the additional keys still disturb you, here is a workaround.
After moving your bones / objects to their initial transform, lock all attributes, which you don't want to key. Then create a button keying set with the channels you want to animate. Then set the active keying set, to the one you created. If you're using autokey, check the keying set button next to the autokey button.


Problem with curve modifier When I am in Edit mode, the curve modifier doesn't work but
when I go to Object mode, the curve modifier works but the object (the rail) moves to the left.
Any ideas?
Thanks.

Here is the file:

It's because the mesh and the curve haven't got the same origin point. Select the curve, press Shift+S-->Cursor to Selected. Then select your mesh and press Shift+S-->Selection to Cursor.


Adding Modifier (Mirrored) I'm trying to add the Mirror modifier to a cube. I'm in Object Mode, I click add Modifier. When I click apply, the modifier disappears.

In Edit mode I can't add the modifier at all.

Am I doing something wrong?

You mirror in the X direction (along the X axis). From your screenshot, the center of your object is in the middle of the 'left' side, which means that the original and generated (mirrored) points overlap.
Selecting the Y axis as mirror axis probably does what you want.

If you already applied the mirror modifier, you might also want to 'remove doubles' to get rid of superfluous vertices (which can give strange effects with e.g. subdivision or bevel modifiers)


Extending an F-Curve in a certain channel I am animating this long walk for a character. And it is super easy to duplicate the keyframes of the walk cycle. But I'm facing the challenge of keeping the Torso (The Root) consistently going forward on the Y axis. I am not a big fan of NLA. And I also want to add some nuances to the walk throughout the animation, so for me the Action Editor is a no go.
In the Below Image on the Graph Editor, I managed to manually duplicate the Y keyframes from 1 to 41. At frame 41, the walk cycle ends and I have to repeat it a couple of more times. But unlike the rest of the walk cycle keyframes, the Torso's are not stationary and they have to dynamically translate along the Y channel. Is there a way I can extend "prolong" this curve consistently across in the Y Location Channel?
I also attached the Blend file for your reference.
https://www.mediafire.com/file/tsdmfmr9h1ii44i/Blender+Exchange+File.blend/file

If you select a point of the F curve you can read its values on the view tab on the right of the curves window (just under modifiers).
I'm assuming that your first keyframe you want to copy is frame 3, value 0.7, and the last is frame 65, value - 2.3.
So you want to copy the curve with an offset of 63 frames on X and a value of 3 on Y.
So select the curve points, shift D to duplicate, X to move on X axis, 63, Enter.
Then Press G, Y, - 3 Enter.
Then you'll have to globally adjust the Y values of the copied keyframes to compensate the needed little movement between frame 65 and 66.


Allow ray to see through properties? Here is my code:

import bge
from bge import logic

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

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

if (ray.hitObject and not 'Fire_False' in ray.hitObject):
    target.worldPosition = ray.hitPosition

I've noticed that if you have an object with the prop "Fire_False" and an object behind it without the prop, the ray doesn't track to the object behind the first. I am looking to modify this script so the ray can look through the object with the prop and find other objects behind it. If the script sees a situation like this, it uses the object with the prop as a dead end, and does not continue tracking. How can I have this ray see though props? Any help is appreciated. Thanks!

EDIT: I would also like this to work if an object in in another object and the bound object does have Fire_False, but the object in it doesn't.

You are thinking of this backwards from how the ray sensor works. You want to look for "target" no mater what is in front of it.

Add a property to everything you want to get hit say "target". Then change the ray senor to look only for that property ("target") and enable X-Ray Mode.

Last your code can then look like this.

if ray.hitObject:
    target.worldPosition = ray.hitPosition

X-Ray Mode will let the ray look through everything, and the property will only return the objects with the property "target."


Aligning rotation to target along z axis why brown object not snapping to face like other gray object in scene while i turn on all required setting.i locked rotation setting to avoid  unnecessary rotation. object should rotate along z-axis only using snapping option is it possible.

With this snapping options, and in particular with "align rotation to target" checked:

Moving an empty, you can notice that the Z axis is align to the target face normal and Y axis is up for the lateral faces:

But strangely this is not the case for a mesh:

Though, if you place a first mesh, then duplicate it, you can have the wanted result:

Duplication is not actually needed, you can place the object on a first face then move it again.

In my opinion (this is only an opinion), the code behind may do so that the rotation is minimal when snapping.

PS: locking rotation is not needed here.


Geometry Nodes Attributes Precisely what are attributes in the context of geometry nodes?
I have been able to find little to no documentation and/or community info on this subject.
Explaining or linking to an in-depth explanation would be appreciated.

the attributes are to control particles you can use them to change particles scale, rotation, etc...
I have a tutorial you can watch here: https://youtu.be/YudUfp0N2QU


Array modifier displacement I'm working on som abstract art in blender, and therefore I want to use the array modifier. The problem is that I want to have some displacement on my object. See the picure below:

I want to edit every single hexagon object. This model is made with the Child-parent and a displace modifier on the object.

How can I make this, so that I can edit every hexagon, and not just the parent?

1st make the duplicates real with Shift+Ctrl+A or object menu/apply/make duplicates real.

then make them single user with U (or object menu/make single user) objects & Data (& materials if needed)

Now you have different objects with different mesh data you can edit.


Where is "Absolute Grid Snap" option in latest 2.8 release? Where is "Absolute Grid Snap" option in latest 2.8 release?
It's not in the snap settings options?


Increase object quality for 3d print export? I've created/edited an object and I can't get the 3D object export to have the same settings / apparent face resolution as the edited "version".  Please see screenshots.
As you can see, the edit "version" number of faces are higher than the object "version" number of faces.  When I export the object as an .stl it has the lower resolution of the object "version".  How to I force it to carry the edit "version" properties for higher face count in the object "version" for export as .stl?

The lower resolution looking mesh may have the same number of faces, but they are coplanar, so it looks like they are all one. You need to use some sort of smoothing operation to get the faces to be at different angles relative to eachother.


How to import Cad models into Blender the easy way I use a lot of Cad models I find or make, and I import it into blender to animate. I have always used .STL and then when in Blender I select every triangle and vertex so I can add materials and textures to certain parts. I am wondering If there is someway to import Cad models into Blender and all the parts are already separated so I don't have to select every vertex? This would save me tons of time. Thanks

Press P and choose by Loose Parts. That creates a separate object for each group of connected vertices.


COLLADA scene shows different rotation axis when imported in ScenKit I have a blender scene with a mushroom inside it, which seems to be perfectly straight aligned with the axes:

When I import it in xcode (inside a scnassets directory), although I select "always use the Y-up axis", the object seems to be rotated and placed in a wrong direction:

It seems like if SceneKit is using a different coordinate system. But unlike for obj files, there's no way to fix that when I export the files. Any suggestion?

Sometimes you just have to make allowances in your workflow. The images in your question seem to suggest to me that the issue is that the axis Blender labels as "X" is being named by your target environment "Y"; so when you're making your object, mentally swap the x and y axes as you build your model.


2.8 Beta Hotkeys for manipulators Is there any way to define hotkey for selecting manipulators in 2.8? I found one thread mentioning view3d.enable_manipulator command but that worked for 2.7.3, while https://docs.blender.org/api/blender2.8/ does not mention enable_manipulator method so my guess is it got moved somewhere?

Currently the view3d.enable_manipulator command appears to be disabled in Blender 2.8 beta.

The next best solution that I could find is changing the Spacebar Action in your preferences to "Tools".

This will activate your tools menu when pressing the spacebar, allowing you to access the hotkeys for the manipulator.


Animation Nodes - initial values I am trying to create an animation nodes project where an empty will be used as an interactive controller for another object. I need to give the empty an initial position away from the origin as the position of the empty determines the size of a mesh.
For the sake of usability and simplicity, I am instancing the empty, rather requiring the user to manually create one and enter it into an object input node.
Here's my problem. I can give the initial position via a transformation output node. However, the empty will then return to those coordinates every time the node tree executes.
My best idea so far is to have some kind of value that indicates whether or not the current execution of the node tree is the first or not. If it is the first, then position the empty at the initial position (e.g. 1,1,0). If it is not the first execution of the node tree, then leave it where it is. However, I do not know if it's even possible to determine that within animation nodes.
I'm illustrating that idea in the image below by having a switch node determine whether to place the instanced empty at a pre-determined position, or allow it to be moved freely by the user. If I could somehow plug in a test for "is this the first execution of the node tree?" into the switch node, then this would work.

Any ideas, please?

You can test if the object is already in a collection (search from its name). And only if not found, create it and assign the name.


Blender 2.8 How do i make objects with Render View disabled to not be visible on Viewport / OpenGL Rendering? I have some objects which i do not want to be disible on the Viewport nor the OpenGL rendering previews, back in 2.79 it worked just fine by disabling render view on the outliner and enabling the 'only render' box on the right side pannel (the one you view with N on 2.79)
and now in 2.8 there's the 'hide overlays' option but it doesn't hide those objects anymore.

is there a way to get the same result in 2.8??

The options are still there, they are just hidden in the filter dropdown:

Make sure all the buttons are selected. I think they did this to keep the UI cleaner, but I'd probably have left on at least render visibility option by default. Hey, it's still a Beta though, so maybe they will "fix" that. :)


I can't find the surface dropdown in the material tab It looks like this, and I want to change the Displacement value from Bump only to Both so that the mesh has a real bump not just a fake one. Did blender have done an update?

Just to illustrate Gorgious's comment.

Material options depend on the selected Render engine.
To get Displacement settings, you need to switch to Cycles.


Re-question: Shape of mouth is awkward I'm doing rigging of the mouth using rigify.

Ringging seems to be good(I think), but when i open the mouth, the shape of mouth becomes a little awkward.

Do I have to make the weight paint work more delicate to solve this awkwardness?

Or Is modeling the problem itself?

Here is the .blend file: https://www.dropbox.com/s/3n6i83715d95e3a/2b_11_mouth%20is%20awkward.blend?dl=0 Here is video that show the problem: https://youtu.be/dVGSkKjqIqw

TRy going into edit mode on your mesh. Then, select the weird part and find out what bone you want to control it. Then in vertex groups click on the black arrow and remove from all the vertex groups. Then, click the group of the bone you want it on and click assign.


Emulate 3 Button Mouse not working on Satellite laptop The Emulate 3 Button Mouse feature doesn't work as described. ALT+LMB causes the entire Blender window to resize and then move in tandem with the motion applied to the mouse-pad. Is there any additional setting beyond clicking the Emulate 3 Button Mouse box that must be set correctly in order for this feature to work?

@Sybren

A. When you say, "conflicting keyboard shortcut," do you mean a shortcut in Blender itself, or something universal I may have done with my laptop? I have not intentionally set up ANY shortcuts yet in Blender.

B. If I understand you correctly, the Blender window does indeed resize itself and move whenever I use ALT+LMB, regardless whether Emulate 3 Button Mouse is checked or unchecked. There is another checkbox directly below Emulate 3 Button Mouse named, Continuous Grab. The problem also remains the same regardless whether Continuous Grab is checked or unchecked.

C. I don't know what ALT-Drag is. I am running Ubuntu on a Satellite laptop.

The reason this is happening is because Alt+LMB is the Ubuntu/Linux shortcut to move a window around. You may be able to circumvent this by using super+alt+LMB depending on your version of Ubuntu.


How do I UV unwrap this shape in to one island? How would you unwrap this if you wish to keep the uv in one island, normally I would unwrap this as you see below, however if I wanted to have a texture without any seams this would not work due to the edges.

I would mark two seam rings.  One around the outside of the donut, and another cutting across  a small ring of the donut:

The problem is that the quality of the unwrap you get from blender's default logic can be pretty variable.  A plain unwrap sort of pinched the ends of the rectangular island.  The "follow active quads" depends on the state of the uv map when it starts (the screenshot shows one of the less disastrous outcomes).

The best uv unwrap seems to be when you do a Reset (which makes every quad cover the entire image) and then a Follow Active Quads.  Then you can scale it to fit in the image, or leave it huge to tile a texture.


Render Videos From Marker Ranges? Id like to be able to use markers to render multiple video files.
This would be handy when binding markers to camera switches so each camera gets its own video file, is this possible?

Had a request for this, thought it worth making an SE question

This isn't possible out-of the box, but it can be done with a script:

This isn't an addon, just paste the script into the text editor and run it, you may want to change the variables at the top.

# frames to use before and after
FRAMES_PAD = 0
# real render 3d scene or GL preview?
USE_OPENGL = True
# handle marker switching cameras
USE_MARKER_CAMERAS = True

import bpy
from bpy import context

wm = context.window_manager
scene = context.scene
# store original output
filepath_orig = scene.render.filepath
frame_range = scene.frame_start, scene.frame_end

markers = sorted(scene.timeline_markers, key=lambda m: m.frame)

# progress in cursor (countdown)
wm.progress_begin(0, len(markers) - 1)
scene.frame_start = 1

if USE_MARKER_CAMERAS:
    markers_camera = [m.camera for m in markers]

    def markers_cameras_restore():
        for m, c in zip(markers, markers_camera):
            m.camera = c

    def markers_cameras_disable():
        for m in markers:
            m.camera = None

for i in range(1, len(markers)):
    m_start = markers[i - 1]
    m_end = markers[i]

    # just in case
    if m_start.frame == m_end.frame:
        continue

    scene.frame_end = m_end.frame + FRAMES_PAD
    scene.frame_start = m_start.frame - FRAMES_PAD
    scene.render.filepath = filepath_orig + "_######_" + m_start.name

    if USE_MARKER_CAMERAS:
        markers_cameras_restore()
        scene.frame_set(scene.frame_start)
        if m_start.camera:
            scene.camera = m_start.camera
        markers_cameras_disable()

    wm.progress_update(len(markers) - (i + 1))

    if USE_OPENGL:
        bpy.ops.render.opengl(animation=True)
    else:
        bpy.ops.render.render(animation=True)

# restore original values
scene.render.filepath = filepath_orig
scene.frame_start, scene.frame_end = frame_range

if USE_MARKER_CAMERAS:
    markers_cameras_restore()

wm.progress_end()


The Boolean modifier is not working I'm trying to model an M16, but it's not going so well when it comes to the magazine of the weapon.

Next to the magazine is a mesh. I want to cut holes in the mag with that mesh. But the magazine just goes invisible or connects with the mesh when trying to execute the Boolean Modifier. I have tested to invert the normals and some other stuff, but it isn't working.

Most of the common problems people experience with the Boolean modifier are generally down to only 2 or 3 things: Normals, Doubles (or overlapping geometry), Non-Manifold geometry.

Normals

Faces have a direction, it may seem like a weird idea but it's necessary in computer graphics to give a polygon (different word for face) a direction.

The fact that faces have a direction is included in the word "face", for English speakers: "what direction is it facing? it's facing that direction". Blender will give the new faces you create a direction that corresponds to the faces around it, it's up to you as a modeler to be aware of this.

The direction of the Normals determines how the objects combine when using a Boolean Modifier:

On the first image the cube and the torus have their normals facing out:

On the second image the Torus has the normals facing in:

On the third image both objects have their normals facing in:

What are Difference, Union, and Intersect supposed to produce?

Difference: The result will be those parts of the mesh which do not share volume in 3D space. see here a good expose on how to do this, and what to expect
Union: Returns the two meshes joined as one, the two meshes do need to have at least some common volume in 3D space. If they don't you can use the Join command (Ctrl+j) instead of a boolean.
Intersect: will return the shared 3d volume of the two meshes.

Quote from the manual:

  Difference

  The modified mesh is subtracted from the target mesh.

  If the target Mesh has inverted normals, Blender will Intersect the modified  mesh.

  If the modified Mesh has inverted normals, Blender will add both meshes (Union).

  If both Meshes use inverted normals, Blender will Intersect the target Mesh.

  Union

  The target mesh is added to the modified mesh.

  If the target Mesh has inverted normals, Blender will Intersect the target Mesh.

  If the modified Mesh has inverted normals, Blender will subtract the target Mesh.

  If both Meshes use inverted normals, Blender will Intersect the modified Mesh.

  Intersect

  The target mesh is subtracted from the modified mesh.

  If the target Mesh has inverted normals, Blender will subtract the target Mesh.

  If the modified Mesh has inverted normals, Blender will intersect the target Mesh.

  If both Meshes use inverted normals, Blender will add both meshes (Union).

Fixes for problems caused by normals in boolean operations are generally easy: Faces of both objects should all be outward facing with no exceptions.

To recalculate normals enter Edit Mode (Tab).

Select all faces and press CtrlN To have the normals face out

Or CtrlShiftN to have normals face inside the mesh.

To flip a single face, select it and use Mesh>Normals>Flip Normals.

You can toggle the display of normals in the Properties Panel (right panel N):

Doubles

Doubles are multiple vertices which share the same 3d location. These are problematic for the boolean modifier if they occur in one object, because they're a sign of degenerate geometry (zero area faces, hidden duplicated edges) or simple geometry which isn't fully connected as you might be led to believe by how it looks.

To Remove doubles

Enter edit mode (Tab).
Select everything (A.
Presss W and select Remove Doubles.

( insert images of example tell-tale signs of doubles )

Overlapping geometry between objects:
If you've removed doubles and flipped normals the right way, then a third cause of Boolean Failure is that some of your edges are shared by more than 2 faces. Inspect your Objects closely.
Multiple vertices in the same location will often cause the boolean modifier to act up.
In addition to Double geometry on Object A or B, object B should also not share any duplicated geometry with A. You can always prevent this by adjusting one of your Objects to comply with this limitation of the Boolean Algorithm.
From this bug report:

  this is a known bug in Carve upstream (a library we're using for boolean operations)

Non-Manifold Geometry

Boolean operations will fail when using Non-manifold objects.

For all intents are purposes manifold means 'is it air-tight', meaning it has no holes. Examples of non-manifold objects could be objects like planes with no thickness, or objects that are self-intersecting or that have Zero-area faces or have Open volumes.

For some operations it helps if you use the Outliner to hide the object you are doing the boolean operation with from view/render so you can see clearly the effect of the operation before applying the modifier (apply at the last possible moment!)

Other cases where boolean operations can fail:

Using Curve objects instead of Mesh objects

Blender doesn't let you use a curve objects for boolean operations. That inlcudes Text objects, as they are considered curves as well. Those objects would need to converted to mesh by pressing ⎇ AltC.


How to get world coordinates of a UV parameter on a NURBS Curve Surface? I am looking for a solution to get the world x, y, z coordinates of a given UV parameter on a NURBS Curve Surface. The output should be a mathutils.Vector, or at least a Python tuple.

Thanks in advance!

This isn't supported, in general Blender's nurbs support is quite basic.

Blender uses a method of calculating nurbs that steps over the curve in U and V directions at a fixed level of subdivisions (tessellated for drawing in the viewport), and there are no built-in methods to ray-cast into a nurbs surface, though such methods exist and could be added to Blender.

However if you really wanted its possible to take the nurbs data (before tessellation) and evaluate it from Python, but this would be quite an involved task.

As a simple solution you could just get the mesh of a nurbs object and (knowing the order of grid verts/faces), you could find the face that lies on a UV coord, then interpolate across the face... it wont give an accurate location but may be good-enough in some cases.


How would I create a model of a single piece of hair? I am new to Blender, and I was wondering if anyone could give me advice or a general method on how to create a model of a single piece of hair. I am writing a report for school, and I need a graphic showing a microscopic view of a strand of hair, like this one:

For the graphic I will be adding spheres that represent air pollution particles and their relative sizes compared to the hair. I'm basically trying to recreate this:

I haven't really started making the model yet. I was trying to play around with a cylinder for the hair, but I'm not sure if I'm headed in the right direction. Any help is appreciated! Thank you! :)

I think you are on the right track.

I would use a cylinder for the hair strand itself (with loop cuts along the length so that it can be bent). You can create a tip by simply scaling down the loops towards the end of the strand.

Of course, a cylinder will be perfectly straight. You have a few options for giving the strand a curve. Personally, I would use the (curve modifier. I would warn that the curve modifier can be a little tricky if you are new to Blender (or I think so anyway), so check out Youtube for a good tutorial - this is quite good. The aim would be to give your cylinder a subtle kink so it looks like part of a strand of hair. For a simpler option, you might want to avoid the curve modifier, and simply drag the loops of the cylinder around to make it less uniform. It depends on the look you are going for.

Finally, you are probably best creating the cracks on the hair using a texture. There are many texture sites, so head over to something like Textures.com and find something that approximates the surface you see in your reference images. Searching "cracks" or similar will get some results.

To use the texture, you will first need to UV unwrap the mesh. See this Stack Exchange answer for an overview of the concept. UV unwrapping essentially tells Blender how to apply a 2D image to a 3D object.

Once you have UV unwrapped your mesh, you will need to create a material with your texture, and use it as a bump map (which is really a way of making a flat surface appear to the eye like it is raised and dipped).

As you will appreciate, I can't give you a fully detailed answer as this would basically amount to "how to use Blender", but I hope the above are enough to point you in the right direction for each of the steps.


How to make Kurzgesagt style smoke (translucent moving circles that don't overlap) I'm trying to replicate the smoke in this Kurzgesagt video scene using Blender (from seconds 0:07-0:12)

https://youtu.be/h6fcK_fRYaI?t=7

The smoke columns are basically different circles of a translucent material that move over time. Different smoke columns overlap in color, BUT the same smoke column doesn't overlap. How could I make a smoke column, that has different moving circles (all with a translucent material) but that are somehow joined and don't overlap?
Since they are different circles I don't know how to do it in a way that the materials don't overlap...
Thank you in advance!

Create a material combining two voronoi textures! Tune the circle size with the Less than value, also play with the Voronoi scale and the texture coordinate etc. Use the clamp to overlap circles.

Here is a simple plane with such a material:


Starting a render from a callback gives error “Missing 'window' in context”? I want to start a render from a callback, but I also need the render preview to update while it renders.

If I call bpy.ops.render.render() then there is no preview.

If I call bpy.ops.render.render("INVOKE_DEFAULT") then the preview gets updated normally.

However when I call bpy.ops.render.render("INVOKE_DEFAULT") from a callback, then I get the error "RuntimeError: Operator bpy.ops.render.render.poll() Missing 'window' in context".

Here's an example script that will generate the error:

import bpy

def in_1_seconds():
    bpy.ops.render.render("INVOKE_DEFAULT") #RuntimeError: Operator bpy.ops.render.render.poll() Missing 'window' in context

bpy.app.timers.register(in_1_seconds, first_interval=1)

I can not find a way around, I have tried all:

(‘INVOKE_DEFAULT’, ‘INVOKE_REGION_WIN’, ‘INVOKE_REGION_CHANNELS’, ‘INVOKE_REGION_PREVIEW’, ‘INVOKE_AREA’, ‘INVOKE_SCREEN’, ‘EXEC_DEFAULT’, ‘EXEC_REGION_WIN’, ‘EXEC_REGION_CHANNELS’, ‘EXEC_REGION_PREVIEW’, ‘EXEC_AREA’, ‘EXEC_SCREEN’)

The "INVOKE" types cause the error to be displayed while the "EXEC" types cause Blender to completely freeze until rendering finishes.

I need a way to start a render from Python exactly like pressing "F12" with live preview. Any ideas how to do achieve this from callbacks?

[EDIT]

This is not a duplicate of "Context is incorrect when calling from a timer"
Because after trying to impliment the answer from that post I get the exact same error and/or no render preview.

For example this does not work:

import time, bpy, functools
from bpy import context

def render(od):
    timestr = time.strftime("%Y%m%d-%H%M%S")
    print(timestr)
    # uncomment below line for error...
    bpy.ops.render.render("INVOKE_DEFAULT")
    return 5.0

def loop(idx):
    print("LOOP")
    window = context.window_manager.windows[idx]
    screen = window.screen
    views_3d = sorted(
            [a for a in screen.areas if a.type == 'VIEW_3D'],
            key=lambda a: (a.width * a.height))
    if views_3d:
        a = views_3d[0]
        # override
        o = {"window" : window,
             "screen" : screen,
             "area" : a,
             "space_data": a.spaces.active,
             "region" : a.regions[-1]
         }
        return render(o)
    return 2.0

#f = functools.partial(loop, bpy.context.screen.name)

if __name__ == '__main__':
    idx = bpy.context.window_manager.windows[:].index(bpy.context.window)
    bpy.app.timers.register(functools.partial(loop, idx), first_interval=5.0)

[EDIT]

More specifically I would like to start a render after the previous render completes:

The following script simply starts rendering, and when the render_complete callback is fired it increments the current frame then renders the next image (cycle repeats until endframe reached):

import bpy

endframe = 10 #bpy.context.scene.frame_end

def complete(*args, **kwargs):
    if bpy.context.scene.frame_current <= endframe:
        bpy.context.scene.frame_current += 1
        #bpy.ops.render.render("INVOKE_DEFAULT") #I cause errors!!!
        bpy.ops.render.render()

bpy.app.handlers.render_complete.append(complete)

bpy.ops.render.render("INVOKE_DEFAULT")

In the above script only the very first render shows the preview updating during the render, while subsequent renders only show the preview update on completion of that frame. I would like all frames to show a updating preview as the frame is being rendered but I am completely stuck and don't know how to override context so I can use "INVOKE_DEFAULT"??

Create an override dictionary.

Pass the context dictionary

bpy.ops.render.render(od, "INVOKE_DEFAULT")
Made a complete copy of context.  This is somewhat dangerous since an object reference to a removed object may be accessed which will core dump blender.  I have a feeling the context members required to override hinges on the render display mode selected. with new window scene.render.display_mode = 'WINDOW' mode, it appears only the context.window is needed.

Have put in a count to stop after 5 renders to test.

Test run, code slightly altered (highlighted) to render frames 50, 40, 30, 20 and 10. In image editor display mode, renders to the image editor (if no open images) or opens one in the largest area

import time, bpy, functools

count = 5
def render(od):
    global count
    count -= 1
    timestr = time.strftime("%Y%m%d-%H%M%S")
    print(timestr)
    # I get no error in the line below
    bpy.ops.render.render(od, "INVOKE_DEFAULT")

    return 2 if count else None

def loop(c):
    print("LOOP", count)

    # override
    c["scene"].frame_set(10 * count)
    return render(c)

if __name__ == '__main__':
    f = functools.partial(loop, bpy.context.copy())

    bpy.app.timers.register(f, first_interval=5.0)


Coloring multiple blocks at once When I attempt to color multiple blocks the originally selected block is the only one that is effected.

I have created a plank tower that I intend to change from being white. I'm having issues transferring all the blocks to a new color. Can someone please help?

Setting the material normally will only affect the active object, not all selected ones.

To fix this, change the material like you just did where it only affects one object, then press Control + L, and select Material, and it will copy the material to all other selected objects.

Hope that helps!


Why does the mirror modifier create a new object instead of mirroring the object? When I mirror my object it seems to create a new object instead of just mirroring.
I've changed cursor to selected object but it's still not helping.
Please someone help me.

this is not a separate object , its just a physically separate mesh, which means that these 2 planes are the part of the same object , this is happening because you object origin is not at the correct place thats why you re getting weird results , you can right click on the object to set origin or in edit mode change the position of the object


Symlink-ing into addons folder I am developing software on OS X.

One component requires blender, and it requires a custom plug-in which I have had to write, and which I have to continually modify.

Now it's a very bad workflow if I am modifying in-place, because it is outside of the project tree. So when I back up my project I'm not backing up the blender plug-in, as it is in:

/Applications/blender.app/Contents/MacOS/2.69/scripts/addons/

What I try to do is create a symbolic link:

ln -s /path/to/myproj/blenderplugin \
        /Applications/blender.app/Contents/MacOS/2.69/scripts/addons/pi_project

But then blender can't find it.

Does this qualify as a bug?

Rather than using a symlink you can just point to a /scripts/ directory in User Preferences > File

After setting the path be sure to Save User Settings. Doing this will let you place your scripts in the folder designated, and leave the default folder alone.

Your folder structure should look like:

scripts/
  addons/
  addons_contrib/
  startup/
  presets/

Not all sub-directories are required, but you should have at least /scripts/addons/


How to find out why "context is incorrect"? I have been trying to write my first addon for Blender over the last couple of days. One error I came across quite often is the context is incorrect error for an operation of bpy.ops.

I learned that one can ask the poll function of an operator if the context is correct, but this does not tell why the context is correct/incorrect. What would be the best way to figure that out? Only way I could think of is to look into the code of the poll function. If that is the best way, what is the fastest way to find the appropriate piece of code?

You can find out (part of) the context you are in by:

cont = bpy.context.area.type
print(str(cont))

This in itself will help you determine where you are (contextually speaking).
Determining where you need to be is another story.  Each operation that you
do in Blender requires that you be in the correct context.  The way I think
of context is, what window (context) does  the operation occur in when you
do the action by clicking with the mouse?  You also may need to refer to the API
or other info, but one thing I found to help is knowing what contexts exist!

And easy way to find that out is:

bpy.context.area.type = '?'

This throws a useful error:

  TypeError: bpy_struct: item.attr = val: enum "?" not found in ('VIEW_3D', 'TIMELINE', 'GRAPH_EDITOR', 'DOPESHEET_EDITOR', 'NLA_EDITOR', 'IMAGE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'TEXT_EDITOR', 'NODE_EDITOR', 'LOGIC_EDITOR', 'PROPERTIES', 'OUTLINER', 'USER)

Well, there are your context types . . .

I don't know if that has successfully answered your question, because I do not write
plugins, yet, but it might has something that helps get you past the current issue in it.


How to create a button in Custom panel to take you to the specified url I am having trouble creating a button on a custom panel, which on clicking will open the browser and take the user to the specified url. Can anyone help me with the code!

see the docs for bpy.ops.wm.url_open

bpy.ops.wm.url_open(url="")

so a button would be

row.operator('wm.url_open', text='open url').url='http://www.blender.org'


How to get scene properties working without an initialize button? I have created a basic addon that loads text files and applies some game logic. In its script form it works fine, no problems, however when I try install it as an addon I get the pyrna_struct_meta_idprop_setattro() readonly error when trying to assign my scene variables.

I did some research and found a method that uses an initialize button which seems to work.

import bpy

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 = "scene"

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

    # If Scene.my_prop wasn't created in register() or removed, draw a note
    if not hasattr(context.scene, "my_prop"):
        layout.label("Scene does not have a property 'my_prop'")

    # If it has no longer the default property value, draw a label with icon
    elif context.scene.my_prop != 'default value':
        layout.label("my_prop = " + context.scene.my_prop, icon="FILE_TICK")

    # It has the default property value, draw a label with no icon
    else:
        layout.label("my_prop = " + context.scene.my_prop)

    layout.operator(InitMyPropOperator.bl_idname, text=InitMyPropOperator.bl_label)

class InitMyPropOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "scene.init_my_prop"
    bl_label = "Init my_prop"

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

def execute(self, context):
    if context.scene.my_prop != "initialized":
        context.scene.my_prop = "initialized"
        self.__class__.bl_label = "Change my_prop"
    else:
        context.scene.my_prop = "foobar"
        self.__class__.bl_label = self.bl_label
    return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_prop = bpy.props.StringProperty(default="default value")

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_prop

if __name__ == "__main__":
    register()

Worst-case scenario I will probably end up using this, however if possible I would like to avoid it.

Are there other ways of storing variables like this which can be referenced across multiple modules? (I have 1 Enum property for a drop down list, and 1 Integer property which is updated and changed).

The script only runs on Camera objects.

Thanks!

Finally managed to solve this!

One problem with the method mentioned above is if the user changes scene with the addon enabled the UI breaks because the scene properties are no longer available.

Solution:

initialize your variables under the register function and register the classes within your script.

def register():
bpy.types.Scene.myprop1 = IntProperty(default = 0)
bpy.types.Scene.myprop2 = EnumProperty(items = [('ONE', 'ONE', 'NUMBER ONE'),('TWO', 'TWO', 'NUMBER TWO'),('THREE','THREE', 'NUMBER THREE')],name = "Choose Number", default='ONE')
bpy.utils.register_class(MyPanel)
bpy.utils.register_class(MyOperator)

Then whenever you want to reference or change the item in the script use:

bpy.context.scene.myprop1

Obviously replacing myprop1 with the name of the property. For example:

print(bpy.context.scene.myprop1, bpy.context.scene.myprop2)
>>>0 ONE
bpy.context.scene.myprop1 += 1
print(bpy.context.scene.myprop1, bpy.context.scene.myprop2)
>>>1 ONE

Last but not least to unregister the script:

bpy.utils.unregister_class(MyPanel)
bpy.utils.unregister_class(MyOperator)
del bpy.types.Scene.myprop1
del bpy.types.Scene.myprop2

Initially I was using:

bpy.context.scene['prop1']

from the code snippets but this doesn't work well so I recommend using scene.prop1 instead of scene['prop1']

Hope this helps!


How to select the faces that have reversed normals? Ctrl+Shift+Alt+M doesn't work.
There is a solution ?

I want select this faces :

Here's my .blend file:

If you wanna select only reversed faces, use Ctrl+Shift+Alt+M but in Edge select mode. It doesn't work in Face select mode, and if you use it in Vertex select mode, it will select too much.


Dividing image radially My goal is to go from subdivide the coastline of Antarctica as such:

And manipulate and animate the pieces to move into this shape:

I am not sure if an Array modifier is the way to go. The act is as if I am slicing a pizza, but keeping the crust intact and then unraveling the crust into a straight line. **(this line is technically a series of 36 arcs)

This isn't exactly procedural, but it's OK for a one-off, maybe.

Create a single segment.

Start with a whole 36-section circle, rotated, inset,and translated in Edit Mode as shown, so its origin is at the center of an edge, at World 0. We're working in XY, Z out of the screen.

Select out the bottom segment, V rip the internal edges, and P separate by loose parts into 3 objects. Parent the point to the midsection, and the midsection to the base.

Make hierarchies of left and right segments.

ShiftD duplicate all the parts of the segment in place, and place the origin of the duplicate in its bottom-left corner. In Object Mode, with Snap set to 'Vertex'  Shift D X duplicate it to the right, and snap the duplicate to the original, in one move.

Shift R repeat the move, until you have 18 segments, not counting the original, which you can delete.

Do the same on the left, this time with the origins of the objects at the bottom-right corner, stopping at 17 segments.

Now we have to parent the base of each segment to the next, working towards the center. This is tedious, so you can do it with this little script, having selected the (bases only)  of the right and left-hand groups in two batches, switching the reverse parameter in the script appropriately:

import bpy

obs = bpy.context.selected_objects

# set reverse = True for right (positive X) segments
obx  = sorted (obs, key=lambda ob: ob.location[0], reverse=False)

for i in range(len(obx)-1):
    obx[i].parent = obx[i+1]
    obx[i].matrix_parent_inverse = obx[i+1].matrix_world.inverted()

Now when you set the Pivot to 'Individual Origins' and rotate the bases in Z, a curl results:

.. and R Z10 closes the right half of the circle. This rotation is keyable. On the left, it's R Z-10

When all the segments are present and selected in the curled position, and all thrown into Edit Mode simultaneously, they can be UV mapped together with 'Project from View: Bounds'. Then they can all share the same material, and all acquire their own UV map into the image texture.

Then you're kitted up to animate the rotations, and later the translations of the segment-sections.


Rounding edges of a non uniform mesh Given this hinge:

I would like to round the 2 edges closes to the opening, without rounding the inset edge.

The aim is to model a wooden hinge such as this:

.

I have looked at beveling, but it does not have the desired effect.

I think beveling is a good option. Select the edges as pictured below, press Ctrl+B and drag the cursor in opposite direction to the edges' location. Use Mouse Scroll to add some divisions. Finally change the rest of the mesh topology to easily add a Subsurf and edge creases.

Here's the final result with a changed topology.

And here's the .blend with improved topology:


Lags in Pose mode 2.90 When I started using 2.90 version, Pose mod started to lag (when choosing some bone). There are no lags in previous versions. I have: RAM 16 gb, 64-bit OS, AMD Athlon X4 840, Nvidia GeForce GTX 960

Have you tried unchecking File -> User Preferences -> Viewport -> Selection -> OpenGL Depth Picking? I had the same problem, but when I disabled this it seemed to be fixed.


Creating a bevel car decal like effect? I am trying to create a 3D bevelled version of my own logo

And make it look something like this:

or this

Where it is beveled in the middle.
Currently I have tried taking in a svg file into blender, tried their curve bevel options. It just bevelled in depth not in width

I even tried to convert my curve into mesh and then extruded/scaled in the middle but due to the curve – mesh conversion the faces wouldn’t scale uniformly and it was all over the place. I was wondering if there was another way to create something like this?

Thanks
Phoenix

Edit:
This what happens when I use the curve bevel

And this is what happens when I have converted to mesh and tried to scale it in.

Perhaps it is my design or the way the curve is converted but the points seem to go crazy.

If you set your curve to full, add some depth and leave the resolution at 0 it seems that it will just create the look you are going for. You need to set the shading to flat so you can see the sharp edge.

There is also a star curve that you can tweak with the curve settings to get the desired look of a Mercedes star. Not sure it will yield the perfect results for any shape, but you could try.

Settings for star:


Shortcut to quickly add texture in the shader editor doesn't work? I am trying to add textures in the Shader Editor using the shortcut Ctrl+Shift+T, but nothing happens.
When I first came across this shortcut watching a tutorial, it worked perfectly fine but the next day I opened the same project it didn't work anymore. And since then, still doesn't work.
I have updated Blender to 2.91.2 in order to see if that would fix the problem but nothing changed.
Would you know what's the problem or where I could find that shortcut in the preferences in order to see what's wrong or just add the shortcut if it doesn't exist?

Make sure you have the Node Wrangler add-on enabled.


What is event.type TEXTINPUT used for? In the blender documentation I found the TEXTINPUT event type. I couldn't find any information about it. How it does it work? When can we use it? Is it only for the game engine or can we use it in common scripts?

This event is kind of a 'meta event' - you will never get an event of this type (Blender's event system never generates it).

It is used by keymap, as a kind of 'generic' event - it matches any real event that can be interpreted as a typed char. You can find its 'definition' at line 1530 and following of wm_event_system.c in Blender sources:

if (kmitype == KM_TEXTINPUT)
    if (winevent->val == KM_PRESS) {  /* prevent double clicks */
        /* NOT using ISTEXTINPUT anymore because (at least on Windows) some key codes above 255
         * could have printable ascii keys - BUG [#30479] */
        if (ISKEYBOARD(winevent->type) && (winevent->ascii || winevent->utf8_buf[0])) return 1;
    }

Translated in readable english, it means that any event that is a KM_PRESS (key press) from the keyboard and that generates a valid char (either ascii or unicode one) is considered as a TEXTINPUT event.


How to untwist a twisted STL model from microCT scanning I've got some STL models created from microCT scans that have an undesirable twist in them. I was wondering how I could use Blender to remove the twists using something like proportional editing. The STL models are very large (>150MB) and contain upwards of 6 million triangles.

I can import them into Blender but when I try proportional editing the mesh gets all distorted. Would it possible to create a mesh plane of similar x-y dimensions, sub-divide it, and somehow link it to the STL model so that the proportional changes in the mesh are reflected in the STL?

End view of twisted STL

Closeup view of triangles

Solved! Turns out the Simple Deform modifier works perfectly for this type of thing!

Steps for Blender 2.81:

Import the STL file into Blender using File, Import, Stl
If required, rotate the model so that the twist axis is aligned with the X, Y or Z axis
In Object mode, select the entire STL object
Go to the Modifier tab and select the Simple Deform modifier. By default the Twist operation will be selected.
Select the axis along which the twist in the model is aligned.
Adjust the Deform Angle until the twist is removed or at least as small as you can get it.
To save the corrected STL, go to File, Export, Stl, give it a different filename and click Export STL.


How to Fix Axis of Armature Without Wrecking Mesh? I'm trying to rotate parts of an armature with code and finding that pieces of the armature have their axis oriented differently for some reason which makes looping through the pieces and doing the same thing impossible. Rotating on the Z axis in a positive direction for one is a negative direction for another. Through fooling around with the armature options, I found that I can see the Z axis for one is pointing up while another it's pointing down. How can I fix it so that both are the same while not destroying the weights to my mesh? Can't I just say "voila, your axes are now this way!"?

You should just be able to correct bone roll in edit mode, which won't deform the mesh. This may still cause issues if you have some constraints specified in world space, but should otherwise be fine. In python this would be changing the EditBone, not the PoseBone.


Force redraw / update of curve object I have written a script that syncs the position of a bezier curve handle to an empty via a handler (bpy.app.handlers.scene_update_post):

def curve_handler(scene):

if bpy.data.objects.get('curve_name') is not None:
    curveOb = bpy.data.objects.get('curve_name')
    if bpy.data.objects.get('empty_name') is not None:
        e = bpy.data.objects.get('empty_name')
        curveOb.data.splines[0].bezier_points[1].handle_right = e.location

My problem is that the curve does not get updated. When I select the curve, go to edit mode and back, the handler jumps to the position of the empty. But not when I move the empty in object mode.

My current workaround is the following:

bpy.context.scene.objects.unlink(curveOb)
bpy.context.scene.objects.link(curveOb)

But that is apparently a super ugly hack. Is there a sane way to force redraw of a curve object in Blender?

What you are trying to do is already possible using a hook modifier. Manually you can go into edit mode, select a point and press ⎈ CtrlH->Hook to new object. This is also available to mesh objects which hooks the new object to the selected vertices.

We can create hooks using python. I'm not sure we can do this without the hook_assign operator, so we need to select the specific point and be in edit mode when we assign the point to the hook.

import bpy

obj = bpy.data.objects['BezierCurve']
# select and make it active (for later edit mode)
obj.select = True
bpy.context.scene.objects.active = obj

b_points = obj.data.splines[0].bezier_points
for p in b_points:
    p.select_control_point = False
    p.select_right_handle = False
    p.select_left_handle = False
b_points[0].select_right_handle = True

# create empty to hook to
hook_obj = bpy.data.objects.new('Hook', None)
bpy.context.scene.objects.link(hook_obj)
hook_obj.location = obj.matrix_world * b_points[0].handle_right

bpy.ops.object.mode_set(mode="EDIT")
hook_mod = obj.modifiers.new(name='Hook',type='HOOK')
hook_mod.object = hook_obj
bpy.ops.object.hook_assign()
bpy.ops.object.hook_reset() # needed if handle is not a 0,0,0
bpy.ops.object.mode_set(mode="OBJECT")


How can Particle Objects copy emitter's color texture? I'd like to make a scientifically accurate animated snake using particle objects (and no, sculpting or bump mapping won't be realistic enough because real scales don't actually shrink and stretch when the snake bends, they overlap or move away from each other, like particles do).
As per this answer Particle Object to Inherit Uniform Colour from Emitter I managed to get the scales to have ONE color sampled from the emitter thanks to the "from instancer" checkbox.

Cute but not good enough!
Real snake scales have multiple colors EACH, they're not actually pixilated!

So this is what I hoped to achieve, an imitation of real life:

This would not only make my snake 100% realistic, but also make my life easier as I would only have to paint a pattern onto the body mesh which then reflects perfectly onto the scales... but even though I tried to follow the instructions from the follow-up answer on the previously mentioned post, which supposedly would make the scales go "chamelleon-like" just as I need them to, I can't for the life of me get it to work!
each scale has the same rainbow as the entire body, rather than only copying a small area in their vicinity...
I've tried:

making sure everything shares the same origin.
making the original scale object have the same size as the whole body (scale applied)
making a completely new file with simpler objects (cubes and planes)

nothing works.

Here's the file, hopefully containing new updeated texture:
Any help will be appreciated!

Use UV From Instancer to offset a large UV gradient. So a scale shows not just one point from the texture but a small area around.


Extruding diagonal rectangle from interior corner I am trying to model a small wooden crate like in this image.

I am having trouble creating the diagonally extruded boards as I am trying to avoid adding new primitives and combining them later. I have gotten this far in the process.

Can someone explain how to extrude the circled red corner and merge the extruded end to the other corner.

Thanks :)

Make 4 Loop Cuts (Crtl+R) at where it should intersect.

Select the 3 vertices IN THAT ORDER then press J to make a diagonal a line.

Repeat step 2, but with opposite vertices, to create both diagonal lines.

Select all 4 corners of the rectangle we have created.

Press E and then whatever axis they are facing, then bring them out until they are flush with the outside rim of the box.

Go into Edge Select Mode, then select these two edges, press X, then click Delete Edges .

Select all the points and press F and then press Ctrl+N, to Recalculate Normals.

DONE.

Let me know if thats not what you meant or if I messed up on a step!


Blender 2.8 objects invisible I just added a collection and started to draw an object, and hid the other layers. But I cannot make the previous collection/layer to turn back on. The initial objects Only shows in render mode. in any other view mode, I cannot see the object. only the most recent layer shows up as shown in this image.

You seem to be in Local view, where only selected objects are displayed.

Hit /, or go to View > Local View > Toggle Local View (in the viewport header) to return to Global.


UV Map In UV Editor Is White I retopologized my shotgun model, then I marked seams and unwrapped it, but the UV map seems to have a white background.

I have tried resetting the UV and unwrapping again, but that changed anything. I have also tried making a fresh blender file and importing the gun and after unwrapping it again, nothing changed, so that means that it is not a file-specific issue.

What's is that when hit A on my keyboard so select everything and then move the whole thing, the white background moves too and shows the normal UV grid behind it.

Another thing that is odd is that when I hit Ctrl-A to average the Islands Scale, it removes the white background and messes up my UV layout.

How do I fix this?

My shotgun seams:

In the UV editor window:

It's clearly part of your unwrapped mesh that is projected as a plane, you can see vertices at each corner of the uv editor, you can turn on sync the uv and mesh selection by clicking the button shown in the image attached, then select a vertex at a corner, press ctrl+L to select the linked vertices, then you can go to the 3d view and unwrap that part of the mesh correctly.


Too much RAM after load scene textures in high resolution My current project contains many object with 2K and 4K textures. I don't have problem with RAM during render, but only when I open this scene. It take more than 20GB and it take long time to display. I understand that Blender need load all textures, but is there some method to optimize it? I even don't need see these textures in the viewport. I tried several things:

Viewport textures limit size to 2048 had no effect
Change Image Display method had no effect
Show object only as viewframe had no effect (object restriction)

It would be nice to have some solution for proxy (low res) textures for viewport and high res textures for render, because I can not use smaller textures during render.

My last option is a make some script to rename folder with textures, so Blender will not find it and show it pink :) And before render repair paths back.

So my solution to complete this project was:

I prepared same lowres textures in the different directory for example:
D:\MyProject\MyTextures for highres and D:\MyProject\MyTexturesLow for lowres
I used simple script for change name folder from MyTextures to MyTexturesLow and opposite
I renamed textures folder with script before open scene and switch back before render

It is only solution which save my project :) You can rename folder without script of course.


Rendering image returns Null data So, I followed a tutorial on youtube and got a still image render, but after I moved the camera to get a different angle to record an animation, rendering no longer works and just returns a null / blank image.
I am rendering in Cycles.
It's a simple scene, with only a single camera.

Using 0 on the numpad shows the area framed that I want.
I've made sure the camera is selected for the scene.
All items in the scene are rendering (I checked the using the filters for the collection of objects).
The camera is in the same collection as the rest of the objects.
All the objects have a surface.

What have I missed?
blend file

I didn't find the reason for the strange behaviour. There must be something wrong in the scene settings, maybe someone can investigate further.
But when I made a new scene, copied all objects from the old scene to the new one, everything rendered fine. Do not try to copy the old scene by using Full Copy, in this case the new scene won't render either.
This is just a workaround to help you rendering the animation. Hopefully someone finds a better answer.


Array modifier changing second array modifier I'm trying to array an object in two directions, like this:

But when I try to have both at the same time, the first array influences the other and the objects will not touch anymore:

So how can I make both modifiers independent of each other?

It would be helpful if you included your modifier-settings in the screenshot. It is difficult to locate the error without that information.

Anyway I created a setup like you want with two array modifiers.
You can see the settings in this screenshot.


How Do You Select Edge Loops In Weight Paint Mode I want to paint an edge loop in weight paint mode. Is there a way to do this?

Select your edge loop in edit mode

make sure face masking or vertex masking is active to only paint on previously selected face loop.


Rigging stretches my model Totally new to Blender and I am stuck here.  I rigged my model with an armature by going into object mode, clicking the model, and then shift clicking the bones.  Then pressing Ctrl-A, and selecting automatic weights...It connects to my model, but when I try to move one of the bones, it basically picks a point and will move that, but not the rest of the model.  I'm sure I'm doing something basic, but I have researched a bunch and can't seem to find the answer.  Can someone help me?  Here's a screenshot.
Thanks!

Are you using an unapplied Skin modifier, right?

So the "real mesh", the one who receive the automatic weights from the armature it's actually made of a bunch of vertices, the ones that they are moved. The problem is all here: the vertices created by the skin modifier aren't affected by the armature because they don't really exist yet.

You can try to move the skin modifier to the bottom of the list, so it will occour after the armature deformation, but to get nice an smooth deformations, you'll have to provide more "real" vertices to the mesh. You can for example subdifide your skeleton or apply the skin modifier.


Is it possible to have true transparency (without ghost shadows)? Is it possible to have true transparency?

I have modelled a house with four walls and I want to do a section zoom where, at the beginning, I have the walls solid, but one gradually gets transparent.

I have animated a solid and a transparent material through a mix shader, but my problem is that when it's transparent the edges of the walls still have black shadows

I have tried to find some render settings that will remove those "ghost-shadows" but without any success.

I don't want the "hard clip" like the one that we get with the "restrict rendering".

What is probably happening here is a "Z-fight" between the surface of the transparent wall and that of the opaque one, meaning that since they are overlapping exactly along one of their faces, the render engine is confused as to which one to use for shading calculations.

One may think that a fully white transparent surface wouldn't Z-fight, ...but it does.

As a solution: remove the overlap! Move the surface a tiny bit away (or inside) the opaque wall.


Controlling particle textures How do we control particles to have a certain amount of textures; consider a blade of grass:

Suppose we wanted to add bumps with parallel lines to give them a vein kind of effect like so:

How do we achieve this? If we apply an image texture, the particle being emitted from that portion takes only that color from the part being emitted but it doesn't apply for the particle itself.
Furthermore, if detail of smaller fuzzy particles were to be given to provide it a more natural rim, how do we do it with particles?
We could model some objects and add them to particle system but if we wanted to add the simulation of grass with the wind, that would not be very realistic. So, how do we add textures to individual particles?

If it's cycles you are using it might be possible. All of the particles do have a unique ID that you maybe can use to give them different textures. The ID is used to calculate ag. collisions, if i haven't misunderstand how it works.
In the math node should it be an options for compare values, if you set it to check if the value is the same and if they are it will send 1.
You should be able to do it but I'm not sure if it is worth the extra time.


The Subdivision Modifier Keeps Causing My Models To Warp Inside Of Itself So I am having a problem where the subdivision modifier will constantly distort my models in a very odd way. The subdivision modifier causes the model to warp inside itself at the middle of my model. I will include a before and after picture of the application of the subdivision modifier. I am getting fairly annoyed with this problem so I would very much appreciate if some one could clarify why this is happening.

Thanks, Nova

The topology of your model is not suitable for subdivision surface. Subsurf works best with quads, and the entire side of your gun model is made up of ngons.

If you are looking for a quick way to chamfer the edge of the model, consider using a bevel modifier, which works nicely with ngons.

(Excuse the ridiculous model, hacked it together on a laptop in 30 seconds.)


"Use Nodes" Button for Materials in Blender 2.8 I can't seem to find this button in Blender 2.8.:

This is what I have:

Switch to the Shader Editor, in the upper-left:

Then edit the material nodes:


How can i copy the object position to the edit position to meet the rest position? When i switch from object to edit mode, the model changes the position. What i found out so far is that this is related to the "rest position". http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Advanced_Animation/Guided_tour/Armature/object

But how can i change the rest position to look the same as the object position? Because if i change the rest position the object position changes too, thus always a margin of differences... can i just copy past the object position into the edit position/rest position?

Any movement done in pose mode will also be shown in object mode, any keyframed movement will change this position as you change the current frame.

One option you have is to clear any pose mode changes made. While in pose mode press ⎇ AltG, ⎇ AltR and ⎇ AltS to clear the location, rotation and scale of the selected bones, putting the armature back into the rest position.

Another option is to set the current position as the rest position by pressing ⎈ CtrlA and choosing "Apply pose as Rest Pose"


Timeline animation plays only one frame When I play it, all frame loops in 0-1 frame.
What did I miss?

You changed the Time Remapping. It is found in the lower right of the Dimensions section in the Properties Panel.Make sure, the Old and New values are both the same, e. g. 100 and 100.


Wheels leaving trails when moving? I'm creating a Martian habitat animation for a school project and was wondering how to make my Mars Rover leave trails on the surface when it is driving around?

You could animate a displacement map that reveals itself as the wheels pass. If you take your UV from the road, add all the trails, and then add a mask (maybe in after effects, then you would have an animated texture) to reveal them when needed.
This would only work if you already have the animation of the vehicle.


How can I link unlinked vertices? I am using Blender 2.77. I imported a .3ds of a snake to save time while exploring spline IK. Parenting to an armature fails and I suspect this is because the model's vertices are not all linked. I have attached a screen print. I hover over the verts and hit L and as you can see, not all of the verts are linked. When I select with L it should select all the verts. Is there a way to join them?

here is one way to do it manually
first make sure the two unconnected meshes are close to each other

Select an edge loop from the first and second mesh where they should be connected

use the remove doubles operator and try different values of merge distance, make sure unselected option is unchecked


Edit Tools Options Visibility Problem I have gotten into a situation where I cannot seem to get things working correctly. Here is a screen shot of the problem I am having an issue when trying to use tools (like the Extrude tool). I cannot see the options when clicking on the icon for the tool in the edit toolbar.

I tried looking this up in the Help document and I thought that when I read was that switching the mode from Global to Local would solve it but it did not. I am trying to learn how to use Blender and this just started happening so now I am kind of stuck. The only way I can access the options for tools that have them is to use the RMD and then select from the pop up menu. I do not understand what has triggered the icon you see with the + sign.

The screenshot shows that the Extrude Region tool and gizmo from the toolbar were used. The gizmo is the yellow line with the plus icon that indicates in which direction the extrusion is performed when you click and drag on the icon. You can change the type of extrusion by positioning your mouse cursor on the extrude tool in the toolbar and holding the left mouse button. This will open a menu to select the type of extrusion.

The properties of the operator can be modified in the Adjust Last Operation panel. Use the Transformation Orientation to affect the direction of the extrusion. Please note that your options look different in the screenshot because you've executed Dissolve Selection.

Depending on the type of gizmo additional options may be displayed in the header and sidebar for the active tool. For instance the Extrude Region allows you to choose between the Normal and XYZ option.

Axis Type Normal

Axis Type XYZ

Alternatively you can use the E key for extruding without activating the gizmo.


Group objects in blender There´s a way of grouping SVG objects in blender like in Illustrator or Inkscape, where when I have to move the object the entire group move´s on together, without having to append that object to the main object?

You also can just parent them together. Select all Objects you want to group and than press Ctrl + P. All selected objects will now follow the object which was active during the Parenting process.


Cannot add tracks for 2D Stabilization I'm unable to add Tracks For Location or Tracks For Rotation / Scale in v2.79. The + button is greyed out. Why would that be?

I opened my video file in the Movie Clip Editor, added a few markers, tracked them, ticked Display Stabilization and 2D Stabilization and Autoscale.

It was suggested in the comments that I should click first "solve". None of the video tutorials that I saw on YouTube indicated that I should so that, though. I ticked "Tripod" under "Solve" and then clicked "Solve Object Motion". It made no difference.

The only tracks created for camera can be used for stabilization.

Select markers and copy them Ctrl+C
Select (in N side properties panel): Objects -> Camera
Paste markers here Ctrl+V
Now you can use copied markers for stabilization


How can you move the origin at the base of object? How can you move the origin at the base of object and not set the origin to geometry ?
(A follow-up question to this one: How can I place multiple objects on the mesh?)

Just answering based on Moonboots's comment, because I promised the OP a gif :)

Select the base vertices
I Edit mode go Mesh > Snap > Cursor to selected
In Object mode go Object > Set Origin > to 3D cursor


Clip Start and Clip end not showing in blender 2.81 for sun light I am doing lighting in eevee by watching a tutorial. So in tutorial it shows that clip start and clip end for shadows in object data properties but mine is not showing. If there is any other way to do it please help.
the above image is of my pc and the below one is from the tutorial.

Sun light shadow bounds are now automatically calculated, so manually adjusting clipping values is no longer necessary.
The properties have been removed and the UI adjusted accordingly.


UVs should stretch texture I would like to create a fence that is "buckled" (sorry, I don't know the correct translation). The fence should be affected a lot by gravity.
If anybody knows how to explain that better, please tell me!

This is a picture:

I thought I would do this with a plane. I thought I should subdivide it and move the vertices around so that the textures will be stretched and shrunken in order to give create such a worn-out fence.

My approach looks like this:

However, when I put a texture onto my model in Unity3D, the texture is absolutely fine, but that is not what I wanted. :-) I wanted the texture to be uneven.

Can somebody tell me how I can achieve that?
Thank you!

Unwrap your mesh before deforming it will result in a good mapping.

Then when deforming the mesh, the texture will follow.


Rendering a pixelated image How do you make the camera in blender cycles render everything so it looks like pixels? I want everything in my scene to look pixelly like this image I found:

Found a solution in compositing based on this BlenderArtists thread.

To pixelate a render layer or image, you simply need to use the distort scale node to scale it down, use the pixelate filter node, then scale it back up.

The amount of scaling up and down control the amount of pixelation.

EDITED: If you really want to reproduce the effect from the original image, with the pixelated outline as well, you need a slightly more complicated node setup:

Download blend file here.

Original vs. pixelated+outline side by side:


How to animate deforming scratches? I would like to create the following animation: one mesh scrapes the other.
I think the best option is to animate the boolean modifier, but the boolean difference disappears as the object moves. I would like the difference remain to make it look like a scratch.

The next idea was to use dynamic paint (displacement), but it leaves a lot of "artifacts", I believe due to dragging the outer vertex?

Could you suggest me other solutions that may work as intended?
I tried searching for it on the internet but with no luck so far.
Edit: The above examples are simple, but what about more complicated scratches?

In the first example why not use a rectangle instead of a square for the boolean so the backside is longer and doesn't disappear as it goes over the bottom cube. You could animate lots of strange shapes for options.
You may also want to do something like in the unrelated answer to this question here:
Animating appearing/extending strip with gaps


Random lines popping up with Freestile when Sketchy When I render a simple animation with Freestyle (all default settings, except sketchy at 3 and the Bezier modifier at 50) I get this result on some frames:

There are some lines appearing out of nowhere. The model has a simple diffuse material (not rendered in passes). How can I solve this without losing the sketchy style?

Here is a succesful image:

And the blend file:

http://pasteall.org/blend/40571

Frames 21 and 24 illustrate the problem.

Thanks in advance.

Play with the error settings for the bezier curve modifier:

Original:

Smaller value:


Mesh meeting in the center I'm sure it's easy to google, but I have no idea how to phrase it to find it.
I'm super new to blender and trying to model a spoon, and this is where I'm stuck:

How do I get rid of this? I tried doing a loop cut, I tried removing every other edge inside, so I get 4 corners instead of 3 - it only seems to make it worse.
Any tips for a beginner?

Triangle fan is not needed to achieve round shapes. Use 4-sided faces whenever possible. Try something like this:

You can also add Subdivision modifier at early design stage to see how the shape is rounded nicely even with low amount of faces.


View camera vs. Perspective camera (scheimpflug optics) I've been searching extensively through this and other forums without success about the topic.
I am interested in using a new camera model consisting of a normal perspective model, but where the image plane is tilted with respect to the lens plane (scheimpflug principle).
I can't find how to modify a normal Cycles camera in order to include such "simple" modification.

Cheers

Pep

You can skew the relation between the lens and the focal plane using the SHIFT values for the lens. That will give you control of the perspective the same way you'd control a tilt/shift lens on a studio camera. There is no way AFIK to rotate the camera plane from the lens plane though.

This example show the same scene, with the same lens, WITH THE CAMERA ON THE SAME PLACE, and how shifting affects the perspective (I was trying to keep the object on the left in the frame to magnify the effect):

(Animated version here)

Blend file here:


Which of Blender's bpy.props properties can store a Matrix? In my script I am trying to store a Matrix, for example the region_3d.view_matrix of a 3D view. This returns:

Matrix(((0.04198726266622543, 0.9991182684898376, 3.666877432806359e-07, -0.32331380248069763),
        (-0.349155992269516, 0.014672632329165936, 0.9369498491287231, -0.4471516013145447),
        (0.9361235499382019, -0.03934017941355705, 0.3494640588760376, 0.5855286717414856),
        (0.0, 0.0, 0.0, 1.0)))

How can I store this in one of Blender's bpy.props properties for access later? I thought FloatVectorProperty was closest, but that was just a guess and depending on what I try it complains either that I'm providing tuples or that it only wants 3 items, not 4.

If you choose MATRIX as subtype the property will return a mathutils.Matrix object on access. So you might define a utility function to set the attribute

import bpy
from mathutils import Matrix

def flatten(mat):
    dim = len(mat)
    return [mat[j][i] for i in range(dim)
                      for j in range(dim)]

bpy.types.Scene.matrix_property = bpy.props.FloatVectorProperty(
    name="Matrix",
    size=16,
    subtype="MATRIX")

mat = Matrix([[i + j for j in range(4)]
                     for i in range(0, 16, 4)])

scene = bpy.context.scene
scene.matrix_property = flatten(mat)

print(mat)
print(scene.matrix_property)


Hard Seam between modular peices Im making a modular bank, and when I copy them in blender there is an obvious seam.

I've tried resetting the normals and not sure how to fix this really.

any help would be greatly appreciated.

Thanks

well, after seeing that both meshes are the same u should really only use the first one using an array modifier.

The array modifier also features a merge function
check the tickbox and the seam should disappear


Is there a way to get back to renders that are in "Render Slots" without having to preform a render? Is there a way to get back to the Render Slot Dropdown Menu (That already has renders in it) "without" having to make another render? This would be during a single session of Blender.

If you rendered to the same slot, the previous information is gone forever.

If you switched to a different slot, then the information of other slots is untouched and you can switch back and forth.

To access the rendered slots you need to be in Render Result as the source for the UV/Image window:

To save the information of any of the rendered slots, use the Save as Image option on the UV/Image editor and use OpenEXR as the format, that will keep the rendered image as scene referred data.

An alternative, is to add a File Output node in the compositor. That way every time you render you will be saving a file automatically. Note that if you render again, it will render to the same file and overwrite the previous image.


How to create an array of lamps? Following this question.

Since you can't use an array modifier on lamps, how can you create an array so that all lights are clones of the same original and can be edited as one?

Start with a plane that has the proportions of your lamp, enter edit mode and do loop cuts CtrlR so you end up with as many vertices as you need lights.

Set instancing to Verts.

(for versions 2.79 or older) Set the duplication to Verts.

Add a spot lamp on the same place as your plane.

Select your lamp, then shift-select your plane and press CtrlP and select Parent to Vertex

You have now an array of lights!

To have the array follow your plane's rotation select the lamp and add a copy rotation constraint.

Note that the object doesn't necessarily have to be a plane, it can be any shape you want and it doesn't even need to have faces, as the lamps are controlled by vertices.


Can I combine channels or edit them at the same time? Using Blender VSE I have two channels, an audio channel and a movie channel.

I plan to be splitting them up and reordering the splits - nothing too complex. However, with the audio and the video in two separate channels, that's twice as much work for me to do.

Is there a way for me to merge channels together so I only have to apply these edits one, or a way for me to apply edits to both channels at the same time?

Thank you very much!

You can select the audio and video strips and then press CTRL+  G to group them together (essentially combining the channels).

Now you can make your cuts and reorganize them.

This combined strip is called a Meta Strip, and by pressing the TAB key you can dive into the Meta Strip to edit the contents inside of it.


Placing objects using a relative coordinate system I have been assigned the task of making a 3D model from a site plan for a big wind park in Germany. I have a plane (7km X, 8km Y) long. I want a point in the left corner of the plane as a point from where I can move my windmill models with co-ordinates. Like windmill_1 2km left and 1 km up. A windmill in the left corner of the plane will have the location settings a 0;0;0.

Is there any solution?
Thanks in adavice.

Do this via a script, if you have the X, Y, Z coordinates of the base of each windmill, you can iterate through the list of coordinates and place a windmill at each coordinate.

Let's say you make a windmill object, or a group..

import bpy
import mathutils
from mathutils import Vector

scene = bpy.context.scene

# if you have a group named windmill
group = bpy.data.groups['windmill']

# all coordinates will be offset by this vector, your new 'origin'.
custom_origin = Vector((3, 4, 0.2))

coordinates = [
    (18.2807, 9.1404, -1.2686),
    (27.4211, 9.1404, 0.9514),
    (9.1404, 9.1404, -1.11),
    (18.2807, 31.9913, 2.1671),
    (18.2807, 13.7106, 0.0),
    (18.2807, 22.8509, 1.3214),
    (27.4211, 13.7106, 2.96),
    (27.4211, 22.8509, 2.1143),
    (31.9913, 22.8509, 3.7),
    (22.8509, 22.8509, 1.3214),
    (13.7106, 22.8509, 0.0),
    (4.5702, 31.9913, 0.0),
    (22.8509, 13.7106, 2.96),
    (13.7106, 31.9913, 2.4843)
]

for loc in coordinates:
    instance = bpy.data.objects.new('dupli_group', None)
    instance.dupli_type = 'GROUP'
    instance.dupli_group = group
    scene.objects.link(instance)
    instance.location = Vector(loc) + custom_origin  # adds them.


Distorted Checker board I am new to blender. After following a youtube tutorial of modeling a bird, trying to add some texture.
But the texture looks like stretched. So I applied checker board to see what is wrong and it looks like the attached image.
Please help to fix this.
Thank you,

First of all, thanks for giving all the right info in your illustration. There's no object scaling, and you've shown us your texture space.
You're using the Object texture space, which is measured from the object's origin, along its own XYZ, before any object transforms,in Blender units. It's 3D. If you use a 3D texture, like the provided 'Checker' texture node, you will see no stretching: the pattern on the surface will be the one produced where the surface intersects a 3D grid of black and white cubes.
In the picture, on the other hand, you are using an Image texture, which is 2D. It only has X and Y coordinates, there's no Z to take into account, so, in Object space, it's projected straight down the object's Z, like a (UK) stick of rock. All points on the surface with the same Object XY get the same color from the image, where the surface intersects columns projected from black and white squares.
If you use a 2D image texture, you usually need a UV map to cut it up and plaster it over the surface in the desired way, and use the UV output of the Texture coordinate node.


How to use subdivision modifier properly on this cylinder? So my friend is trying to make a plane out of a cylinder and we decided to make it smooth but ends up a mess...

anyone knows how to fix this issue? :(

I agree with lemon's previous post. Although using a cylinder for a wing seems to make sense, it's just not a good way of creating mesh. Better to either start with a cube and subdivide it as more detail is needed, or learn how to keep good quads/edge loops and just altogether good practices for mesh creation.


Evaluate FCurve without keyframes won't work i'm stuck here, i'm trying to evaluate a newly created FCurve to get the current value of associated property, and keep getting "0". Here's an example working code with scale:
import bpy
# getting the object
obj = bpy.context.object
# the active object have action but no scale fcurve
# let's create it for x axis
fc = obj.animation_data.action.fcurves.new("scale", index=0)
# evaluate the current frame
value = fc.evaluate(bpy.context.scene.frame_current)
# print the result
print("value is %f" % value)

This returns "0", but the active object is "1" in x scale
(code can be run from console with selected object with action and no scale keyframe to test)
I don't really know how to get this "1" value programatically with object and data_path only.
The getattr() method could work, but i'm also using this code on pose bones, with these kinds of datapath : 'pose.bones["Bone"].location[0]' and this doesn't seem to work with getattr()
Any clue out there ? thanks in advance guys ! cheers !

Get the object from the path.
Can get the object from the datapath via (with and without coercing to the value)
>>> C.object.id_data.path_resolve('scale')
Vector((1.0, 1.0, 1.0))

>>> C.object.id_data.path_resolve('scale', False)
bpy.data.objects['Vert.001'].scale

can look at the last part of the path and check whether that property is an array,
>>> C.object.bl_rna.properties['scale'].is_array
True

however it is possibly easier to try and iter and if not use the index.
datapath = 'scale'
index = 0
frame = bpy.context.scene.frame_current

if not (len(fc.keyframe_points) or len(fc.sampled_points)):
    ob = obj.id_data.path_resolve('scale')
    try:
        iter(ob)
        value = ob[index]
    except TypeError:
        value = ob
else:
    value = fcurve.evaluate(frame)

print(value)


how can I change the eyes and add other textures like eyebrows to this model I use a Blender page called Build_A_Bod to make my
male and female models as they have a zillion shape keys but I cant figure out how to add eyes and other textures to these models , anyone have any suggestions ? also warning these models are not appropriate for work or children.

https://drive.google.com/open?id=12V-yuW0wzp1i4-q8kD833KoW_wttyoHU

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

Select your model
Enter Edit mode. Switch to vertex mode
Select eye left using CTRL+Right click: Select 1 middle point of the eye. Click on Ctrl+"+ numpad" to grow eye selection. Then switch to front view. Press "U". Select project from view.

You now have a separate UV from the body. Create a new material (yes in edit mode) and assign it to those vertices. From there on, create an eye texture by assigning a white blank texture, switch to texture paint interaction mode (1) and paint. Save image in the UV editor.

The rest of the body has UVs already. Click on object properties from the properties window on the VERTEX tab (triangle shape of icons)
Like this: https://streamable.com/l2di8

Thank you for your consideration in voting my answer.

BFCT_Schiller


the speed of camera rotations when using the numbers of the numpad? is there a way to lower the speed of the rotation when pressing 2 4 6 8 in the numpad for a quick camera rotation around an object ?  A way without scripting. Maybe changing the start up file or something like that ?

Yes, go to User Preferences/Interface, and here play with the Smooth View and Rotation Angle settings.

  Smooth View
      Length of time the animation takes when changing the view with the numpad. Reduce to zero to remove the animation.

  Rotation Angle
      Rotation step size in degrees, when Numpad4, Numpad6, Numpad8, or Numpad2 are used to rotate the 3D View.


how to reduce clump of strange noise in render? I have a strange clump of pixels on a model added into some video. am experimenting with animated depth of field to get the model to defocus when the camera does, the pixels stay in focus and seem to accumulate through the short test clip they are not static they move around in the one spot on each frame. the material is trying to look like a glass ball of a solar garden light. now that I look I can see it rendered in the camera view of the viewport too both can be seen in the image. is there a cure for this?

this is the material , the image used to map is a photo of the glass ball.

fixed with help from Gordon Brinkmann.

It looks like noise from reflective or refractive caustics or something simlar. Try disabling "Reflective Caustics" and / or "Refractive Caustics" in the Caustics section under "Light Paths". If the noise disappears, try re-enabling caustics and in the "Clamping" section set a value for "Indirect Light", like 10 or 5.


Why is Blender's IK pole target system so difficult? Am I missing something? I'm accustomed to doing my rigging in Maya. I enjoy the precision and the constraint system is excellent.

I decided to broaden my horizons. Now the rage:

Over the past day and a half i've been messing with Blender's IK system and found it to be terribly bad. The pole target system flips my IK unless I make some pole angle adjustment. I already know how to set up the pole target so my rig doesn't twitch, that's not the problem. The problem is aiming my IK at the pole target WITHOUT having to touch the pole angle. The only way to achieve this is with a bone roll setup that hasn't been adjusted at all.

How in the hell do you guys do this? Is there some addon i'm missing?

You are trying to do impossible. Check this out how Pole target angle is exactly computed and how the IK works with it.

You either setup the pole angle or the IK base bone roll.

Adjusting the pole angle is lesser evil, that's how it should be done. Adjusting bone roll ends up in re-binding skin.

Maybe the iTaSC IK solver would suit better your application than the blender's legacy one, try it out.


How can I create instances of PropertyGroups with independently editable variables? I'm currently making an addon to randomize path variables, and need lots of groups of variables that I can independently edit. I've been trying to get Property Groups working with this but can't figure out how to make instances of the Property Groups and still be able to edit the variables inside them.

Here's what I have:

the main PropertyGroup

class PathNode(PropertyGroup):
    path: StringProperty()
    minvar: FloatProperty()
    maxvar: FloatProperty()
    randomize: BoolProperty()

this is how I've been trying to make multiple instances of it, with "pathsam" as an IntProperty

bpy.types.Object.pathsam = CollectionProperty(type=PathNode)

Does anyone know how to either fix this, or know how to create multiple instances of the main path variable where the variables can still be independently accessed and edited?

In general adding property groups to object types can be done with

import bpy

class PathNode(bpy.types.PropertyGroup):
    path: bpy.props.StringProperty()
    minvar: bpy.props.FloatProperty()
    maxvar: bpy.props.FloatProperty()
    randomize: bpy.props.BoolProperty()

classes = [PathNode, ]

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Object.pathsam = bpy.props.PointerProperty(
            type=PathNode)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Object.pathsam

if __name__ == "__main__":
    register()