Controlling mesh modifiers with animation nodes Is there a way to control mesh modifiers using the Animation Nodes add-on? I'd like to use AN to set values for the animatable parameters in the Ocean modifier.

It can be done using the "Object Data Path Output" node:

Add the node to the node tree.

Select the object whose properties are to be modified in the first input of the Object Data Path Output node.

Copy the data path from the parameter you want to animate by right-clicking and selecting "Copy data path."

Paste the data path into the Path input of the Object Data Path Output node.

Set the value of the property using the Value input of the Object Data Path Output node.


Moving armature-bone moves the whole character I just set up a character rig and am trying to animate it now. However, when I move this one armature it simply moves the whole character but the mesh itself doesn't move. When I try to rotate this bone it also rotates the whole character.

Here's a photo of what I mean: https://imgur.com/4EBnf8p

What it's supposed to do: https://imgur.com/RXEHlSu

The bone is doing what it's meant to be doing; there's nothing wrong with that. The difference is that in the second image the legs have an IK rig (shown by the yellow bones on the shins of the legs), meaning that when the body moves it will bend the legs accordingly. You'll need to set that up and then you should be all good.


Do I need to re download Blender? I currently have the Blender 2.80 release candidate, and now that the official 2.80 is out, I was wondering if I need to download it again to stay up to date or if the release candidate is the same as the current 2.80.

Blender RC 3 and the official release of Blender 2.8 are not the same version. The last release candidate is a build based on commit 507ffee6e1f4 and the release version is based on commit f6cb5f54494e. That means there have been additional fixes between the release candidate and the final release.

In general it's best to update from official release to official release, unless you really need the cutting edge version. If you want to use experimental builds, be aware that bugs, compatibility issues and broken projects may happen.


Black patches in glass when using cycles render engine for some reason i am getting these black patches all around my image. it seems to be most obvious where certain sections overlap slightly, but i have no idea how to fix them (very new to blender o.o)

im not sure why this is happening. heres a version where the points im referencing are circled

i don't know what settings you guys need to know so just ask me if you need too. i can tell you this was only renderd 10x but even at 20,000 samples it did not fix anything

keep in mind, i am still a noob at this so any suggestions please word as simplisticly as possible xD thank you!

This is caused by sharp, low poly geometry with smooth shading (you'll notice that the problem goes away with flat shading). It's true that bounces can also cause dark spots (as mentioned in the other answers), but I think this is the issue in your case.

There a couple things you can try:

Adding more geometry (works well for curved objects)

No subsurf:

Subsurf level 2:

Using an edge split modifier (works better on objects with sharp edges)

Without edge split:

With edge split:


When applying a picture texture to an object it comes out as kind of cut in half diagonally and distorted, is there a fix for this? When applying a picture texture to an object it comes out as kind of cut in half diagonally and distorted, is there a fix for this?

Blender doesn't know how to apply the image to the object, so it does all that stuff because it doesn't know what else to do. You need to tell it how to apply the image by making a UV map. The default cube in Blender comes with it's own UV map so you can follow these steps:

1) With the default cube selected open up the UV tab in the top bar

You should see a layout like this:

2) Export the UV map

Make sure you have this box checked and export

3) The UV map will be exported as a PNG. Edit it in whatever photo editing, drawing program you want to use. (eg. Photoshop, Illustrator, Firealpaca)
In your case you would take your tree image and place it in the same spot that I put my blob.

4) Export your edited UV map and go back into Blender. Click the Shader Editor tab in the top bar and you should come up with a window that looks like this:

5) Copy the node setup shown below. In the image texture node press open and select your UV map that you put your picture on.

If everything is done right you should end up with something like this:

Hope this helps! IDK if I explained this very well. If you have any questions pls ask. Blender has a steep learning curve but once you do learn it it's great. :D


Strange liquid in glass and thick glass behavior I am doing a chemistry render but I am struggling with my cupric sulfate solution in a flask in Blender : the Volume Absorption node doesn't really works as expected.

I have a too light area and a thin dark zone (instead of the thick one).

I also have a dark area in the thick glass.

Render

Mesh of the thick glass part with sub surface disabled

Node setups
The colors are light shades of blue, darker ones gave a really dark result.

Texture assignment (with normals)

Light Paths

Color Management

I think I gave enough information to solve the problem, but feel free to ask me for more. So what am I doing wrong ?

Thanks for your help in advance.

Finally, I tried several things and I got a better result by reworking lighting and trying a new camera angle. I closed the space where my flask is, added windows, added a ceiling, and added a few area lights at the top. I also tweaked my colors and absorption values. I also separated the interface meshes (now, they aren't connected, but still in the same object).

Here is my result

And here is my CuSO4ToAir material (the only difference with the CuSO4ToGlass is the IOR)

I will mark this answer as solution, but I am still listening to a better solution if you have.


How to translate bump height into real world measurement? So 1 Blender Unit is usually taken for 1 meter. Given that scale, how can we make a bump displacement texture that has 1mm (0.001bu) of height in Cycles?

Let's assume the texture has both pure white and pure black regions, since shades of grey alone don't give us practically measurable information.

I couldn't wrap my head around how to calculate this, especially when taking scale of the scene into consideration. Like, if you are looking at a brick wall from far away and you know the bricks jut out about 1cm (0.01bu) from the mortar, how would you go about preparing a texture with the appropriate bump scale?

I'd approach it this way:
First, generate a clear black to white gradient image and apply it to a plane as a displacement map.

Then I'd duplicate the plane and apply the displacement modifier, and then check the Z height on the verts that are placed at the black and white parts of the gradeint:

Doing that shows that the black value equals to -0.5 blender units, while the white pixels displace your verts +0.5 blender units.

And then if you want a total white to give you +0.001 bu which is 1mm, all you need to do is to change the dipslacement modifier's stength to 0.002.

Here I used a stength of 0.2 and the resulting height is indeed 0.1 BU:

If your displaced object has a non 1.0 scale value, you'll need to multiply the displacement value by the scale to calculate it. If the scale is non-uniform (let's say 2.0, 1.0, 3.0 for X, Y and Z scale), you're in trouble because it will be different in each axis...


How can I quickly move/translate an object to the center location/position of another object in a static scene? This question relates to positioning static objects while modeling.  This is not a question about how to move objects dynamically/programmatically like in a game context.

For example, I need to translate the center of mesh object A to the center of mesh object B.

How can this be done easily?

Assuming that you have two distinct objects (rather than two unlinked meshes in the same object) and each object's origin is at the "true" center of the object (however you prefer to determine that), you would use the following process (in Object mode):

Select object B
Snap the 3D Cursor to object B's origin (Shift+S > Cursor to Selected)
Select object A
Snap object A to the 3D Cursor's location (Shift+S > Selection to Cursor)

You can also use Blender's snapping tools to do some of this interactively, but the 3D Cursor is the most reliable way.


Material appearance in sculpt mode I am novice in blender and in all guides i've seen for now never was explained how to apply materials in scuplt mode. So i have created material, applied it and it works fine in object mode, but in sculpt mode my scuplting remains white (default).
 That is i want to achieve:

Go to the Options tab of the Tool Shelf and check the Show Diffuse Color checkbox.


Make modifiers update in the game engine I am trying to make a boat work in the game engine, and I have a Boolean modifier on the water cutting a spot in the water plane for the boat. The problem is, that when the boat moves, and the mesh that cuts the spot moves with it, the spot cut out in the water plane remained where it was before. Is there any way to make the Boolean modifier update live in the game engine via python? I have looked for a while and there is no possible way to do this with logic bricks alone. The end result would be the boat moves, and the collision mesh moves with it, and the collision mesh cuts the spot in the water for the boat as it moves along.

What I've done for similar situations:

Parent the water (object plane watter?) to the boat collision mesh.

Add the rest of the water outside the two.

Make a surf animation in the water enclosing the boat so that it roils up in front, but only when the boat moves.

Now when the boat moves, the hole moves with it. Brilliant huh?


How to reproduce the Bump Node? Is it possible to reproduce this node procedurally?

I would like to learn more about how Blender nodes work, I'm doing a lot of research and I'm very curious about this node, including the "Normal Map" node
Is it something very complicated?
I do a little edit of the question to be more specific.
I'm trying to figure out how to reproduce this node while avoiding the use of this node. I don't know if it's possible, but in blender inside nodes almost everything appears possible

A bump node is not possible to reproduce via component nodes.  The reason for this is that a bump node doesn't just lookup the bump value of the sample being evaluated, but the bump values of adjacent samples, in order to generate a slope for the sample, which then gets translated into rotation of the normal.  That hard part is, how far should those adjacent lookups be?  You can't look by just shifting 1 UV pixel, because that could be a huge distance or a tiny distance, depending on distance, FOV, and on UV scale.  (Not to mention filtering.)  You need to figure out how far to look, and doing that requires something like screen space derivatives (which are probably used for Eevee, but Cycles probably does something different) to see how much UV changes with respect to world position.
Unfortunately, Blender does not expose screen space derivatives to its nodes.  (Which is honestly too bad, because there are other cool things you can do with screen space derivatives as well.)
However, even though these can't be recreated using only Blender's nodes, there exist plenty of environments where you can play with exactly how bump mapping works.  If you're interested in this kind of stuff, Unity is a great place to learn about (rasterizer) rendering, and there are plenty of public shaders available to study.
Normal mapping is a little bit different, because it doesn't require any screen space derivatives (except to determine the UV tangent, if you aren't providing that as vertex data, but Blender kindly provides you a tangent node, so you don't have to worry about that.)  The basic way that it works is by rotating the normal toward or away from the tangent on the basis of + or - red, and toward or away from the binormal (a unit vector perpendicular to both the tangent and the "raw" normal) on the basis of + or - green.  (What is minus green?  The colors of a normal map are actually remapped unit vectors, which exist in the -1 to 1 space for all channels, remapped into the 0 to 1 space so they'll fit in typical image formats.  That's why the base color of a tangent space normal map is that lilac: 0.5,0.5 red green actually maps to 0,0 x,y, and the 1.0 blue maps to 1.0 z.)
If you had a bake of UV stretch, you could do a bump procedurally, with other nodes, assuming your mesh didn't deform, which would change the UV stretch.  However, the whole reason why we use tangent space normal maps is to support deforming meshes.  If you were working with a mesh that didn't deform, you may as well use an object space normal map.
Object space normal maps are extremely simple-- you can just remap these to -1,1 space and vector transform from object to world.
Should be said, there's nothing to gain from recreating any of these in nodes, except understanding, and that understanding could be gained much more easily by reading shaders that implement bump mapping.


