Why does the top displace modifier always switch to the active texture? Often when modeling I have a need to apply multiple layers of displacement, with each displace modifier using a different texture.  However, every time I go to the texture panel and select one of the textures the topmost displace modifier (and none of the others) switches to using that texture.  I then must go back to the modifier panel and switch it back, which is a royal pain in the neck to do this every time I go to edit a different texture.

Why does Blender do this?  I don't think it is a bug as I can remember it doing this for as long as I have used Blender.

When selecting the texture to edit, you are actually setting the texture to be used by the displace modifier(s) and anything else that was using the texture that was there before you set it.

It's the same with materials:

Say I want to edit the blue material. If I select the blue material with the orange object selected, I'll turn the orange object blue:

Instead, I should select the blue object:

I have to select the blue object.

To "select" a texture being used by a displace modifier, either click the button next to the texture slot in the modifier:

Or in the texture panel, select which modifier you want to edit, instead of which texture:

If you want to be able to edit a specific datablock regardless of the object selection, you can Pin a panel by clicking the pin:

This will prevent that panel from displaying another object's datablocks until it is unlocked again.


snap to the ground/grid I have a sphere and it's floating ( not on ground level). I simply want to snap it back to the ground (grid). I select 'increment' in snap option and turn on absolute grid snap. Then i move the sphere while holding ctrl (SNAP ON) , it will snap but not snapping to the ground/grid. Anyone can help ? i use Blender 2.8.2

If I understand what you mean, you wish the bottom of your sphere object to touch exactly the grid, as if it "felt" on a virtual ground (that doesn't exist).

To achieve this, you need to tell blender exactly what you mean by bottom, unfortunately. I.e., you need to (temporarily) move the origin of your sphere to the object's mesh feature you wish blender snaps everywhere, even to the grid.

E.g. you need to go into edit mode, select only the bottom (vertex?) of your mesh,

then go back to object mode, and select "Object > Set Origin > Origin to 3D cursor"

After doing so, the snap command referred to the absolute grid snap

will allow you to exactly snap the (temporary) origin of your object as you wish.

Then you can restore the origin of your object using another option from the same menu above, i.e. "Origin to Geometry"

If you had a "floor" object like a plane or else, you could maybe use a rigid body simulation to let your sphere fell onto the "floor", but that requires much more setup for a simple task like this, although it could be useful though to let  as series of objects (e.g. tree shaped objects) to fell onto another one (e.g. a mountain shaped big object) instead of placing them manually...

The rigid body simulation will also be quite real, and your object would need to sit perfectly on the floor or, as maybe in the ICOsphere above, it would roll on a side, etc. Not recommended in this case.

I hope this answers you.


BMesh: How to get a list of faces and edges, given the vectors (and delete them)? I have a list of a centre vertice along with all its surrounding vertices.

listOfVectors = [ vertice, neighbour1, neighbour2, neighbour3, ... ]

I need to remove all edges and faces regarding those vertices to create further geometry and move the centre vertice around.

I'm actually creating a valley by dragging down a vertice inside a circle (with some cubic bézier parameters).

Currently, I'm iterating every face and edge on the mesh to see if every vector is contained in listOfVectors and removing them from the BMesh object. The problem is that my mesh has over 310,000 faces.

I've tried using bmesh.ops.delete(bm, geom = verticeList, context = DEL_EDGESFACES) (see below for list of constants), but that accomplishes exactly nothing. No errors, no changes.

Is there a way to make bmesh do the hard work for me? Or some approach to get the faces that's better than iterating on each one?

References

Constants used:

DEL_VERTS = 1
DEL_EDGES = 2
DEL_ONLYFACES = 3
DEL_EDGESFACES = 4
DEL_FACES = 5
DEL_ALL = 6
DEL_ONLYTAGGED = 7

Source for the constants: https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/bmesh/intern/bmesh_operator_api.h

bmesh.ops.delete reference: https://docs.blender.org/api/blender_python_api_2_71_release/bmesh.ops.html#bmesh.ops.delete

I think that parameter geom is wrong.
geom (list of (bmesh.types.BMVert, bmesh.types.BMEdge, bmesh.types.BMFace))

import bpy
import bmesh

if bpy.context.mode != 'OBJECT':
    bpy.ops.object.mode_set()

bpy.ops.mesh.primitive_uv_sphere_add(segments=32, ring_count=16)
bpy.ops.object.mode_set(mode='EDIT')

bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.mesh.select_random(percent=50.0, seed=0, action='SELECT')

obj = bpy.context.active_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

list = [v for v in bm.verts if v.select]
list += [e for e in bm.edges if e.select]
list += [f for f in bm.faces if f.select]

bmesh.ops.delete(bm, geom=list, context=4)

bmesh.update_edit_mesh(me)


Unable to apply material on plane? I am unable to get a material to appear on a plane which I'm working on. I new to blender and followed the steps of most tutorial. In most cases, selecting a certain colour automatically applies to the object but mine does not seem to work that way. I have tried selecting all vertices in edit mode and assigning it but that does not work as well.

Any advice on why this occurs will be greatly appreciated.

In Blender Render the color in 3D view changes when you change material, but in Cycles Render you will only see the material change when Rendered. So when you change material in Cycles Render you don't see color change in 3D vieuw, unless you explicitly change the viewport color in the materials settings in Cycles Render


Where is "volume" in world in blender 2.78? I have Belender 2.78 and am trying to create fog in the world. Plenty of tuts on YouTube saying to go to World, then Volume, then add Volume Scatter. Only one problem. There isn't a "Volume" in World. In Blener Render or Cycles Render (and I'm using cycles).

Here is what's available under World, in this order:

*Custom Properties
*Preview
*Surface
*Ambient Occlusion
*Ray Visibility
*Settings

2.78 manual shows Volume in the list for World. Do I have a glitch copy?

Under surface, press "use nodes" and then instead of the surface being set to background, change it to volume scatter.


Use the bevel-tool from python script I want to use the bevel-tool to add a face between two other faces. The bevel-tool should use the selected edge(s) as geometry.location  is given via a selected edge.

This is what I have

This is what I want

Which bevel-tool should I use?
http://www.blender.org/api/blender_python_api_2_75a_release/bmesh.ops.html?highlight=bmesh.ops.bevel#bmesh.ops.bevel
or
http://www.blender.org/api/blender_python_api_2_75a_release/bpy.ops.mesh.html?highlight=bpy.ops.mesh.bevel#bpy.ops.mesh.bevel

And how can I set a enum-value? I tried offset_type='OFFSET' but I get the error that int was expected.

Script:

import bpy, bmesh
from mathutils import Vector
obj = bpy.context.object
bm = bmesh.new()
bm.from_mesh(obj.data)
bm.verts.ensure_lookup_table()

selected_edge = None
for edge in bm.edges:
    if edge.select:
        selected_edge = edge
        print("edge", edge)

print("selected_edge", selected_edge)

bpy.ops.object.mode_set(mode='OBJECT') # only working in object mode
faces = bmesh.ops.bevel(bm,
                geom=[selected_edge],
                offset=0.2,
                offset_type='OFFSET',
                segments=1,
                profile=0.5,
                vertex_only=False,
                clamp_overlap=True,
                material=-1)

print("faces", faces)

bm.to_mesh(obj.data)

You can find out the answer to this in several ways. Here's what I did:

Use the UI tool (mark the middle edge then press CtrlB to bevel).
Go to the info panel (above the 3D view on the default layout), and open it up a little bit. Not always, but often, using the UI commands and operators will print out the command used in the info panel. Here we can see that the bpy.ops.mesh.bevel operator was used.
To further explore this command and its documentation, open the python console. Type in:

bpy.ops.mesh.bevel(

Then press CtrlSpace to see the autocompleted documentation for this operator. In this case:

bevel()
bpy.ops.mesh.bevel(
    offset_type   = 'OFFSET',
    offset        = 0,
    segments      = 1,
    profile       = 0.5,
    vertex_only   = False,
    clamp_overlap = False,
    loop_slide    = True,
    material      = -1
)

This shows you all the parameters and their defaults, you can then experiment with other values and search for this operator in the official docs to review any additional information you might need.


Low poly mesh/Oddly sharp edges on normal map where it is supposed to be smooth I was wondering if anybody could help me with this problem I'm having with all my models/normal maps.

As you can see, it mainly happens on the handles[the handles of a knife model]. You can still see the hard edges of the low poly mesh, but there is still some detail from the high poly mesh. I'm not sure how to describe it.

It happens again here. I've tried to use a cage but that didn't seem to work... I don't really know what to do, and I want to stop this problem before I make anything else because I don't know how much it will take to fix this.

Thanks for any help :)

(edit)Images with it rendered

It doesn't show up much in those images, but it does show up a lot in the game I'm trying to mod it into - maybe this helps too?

Here is one more example with a pole model that I tried to smooth out

This is it with the normal map on - it looks like it barely does anything but it still does - I can see some slight smoothing if I look at it closely, but it's not nearly as smooth as the high poly

Here is one with the normal map off

Forgot to put in a normal map node - woops - this is what it looks like with that active

There should be some lines on the normal map:

If you have flat faces and bake normals of round forms to them, then the edges should be visible in the normal map because the normal map needs to transform those flat planes to round smooth forms while still being mapped onto the flat faces. Normal directions should change at the edges and cannot be smooth gradients. Let's have a look at what is going on with normal directions when smooth form is mapped on a corner and then the normal directions are projected onto a flat 2d texture:

It makes sense that we see a sudden change of values where the edges are. They should not show on the shaded models. In other words - it's normal to see lines on normal maps like these :D . There may be other issues with the baking process that cause the result not to match your expectations. the game engine may expect different format of normal maps. OpenGL and DirectX treats normal coordinates differently. Try inverting the green channel in the normal map or choose -Y instead of +Y in the baking settings for the second channel:


How to add textures to a collada file imported from Fuse I purchased Fuse Character Creator and made a rigged model that I imported into Blender from Fuse. The model is a Collada File and it comes in fine, the model comes rigged and is fully poseable except that the textures aren't applied. I switch to texture view but still nothing. Here's how fuse works, you upload your model to their site, have it autorigged, and then choose the format that you want the model file in. I chose Collada. It then gives you the zip folder with the model and the textures in their own folder named "textures". I don't know what to do from here. The textures are all PNG's. When I exported to as an obj file the model came with the textures applied, but the obj doesn't come rigged. I included a picture of the textures if it helps.

In order for the textures to appear on the object, you must assign a material that uses the textures.

Here is how you would set up such a material if you are using the cycles render engine.

