Using custom transformation orientations in rigging So, I have a robot that I am rigging (think eve from the pixar film Walle). It's shaped like a large diamond. https://ibb.co/cSCOPb. But the four bottom panels open up so that it looks like this: https://ibb.co/bHzRcw. The way that I am currently doing it feels really janky. Since I want to rotate the panels along an axis that isn't solely x, y, or z... I've created my own custom transform orientations.

This might be a side-problem, but I can't really rotate using the transform manipulators. It works fine for scale and position, but anytime I click on them to rotate it just moves the 3D cursor instead. I can find one or two tiny and specific spots that allow me to rotate using the manipulators.

And I haven't found anything that adresses using the lock axis hotkeys for custom orientations...

Furthermore, I'm trying to translate all of this into a rig. Since the panels only ever need to go from rotation A to B or in the middle, it'd be great if I could just create a rig that limits the rotation to those values, but I'm having a hard time figuring out the rig constraints to do that...

So.... Overall question is: Can I rotate on my custom axies using axis lock hotkeys?

Follow up questions are: Is there a better way than that? And can I create a rig that essentially does it for me?

That's exactly what a simple single bone does: it rotates in its own (local) axis, so that its rotation world is affected by its rotation set in edit mode.

If you really need (and I don't think so) the triangle of bones following the panel, you can parent them to a bone set as in my example and use it as the main rotation bone.


Extrude Along Path (Sharp Corners)? How can face of cornice be extruded along a given profile 'P' ?

I've used knife tool to cut the long profile at 45 degrees and the  assemble them together but process is long?

Try using a curve as a bevel object.

1- Create a curve with the shape you want to use as bevel.

2- Create a different curve as a new object for the shape you want that bevel object to follow

3- With the newly created curve selected, go to the curve menu and select the curve you want to use as bevel object and adjust the bevel depth.


Which animation method to use in blender for later use in Unity? I'm trying to understand which animations on blender will be able to be animated in unity.

I have tried animating a net in such a way that when the ball hits it I will activate the animation to look realistic- I built a net, added a lattice modifier and animated with this lattice, but then I saw the posts about Unity not able to run them.

So figured I'll try Cloth animations but then I saw posts says Unity wont accept those animations also.

So, beside manually moving each individual vertex on my net, how can I animate that?

Unity supports rigged models.

You would need to learn how to parent armatures to your model and adding keyframes. There're many tutorials on this.

Tutorials
Unity tutorial: Using Blender and Rigify


Is it possible to get nx, ny, and nz values of an object's coordinates in blender? So in trying to do a script that writes these values, specifically for an object's XYZ coordinates for either the direction the object is facing. I've messed with matrix stuff before in blender but I'm not quite sure how these in particular would work.

Edit:
NX, NY, NZ determine the direction the object is facing by calculating the normal the triangle the point is over.

Global representation of normal axes.

The global value of the  z axis z_axis = Vector((0, 0, 1)) of an object obj can be calculated using

nz = obj.matrix_world * z_axis

All can be calculated from the matrix world using,

nx, ny, nz =  [v.normalized() for v in obj.matrix_world.to_3x3().transposed()]


Backface checking fails Blender 2.79b.

Simple script should return indices of camera-oriented faces.

Mesh has two rather similiar directed faces, but code returns only one:

import bpy
import bmesh
import numpy

scene = bpy.context.scene

cam_mat = scene.camera.matrix_world
cam_dir = [e[2] for e in cam_mat][:-1]

bm = bmesh.new()
bm.from_object(bpy.context.active_object, scene, deform=False)
id = [f.index for f in bm.faces if numpy.dot(f.normal, cam_dir)>0]

print(id)

Default backface culling works fine though.

Ended with this. Transformed geometry to world coordinates (with bmesh.ops.transform as suggested by batFINGER) and replaced single camera direction to multiple directions between camera location and faces' centers:

import bpy
import bmesh
import numpy
from mathutils import Vector

scene = bpy.context.scene

obj_mat = bpy.context.active_object.matrix_world
cam_mat = scene.camera.matrix_world
cam_loc = Vector(([e[3] for e in cam_mat][:-1]))

bm = bmesh.new()
bm.from_object(bpy.context.active_object, scene, deform=False)
bmesh.ops.transform(bm, verts=bm.verts, matrix=obj_mat) #convert to world coordinates
id = [f.index for f in bm.faces if numpy.dot(f.normal, cam_loc-f.calc_center_median())>0]

print(id)


How do I create a freeze-frame effect with video editing? I am using Blender 2.76b.

None of these suggestions have worked for me:

Doing a hard cut. I am doing this multiple times to leave a gap, which I want to fill in with the freeze frame
RMB to grab the right arrow, which I want to extend
Press g and drag it, which will create a freeze frame on the last frame if extended beyond the original size.

I've tried this selection and tried both g and e and neither work. It seems to want to let me either move it or make the clip smaller but not extend beyond its original size.

Any ideas?

Add an Effect Strip->Speed Control, set the Multiply Speed to Zero and uncheck the Stretch to input strip length.

Then you can extend (E) the underlying strip however you want. To select the frame you want to freeze use the slip option (S)


Can I use the shoe last technique with modifiers or constraints in Blender? I want to use the shoe last technique used in shoe making in Blender.
Please see the picture below.

Curved plates and spheres overlap.
The curved plate is like shoe last, and I want to sculpt the sphere.

I tried the following steps.

With the shrinkwrap modifier, the sphere sticks to the curved plate and acts like a shoe last.
However, when attempting to sculpt, the sphere will stick to the curved plate and remain flat.

Removing the shrinkwarp modifier enables free sculpting.

But now the sphere passes through the curved plate.

From the example above the specific features of the technique i want are as follows.

When the mesh of the sphere is outside the curved plate, free sculpting should be possible.
If the mesh of the sphere digs into the inside of the curved plate, the movement of the vertices is limited.
This is similar to the shrinkwrap modifier, floor constraint or limit location constraint.
But it's not about the transformation of the object, it's about the interaction between meshes.

Can I model or sculpt in the same way as above in Blender?

No not an option, currently its vertex orientated (and it can add vertexes as well) its not object orientated and i doubt that will get into blender

However what you might do in your case is paint masks and play with the strength of it.


How to toggle the transparency view on edge selected mode in Blender 2.80? The edge selection lines/outlines are partially obscuring part of the mesh I'm working on, so I would like to be able to make these lines more transparent as to more easily see what I'm working on without zooming in excessively.
(I'm using 2.8 beta)

You may use toggle x-ray option:

Available both in wire-frame and solid view with option:


How to create a simple extruded box model? I am new to Blender and was wondering how I'd build a shape like so in blender? I.e. what tools are usually used for these type of organic curves?! the walls are 1mm thick and im wondering how would I draw that shape and set a depth and then give it a flat back as a piece I could then separate to illustrate the bezel and the shape of the curve?

Front view

side view to illustrate depth

What you are asking for is not one tool but a workflow. There is no one set way to do this, curves can be better for getting rounded edges but mesh modeling can be just as good.

However, this is fairly simple and you can achieve the majority of what you ask by just extruding. You can extrude faces, edges and vertices in Blender with the Extrude tool. Just select a face, vertex or edge and press E.

(Alternatively, you can constrain your extrusions to extruding along the object normal with Alt + E), you can experiment with this.

I will use the image you provided as a quick example here..

First, get as close as you can to the shape of the object, (I create the outline of the object from top view). I add a plane  and just grab the edges and subdivide a few times using W > Subdivide while in Edit mode to get some more geometry. I then move the new vertices to fit the shape of the image as closely as possible. To make it more detailed and organic as you ask, you can add more vertices to round out the curved side.

If the face has not been filled, you can use F to make a face from several vertices. I then extrude and delete the top face to give it some depth. To get the lid, I just duplicated the object with Shift+E and moved the sides down.

You can take it anywhere from here now.. I have also quickly added a Solidify modifier to give it some thickness. Also another note, I wouldn't worry too much as a beginner on getting accurate units etc, If you insist however, you can change the units using the Scene tab under Units.

To carry on, I recommend that you see these:

How can I make sharp geometric 3d models look more realistic?
Most efficient way to round edges
When should N-Gons be used, and when shouldn't they?


How do I organise and save separate animations in blender? So, most tutorials I have looked at get as far as animation and then put some keyframes in and show the model moving. So below is the three whole keyframes for my idle animation. So, a few questions:

How is this related to the model? other than that I've selected the bones in pose mode and moved them?
Before exporting, do I somehow need to make these frames an animation in another sense? I tried exporting "with animations" but nothing shows up when the model is imported into Unity.
How do I record more than one animation? I see nothing naming these keyframes as a group for a set animation or how I could do so, so right now I'd have to delete them and add different keyframes to do another animation.

These seem like pretty nooby questions, but I couldn't find a video or tutorial relating to it, all my searches essentially let to saving animations as video.
So, my end goal is:
Add multiple animations to my model & export it with those animations and import them all into Unity.
Bonus: I'd also love to blend animations without making multiple separate animations (i.e. I'd like to be able to run and shoot at the same time, but not have a shoot, run AND shootAndRun animation, just the first two.

I think I found what you need. If you go to the animation timeline and change the type to dope sheet, you should see an option next to it that lets you change the type to action editor. This will let you add new actions and save multiple different animations in one rig.
Not entirely sure how you would do it but I think that you may be able to make only certain bones animate for certain actions so if you are running you can have multiple animations only for the arms, and then have variations with holding different guns and shooting as well. Same with the legs too. So you could try and split the rig into those two parts with seperate animations.


Black background on Alpha Do you guys know how I can render it in alpha?
I checked the transparent check box under the Film.
But it still renders with a black background. I'm rendering it in Eevee btw. Thanks!

The problem here is Lens Distortion Filter you added in the Compositor. Because these distortions are calculated on color values (especially dispersion), the transparent area is taken as RGB 0/0/0 i.e. black.
To get back the transparency, you could plug the Alpha output of the Render Layers node into the Alpha input of the Composite and Viewer nodes.
Of course in this case, all distortion / dispersion that extends the alpha of the original image will not be visible because it becomes transparent.
You could take the original Alpha and mix in a copy of the Lens Distortion node before plugging it into the Composite/Viewer alpha, this helps but dispersion doesn't look the same as on black background.
See the attached image for comparison:

If you use the original alpha, the silhouette of the cube isn't distorted, the dispersion is almost invisible except for some skewed looking edges.
The alpha with dispersion takes the distortion/dispersion into account and makes the distorted part going from opaque to transparent according to its brightness.
This is how the dispersion normally looks on a black background and how it's calculated on a transparent background.
If you take the result from 2. and alpha over it on a black background it comes close to the real dispersion of number 3. However, it's not as colorful because of the transparency.
Here comes the problem: since real dispersion is splitting up the colors into spectral colors, on a white background it looks quite multicolored.
But if you just take the dispersion from the transparent image and alpha it over a white background, the multicolor is gone since the dispersion only worked on the blue of the cube and not the background.


Material shown in material mode but not render mode I have material which is attached to my object and it is seen normally when i am in object mode/mateiral

But when i go into render mode i get object without material:

As you can see also in material preview it is gray.
It is cycles render.

You can't use a mix shader node to mix RGB (image or texture) information.

Use a Color>MixRGB node instead.

You shouldn't mix data types when connecting nodes. Green goes with green, yellow with yellow and so on.

read:

What is the meaning of the color of the node sockets in the node editor?

and

Cycles - (Shader) Nodes - inputs outputs - What are the exact data types?

and

https://docs.blender.org/manual/en/dev/editors/node_editor/nodes/parts.html


How can the "Name" field in the node properties be useful for the user? I understand blender needs to have a unique identifier for datablocks, but it's not like an "Object" were you can assign a different "Object Data" datablock. The node doesn't have access to other "Node Data" datablocks. How it can be useful for user to get access to this 'Name' field?

User uses "Label" for naming nodes

The 'Name' field can be used to identify different nodes when accessing the nodes with python.

I might have 2 diffuse type nodes, 'Diffuse BSDF' and 'Diffuse BSDF.001' and be able to identify which node I want to change a property on, by it's name:

bpy.data.materials['Material'].node_tree.nodes['Diffuse BSDF'].use_custom_color

This would access the use_custom_color property on the node called "Diffuse BSDF".

I know which node I am accessing by looking at the 'Name' field in the node editor.

Because I am accessing the nodes by name, it might be useful for them to have more descriptive names to help me separate them from other nodes e.g. "diffuseMain", "diffuseOriginal' etc. I can use that name field to rename them to something more relevant and identifying.


How do i keep HDR background without having to see it when rendering? Can anyone tell me how to maintain HDR as a background light source, without seeing it through the rendered room window?

Select Render Tab in properties view & in FILM section, check Transparent.
However, The reflections of HDR will show up.


Adding condensation effect on a texture How to add condensation effect on a texture?

The way I add condensation effect is to add a texture image (condensation) to object material. However, I don't think we can use this method to add the effect on a texture? As it would be like adding texture on to another texture.

For example the label(coke) in picture below are a texture, how do we add condensation on it?

Thanks in advanced.

You can use a Normal map for the condensation.
That way you don't need to mix anything, just plug it into normal input.

Example of a normal map.
You can download this one for free from Poliigon.

Connect the normal map like this.
Use different Mapping nodes and perhaps UV maps for better control.


How to set up custom controls - Pan using Mouse 4 + MMB I would like to change my user preferences to pan the 3D view using Mouse 4 button + Middle Mouse Button and dragging it. This is the same as SHIFT+MMB. I would like to use Mouse 4 instead of shift.

I am using a Logitech G5 mouse which has 2 extra buttons on the side and I would like to use them. The buttons are recognised in Blender, that's not the problem. In Blender it is referred to as Button 4.

In User Preferences under the Input tab under 3D View I have created a new shortcut. I have tried multiple possibilities but none seem to work.
I tried copying the same as the shift+mmb entry and replacing shift with Button 4 but that doesn't seem to work. I have tried using view3D.view_pan (as in the shortcut using ctrl+mouse wheel) but that also doesn't seem to work. I have tried the press and click and numerous other options, also changing Middle to Move instead. none seem to work.

I have saved my settings as default and am using a custom preset.
Am I missing something?

edit: I am using a new custom preset. Besides this new entry, everything else is set to default.

updated picture: expanded view3d move modal

Settings for default shortcut SHIFT+MMB

note that the shortcut says "Button4 Mouse Middle" as opposed to "Middle Mouse". I don't know why. This might have something to do with it.
Or as mentioned in the comments, maybe Blender does not support mouse buttons as modifiers.

As far as I know, you can't use a mouse button as a key modifier, but only keyboard keys. (I don't know how you have set up "Button4" in the input)

"Button4" is only available in the drop-down list of mouse buttons :


Time remapping addon and motion blur problem The time remapper addon doesn't work well with motion blur turned on and motion blur can't be animated (nor the value neither the on/off switch). So the problem is, I have to divide the animation rendering into pieces:

first part of frames with Speed factor=1 and motion blur turned on,
second part with Speed factor<>1 and motion blur turned off,
third part with Speed factor=1 and motion blur turned on,
... and so on.

So it has to be done manualy, and theres one more problem: when you don't render from frame no. 1 and previously you've been using Speed factor <>1, Blender will overwrite the previously rendered frames.
So is there a way to animate turning motion blur on/off?

Motion blur is a complex subject that can often require reassembling frames using optical flow technology.

Once you have your edit in place and can precisely locate where you require retiming, you might be able to leverage a tool such as slomoVideo.


How do you create a 3D Model to be uploaded and viewed by HTC Vive Needing to create some 3D models, how can they be uploaded to the HTC Vive to be viewed on VR. DO i need to use another program such as, Unity, and or Unreal, or Steam. How would i create the model VR ready.
Thanks

There is an plugin but it does not seem to have been updated in the last 4 months.

That said the video is amazing, though it is only head tracking in room-space no controllers. You can always get the source code.

https://github.com/cedeon/virtual_reality_viewport/tree/vivetest

http://uploadvr.com/blenders-open-source-software-just-got-makeshift-vr-support/


Smart UV Project/Unwrap I'm having trouble using the Smart UV Project Unwrap in Blender 2.81. When I go into shading to check the Unwrap, I apply a basic checker texture and it shows a stretch in the Z axis. Why is this so? How can I fix this, make them square checkers.

See below:

Thanks,
CorzaX24

This usually happens, when your object has non-uniform scale.
You need to apply scale first for a correct UV unwrap.

Object > Apply > Scale

Also, make sure your texture is connected to the UV map


How to restart the animation of a particle system? I create an expulsion so my particle system has the following settings:

End frame = Start frame + 1

I mean the value of the end frame is one frame larger than the value of the start frame.

Life time = 6

velocity = 8

Those settings create an expulsion starting from the start frame. What if I need this expulsion to start at frames 10, 50 and 100? Is it possible to Restart the expulsion?

I can't animate the start frame or the life time. Animating the number of particles doesn't work.

I think you need (3) separate Particle settings for that, like so:

Also a gif:


Could someone please explain gimbal lock? I have read the Wikipedia page on gimbal lock, and am still confused about the entire matter.  My understanding is that, using a local coordinate system, if you rotate a model about its X axis then its Y and Z axes experience gimbal lock, and become "locked" together.  However, my understanding is that if you rotate the X axis, then both the Y and Z axes rotate with it, and as such remain separate.  Wikipedia, as always, while a good resource is difficult to understand on this topic.  Could someone please endeavor to explain this to a person who does not have a Master's in physics or mathematics?

I gather that it's an inherent weakness of just storing three axial rotations (Quaternion, on the other hand, also evaluates orientation value).

(Per ideasman42's comment): We can easily see this for any object using Euler rotational system, by manipulating the rotation widget with transformation orientation set to Gimbal. It turns out to be easy to reproduce, by manipulating 2nd axis in the evaluation order (Z for XZY, or X for ZXY, etc.). I get the following condition on XYZ order by just manipulating Y axis:

Here's an article and a video for alternative explanations of the condition.


Volumetric haze is showing through solid objects when 'stacked' I have my whole scene contained in a big cube, and the cube's shader has both volume scatter and volume absorption (which are mixed with an add shader). So the whole scene has haze.

Then, where light is emitting from some conical lamps, I have some invisible light cone meshes, and their volume shader has a stronger haze effect, about double that of the room.

Either haze effect works fine on its own. But when I enable both of them, some haze from the cone lights appears to show through solid objects. But not consistently... like in the pic below, areas near the camera don't have the issue while areas a bit further away show it.

What's the cause, how can I fix it?

See the screenshot below to see what I mean.

Haven't had much luck on this site lately! But I kept banging away at it and figured it out on my own.

The three overlapping cone shapes that you can see at the 3D window (bottom right), don't come to a point, the point is chopped off. So they're like cylinders that are skinny at the top and fat at the bottom.

The issue was apparently caused by the fact that my cylinders were open-ended (aka non-manifold). They had no faces at the top or bottom.

So for example in this pic, the first and last cylinders/cones have faces on top. The middle is open. So if I rendered it like this, the middle one would have the problem while the others wouldn't.

So it seems volumetric effects are sensitive to the mesh that contains them. I should have figured that out sooner because I tried making the cones originally with no faces, just 'wireframe' vertices and edges... and the volumetric effect didn't show. They needed faces to contain it. Since the faces have no material, light passes through them ok, so leaving the top of the cones open wasn't necessary.


Is there any way to save background images in the .blend file? I'm trying to use the background images option to model from blueprints.  After I cropped, loaded, positioned and scaled in each viewport, things were going pretty well with the modeling.  I saved the progress on the model and came back the next day and the images were not there.  Am I missing something?  Do I have to set everything else up again or do you have to get your modeling done in one session?

The most convenient way

  File -> External Data -> Pack into .blend

In the report area it will say 'n files packed' Where n is the amount of images currently in the image list. Now hitting save will include those images in the .blend.
The problem you might have with this method is that it will auto-pack any subsequent images you add.

Alternatively (one by one, gives more control)
You do them individually, go to the UV image editor. For each image you want to pack you select the image so it shows in the view, then

  Image > Pack Image

Again you have to save the .blend file before exiting.

Further reading
Obligitory Blender Wiki link: Pack and Unpack Data, it's an interesting read.


child object moves when parent object's scale is changed The child object follows the parent when I move it, but when I change the parent object's scale the child not only changes it's scale as expected, but moves, and keeps moving. How to solve that?

The issue you are facing is just how parenting works. Let me try to explain.

Take this example:

In these two images I have a monkey parented to a cube. Notice the location of the monkey. The only thing I change is the scale of the parent cube. (Fun fact if you cleared the parent on the monkey now, it would jump back to the top image.)

In this type of parenting the parent's scale is a multiplier for the child object's location and dimensions, its just how it works.

From your question it sounds like you want to be able to scale the parent, and have the child copy the scale, but stay in the same location. To do that you need to use a Child Of Constraint (also detailed in my parenting answer.)

On still using the same example as above, put a Child Of Constraint on the monkey. You want to uncheck all the Location and Rotation check boxes. Now only the scale will be changed.


How to move object in its local transform orientation in Animation nodes? How can I move an object in its local transform orientation in animation nodes?

There is a way using some math with rotation of the object as an input,but I want to know if there is an easier way to do it in animation nodes.

I think you can make use of Matrix nodes:

Note that the order to combine Translation and Rotation matrix data is the key here.


Particle systems with lamps as the object emitted I'm currently using Blender 2.69. I was reading up on particle systems in Blender's wiki user manual and I noticed that according to the documentation that in addition to having other object primitives emitted as particles that lamps could be used as well. I tried this out using a simple point light. When I tested the particle animation in wireframe mode I could see that my emitter was emitting the lamps, but the nothing would show up in a render. Could anyone tell what I was doing wrong or is this a bug?

It is nothing about particle system actually.

As you see, there are some non-mesh type of objects cannot be rendered, such as lamps/bones/cameras/lattices/empties, etc, since they don't have any solid face to render. However, you can still see their effects around the scene as ususal.

Anyway, other options here would be:

For BI:

Instead of lamp, use mesh object with Emit shading enabled;
Group lamp with mesh object, set mesh material type to Halo, emit the whole group as particle unit.

For Cycles:

Use mesh object as particle unit, use Emission shader for material setting. (recommended)


Shared and seamless gradient effect between two objects? [EEVEE] I've been sitting on getting a flame gradient achieved since I didn't know how to get it to be seamless between two objects. I used very basic mapping, but of course it looks rudimentary:

And here's the screens of both the node sets for the head and the flame:

The flame is a flat plane that uses and image texture, where as the head relies on its own mesh, so I hope it doesn't complicate things.
How can I get a seamless 'universal' texture that will look consistent between both objects?
Here's a mockup to show what I'm aiming at (also ignore the fact there isn't a flame outline, it doesn't matter)

If you use the "Object" output from the "Texture Coordinates" node on both shaders, and then set the origin of both objects to the same location, the seam should disappear.
Example :

Also :


How to turn particle emission on/off? Is there a way to animate whether or not a particle emitter is emitting particles at a given point in time?  I'm using the particle system to animate bullets, so basically I'm trying to find a way to say: at frame 150 the gun fires a burst until frame 170, at frame 240 it fires a burst until frame 265, and so on.

I've tried key framing the particle render setting between "object" and "none", but the problem with that is that the hidden particles are still there, so when the render setting switches to "object", the particles that were initially hidden suddenly appear.

I've also thought of putting a plane (not rendered) with a collision modifier in front of the emitter and then moving it when I want the emitter to start emitting particles.

Is there a better way?

The simplest way to handle this is to add a keyframe for the particle lifetime. To make the particles stop emitting, set the lifetime to zero.

If you have very fast-moving particles (such as bullets), you will also need to keyframe the initial velocity down to zero.


Difference between OpenEXR and OpenEXR Multilayer file format? What's the difference between the two EXR file formats? When should I use one over the other?

It was noted in the comments but in short, use Multilayer when you want to bundle multiple render passes in one file. It's worth noting that some programs can read EXR files, but not Multilayer EXR files. For this reason, I use  OpenEXR for non-lossy high color depth renders, and pretty much don't use OpenEXR Multilayer. The main purpose of Multilayer is to keep all the corresponding passes together for each frame, which is useful for working with other compositing software that then extracs and uses each pass.


Curve animation export to unity; Exporting "rolling" curve mod animation into unity I'll make this short people;

I need the animation that does this:

But all i get in Unity, is a plane going from A to B on an axis, it does not roll.

I tried baking the location, but it did not help.

How do i get the complete animation into unity?

For clarification, i am using a curve modifier to make the plane roll aroun like paper.

Thanks in advance.

There's a way to partially do this. It takes some tinkering.

There's a myth going around that Unity does not understand shape keys from Blender; this is not true. You'll find it under the "Blend Shapes" tag under Skinned Mesh Renderer. However, that's not everything, because the foundation of truth in that myth is that Unity does not understand Blender animations involving shape keys. You need to re-animate it from within Unity.

The additional concern is that shape keys always lerp, never slerp—that meaning, transitioning between shape A and B is done in an exclusively linear fashion. They also act in strictly Cartesian space, never spherical space (as nice as that would be). That means that for something like above, where you're "rolling up" a scroll, you'll need to break it into several parts.

I would suggest approaching something like this by breaking down the action into multiple individual segments, preferably atomic ones; for each one, develop a shape key that rolls the shape from one form to another. In Unity, you would maximize those one by one. You might have one shape key that forms the initial roll in the scroll; then another that half-rolls to the right, then another, until you have the entire scroll rolled up.

That is, have one shape key that goes from flat to flat-with-one-roll, then another that goes from flat-with-one-roll to flat-with-one-and-a-half-rolls, and continue until you reach the end. Then, in Unity, set up an animation that interpolates each Blend Shape from zero to one, then moves to the next one.

Conveniently, many of Blender's modifiers can apply themselves as shape keys.

I should also note that you'll want to add a solidify modifier to that mesh, even if at width zero. It looks like it's just a plane, and in Unity, one side will be transparent. I strongly suggest applying this after you've got the roll-up motion working, though; it should make things much easier.


Conditional Property Group Is it possible to assign a conditional property group to scene elements?

My intent is to not have the group exist until I manually create or assign it, then be capable of removing or deleting it.

I came up with a very simple (and somewhat obvious) solution to my problem - Use a property collection list to contain the single "conditional" property group. It has all of the qualities of a dynamically allocated object (property group) which only exists when you need it to:

class XYZ: # your object properties group or whatever

    list : bpy.props.CollectionProperty( type = ConditionalPropGroup )

    def IsNull(self):
        return len( self.list ) == 0

    def Create(self):
        if self.IsNull():
            self.list.add()
        return self.list[0]

    def Destroy(self):
        if not self.IsNull():
            self.list.remove(0)

So I just have to add the collection property to all scene element classes, then I can assign the property group itself to specific elements, leaving the rest empty.


Grid floor is not straight My grid is askew and I don't know why

It looks like you may have rotated the view with ⎈ Ctrl⇧ Shift Scroll.

To re-align it, try going into an aligned view (e.g. Front view with Numpad 1).


Dark shadow on some faces, already recalculated normals and merged vertices I'm encountered similar problems a few times and can't figure it out. I have simple low poly mesh, normals are correct and there are no extra vertices but still some faces look darker.

flat shading mode

Proof of no extra vertices
https://gfycat.com/niftyshockedclingfish.gif

This error is most probably caused by shade smooth.
To fix this go to object data properties -> Normals -> Check the Auto Smooth Checkbox


In Windows, Blender folder not in Start Menu for all users? I have a Windows 7 computer with three users sessions.

But after installing Blender 2.77a, I noticed in the Start Menu that the Blender folder is not visible in other user session.

Is it normal ?

--- Update ---
Blender can be used in multi-user system ? Recent documents from an user is visible or not to other users ?

I don't know much about Blender's installation routine since I use Linux for 3D modeling for stability reasons (and regardless of the OS I tend to use the zipped version), but recently there was a post of someone who claimed that it's exactly the other way round for 2.77b.

Regarding you "is it normal" question - as a former IT admin I'd say, if a software runs properly and the only issue is that some icons that are not "in place", it's normal (aka "happens every day"). Just move the Icons over to the "all users menu folder" and it's fixed.

If this answers your question, please mark it as accepted.


Mixing Displacement Procedural Texture Is there a way to mix procedural textures (like clouds, voronio, etc) for the Displace modifier?

I managed to work with nodes (like in cycles) to produce a mix using the Brush tab in Node editor and it does actually show a preview when selecting it in the Textures tab in Properties editor, but has no effect in the modifier.

Thanks

You can do this with newest Blender versions (as I remember from 2.78 and up).

First of all you'll need to turn on Experimental features (1) and select under Material tab Displacement as True (2). You can use Both but mixing Displacement with Bump gives weird results. Next step is to add Subdivision Surface modifier with Adaptive checked.

You can check whole tutorial about it here: Introduction to Microdisplacements


Merged characters hand to the arm and got a weird choppy result Looking for a smooth transition

Normals was inverted,
you can flip normals of selected faces while in Edit mode by:

3D Viewport Header -> Mesh -> Faces -> Flip Normals

If you want to quickly fix all the normals in your mesh, while in Edit mode you can use Recalculate Normals:

3D Viewport Header -> Mesh -> Normals -> Recalculate Outside (CTRL + N)
3D Viewport Header -> Mesh -> Normals -> Recalculate Inside (SHIFT + CTRL + N)

  Why are some faces in my mesh darker?

Thanks to Mr Zak & Thom Blair III


Mesh is not affected by Bone rotation, but it's still affected by Weight Painting I have a model composed of different parts linked by a single armature, one of them is a face with fully-working weight painting set to various bones, which are all parented by a main bone (the head bone).

However, when I try rotating the head or the neck (head's parent), the mesh ignores it and stays in place, but it still gets deformed since the bones themselves have moved, as you can see here.

It rotates normally if I parent the face to the head bone without weighting, so it's something with the weight maps.
I already checked: Armature/Bone scaling, Parenting, Origin points, Weight maps.

What's even weirder is that the chest bone (neck's parent) can be rotated normally without causing the glitch, as it was meant to be.

Any ideas? I really wish there is a way to fix this without redoing the weight painting of the child bones, since I already spent a lot of time working on it.

You need to make sure that the head is only being affected by the head bone and its child bones, probably there is another bone, like the neck or the chest that is moving the head. Go to the list of bones and check everybone and then make the bone head affect all the area that you want to move (sorry for bad English)


Quick way to get current opened filename in a script? I'm looking for an efficient way to get the current .blend file name, in a python script.

I know how to get its path, with bpy.path.abspath('//'), but it returns only the current path, without the file name. I'm sure it's possible, but I can't find out how.

It's in bpy.data.filepath.
This is the absolute path to the currently open blend file, see is_saved, and is_dirty too.


How can I pass arguments to an Operator inside a Macro Operator? I´m using a Macro type Operator to concatenate actions which require the user to interact at some points, so I create a Macro Operator class and then populate it with some existing (or custom) Operators, using the define method.

Then I call it from the user interface like some regular operator, except that, (I suppose) I cannot use the user interface to pass arguments to a specific operator inside the Macro, so I want to know which is the right procedure to pass these arguments, because I need the operators to react with different settings than defaults.

I tried to add more arguments to the "define" method during register, but an error is raised declaring that it can only take 2 positional arguments: the idname of the Operator (and I suppose self).

import bpy

class Panel(bpy.types.Panel):
    bl_label = "Panel"
    bl_idname = "Name"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Tools"

    def draw(self, context):
        layout = self.layout
        layout.row().operator("macro.start")

class Macro(bpy.types.Macro):
    bl_idname = "macro.start"
    bl_label = "Start Sequence"

class SomeOperator(bpy.types.Operator):
    bl_idname = "macro.finish"
    bl_label = "Finishing Operator"

    def execute(self, context):
        # do something else after transform
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)
    Macro.define("TRANSFORM_OT_translate") # How can I give arguments to an existing Operator?
    Macro.define("MACRO_OT_finish")

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

if __name__ == "__main__":
    register()

Macro.define("TRANSFORM_OT_translate") returns a OperatorMacro which has a properties attribute.

Eg:

op_macro = Macro.define("TRANSFORM_OT_translate")
op_macro.properties.value = (1, 2, 3)


How do I fix the placement of these bones? I'm really confused with the placement of some of the bones in my rig. The controller bones for the fingers (the ones in green) keep moving whenever I jump into Pose Mode from Edit Mode. The same happens to the C_look_target too; it appears behind the model. How can I fix this so they appear in the same place in both modes?

Thanks

It's because your D_Hand_L bone has a Copy Rotation constraint with a Space > World Space <-> World Space while it should be Local Space <-> Local Space. It was dependent of the rotation of the other bone in the Global Space so it was rotating a bit as soon as you entered in Pose mode.


Mesh Dosen't Follow Mesh Properly I have learned how rigging and weight painting works and when I try to move these claws they deform very oddly

Blend:

https://ufile.io/axq1u

Your armature doesn't work because, you may not see it in Weight Paint mode, but some bones have influence on some meshes while they shouldn't. I don't know how it happened, perhaps your claw was one unique object, you parented it to the armature With Automatic Weight, then you separated your object in several objects?

Anyway, if you want to keep several separate objects, select each one and in the Properties panel > Data > Vertex Groups, delete each vertex group that is not supposed to be here, i.e. every vertex group except the one that has the name of the bone that is supposed to control this part.

You can also join all these different meshes to make one object, then parent this object to the armature with the With Empty Groups option, then select each mesh and in the Properties panel > Data > Vertex Groups, assign it the vertex group it supposed to be part of.


Get bone rotation in pose mode using Python I want to get angles of joints in armature in pose mode, see the picture below. I tried to get local rotation of bones, but I can't find a way to do this.

I tried:

bone.rotation_euler()   # everytime returns [0, 0, 0]
bone.matrix.to_euler()  # everytime returns some constant value e.g. [2, 0, 0]

I can rotate bone, but values don't change. How can I get actual rotations of the bone?

Also I find out a strange thing:

If bone has Rotation Constrait I can rotate it to constraint and it stops, but in Transform panel I see that angle is stil growing
If I use IK and move bone, location and translation in Transform window doesn't change.

Maybe this is relating to my problem. What is actually displays the Transform panel?

First note that bones have two representations within blender, the EditBone data represents it's static rest position within the armature while the PoseBone is the animated bone data that you would be moving around. The edit bones are stored in obj.data.edit_bones while the pose bones are in obj.pose.bones.

The rotation_mode value of a pose bone is used to switch between using rotation_euler, rotation_axis_angle or rotation_quaternion. These three rotation values can be seen in the bones properties and will show values without any constraints being applied. Note that euler values are stored as radians so you may want to use math.degrees() for the display value. Also the W in axis angle is radians.

The pose bones matrix value should give you the world position of the bone after constraints and drivers have been applied. You can get the bones euler rotation with bone.matrix.to_euler(). If using bpy.context to get the bone, you will find that bpy.context.active_bone.matrix will give you a matrix of zeros and ones while bpy.context.active_pose_bone.matrix will give you the matrix that you are after.

You can use a panel to watch the rotation of a bone -

import bpy
from math import degrees

class SimpleBoneAnglesPanel(bpy.types.Panel):
    bl_label = "Bone Angles"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    def draw(self, context):
        arm = context.scene.objects['Armature']
        bone = arm.pose.bones['Bone']

        mat = bone.matrix.to_euler()
        row = self.layout.row()
        row.label(text='X: {:.3}'.format(degrees(mat.x)))
        row.label(text='Y: {:.3}'.format(degrees(mat.y)))
        row.label(text='Z: {:.3}'.format(degrees(mat.z)))

bpy.utils.register_class(SimpleBoneAnglesPanel)


How can I turn a geometric shape into a hollow room with evenly thick walls? so I as a Blender newbie is trying to model a hollow building. I was wondering if there's any easy way to turn this flat plain surface into an actual wall with thickness. The challenge is that it has window gaps, the wall is slanted outwards and that the walls are part of an octogon. How do I model an evenly thick wall from this here?

You can use the Solidify modifier; To add it to a object, select said object, go to the Properties, and in the tab Modifiers click Add Modifier and select Solidify.

You can adjust the Thickness value.


What are the denoising passes useful for in 2.79 experimental feature set? In 2.79 when experimental feature set is activated, there are some new passes available to the compositor if Denoising is enabled.

The new passes that are there after rendering the denoising pass are as follows:

Denoising Normal
Denoising Normal Variance
Denoising Albedo
Denoising Albedo Variance
Denoising Depth
Denoising Depth Variance
Denoising Shadow A
Denoising Shadow B
Denoising Image
Denoising Image Variance

Here are a few example images of some of the passes with a simple scene:

Denoising Image:

Denoising Image Variance:

Denoising Normal Variance:

Denoising Shadow A:

Denoising Shadow B:

The only information I have really been able to find regarding these extra passes is located here.

Quoting Lukas Stockner:

  ...added an option to store the denoising feature passes in the render
  result (only visible when experimental features are enabled).

  This makes it a lot easier to debug problems and check why some scenes
  don't denoise well, and might be useful for animation denoising in the
  future (since that requires multiple frames at once, it has to be
  separate anyways).

Even still, I'm not sure how these passes help with debugging issues, or present any other use until implementation is completed.

The question:
How are these passes to be used in current 2.79?

If they are simply for debugging issues, as mentioned by Lukas, or if there is another practical use for them, what would be a typical use case where it would be necessary to store them?

Here is the file used in the images above if anyone is interested:

There are no practical uses at the moment. It has been suggested that they will be used in compositor denoise setups, perhaps for denoising individual passes (as currently only the combined render is denoised.) However, whatever setup they are intended for has not been developed yet. It will probably happen when the denoiser is finished. So perhaps for 2.8, or perhaps not until later.

This info came from the blenderartist post. I asked about it here. I do not know if it discussed in more detail elsewhere in the thread, as the thread is huge!

https://blenderartists.org/forum/showthread.php?395313-Experimental-2-77-Cycles-Denoising-build&p=3208408&highlight=#post3208408


How can I insert values at the start of an array of vectors in Blender 2.8 using Python How can I insert a value in a array of vectors using Python 3.x?

The full code is below.  It is using Blender 2.82a:

import bpy
import mathutils
import math

ob = bpy.context.object

#1) Get all vertexes and place in vector array
vec = [v.co for v in ob.data.vertices]

print("vec=%s" % vec)

It creates an array of Vectors of x,y,z values:

vec=[Vector((1.0, 1.0, 1.0)), Vector((1.0, 1.0, -1.0)), Vector((1.0, -1.0, 1.0)), Vector((1.0, -1.0, -1.0)), Vector((-1.0, 1.0, 1.0)), Vector((-1.0, 1.0, -1.0)), Vector((-1.0, -1.0, 1.0)), Vector((-1.0, -1.0, -1.0))]

And I would like to insert a 7 at the start of each vector so it would look like:

vec=[Vector((7, 1.0, 1.0, 1.0)), Vector((7, 1.0, 1.0, -1.0)), Vector((7, 1.0, -1.0, 1.0)), Vector((7, 1.0, -1.0, -1.0)), Vector((7, -1.0, 1.0, 1.0)), Vector((7, -1.0, 1.0, -1.0)), Vector((7, -1.0, -1.0, 1.0)), Vector((7, -1.0, -1.0, -1.0))]

The .insert doesn't seem to work in vectors.

By default Vertices vectors are in 3 dimensions so we need to create a new one with 4 dimensions.

import bpy
from mathutils import Vector

try:
    vectors = [Vector((7.0, v.co.x, v.co.y, v.co.z)) for v in bpy.context.object.data.vertices]
    print(vectors)
except AttributeError:
    print('Please select a mesh object')

Result :


View Port Guide/Grid Broke? Front, Back and Side Cameras A weird bug has appeared when I view through the default Front Back and Side camera views in Blender.  The square grid has an odd triangular effect (see image below).  This happened a couple of days ago and seems to have happened over night.  It doesn't effect modelling or renders (as far as I've noticed) but it's quite annoying to see - especially when I don't what's caused it.
This only seems to happen when viewing through cameras on the axis (numpad 1,3 and 7) and occasionally in the orthographic view (numpad 5). Normal perspective cameras don't have this issue.
I've looked around and can't find an answer to the issue though, if I'm honest, I don't know what to be searching for. I've also uninstalled the software, re-installed, reset preferences to factory setting etc. but still get the same result.
Has anyone had this issue before and resolved it?  I have accidentally changed a setting and not realised?
Thanks in advance