Motion blur samples limit too low for a long exposure effect? Im trying to get a long exposure effect using the eevee camera motion blur but the results i get at slower shutter times are very grainy, even at the maximum 64 samples. I tried speeding up the camera animation and setting a faster shutter but i cant seem to get trails of the desired lenght without the grainy effect, and the general render samples dont seem to affect the motion blur samples.

The performance shouldnt be a problem since the objects in the scene are simple emission objects and the current renders are taking about 4 seconds.

How to get a long exposure effect using Eevee?

You could merge multiple renders and or use cycles.

But if the end effect you're going for is just abstract smeared lines, build them using curves and turn up bevel.  On the material, mix a transparent and a emission shader to create a similar effect.  and with eevee change the settings -> blend mode in the material to alpha blend.

This method will give you much more control over the effect too.

As a bonus: use mesh follow -> trace verts option in the Btrace addon to make curve traces from animated objects.
Here's an example I just made.


Problems With Hair Particles So I'm working with my model and I decided it should probably have some hair on the side. So I do the whole weight paint thing and added hair in that area, so then I created the hair and combed it down shown here:

Alright, so that's ok. But when I go to Object Mode:

I don't want to have to redo the whole thing but if it must happen it must, any suggestions?

Well, I discovered that the reason why the hair looked significantly different than the particle editor was that when I went to solid view I was later in the timeline and I had Hair Dynamics enabled. Therefore the hair went all over the place. Just make sure your timeline is at 0 or 1 when you work with this stuff, OK?


Why do I get the error "Camera not Multi-View Camera"? Stereo3D modes will render fine, but when switching to Multi-View I always get the error, "Camera 'Camera' in not mutli-view camera". The Camera is set to Panoramic with both a left and right camera. I even added a few extras to see if that would change anything.

I've come across this error on the 2.74 branch, the 2.75 Test Build, and 2.75 Release Candidate, so I surely doing something wrong. I've checked the camera settings, render settings, and of course scene settings, not finding a single option anywhere to change the camera type. Even from the Multi-View document page, and the branch documentation, it is said, "that it should just work".

Does anyone have any idea on how to get the camera to register as a "multi-view" camera?

When using the "Stereo 3D" mode; there only needs to be one camera present in the scene. The left and right cameras are created as children of the active camera, and their settings are controlled from the "Properties Window" -> "Object Data" tab; in the "Stereoscopy" panel.

Using "Multi-View" each camera needs to be added and positioned manually, however there can be more than two. The "Properties Window" -> "Object Data" tab "Stereoscopy" panel is not added in this mode.

The "Properties Window" -> "Render Layers" tab, "Views" panel contains a list of camera "render views", with left and right already preset.
For each of these render views there is an associated "Suffix" text field.
In "Stereo 3D" mode this suffix field simply appends this text to the filename of the render of each camera.
In "Multi-View" mode this suffix field not only appends the text as above, it also identifies each camera producing a render view, therefore each camera needs to be renamed and should end with the matching suffix (case sensitive).

The error; Camera "Camera_XXX" is not a multi-view camera, seems to occur when the name of the active camera does not end with one of the suffixes defined in the "render views" list, or if the any of the "render views" list suffixes are not assigned to a camera.
(This error message seems to return the name of the active camera, and not necessarily the name of a camera that is not assigned to a "render view".)