First go to the materials section of the properties view, and click new to add a new material.

Then go to the node editor and use a node setup like this to combine the textures.

The main color of the material comes from the diffuse shader, which gets its color from the image texture node plugged into its color input.  This texture should be the one labeled "diffuse".

The gloss map (usually called specularity map, or spec map for short) is used to denote glossiness across the model.  To implement this you use it as the factor of a mix shader between a diffuse and a glossy shader.  Make sure the glossy shader is in the bottom socket, since the factor value is the fraction of the second input that contributes to the output.  If you want more control you can add a color ramp node between the image texture and the mix shader and play with the values.

Finally normal maps are used for altering the surface normals to fake small bumps on the object.  The red and green channels of the texture are used to define the x and y components of the normal vector at each point.  To use a normal map simply plug it into the color input of a normal map node and plug the normal output into the normal input of the shaders you want it to affect, in this case all of them (the duffuse and glossy).


Remove inset area / Fill embossed text I have a model that has some text embossed into it. I need to remove them. (We're still making it in the USA, but it is not legible when 3D printed.) Unfortunately this file was exported from something else and appears to be 100% triangles. What's the best way to do this?

This model is very complex and curvy on both sides. It makes things like disabling "Limit selection to visible" not useful because there is no perspective where all of the inset faces are visible.

Select the faces in edit mode, X and dissolve them


How to import .dng files I have to work with .dng files and it looks like you can do it in Blender, somehow.

As stated in this question, it seems that you can import them but I don't know how; how do I do this?

It did not work in the link you provided. The bug was that the DNG actually crashed blender. The bug causing the crash was resolved, but DNG was still not supported.

There is a discussion here: http://www.magiclantern.fm/forum/index.php?topic=6457.0  about converting DNG to EXR which may be of interest to you.


How can I set an IK limit on a bone's Y axis? I'm trying to rig a leg that has two thigh bones (one to move the leg around the hip and the other to rotate the thigh around the bone's main axis):

The IK constraint on the Shin bone reaches up to ThighB; ThighR has X and Z locks enabled on the bone's IK tab so as not to bend the leg between ThighB and ThighR. This works fine.

I tried to lock the ThighB's Y axis on the bone's IK tab but this has no effect - ThighB still changes it's roll when I move the leg (I also tried using a limit and setting a high stiffness, this also didn't work):

So I have two questions:

What exactly is the "Limit Y" / "Lock Y" option good for, since it doesn't seem to work as I expect it to?
Is there a way to keep the IK Solver from rolling/rotating ThighB around the y axis?

I'm aware that I could set up a second chain that just used a single bone and then copy the x,z rotation to the ThighB and the roll or the y rotation to ThighR, but I'm looking for a simple solution first.

With no pole, locking the Y axis works, and can be seen by locking/unlocking it in pose mode.  However, what exactly it means to lock the Y axis isn't necessarily intuitive; in reality, orientations aren't sets of 3 independent axes.
There is one situation where locking the Y axis (of the first bone in the chain) will do nothing: when you are using a pole target.  In this case, the calculations used to track the pole will replace the limited Y axis rotation of the first (only) bone in the chain.
Note that pole targets aren't necessary for IK; they're an option, and there are alternative controls.
If I wanted to create an IK thigh twist bone with a pole target, here's what I'd do:

The thigh bone of the IK chain is non-deforming.  The deforming thigh twist bone is parented to it.  Note the hierarchy: the deforming (upper, non-twist) thigh bone is not parented to it.  Instead, it's parented to the hip (or whatever the IK thigh's parent is), and then acquires the proper orientation via a damped track constraint, in this case, targeting the head of the thigh twist bone.


Part of the model doesn't show vertices on it. Error message under Transform tab is "Nothing selected" I'm super new to Blender and I don't know what I did wrong. I was modeling just now, and all of sudden I can't select any vertex on part of my model because there isn't any!

If I switch to edge mode or face mode, the non-affected part of the model behaves normally, but by selecting any edge or face of the problematic part of the model, no gizmo shows, and I see an error message of "Nothing selected" showing under the Transform tab, and I can't use any mesh tool on them. E.g. hit E and no gizmo is there.

FYI, I don't have any modifier on the mesh as you can see on the first screengrab. I could totally extrude faces and merge vertices just half an hour ago.

Hitting ALT+H to unhide everything solves the problem.


Eevee get darker shadows I've setup a scene just the way I like it (world surface lighting and two directional lights) but shadows are not dark enough.
Decreasing world color and compensating it with increased lights color looks worse.
What should I try?
Using Blender 2.90.1 and Eevee
Here is the link:
https://drive.google.com/file/d/1elA_yihyFeN1jwiWnPg2coCEW14NLecZ/view

So here is a quick try: First, deactivate the world in the Shader Editor, increase a bit the strength of the 2 suns to 2, as the shadows are a bit too dark and as you need to compensate a bit the removal of the world, create a point light in the middle of your room, disable its shadow option and give it a strength of 300 W. It may need a bit of tweakings but I think I'm not far from what you want?
Edit: also, maybe a Light Probe > Irradiance Volume will improve the lighting, to be tested


Rotate view around Y-axis I'd like to be able to rotate my VIEW (not my model, not my camera either) around the Y-axis. This would allow me to select some vertices using a box selection. I fear it cannot be done, but I hope some one proves me wrong.

My research so far is little promising:

http://forums.cgsociety.org/archive/index.php/t-981266.html

http://en.wikibooks.org/wiki/Blender_3D:_HotKeys/3D_View/Object_Mode

Q: How to rotate my view around the Y-axis?

Appearently, I created a duplicate of: How to roll the viewport?

For a quick answer:

use CTRL + SHIFT + SCROLLWHEEL.

Thanks to  @Ray Mairlot


How to make topology smooth in Blender for rounded object (helmet modeling) I have managed to make a relatively spherical object using plane extrude technique. I use Blender 2.9. Just to be more specific, I use Schuberth RF1 helmet model as a refernce. So far, this is what I have come up with.

However, since modeled using this technique, I have struggled to smoothen the surface of the helmet I modeled to appear in a uniform flat surface of a sphere. You can see on the below pictures that the top part of the helmet is a bit uneven.

Do we have an option in blender to smoothen the top part so it looks really even?

Have you tried shade smoothing the whole object? If you start having problems with the normals go to: Object Data Properties > Normals > Autosmooth.


How can I reset the Rotation of a Meta-Rig Control? I accidentally changed the rotation of the finger control (selected, cyan or blue color in the image)  but now I don't have a glue how the orientation could be reset. Moving the original bone in Edit Mode doesn't work. How can I reset the position of this Control to point to  the same direction as the other finger controls do?

After reseting the rotation Alt-R while the finger control was selected (as suggested by iKlsR) I had to enable the Tweak Layer (highlighted in the image) after that the finger could be repostioned by the circle shaped controls.


Spline wrap animation I want to create in blender an animation similar with this one:

I am wondering how could I do and if it possible to interact with rigid body objects?
Who can help me, please ... thank you!

The object could be a simple (say) Bezier curve, with a Bevel Object (another curve) assigned to it in its Properties > Geometry panel.

The 'Tilt' property of individual control points on a Bezier curve is keyable:

So just right-click it to set keyframes appropriately.. if you want a loop, set first and last keys to be visually identical, and go into the property's f-Curve, hit T, and ensure that the interpolation between the keys is 'Linear'.


Why is my rendered textured mesh showing up as black? For some reason when I render (via cycles) my textured mesh shows up as black. I have a UV mapping setup on the mesh, a light source, and a set of nodes describing the material. When viewing through texture mode it shows the texture just fine

Edit Uploaded .blend file

It appears that packing the image into the blend file was enough to get it to render correctly. Its strange because it was clearly able to read the image file, given that it was showing up in my UV/Image editor. I'm not entirely sure what the root cause of the issue was


BGE : AddObject adding two object 8 years using blender and still, never tried the Python API. Never too late to begin! Then I was stuck on something very frustrating, tried 2 days, created variant, searched for bugtracks and looking for others stack thread.

The context

I'm working on a "civ-like" game with tiles. To generate my map I want to run a small "buildmap.py" script allowing to place tiles and control them.

So, I put the tiles and tiles variant on my second layer and call them from the first layer with a "spawner" Empty object at the launch of the scene:

Always (tap) -> python : buildmap.py

Here is the code :

import bge

world = bge.logic.getCurrentScene()

world.addObject("Tile", "spawner",0)

The problem

When I launch the game everything looks good, the tiles are placed at the right places. Then I clicked on the first one... And realized that my script putted 2 "Tile" objects on each position. I removed the loop to study the addObject and branch it to a keyboard with same result.
By calling once addObject it places 2 objects.

Maybe I’m missing something ? so I came here :)

Do not enable the [Tap] option. It makes no sense.

Background

The Always sensor "always evaluates positive".

Any sensor will trigger all connected controllers when the evaluation result changes (from not positive to positive and from positive to not positive).

As the always sensor never evaluate not positive, it will only trigger when the object was just created. So it is more a "is created" trigger.

There are configuration options that modify the behavior of the sensor. You set the Tap option. This option changes the behavior of the sensor to evaluate not positive the next frame after evaluating positive, regardless of the real situation. This was introduced to make the use of the keyboard sensor a bit more comfortable.

As you enabled that option, you get this processing from the always sensor

frame 1: evaluate positive -> (result changed): trigger the controller
frame 2: evaluate negative (because of Tap) -> (result changed): trigger the controller
frame 3+: evaluate negative -> no trigger

Solutions

Assumption: single trigger

With the default settings (no Tap, no Triggering Levels, no Inv ...) the always sensor (and the delay sensor) will trigger the controller exactly once.

With that Assumption (one trigger) you can run your Python code as is.

Common use case

When you have different settings or other sensors (like a keyboard sensor) you need to implement the supposed behavior of a controller.

You ALWAYS check the status of ALL connected sensors and consider that in your custom code.

if all(sensor.positive for sensor in bge.logic.getCurrentController().sensors):
    ...
else:
    ...

Remark: even the basic controllers (AND, OR ...) do that. That is the minimum code you should write (unless the above assumption applies).


Why does only the Horizon render, but not objects? So, whenever I render a image, only the sky shows up.

but, it is supposed to show like this:

Nevermind, I found out myself, all  I had to was clear restricted renders.


Moving arms in a specific manner with two fixed points I want to move the shorter upper and longer lower-arms up and down, leftside of the arms anchored to the wall like in the drawing, the triangle must move accordingly with the pivot points. I'm not able to get both arms and the triangle stay together, please help, thank you.