Use Alt + B to clear the clipping region, or use the menu View > View Region > Clipping Region.


Replacing a part of animated mesh with bone weights I am trying to replace a humanoid part for my archer model. The full model is fully rigged and animated. It also has parts, which I am not replacing (clothes, archer bow, arrows, etc.). I merged meshes into a single object, where old and new meshes can be selected with CTRL+L shortcut. The full object looks like in the figure bellow.

However, the new model has no assigned vertex groups and the old model has. The weight paint mode looks like here

I am looking how it would be possible to assign weights from bones only on a new humanoid part and leave bow, arrows and clothes with their original weights. If I use "Weights > Assign Automatic From Bones" I am getting them assigned correctly to the new humanoid model, but it also assigns new weights for all other parts of the object (bow, arrows and clothes)

I was interested if there is a way to go around this, that only a part, which I am trying to replace, could get assigned automatic bone weights?

One solution would be to use vertex selection masking (in red circle on the image below) and select only new mesh vertices, then assign automatic from bones.
Second way would be to take new mesh out, place in the right spot in object mode and parent it to armature with automatic weights and delete old character body leaving cloths and weapon.


bmesh.ops.inset_region gives unexpected results I want to create an object based on the active one with inset faces and modified vertex coordinates. Inset works as expected if I don't modify verts coordinates but if I do it gives me unexpected results. Do I need to somehow "recalculate" bmesh after I modify verts positions?
Here's the result I'm getting:

Here's a code I run on a Plane object. As an example I make every point of the object 1 unit higher. I tried to include different variants of .ensure_lookup_table() without any luck.
import bpy
import bmesh
from mathutils import Vector

ob = bpy.context.object
bm = bmesh.new()
bm.from_mesh(ob.data)

for index, v in enumerate(bm.verts):
   v.co = v.co + Vector((0,0,index))

# insetting bmesh
inset_faces = bmesh.ops.inset_region(bm, faces = bm.faces, thickness=0.5, use_boundary=True, use_even_offset=True)

# creating mesh
mesh = bpy.data.meshes.new("mesh")
obj = bpy.data.objects.new("new_obj", mesh)
bpy.context.scene.collection.objects.link(obj)

bm.to_mesh(obj.data)
obj.data.update()
bm.free()

What am I missing?

Update the normals.
After you "twist" face by index translation, the normals are not recalculated unless we explicitly call normal_update either on the bmesh instance, or on a per face basis.
Update Edge Info when using script in Edit Mode
Script with that edit, also optionally changed operator to inset individual.
import bpy
import bmesh
from mathutils import Vector

ob = bpy.context.object
bm = bmesh.new()
bm.from_mesh(ob.data)

for v in bm.verts:
   v.co.z += v.index

# update the normals
bm.normal_update()
# or on per face
'''
for f in bm.faces:
    f.normal_update()
'''
# insetting bmesh
inset_faces = bmesh.ops.inset_individual(
        bm,
        faces=bm.faces,
        thickness=0.5,
        #use_interpolate=True,
        use_even_offset=True)