Stitch 2 mesh parts like in the UV stiching function I don't know how to 'stitch' these two meshes together. I don't mean a 'bridge', I want the Foot moved correctly into the socket: There is a stitch function for UV maps that does exactly what I want (see the video: https://youtu.be/42XCrtxvhyM?t=519)

As long as the loops match, you can turn on snapping and auto merge in Edit Mode to do this:

Turn on snapping (Shift+Tab)
Set snapping mode to vertex (Shift+Ctrl+Tab)
Turn on auto merge

Then move the part of the mesh:


How do I copy the shape of one object to another? I have tried to make the "microphone grid", like on this picture:

So that array of curves "envelops" the invisible cylinder.
I used several modifiers, such as cast modifier, shrinkwrap, mesh/surface deform but they haven't helped me.
At first, I wanted to use wireframe modifier, but I need the wires overlay each other, so I immediately dismissed this idea.

Any suggestions?
EDIT:
Maybe I did something wrong?

Everything was easy. You just have to turn on "tissue" addon, then select pattern you had previously created and choose the mesh to apply the pattern to.
Here is great tutorial - Default Cube


Get the transformed value from given frame to initial frame For animation purposes I set a few keyframes manually.
Now I want to get the transformation difference between frames, so the difference in two frames of this property:

bpy.context.object.location

Using the code above I can only get the current position of the current frame.
How can I add a diagnostic box where I input two frames, and calculate the difference in location between them?

Slapped together a quick test script from Panel template. A custom property '["frame"]' on the object is used to hold the other frame, calculated against movement from current frame.

Script simply queries the location fcurves of the object, and uses fcurve.evaluate(frame) to retrieve the value at obj["frame"].

import bpy

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

    @classmethod
    def poll(cls, context):
        obj = context.object
        if "frame" not in obj.keys():
            return False
        if not hasattr(obj, "animation_data"):
            return False
        if not obj.animation_data.action:
            return False
        return True

    def draw(self, context):
        obj = context.object
        scene = context.scene
        layout = self.layout
        # get current frame location
        loc_current = obj.location.copy()
        row = layout.row()
        col = row.column()
        col.prop(scene, "frame_current")
        col.prop(obj, "location")
        loc = loc_current.copy()

        # using fcurves
        frame = obj["frame"]
        action = obj.animation_data.action
        col = layout.column()

        col.label("Moved")
        col.prop(obj, '["frame"]', text="From Frame")
        row = layout.row()
        for index in [0, 1, 2]:
            fcurve = action.fcurves.find('location', index)
            if fcurve:
                loc[index] = fcurve.evaluate(frame)
            row.label("%7.4f" % (loc - loc_current)[index])

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

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

if __name__ == "__main__":
    bpy.context.object["frame"] = 33 # set another frame in custom prop
    register()


Sculpting cartoon mouth Hey guys Im trying to make a Jack Skellington blend and I have no idea how to sculpt his mouth, nothing feels right should I just draw his seams on the texture or actually sculpt them or none of the above, I wanna animate it later on? Thanks in advance!

You're on the right track with sculpting. However your first priority should be to create a simple base mesh of the entire character before moving on to details like the mouth and its stitches. You can do this by blocking everything out with primitives and then joining them later.
Here's an example of stylized base meshes (Credit to VeryHotShark on Gumroad):

A great habit to get into is to focus on the largest details first so you can get your proportions correct and ensure you have the best topology possible to start out with before detailing and sculpting.

Hey guys Im trying to make a Jack Skellington blend and I have no idea how to sculpt his mouth, nothing feels right should I just draw his seams on the texture or actually sculpt them

To directly answer your question about the mouth, it all comes down to how detailed you want your mesh to be. How close you will be featuring his face on camera? Are you animating his face? Does he talk?
It might be easiest to just draw the seams on the texture, but you will have less detail than if you had sculpted it. If you sculpt the seams, it will look quite a bit more realistic and hold up better in close up camera shots.


Unwanted patterns in texture from repeated, seamless image I added an Image Texture to a plane using a seamless image.  In the Texture context of Properties window, I set Scale to be X:10, Y:10.

Unsurprisingly, a pattern forms when you zoom out from plane:

How can I get rid of this pattern?  (this is supposed to be grass, so it should look very random)

EDIT: For example, is there any way to add distortion to how the image is tiled onto the plane?  So if I were to represent the surface of the plane with a grid, the pattern on it would become distorted, like this

You could try something like this:

With undistorted coordinates:

With distorted coordinates:

And with a checkered texture:


How do I adjust the sensitivity of zooming and panning? Recently when I was using Blender, I accidentally did some sort of keystroke that messed up my navigation settings. The sensitivity of zooming, panning, and orbiting was knocked to almost zero, and I could not move around the scene at all. I did some research to find out how to fix it, and one thread led me to the Navigation preferences pane in Blender. However, I was only able to adjust the orbiting sensitivity, as I saw no adjustments to zoom or pan sensitivity.
Here's a screenshot of my navigation settings:

Any help would be greatly appreciated.

I hate these useless moderators.  The scroll sensitivity is a windows issue, not necessarily blender.  Google answered my question at the tip top of my search:
Change Mouse Scroll Speed in Windows 10
Open the Settings app.
Go to Devices -> Mouse.
On the right, select Multiple lines at a time under Roll the mouse wheel to scroll.
Adjust the slider position to specify the number of lines between 1 to 100 lines at a time.


How to rotate a part on an armature? I stole a a pretty sweet hydraulic rig off the internet, and I added a massive saw blade. The saw blade moves with the rest of the rig using an armature, but, now I want it to rotate.

What is the easiest way to control the rotation of the saw blade with keyframes? (I'm a bit new with the whole armature thing, so don't judge me too harshly)

Blend file here: https://drive.google.com/file/d/0Bxf7lERLL3TlRXZkQm1kLWNuRWM/view?usp=sharing

Small version: https://drive.google.com/file/d/0Bxf7lERLL3TlX1NwMDVzbUdzSTg/view?usp=sharing

Here is the obligatory GIF for all the upvotes:

Premise
If you are using your current method (without spinning the blade), weight paint it to "parent" it to the axle bone like this so that it turns correctly.

Method 1
One (easy, almost cheating) way to animate it would be to make it a separate object. If the armature is already working correctly with the rest of the mesh, it is normally tough to go back and add more details. Even if I was building this from scratch, I would definitely make a part such as that a separate object.
The Blender Foundation had a problem similar to this when working on Cosmos Laundromat last year.

And guess what? Hjalti added a pocket! Since it’s too late to update
the rig (see the Alien Victor image above), Hjalti created a patch of
cloth with a rig and added it frame by frame to the animation. You’ll
find this animation on the Cloud as well.

Your problem will be much easier. Just parent the (separate) blade to a bone along the axle that it rotates on, and animate it as an object. I will not go into any more detail except to say that it can be done quite easily.

Method 2
Add a "blade_control" bone that is parented to the axle control bone, add the needed vertex group, and then weight paint the blade onto the bone.

Be sure to set the "center" of the blade control bone correctly (I set the cursor to the base of the axle control bone in the Gif)
Parent the control bone with offset
Make sure the weights for all of the other vertex groups are cleared for the blade
Make sure the control bone only touches the blade (everything else is blue for it's weighted vertex group). To do this I used face select mode and hit L while hovering over the blade.

I had to split this into 2 Gifs:
Part 1

Part 2

As for animating at this point, you animate the rotation of the blade control bone with keyframes as you would with any other object.


Increase font sizes for property names and values Using Blender 2.92.0
It seems this issue is kind of interesting.   I've adjusted the font  sizes to where they seem usable for me, great :)   However loading up a saved file *.blend file and the UI elements in Blender itself get changed.    Is there a way to get Blender to not resize its own UI settings when loading a drawing?  Or save off the portion of the UI settings and only load them or merge/replace them in the saved drawing file?
Expected:
Blender's UI fonts remain to a user's settings/preferences.
Actual:
New drawing just selecting General from startup splash screen (desired settings)

Open saved drawing:

To stop loaded files from changing your preferences, go to User Preferences under Edit > Preferences and under the Save & Load category, look for the Load UI checkbox. Uncheck it.

Then, while still in Preferences, go to the Interface category and click in the Resolution Scale text field. Enter a new value for the scale. You will want it to be some value greater than 1.


How to select even/odd keyframes with python? I want to automate the process of selecting only even/odd keyframes from dopesheet/action editor using python, anyone here can help me?

I also want to delete it after selecting only even/odd keyframes. Thanks to anyone who would share the knowledge of blender python.

The following script is a bit rough, but it should do what you're looking for. It creates two new operators that work in the Dope Sheet, one for selecting even keys and one for selecting odd ones. It uses islice() from Python's itertools module... someone more well-versed in Python might have a different/better method to iterate through the keys.

It uses extended indexing syntax ("slice notation") on a dictionary view object of the keyframe_points property collection (*phew*).

Fair warning: this actually iterates through all of the actions in your .blend file. It shouldn't be too difficult to limit it to the actions in your scene or the actions of the selected object, but this should be enough to get you started.

To use the script, copy it into Blender's Text Editor and press Alt+P (with your mouse in the Text Editor). Then, from the Dope Sheet, you should be able to find the operators using Spacebar search.

import bpy

def main(context, even_odd='ODD'):
    for action in bpy.data.actions:
        for channel in action.fcurves:
            if channel.select == True:
                #First deselect all keys in the channel
                for key in channel.keyframe_points:
                    key.select_control_point = False
                    key.select_left_handle = False
                    key.select_right_handle = False
                if even_odd == 'ODD':
                    #Select only odd keys
                    for key in channel.keyframe_points.values()[1::2]:
                        key.select_control_point = True
                else:
                    #Select only even keys
                    for key in channel.keyframe_points.values()[::2]:
                        key.select_control_point = True

class ChannelSelectEvenKey(bpy.types.Operator):
    '''Select even keys for selected channels in the dopesheet'''
    bl_idname = "anim.channel_select_even"
    bl_label = "Select even keys"
    bl_description = "Select even keys for selected channels in the dopesheet"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'DOPESHEET_EDITOR'

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

class ChannelSelectOddKey(bpy.types.Operator):
    '''Select odd keys for selected channels in the dopesheet'''
    bl_idname = "anim.channel_select_odd"
    bl_label = "Select odd keys"
    bl_description = "Select odd keys for selected channels in the dopesheet"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'DOPESHEET_EDITOR'

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

def register():
    bpy.utils.register_class(ChannelSelectEvenKey)
    bpy.utils.register_class(ChannelSelectOddKey)

def unregister():
    bpy.utils.unregister_class(ChannelSelectEvenKey)
    bpy.utils.register_class(ChannelSelectOddKey)

if __name__ == "__main__":
    register()


Is it possible to show glass as being transparent in the viewport I have been trying for a couple of days to make an object with a glass material transparent in the viewport. I've seen a couple of tutorials using the material viewport shading and cycles render to change the color and Alpha values of objects but my system doesn't seem to work the same way.

I'm using version 2.79 of blender in material viewport shading and using Cycles Render.

The "Viewport Alpha" settings do not seem to work for the Glass shader the way it works for the Transparent shader (or a mix between Transparent and another shader).  However, if you set the Viewport Alpha to "Add" you will get a sort of fake viewport transparency, which looks about the same for any shader.  Maybe that's good enough for your needs?

Otherwise maybe keep a couple of different shader setups in your material.  Use a simple mix of transparent and glossy (or diffuse, or whatever) for your viewport editing needs.  When it comes time to do a "real" render, switch the inputs to your glass shader.

Edit: here is how these options look in the viewport ("Material" view), as suggested by @LukeD:

The cube and suzanne to the left have the same material.  It is a glass shader, with Viewport Alpha set to "Add".  The cube and suzanne to the right share a different material.  It is a 50/50 mix of transparent and glossy shaders, with Viewport Alpha set to "Alpha Blend".


Python: Calculate angle between vertices What should I do to determine the angle on XYZ between two vertices?
I then have to rotate a mesh accordingly, but I guess that's a basic task to achieve.

I'm new to bpy and I should have payed more attention during my maths classes, i suppose.

Here's a graphical representation

I need to know the angle of that orange segment

Thanks in advance :)

You can get two selected vertices via bm.select_history and calculate a direction vector, then measure the angle between this angle and the up vector (0, 0, 1) in radians and convert it to degrees (below script prints the smaller angle):

import bpy
import bmesh
from math import degrees, pi
from mathutils import Vector

ob = bpy.context.object
assert ob.type == 'MESH'
me = ob.data

bm = bmesh.from_edit_mesh(me)
verts_sel = [el for el in bm.select_history if isinstance(el, bmesh.types.BMVert)]
assert len(verts_sel) == 2

v1 = verts_sel[1].co - verts_sel[0].co
v2 = Vector((0, 0, 1))

a1 = v1.angle(v2)
if a1 > pi * 0.5:
    a1 = pi - a1
print("{:.2f} degrees".format(degrees(a1)))


min () expected sequence error only happens for newly created objects in edit mode I wrote a script that selects the selected object's vertices with the lower Z value, and set's the origin of the object to the median point.
Everything worked perfectly until I tried to make things a bit better, by returning the 3D view mode to the mode that was used before running the script as in Edit Mode or Object Mode... etc.

The error I'm getting happens in a very specific case, and I couldn't find no logical explanation to it. I have "New Object in Edit Mode" enabled in my user preferences, so when I create a new object and run this scrip immediately, I'm getting an error:

 min() arg is an empty sequence

This error only occurs when an new object is created in Edit Mode, then I run the script immediately.
I tried disabling creating new object in Edit Mode, the error disappeared!
Even if create new object in Edit Mode is enabled, the error wont occur if I press tab to go to Object Mode first, then tab again to go back to Edit Mode, then run the script.
This error will not occur in any other cases whether run in Object Mode or Edit Mode.
I tried saving right after creating a new object in Edit Mode, then run the script, no error!
This is a very weird situation to the programming novice me, so what am I doing wrong here? help appreciated in advance, blend file attached.
Edit: I found a solution by unchecking "create in edit mode" off in user preferences, then checking it back after applying the rest of the code in the example, but I want to understand why is this error happening.

You need to update your edits if you are not using bmesh. Add these lines first to your def:

if bpy.context.object.mode == "EDIT":
    bpy.context.object.update_from_editmode()


Why can't I use Loop Cut on certain parts of my mesh? This is a recurrent issue for me and it's been bothering me for quite some time.

I can't seem to add vertices with Ctrl+R on some faces on my meshes, and it's always the faces which I have filled in with F.

Here's an example, in which I have extruded my mesh into four directions and then filled in the corners, making an octagon, but I cannot add vertices to the corners, or the faces that are "open":

I am using version 2.72b, on a Mac.

You can only loop cut through quadrilateral faces in a line, like a row of rectangles. A loop cut through a triangle would divide one of the vertices, but that can't happen. N-gons also don't work well with it. See Anthony Forwood's comment:

  Quads are ideal, tris when necessary, and ngons only when absolutely necessary.

It has nothing to do with the F function.


How to create gizmo such as Radius/Strength F/SHIFT+F shortcuts from sculpt mode in python? I was wondering how to imitate this blender feature with python, using F/SHIFT-F to change properties such as this below

So here is a Template
It can receive any property, note that strength is best to work with props that have min/max
Note that it should be properly implemented in your final modal class as working with globals like this is not ideal
i Did not implement the gradient effect, not sure if it that useful?
If you have any comment/question  about the code let me know,
Here is a demo of the shortcut working with some overlays props

import bpy, gpu, bgl, blf
from gpu_extras.presets import draw_circle_2d

#Bunch of globals needed

#Private
RadiusModal=False
StrengthModal=False
prop_value=None
new_value=None
init_mouse = None #= init mouse position
handlers= [] #=keep track of handlers

def clean_handlers():
    for h in handlers:
        if h is not None:
            bpy.types.SpaceView3D.draw_handler_remove(h, "WINDOW")
    handlers.clear()
    return None

def remap_value(value, min1=0, max1=0, min2=0, max2=0):
    return min2 + (value - min1) * (max2 - min2) / (max1 - min1)

# 88""Yb    db    8888b.  88 88   88 .dP"Y8     8b    d8  dP"Yb  8888b.     db    88
# 88__dP   dPYb    8I  Yb 88 88   88 `Ybo."     88b  d88 dP   Yb  8I  Yb   dPYb   88
# 88"Yb   dP__Yb   8I  dY 88 Y8   8P o.`Y8b     88YbdP88 Yb   dP  8I  dY  dP__Yb  88  .o
# 88  Yb dP""""Yb 8888Y"  88 `YbodP' 8bodP'     88 YY 88  YbodP  8888Y"  dP""""Yb 88ood8

def radius_gizmo_modal(api, property, event, Key="F", px_radius_at_1=100):  #-> event == KEY
    global RadiusModal, prop_value, new_value, init_mouse, handlers

    if (RadiusModal==True):

        #if user leftclick, then apply change to property
        if (event.type=="LEFTMOUSE"):
            print("[Radius]>> CONFIRM")

            setattr(api,property,new_value)

            #EndCleanup
            clean_handlers()
            RadiusModal=False
            prop_value=new_value=init_mouse=None
            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

        #if user release key then quit modal witouth applying any props
        elif (event.type == Key) and  (event.value=="RELEASE"):
            print("[Radius]>> QUIT")

            #EndCleanup
            clean_handlers()
            RadiusModal=False
            prop_value=new_value=init_mouse=None
            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

        else:
            print("[Radius]")

            delta = (event.mouse_region_x - init_mouse[0] )/px_radius_at_1 #get mouse move on X
            new_value = prop_value + delta #translate screen unit to prop

            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}
    else:
        #if not in modal mode but user is pressing the key -> Init Modal
        if (event.type==Key) and (not event.shift) and (event.value=="PRESS") and (not event.is_repeat):
            print("[Radius]>> INIT")

            RadiusModal= True #Enable modal mode
            init_mouse= (event.mouse_region_x, event.mouse_region_y) #Store initial mouse position in global
            prop_value=new_value= getattr(api, property) #Store property value in global

            #Add fixed circle
            radius = px_radius_at_1 * prop_value
            def draw():
                bgl.glEnable(bgl.GL_BLEND)
                draw_circle_2d(init_mouse, [1,0.3,0.3,0.4], radius, segments=100)
                bgl.glDisable(bgl.GL_BLEND)

            h = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
            handlers.append(h)

            #Add Dynamic Circle
            def draw():
                bgl.glEnable(bgl.GL_BLEND)
                radius =  px_radius_at_1 * new_value
                if radius<1: radius = 1
                draw_circle_2d(init_mouse, [1,0.3,0.3,1], radius, segments=100)
                draw_circle_2d(init_mouse, [1,0.3,0.3,0.5], radius+1, segments=100)
                bgl.glDisable(bgl.GL_BLEND)

            h = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
            handlers.append(h)

            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

    return None