The way to do this is by creating two empties, one in the center of the right arm (the fixed arm) and another in between the two rigging points in the triangle, the first empty will be the controller, the upper and lower arms will inherit it's rotation using Copy Rotation Constraints.  Since the upper and lower arms are not in parallel to each other, this means that in reality, the triangle will rotate in the counter direction of the controller, in order to do this, you need to set a driver, here are the steps in detail:
Setting up Empties and Constraints
1- Make sure the upper and lower arms are parallel and horizontal (you will change this later).

2- Select the lower arm, go to Edit Mode by hitting Tab, select the face at the fixed arm side and hit Shift + S, then choose Cursor to Selected, this will position the 3D Cursor at the center of that face.

3- Press Tab to go back to Object Mode, then press Ctrl + Alt + Shift + C, choose Origing to 3D Cursor, this will set the origin of the lower arm at the end near the fixed arm.

4- Repeat steps 2 and 3 for the upper arm.

5- At this step, you should be now in Object mode, the upper arm is selected, it's origin is at the end near the fixed arm (to the right) and the 3D Cursor is at the upper arms origin, in case you accidentally moved the 3D Cursor, make sure you put it back at the origin of the upper arm (step 2), this is important for the next step.

6- Press Tab to go to Edit Mode, select all by pressing A once or twice, choose the 3D Cursor to be your pivot point (check the image below), and rotate on the global X axis by pressing R then X, move your mouse to rotate until it's in the right initial position, then confirm by left clicking your mouse, then go back to Object Mode. Make sure to set the pivot point back to Median .

7- Create an Empty, position it at the center of the fixed arm, this will be the controller, it will be good if you rename it to something meaningful like "Controller_empty" or whatever you find appropriate.

8- Select the upper arm, go to the Constraint menu in the Properties Panel, or press Ctrl + Shift + C, add Copy Rotation constraint. In the Constraint menu, choose the Controller Empty to be the target, repeat the same step for the lower arm. This will make the upper and lower arms rotate with the Controller on their origins.

9- Create another Empty, position it to be centered in between the two rig points of the triangle. Make sure it is selected, then Shift select the Controller Empty, press Ctrl + P, choose Object. This will create a Parent/Child relation with the Controller Empty as the parent.When you rotate the Controller, the second empty will rotate around it, if you try that and the rotation is weird, make sure again that the pivot point is set to Median, and not to 3D Cursor.

10- Select the triangle, create a Copy Location constraint, select the new empty to be the target, this will update the triangle's position to be where the new empty is, but it will not copy it's rotation, this is why you shouldn't use parenting for this.
Setting up a driver

11- Now all we need to do is to make the triangle rotate in the opposite direction of the Controller's rotation, for this you need to create a driver. Select the triangle, in 3D View, at your right hand, if you don't see the Properties Panel, press N to make it show, under Transform > Rotation, Right click the X axis value, and choose Add Single Driver, this will make the color of the value box turn purple (check the image below).

12- SAVE your file, I can't stress this enough, because the next step, Blender will have to reset your scene for security reasons. You need to open Graph Editor window, change the Editing Contest from F-Curve to Drivers. In Graph Editor window, on your left, you will see (X Euler Rotation) left click select it, then hovering your mouse over the Graph Editor window, press N to show the Properties panel.

13- In the Graph Editor's Properties panel, under Drivers, make sure that Type is set to Scripted Expression, Beside Expression, wright -var as the expression value, under Add Variable, make sure that var is the name of the variable, Transform Channel is selected, set the Ob/Bone to be the Controller Empty, set the Type to X Rotation, instead of the default X location, since we need the rotation of the Controller Empty, keep the Space to World Space, Save your file again before you proceed.

14- You will notice that you have an Error warning, if you look at the status bar at the top of Blender window, you will see Auto-run disabled, you have two options to choose from, Reload Trusted, or Ignore. This is not a bug, this is a procedure made by Blender to make sure that you know that the related script is trusted, in order to protect you from malware that can otherwise auto-run and harm your system if downloaded from an un-trusted site. This is why I emphasized twice that you should have your file saved before clicking Reload Trusted button, once you click it, this will reload your scene to the last save, if you didn't save, you'll have to start all over, so if you still haven't saved, do save now, then click the Reload Trusted button, confirm by clicking Revert.

15- This should be it, by creating a driver for the X rotation value of the triangle, setting the Controller Empty as the target object (Ob/Bone, I don't know why the weird label is like that, if you ask me, it should be just Target!) which Blender gives it a default name (var), and telling Blender, to use -var (minus var) for Expression value, what happens is that when you rotate the Controller Empty on it's global X (since you kept the space to World Space) this will assign it's negative value to the X rotation of the triangle, hence reverting it's rotation.

All you need to do now is to rotate the Controller Empty along it's global X axis.
Happy Blending!
Here's the .blend file:


Orbit in Blender by holding SHIFT + Middle buttom Is it possible to change/customize the orbit command so that, orbit rotation can be done by holding shift and the middle buttom?

Yes, this is quite simple to change.
Navigate to Preferences > Keymap and select Pan for "Middle Mouse Action"


How to display custom panel in two spaces? My custom panel work good in the VIEW_3D space.

bl_label = "My Panel"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = 'MY'

I want to display panel in two spaces: VIEW_3D and IMAGE_EDITOR.

I try write so:

bl_label = "My Panel"
bl_space_type = "VIEW_3D", "IMAGE_EDITOR"
bl_region_type = "UI"
bl_category = 'MY'

but it doesn't work. How to make it right?

Subclasses and inheritance

Code based on this answers and updated for 2.8x according to API changes:

class MY_PT_CustomPanel(bpy.types.Panel):
    """A Panel to show in many places"""
    bl_label = "My Tools Panel"
    bl_region_type = 'UI'

    def mydraw(self, context):
        # do nothing here so each class can add it's own thing'
        pass

    def draw(self, context):
        self.mydraw(context)
        row = self.layout.row()
        row.label(text="Hello world!", icon='WORLD_DATA')

class MY_PT_Viewport(MY_PT_CustomPanel):
    bl_space_type = 'VIEW_3D'

class MY_PT_ImageEditor(MY_PT_CustomPanel):
    bl_space_type = 'IMAGE_EDITOR'

    def mydraw(self, context):
        row = self.layout.row()
        row.label(text="For the Image editor")


Getting a crease when using a Mirror Modifier I'm trying to model a spaceship and I ran into this weird predicament. I'm using a mirror modifier as can be seen and I get this annoying crease:

If I enter edit mode, you can see that the verticies are connected:

And adding mean crease doesn't fix much:

What's a good way to fix it?

You have some non-manifold inside faces caused by the mirroring. Select and delete them with X or Del.


How to build a website to upload and download file from blender by python? I tried to ask this question in the most correct way for my knowledge on stackoverflow, but unfortunately as I believe I don't know an adequate language to ask a question like that I was canceled the question from the administrators (This is not a criticism, but it is only to introduce to the fact that I do not currently have the capacity to ask a question in technical language). So I try here, hoping the administrators understand and even suggest me how to correct my question.

I would like to build a script that will export / import certain files, directly from blender on a web platform that allows you to share files (.txt at this time), the files must have the possibility of being downloaded by other users, so I speak of a kind online library accessible by those who use my script.
Now my question is divided into 2 parts:

What kind of web service can I use?
What kind of python script/module can I use?

Basically I will accept answers that show me the way and to do a correct research.

If someone wants to correct the question to make it more technical, I think it's a good thing.

Start with downloading

It's a lot easier to get content from the web than it is to post to the net.  So we'll start there.

For more info than you can poke a stick at search google et al with

download files with python

Simple example uses python requests to download this question's page source into blenders text editor.  Any file that can be browsed  can be downloaded in this way.  For this can choose any web hosting.

import bpy
import requests

url = 'https://blender.stackexchange.com/questions/160565/how-to-build-a-website-to-upload-and-download-file-from-blender-by-python'
r = requests.get(url, allow_redirects=True)

t = bpy.data.texts.new("Question")
t.write(r.text)
bpy.context.space_data.text = t

Uploading is trickier, generally requires passwords etc, and is probably outside the scope of BSE.


Armature rotation error I'm working on animating a teddy bear...
Anyway, I've been following this youtube tutorial and I can't quite get it completely right.
The biggest issue I am having is the rotation when trying to pose (in pose mode).
The video shows the rotation in relation to the bone pivot point regardless of where the 3D cursor is positioned. However on mine all rotation is done in relation to the 3d cursor and it is making for some very funky movements and difficult to pose. I have to move the 3D cursor and even then it yeilds funny results.
Any idea what I am missing? Or perhaps there is a step in the tutorial that has been omitted.
Image shows shoulder and ankle rotation
I need to go through the tutorial again, but I need another set of eyes from someone more knowledgeable than I.
Thanks in advance
Blender version 2.81.16 on Windows 10 64 bit.
Edit: I may have figured it out. I was in Layout and should have been in Modeling. Not something mentioned in the video, you just have to catch it as it shows that's the active tab.
Edit 2: Yep. That was it. Now to get my animation following a path with deforming...but that is another topic. ;)

You've set your Tranform Pivot Point to the 3D Cursor, I guess it's your problem, switch to Median Point for example:


Issues with manual culling, using BMesh I have a camera and a monkey (suzanne) in the scene. I'm attempting to manually cull the back faces from the monkey.

The problem is that certain faces get culled, despite its normal seen from the camera's view port.

The monkey in object mode.

The monkey after culling (using the function below).

I transform the monkey's vertices into world space, then transform the vertices to face the camera (camera's inverse matrix). This assumes the camera is at (0,0,0).

I'm using the internal renderer. Blender 2.78.

def cull_manual(camera_obj, object_obj):
    matrix = camera_obj.matrix_local.inverted() * object_obj.matrix_local

    delete_faces = []

    mesh = object_obj.data
    new_bmesh = bmesh.from_edit_mesh(mesh)

    for face in new_bmesh.faces:
        verts = [(matrix * bmvert.co) for bmvert in face.verts]
        a = (verts[1] - verts[0])
        b = (verts[2] - verts[0]) if (len(verts) == 3) else (verts[3] - verts[0])
        normal = a.cross(b).normalized()

        v = verts[0].normalized()

        visibility = (-v).dot(normal)
        if visibility <= 0.0:
            delete_faces.append(face)

    bmesh.ops.delete(new_bmesh, geom = delete_faces, context = 5)
    bmesh.update_edit_mesh(mesh)