# creating mesh
mesh = bpy.data.meshes.new("mesh")
obj = bpy.data.objects.new("new_obj", mesh)
bpy.context.scene.collection.objects.link(obj)

bm.to_mesh(obj.data)
obj.data.update()
bm.free()


How can I connect loose edges? I'm making a model for a voxel style game. I've modeled it in Qubicle and exported it to Blender for the animations. But in my mesh most of the faces or edges are not connected, and I can't find a way for doing it so. That is affecting the mesh light in Unity.

I've tried with the simple Ctrl while dragging, but that does not connect it. I've also tried putting new vertices and merging both. But the mesh and the UV maps (directly imported from Qubicle) keeps distorting.

I don't understand why it's so hard in a so basic mesh. Is there a simple way to do it. I'm desperate, please help!

You need to use Remove Doubles.
 In Edit Mode, press  A  once or twice to select all vertices, then Ctrl +  V  and choose Remove Doubles, this will weld all vertices sharing same location.


Use Windows PC tablet as Wacom Tablet for Mac As the title suggests, I would like to know how to turn my Windows PC into a Wacom tablet for my Mac. I've read about solutions that use VNC or a custom built Linux OS, but they do not fit what I need. Preferably, I would like to use some Windows app that can read pen and touch input from my PC and send that data over to my Mac. Somewhat like a Wacom tablet. I intend to use this for the Grease Pencil or sculpting in Blender.