# .dP"Y8 888888 88""Yb 888888 88b 88  dP""b8 888888 88  88     8b    d8  dP"Yb  8888b.     db    88
# `Ybo."   88   88__dP 88__   88Yb88 dP   `"   88   88  88     88b  d88 dP   Yb  8I  Yb   dPYb   88
# o.`Y8b   88   88"Yb  88""   88 Y88 Yb  "88   88   888888     88YbdP88 Yb   dP  8I  dY  dP__Yb  88  .o
# 8bodP'   88   88  Yb 888888 88  Y8  YboodP   88   88  88     88 YY 88  YbodP  8888Y"  dP""""Yb 88ood8

#Can work only for properties with min/max

def strength_gizmo_modal(api, property, event, Key="F", prop_min=0, prop_max=1, min_radius=37, max_radius=217, show_gradient=True, show_font=True): #-> event == SHIFT+KEY
    global StrengthModal, prop_value, new_value, init_mouse, handlers

    if (StrengthModal==True):

        #if user leftclick, then apply change to property
        if (event.type=="LEFTMOUSE"):
            print("[Strength]>> CONFIRM")

            new_value= remap_value( new_value, min1=min_radius, max1=max_radius, min2=prop_min, max2=prop_max, )
            setattr(api,property,new_value)

            #EndCleanup
            clean_handlers()
            StrengthModal=False
            prop_value=new_value=init_mouse=None
            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

        #if user release key then quit modal witouth applying any props
        elif (event.type == Key) and  (event.value=="RELEASE"):
            print("[Strength]>> QUIT")

            #EndCleanup
            clean_handlers()
            StrengthModal=False
            prop_value=new_value=init_mouse=None
            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

        else:
            print("[Strength]")

            delta = (event.mouse_region_x - init_mouse[0] )
            new_value = prop_value + delta #translate screen unit to prop
            if new_value>max_radius: new_value=max_radius
            elif new_value<min_radius: new_value=min_radius

            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}
    else:
        #if not in modal mode but user is pressing the key -> Init Modal
        if (event.type==Key) and (event.shift) and (event.value=="PRESS") and (not event.is_repeat):
            print("[Strength]>> INIT")

            StrengthModal= True #Enable modal mode
            init_mouse= (event.mouse_region_x, event.mouse_region_y) #Store initial mouse position in global
            prop_value=new_value= remap_value( getattr(api, property), min1=prop_min, max1=prop_max, min2=min_radius, max2=max_radius, ) #Store & remap property value in global

            #Add fixed circle
            def draw():
                bgl.glEnable(bgl.GL_BLEND)
                draw_circle_2d(init_mouse, [1,0.3,0.3,0.5], min_radius, segments=100)
                draw_circle_2d(init_mouse, [1,0.3,0.3,0.5], max_radius, segments=100)
                bgl.glDisable(bgl.GL_BLEND)

            h = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
            handlers.append(h)

            #Add Dynamic Circle
            def draw():
                bgl.glEnable(bgl.GL_BLEND)
                draw_circle_2d(init_mouse, [1,0.3,0.3,1], new_value, segments=100)
                draw_circle_2d(init_mouse, [1,0.3,0.3,0.5], new_value+1, segments=100)
                bgl.glDisable(bgl.GL_BLEND)

            h = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
            handlers.append(h)

            #Draw Gradient
            if show_gradient:
                pass
                # def draw():
                #     bgl.glEnable(bgl.GL_BLEND)
                #     print("=?",new_value,",",max_radius)
                #     rang = int(new_value)
                #     opac = 1.0/rang
                #     print(rang)
                #     for i in range(rang):
                #         draw_circle_2d(init_mouse, [0,0,0,0.5], rang, segments=100)
                #     bgl.glDisable(bgl.GL_BLEND)

                # h = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
                # handlers.append(h)

            #Draw Value as Text
            if show_font:
                def draw(self, context):
                    txt_height = 38
                    projected_result = remap_value( new_value, min1=min_radius, max1=max_radius, min2=prop_min, max2=prop_max, )
                    digits = len(str(projected_result).split(".")[0])
                    text = f"{projected_result:.3f}" if digits<=1 else f"{projected_result:.2f}" if digits==2 else f"{projected_result:.1f}" if digits==3 else f"{int(projected_result)}" #dynamic decimal truncing
                    pos_x = init_mouse[0]-(min_radius/1.3)
                    pos_y = init_mouse[1]-(txt_height/4)

                    blf.position(0,pos_x, pos_y, 0)
                    blf.color(0, 1, 1, 1, 1)
                    blf.size(0, txt_height, txt_height)
                    blf.draw(0, text)

                h = bpy.types.SpaceView3D.draw_handler_add( draw, (None, None), 'WINDOW', 'POST_PIXEL')
                handlers.append(h)

            bpy.context.area.tag_redraw()
            return {'RUNNING_MODAL'}

    return None

#Example of Incorporation within a modal operator

class ModalOperator(bpy.types.Operator):
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    def modal(self, context, event):

        #Incorpore block above in workflow like this, must be on top of peckorder as it will ignore below
        r = radius_gizmo_modal( bpy.context.space_data.overlay, "grid_scale", event, Key="F")
        if r is not None: return r
        r = strength_gizmo_modal( bpy.context.space_data.overlay, "wireframe_opacity", event, Key="F") #For Min/Max Props, default==normalized prop
        if r is not None: return r

        #Rest of modal
        print("Running rest of modal code..")

        if event.type in {'ESC'}:
            return {'CANCELLED'}

        bpy.context.area.tag_redraw()
        return {'RUNNING_MODAL'}

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

#Force Reload

try:
    bpy.utils.unregister_class(ModalOperator)
except:
    pass
bpy.utils.register_class(ModalOperator)


May i know what are the matcap colors May i know what are the matcap colors or are they materials. What are the use of that color or material in blender. And if i apply that color or material can it be render in cycles and if not how it works in used cycles.

Matcap stands for Material Capture.

In short: They are fake materials which are intended to help you during the modeling process.

Sometimes using a Matcap instead of the solid shading material in the viewport helps you to spot irregularities in your geometry. If you choose a Matcap similar to the material you have in mind for your final render, it might also help to check if a model will "work" visually.

See how the edges and creases show up more prominent when using the matcap?

You can't use them as a final material for your renderings, though.


How to model effectively using exact measurements? I always struggle when trying to create a floor plan or furniture. How do I model using exact measurements.

The absolute first step is to set the real-world units in the scene tab. This will make Blender's arbitrary units relate to something you can actually measure, like feet or meters.
Lines/Edges that Follow an Axis
You can click on a vertex, press E to extrude, press X, Y, or Z to choose the direction, then type in 1 and hit Enter. This will produce a line of length 1 (scene units) in that direction.
Lines/Edges at Arbitrary Angles
If your line needs to be at an angle, and you know how long it needs to be, then you could:

Create an edge with that length. Position the 3D cursor on one of
the vertices of the edge.

Set the pivot centre to be on the 3D cursor. (important)

Rotate the edge: (select the edge, hit R, hit (X,Y, or Z for axis) and type in the angle to rotate on that axis) , then Enter to finalize

Rinse and repeat until all axis of that edge are dealt with.