camera_obj = find_obj(scene, "Camera.05")
object_obj = find_obj(scene, "Suzanne")
cull_manual(camera_obj, object_obj)

I devised a way to do it the opposite way, where I move the object to the origin, and move the camera by applying the object's inverse transform:

def cull_from_camera(camera_obj, object_obj):
    matrix = object_obj.matrix_world.inverted()
    camera_matrix = matrix * camera_obj.matrix_world
    location, _, _ = camera_matrix.decompose()
    from_camera = location.normalized()
    delete_faces = []
    mesh = object_obj.data
    new_bmesh = bmesh.new()
    new_bmesh.from_mesh(mesh)
    for face in new_bmesh.faces:
        visibility = from_camera.dot(face.normal)
        E = 1.0e-05
        R = -0.5 # HERE
        if visibility <= (R + E):
            delete_faces.append(face)
    bmesh.ops.delete(new_bmesh, geom = delete_faces, context = 5)
    new_bmesh.to_mesh(mesh)
    mesh.update()

It works, but there are still some aggressive culling happening, unless I change the visibility check from 0.0 to -0.5.

I can't think of a way to truly cull only the faces that are not visible to the camera.

I have tried two implementations, and I wasn't too satisfied. I should say that the second implementation is definitely the better of the two since I need to simply cull faces that block the camera (think camera outside facing a wall of a room).

The most accurate seems to be in NDC space. For every face, project each vertex, transform to NDC space, then construct a normal from the 2D triangle for that ace. If the z component of the normal is negative, cull face.

The important bit here is that we do not clip in either clip or NDC space. Clipping is necessary when vertices are behind the camera (in homogeneous coordinates, w ≤ 0). The result is the vertex being "mirrored" in front of the camera, resulting in normals flipping! So we take a shortcut, forget clipping altogether, and simply move the vertices as close to w as possible (1.0e-05).

projection_matrix = camera_obj.calc_matrix_camera(scene.render.resolution_x,
                                                  scene.render.resolution_y,
                                                  scene.render.pixel_aspect_x,
                                                  scene.render.pixel_aspect_y)
project_matrix = projection_matrix * (camera_obj.matrix_world.inverted() * (object_obj.matrix_world))
delete_faces = []
mesh = object_obj.data
new_bmesh = bmesh.new()
new_bmesh.from_mesh(mesh)
for face in new_bmesh.faces:
    face_ndc = []
    for vert in face.verts:
        # Project point
        pvert_4d = project_matrix * vert.co.to_4d()
        # Perspective divide; transform to viewport space (NDC).

        # We need to consider the case where where w < 0.
        # For each 4D vertex, if w < 0, the vertex will be
        # flipped when performing the perspective divide,
        # resulting in the normal being flipped.

        # We could do go through and implement clipping using
        # the Liang-Barsky line clipping algorithm, but we only
        # care about backface culling. Clamping w to 0.0 (close
        # to) does result in distorting the triangle, but the
        # normal will remain the same as the normal's magnitude
        # is proportional to the area of the triangle, but
        # independent of the direction of the normal.
        w = 1.0e-05 if (pvert_4d.w < 0.0) else pvert_4d.w
        ndc_vert = pvert_4d / w
        face_ndc.append(ndc_vert)
    # Calculate the normal
    z = calc_normal(face_ndc)
    if z < 0.0:
        delete_faces.append(face)
bmesh.ops.delete(new_bmesh, geom = delete_faces, context = 5)
new_bmesh.to_mesh(mesh)
mesh.update()


Blender is Crashing Finding Missing FIles I am trying to relink some Kitbash3D models to their textures. Using "External Data/Find Missing Files" is reliably crashing Blender release (2.82a) and the beta (2.83) every time. The models are large-ish - all the textures together are 1.2 Gb and the blend file is 220 Mb. But I have deleted half of them, and I have a decent system - 16Gb of RAM Ryzen processor, RTX2060 Super. I'm using Linux....I do have a PC (128 Gb RAM) and a Mac...I'll give that go.

Can anyone suggest a work around or point to what the problem could be?

I have the same issue, possibly with the exact same models - I downloaded a couple of the free minikits they had and it crashes whenever I try to find the missing files.
Overall, to fix it I am deleting all the groups except one of them, then saving that group to a separate file and doing the find textures fix. It manages one group at a time with no issue.
I also ran the "report missing textures" then opened the console and saw that KitBash defaulted their texture directory to K:\KB3D\KB3DTextures, so another workaround would be to map a network drive as K: then recreate that directory structure and copy the textures there (this would be the quickest fix but also means you have to map the drive to use them). I am new to Blender, so I am not sure, but there may then be a way to move the textures to the correct directory after doing this. If there is, please let me know :)


Dynamic Paint - "Use Object material" for Brush removed in Blender 2.8? Blender 2.79 has the option to use the material color as the brush.
Did 2.8 remove this option? Has it something to do with Blenders internal render getting removed or what's the reason?
My goal is to transfer vertex colors from one object to another, where their volumes overlap.
Transfer mesh data->Vertex Colors didn't work as cleanly as I had hoped, no matter which face corner mapping I chose.
Dynamic paint does what I want, but I can only select one color per brush object with ["Dynamic Paint"].brush_settings.paint_color

In the end I didn't use the material color, but used a small script to assign the vertex color of each object to the brush color of a dynmaic paint modifier. (Use Strg+L to link modifier to all objects)
for obj in bpy.context.collection: #use active collection
    obj_col = list(obj.data.vertex_colors['Col'].data[0].color)[:3]
    obj.modifiers['Dynamic Paint'].brush_settings.paint_color = obj_col


Deformation of particle objects When an object is added to particle system, it remains in original form. Is it possible to make so that these objects deform & wrap around mesh?

The closest I can get:

Make sure the particle object is a plane and has a good amount of subdivisions

Name it with a unique name, like 'stick'
Make a duplicate of Suzanne, remove the ParticleSystem from it (this is if you want to have the Subsurf modifier eventually on for Suzanne)
Apply the Subsurf modifier of the temporary particle-Suzanne, which leaves only the ParticleSystem to the modifier panel
(You may need to update the ParticleSystem by clicking the 'Seed' value to 1, for example)
Click the 'Convert' button in the ParticleSystem modifier

A whole lot of stick objects are created to the scene
Delete the particle-Suzanne
In Outliner, search for 'stick.'
Still in Outliner, select them all with A, then right-click one of them and click 'Select'
Press U to make them unique, select 'Object & Data'
Press Ctrl+J to join them as one
Add 'Shrinkwrap' and 'Solidify' modifiers to it

Maybe also 'Subsurf' modifier as well
There you have it

Hope this helps!


Join two parts of object faces to match shadow What do i have to do to join highlighted group of faces with others, so shadow will be the same when joined. All faces are already part of same object (Joined them via Ctrl + J). I tried merging them and bridging them but without correct effect. Also i selected both edges and filled missing spaces (F), but shadow didn't correct. Both groups are completly together.

Try set shading flat and set it back to smooth.


Why are there rectangle shaped glitches when using motion blur problem in Cycles? I'm creating an animation for a client and am getting rectangle shaped glitches in my renders when motion blur is on.

I've tried fiddling with various settings to no avail.
Any suggestions ( not using motion blur is not an answer BTW! )

This is a bug, not a settings issue or user error. Go ahead and report it in the bugtracker. (Though it's probably been fixed since 2.75)


Fluid simulation only shows the domain I was making a fluid simulation, but when I try to bake it, it only bakes the domain. The fluid doesn't appear from the inflow. Do you know why? Thanks.

This is what appears when i render

This is definitely because of the time settings. Setting it to a frame value will make it think that the simulation happens 179 seconds after the start of the animation. What's this? Like frame 600? Change it to a small value that compensates with your animation time (in seconds), and your problem should be solved. You may even want to check the animation timeline 179 seconds later, and you will probably see your fluid.


Specific view difference between 2.79 and 2.8 I downloaded a .blend file that is a model of an eyeball.  When I first load it up in 2.79, right when it opens, before I do anything to it, it looks like this:

When I open the exact same file in 2.8, again before I touch it at all, it looks like this:

I figured it had something to do with the "method to display/shade objects in the 3d view" selection, but for instance I can put both 2.79 and 2.8 on "rendered" and the 2.79 eye will look fine, 2.8 will look weird.

The blend file is here if you'd like to mess with it: https://drive.google.com/open?id=1mdDOiJLUsz_H5Lsq2eK7vZLwRKuM2ak4

I'm sorry if this is an obvious question.

You are using the Blender Internal rendering engine, which doesn't exist in 2.80. Therefore the viewport in 2.80 can't render any of the materials you gave the object. In order to render it in 2.80 you have to convert the materials to cycles/eevee materials (both of which are essentially congruent, so there is no difference).


Cycles compute device for rendering is GPU but actually CPU get's used I'm trying to render with gpu in cycles render but, even tho looking at the settings it seems like everything should be fine , actually looking at cpu and gpu usage i noticed that the one actually being used for rendering was still the cpu.

my cpu model is Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz

my gpu model is GeForce GTX 1080

my CUDA version is 8.0.61

can someone help me figure out why is this happening?
thank you :)

solved it.. in the end looks like there were some leftovers from older versions of the nvidia drivers that were causing conflict because i wiped clean the pc and reinstalled the drivers and now gpu rendering works as it should.


Blender running very slow Blender is running extremely slow for me. I am just in the edit mode in the 3D-Viewport and just moving a few vertices takes like 4-5 seconds. I am working on very simple models and when I look at the performance in my task manager my GPU stay under 10%, my CPU is around 20% and I am using around 30% of my memory.
The same project ran fine just yesterday.

What I have tried:
- Restart Blender
- Restart PC
- Check for updates of basically everything
- Activate CUDA

Running:
v2.79
gtx970m
i7-4710HQ
16 GB

Do you have any modifiers on your project? If so try hit the little eye icon, so you cant "see" it. It will still be rendered, but your pc wont have to work so hard while you are still working on your project.


Maya like pivot alignment Maya allows for fast and accurate placement of the pivot using the D key does Blender have the same?

Functionally this is similar to seting the pivot to the 3d cursor however I'm unsure of how to accurately place the 3d cursor without; Entering Edit mode, Selecting what I want, Shift > S Cursor to Selected, Entering Object Mode. Adjusting the pivot point works well like this for rotating but not so much for movement as the 3d cursor won't stay anchored when the object is moved away from it, meaning you need to repeat the process to realign the 3d cursor accurately.

Mayas method is so fast and convenient that there has to be way automate all those steps to replicate it or someone must have made an addon that does this already.