Thank you in advanced for your help!

So it turns out TeamViewer can do the job. It is possible to run a connection over the local network (which increases speed). In the end, I simply TeamViewered into my Mac from my PC and worked like that.


Blender 2.8 - Weird experience with smoke domain I hope someone can help me with this weird issue.

I'm trying to create a sphere that emits fire, like the sun.
I've followed this tutorial.

This is what it should look like:

However, as soon as I copy the object (sphere, forcefield and domain) into my other project, the sun's flames start to look like this:

When I copy the object out into a new project, (after baking of course) it again looks good.

What could this be? I've spend dozens of hours trying to figure it out, recreating it etc, but it always comes down to this.

I would greatly appreciate anyone's help! :)

I'm using Blender 2.8 and rendering in Cycles.

EDIT:
I re-created the sun following the guide, using a new General blender project. This is the result (which is good):

Now, I've copied that object into my other project.

I didn't change the position or size, and simply rebaked.
After bake, this is the result:

Puzzled as to which settings leads to those blurry, small flames.
At best my end result is this, which seems pretty low res compared to the earlier creation:

As far as I know, I haven't changed anything special with regards to the project settings, but I'm more than happy to try some suggestions / check some settings if anyone has an idea :)

Thanks in advance!

I 'solved' this by doubling the resolution of the domain. Still puzzles me why I have to for a same-sized object, and only in this project.


Combine blender with other free programs to make films I'm a 13 year old who aspires to be a filmmaker, but I don't have money to spend on software. Luckily, Blender is free, and so is HitFilm Express 2017. I know Express doesn't support 3d models, so is there a way I could still use both programs?

The answer depends a little of what you want to do, but your workflow will usually be to generate video sequences in blender and the export them to the video format you need to edit them in hitfilm. You dont need to support 3D model in HitFilm since blender can export video sequences.

For an animation movie, you just render your sequence and use it as such in hitfilm.

For special effect, blender has a lot of tools that allows to integrate 3D objects in a video,camera tracking, green screen masking, ...
You will import a video in blender (a movie sequence) and add 3D item in the scene, using camera tracking to keep the orientation of the blender camera consistent with the "real life "camera used to make this sequence.
You will use masking to keep a part of your real life object to integrate it in a 3D scene.
You will use object tracking to identify the position of a real life element to attach a 3D object, like a gun to a hand.

Blender can do all of this so the choice of HitFilm won't restrict you for the 3D parts. Only for the editing/compositing part.


Dynamic creation of properties for export script This time I have a question about Properties in Blender. I want the operator window of my add-on to have one BoolProperty per action defined in bpy.data.actions and I want them to have the names from bpy.data.actions.keys(). I googled a bit and tried some stuff, but it wont work, theres allways something wrong, so is this even possible and can someone give me some hints on how to do it?

class ExportTSA(bpy.types.Operator, ExportHelper):

    actionprop0 = BoolProperty(name=bpy.data.actions.keys()[0],description="Exporet this action",default=True)
    actionprop1 = BoolProperty(name=bpy.data.actions.keys()[1],description="Exporet this action",default=True)
    actionprop2 = BoolProperty(name=bpy.data.actions.keys()[2],description="Exporet this action",default=True)
    actionprop3 = BoolProperty(name=bpy.data.actions.keys()[3],description="Exporet this action",default=True)

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

        row = layout.row()
        row.prop(self,"actionprop0")
        row = layout.row()
        row.prop(self,"actionprop1")
        row = layout.row()
        row.prop(self,"actionprop2")
        row = layout.row()
        row.prop(self,"actionprop3")

Heres a simplified version of my class, to demonstrate the idea. Instead of making hardcoded props like actionprop0, actionprop1... I want it to be dynamic in a way that it creates an automatic list, assigns the correct names, registers each one and draws them. I also found that you get into trouble when using bpy.data.actions where I used it, after I googled it it turns out that blender seems to be not fully initialized at that point so that causes errors, which might lead to additional problems.

In addition to what Adhi suggested, you can use CollectionProperty in your operator to store key value pairs (where keys are name of the action and values are boolean values). For this to work you must...

create a subclass of PropertyGroup that will hold single key-value pair.
populate this collection from Operator.invoke method (you might already have it)

So the code goes like this:

import bpy
from bpy_extras.io_utils import ExportHelper
from bpy.props import *

class ActionSelProperty(bpy.types.PropertyGroup):
    name = StringProperty(name="Action Name")
    export = BoolProperty(name="Export", description="Exporet this action", default=True)

class ExportTSA(bpy.types.Operator, ExportHelper):
    bl_idname = "test.export_tsa_op"
    bl_label = "Export TSA"

    actionprop = CollectionProperty(name="Actions", type=ActionSelProperty, description="Select actions to exporet")
    filename_ext = "*.*" # Only needed if subclassing `ExportHelper`

    def invoke(self, context, event):
        for aname in bpy.data.actions.keys():
            self.actionprop.add().name = aname
        wm = context.window_manager
        wm.fileselect_add(self)
        return {'RUNNING_MODAL'}

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

        for aindx in range(len(self.actionprop)):
            row = layout.row()
            row.prop(self.actionprop[aindx], "export", text=self.actionprop[aindx].name)

    def execute(self, context):
        for aprop in self.actionprop:
            print("%s:\t%s" % (aprop.name, aprop.export))
        return {'FINISHED'}

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

if __name__ == "__main__":
    register()

In this case,  name is a key and export is a boolean value.

PS: Invoke by searching Export TSA. Screenshots:

This may not be perfect, but you can investigate more! :)

HTH


Autosmooth script fails in edit mode but works in object mode Here is a script I did to automate autosmooth and set the degree.
Pretty simple. It works in object mode great, however in edit mode it fails.
What I do not understand is why. It does not matter if I am in edit or object mode when I use the regular buttons in Blenders UI.