Extruding Edges/Faces
Edges and Faces can also be extruded and knowing how to do it can save you a lot of time:

select an edge or face, hit E and choose an axis using X,Y, or Z and type in the distance, then Enter.
Faces will start to extrude along their normal if no X,Y, or Z direction is given.

Directly entering coordinate values (global / local)
Get familiar with entering exact coordinates into this box. (found on the right hand panel, the N-panel). In Global mode when you change the position of a selected vertex using those fields then the coordinate will be relative to the world origin (0,0,0). When in Local mode the coordinate will be relative to the origin of the Object.


How to change hair color along absolute value of hair strand length? I know what I can get using "Hair Info" node's "Intercept" value with "Color Ramp" node. The thing is, it's really unrealistic when I have hair of various length. I want melanin value to be affected by total hair length value, not it's % to simulate hair that are burned brighter with sun. Is there any trick to do that? Like somehow intercepting only the longest hair value and using it for every strand?

how to make this happen: you need Geometry node -> separate RGB -> Map Range -> ColorRamp -> output.


How to bend a plane I modified? I've used a plane to model this:

I want it to bend but when I add a "Simple Deform" modifier and I select "bend", here's what I get:

As you can see only some of the faces are going to be bend.

Q: What can I do to bend the geometry as a whole?

I just needed to put it on the Z axis, apply then rotate it. Found the answer on this video (at 3:45) while searching for a solution.


How do you combine a sculpt mesh with primitives for 3d printing? I created a crystal mesh 130mm x 120mm x 250mm high for 3d printing using sculpt. Now I want to add a tube within it and add some scaffold primitives to the inside of the mesh joining the tube for strength.
How do I combine the tube and cubes to the mesh to create a single entity for turning into an stl file for printing?
I know it needs a 3d print thickness and have tried adding thickness to the mesh, also getting a clean hole in the base for joining the tube to is an issue, its a saw tooth edge I have join?

You can use the Boolean Modifier to cut out the tube from your model, and combine it with scaffolding.
That said, scaffolding is usually added when slicing the 3D finished model in your 3D printing software. I'm not sure if you will get good results if you try to do this in the modeling step.
To add thickness to a sheet-like object, you can use the Solidify Modifier.


Odd behaviour origin to 3d cursor I'd simply like to set the origin of some meshes to the 3D cursor which is centered using SHIFT + CTRL + ALT + C.

For some reasons that doesn't work anymore with some of objects the character I'm working on. (With the shoes It still works).

The version of Blender I'm using is still 2.69.