As you already noticed, the 3d Cursor is your friend.

Either click LMB  anywhere in the viewport or set its xyz location values directly (Transform Panel N > 3D Cursor). Object Mode or Edit Mode doesn't matter so you've got the control you need. When done, open up the Toolshelf T, go to Tools > Set Orgin and select 'Origin to 3D Cursor' (in Object Mode) or use  ShiftCtrlAltC shortcut for that.

Also see: Precisely move the 3D cursor?


How can I assign an action to an armature using Animation Nodes Animation nodes took a while to get the hang of it, but it is truly amazing.
I've been following the example below, but rather than modify an existing action, I'd like to assign a random action to each of the duplicated armatures. The scene currently has 5 actions (ArmatureAction.000, ArmatureAction.001, ArmatureAction.002 etc.)

I just can't work out how to firstly assign an action to an object using AN, and secondly how to randomly assign one of the 5 actions to each of the armature duplicates.

https://www.youtube.com/watch?v=q9unQC3PTcI&feature=youtu.be

File on Dropbox - 800K

Yes you can do it. But the main problem with your node setup is  that your using the second Object Attribute Output in wrong way. You haven´t passed any value to node. Therefore no paremeter can be assigned.


move manipulator not working So i have been working on model but my move manipulator is working when i enter object mode the two other manipulators are working fine.

But when i create a new mesh its there it also appears when i go into edit mode but not object mode.

One of the few reasons why your translation widgets are missing might be that the location of your destroyer is locked. Sadly your screenshot has the properties (N ) closed, so I can only guess. If the little locks are dark, then that's very likely the reason.


Is there any way to replicate "Aura Glow" reflective dispersion/iridescence glass effect in Cycles? I'm currently working on a model for Samsung Galaxy Note10+, with one of the colors used on the phone is "Aura Glow" that is a very reflective glass that reflects  light (a la CD/DVDs):

However, I couldn't get the effect working as intended in Cycles, Blender 2.90.

Using the RGB Glass BSDF method shows the result correctly in Material Preview/Eevee, but appears transparent in Cycles render (note that the front of the phone appears as "see through"). Mixing with Principled BSDF didn't help much.

Using Anisotropic rainbow ramp method only gives out a solid red finish.

I can't seem to find any other method that actually reflects like what I intended to, so I'd like anyone to help me on giving a reflective glass like that GIF above.

Turns out that this method actually do work, but for my use, a bit of tweaking has to be done to make it look like the actual phone:


Can "Toggle Quad view" remember the viewpoint? When I click twice on Toggle Quad View, it let me with an ortho-view instead of the previous 3D view, forcing me to find the viewpoint I had previously again. Is there an option to remember the viewpoint? Hitting Numpad 0 to toggle between current viewpoint and camera view works.

When toggling off by pressing button, it will switch to the Front ortho view by default. But you can hover the mouse cursor over one of the four views, then use shortcut CtrlAltQ to toggle off while switching to that particular view.


My Low poly becomes smooth I'm follow a tutorial to create a low poly environment.  So I have to make mountains... I go to Sculpt Mode and activate Dyntopo [ resolution : 7.00 / Refine method : Subditive Collapse / Detailling : Constant Detail] and when i try to do a picks It becomes smooth.

Dynamic topology has an option to enable smooth shading, enabling this turns on smooth shading for the entire mesh.


Area too thick with Subdiv I'm working on a dragon, building the base in Blender, and adding the details and textures with Mudbox. One issue I'm having though is the "hands" are is much larger and than it should be with the subdiv applied.

Is there any way I can fix this without applying the modifier and editing it by hand?

Edit:
Wireframe images

In Edit mode, you can use the cut tool (K) with cut through (Z) to add a small loop around the center of the hand, like this :