class SetAutoSmooth(bpy.types.Operator):
    bl_idname ="set.autosmooth"
    bl_label ="Set Autosmooth"

    def execute(self, context):
        bpy.ops.object.shade_smooth()
        bpy.context.object.data.use_auto_smooth = True
        bpy.context.object.data.auto_smooth_angle = 0.523599

        return {'FINISHED'}

Here is the error I get. It states that context is incorrect.

  Traceback (most recent call last):
        File "C:\Users\info\Desktop\Coding.blend\class Pie.py", line 14, in execute
        File "C:\Users\info\Desktop\blender-2.76.0-git.d330162-AMD64\2.76\scripts\modules\bpy\ops.py", line 189, in call
          ret = op_call(self.idname_py(), None, kw)
      RuntimeError: Operator bpy.ops.object.shade_smooth.poll() failed, context is incorrect

  location: :-1

bpy.ops.object.shade_smooth() is only accessible from Object Mode (poll). To use it, you would have to toggle into Object Mode first. To shade in Edit Mode (using ops) you would have to use bpy.ops.mesh.faces_shade_smooth(). This will only work on selected faces though.


Moving Object Origin but not the Object itself It appears my origins are detached from my object and not affecting the object itself. I have never seen this "Gizmo" show up before until now and I am afraid I hit something accidentally to cause this and I am not too sure what shortcut I pressed.

Let me know if anyone knows what this is called!

See attached screenshots to see me rotating an object but the origin just changes and not the object.

Affect Only Orign checkbox is on Sidebar > Tool tab > Options > Transform


How to fill vertices that have been traced with color I already know how to trace a background image. I just want to know how to fill the vertices with a color of my choice. I have looked around, and even tried selecting vertices and assigning a material color, but that doesn't work. There is not enough info on the internet on blender. Please help an ambitious kid.

I presume you have been creating points connected by edges, but have not created any faces.

Select the points (vertices) you want to connect and press F (to create a face). You can then assign a material to it and have that material be of any color of your choosing.

As a matter of precaution try not to create faces connected to more than 4 vertices.

Vertices and edges are not visible when rendered and cannot have materials, but faces can.


Using cube mapping to render planets First question on this forum...
I need to take a generated cube map then use it as a base texture onto a sphere in a material. It must have been done a gazillion times in blender but I just can't find the information of how to do it.
I want to use a cube map this way to texture a planet and get rid of the worst distortions around the poles as compared to using a single texture.
So what I want to do is:

Load a cube map texture
Use xyz coordinates as a texture lookup in this cube map to get the base color.

Anyone knows how to do it?
EDIT:
I realized I was a bit unclear above.
Cube mapping is an established tech in computer graphics but requires the "engine" to support it.
https://en.wikipedia.org/wiki/Cube_mapping
If I only project a cube on the sphere I will have blending artifacts between the 12 seams of the textures which will especially bee noticeable when rotating the object.
Cube Mapping removes these artifacts by assuming the 6 faces are the same texture and kind of samples across the different faces to do i.e. trilinear mipmapping or whatever algorithm one have selected for zooming in.
The downside to this is that you need to use 3d-coordinates (u,v,w) instead of 2d (u,v).
The sign and to the absolute value largest axis decides which face you will pick a sample from and the other two coordinates will denote the uv locally on that face. This has been in hardware for very many years (at least since the beginning of 2000 or so).
I can't find any places where you can upload a "real" cube map texture and use it in a material in blender.
Is this possible?

The comment from lemon is what i thought too. Take a default cube, subdivide it good and well, then "Transform -> to sphere -> 1.0"
The UV map on the cube should still be squarical, and be able to map.
The other way is messing with UV unwrap and trying "cube projection", but IDK enough about that to help you.


Crisp images when rendering on GPU in Cycles I have a question about rendering on cycles with GPU. When i render on GPU the images look a bit crispy. When i render on CPU they don't.

I have a Geforce GTX 1070 videocard and got it running on Blender with the CUDA 8 beta.

CPU

GPU

I just found the solution on this post: It appears to be AA and should be solved when setting the Sampling settings to Branched Path Tracing.


How can I access (read/write) a mesh object's index vi Python? I would like to retrieve from python the index of an object -- the same index that you get when using an Object info node in shader nodes.

I have a reference to the object, but I don't see any attribute named index, or any function that returns it.


Texture Paint trouble When I open an object in Texture Paint mode and set the view to Solid the colors show up as inverted in the 3D view. The colors show correctly in Render or Material view. This is something new as I was Texture Painting this file yesterday and was able to see the right colors with the view set to Solid.

And if that wasn't bad enough now a new complication has crept up.  When I switch to Texture Paint the color portion of the UV Map is switching to that of another object. The outlines however stay the same, just resized to fit over the other UV map. In the 3D view this is only visible with Solid View set.

PACKED BLEND FILE

Any help sorting this out will be appreciated.

In the Tools panel > Slots tab, you need to disable the Mask option, and come back to the Canvas Image you're using in your material (called AliBody-Color Diffuse Color)


Is there a way to make an operator know if the context viewport is in ortho or perspective mode? I would like my custom operator to have 2 behaviours :

Case 1: Viewport is in perspective mode, do function 1.
Case 2: Viewport is in orthogonal mode, do function 2.

How can I get that information with the Python API?

Yes, you can check is_perspective.

You can get the perspective of the current context (provided the current context is a 3D view) with bpy.context.space_data.region_3d.is_perspective.

For example, running this in the text editor will print Perspective or Ortho to the terminal for each 3D view.

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                if space.region_3d.is_perspective:
                    print("Perspective")
                else:
                    print("Ortho")


Bottom Status Bar Doesn't Show Verts, Faces, Tris Information In v2.9a I don't see the statistics information that's supposed to be on the status bar running along the bottom of the main window towards the right in version 2.9.

As of Blender 2.9+ scene statistics are now part of the 3D view and integrated into each viewport.
That is where they always belonged, since each specific view could have different visibility and selection states, resulting in different statistics. This now allows showing more relevant information for each independent viewport, reflecting individual variations.
They can be activated from the Overlays Popover in the 3D View Header.

To mitigate the lack of an unobtrusive way to display global scene statistics without a permanent overlay over the 3D View, and still be able to show system stats like available memory, customizable statistics to the status bar was reintroduced in 2.90.1.


How do i set a object with particles to the background and keep another object in front in composition? Hello guys iv got a sphere that has particles (stars) and im putting some blur on them how do i set that image as a background? and keep the ship in front of it ?

the particle system is connected to the sphere the ship is inside of it and the camera is too. the particle system is on another layer. im rendering them separately and in the compositor view adding blur to the stars.
the ship is not a single object.
id like the stars not to be visible in front  of the ship. as seen in the render view (bottom left)

And my plans are going around the ship with the camera.

Assuming your rendered image has an Alpha channel then simply change the last Add node in the chain to ‘Mix’ and use the Alpha as the Fac. This will mix between your shapceship and the stars based on the alpha.

Note that if you don’t have an alpha (if you haven’t rendered with transparancy enabled) then you can use the Depth as a filter instead as it will be very high for points on the background behind your spaceship (1000000000 or similar - effectively ‘infinity’) and much lower for points on it - pass the Depth through a Greater Than maths node to compare it with, say, 10000000 and the output of that can be used effectively as an alpha.

This resulted in a final solution (from @IvanVujacic) as follows :


External data pack error External data pack error
Missing file  blender 2.9
I want Blender to always be able to find the texture (even if the file is on a different computer).
But [all packed in .blend]
It says that the path cannot be found.
Why are you looking for that directory?
-Is there a problem with the directory?
How should I set up the directory?
-This object is exported from ue4.
Having trouble exporting from UE4?
Are there any tutorials that might help
Please help me

Because Blender caches textures, they won't appear missing right away, showing pink color. To become pink, they should be reloaded. Like when you reopen the .blend file or append/link their texture data blocks to another .blend file.
Before packing, you have to find all missing textures in the original file.
When you use Find Missing Files, you have to choose the folder with missing files. Blender will search in the folder's subfolders also. To find files on your computer use something like Everything.
In Blender, there is no such concept as a project or a project folder.
There are no requirements for strict directory management like in Unreal Engine.
You may also want to disable using relative paths so you can move a .blend file freely.

Some methods of importing, like with some add-ons, may ignore this setting, so you have to make path absolute manually.


Remove checkbox from prop in pie menu I am working on a pie menu for texture painting but i've encountered something I do not understand.

The code and image I have presented below shows a pie menu with a prop that enables mirror brush on X axis, what I do not understand is that the UI does not look the same as in the panel.

How can I remove the checkbox that is presented in the pie menu to the right

import bpy
from bpy.types import Menu

default_keybind = 'W'

# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)