EDIT 1 : Here is the file with the issue (I've installed the last version of Blender in the meantime as well and the problem is still there).

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

Note that at the moment the only solution I've found is to import the model in a new scene with the append function of blender.

I am not sure, I have never seen that shortcut used before, However, You can move the origin down to the location you want it in object mode, tab into edit mode, and move your object back up to its original location, this should produce the same result.


How can I smooth the edges of these modelled letters? I'm trying to model the letters K and S from a picture that my friend sent me (below), and I modeled the letters but I'm having trouble figuring out how to smooth the edges so it's not so rough and bumpy! I also want to make the letters feel more bubbly. Thanks!

For this type of illustration work you may want to consider using bezier curve objects instead, they allow fine grained control over the curvature of your objects. And you wont have to worry about triangulation or tessellation of the top and bottom faces.

They allow easier control of curvature and guarantee smoothness, and also allow easy non destructive beveling too.

Perhaps even draw them in a dedicated illustration program like Inkscape and import them as SVG into Blender

Inkscape Drawing

Imported into Blender

Be mindful about very tight or sharp corners inside the the meeting point of the K arms they may cause trouble with beveling

Also have in mind that they have downsides and will be more limited in other aspects if you later want to do more processing. They wont work well with subdivision surface, they have more limited texturing and material capabilities. Some of these limitations can be lessened by duplicating the objects and converting the copy to a mesh later.


Adding Edge Loops to Meshes created with Skin This is my first time using skin in Blender (I'm following a tutorial). I'm stuck at a point where the tutorial suggests creating an edge loop with Ctrl+R on the mesh in Edit Mode, running down the middle of the character.

However, the "skin" mesh is not selectable, so when I try to create my loop I only get a single vertex showing up as selected and it creates a loop around the character instead of down the middle.

This is the tutorial I am following under "How to Do It". My character is below - I'm trying to create an loop vertically from tip to tip. Any feedback is appreciated!

You are missing a step from the previous page. The first line reads -

  Once we have applied the Skin and Armature modifiers, we are left with an almost ready-to-use base mesh

You don't have the real mesh to add a loop cut because you haven't applied the skin and armature modifiers. Click the apply button on each modifier to get the mesh you can edit further.


how to make grid mesh conform to topo After adding  a height map  to my plane via displacement modifier I get a nice 3d representation of topo in object mode. But when I switch to edit mode the grid lies flat on a flat plane. There must be a simple command to show the grid in 3d while in edit mode?

In the Displace Modifier panel enable the option Display modifier in Edit mode.


3D model is partially black in texture mode I created a 3D figure and after I wanted to see how a texture applies to it I found out that it looks partially black, but cannot figure out why. I tried recalculating normals, but it didn't help. Can someone please help me?

It's not a problem. You are using Blender Render instead of Blender Cycles. If you want to continue to use Blender Render, you just need to add a new light source to iluminate that side. It is just a hard shadow! You can add a sun, and rotate it to be horizontal ilumination, as an example.


How can I copy strokes from one keyframe to another? How can I copy selected stroke from one keyframe to another? I don't want to redraw it manually or duplicate keyframe, because it overlays current keyframe, I just need one particular stroke to be copied.

You can copy and paste ctrl-c ctrl-v or use copy paste from the grease pencil menu. Go to the frame you want to grab the stroke from.. then copy.. go to the other keyframe.. paste.. and adjust as needed from there. (blender 2.81)


Grease pencil, how do I use the shear tool? In edit mode, I select all points, they turn amber.
View shows: Front Orthographic
I select the shear tool.
I click, and there's an up down arrow cursor.
I move it, nothing happens.
I hit y key and now the cursor is left and right.
I move the mouse while holding left key.
My drawing is scaling in the X direction.

How do I shear my drawing?

Until Blender get an official release 2.8 cannot be dependably consistent and might change its behavior from test version to test version. Trying a new version may change all the previous methods of using it.


VSE playhead position variable How can I return the playhead frame number position, in the VSE, to a variable in script?

I'm not sure where in the API to look.

The VSE current frame is the same as the current frame for the rest of blender, which is a property of the current scene.

It can be accessed with bpy.context.scene.frame_current and set with bpy.context.scene.frame_set(frameNumber).

The best way to figure out the Python code for a specific property is to find it in the interface and hover your cursor over it, which will reveal the python code. In this case you can hover your cursor over the frame values in a Timeline editor.


What add-on license when license is not written in source code? I have a question about add-ons' licenses.

There are many add-ons' source code without license.
I would like to know what license these source codes have.
I think these codes have GPL license, but there is no information about this.

Is it possible to revise or redistribute add-on written by someone?

To begin with, an add-on you find aren't different from any other code snippet you find online. So these general Q&A's apply:

What is the “default” software license?
Reusing open-source code that doesn’t specify a license

To answer the question:

When its not explicitly stated, you can't assume anything regarding the license of code you find.
(Blender related or not).

Contact the author and ask them to either...

include a license header of the source code(convention for all Blender's code).
include LICENSE file in the source code repository.(also valid but can make tracking down the license harder if files are re-arranged or re-used between projects).

Doing so will save others this hassle in the future.

Note that even in the case where the license is open-source and compatible with Blender, you may want to know the copyright holder(s) later on, especially if this ends up being used in larger projects.


How to turn any mesh into its bounding box I have a scene and I want to turn it into a blockout scene for presentational purposes. I want to turn every mesh into a box or a block model. Is there any way to achieve this? Scripts are also welcome

Bmesh script

Quick, n  dirty little bmesh script to do this. For all mesh objects in the screen replace the mesh with the box created from the eight corners of the bounding box.

I've used the convex hull operator which produces a triangulated
mesh.
Current version replaces mesh with hull.
As always save before, and / or test on a copy.

script

import bpy
import bmesh
context = bpy.context
scene = context.scene
bm = bmesh.new()
mesh_obs = [o for o in scene.objects if o.type == 'MESH']
for ob in mesh_obs:
    me = ob.data
    #me = ob.data.copy() # create a copy

    verts = [bm.verts.new(b) for b in ob.bound_box]
    bmesh.ops.convex_hull(bm, input=verts)
    bm.to_mesh(me)
    ob.data = me # needed if copy
    bm.clear()
bm.free()


Iterating vertex groups in Python I'm having trouble with a script. I'm trying to duplicate a selected object and copy them into an array configuration. Afterwards i'd like to select the same vertex group of each of the duplicated objects and move them.

For some reason each loop on moving the vertex group only moves the first duplicated object... I feel like I must have a fundamental misunderstanding of how edit mode works in scripting. I've tried multiple versions, but always have the same result.

The script I have is below:

import bpy
import random as random
import time

dup = bpy.context.selected_objects[0]

list = []

for i in range(0,4):
    bpy.ops.object.select_all(action='DESELECT')
    dup.select_set(True)

    bpy.ops.object.duplicate()

    obj1 = bpy.context.selected_objects[0]

    obj1.location[0] = i*4
    obj1.location[1] = 0
    obj1.location[2] = 0

    list.append(obj1)

for obj in list:
    bpy.ops.object.select_all(action='DESELECT')
    obj.select_set(True)

    bpy.ops.object.editmode_toggle()
    obj.vertex_groups.active = obj.vertex_groups[0]
    bpy.ops.mesh.select_all( action = 'DESELECT' )
    bpy.ops.object.vertex_group_select()
    bpy.ops.transform.translate(value=(0, 0, 4.32424), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)
    obj.vertex_groups.active = None
    bpy.ops.object.editmode_toggle()

And this is the result, object i'm duplicating is upper left and all the vertex group moves are only going to the first object

Ugh, I figured it out, didn't realize that 'active' was different than 'selected' in the context of edit mode.

Here's the updated script:

import bpy
import random as random
import time

dup = bpy.context.selected_objects[0]

list = []

for i in range(0,4):
    bpy.ops.object.select_all(action='DESELECT')
    dup.select_set(True)

    bpy.ops.object.duplicate()

    obj1 = bpy.context.selected_objects[0]

    obj1.location[0] = i*4
    obj1.location[1] = 0
    obj1.location[2] = 0

    list.append(obj1)

for obj in list:
    bpy.ops.object.select_all(action='DESELECT')
    bpy.context.view_layer.objects.active = obj # Set active object
    obj.select_set(True)

    bpy.ops.object.editmode_toggle()
    obj.vertex_groups.active = obj.vertex_groups[0]
    bpy.ops.mesh.select_all( action = 'DESELECT' )
    bpy.ops.object.vertex_group_select()
    bpy.ops.transform.translate(value=(0, 0, 4.32424), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)
    obj.vertex_groups.active = None
    bpy.ops.object.editmode_toggle()


Eye problems with dragon Okay I'm trying to create this model for a character of mine I call "Truth Dragon".

Only problem is, this sucker has two sets of eyes. One small and the other is bigger. Here's a sketch of what I mean.

So I got most of it done and this is what I got so far, until I went to scupt/object mode.

For some reason, the second eye on the top is doing something weird. I've deleted all duplicates, messing with it in scuplt just messes up the eye shape.
I definitely have no idea why the nose is doing that.
https://blend-exchange.giantcowfilms.com/b/5637/ Here's the file if you need to see for yourself.

The Multires modifyer doesn't like to work with Ngons. So redo the eye openings without using any Ngons, only quads.


Wrong resolution of viewport I'm usually use Blender with second monitor on my MacBook but when it's disconnected and I try to run blender it's starts in wrong resolution, like on screenshot below. To fix that I connect monitor and drag Blender window to second monitor workspace. So I can't start Blender without second monitor. Any suggestions?

It's really complicated because it involves hardware and software. But...

When your machine starts the operating system it sets one of the monitors as the main one, if you disconnect one of the monitors with your machine still on, the system still thinks the main monitor is turned on.

To avoid further problems, it is recommended not to disconnect the second monitor with your machine still connected! For this you should turn off your machine, disconnect the second monitor and then turn it on again so that the operating system recognizes the first monitor as the primary one.

Note: The final version of Blender 2.80 is still in development, many bugs can and will occur, this resolution problem may be part of that release.


Randomizing crowd scenes with instanced models I want to set up a crowd scene using instanced models with a lot of randomization. Say I have a library that consists of several bodies, hairstyles, and outfit pieces. I want to make a crowd where each member has their pieces randomly drawn from this library, as well as random colors in their materials, but also drawn from a list or predefined colors. And then have a random pose from a pose library, but still each have their own rig intact so that their individual poses can be changed/tweaked. And i want to do it all without breaking instancing to the original models, so that if any of the assets are updated, all of the members of the crowd using those pieces will get the update.

Is this possible, and what is the best workflow for it?

My hammer is python, and your problem looks like a nail.  I would develop python that can instantiate copies of the bodies and hairpieces at the proper locations (http://web.purplefrog.com/~thoth/blender/python-cookbook/link-mesh-array.html illustrates the basics of this technique).

Linking meshes with armatures is done with modifiers like in http://web.purplefrog.com/~thoth/blender/python-cookbook/bone-orientation-demo.html (which also includes examples of adjusting the orientation of bones).

A python solution to your problem is somewhat involved, but I am optimistic that there are examples of all the techniques you need somewhere on stackexchange or google.


I have view port quality issue (Sorry if this has been asked before I couldn't find an answer) The image shows my problem it has Choppy edges in the viewport. I looked all over google and this forum but could not find a solution. I have an RTX 2080 and i7 8900k.

I fixed it once by creating a new workspace "Layout" and it worked all day but the next day I got on it was like this again.

I hope I can get a quick fix for this.
Thank you.

Ok I figured it out.
It was the camera clipping start length, it was set to low it doesn't like it when you just drag it to the lowest point.

like in this image


replace empties with 2 bones armature in script The following is a script that adds empties to vertices.  Each empty is parented to a vertex.  Since I know nothing of scripting would it be easy to replace the empties with a 2 boned armature that I created?  It needs to be duplicated each time instead of being added.

import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = context.edit_object
mesh = obj.data
bm = bmesh.from_edit_mesh(mesh)
empties = []
# selected verts
for v in [v for v in bm.verts if v.select]:
    empty = bpy.data.objects.new("Empty", None)
    empty.parent = obj
    empty.parent_type = 'VERTEX'
    empty.parent_vertices = [v.index] * 3
    scene.objects.link(empty)
    empty.matrix_parent_inverse.identity()
    empties.append((v.index, empty))

This can be achieved adding one line and changing another(variables changed so it makes sense):

import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = context.edit_object
mesh = obj.data
bm = bmesh.from_edit_mesh(mesh)
armature =bpy.data.objects['Armature'] #added this line to get armature object
armatures = []
# selected verts
for v in [v for v in bm.verts if v.select]:
    bones = armature.copy() # changed this line to mke copies
    bones.parent = obj
    bones.parent_type = 'VERTEX'
    bones.parent_vertices = [v.index] * 3
    scene.objects.link(bones)
    bones.matrix_parent_inverse.identity()
    armatures.append((v.index, bones))


Moving hair system with armature control How do we get hair particle system to move with mesh as armature deforms said mesh.....my hair moves when I move mesh as separate object though stays put when I try to animate the mesh with an armature.   I could not find much documentation about hair system in manual.  Help would be appreciated with greatness..

Armature modifier must be higher in stack than particle system...also in particle settings-emssion-source check use modifier stack.


OSL Script from External Source? Sorry if this is a "duh" question, but I'd like to use a custom OSL shader, but I'd like it to be sourced from an objective location on my hard drive. How exactly would I go about this in the most efficient manner?

Select the External mode on the script node and set the filepath to your .osl source file or a compiled .oso file. Or, if you put your shaders under the shader search path (see below), you can simply specify the filename.

From the documentation:

  The External mode can be used to specify a .osl file from a drive, and
  this will then be automatically compiled into a .oso file in the same
  directory. It is also possible to specify a path to a .oso file, which
  will then be used directly, with compilation done manually by the
  user. The third option is to specify just the module name, which will
  be looked up in the shader search path.

  The shader search path is located in the same place as the scripts or
  configuration path, under:

  Linux

 $HOME/.config/blender/2.79/shaders/

  MS-Windows

C:\Users\$user\AppData\Roaming\Blender Foundation\Blender\2.79\shaders\

  macOS

/Users/$USER/Library/Application Support/Blender/2.79/shaders/


How to make flickering light? I am working on my animated short, in its first scene I want to make a flickering light(like horror movies) What should I do.

You may achieve this effect fast using Noise Modifier of the Graph Editor.

Keyframe the lamp's strenght (in my case 1.000) at the desired frame on a timeline with I. Go to the next frame and keyframe it again (light strenght may be the same, since the modifier will do the job).

Go to Graph Editor, press N to open the properties shelf and add a Noise Modifier. Play with its settings for the different results.


How to turn off constraint lines drawn using OpenGL render? When rendering my animation with OpenGL Render instead of the normal Render I see it's wonderfully extremely fast.

But it draws object linking lines in each frame that normal render doesn't. How do I turn these off please?

In properties panel, turn off Relationship Lines under Display (or better, select Only Render). Guess, OpenGL uses the same render engine used by material viewport shading.


How to make on color not overlap other while texture painting? I'm developing my first 3d game "My Little Hitler" and I am texture painting my low poly model. As shown in the picture, I want to paint the skin color whithout removing the facial drawing black color... how do I accomplish that?

thanks

In this particular case you can set the blend mode to multiply. Since input_color * 1 = input_color and input color * 0 = 0, painting on white (1) will result in the exact color you are painting with, while painting on black (0) will result in black.

But I'd recommend painting from the bottom up, using layers and transparency to minimize destructive editing.


How to open system console to get output from Blender on Mac OS 10? Noobie here.

Should I open Mac terminal and cd to /Applications/Blender/ which is where my Blender app is? Doesn't seem to work for me trying to run script from Text screen in Blender. I guess there is no way to see output within Blender itself?

Right click on the Blender icon in the Applications folder and select "Show Package contents". Make an alias of Contents/MacOS/Blender by right clicking and selecting "Make Alias". Rename it and move it somewhere you like.

This opens the console in the background, next to the Blender application.

source:
https://www.lynda.com/Blender-tutorials/Set-up-Blender-console-window/486043/533594-4.html


Can't select any vertex in an object! I started using blender a few days ago, and decided to make a dog, so I'll learn how to use blender properly.

One night I saved the file and got off the computer. A few hours later I opened the file, but couldn't select any vertex, it's like they're not there (although it shows me the grid). I am in vertex and edit mode.

K_Horeman's answer helped me fix it:
https://blenderartists.org/t/noob-weird-selection-issues-cant-select-vertices-of-a-mesh-in-edit-mode/622979/2
"If it’s selected in orange with no vertices when you’re in edit mode, it is a separate object. You’ll have to go to edit mode on that object. You can only be in edit mode on one object at a time."
I didn't have the correct mesh selected in the Viewer (top-right) before entering Edit mode. So I highlighted all 4 objects you see in the picture, and I can select their vertices.


Noise reduction blur / postprocess in blender I use Photoshops Surface Blur to reduce the noise, but it operates only on 2D

Isn't there a way to blur in Blender, but also smarter then PS maybe using some extended info that Blender has?

I found http://mattebb.com/weblog/surface-blur/ , but the sample link is broken and quite old

Any idea how to make "smart" blur directly in Blender?

Before

After

Blender Compositor work only in 2D too..

"using some extended info that Blender has?" - You show a Photo.. What Info should Blender have that PS doesn't? ;-)

What you have in your Image here is actually not Noise, but Compression Artefacts.

I found this solution with Bilateral Blur works quite ok on your Sample:

I doubt that any Noise Reduction on Images(not rendered) in Blender is much better than dedicated ones in Gimp or elsewhere. While Blenders Compositor allows some neat things, it does not give direct access to Pixels, which i think is needed for any decent Noise reduction. (Of course Node do access Pixels, but you have no way of access Pixels in you Node Setup)


Steering Actuator Seek Near Sensor Transition When an enemy senses a player with the near sensor and starts to seek the player with the steering actuator, is there a way to make the rotational transition smooth instead of instant?

Example: I walk up behind the enemy. I get close enough to trigger the near sensor. The enemy instantly turns around in 1 frame and begins seeking me.

I can't figure out how to make the enemy animation turn slowly towards me instead of instantly the moment it starts to seek.

When the Near sensor is triggered the enemy will track to the player with an Edit Object > Track to actuator.

Add a Ray or Radar sensor to the enemy's camera or collision mesh with a player property in it, then connect it to the Steering actuator.


how to delete an object without deleting its particles in Blender 2.83.0 OK so i made an object. And i put particles In that object OK. Now I want to delete and when i mean delete the object.. And NO i dont mean hiding the object I mean deleting it. Deleting the Object Without removing the particles on it i just want the object gone without getting rid of the particles  Is there any way to do that
I'm on Blender 2.83.0 just in case that was important

You could name the particle system and instead of the object, put that particle system on an empty. This would mean the particles would appear but the empty would be invisible.


How can I use the vertex groups of an emitter to control the material of the particles? My use case: I'm using ANT Landscape and the Landscape Tools add-on to generate a landscape with vertex groups pre-assigned for erosion, deposit, water etc. (Landscape Tools does this for you).
I'm then happily using those vertex groups to control the length and density of grass with a particle system.
However it would be cool if I could use the same vertex groups to control the particles' texture, so that the grass turns more yellow where the water vertex group of the emitter has low values.
Any ideas how to achieve this?

[edit] There is a proper solution which I'll add as a separate answer, but since this technique is different enough to have its own uses (like if you want different grass models at the edges) I'll leave it here.
After digging around for a while, it looks like this is not possible. The closest I got was an OSL script using traceset to find the value, but it turns out that Blender OSL doesn't implement traceset.
I did come up with a workaround that more or less does what I want:

Create an additional vertex group (I called it water.edge) on the emitter and assign all vertices to it.
Add a Vertex Weight Mix modifier to the emitter, which copies the original water vertex group to water.edge.
Below that add a Vertex Weight Edit modifier that edits water.edge and applies a custom falloff curve that starts at 0, rises to 1 then falls back to 0. This makes water.edge have its highest values where the water values are intermediate.
Create a new particle system yellow grass, and use separate yellow grass variant particles.
Use the water.edge vertex group to control the density and length of the yellow grass particle system.

Downside is the texture doesn't "blend" from one region to another, but at least I can get dry grass where I want it.


Precision of Math Node? To normalize the position coordinates of particles for an Image Texture node, I have to divide 1 by a very large number (119,617). After running some tests, I see that the colors of my image texture are off by a factor of about 1e-4 (0.0001).

This has me wondering: how many decimal places does the Math node retain in its output?

I've noticed that some fields (e.g., the values for a Divide operation) accept up to three decimal places (and that everything beyond that third decimal place is simply rounded up or down). Is the same true for the output of the Math node? If so, is there anyway to change the output precision so that I get at least 6 decimal places in my output?

Many thanks if you know the answer and care to share it!

EDIT: Jaroslav pointed out that color is shown in the Data-Blocks view of the Outliner panel with six decimal places. However, when I look at the same view of my outliner, I see only three decimal places. Compare my screenshot (below) to that posted by Jaroslav. This is under Blendfile Data > Images > StarCol > Pixels.

Is there a reason for this difference? Am I looking in the wrong place in the Data-Blocks view? Can I trust that under the hood the full RGBA color values are being used (at least to six decimal places)? I would post this in a separate question, but as I'm only asking for clarification, it seemed best to do it here. Thanks again!

EDIT 2: The Python output for the pixel color values, on the other hand, has far more decimal places than just six! I assume that the values shown in the Outliner panel and in the fields of the Math node are shown with three decimal places for conciseness only? It would be disappointing to have the full precision stored in the Blender file and not using it!

For values Blender uses IEEE single precision floats. This gives a precision of about 7 decimal digits. The displayed value is rounded to 3 decimal places and the displayed value when editing the field to 6 decimal places (probably because the precision limitations).

The RMB value viewer in image editor of render output is rounded to 5 decimal places, but render values will render in full 32bit. Stored and rounded in format you choose.

It is also unlikely you are experiencing limitations in floating point representation:

$1/119617 = 0.000008360015716829547 $

When rendering this and storing with 32bit .EXR you get:

A sampled value of 0.00001 in Image Editor (5 decimal rounding), a value of 0.000008 in Data-Blocks outliner view (6 decimal rounding):

And value of 0.000008360016181541141 that is saved in the file by inspecting it through the console:

That's an error of 0.00000000000046471159

All of these cannot explain the 0.0001 error you are seeing. The problem is somewhere else than in precision of Blender math or your math is more complicated than what it seems and your floating point limitations snow-balled into the 0.0001 error.


Smoke not visible after rendering I know this is not the first time this question is asked, but answers I have found do not fix my problem.

I'm trying to render some smoke, it's showing great on the simulation but invisible on render.

[Here was my .bend]

Beginner's mistake here.

I've hidden the domain on render because it was first showing like a solid.
That was not the right thing to do.

Comparing with QuickSmoke, I found that changing the density of domain's material from 1 to 0 made exactly what I wanted.


Python script for camera following a moving object during an animation I have been involved with Blender the last two days and I want to use it in order to animate a moving vehicle from the calculations coming from Matlab/Simulink model.
In particular, I export the results of the simulations from Matlab to an excel file which I read in Blender and I move an object based on the locations and angles coming from the simulation.
However, I am facing an issue today; even though I have managed to make the object move, I want the camera to be somehow locked on the object and follow it (like in car games where the camera is behind the object and it follows it during the maneuver).
I have written the following script thus far, but it is not doing what I expect it to do. I also have found many videos on youtube of people showing how a camera can keep track of an object while the camera is static. However, I have found no sources on how to implement something in the Python API and more importantly the way that I imagine it.
Anyone can help?
import pandas as pd
import math
import bpy
import numpy

df = pd.read_excel (r'C:\Program Files\Blender Foundation\Blender 2.91\2.91\python\bin\Simulation_output.xls')
array = df.to_numpy()
rows,columns =  array.shape
chassis = bpy.data.objects['Cube']
camera = bpy.data.objects['Camera']
light = bpy.data.objects['Light']
init_pos = camera.location
init_pos_light = light.location

fr = 1
for i in range(0,rows):
    light.location = (init_pos_light[0]+array[i][0]*1000,init_pos_light[1]+array[i][1]*1000,init_pos_light[2]+array[i][2]*1000)
    camera.location = (init_pos[0]+array[i][0]*1000,init_pos[1]+array[i][1]*1000,init_pos[2]+array[i][2]*1000)
    chassis.location = (array[i][0]*1000,array[i][1]*1000,array[i][2]*1000)
    chassis.keyframe_insert(data_path = "location",frame = fr,index = -1)
    fr += 1

You might want to try some of the built-in tools instead of python (my compliments for your algo-oriented lifestyle!)
The solution is in Object Constraint properties.
For a created camera I created an empty that "Copies transforms" of the object I want to track (a "car" named "Cube").   Then the camera Copies Transforms constraint of the empty "before original" to keep the original offset, and also "Track To" constraint of the Empty (to keep looking at it).
I then did a simple animation (keyed) of the Cube (standing in for your car).   You might have a roadway "path" (curve) that the car follows instead.  I include a link to my example blend file.


How to add snow to a plant I have searched everywhere and can't find an answer on how to add snow to a plant. What I am looking for is  to add snow to something like this tree.

I have the snow texture done, but I just need to figure out how to add the snow mesh on the tree.

I'll give it a shot, although this is pretty basic!  If it works, great, but you'll have to play around with it for complex trees etc.  (This is an enhancement/refinement of an idea by Sardi Pax.)

EDIT: works just fine with curve object trees as well as meshes . . . see the very bottom for additional info.

Duplicate your tree mesh (in place) and give the duplicate your snow material.  But, you'll add some stuff to the snow material so it only shows more or less upward-facing faces.

The gist is to create a mix factor between your snow shader and a transparent shader.  The mix factor takes the "Normal" output from the Geometry node, separates it into XYZ components via a "Separate RGB" node, then tests the B value (facing Z axis) and keeps it as long as it's slightly greater than zero.  Then the backfacing surfaces are removed, otherwise you get the undersides of the downward-facing faces.

Then move the snow mesh up on the Z axis just a bit--enough so the snow is sitting on top of your branches to the depth you require.

Finally, to give the snow a more irregular/natural look, you can displace the snow mesh with a noise texture, e.g. a cloud texture.  You'll need to tweak it so the displacement looks the way you want.  I used a "Displace" modifier after a subsurf, using a displacement texture of type "Clouds".  I found that displacement along the Z axis of the "Local" texture coordinates was better than displacing along normals.  My midlevel was quite low (.2) and strength also low (.1).

If it's going to be viewed from a distance this may be unnecessary.

EDIT: haha, the displacement has some kinks to work out, you can see some sky between the snow and the branch on the right hand side of the render.  You'll have to tweak the displacment values if you want to use them - it may be preferable to displace from the object normals, but then you run into other kinds of oddities.  I don't see gaps like that when I turn the displacement off and maybe that's good enough for your purposes.

EDIT 2: what is now the top image uses a more complex curve tree object that was not converted to a mesh.  The snow material concept works here, although I had to change the Z-value factor to "Greater than 0.3" to remove snow from some of the not vertical but still fairly steep trunk angles on this different type of tree.  As far as I know the displace modifier cannot be used with curve objects, but there may be another solution if adding texture noise is desired.


How do I extract a texture .png from an FBX? I've got a Black Ops 2 gun in FBX format. I want to extract the texture from it as a PNG or some type of image.
I am using the latest Blender

I FIGURED IT OUT!!!
Go to UV Editor in Blender, and click on the image icon at the top to select the texture to view. Then click the Image button panel thing and you can save it from there.


How can I avoid or clean distortion in curves imported from SVG? I'm trying to create an image of a board (wood, silver, or gold) that is carved with some ornamentation, e.g.

The purpose is to create an imaging that will later be cut with a laser machine.
Therefore I first create the image in SVG, using inkscape (laser machine accept only VG), than I import the SVG in to Blender.

In Blender I grab only the ouyline, pull it down and create a Face (i.e. the board) and I use the rest of the part to carve through the board

I tried 2 method of carving through the Board - Knife Project, and Boolean Difference.

The methods works well when working with more simple structures, e.g:

But than other structure gets distorted, like in the images above.

My questions are:

Is there a better way to do it than the methods above?
How can I avoid/or clean the distortion in the image?

Edit:

As explained in How can I model Gothic style windows? (credit to ardito comment)

You don't actually need to separate the board and than curved it, instead:

open the SVG in InkScape and change the image to be filled (instead of only stroke)
import the SVG to blender
select the important mash and do ALT C and turn it into a mash
now you can simply extrude it and create a 3D img with carved spaces.

unfortunately it doesn't work on complicated image, such as this:

import the SVG version of this image cause blender to convert some of the colors: i.e. black becomes transparent and vice versa.

If I tried to use the boolean difference than blender crashes.

the knife project seems to work - it took about 10 minutes to complete, now I need to delete about 100 faces - but this sometime fails to delete the correct face.

As explained in How can I model Gothic style windows? (credit to ardito comment)

You don't actually need to separate the board and then curve it, instead:

open the SVG in InkScape and change the image to be filled (instead of only stroke)
import the SVG to blender
select the important mesh and do Alt+C and turn it into a mesh
now you can simply extrude it and create a 3D object with carved spaces.

Note: if the curve is distorted then select it, in the Properties editor in the Object Data tab, on the right, find Extrude and increase it by 1.


Is it possible to make the f-curve noise modifier's scale into a variable? Normally the scale value in the noise modifier is a constant. It cannot be animated.

Is it possible to make the scale value decrease over time.
Something like the picture below:

Any idea or suggestion would be appreciated.
Thanks.

Envelope modifier

EDIT: On re-readig the question this is more in regard to strength than scale.

Can add an envelope modifier after the noise modifier.

Set control points to expand or contract accordingly.

Example gif, add a control point limiting noise to [-1, 1] and then at frame 140 expand to [-10, 10]

For scale one method would be to add modifiers for a series of scales and frame ranges..

For being able to animate the influence, consider using the NLA editor and keyframe the animated influence

How to apply fcurve modifiers on top of each other, like object modifiers?


3d heat profile with opacity I would like to define a 3d, spherically symmetric, profile for objects that changes colour and loses opacity as move away from the centre. Essentially I want a 3d heat map centred on the object. The idea is that if I place many of these objects near each other, than they will blend seamlessly, i.e. that instead of overlapping, the space in between them will get the colour and opacity that is the sum of the two.

Is this possible in blender?

Edit for some figures:

So, firstly what I'd like to is paste a 3d profile on to all my objects. Something like this but in 3d:

I'd like the opacity to follow the same or a similar gradient as the colour in the above image. So that you can kind of see through the edges of the objects, but not the centre.

Then I'd like to add many objects but I'd like them to combine like this:

Notice how one object doesn't overlap the other, rather they blend seamlessly, and the brightness at points between them is the sum of the brightnesses from each individually.

First, give each of your objects a white volumetric emission shader.  The strength doesn't really matter that much as long as you use the same material on every object so the relative density is consistent.

For the objects themselves I am using a collection of Metaballs.  Meta-objects will "blend" into each other similarly to what you are describing.

Now set set your background color to black and render.  This will result in the following black and white map.

Next jump over to the compositor to remap this to the color gradient you want.  First plug the render into a Normalize node to remap the range of the render to [0,1].  Now run that output through a Color Ramp node and set up whatever gradient you want.

I also found that it gives a result closer to your reference images if you also add a small amount of blur.

The result looks like this:


NLA Influence not working I want to add some Noise to an Action by animating the influence of the Action Track. So I enabled "Animated Influence" and inserted Noise into the Influence, but the Influence doesn't change at all, it just stays at 0.

To add some noise to the strip add a noise modifier. A strip modifier works like an f-curve modifier but it applies the effect to all channels in the one instance of the strip.

Blender v2.78 moved the modifiers panel to a tab, earlier versions have modifiers located under the other properties.


How can you set, if at all possible, the channels for OpenVDB export? As we all know, the latest addition of OpenVDB in Blender is awesome and cool. Buuuut I still have some questions. When you export OpenVDB it's important to have the channels with them ( temperature, heat, density, velocity,...). Now, in Houdini you can set which channels you want to export with your OpenVDB files. In Blender it seems a little more random ( or I haven't found the settings panel yet ). When I cache a fire to OpenVDB I sometimes get just a density channel, sometimes density and temperature, sometimes nothing.

I don't have to tell you that these channels are super important, because they act as masks for shading ( at least, that is what I was told. ). So, in order to make this usable, and make me a very happy camper, I would like to know if it's possible at all to set these channels. Or at least where to find them. Or just let me know if this is a bug, and I'll report it.

Well, that's my predicament. I hope to find some answers.

Cheers!

well, as far as I know there is just basic vdb support and blender does not offer you the possibilities houdini does. the vdb data is hard coded and depends on the sim settings. Though I have experienced that blender exported vdbs hold all the information needed to shade them within houdini. If you feel like the same simulation exports differently every time this is probably a bug. If it changes together with certain sim settings I would think it is supposed to be that way.


Convert 2d path to 3d bracelet I usually use Photoshop to convert a 2d path to 3d object but I am not able to fold it to make it take a bracelet shape like the one in the . I was wondering if Blender can do this and I really appreciate it if someone can explain it to me. Let us say the length of the bracelet is 6 inches. I can make a 6-inch length path but how can I fold it into a bracelet shape. If my question is not clear please ask questions.

Edit1:

Thank you for the answers. I am going through @Robin_Betts steps. Every thing went fine until I came to step 4. The rotation doesnt go as expected. PLease have a look at the photos.

Edit2:
I am almost done, still have a small problem. There is a plain that appears when I rotate the curve. What is the reason for that?

Conclusion:
Yes! Everything looks good now. I have just removed doubles. Thank you all!

Side Notes:

1- I have repeated X > Limited Dissolve mentioned in step one about 10 times to make the curve clean and made 400 cuts for the plain mentioned in step 2.

2- I have rotated the objects (step 4) in object mode (Rotating the mesh in Edit mode didn't work for me)

3- I couldn't rotate the objects around Z axis until I created an Empty object and use it as an Axis/Origin.

I don't really want to duplicate @moonboots' answer.. this one takes a slightly different approach, and may help with some intermediate steps for a beginner.

Working in the XY plane, X across.

Import your svg, and convert with AltC to a mesh. The mesh may be a bit messy, with a lot of edges that don't contribute to its shape or integrity. In Edit Mode, X > Limited Dissolve will get rid of a lot of surplus edges, by angle.
Create a plane that covers the geometry, and move it up in Z. Hovering over one of the long edges,  CtrlR > scroll to introduce enough edge loops across the plane to allow for deformation. X Delete > Only Faces to leave yourself with a wire frame.
In Object mode, select the plane, and then the path-mesh. Put the path-mesh into Edit Mode. In the tool region, find 'Knife Project'. Looking straight down Z in an orthogonal view, hit the button. This will project the plane's edges into the path-mesh.

Having rotated the whole mesh in Edit Mode, by 90 degrees in X so it's standing up on XY, assign a Simple Deform > Bend modifier, axis Z, 360 degrees.

This is what the rotation should look like, illustrated with the Transform Orientation set to 'Local', so the Gizmo shows the object's local axes. Note they are still coincident with the Global axes. (If they are not, you can hit Ctrl A > Apply Rotation)

Now you can apply the modifier and edit the mesh to join its ends (the small blue wedge in the picture). Use F or Bridge Edge Loops  between two edges to create a new face.
Now you can assign a Solidify modifier to give it thickness.

This example is quite low-resolution, you could use more divisions in the plane in step 2.

You can apply the Solidify modifier, and go in again with a Limited Dissolve,  adjusting the angle to tidy up as much as possible without losing detail

The topology is horrible for smooth shading or subdivision, but that's not what it's for. In Edit Mode, CtrlAltShiftM selects no edges, showing the object is manifold, and should print.


Wind not working (ver 2.83) Simple quick setup following tutorial, but wind not working. Cloth hanging properly, but wind @ 20000 force has no effect.
What am I missing?
https://drive.google.com/file/d/1YK3ljOQW6vr7ZMqKjwcZX0Pv9OOp5Yji/view?usp=sharing

It works just fine, you just have to move your force emitter "in front of" (behind) your object. Make it so the arrow points at the cloth. See below:


How to check if an object has a uvmap with python? How would I test if an object object has a uv map from Python?

Run some code in this case, otherwise throw an error.

In this case you'll need to check if the objects mesh data has any UV layers.
This works for vertex colors too.

import bpy
if bpy.context.object.data.uv_layers:
    print("We have UV's")
else:
    # if this runs from an operator, you may want to report an error instead.
    raise Exception("Missing UV's")

Where uv_layers can be replaced by vertex_colors, materials... or any other sequence you want to check is empty or not.

Note: In Python you could check: if len(bpy.context.object.data.uv_layers) > 0: however there is no need, since all sequences will evaluate to False when empty, infact, this is slower in some cases since counting all items can be avoided when we only need to check if its empty.