After adding the loop, the center of the hand is no longer large (on the bottom, the hand with the loop cut and on the top a mirrored hand without a loop cut :


Why does blender crash when my missile disapears in the BGE? In the following scene, I have a camera parented to a missile. When the missile collides with any collision mesh, it disappears. The logic setup is pictured below.

However, when the missile disappears, blender crashes.
Why does this happen and how can I fix this?

This happens because the camera is parented to the missile. When the missile disappears, so does the camera. When the camera disappears, there is no longer anything sending the output to the display. This creates the problem, because blender can't update the display, and Blender crashes. You can fix this by having a scene actuator to set the camera to a different one. Then there will still be something sending output to the display. Logic setup below.


How do you use Blender to make Pokemon attacks like hyper beam and solar beam? I can't figure out how to use Blender to make beam moves, like an energy beam. Any tutorials or advice?

From the Title:

Solar beam

Hyper beam

Never tried to create any effect like that, but it is possible that particles are not the most effective way to simulate those beams.

Have you tried looking into create "Plasma Wave" effects like these using geometry instead? Like Abstract Waves or Plasma Waves or any other

Perhaps actually modeling it with geometry might be easier. Adding some effects over it, like added particles, volumetric materials, or even in post production, like glow and blur may improve the final aspect.


highlighting the edge created by overlaping meshes id like to highlight the edge, created by a plane while moving through an 3d funktion. I cant figure out, how i could create an special material for this line or create an Spline wich i could bevel. Im a bit stuck.

any ideas? thx

Extrude the plane, it needs to be manifold.

Add a boolean modifier to it with the Function object as the object.

Group the plane object, enable Freestyle on the Group with border rendering.


change particle color on interval I am learning blender and I would like to simulate a particle system. I have successfully done that with single colored particles. I am not sure how to change the color of the particles in equal interval. For ex, I want the particles to start with red color and after few frames change to green color and then back to red and vice versa for the entire lifetime.
I am not sure of what nodes to play with. Some help is much appreciated.

If you want the change to be frame dependent, as opposed to lifetime dependent, I would suggest using a Value node with #frame written as it's input (makes value = current frame at any point), and then using some math to get the correct interval for your needs. Use this as a material for the object you're instancing as a particle.
In the example below, I took the time that the Sine of the frame number is greater than 0.5 (half the time) and used that as a mix factor for a MixRGB with the two colors. This gives particles that alternate between red and green every other frame. You can also use a ColorRamp if you want more control/multiple colors.

Lastly, this works in both Cycles and EEVEE.


Is there any way to fix outline object from others game? I took an asset from game Roblox and in game, an outline hat look like this
But in Blender, it look like this
I don't know how to fix it

The closest way I can think of is to use freestyle shading.  In the render tab, turn on freestyle.  You can then tweak the freestyle settings to make it look as similar as possible.  The settings I found useful are to set freestyle line set to visibility and edge types.  Select logical AND and only check silhouette.  Under freestyle line style, turn the thickness really high up and under texture, turn on use nodes and open textures properties.  Load the texture from the game.  From there you'll have to play with the settings, especially the vector.  One last note, you have to render the image every time you want to see a change because it is just post process.  Also, set the material for the object as pure black and zing, you got something similar.


Color node losing shade I was testing stuff with render, render layers,scenes, world and cycle rendering.  Suddenly my colornodes lost its shading.  I went through I couldnt get it back.

Is there any way for me to restore normal coloring and matarial setting?

Most likely you have accidentally put the HSV node to a value that blows out the resulting pixel values. See this screenshot here to understand which value I mean:

In your case, you have set this to 2.0. This will likely send so much light energy down the line that the resulting pixels will overshoot the 1.0 range, thus being clipped to white. I've done this in the screenshot below:

Lower that input value of the HSV node to something reasonable (between 0.0 and 1.0) and see if this resolves the issue.


How to check if a PointerProperty has a value? I've written a script that contains a bpy.props.PointerProperty which the user can set to an Object.  I'm having trouble finding any examples on how to access the contents of this property.  How do I check that it has been assigned a value before trying to use it as a bpy.types.Object?

Value is None if not set.
The value of a pointer property pointing to an ID object, ie one that  is not defined with a type derived from a PropertyGroup  is None if not assigned.
>>> bpy.types.Object.foo = bpy.props.PointerProperty(type=bpy.types.Object)
>>> issubclass(bpy.types.Object, bpy.types.ID)
True

>>> C.object
bpy.data.objects['Text']

>>> C.object.bl_rna.properties['foo'].fixed_type
<bpy_struct, Struct("Object") at 0x5b41620>

>>> C.object.foo is None
True

>>> C.object.foo = C.object
>>> C.object.foo
bpy.data.objects['Text']


Applying a curve modifier to an extruded plane causes plane to become a line Surely this is some setting that is wrong, but what?? I trying to bend an extruded plane using the curve modifier, but as soon as I select the bezier curve in the modifier, I lose all dimensions of the plane!  Top down ortho of plane & bezier curve before modifier

There was a scaling problem (even though I applied scaling & rotation) but I couldn't find the Transform > Radius that Ramos described. I found that if I zoomed in far enough, what I thought was a line was the horribly deformed extruded plane. I tried numerous re-scaling of both the plane & the curve, and with the hint that Mr Zak supplied, went to the Bezier curve's shape properties, and unchecked 'radius' (path/curve deform) and set Minimum's Smooth (Twisting) value from 0 to 6.00. Mostly by luck(?) I got the desired results. Mission accomplished! Thanks all.


bpy.ops.object.align( align_mode='OPT_4' ) throws: keyword "align_mode" unrecognized I'm not sure how to correctly specify what is written in the blender API documentation.   I'm coding:
bpy.ops.object.align( align_mode='OPT_4' )

but get the console error message:
TypeError: Converting py args to operator properties: : keyword "align_mode" unrecognized

The API documentation explains the "align_mode":
bpy.ops.object.align(bb_quality=True, align_mode='OPT_2', relative_to='OPT_4', align_axis={})

Align objects

Parameters
        bb_quality (boolean, (optional)) – High Quality, Enables high quality calculation of the bounding box for perfect results on complex shape meshes with rotation/scale (Slow)

        align_mode (enum in ['OPT_1', 'OPT_2', 'OPT_3'], (optional)) – Align Mode, Side of object to use for alignment

        relative_to (enum in ['OPT_1', 'OPT_2', 'OPT_3', 'OPT_4'], (optional)) –

        Relative To, Reference location to align to

            OPT_1 Scene Origin, Use the scene origin as the position for the selected objects to align to.

            OPT_2 3D Cursor, Use the 3D cursor as the position for the selected objects to align to.

            OPT_3 Selection, Use the selected objects as the position for the selected objects to align to.

            OPT_4 Active, Use the active object as the position for the selected objects to align to.

        align_axis (enum set in {'X', 'Y', 'Z'}, (optional)) – Align, Align to axis

My script (for context):
import bpy

## replace imported Mesh Text (selected) with real (editable) Text aligned to old that gets deleted
oldObjects = bpy.context.selected_objects
bpy.ops.object.select_all( action='DESELECT' ) # Deselect all objects

for oldObj in oldObjects:
    bpy.ops.object.select_all( action='DESELECT' ) # Deselect all objects
    bpy.ops.object.text_add(enter_editmode=False, align='WORLD', location=oldObj.location, scale=(1, 1, 1))

    # Delete last 4 letters from template "Text" to leave a single Letter "T"
    bpy.ops.object.editmode_toggle()
    bpy.ops.font.delete(type='PREVIOUS_OR_SELECTION')
    bpy.ops.font.delete(type='PREVIOUS_OR_SELECTION')
    bpy.ops.font.delete(type='PREVIOUS_OR_SELECTION')
    bpy.ops.object.editmode_toggle()

    # align new letter to old mesh
    print( oldObj.name + str( oldObj.location ) )
    oldObj.select_set(True)
    bpy.ops.object.align( align_mode='OPT_4' )

    # delete oldObj
    bpy.ops.object.select_all( action='DESELECT' ) # Deselect all objects
    oldObj.select_set(True)
    bpy.ops.object.delete()

and yes I know I could replace the align() with:
bpy.ops.object.text_add(enter_editmode=False, align='WORLD', location=oldObj.location, rotation=oldObj.rotation_euler )

but I want to understand better how understand blender API documentation.

To track down the cause of  the error shown :.

Could be a version issue, the docs linked are for current,  matching
those available circa 2.91

If you are using an older version, consult the appropriate version
docs, or consult the python console.
 >>> bpy.ops.object.align(

 align()
 bpy.ops.object.align(
         bb_quality=True,
         align_mode='OPT_2',
         relative_to='OPT_4',
         align_axis=set()
         )
 Align Objects

and to quickly see the valid values of any argument, crunch in an invalid one as shown above with align_mode='FOO'.
>>> bpy.ops.object.align(align_mode='OPT_4')
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/home/batfinger/blender/vers/blender-2.91.2-linux64/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties:  enum "FOO" not found in ('OPT_1', 'OPT_2', 'OPT_3')

    >>> bpy.ops.object.align(align_mode='OPT_4')
    Traceback (most recent call last):
      File "<blender_console>", line 1, in <module>
  File "/home/batfinger/blender/vers/blender-2.91.2-linux64/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties:  enum "OPT_4" not found in ('OPT_1', 'OPT_2', 'OPT_3')

It could be the case some addon you have enabled has overridden the
default operator.

As displayed above this will be evident by typing
bpy.ops.object.align( to autocomplete, into python console to
display the operator docstring

With API calls (ie no operators).
As is the case for most operators can be replaced with API calls.
eg Here I've simply placed a text object, each sharing the data (single letter "T") at global location of each of the selected objects, before removing.  Changing transform  based on whatever the desired align operator properties would be little to no hassle.
import bpy
from bpy import context
# font
font = bpy.data.curves.new("Foo", 'FONT')
font.body = "T"

for ob in context.selected_objects:
    text = bpy.data.objects.new("Text", font)
    text.matrix_world = ob.matrix_world
    context.collection.objects.link(text)
    bpy.data.objects.remove(ob)


Simulate sound waves (physics)? Can Blender be used to simulate the transmission of sound waves through a medium (most likely air)? What kind of additional scripting, if any, would be needed to actually render the collisions as sound?
(Has anyone ever constructed a functional acoustic musical instrument using Blender?)

Can Blender be used to simulate the transmission of sound waves
  through a medium (most likely air)?

No, blender is designed to create images and animations (including soft and rigid body physics) which may include sounds, having that said blender copes with light not with audio.

The only support for audio (besides playback) I'm aware is to bake the amplitude (volume) of a distinct frequency range to an f-curve.

These f-curves could be used to animate an object in an animation like the vibrations of strings, or to visualize sounds like a spectrum analyzer does (scaling boxes).

Tutorial here

IMHO The best would be to play around with these possibities and evaluate the options provided and in case blender is still a candidate (for your project) too ask a more specific question.


Display connected vertices in UV editor? Is there any way to show other vertices attached to the current activated vertex in the uv editor without enabling "sticking selection mode"?

Press the letter L with your mouse over some vertex.

L

Sometimes with a current selection

CTRL-L


EEVEE how to disable background light I‘m currently having an issue. I want to disable the background light so that objects won‘t be influenced by it. In Cycles this is easy: inside the „Ray Visibility“ option of the world tab you just disable everything except „Camera“ and the background will immediately stop casting light into the scene. However I don‘t know how this should be done in EEVEE. Any help is much appreciated. Thanks.

Add a Light path node to World shader, then connect "Is Camera Ray" to the strength input of the Background node.


Semi-transparent lightning image rendering incorrectly Hi, not sure what to do, I have spent days on this. I am trying to get the image to appear as lightning, not just a blob.

The left image is what I what to show up, and the right image is what renders.

Your Less Than node is looking for values below .9, and so is picking up the subtle glare around the lighting in your image.

Perhaps you meant to set it to Greater Than?


Blender 2.8 Material colors bleeding through faces in render I apply simple materials with color to an object. The object has some duplicate faces behind the outermost face and the colors just seems to blend and get weird in render. I cannot bake the image properly. How can I make it so their is no bleed through and the faces look like material preview?

From what I can see from the screenshot, it looks like you've duplicated the faces and left them in the same place as the source face you duplicated it from.

This will cause problems because the renderer wont know which one is on top of the other - and so you end up with all those jaggy artefacts where it's kind of struggling with which one should be rendered over the other.

Quick solve to that is to just move the black faces out - can be by the smallest amount, just so they don't occupy exactly the same coordinates.

But, if the aim was to make those faces black, then duplicating the faces on top isn't the best method.

So I presume you have that mesh with one 'red' material ye?
Add a new material slot, create a black material in that, then go to edit mode of the mesh (if it's all one mesh) and select the face you want black, then 'assign' the black material to that face. (obviously get rid of your duplicate faces too)

If that's not the case, and the mesh just has duplicate faces, then you need to do some cleaning and remove the duplicate faces, merge vertices etc.


Rigging. Should bones be connected to one big mesh or to many meshes? I'm making a Golem animation of the rocks swirling together to form the Golem, but should I connect the bones to one big mesh or to many meshes, one for each rock?

This is a matter of personal preference.

If the animation is generated procedurally, it is probably more efficient to make the rocks separate objects. Updating the single transformation of an object is much faster and less memory intense than manipulating a large number of vertices at once.

If the animation animated manually, then there is barely any difference. In Blender, the rig should mainly consist of an armature in which bones control the objects. The individual rocks can patented to the armatures bones or bound to them with a deforming armature modifier. Using the latter, there is no difference between a single or many objects (each with their own armature modifier). The animator is only supposed to interact wuth bones, the objects (less alone individual vertex groups) should be tucked away, so they don't get in the way while animating. The speed difference between a single armature modifier one one object with many vertex groups over many armature modifiers is neglible. Single objects parented to individual bones will have a slight speed advantage in case of a large number of rocks.


Cycles Render Engine on but still no Surface Option I am having a problem. I am following a tutorial for a Minecraft animation in blender but the person wanted to change the sky color so he used the surface tab to do so once background was enabled.

I enabled mine but no surface option to change the background.

I looked around saw that you needed cycles render on but I already had it enabled.

You will find the surface option in the "world" tab.


How to make a lightspeed scene I am trying to create a lightspeed scene just like this.

I have tried using particle systems with motion blur, but i could never get it to look right. Let me know if you have any ideas.

SOLUTION 1 POST PRO - Compositor/Directional blur

I started with a cube filled with static particles, all using an icosphere as the rendered object. Then I set up a Directional Blur node to animate the streak from the rendered image.

I also added some glare nodes to enhance the streaks as they get a bit transparent when distorted. I would render any spaceship interior on another layer so i could separate the zoom effect.

SOLUTION 2 POST PRO - Compositor/vector blur

You can use Vector Blur in the compositor.
I have made a larger volume of stars with an array of the initial cube. Then I fly the camera quite fast through it.
In the compositor I use a Vector node with a high number of samples (256).
In this way I can animate the streaks by moving the camera.

SOLUTION 3 POST PRO - In camera/Compositor

Use the moving camera again but this time turn on the actual motion blur feature in Cycles on the scene properties panel.
To emphasize the streak I have animated the size of the particle object (icosphere) as the camera speeds up.

I have added a second layer to render the cockpit image, which is parented to the camera location.

I used the compositor to place the cockpit over the star image. I found that if the cockpit object was in the star layer, the particles would streak inside the cabin. Notice that the cockpit layer only has an object with an Emission material so i have turned the sample rate down to 1. This renders very fast.

SOLUTION 4 POST PRO - In camera/Particle hair

In this example I have used particle hair and animated the length via the Path end value. At the same time I am animating the position of the camera (with cockpit object).

Here you can see the array of planes with a hole in the middle for the camera to fly down.

In this frame is the rendered view and the display view showing the hair increasing in length.


Paint is going through mask Is there a way to prevent the paint going through the selected mask?

not really. In wheight paint mode you are a assigning wheights to the vertecies of the mesh. what you see between the vertecies is only colored based on the vertecies around it. so if you have a base mesh with not that much geometry and you have a vertex an you have one in the mask and one outside, blender cant do better that  to make a gradient between them.
hte only way to make that effect less pronouced is to give the wheight paint more vertecies to work with.
If its crucial that you have a sharp edge you could copy it ad apply the subsurf modifier i assume you use. Or dependant on your use cas you could also switch to a texture map instead.


how can i add backgrounds and animate them in blender 2.80 2d animation? Im making a 2d animation and added a background but the background doesn't appear in the render and neither in the frames.

If you added it in as a reference image, that might be problem. Try adding a plane in the back and add the background on that. You can do that in the material options.


How to rotate an object in Blender 2.74 using python script I wanna rotate an object with this code below:

import bpy
from math import *
import mathutils

Name = 'Dimi'
me = bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)
scj = bpy.context.scene
me1 = bpy.context.object.data
ob = bpy.data.objects.new(Name, me1)
scj.objects.link(ob)
for ob in scj.objects:
    ob.location.x += 4
    ob.location.y += 0
    ob.location.z += 0

me.transform(ob.matrix)
ob.RotY = 0
ob.RotX = 0

But this function

me.transform(ob.matrix)
ob.RotY = 0
ob.RotX = 0

is from blender 2.49 and can't find how to do this in a 2.74 version.

import bpy
from math import *  # It's considered bad practice to import everything from a library, especially when you're not using any (or just a few) of its function
import mathutils

Name = 'Dimi'

# The primitive_cylinder_add does not return the object, but rather only a status indicating success or failure
exitStatus = bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)
scj = bpy.context.scene

# The added cylinder will be the active object afterits created
ob = bpy.context.object
me = ob.data
ob.name = Name

# These two lines are unnecessary and will generate another copy of your cylinder
#ob = bpy.data.objects.new(Name, me1)
#scj.objects.link(ob)

# If you want to move your object, simply set its location thus:
ob.location = ( 4, 0, 0 )

# And you can rotate the object the same way
ob.rotation_euler = (0,0,0)  # Note that you need to use radians rather than angles here


Unable to view double bonds from PDB file Firstly, let me say that I am an organic chemistry graduate student and have very minimal experience with Blender itself. I am trying to use the atomic blender add on to make the molecules I have made in our computational software 3D printable.

However, currently I am experiencing trouble viewing the double bonds of any pdb file I import. I am exporting the file from Spartan Student. It is of pentafluorobenzene. The pdb file reads as such:

HEADER
REMARK Spartan Student v7 exported M0001
HETATM    1  H   UNK  0001       0.000   2.004  -4.575
HETATM    2  C   UNK  0001       0.000   2.004  -3.479
HETATM    3  C   UNK  0001       0.000   2.004  -0.707
HETATM    4  C   UNK  0001       0.000   0.804  -2.786
HETATM    5  C   UNK  0001       0.000   3.205  -2.786
HETATM    6  C   UNK  0001       0.000   3.205  -1.400
HETATM    7  C   UNK  0001       0.000   0.804  -1.400
HETATM    8  F   UNK  0001       0.000  -0.394  -3.478
HETATM    9  F   UNK  0001       0.000  -0.394  -0.708
HETATM   10  F   UNK  0001       0.000   2.004   0.676
HETATM   11  F   UNK  0001       0.000   4.402  -0.708
HETATM   12  F   UNK  0001       0.000   4.402  -3.478
CONECT    1    2
CONECT    2    1    5    4
CONECT    3    6    7   10
CONECT    4    7    2    8
CONECT    5    2    6   12
CONECT    6    5    3   11
CONECT    7    3    4    9
CONECT    8    4
CONECT    9    7
CONECT   10    3
CONECT   11    6
CONECT   12    5
END

The structure opens fine, no errors appear. The bond box is checked. Everything is bonded as it should be EXCEPT I cannot see any double bonds. All of the bonds are represented by one stick, regardless of whether they are actually double bonds or single bonds.

Can anyone propose a solution to fix this? Thank you in advance.

PDB doesnt support bond types  , check here https://discuss.avogadro.cc/t/pdb-file-format-and-double-bonds/2293
but you can edit the pdb file in a notepad like so :https://youtu.be/YNoow7qkwFA?t=364


How do I Create a script for geometry I create? I was wondering, is there a possible way of selecting an object I create in blender and generating python code from it, so I am able to generate the object via code?

I was wanting to do this for creating my own primitives.

With the help of the Rigify add-on, this can be achieved. Enable Rigify in the User Preferences -> add-ons section like usual. Then go to Edit Mode and locate the button Encode Mesh Widget to Python to generate the script. The script itself will be put into a Text called widget.py and wrapped into a nice Python function already.

See this little GIF for better (visual) explanation:

From the generated code you can extract the Vertex coordinates, Edge and Face indicies. The rest has to be adapted to your needs. Also take care about indentation levels and Tabs vs. Spaces, the script that Rigify generates uses Spaces for indentation, regardless of what you set as Blenders default. Here is a refactored code example:

import bpy

def create_thing_widget(_name, size):

    # -----------------------------------------------------------------------
    # these are the vertices, edges and faces that the rigify addon generates
    # copy and paste your ones over, and make sure to reduce the indentation
    # if you are using Tabs instead of Spaces, also check on that, Rigify
    # generates spaces for indentation by default
    verts = [(-0.10000000149011612*size, -0.10000000149011612*size, -0.10000000149011612*size), (-0.10000000149011612*size, -0.10000000149011612*size, 0.10000000149011612*size), (-0.10000000149011612*size, 0.10000000149011612*size, -0.10000000149011612*size), (-0.10000000149011612*size, 0.10000000149011612*size, 0.10000000149011612*size), (0.10000000149011612*size, -0.10000000149011612*size, -0.10000000149011612*size), (0.10000000149011612*size, -0.10000000149011612*size, 0.10000000149011612*size), (0.10000000149011612*size, 0.10000000149011612*size, -0.10000000149011612*size), (0.10000000149011612*size, 0.10000000149011612*size, 0.10000000149011612*size), ]
    edges = [(2, 0), (0, 1), (1, 3), (3, 2), (6, 2), (3, 7), (7, 6), (4, 6), (7, 5), (5, 4), (0, 4), (5, 1), ]
    faces = [(0, 1, 3, 2, ), (2, 3, 7, 6, ), (6, 7, 5, 4, ), (4, 5, 1, 0, ), (2, 6, 4, 0, ), (7, 3, 1, 5, ), ]
    # -----------------------------------------------------------------------

    # the rest keep like in this example
    # here the mesh data is constructed
    mesh = bpy.data.meshes.new(_name)
    mesh.from_pydata(verts, edges, faces)
    mesh.update()
    mesh.update()

    # now generate an object to hold this data
    obj = bpy.data.objects.new(_name, mesh)

    # link the object to the scene (it is not visible so far!)
    bpy.context.scene.objects.link(obj)
    bpy.context.scene.update()

    # return the object to the function caller for further stuff
    return obj

# call the function
new_mesh = create_thing_widget('test', 1)


What is the fastest way to create a curved plane? For a background, a lot of times I need a vertical wall, horizontal bottom, and a nice connecting curved surface between them in front of the camera. So far, I have used two methods:

Deform a plane along the curve. This takes some time to get it right, as curve deformations are tricky, and it is almost impossible to make it truly horizontal or vertical.
Create a cube, add bevel, apply, remove unnecessary parts of the mesh. Bevel tends to have artifacts around the corners of the cube for large bevel values and number of segments (e.g 25% of the cube side length, 64 segments).

What do you use? Am I missing some basic technique?

I usually do it like this, it's the quickest I've been able to find.

Add a curve (I like to use paths because they are initialised as a straight line)

Change its shape around a bit

Convert it to a mesh Altc

Extrude (in edit mode, e)

Admire the beauty.


Create a tree of properties? My add-on acts upon a hierarchy of data (a tree). I am not sure how best to represent this hierarchy as properties to expose the data to the user.

For simplicity, let us define an example: say that each node of the tree has a "value" which for example purposes is a float. Each node also has zero, one, or many child nodes. As I understand it, properties must all be registered up front in register(), which is the problem -- I guess I need to register all the properties for all the children that could ever exist?

I have had good results with conditionally presenting UI elements in draw(), and so I thought that one approach could be to add an "isEnabled" flag to the node class and define the tree as having a certain maximum depth with each node having a maximum number of children. If in our example the maximum tree that we require has a max depth of 2 and max children of 5, we end up with 31 nodes: the root, the root's 5 children, and then each child has 5 children.

Then, for every node in the tree, for node.value and node.isEnabled register a property in register(). In draw, we can use the isEnabled flag to show or hide the children of a node, which kind of expands or collapses the tree.

Is there a cleaner way to map this kind of data to Blender properties?

Edit:
I learned about PropertyGroup, but as I expected it doesn't like circular references.

class MyNode(bpy.types.PropertyGroup):
    value = bpy.props.IntProperty(name="value", default=1, min=1, max=1000, description="")
    child1 = bpy.props.PointerProperty(type=MyNode)

results in:

NameError: name 'MyNode' is not defined

But I think you could define classes for each level:

      A              MyRoot
   ___|___
  /       \
  B       C          MyTrunk
  |       |
 / \     / \
D   E   F   G        MyLeaf

I think that MyRoot can have a bpy.props.CollectionProperty(type=MyTrunk) and MyTrunk each have a collection of MyLeaf and then in register(), on single PointerProperty could be registered of type MyRoot.

This is pretty clean, except that you need to define a class for each level of the hierarchy. Therefore the hierarchy must necessarily be short and the maximum depth limited in advance (by the number of classes you're willing to define).

Leverage the collection

Collections in 2.8 have a hierarchy, well at least a children collection.

Result of running test script

Can add custom properties to the collection.
Collections do not have a parent property, since they do not follow
the single parent rule.  Have added one.
Tagged the collection as "node" by adding an instance only custom
property node["node"]
Set the root node parent to scene collection for visibility sake,
similarly if the parent attribute is set to None

Test script.

import bpy
from bpy.props import FloatProperty, PointerProperty

# clean to test
for c in bpy.data.collections:
    if "node" in c.keys():
        bpy.data.collections.remove(c)

def link_children(self, context):
    if self.parent == self:
        self.parent = None
    if self.parent:
        print(self.name in self.parent.children)
        if self.name not in self.parent.children:
            self.parent.children.link(self)
    else:
        self.parent = context.scene.collection

    mynodes = [n for n in bpy.data.collections if "node" in n.keys()]
    for n in mynodes:

        for c in n.children:
            if c.parent is not n:
                n.children.unlink(c)
        # TODO remove any "dead roots" in scene collection
    return None

float_prop = FloatProperty()
bpy.types.Collection.float_prop = float_prop
bpy.types.Collection.parent = PointerProperty(type=bpy.types.Collection, update=link_children)

def mynode(name, scene=bpy.context.scene):
    node = bpy.data.collections.new(name)
    node["node"] = True
    return node

scene = bpy.context.scene
my_root = mynode("My Root")
my_root.parent = scene.collection
my_root.float_prop = 1

for i in range(2):
    my_trunk = mynode(f"My Trunk {i}")
    my_trunk.float_prop = 2
    my_trunk.parent = my_root
    for j in range(2):
        my_leaf = mynode(f"My Leaf {i}.{j}")
        my_leaf.float_prop = 3
        my_leaf.parent = my_trunk

def draw_node(self, context):
    col = context.collection
    if col and "node" in col.keys():
        layout.prop(col, "float_prop")

Drawing in the UI.

Unfortunately the outliner doesn't currently have a way to display properties.  Can draw in UI with something like this, here I've used the context.collection and if it is a "node" display the float property

def draw_node(self, context):
    col = context.collection
    if col and "node" in col.keys():
        layout.prop(col, "float_prop")

Extending:

Using old fashioned properties, or getters setters with bpy.props can extend this to have what appears to be its own API, for example

Creating an API with a similar feel

from collections.abc import Mapping
import bpy

class MyTreeNodes(Mapping):
    @property
    def _storage(self):
        return {n.name : MyTreeItem(n) for n in bpy.data.collections if "node" in n.keys()}

    def new(self, name):
        node = bpy.data.collections.new(name)
        node["node"] = True
        node.parent = self.id_data.collection
        return MyTreeItem(node)

    def __init__(self,  scene, *args, **kw):
        self.id_data = scene
        self._liststorage = list()
        #self._storage = dict(*args, **kw)

    def __getitem__(self, key):
        if isinstance(key, int):
            return list(self._storage.values())[key]
        return self._storage[key]

    def __iter__(self):
        return iter(self._storage)

    def __len__(self):
        return len(self._storage)

class MyTreeItem(bpy.types.Collection):
    def insert(self, name):
        pass

    def __init__(self, coll):
        self.is_node = "node" in self.keys()

def getnodes(self):
    return MyTreeNodes(self.id_data)

class NodeTree(bpy.types.PropertyGroup):
    nodes = property(getnodes)

bpy.utils.register_class(NodeTree)
bpy.types.Scene.mytree = bpy.props.PointerProperty(type=NodeTree)

Code below pasted into python console, shown in image above

coll = C.collection
coll
mytree = C.scene.mytree
mytree
nodes = mytree.nodes
foo = nodes.new("foobar")
foo.parent = coll
nodes[0]
nodes['


Move object along multiple paths I am animating a simple car along a curved path, but I would like it to do a three point turn, i.e.  Move forward along one path, reverse along a different path, then move forward again on a third path.
I have tried to do this with keyframes but the car "slides" across the ground too much, whereas the path going forward constantly gives the car the correct rotation.
Is this possible in blender, and if not, what is the best way to achieve this animation?

Conventionally, (a bit like grabbing/releasing weapons, etc, if you want to look up other examples,) set up two or more Empties with the desired motion and timings for the car. Each empty can have its own Follow Path constraint. Ensure they are located and rotated similarly at hand-over points.
Give the car a Child Of constraint for each Empty, and for an instantaneous hand-over from one Empty to another, keyframe the Influences of the appropriate Child Of constraints to 0 and 1 respectively, in consecutive frames.
(Use the Set Inverse switches to ensure the car is all lined up, ready for hand-over)

If you need further control over rotations, moves, you can add another layer of indirection / hierarchy between the constrained Empties and the car: then the car would be constrained to be a grandchild of the path-following Empties.


Fluid simulator not working in animation I made a cup and some liquid inside the cup using fluid simulator. The cup is animated thus moving. However the liquid would leak out the cup and would be spilled on the floor. The cup is the effector and the liquid is the flow. The liquid is shaped like a cup with a ceiling.

I had the same problem and I found this video very helpful.


Fast way to create loops between existing verticies I have this mesh

I need to create loops between the selected vertices around the top of the part, keeping the spacing between the loops the same as the source vertices.

I know how to do this 1 at a time with several different methods, ctrl-r, knife tool, g g, etc, but this is time consuming and does not end up with "perfect" spacing.
Is there a faster/better technique?
This is the result I would like to find a faster technique for. This was done using ctrl-r scrolling wheel to the desired number of cuts, then 1-by-1 selecting a loop and g g until the loop lined up with a source vertex. Painful when there are many to do!

Duplicate points, seperate points, extrude them and use knife project?


Trying to find a way to make a true pixel screen Using UVs to animate the shapes on the screen would be hard and tedious so i want to use geometry to impact which dots light up

the compositor won't really help as it pixelates where the camera is facing rather than where the mesh is facing

when i used animation nodes the matrix wouldn't parent to my plane, and the rotation only affected the induvidual bounds of each sphere (which is what i used to make the leds)

something like this effect: https://blenderartists.org/t/animatable-pixel-matrix-display/1126033/11

Can i make a mesh light up when something touches it?

^ it's better explained in this new one i made

I still think UV map could be quite handy:

Scale the UV maps into individual pixels by scaling them to 0
Connect the UV map to Image texture
Use Mapping node to animate it


Mesh is invisible when game is played I am building a game that is inside a sphere mesh but whenever I launch the game the sphere is invisible from the inside but is visible from the outside. I have already tried multiple fixes but the fixes I've tried involve them happening in Blender render or blender cycle which don't effect blender game.

It would be greatly appreciated if someone could help resolve this issue.

In the material properties under game setting was backface culling. That fixed the issue. I apologise for posting the question and then finding the answer.


How can I make a groove in a sphere? How can I make grooves in a sphere. If I use the Subsurf modifier, the edges don't keep sharp. And if I use a crease of 1 I loose the smoothness of the sphere.

Here what I get using crease at 1.

Here the illustration of the problem I encounter. Left is only 'Mark Sharp' applied, middle is only 'Edge Crease of 1', right is 'Mark Sharp' and 'Edge Crease' both applied.

Artefacts appear.

You can add a sharp 'crease' to a model by using the edge split modifier. I see in your screenshot that you already have the modifier applied.

The edge split modifier will treat sharp edges as qualified to split, regardless of the Edge Angle specified in the modifier. Edge Crease forces a pinching effect to be applied to the geometry generated from the subsurf modifier. By combining these two, you can get a sharp edge while maintaining the smoothing effect of the subsurf modifier.

In edit mode, select the edges you wish to effect and press 'Ctrl+E' to open the Edges menu. Select 'Mark Sharp'.This will split the edges to create sharp edges in the shading.

Afterwards, select those same edges and the edges connecting the corners of your grooves. Use 'Ctrl+E' again to open the Edges menu and use the 'Edge Crease' option to pinch the geometry into a sharp profile, effectively ignoring the rounded edges from the subsurf modifier.

Here is a sphere showcasing the different effects. Left is normal geometry, middle is 'Mark Sharp' Applied, and right is 'Mark Sharp' and 'Edge Crease' applied.


Expression Node Result in different type? I am going through the Expression node and thinking of the possibility. While with INPUT, I can keep adding all kind of variables with different type, I am curious about whether OUTPUT RESULT can be of any other arbitrary output? I believe it is only output Float and single value?

I use this formula to try:
https://www.blender.org/api/blender_python_api_2_77_1/mathutils.noise.html

Or is it better if I use Script Node?

Thanks!

The expression node can output any type you want. When you click on the little gear icon you can also change the socket type of the output.

However not all python modules can be used by default. To use other modules like mathutils you have to enable them before. This can be done in the advanced settings like in the image below.


Two Different materials in One Object In the İmages you can see the vase has a 2 different colours. The top is white and opaque, and the bottom is transparent and dark blue (thanks to my webcam you'll see it as black). My question is how can I colour my model vase like the real one?

Blender Render Material, Texture, UV

Not Cycles

UV Map Vase in Edit Mode .. Project from View Bounds
Material Panel.  Transparency On. Alpha Zero.
Texture Panel using UV,  Color Ramp with Colors and Alpha indicated
Texture Panel Influence Affect Color 1.0 and Alpha 1.0 as depicted
Texture Settings shown in 2 Panels to Save Vertical Space
No emphasis on Artistry. You Can do better.  Suit to your taste.

Emphasis on UV Map.  Pay no attention to the man ... rather the image behind the Vase.
Same Material and Texture Panels


Particle density animation using dynamic texture I want to make the particle system to flow from dynamic texture using the density property.

Unfortunately for some reason particle system memorise only the first frame of the texture, and ignore future changes of the texture.

Any hints how making this work?

Unfortunately, this is a known limitation of the particle system as noted in a bug report here.

To quote Brecht Van Lommel, from that bug report:

  The location of emitted particles are determined in advance now and
  stay fixed, so this can't be animated. There's been some working on
  designing an improved particle system that can handle such animations
  but it's not finished

It is currently listed as a 'To do' item on the development section of the blender wiki here.


How do you move multiple faces by equal increments? I have a cog wheel and I want to make the spokes a bit longer than they are. I can select the tip of one and drag it out a bit, but how do I precisely measure how much I've moved something so that I can then move all the other tips the same distance?

I can't have uneven cog spokes.

For symmetrical shapes the best method is to use array modifier.

Delete all the faces leaving only one cog then change to object mode and add an empty in the origin of the gear and rotate the empty 45 degrees.

Then add array modifier on the gear object, set count to 8, disable Relative Offset. Then enable Object Offset and select empty from the selection box and enable Merge and First and Last.

This way you can control the gear shape by modifying only on cog.


I only get four video output options Even when I start a brand new file in Blender, I only get four video output file options:
AVI raw, AVI JPEG, Frame Server, FFMpeg Video.  I am running version 2.78.5 (I'm using the beta so that I can use denoising.

How can I get access to all the other video outputs other people have? Like this:

The encoding options from previous versions are still there, but now they have organized differently
One of the big changes in version 2.79 is that they finally separated containers and codecs.
If you select FFMpeg video, there will be a new tab for Encoding options.

There you can select the container and the codec for the output file.
Container is the file format for the file, (Mov, Avi, Ogg, MP4, to name a few) sometimes is referred as a "wrapper".
Codec (short for Compression-Decompression) Is how the image is compressed. The picture quality, file size and processing power needed to view the file are largely determined by the kind of codec used and the settings used for it.
For 2.8
The interface is similar but it is further divided into Encoding and Video, but the same principles apply.

But Why FFMpeg?
FFMpeg is a free software project that produces libraries and programs for handling multimedia data. Most video encoding in blender is done using those libraries.
But why FFMpeg and not just "video" or something less obscure?
Somehow the developers presumed that everybody would know all there is to know about FFMpeg and Encoders and Containers...
But why?...
Ask the developers...
See the Wiki for changes to the encoding interface: https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.79/More_Features


Is it possible to unwrap and map selected faces, then unwrap and map other selected faces? Is it possible to select some faces then unwrap them and map them with image, then select some other faces then unwrap and map them, and so on? I have one quite complex model, which if I unwrap them at once, it seems some faces are missing from the unwrapped model, which I don't know why.

This should be done with face assignment too beside uv mapping. So select some faces, assign the material to the faces. then put seams and unwrap, then map with image. After this is done, select some other faces, assign new material to the faces, put seams and unwrap, and map with other image, and so on. Can't be done with just one material.