class VIEW3D_PIE_template(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "Texture paint"
    bl_idname = "paint.image_paint"

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

        toolsettings = context.tool_settings
        #settings = self.paint_settings(context)
        brush = context.tool_settings.image_paint.brush
        ipaint = toolsettings.image_paint

        col = layout.column(align=True)
        row = col.row(align=True)
        #pie = layout.menu_pie()
        row.prop(ipaint, "use_symmetry_x", text="X", toggle=True)

addon_keymaps = []
def register():
    bpy.utils.register_class(VIEW3D_PIE_template)
    wm = bpy.context.window_manager

    km = wm.keyconfigs.addon.keymaps.new(name='Image Paint', space_type='EMPTY')
    kmi = km.keymap_items.new("wm.call_menu_pie", default_keybind, 'PRESS', ctrl=False, shift=False)
    kmi.properties.name = "paint.image_paint"

    addon_keymaps.append(km)

def unregister():
    bpy.utils.unregister_class(VIEW3D_PIE_template)

    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    # clear the list
    addon_keymaps.clear()

if __name__ == "__main__":
    register()

    #bpy.ops.wm.call_menu_pie(name="paint.image_paint")

Answer is pretty simple - you can’t.

Pies remain menus, not toolboxes, so they use the same UI conventions as menus (where only widget for booleans toggles are those small checkboxes).


How do I mix two bump nodes and fade from one to the other? Here is a simple flower bud with a colour pattern using noise and a gradient texture.

Now I want to add two textures, a wave pattern for the petals and a noise pattern for the stem. I have used a gradient into a colour ramp as a kind of mask. The texture settings are set high here just so it's easy to see. Each bump node I have run into the normal input on a diffuse shader (I think the problem is here). Because when I then mix it with the base colour pattern I'm getting the colour data from the diffuse nodes blending with the base colour pattern in the first image.

How can I add these two texture/bump nodes and fade between them in a way that doesn't interfere with the base colour pattern I want to use?
EDIT: This question was closed as a duplicate, but the linked question is a different issue. I was able to solve this problem by dragging the colour output from the colour ramp node for the pattern into the diffuse bsdf nodes for each texture. It feels like a messy set-up to me, I think this could be done more elegantly.

Your chosen route is to mix two shaders, each shader with its own normals, generated from heights, using Bump nodes.
Mixing Shaders is, as far as I know, gathering contributions from each shader, biasing samples made by the renderer, in Cycles. In EEVEE, I'm not sure.  In particular, I don't know how normals are combined. Maybe someone who knows can help with that. Mixing normals is tricky: they represent directions; just mixing the colors that encode the directions won't do.
Why the ramble? Because, however that's done, mixing heights is easy by comparision. It's just an addition.
Personally, using the 'Node Wrangler' shipped-add-on's convenience, CtrlShift-clicking nodes to preview their output as I went along, I would ..

Preview the Wave and Noise textures, and try them out through Bump on their own, on a neutral material. I would put whatever was needed around them (perhaps Color Ramp / Multiply) to adjust the heights, before they get to  the Bump node.
Preview the Gradient, on its own, to make sure it was oriented correctly, and roughly right.

So the resulting chunk of tree would be something like this:

What's in those 'Adjusted' groups will depend on how you want your waves and noise to look. The Multiply Add  is just my choice for changing the width and location of the gradient.
The only suggestion is that it's easier to mix heights, here, than shaders, or normals.


how to select a mesh with multiple faces quickly? I want to selecet this shape but it has multiple faces is there anyway to easily select this shape? It part of a mesh.

Usually Ctrl+L selects all linked vertices. From the image you posted it looks like this should be the case in your mesh. So, if that doesn't work it could be that your mesh has some issues. What I usually do in these cases is to select everything and then hit W  for the Specials Menu and then choose "Remove Doubles" in order to delete double vertices, which can occur if you have accidentally split or duplicated some faces. If you are lucky that fixes your mesh so that you can try the "Select Linked Vertices" again.

Another thing you can try is "Select More": Ctrl+NumPad +.


Issue scaling an object with array modifier around empty I have a "pizza slice" with angle of 45 degrees and array modifier to make full circle of it

I need to scale the whole circle down but when i'm trying to do it, something wierd happens.

How to scale an entire object if an Empty is in the center of it?

Once you've scaled down the object, apply the scale with a ctrlA > Apply Scale, otherwise the offset object will act like a multiplier.


How to avoid overlaping corners on hard surface modeling? i´m trying to model this armor piece but im getting overlaping geometry in some corners using bevel modifier with bevel weight and subsurf.

The only way i can manage to get rid of them is by adding edge loops but with that i can´t keep the roundness of my object.

Any help, advice or suggestions are much appreciated, thanks in advance.
If someone wants to take a look at the mesh in blender here´s a download link:
https://drive.google.com/open?id=1wat10y8BVTwcdP_rpkes6gixkH9rZwMn

i say it's the mirror and subdiv-suf modifiers, mess around with their positions in the stack. Mine seems fine though.


Hide tools in 3D viewport on Blender 2.8 I was wondering if there is a way to turn off these four tools on the 3D viewport:

Thank you!

Yes, just like that. Unfortunately it also hide the new axis thingy next to it, which I like a lot.


Bake a image appearing in a mirror is It possible to bake a image appearing in a mirror from a certain angle of camera? What is the possible ways to do that? Can I do from OSL?

Absolutely, but it depends on neither light nor the camera changing (but you can get around this problem by animating the texture). Just bake your rendered result from the angle you want, and apply the texture to that plane.


Creating Dynamic Blender Properties How do you generate Blender Properties dynamically, and assign them on the fly?

Generating properties dynamically is inherently useful when parsing semi-structured data from an external source such as in an XML or JSON document, but there's isn't really a straightforward way to accomplish this.

see related here: https://blenderartists.org/forum/archive/index.php/t-266184.html

To solve this we're going to make use of blender's bpy.utils.register_class() method and the type() method.
First, we need a method to generate our dynamic properties. In this case, you can use a decorator function to make things a bit easier:

def dynamic(func):
    """
    @:keyword: dynamic - Function Generator that creates properties for Blender data types on the fly
    :param func: Function to generate
    :return: dynamic_property(): returns decorated function
    """
    def dynamic_property(*args, **kwargs):
        """

        :param args: first argument is always *prop_dict (from func in outer scope)
        :parameter *prop_dict: One Blender Property Mapped to a dict: e.g. prop_dict = {'mapname': bpy.props.StringProperty(default="some_path_to_map")}
        :param kwargs: specific keywords needed by enclosed methods
        :return: Pointer to newly registered/assigned property
        """
        Prop = type(str("Parameters"), (bpy.types.PropertyGroup,), func(*args))
        bpy.utils.register_class(Prop)
        PropPointer = bpy.props.PointerProperty(name=func(kwargs.get('param_type')), type=Prop)
        setattr(func(kwargs.get('blender_type')), func(kwargs.get('param_type')), PropPointer)
        return PropPointer
    return dynamic_property

This decorated function generates a function that returns a pointer to a new class instance called Prop, which subclasses bpy.types.PropertyGroup. func(*args) is always a 1 item dictionary. (Further details on the dict contents below)

I also found it useful to create a class to hold the variables I need to pass to the decorated function. (To extend functionality, just create a subclass and override the blender_type variable with whatever type you need + any other variables needed for your implementation)

from bpy.types import Material

    class BlenderProperty(object):
    def __init__(self, **kwargs):
        self.name = kwargs.setdefault("name", None)
        self.prop_dict = {}
        self.blender_type = Material
        self.param_type = "TestParameters"
        self._prop = None

    @property
    def prop(self):
        prop_ptr = self.create_property(self.prop_dict, blender_type=self.blender_type, param_type= self.param_type)
        self._prop = prop_ptr
        return self._prop

    @staticmethod
    @dynamic
    def create_property(prop_dict, **kwargs):
        return prop_dict

For testing purposes, let's use a fake dictionary and fill it with some stuff. Then assign this dictionary to a BlenderProperty.prop_dict

fake_dict = {}
prop_list = ['Prop1', 'prop2', 'prop3']
for prop in prop_list:
    fake_dict[prop] = {'mapname': bpy.props.StringProperty(default="some_path_to_map")}
    new_blender_prop = BlenderProperty(name=str(prop))
    new_blender_prop.prop_dict = fake_dict
print(new_blender_prop.prop)

Calling new_blender_prop.prop calls the decorated getter function for this class's private variable prop, which just so happens to be a pointer to the dynamically created property inside of blender.


Can't edit vertices in rounded shape I'm new to Blender and I'm fumbling around a lot with it. I created this shape from a cube I turned into a rounded shape by applying a Subdivision modifier. At first, I could see all its vertices, but somehow at some point, while I was editing it, its mesh became oversimplified to only a few vertices and now I'm only able to edit its extremities. How can I access the rest of its vertices?

Try turning off the On Cage option in the modifier. This will allow you to see exactly where the vertices are.
The image below was taken from Blender 2.8 so the icon is at the other end of the row to your image (2.9?) but it works the same.


How to automate selection and assembly of clips defined in an input file with builtin functions or (python) scripts I'm approaching the blender video editor and I'm wondering if there are built-in functions/available (python) scripts to automate the operation of cutting/assembling  subscenes/clips indexed in a file.

Meaning, suppose my director gives me an AVI movie and a file containing a list of times t_1_in, t_1_fin, t_2_in, t_2_fin, ... delimiting the subscenes/clips to be cut and assembled.

Is it possible in Blender to automate the cutting and selection of the clips defined by the t_i's in a file (say .dat) and their assembly in a continuos sequence?

There is an add-on to import EDLs (Edit Decision List), it is a trunk add-on that comes with Blender. As long as your list conforms to the correct source and timecode i don't see why this couldn't work.


Animation Nodes Delay of Cell Fractured Collection Matrix I'm trying to make a simple animation in 2.8 by (mostly) following This video by BLUE FOX
However, I would like to make the cell fractured objects slowly return to their starting points, instead of an instant warp. I have played around with nodes and google for the last several hours, to no avail.
I have an image of the nodes I am using, as well as a gif of the current effect I wish to change - Any and all help is appreciated.

I think change the scale to 0.2 in 'offset matrix'


Animation Nodes Using Time/Frames to affect Objects Materials My desire is to illustrate dates of sales for townhouses by changing the visible material (changing colors, or changing Shaders, etc). The order of what houses sold when are out of sequence; it's real-world dates I'm using and the time scale is one frame to one day.

I have 98 houses and 98 dates spread wildly over three years. I see tons of tutorials for changing colors, etc. based on the location of an empty, but I know too little about AN to make the leap from that to what I need which would tie a list of "dates" (frames) to Objects to trigger a material change or Mix.

Here's one possible way to go about converting your date data into something you can utilize in Animation Nodes or elsewhere.

Paste the below script into a new text block in Blender's text editor.
Paste your date / address list into the triple-quoted text block of the 'houseData' variable. I've followed your example format. The below is assuming you have an object named eg '7865' for every house, already added to your scene. (inserting / creating those 98 objects in a script loop is outside the scope of your question as written, so apologies for not covering that here).

Note: The script is splitting the date from the address using the word 'address' just as you wrote it, but feel free to change the format with any short separator as needed, and just edit the entry.split("address") part accordingly if you do.

Run the script (alt-p in the text editor or press the Run Script button).

import bpy
from datetime import datetime

housedata = """
December 20, 1972 address 7865
January 31, 1973 address 1234
March 6, 1971 address 9999

"""

# The chosen start date will correspond to timeline frame 0...
startDate = datetime(1970, 3, 1)    # (yyyy, mm, dd) -> 1st March 1970

dateformat = "%B %d, %Y"
# Format codes are explained in the table here:
# https://docs.python.org/3.7/library/datetime.html#strftime-strptime-behavior

# separate the text lines, discard blanks:
entries = [e for e in housedata.splitlines() if e]

# Now, we set pass_index on all objects named as whatever came after
# 'address' in the text list above.
for entry in entries:
    dateTxt, addressTxt = [t.strip() for t in entry.split("address")]
    date = datetime.strptime(dateTxt, dateformat)
    datediff = date - startDate
    dayNum = datediff.days

    houseObject = bpy.data.objects[addressTxt]
    houseObject.pass_index = dayNum

# Note: pass_index is 0 by default.

Now in Animation Nodes, you can read each Object's pass index using an Object Attribute Input node with the value pass_index in its entry field.
Using a Time Info node will give you the current frame, and a Compare will let you see if those match.

The rest is a matter of setting up a list/loop node to run over all the objects in question, instead of selecting one specific object as I've done in this example screenshot. That part should be well covered by the Animation Nodes documentation.


I have a blank window in node editor I got this blank window I did'nt see any node anyone how to show it ??

That's perfectly normal. If you're trying to create a material, you should go to the Materials tab in the Properties panel and create a material if you don't have one already:

Then click the "Use Nodes" button:

That should give you a simple diffuse shader in the node editor.


Reparent Mouth Rig to Different Character's Armature? My Question is whether anyone knows a relatively easy way to copy the mouth (rig and all) from one character's armature to another? They have identical topology, but different rigs (because I used Mixamo to get easy animations).

I want to move the jaw bone and all of it's children and associated mouth meshes from the black thin armature to the thick white armature. I have tried using the "Child Of" constraint and got the result in the picture below:

It seems like a step in the right direction, but I still don't see the jaw bone under the new armature in the Outliner Window. It is listed under the old armature's hierarchy. How do I get it to only be linked to the new armature's hierarchy now?

Edit: I've tried using the separate hotkey for the bones I want, but that makes them lose their mesh target. Any way around that?

Edit#2: Turns out I just needed to check the "Set Inverse" option in the Child Of constraint.

Edit#3: I've tried the ctrl+J shortcut to join the two armatures, but when I do that the mouth armature is translated into a massive version of itself very far away, and I cannot seem to find the mouth mesh when I do that.

Edit#4: So ctrl+J absolutely works!! You just have to make sure there aren't any constraints added to the bone group. So after I removed the "Child Of" constraint it looked correct! The last step was picking the proper parent in the new armature.

However, the mouth mesh that was originally attached to the old armature has disappeared. Any idea how to get it back?

I've discovered a way to do this without having to weight paint again.

In the Outliner Window, drag the mesh for your mouth to the other armature and set the Object as the parent. You'll see that the mouth mesh is still weight-painted to the old armature, but you won't be able to move it in pose mode (yet)
Make sure there aren't any constraints added to the armature from the mouth that you're trying to join to the new armature.
In Object Mode, highlight the mouth armature followed by the armature you want to join it with and hit CTRL+J to join them.
Select the bone parent in edit mode for the mouth bones you transferred over under the armature tab.
In Object Mode select the mouth and Shift-select the new armature and type CTRL+P and parent the mouth mesh to the new armature with empty groups.

That's it. You should now see your mouth has the same weight painting it once had but in a new armature! However, you may have to go into edit mode and translate it a bit to get it to line up properly with the bones.


HDRI does not work properly after opening saved file Yesterday, I saved a file that had an active HDRI. Today, I opened the file and the HDRI is no longer displayed although shows that it is active in the world properties tab. I tried implementing the process again, but the screen no longer turns pink when I set the color to Environment Texture.

I'm stumped. If anyone has knowledge on the topic I would greatly appreciate the help.

You can save the HDRI in Blender by going to the file tab in the upper left corner, and selecting external files. This will give you an option to pack all external files into the .blend so that you can save it in the file.


Motion blur on texture Is it possible to have motion blur on moving texture via variable mapping location coordinates ? I am using cycles.

I am trying to have ground animated with motion blur, but don't want to change position or size of plane.

(http://i.imgur.com/b752zJX.gif for animation)

Motion blur will not work because the object doesn't move in the scene. What you need to do is to blur the texture in the nodes. For it there is nice node group named ImageBlur from the b°wide NodePack. This node will blur the image in all directions, put it between Tex. Coords. and Image Texture nodes. You can control the amount of blur:

To blur only in one direction we need to adjust the ImageBlur group node. Add those Separate RGB, Add and Combine RGB nodes and change marked values:

Now you have blur only in one direction:

If you also plug in 2 Mapping nodes with opposite values for rotation in Z you can change the blur angle:


set the context to run dissolve_degenerate from the python shell I've downloaded some 3d models of a city with a ton of topologic errors. I am trying to fix some iterating through the objects and running dissolve_degenerate. But when calling the function I get a Runtime error : RuntimeError: Operator bpy.ops.mesh.dissolve_degenerate.poll() failed, context is incorrect. I see this a fairly common problem for Blender neophites like me, but despite looking to several examples of "context incorrect" I can't figure out how fix this problem. Can somebody tell me how to set the right context to call dissolve_degenerate from the python shell?
# deselect all objects
bpy.ops.object.select_all(action='DESELECT')

for i,o in enumerate(bpy.data.objects):

    if o.type == 'MESH':

        o.select_set(True)
        bpy.ops.object.editmode_toggle()

        dim_min = min(o.dimensions)
        # the following line throws an error
        bpy.ops.mesh.dissolve_degenerate(threshold=dim_min/100)
        o.select_set(False)
        print(o.name)
    if i>10:
        break

With bmesh
Started out as a comment on answer, ended up as another answer.

Can do the above with bmesh without any need to select or switch
mode.
Loop over all objects in scene, find all the unique meshes, and list
their objects.
For each mesh, run the degenerate dissolve bmesh operator. The mesh
dimension is gained from its bounding box (local coordinates), not
its dimension which is object coordinates and involves scale.  (Else
if scale  > 100 will remove all geo)

Test script, run in object mode.
import bpy
from collections import defaultdict
from mathutils import Vector

import bmesh
context = bpy.context
scene = context.scene

# meshes in scene
def mesh_dim(ob):
    bbox = [Vector(b) for b in ob.bound_box]
    return (
        bbox[6] - bbox[0]
        )

meshes = defaultdict(list)
for o in scene.objects:
    if o.type != 'MESH':
        continue
    meshes[o.data].append(o)

bm = bmesh.new()
for m, obs in meshes.items():
    bm.from_mesh(m)
    bmesh.ops.dissolve_degenerate(
            bm,
            dist=min(mesh_dim(obs[0])) / 100,
            edges=bm.edges,
            )
    bm.to_mesh(m)
    m.update()
    bm.clear()


How can I bevel geometry that approximates a curve? Consider a mesh like this:

This one is created by bisecting a sphere with some planes and then carving out another sphere out of it with the Boolean operator, but for the purposes of this question, any "curved" mesh will do.

How can I bevel the "curvy" edges of such a mesh? It consists of many faces and edges (because of the sphere geometry), but even if I select all those edges individually (see below) and then try to apply beveling only to those edges, the result is a huge mess. It either "stops at the next nearest edge" (best case) or produces a broken geometry. For more complex shapes, the result is really really bad.

I understand why this happens; for Blender, this mesh is not a set of "4 flat faces and 2 curved faces", it's a set of many small, flat faces, past which beveling doesn't really work.

I can, of course, bevel things manually by doing something like... create a torus that would just barely touch the mesh along two of its "faces", then create a cylinder from which the torus would carve out a chunk with a Boolean operator, then Bool that "beveling object" out of my mesh. All of this requires a massive amount of precise calculations with trigonometry. I've done this before when I absolutely had to, and it's not fun. Below you can see a quick illustration of this "manual beveling" process (ignore the slight mesh imperfection in the last image, I made a typo in the exact coordinate during one of the steps).

Is there a way to do such beveling (of "curved edges", not flat ones!) with a few clicks?

I've searched extensively for things like "beveling an already curved object" and so on, but it wasn't fruitful.

Link to the example file, as requested in the comments: https://www.sendspace.com/file/uf79rx

All you need to do is remove this stray vertex here (merge the vertex with the one above it and dissolve the edge) to make all sides edge-loops.

Then everything bevels beautifully.


Python: Access mesh selection history data I want to write an addon that can combine two selections with a logical AND.

For example, the user use via normal gui

bpy.ops.mesh.select_similar(type='LENGTH')

and

bpy.ops.mesh.select_similar(type='DIR').

Then he calls the addon, the addon gets the current selection, the selection made before, combine them and write the selection back.

My problem is I don't know how I can access these history data via python nor if it's possible. This would be my favorite way of workflow for the addon.

I can extend the addon with a call to store the actual selection, so the user make a similar select, call the addon to store the current selection, make another similar select and call the addon to combine the both selections and write it back.

For this way I need to store a customized boolean at the bmesh faces/edges/vertices data, but I can't figure it out how. If I try to store custom data I run in these error:

  bm.faces[0]['and_select'] = False
  Traceback (most recent call last):
    File "", line 1, in
  AttributeError: BMElem[key]: invalid key, must be a BMLayerItem

An example how this must be done would help.

Don't use the string key. Instead use a direct reference for the layer:

layer = bm.faces.layers.int.new('layer_name')
bm.faces[0][layer] = 0

There is no boolean layer available.

The selection history works only for single verts/edges/faces.

You can use the bmesh operators similar_faces, similar_edges, similar_verts which will return the selection.

Links to the source: bmo_similar.c, bmesh_operators.h


Eevee transparency and transmission I have this kind of weird scene I'm working on where I have a cube of water (principled shader with transmission set to one and IOR of 1.333). Inside of that cube is a plane where I'm using a gradient mask make the plane either fully transparent or just slightly.

With cycles this works like a charm

but in Eevee it doesn't. The plane dissappears.

Any sugestions how to accomplish this? I'm guession screen space reflections/refractions and alpha settings on the materials matters but I can't figure out how to set them

Blend file is attached but missing hdri.
download file

Regards,

Björn

The solution in my case was so simple I somehow missed it. I changed my mask from black/white to grey/white and accomplished what I was after.