Automatically setting the rendering frame range in compositing Is there any way to set the frame rendering range based on the Movie Clip input node (using a script)?  I would like to automatically render different movie files, but in order to do that I need to correctly set the rendering range to cover the entire movies duration in number of frames. I tried looking for a parameter in Movie Clip node that would perhaps contain the clip duration, or frame count, but I wasn't able to find anything like that. Is there perhaps a different way this can be achieved?

My compositing workspace looks like this:

Turns out I just wasn't accessing the right object type. The movie clip node contains a clip parameter, which contains the data I needed. The frame end range can then be set like this:

frameCount = bpy.data.scenes['Scene'].node_tree.nodes["MovieClip"].clip.frame_duration
bpy.context.scene.frame_end = frameCount

Full specification of the MovieClip datatype can be found here


Vertex dots in Edit Mode disappeared- how to get them back? I accidentally pressed a button and now the vertex dots on my mesh have disappeared. They are now just junctions of edges that light up when you select them. I can't tell where my vertices are anymore, except for some of them.

How do I get the normal vertex dot view back? (Posting a .blend file may not work, since this is something I may have to tinker with my User Preferences on my end.)

You might have set the vertex size in your Theme Settings to a very low level. Go to User Preferences -> Themes, and choose the 3D View Section:

From here, set your Vertex Size to something you desire (10 seems to be the maximum):

Looks like this in 3D View:


Run multiple Python scripts in Blender from the command-line I have 8 python scripts and I need to lunch them at once. For one script, I used

blender --background --python script1.py

for the eight scripts, I tried this command but it does not work.

blender --background --python *.py

You can have multiple --python tags. For example:

blender --background --python script1.py --python script2.py

This will execute the scripts in the order they are added in the command above. Add as many --python arguments as you need (there is no limit on the number of scripts you can run).


What happened to my "project/objects info" footer and how do I get it back? I have no idea what I did or hit to get the footer info I usually see (e.g. # tris, edges, vertices, faces per visible project meshes or actively-edited mesh) to disappear. The screenshot was taken from my current project's Object mode; it currently only shows my version number, and this change persisted even after rebooting Blender. How do I get the footer back?

Right click on the version number and check the options you're interested in.
You can have thoose infos in the 3d window overlays also, checking the "statistics" option.


Newtonian Size - Where to find in Blender 2.8 I am trying to change the size of my leaf particle through Physics settings in the Particle System. In older Blender versions there used to be the size setting right under Physics -> Newtonian. Or if not the Advanced feature enabled it was under Render settings. Where did it go in Blender 2.8? Any help is highly appreciated :-)! Thank you in advance!

In Blender 2.8 particle size is under Viewport Display!


How to save a scene setup with a named label (multiple renders from single file)? I have a file with 10 objects in it
I want to produce 5 different renders from this file
Each render should have its own camera angle and light
Each render may have the objects differently arranged/moved
I should be able to switch between each render I want to produce by clicking on a name of it in a list, and cameras, lights, object placement/visibility should follow.

Is this possible to accomplish in a single file in Blender?

Two ways that come to mind.

Separate Collection for each setup. Uses the same render settings.
Different Scene for each setup. You can set up different render settings for each scene.

Using Collections. One click to enable, second click to set camera as active.

Using Scenes. Change your setup and active camera with one click.


I don't understand the options under "which part to snap onto the target" Could someone please explain what the options under this section mean? I am specifically referring to the "Active, Median, Center, and Closest" settings.

For example, in the image, you can see I have selected these three windows. I am trying to snap them into the frames that you can see beside them, to the right. So, I changed snapping to edge select, but when I drag the cursor to the right edge, the result in unexpected. I know I must be in the wrong setting, so I am trying to fully understand them.

"Middle" seems easy enough to understand. But then what I don't get is, how is "median" different? And then I'm also unsure about what "active" refers to, as well as "closest". I did some searching and wasn't able to find any answers, but if this is indeed answered in another question, please let me know! Thank you for your time and help!

PS-While explaining each of these settings, would you mind also including which one I would use in this situation?

First of all, I prefer to think of snapping a 'Source' (the moving element) to a 'Target' (the stationary element), so I wish this menu was called 'Snap Source'

'Active' When you make a selection of elements, the last one selected becomes the 'Active' element. In Object Mode, that will be the last selected object. In Edit Mode, that will be the last selected face, edge or vertex. For the purposes of snapping, The position of an Object is its pivot point. The position of an Edge or Face is the median point of its vertices, and the position of a Vertex is, well, itself. When moving a selection containing an Active element, only the position of the active element will be considered a possible snap source.
'Closest' This, to my mind, is the most confusing of the options. It seems to me to be the closest element of a selection to the target, in the constraint direction, before the transformation was initiated. For example, if you translate a selection constrained to X (GX) then whichever element was closest to the target you're hovering over, in X, before you started moving, will be considered the source.
'Median' This will consider the average (arithmetic mean) position of the elements to be the snap source. In Object Mode, that will be the average position of the pivot points; in Edit mode, of the vertices in the selected elements. It is an average. For example, if your selection contains two identically located objects amongst others, the source position will be weighted more towards those objects.
'Center' This uses the Transform Center, as defined when you select the pivot point for your transformation, as the source position. It's where the manipulator appears when you start your move, rotation, or scale. It's most useful with the 3D Cursor: We'll use it to move your windows.

How to snap your windows? Assuming the worst case, (No conveniently aligned pivot points, median points, or anything), assuming you've got vertices you would like to coincide, and assuming you want to move your windows in Object Mode.

Go into Edit Mode on one of your windows, and select a vertex which you know you will want to be coincident with a vertex in the target frames.
ShiftS, select '3D Cursor to Selected'
Set your Transform Pivot Point to '3D Cursor'
Set your snap to 'Snap To' 'Vertex' and 'Snap Target' (source!) 'Center'.
In Object mode, select all the windows, and G, free translate them until the transform center snaps to the appropriate target vertex.


Image Texture scaling After importing a .fbx sofa model I found online, I realized the scale was set to 0.001 so I applied the scale (Ctrl + A, S) to set it to 1 but my image texture is still far too big to display properly. I've tried scaling my image down through the mapping nodes but I can not get it to work. I checked the UV editor and the mesh on the sofa is so tiny that it's impossible to even see on my screen. How do I get this to scale properly? I've added a plane in the scene to demonstrate what the image texture should look like and how I normally apply my textures.

Here is a link to the .blend file

The problem is that there are 2 UV maps ("UV_Channel_1" and "...2") but they are empty (or broken).

To fix them delete the UV maps and create new UV maps for all parts of the couch.
With the mouse in the 3D viewport and in Edit Mode, press U for unwrap menu, then select "Smart UV Project" from the menu, and you will have a working UV map.

(The bottom part of the couch needs some manual adjustments in the UV editor or scaling.)
Last but not least:
In the render settings, under Color Management, set View Transform to "Filmic" to get a natural look of the light/exposure. You can set the Look to "High contrast" if you want to have richer colors.
(And of course, add some more lights to your scene ;-)


Normal and Ambient Occlusion Map baking issues in Cycles Render So I've been battling with the Cycles Render, trying to bake normal and ambient occlusion maps for each object I have created. However, I have been receiving the following results:

I have been baking the high- and low- poly objects within the same coordinates, selecting the High and then Low objects in order. This has been done in 2.73a of Blender, in case that also needs to be known.

So Gandalf3 did have the answer, although I did not understand the previous topic he had posted. What I did to solve it was move the high-polygon object into another Layer. As I also had multiple materials for the object to be exported into a certain game engine, I had to remove one material before being able to bake the maps in question.


How can i get the change in value of an objects rotation between the current and previous frame, and use it in a driver I want to use the change in rotation between the current and previous frames to rotate another object.

EG object A was at 30 degrees in Z axis last frame,

and is now at 35 degrees in Z axis on the current frame,

so has changed by +5 degrees,

so i would want object B to rotate by +5 degrees.

How can i get Z rotation value from the previous frame, and use it in a driver?

I have practically no python knowledge but from other similar questions this might be the only way, but i don't understand how to actually make a script work with my driver.

import bpy, copy

#get current frame
thisFrame = bpy.context.scene.frame_current

#go back one frame
bpy.context.scene.frame_set(thisFrame -1)

#get z rotation of current object
print ("rotation on frame")
print (bpy.context.scene.frame_current)
print (bpy.context.object.rotation_euler[2])

#set custom property ZrotLast to be the same as z rotation
last =copy.copy( bpy.context.object.rotation_euler)
bpy.context.object["ZrotLast"] = last[2]

#go back to current frame
bpy.context.scene.frame_set(thisFrame)

#set custom property ZrotCurrent to be the same as z rotation
bpy.context.object["ZrotCurrent"] = bpy.context.object.rotation_euler[2]

#get z rotation of current object
print ("rotation on frame")
print (bpy.context.scene.frame_current)
print (bpy.context.object.rotation_euler[2])

#work out difference between current and last frame
bpy.context.object["ZrotDelta"] = bpy.context.object["ZrotCurrent"] - bpy.context.object["ZrotLast"]

Please note DO NOT try changing bpy.context.scene.frame_current to change the frame! it will appear to work but it seems like nothing in the frame updates so you will get the same rotation information as the original frame, use bpy.context.scene.frame_set and it works correctly.


How to rig a "cartoonish" style mouth that doesn't affect the rest of the face? I'm modelling the character Robotboy from the cartoon, and personally I feel like it just might be my best model yet. However, I was attempting to rig the mouth and eventually the eyes, and it wasn't going exactly the way I wanted it to. Here's pictures of it before I posed the mouth, and after:

This is clearly not the look I'm trying to achieve. The creases around the mouth are not wanted, and I feel like it would look much better without the creases there. I also want the mouth to freely move to any location on the face, while still tracking on the surface of the face. Basically, something like this (I hope it doesn't look too confusing):

I've seen this done with Minecraft Blender animations, but I myself do not know how to approach this problem (I'm particularly new to this kind of stuff). Any advice for making this type of a facial rig would be appreciated, as I will be using this kind for animations in the future (it'd also be cool if I was offered a solution to make the eyes act the same at the mouth with the tracking and such, however I do not really need it once I have a solution for the mouth :D).

I think your topology is not good for a head, basically you've kept the topology of a UV sphere, it won't help to deform properly, what you need to do is create a kind of topology that follows the face features (found on google, from 3D artist Israel Audelo "izzy"):

See how the topology rotates concentrically around the mouth. As your character is even simpler and the expression more exagarate you should do the same with no more edge loops than necessary:


how to render an image without effect of scene world I am new to 3d and blender. My question is how can I get an image rendered as on the left side of the image. I can see the Scene World is making the difference. Is there a way to render the image without the effect of the scene world?
Thanks in advance.

What happens when you check/uncheck the Scene World option, is that blender toggles between the lighting you have set up yourself, and a pre-built (and hidden) HDRI that provides lighting and reflections (as seen by default in the Shading Tab)
So, to get the same look for your render , what you are looking for is the effect of HDRI lighting. Go to the world section of your shading tab and add and Environment Texture (not an Image Texture). You can use any HDRI you want, but the one that is being used in your example is in your blender folder at ....2.92/datafiles/studiolights/world and the image is forest.exr (there are others there too). You can also find many free ones online - one of the most popular places is HDRI Haven (https://hdrihaven.com/hdris/).
If you want the lighting and reflection influence but don't want the image as your "background", you can mix the Environment Texture with another Background (I used the default) using the Is Camera Ray output of a light Path node as a Mix Factor (as shown below):


Making a 2 sided wedge shape I'm still very new to blender so sorry if this is a basic question, I'm trying to make like a 2 sided wedge, I'm not sure if that's what it's actually called though. I thought maybe I could do this with a cube and use a subdivision surface and then drag the edges down to make it slanted. To clarify what shape I mean, I will attempt to make one below

    _________________
   /                / \
  /                /   \
 /                /     \
/                /       \

Sorry about this very poor drawing/explanation, any help on this would be appreciated

Add a circle Shift+A

Reduce its verts down to 3 >> Enter

Tab to enter edit mode

F to fill the vertices with a face.

E to extrude to the length that you desire.


ParticleSystem reduce Object Count I'm using Hair Particles to spawn grass on hills. Unfortunately I cannot convert more than 10 000 grass particles to mesh because every single particle gets converted into a separate object. Any  more than 10-20k and blender will crash or take extremely long. Is there way to Convert all the Particles into a single Object or just somehow reduce the Object count? The Poly count is not high at all.

The solution is to use Particle Instance Modifier to instantiate the grass object, instead of Dupli Object option found in the particle system settings.
https://docs.blender.org/manual/en/latest/modeling/modifiers/simulate/particle_instance.html

Benefits of using the modifier to instantiate an object:

much better viewport performance (especially in 2.79)
no need of pre-rotating the models to use random Z rotation (useful for vegetation)
fast conversion to a single mesh by AltC -> Mesh

How to:

Select your (single) grass model and hit AltG to move it to 0,0,0
Add Particle Instance Modifier to this grass model
In the modifier's options, pick the ground object and it's particle system
The grass should now be instantiated similarly like using Dupli Object (if not, check if your particles are alive, or just tick all of these checkboxes under Show Particles When)
To convert the instantiated grass to single mesh, make sure you have the grass selected and press AltC -> Mesh

There are also some disadvantages though, like using vertex groups for particle size (length) doesn't seem to work (maybe there are some more, but nothing important for me - you will have to find out).


Kissing Spheres of Various Sizes (a plane of bubbles) How can I create something like the bubbles in this picture?

They are kissing (not fusing like soap bubbles do) so there should be no overlap.

Is there a way to achieve this with particles?

I envision starting by making a set of large and medium-sized bubbles and then adding a second set of small ones with collisions turned on -that way they should fill the gaps. Is this a good practice or is there a simpler method?

(The large misshapen bubbles are cool but can be ignored for this specific question.)

Thanks in advance.

This kind of bubble effect can be generated using rigid bodies and force fields. A mix of different size spheres are dropped on a plane and the force field causes them to pull together and space fill.

Procedure (tested on Blender 2.79)

Create the baseline geometry. Add a contained to drop the spheres into, add sphere of different sizes above the container. Set the contained as a passive rigid body. Set the spheres as active rigid bodies.
Add a force field actuator to the center of the container, under the floor. Set the force to a negative value to attract the spheres.
Set the gravity to a high number to pull all of the spheres to the floor and keep them there as they are pulled to the center.
Animate until everything is pulled together.

At this point, the spheres are reasonably packed and approximate the 'kissing spheres' stuck to a plane. Add the shaders and render.

Example Blender file -


Simple Particle Needs So I've been in animation a long time but am new'ish to Blender.

Two things I cannot seem to do are fairly simple to code:

Firstly, I need particles to emit particles when they hit a surface.

Secondly, If I have a particle system, the particles must have a direction so how do you get this to drive instanced object direction?

I am massively simplifying these questions, but thats what they need. I have had several needs for the second one, say arrows showing the flow of fluid / gas / electrons, and the first is just where I want a sprite flash to appear where a glowing line hits a wall - I'm copying a 1982 hand drawn animation, surely we can do these basic things in 2020?! :o)

Thanks in advance

First question: it can be done in Blender in versions before 2.5, for example in now very old 2.49b. The file locations for download is here [1]. The mechanism you are looking for is called 'reactor particles'. It was unfortunately not re-implemented in 2.5+ series.

In Blender versions from 2.5 to 2.83 you can not do the effect of spawning particle with another particle easily. Particle system in Blender in it's current form is on it's end-of-life state, and there will be no updated to it, because it is planned to replace it by Particle Nodes. Example [2,3]. Some workaround for this poor situation is to introduce Animation Nodes [4] and find your way thorough them. This requires a lot of learning and is considered to be advanced stuff, so no point to explain it here. You really need a tutorial.

Second question: animation of flow can with direction can be done kind of easy using small custom object arrows and particle flow controllers like 'curve field' (curve guide) or 'keyed' particles [6]. This however requires also a tutorial, for example this (first from google): [5]

https://download.blender.org/release/Blender2.49b/
https://www.youtube.com/watch?v=A05UghlpVPs
https://www.youtube.com/watch?v=2tKpHuq9qEk
https://www.youtube.com/watch?v=8pvX2_ZH1l0
https://www.youtube.com/watch?v=PYHOV3bVIG0
https://docs.blender.org/manual/en/latest/physics/particles/emitter/physics/keyed.html


Repetitive carvings/holes around a sphere I'm doing a spherical electromagnetic motor and I need to design a main ball fully covered of circular holes (all of the same size) so I put the neodymium magnets inside them. The sphere is going to be made on a 3D printer.

I just started with blender but I think I will manage to make the circular carving but I do not know how to make it all around the ball.

Sorry if I had any mistakes writing this post. I'm from Spain.

Thanks in advance.

You may do it by beveling the Ico Sphere and using the Solidify and Edge Split modifiers.

Add an Ico Sphere with 3 subdivisions.

Enable face selection mode, press A in Edit Mode to select the whole mesh. Now press Ctrl+B and drag the mouse outwards to bevel it. Select one of the hexagons, go to Select-->Select Similar-->Polygon Sides. Delete selected hexagons with X-->Only Faces.

Add Solidify Modifier and increase its Thickness value. Add the Subsurf Modifier below and give it some subdivisions. Apply the Solidify Modifier.

Add the Edge Split Modifier above Subsurf and set its split angle to 80 degrees (you may experiment with value for optimal result though).

Apply the modifiers and smooth the mesh in the Edit panel of the Tool Shelf (T).

EDIT: After @wchargin 's remark I experimented a bit and tried to solve it in another way.

Added an Ico Sphere with 3 subs, poked it with Alt+P and then beveled some vertices (Ctrl+B, V).

Now the holes have much more dense geometry, which I hope may let them create perfect circles after subdividing.


Weird reflections from HDRi I have been having some problem with reflections in my windows and can't find out what I am doing wrong. I have purchased 2 car models and I get the same problem with the windows. Is is the model itself that are making it or my HDR or perhaps the material?

I am posting a screenshot of the scene, I have also added a sphere just to you can see that in the sphere I think it looks correct.

Posting the final result here, but made it in photoshop.

Latest dumps from blender with magnifying effect and normals.

The material isn’t glass in the principled shader - you have Metallic set to 1.0 and Transmission set to 0.0. It’s essentially a reflective metallic surface. If you don’t specifically need to use the Principalled shader then just delete that node and replace it with a Glass Shader node - much simpler to use. Alternatively, start by changing Metallic to zero and Transmission very close to 1.0.


Mesh with mirror modifier shaded differently on the other half Does anyone know on what occasion is mesh with mirror modifier shaded differently on the other half? Normal is fine. Thanks in advance.

Seems that Custom Split Normals are causing the issue.

In the Data panel, under Geometry Data, click the Clear Custom Split Normals Data button to fix it.


Mouse click released immediately on drag; can't drag nodes I've recently switched to Linux Mint from Windows. Everything in Blender is running fine, except for the fact that I can't seem to hold down 'mouse drag' operations.
I click, hold down the mouse button - yet as soon as I move the mouse, the button is showing as released by Blender. I've installed the Screencast Keys add-on to demonstrate this. When checking the console, I get a weird warning related to keycodes.

Bad keycode lookup. Keysym 0x0 Status: XLookupNone
'' 0x7f9503135200 0x7f9533585b40

Here is a GIF to demonstrate the problem:
Value sliders in the UI seem to work, but nodes and their connections can't be dragged - making it pretty difficult to work.
EDIT:
To clarify, I'm using XFCE as the window manager

When I try to move nodes like this, it sometimes releases on its own too, which is pretty annoying. Just click on the node and press G to move it. It never let me down. ;)


How can I keep Blender from duplicating LODs when I copy/paste objects that have LODs? I'm going to have a lot of small obects in a scene. Luckily, they are all uniform, so I can just copy/paste the object. However, I have an LOD loaded on the first object and I've found that as you copy/paste this object, it also creates a new LOD object. So if my LOD on my cool object was "Cool project LOD," as soon as I copy and pasted that object it would create "Cool project LOD.001." I would have to manually go in and change all of the 100_ objects back to having the same LOD. Is there a way to avoid this and make it so that when an object is copy and pasted, it doesn't create a new LOD?

In Blender, if you want to have multiple copies of same object, you may use the Array modifier and can have as much copies as you like.

Or you may Use the duplicate function, Using menu Object -> Duplicate Object or use a short key Shift + D to duplicate it

Best of luck :)


Boolean not working for 2 objects, not sure why. Tried many things as suggested on tutorial sites I hope to get some help here.
I am having some fun designing a House, but for some reason I cannot get two boolean objects to cut properly.
I hope to get some help to figure out why the Windows and Pantry Door work, but the Bed4 and Side Window wont cut the hole.
I have tried the normals settings and nothing seems to work.
the only way I have got a result is to actually apply a boolean then edit the mesh that object was around to create the opening. but it's not a great way as I would like to keep it UN-Applied to move objects around to get a better feel for the placements etc.
none the less I have tried for hours and I am over it! heeheehee
I hope with some input from others I may understand what i've done wrong.
I really want to figure it out more then anything haha
Blender File

Blender 2.91 and 2.92alpha
Problem is solved as it uses a more accurate boolean


extruded curves changing orientation on render I've followed the usual steps to extrude a curve upon a path. All looks well in the viewport.

https://www.dropbox.com/s/h5iqnmbl5p0a87a/Screenshot%202015-12-14%2015.32.11.png?dl=0

Upon render, I find the orientation and position significantly changed. This mystifies me. What calculations change between preview and render? And what am I doing wrong?

https://www.dropbox.com/s/d49z5jx12vlmuub/Screenshot%202015-12-14%2015.32.33.png?dl=0

Any advice or suggestion appreciated.

One (or more) of your modifiers is disabled for rendering:

Enable it and render happily ever after.

The camera icon toggles the use of the modifier for rendering.


Relationship between global vertex coordinates and mesh object's matrix attributes How do a mesh object's matrix attributes relate to the global position of its vertices:

matrix_basis

matrix_local

matrix_parent_inverse

matrix_world

And what is each of these used for (practical examples, if possible, would be helpful)?

Practical examples

Object.matrix_basis - If you want to modify the loc/scale/rotation directly, as a matrix - without having to worry about what kind of rotation is used - (Euler, Axis-Angle, Quaternion).
Object.matrix_local - Exporters where you want to write out parent relative transformation.
Object.matrix_parent_inverse - Any tools that handle the transformation relationship between parents and children. (Not used often)
Object.matrix_world - Any time you want to know the final transformation of an object after animation, drivers, constraints and parenting are applied. You would want to use this for example - if you are writing to a format like OBJ which doesn't store object transformations.


Blend file hash keeps changing I am trying to compare hashes of blend files, but I'm running into a few problems. Every time I open Blender and write the default cube mesh to another file and then hash that file, the hash is different. I run the following code from the python console:

from hashlib import sha1
bpy.data.libraries.write('//Lib.blend', {C.object.data})
sha1(open(bpy.path.abspath('//Lib.blend'), 'rb').read()).hexdigest() // resulting hash, different every time

This also happens when I, for example, switch to and from edit mode without altering the mesh. Every time, another hash.

I've been searching the API and the source code to see whether a timestamp is added to the blend file, but have been unable to find anything. Interestingly, when I execute the above code twice without re-opening or editing any object in the scene, the hashes do remain the same.

What causes the hashes to keep changing, even though the data is the same?

I was interested in this so did a little research.

A blender save works by directly copying the scene data from memory to disk. This makes the save fast since there is no need for a 'conversion' stage.

This means that any change to how that data is in memory will result in the same change when in a blend file. This could be trivial changes like the order of variables in a list.

read this for more details: http://archive.blender.org/development/architecture/blender-file-format/

"Blend-files can be different when stored on different hardware platforms or Blender releases. There is no effort taken to make blend-files binary the same."

Basically it means that hashing the file cannot be used to check for content changes.

R


Can I get an IK constraint w/ stretch to only scale bones on their Y axes? I have a short IK chain with an IK constraint with stretch enabled.  The bones in the chain each have their Inverse Kinematics Stretch set to 0.001.  Here's a simple demo setup...

Moving the Control bone around within reach of the IK chain seems to work fine.  E.g.

But when I cause the stretch to take effect by moving the target out of reach of the IK chain, the chain stretches and scales in all 3 dimensions causing the mesh to expand.  Note the size of the mesh and IK chain bones relative to the target as compared with the other images.

Is there some way to only have this stretch along the Y axes of the bones?  I.e. I want the bones and mesh to elongate but not swell.  I have tried various other settings, including locking X and Z scaling on the bones.

You can grab a .blend file of the sample setup at http://readyposition.com/Blender/IKStretchExperiment.blend

Help appreciated.

IK stretch bones do stretch in all 3 axes and can't behave like you want.
The solution and common method is to

duplicate all the bones in the chain (except the control) and un-parent them from each other
for each bone_copy set Copy Location and Copy Rotation constraints targeting the original bone
for each bone_copy set Stretch To constraint targeting the next bone in the chain. This constraint should have Volume set to XZ to maintain reality or to None if you only want to stretch in Y axis
bind the mesh to the copied bones


Shrinkwrap remnants - during model wall creation I am creating the wall of an object through shrinkwrapping a big sphere around the object, and then remeshing. Few cycles of this. However, I get some remnants of mesh between arch. How to solve that problem? Of course I can do it manually but it is a lot of work. After removing it there is a big hole in the mesh so again need to be corrected manually. Any simpler ideas?

The Shrinkrap Modifier is not really a fire and forget kind of tool that takes care of everything. It needs some love.

Here is how I use it:

I model a very low poly mesh that wraps around the target. In this case a simple circle with 6 verts. It's not just a blanket thrown over everything. Any topology worth considering is mirrored lowpoly in this mesh. The structure of this mesh is crucial. It makes sure my result has a nice flowing topology instead of being a random mess. Blender's workflow and chaotic topology don't harmonize all that well.
Step two is a Subsurf, can be a simple one, so the Wrap has something to work with.
Step three is the actual Shrinkwrap Modifier that gets its offet.
Step four is adjusting the verts. In some places the modifier will goof up. It needs guidance. But since all the geometry is procedural, you can still adjust the lowpoly base to help the Shrinkwrap along. It'll search for the closest surface point and its the modeler's job to make sure the right spots are closest.

If you want to, you can sandwich the Shrinkwrap between two subsurfs where the first is for shrinking and the second is for smoothing.


Mirror modifier prevents me from weight painting Disclaimer: I am NOT asking how to apply a mirror modifier for weight painting.
I have a low-poly model that I rigged and I am wondering why I can only use weight painting on half of my model, the right-side of it. I think that this is because I have a mirror modifier on the 3D object but am I supposed to apply it anywhere? I don't see such thing in the modifier window.
Another related-question: is it because my model is very low-poly that weight painting is very imprecise? I feel like I can only apply a weight to a vertex, but I saw several examples of smoother paint on low-poly models, I was wondering how.

i just tried it out - and it worked exactly how i would have expected it: yes, you can just weight paint on the one side, like everything you can do only on the one side of the mirrored object. That's why it's called mirrored....you can also just change the vertices on one side...and so on.
You can apply the mirror modifier (just in object mode):
You don't need to apply the modifier, only if one side should not be mirrored anymore or you wanna change something just on one side.


New window with Python API? How to create a new window with a certain dimensions (for example 40% of screen size) using Python API?

Functionality-wise similar to File > User Preferences — a new window shows up with User Preferences area type.

Currently in Blender 2.79 the only way to manage windows through Python API is by bpy.ops.screen.area_dupli() and bpy.ops.wm.window_duplicate() operators.

But they add new screens to bpy.data.screens, which are not easy to remove.

And there is no way to resize created windows.

UPDATE 1:

In my particular case I can use window created by userpref_show operator, it's size is very close to what I need and it creates 'temp' screen which is deleted after window is closed, so I do not need to cleanup bpy.data.screens afterwards:

import bpy

# Call user prefs window
bpy.ops.screen.userpref_show("INVOKE_DEFAULT")

# Change area type
area = bpy.context.window_manager.windows[-1].screen.areas[0]
area.type = "TEXT_EDITOR"

UPDATE 2:

With render.view_show operator it is possible to set the exact size of created window by modifying scene settings:

import bpy

# Modify scene settings
render = bpy.context.scene.render
render.resolution_x = 640
render.resolution_y = 480
render.resolution_percentage = 100
render.display_mode = "WINDOW"

# Call image editor window
bpy.ops.render.view_show("INVOKE_DEFAULT")

# Change area type
area = bpy.context.window_manager.windows[-1].screen.areas[0]
area.type = "TEXT_EDITOR"

# Restore scene settings
# render.resolution_x = original_value
# etc.


How to import a grease pencil draw into another grease pencil file? I want to copy a 3D wire frame I made by grease pencil and paste or import it into another 3D wire flame. so that I can compare those two...work on both of them in the same 2D animation tab
Don't know how to do it...

blender 2.8  Mac pro user

Anyone trying to import grease pencil drawing into another grease pencil file:

Click File --> Append
Select the Grease Pencil File you want to import -->
A new menu of directories pops up, select COLLECTION -->
A new list of collections pops up --> select COLLECTION again.
Done, your Grease Pencil object should now be "in" another Grease Pencil canvas.

Additional resources on stackexchange. They did not help me, but might help you:
How do i copy material from one .blend file to another?
How can I reuse existing materials, objects, etc from an existing .blend?

Reference:
How To Import Grease Pencil Object


Renders get pixelated when viewed up close I have been using blender for about a year now and have only just started to notice that all my pictures are actually not that HD. If you zoom in on a render just once, you can see each individual pixel colour. I don't know if this this is a big or if it is something I can do or even if this happens to everyone.
Please help as its really bugging me now.

Here is an example of a render that is a bit pixelated:

Save the picture and open it in fullscreen and zoom in just a bit.

The image you uploaded has the dimensions of 960 x 540. This is half HD. Most likely the problem is that your render scale is set to 50%. This means that the actual render size will be 50% of the specified render size.

To fix the problem. Set the scale to 100%, than your renders will actually be full HD


What are the implications for having Python scripts or add-ons licensed GPL incompatible? If someone writes an add-on and choose a license which is GNU GPL incompatible,

For arguments sake, by adding the clause:

  The Software shall be used for Good, not Evil.

Which is GPL incompatible.

For reference, see: jsmin and some of the problems this caused (wikipedia, hackernews).

For the purpose of this question,  it might as well be any kind of incompatibility.

While the Blender FAQ states:

  Python scripts – if they use the Blender API calls – have to be
  compliant to the GNU GPL as well. We are currently reviewing this with
  Free Software Foundation though.

My understanding is this only applies when you distribute the script with Blender, not to scripts you write yourself and distribute on their own.

Simply having a file which imports and calls some API's Blender happens to define - doesn't automatically make it a derived work of Blender (as far as I know), Since there could be multiple implementations of the Blender Python API, with different licenses.

So my question is:

What are the implications exactly for using a GPL incompatible license for Python scripts that use Blender's Python API?

Notes:

This question was raised because of comments on: https://blender.stackexchange.com/a/47622/55
Legal questions are admittedly tricky to handle here... its possible this should be moved to opensource.stackexchange.com

I think law.stackexchange.com would be the best place online for an accurate answer, the following should be consider when formulating an answer and not taken as legal advice.

The issue comes from how python works, a python script is often viewed as a simple text file (or interpreted script) by most people, technically it is a source file that gets compiled into bytecode -

  bytecode
  Python source code is compiled into bytecode, the internal representation of a Python program in the CPython interpreter. ... This “intermediate language” is said to run on a virtual machine that executes the machine code corresponding to each bytecode.

The action of compiling a script means python scripts are a source code file used to generate a binary code that then links to (or dynamically calls) functions within blender, this means they could be treated as derivative works the same as adding a source file to the blender code base, this makes blender the library file that the python script links to. As well as a plain python script linking to blender, an addon script is compiled into code that blender calls, which would make an addon closer to a derived work than a plain python script used to automate a task.

It could therefore be said that any user that adds an addon to blender is building their own custom variation of blender. Placing the addon in a location that blender can find it, or installing with the install from file button in preferences, causes the compilation of the addon, then enabling the addon links blender and the addon into a derived work.

The LGPL was created specifically to allow a program to link to covered code without having to be released under the same terms as the code being linked to.

In contrast a shell script is read at run time to invoke external programs to execute with given parameters and retrieve the result output from the program. This means a shell script does not generate binary code that links to other code so does not get considered as a derivative work.


Blender changes image colors when rendering I'm working on a project where I'm editing in Davinci Resolve, but doing a number of effects in Blender.  However, when I render out a shot from Blender, I find that the color of the image is slightly different from the source video.

Here's a frame from the source (no color grade):

And here's that same frame after being rendered out in Blender and saved as a PNG (started with the default Blender file, added the clip to the sequencer, and rendered):

It's hard to see in these pictures, but the color is slightly darker and modified in the Blender output.  If you look at the waveforms, you can see in the Blender output on the right, some of the sections are slightly brighter (for example, the circled blue section):

I might be able to color correct it to match, but so far that's not been straightforward.  It would be much easier if Blender's output didn't dork with the colors to begin with.

What is going on here, and how do I get Blender to not modify the image's colors when rendering?

I am working with 8-bit V-log H.264 footage from a Gh5s (color space sRGB).  Again, all Blender's settings are at their default.

PNG is a terrible format. You should forget it even exists.

Blender does only what the operator instructs it to do. If the setting are to output on a certain color space, then that is the color space it will use. If the original source is in a different color space blender has no way to guess what that might be.

Any image displayed in the wrong color space will always look wrong.

When doing visual effects you need to plan how to have all of your material be in the same color space. If one source is encoded using a different gamut than the other they never going mix nicely and any transformation will further distort the color on one or the other. Long story short: you can't mix apples and oranges.

All compositing should be made using linear values in a common color space.

The ideal scenario would involve controlling all of the variables.

Ingest your footage in resolve, set the correct input transforms, color space and gamut (Vlog to 709). Then export the plates as linear scene referred values (de-Log it), convert it then to the correct color space you are going to be working on (most likely 709): set the project to be Color Managed and use 709 scene as output color spaces. Export then as EXRs to be used in Blender. Work your magic in blender, export the elements to be combined back to resolve as linear-scene referred EXRs. then composite in fusion (read the suggested link).

Else you need to go a more complicated route, which is to create a definition of V-log in the Ocio config, supply the correct LUT and color matrix, so that the footage ingested is linearized correctly and with the correct 709 gamut in blender. Work then your amazing magic in blender and re-encode as V-log and save as Tiff files. Bring those files in resolve and integrate them into your project.


Linking appended objects Newbie here.

Is it possible to link an object after it has been appended into a scene?

I Appended few objects to a new file, but now I think it would have been better to use link so to have the changes (i.e. adding materials) in each object (file) reflect in the scene containing them all.

I read this Coverting an appended object into a linked object?, but didn't understand it.

Yes. You need to select all the objects you want to link in Object mode, selecting the 'target' object last. Where the target object is the object for which you want to link the material from. Then press Ctrl + L and this will bring up the linking menu. You then can select Materials and all object will link to the targets Material.


Smooth Shading artifacts on low poly model So when I'm extruding inwards, there comes this weird shadow.

But it's only when in smooth shading, if I put the object to flat shading it looks fine.

There isn't any modifications and I tried the offset edge slide, but it didn't work.

So, what is it and where does it come from, and is there a way around it with smooth shading on?

In smooth shading, the vertex normals are interpolated as shown in this profile view diagram :

More details in this video : https://youtu.be/PMgjVJogIbc

Most of the times, we want acute angles or right angles to stay sharp.

To do that, you can either :

enable Autosmooth and set the minimum angle for smoothing (above that angle the edges will stay sharp) :

Note that Autosmooth only works when Smooth shading is also enabled for the object.

or :

manually select the edges you want to keep sharp in Edit mode and click on Mesh > Edges > Mark Sharp. They will appear in blue (you still need to have Autosmooth enabled but this time you can keep the angle at 180° so only your selected edges are smoothed) :

here's how it looks :

or :

add edge loops and bevels at the right places to avoid smoothing artifacts. This usually produces more realistic results, since perfectly sharp angles don't exist in the real world even when the bevel is very tiny. Here I highlighted the results of the beveled edges in pink to show you :

and here's how it looks (the bevel is big here, you can make it smaller) :

compared to no bevel at all and smooth shading on all angles :


Texture bake doesn't match viewport EDIT - new pic attached to bottom
I've got a billion nodes making a texture that covers most of the robot.
i want to animate it tho, and the poota chuggs even when moving things around in viewport, so i believe baking the texture on to each mesh will free up processing power.
(i have another post up regarding animation misery)
baked image size is 2048, tile size 2048, 64 samples. Object has been unwrapped and looks good when all the nodes are plugged in.
the resulting diffuse is f*&#ing awful tho.

I cant see what i did wrong
on another note, all the youtube vids suggest exporting diffuse/bump/aoc etc seperately. why not just use combined? - see answer below
UGH.. so, i found i was unwrapping the wrong hip (local camera in uv unwrap pointed at the wrong hip). the poorly setup AOC was prolly making it darker than expected, and i had overlooked the metallic in the rust part, mixing with the rest of the bake.
But. still no love. why is this happening. the rust just goes crazy in soem faces. its def a new correct uv unwrap, which displays fine until i bake

Your issue is, you baked only the "diffuse: color", which is only the raw color that the render engine is supposed to use, in addition to other shading infos, to create the final result. If you want the final result, you need to do another kind of baking.
Now the question is, do you want something static that doesn't react to lights, or do you want to keep your model's surface reactive to its surroundings?
If you want something static, make a "combined" baking. It will bake the final result into one texture file. Be aware though, it really does bake the "final" result. Which includes

little shadows created with the lights bouncing on your bump maps
global illuminations
reflections
subsurface scattering

All will be baked and fixed in stone inside one map and nothing will adapt anymore. It will turn your model into a painted statue.
If however you want to keep your model's material simple yet dynamic as it should to its environment, then you need to basically bake the raw data that should be plugged in a principled shader. Which basically is:

albedo data (raw color without shadows)
metallic data if any
specular
roughness
bump / normal / displacement data

And so on as you need.


What's Wrong with My Python Script? I'm trying to learn more about using the info window with Python. Turning it into an addon. I feel like I got pretty close, but it is giving me an error.

import bpy

class cubeMover():

    bpy.ops.transform.translate(value=(0, 2.86946, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

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

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

if __name__ == "__main__":
    register()

When I run the code using just this it runs fine.

import bpy
bpy.ops.transform.translate(value=(0, 2.86946, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

But when I try and change it into an addon it doesn't work.

You should probably define an operator. See Python example files that come with Blender about how to write an operator:

It might be a good idea to change objects location directly instead of using an operator that is for user interaction. You can change the location of the active object by changing bpy.context.object.location values.


How to add a checkbox to a panel header? I'm trying to find out how to add a checkbox to a panel header so panel can be deacivated (as well as storing that checkbox value in some property). It may be quite obious task, but I didn't find any info about it in the docs so far.

Example of what I'm trying to achive is the "Gravity" panel, that can be turned off with the checkbox.

Any suggestions or leads? I would be grateful for any code examples with it.

Add draw_header(context) function to your Panel class and supply any bool property. Following example is based on ui_panel_simple.py template:
import bpy

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

    def draw_header(self,context):
        # Example property to display a checkbox, can be anything
        self.layout.prop(context.scene.render, "use_border", text="")

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

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

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

if __name__ == "__main__":
    register()


Getting a normal map to work in a multiple uv node setup The setup is not that complex, it has the typical stuff for color, normal, ambient occlusion and specularity maps.
Problem is that there are multiple UV maps, and some of them overlap each other, f.e. the sand overlaps the mountain uv map.

So I try to figure out a) how to limit some of these texture maps properly to separate uvs and b) how to get the normal map to work.

Here is the node setup for the mountain(Gebirge means mountain):

Notice how I tried to limit all of the image textures with an attribute to the mountain(the uv map is called like the attribute), I didnt use the UV map node it is just still there.
Notice how I tried to limit the Diffuse and Glossy Shaders to the mountain with the output of the normal map node. This does have an effect, I still don't know if it is correct like this and I don't know if there will be problems with the other textures/UV maps.
Notice how the normal map is set up, it doesnt work like this.

Now here is a picture of the mountain, don't mind the red spots on the stuff which is not mountain, it's part of its uv map:

Last but not least this is the kind of node setup I want to use to show other textures (of sand and stuff) on other UV maps but all in the same material:

I'd love if someone could maybe give me some live support with this. Like chat or skype, I send you the .blend file plus the textures and stuff.
Just send me a PM or chat invite.

EDIT: Now the normal map works with the solution that MrZak provided:

But there is still the problem with the other areas being influenced by the Glossy and probably the Diffuse Shader too. You can see this at the red tinting of the beach cause by the slightly red glossy shader.

I tried the attribute and the uv map node but they wont restrict it to the UV map of the mountain.

You could comment on this if you have a solution but I'll probably post a new question for it.

I'm not sure what happens with beach but there're several problems.

Don't plug output of the Normal map into the Displacement input, see this very good answer for more info. In your case it may be enough to use only normal maps.
Consider plugging image into the Normal Map node if it's the result of processing with using some programs where the result is image of purple color. Otherwise plug it into the Bump node instead (the link above again can be helpful).
(less important) Why not using UV Map node and Attribute one instead ?
Regarding to UV maps I think it's better to search for some questions here or to ask new one (as it seems to be arranging and managing the UV maps). Basically you press CtrlA to average islands' scale and CtrlP to make them fit in the texture space (pack them); but the exact way depends on situation, it may be needed to use some other tricks like stitching etc.

You may want to read about normal maps, how to and how not to bake normal maps and a lot more

See wiki article for more info on creating, editing and managing UV maps.


Creating a custom permanent property in Blender 2.70 python script to access in GUI Panel I was going through the "Getting started" API documentation for 2.68 since I'm guessing 2.70 is similar. I was testing out how to create my first script in 2.70 which I would like to save values which I will need later for future computations. I am using the Blender Panel UI for the user to modify the properties. Here is the basic code I'm stuck at from the HellowWorldPanel class. I was wondering why my property field isn't showing up in the Panel.
(Edit: I'm sorry just to clarify this, the panel is showing up with my "Hello world!" label but my property called "bl_mine1" isn't showing up in the newly created panel)

Here is the code I am testing it with:

import bpy

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

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

        obj = context.object
        #Create New Row with text Hello World
        row = layout.row()
        row.label(text="Hello world!", icon='WORLD_DATA')
        #Try showing a field box with MYProperty in it
        row = layout.row()
        row.prop(obj, "bl_mine1")

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

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

if __name__ == "__main__":
    register()

Thanks for any input.

Since your example panel is in the object context I assume you want to use the data on objects.

If you want to store and retrieve properties on a per object basis you can append a property to objects like this:

bpy.types.Object.obj_property = bpy.props.FloatProperty(name = "ObjectProperty")

and access the value in the UI like this:

row.prop(context.object, "obj_property")

Or if you need your property for all objects in a scene you could store it inside the scene like this:

bpy.types.Scene.scn_property = bpy.props.FloatProperty(name = "SceneProperty")

and access the value in the UI like this:

row.prop(context.scene, "scn_property")

To access the property values in your script you can also use the bpy.data module.

Note that operators and panels are conceptually different. Panels are not supposed to store properties or change them on their own. They are just for user access to internal data and properties. Operators on the other hand have builtin access to properties and are better suited to manipulate data. Note also that properties are automatically stored in the .blend file while saving. If you want to share data between scenes you could use other ID blocks like Text or use a simple operator to copy data between scenes e.g. like this:

import bpy

class UIPanel(bpy.types.Panel):
  bl_label = "My Panel"
  bl_space_type = "PROPERTIES"
  bl_region_type = "WINDOW"
  bl_context = "object"
  bpy.types.Scene.scn_property = bpy.props.FloatProperty(name = "SceneProperty")

  def draw(self, context):
    self.layout.operator("prop.propcopy", text='Update Scenes')
    self.layout.prop(context.scene,"scn_property")

class OBJECT_OT_PropCopyButton(bpy.types.Operator):
  bl_idname = "prop.propcopy"
  bl_label = "Propcopy"

  def execute(self, context):
    sc0 = context.scene
    for sc in bpy.data.scenes:
        sc.scn_property = sc0.scn_property
    return{'FINISHED'}

bpy.utils.register_module(__name__)


Using Cycles Render engine with AMD GPU crashes Blender 2.83.5 Very new to Blender. When rendering a project and attempting to switch rendering device to GPU Compute, the program "loads render kernels" for about a minute and then crashes. Using a GPU with a Radeon RX 5600XT chipset updated to the latest driver at the time of posting, with Blender 2.83.5 installed. I have heard of numerous potential solutions including using previous versions of blender and different rendering engines, but thought it would be best to ask separately.
All Components Listed are Recognized:
GPU: RX 5600XT
CPU: Ryzen 3600
Blender: 2.83.5

As it turns out, Radeon GPUs have their own rendering engine for blender (Download Link). While this is not an exact replica of Cycles, there are similarities that make it a potential substitute.


How to align two differently rotated objects to be exactly side by side can anyone tell me the best way to exactly align plane 2 to the side of plane 1 in this blend file. It's like they are 2x4 lumber. Imagine plane 1 is in a fixed position, and my task is to line up plane 2 exactly side by side to plane 1. I made all the locations and rotations random just to see the best way to align
plane 2 with an arbitrary location and rotation of plane 1.
Thanks for any ideas for me to try.
Here's the .blend file:

Since these object's local axes are both aligned to their meshes, you can use standard align and snapping tools.. in 2.8, all in Object Mode:

Create a Custom Transform Orientation from the target (stationary)
object. (Orientation dropdown in the header, '+' with target
selected)
With the source (moving) object selected, Object Menu > Transform > 'Align to Transform Orientation'. Now your objects rotations should be the same.
Move the source object roughly into place, and with Snap (ShiftCtrlTab) set to 'Vertex', 'Closest' , with Align to Rotation switched off, snap the source object into place.

2.8 has lost a lot of standard keymaps, which makes this harder to describe than in 2.79.


BGE: Can I automatically switch to material view on run? I've recently been experimenting with the game engine and coming from exclusively using cycles there are a few things that I am trying to get used to.  The most annoying of which I find is that when I run the game it uses the same shading as the viewport.  This doesn't make sense to me since I am used to rendering being totally independent of viewport settings.

So, as I usually use solid shading in the viewport, if I want to see my materials I have to remember to switch to material viewport shading mode before hitting P.  Is there a way to have it automatically switch the shading mode to material when I run the game and back to solid (or whatever else it was) when I Esc. out?

You could split the Start/Stop keys into separate press/release actions... So P engages Material Shading then starts the game; and Escape stops the game then (re)engages Solid Shading.

The devil's in the detail of course, ie. typing exactly the right stuff into User Preferences » Input » 3dView » Object Mode P to start the game engine need only be changed from Press to Release, but the two compound shading actions are best done with two new entries.

Put wm.context_set_enum and space_data.viewport_shade in the first two boxes of both; then, to engage Material Shading with the first new entry, set the Value to MATERIAL and assign key P as Press; and to (re)engage Solid Shading with the second new entry, set the Value to SOLID and assign key Escape as Release.

I tested this out & it works nicely but it's still a good idea to backup your hidden User Preferences file so you can reinstate it if things get messed up). Several blender.stackexchange threads cover this.

Also note that a key's standalone release action will be triggered if a combining modifier (Ctrl / Shift / Alt) is released first.

So modifiers need to 'lag' and be the last key up. Unless the modifier is an adapted normal key, in which case clean key release may require 'cover' from an invoked on-screen dialogue.


How do I center the view at the origin without moving the 3D cursor? The shortcut I have always used to center my view is Shift +C, then Alt + Home. This moves the 3D cursor to the origin, then centers the view on the 3D cursor.

However, in some situations, I want to center the view at the origin without affecting the location of the 3D cursor, which I have set for rotation purposes, etc. Is there a different shortcut I can use instead?

You can use Alt+F to centre the view to your mouse pointer.

The exact behaviour you requested can be achieved with a little Python. Run the following in the text editor and add a view3d.view_center_origin key-binding of your choosing.

import bpy

class VIEW3D_OT_View_Center_Origin(bpy.types.Operator):
    bl_idname = "view3d.view_center_origin"
    bl_label = "Center view to origin"

    def invoke(self, context, event):
        v3d = context.space_data
        if v3d.type == "VIEW_3D":
            rv3d = v3d.region_3d
            current_cloc = v3d.cursor_location.xyz
            v3d.cursor_location = (0, 0, 0)
            bpy.ops.view3d.view_center_cursor()
            v3d.cursor_location = current_cloc
        return {'FINISHED'}

if __name__ == "__main__":
    bpy.utils.register_class(VIEW3D_OT_View_Center_Origin)


Can't texture a plane created using BMesh API I'm really new to blender (2.9) and I'm exploring its Python API. I'm also comparing the API with the normal GUI tools. At the moment I'm trying  to create a textured plane without the use of the function:
bpy.ops.mesh.primitive_plane_add()

The main reason is for experimenting purposes. For this reason I'm trying to use BMesh and so far i got this:
import bmesh
# Construct the bmesh cube and assign it to the blender mesh.
bm = bmesh.new()
bmesh.ops.create_grid(bm, x_segments = 1, y_segments = 1, size = 1.0)
#bmesh.ops.create_cube(bm, size = 1.0)

# Finish up, write the bmesh into a new mesh
me = bpy.data.meshes.new("Chessboard_Plan")
bm.to_mesh(me)
bm.free()

# Add the mesh to the scene
obj = bpy.data.objects.new("Chessboard_Plan", me)
bpy.context.collection.objects.link(obj)

# Select and make active
bpy.context.view_layer.objects.active = obj
obj.select_set(True)

The Plane is shown correctly:

I can give it a base color:

but I when i try to apply an image texture i only get this weird blue shade:

it should appear like this:

Is there something wrong with the way I create the plane and put it in the scene?

Add a UV layer.
Speculating that the issue here is having no UV map when assigning image texture. The blue colour seen in question is likely pixel (0, 0) of your image, since without a UV layer will use default UV value of (0, 0) for all
By default most faced add primitive operators create UV's by default
bpy.ops.mesh.primitive_plane_add(calc_uvs=True)

if creating with bmesh as in question code will need to create the UV map, either as below by adding as a bmesh loop uv layer
import bmesh
import bpy
from bpy import context

me = bpy.data.meshes.new("Foo")
bm = bmesh.new()
bm.loops.layers.uv.new("Foo")
bmesh.ops.create_grid(
    bm,
    size=1,
    x_segments=1,
    y_segments=1,
    calc_uvs=True,
    )
bm.to_mesh(me)

context.collection.objects.link(
    bpy.data.objects.new("Foo", me)
    )

or by adding a UV to the mesh when created
>>> C.object.data.uv_layers.new(name="Foo")
bpy.data.meshes['Foo'].uv_layers["Foo"]


How to add an Empty to all selected objects? I have about 30 planes and would like to add an empty to each one of them, is there a way to do it using python instead of having to do it manually?

For Blender >2.80 this will work.
Select all your objects and run this in the scripting panel.
import bpy

for object in bpy.context.selected_objects:
    obj_loc = object.location
    new_empty = bpy.data.objects.new( "empty", None )
    new_empty.location = obj_loc
    object.parent = new_empty # swap this line around to parent the other way
    object.matrix_world = object.matrix_parent_inverse
    bpy.context.scene.collection.objects.link( new_empty )

This will create new emptys at the object origins of all the selected objects, parent the object to the empty and remove any offset between the object and the empty.


Ctrl + B bevel not beveling from center of edge I remember solving this issue by changing the origin once or something, but now I don't remember what to do

 and when I CtrlB, it offsets the bevel

You look to be making a bevel of an already beveled edge, which isn't the same thing as beveling the two connected edges simultaneously. (That's probably the way to go.) If you want the two edges to be beveled to different widths, while containing the topology at the corner, you could do that with a Bevel modifier, by weight, and adjust the edge bevel weights, keeping an eye on the resulting topology. (Temporarily check 'Wire' and 'All Edges' in the object's display settings.)


Python 2.8 - image as plane problem The line of code worked in the past, but has stopped working now that I have had to replace the computer on which the code was originally written and tested. The error message is:

Calling operator "bpy.ops.import_image.to_plane" error, could not be found

The line of code is:

    bpy.ops.import_image.to_plane(files=[{"name":BackgroundFilename, "name":BackgroundFilename}], directory=BackgroundFolder)

The variables 'BackgroundFilename' and 'BackgroundFolder' are correct.  The file to which these variables refer exists and opens normally outside of python.

Checking the file properties, it is not blocked and everything seems normal.

Any suggestions would be appreciated.  Thanks in advance.

Enable the addon

Go to the user preferences and enable the addon "Import Images as Planes" to make the operator registered and available to scripts.

Related

Can an add-on be automatically installed and enabled?


Can't add loop cut with Ctrl+R When I try to add a loop cut by pressing CtrlR only a dot shows on my object instead of whole loop cut line. What am I doing wrong to cause this problem?

That happens if you are using the Loop Cut on an edge that isn't connected to the rest of the mesh.

Try selecting that lower edge and moving it down a little. If it is not connected then just delete it. If the edge you select is connected but you see that there was another edge hiding below it then select that edge and move/delete it.

Or you could select everything and from the Tools panel on the left and use the Remove Doubles tool.


Motion tracking, scene doesn't line up with tracked data. I fallowed this tutorial and watch some others. I used the video from the tutorial (the same one he used for motion tracking). I successfully imported the video, add the track points, and tracked them. When I set the orientation for the 3d scene it didn't really work. The camera was at a wrong angle the scene didn't really line up and the track points in the 3d scene weren't level like their supposed to be. The tracking points in the 3d scene did line up with the position of the original tracking point though.

Is there something I might be doing wrong missing a step or something?

About the tracking points level ... maybe you have not set up the camera settings properly. Matching the cam settings (lens, sensor etc.) to the real camera, the footage was taken with, once did the thing for me - which you always have to do to get a proper result.

Hope that helps.


Change Base Color of Paint Slot, or Delete Paint Slot When you first decide to texture paint an object, you are given the option of adding a paint slot.

You then can choose the base color to start out with.

But what if you later decide that you want to change the base color you started with?  Are you able to change it without losing the texture painting you've done?  It's understandable if this isn't possible, but I can't even figure out how to delete the paint slot and start over.  At least that should be possible!  Anyone know the answer to this?

You can change the base color.

Starting in Blender 2.8, the UV/Image Editor has been separated into two different Editors:

the UV Editor and
the Image Editor

Let's look at you what happens when when you're in Texture Paint Mode and you make a new Texture Slot, and how to change the color later on.
All hyperlinks below link to the Blender v2.83 Documentation.

Setup :
In the following example, I resized the default cube, and sculpted a crude rock.No materials nor textures have been applied. No other changes yet.

1st step, Add a Base Color to the Texture Slot :
In the following picture, I have four Editors open in four Areas1,

Image Editor
3D Viewport in Texture Paint mode
Outliner in the upper right
and the Properties Editor

Look at the Properties Editor.
Under the Texture Slots Panel, it says "No Textures" by default. Click the [+] button and click "Base Color" in the Context Menu. You can click the field for "Color" and select the base color for the Texture Paint Slot from the Color Wheel (shown in this next image).

Not shown in picture: I then renamed the Texture Paint Slot "Base Color for TexturePaintSlot", to make it apparent when we find it later.

2nd step, Find where this color data was saved :
We can now see that the mesh is displayed with a different color in the 3D Viewport's Texture Paint mode. We see this same color in the preview square to the left of our newly created Texture Slot, but it is nowhere else in the entire Properties Editor.
So where is this information stored?

If you don't have one already, open an Outliner Editor.

Once the Outliner is open, click the "Display Mode" button in the Editor's Header (next to the "Editor Type" Button) and select either Blender File or Data API. Each are shown in the following image.
Here we see the name we typed ("Base Color for TexturePaintSlot")
nested under Images.
The data we just created for the Texture Slot is an Image.

3rd step, Change the Color :
Open the Image Editor and click the dropdown for "Browse Image to be linked" and select the name of the Texture Paint Slot created in the 1st step above.
Note, this means you are "linking" the image into the Image Editor. Similar to how if you change Scenes using the Topbar2, the tooltip displays "Browse Scene to be linked". If you'd like to know more, read about Data-Block Menus3.

To change the color of our Texture Paint Slot image data:

Change the Image Editor's mode to Paint.
Select the Fill tool in the Toolbar.
Change the color for the tool.
Click on the image.

Concluding Remarks :
It would be nice if we were able to change the color by clicking that little preview square in the Texture Slots Panel, especially if you change your mind and just wanted to make a small tweak.
But for now this is a fairly straightforward way to change the base color (once you understand how the datatype works).
If you'd like to non-destructively change the color, simply go back to the 1st step above, add a new Texture Paint Slot, and select it in that Texture Slots panel. Then follow the rest of the steps and modify your new slot instead.

Links to Blender v2.83 Documentation for further reading :
Areas1 :
docs.blender.org/manual/en/2.83/interface/window_system/areas.html
Topbar2 :
docs.blender.org/manual/en/2.83/interface/window_system/introduction.html
Data-Block Menus3 :
docs.blender.org/manual/en/2.83/interface/controls/templates/data_block.html#ui-data-block


Multiple instances of same image node? I'm working on a material for redistribution, and my node setup uses a single black and white mask with different vector inputs to fake a normal map for a simple embossing/debossing effect.

The change in the vector input does two things: it takes care of the different positioning of the images, and a blur effect, both required for the normal map.

I'm aiming for ease of use, so I really don't want to make users manually update the image path of every single texture node when they use the material with their own maps.

An alternative solution would be to alter my methodology, but I also want to avoid forcing them to bake true normal maps to use the material because users won't be blender-savvy to know how go from an height map to a normal one. Using the mask for displacement is off the table, since it didn't yield good results with bump alone, and using adaptive subsurf on the model can be very demanding of the users' computers. The effect isn't worth the processing cost.

I found a similar question with an interesting solution, which unfortunately doesn't help me at all because it's generates an this image OR that image output. I need an AND output, something that enables me to have all images outputs simultaneously in the same mesh.

The obvious solution for me would be drivers copying the image path from somewhere else, but no luck there. Then I tried to find a way to modify the mapping after the image texture running it through a third node containing vector and image inputs, but nothing as well.

Ideas?

I may have just invalidated the rest of my answer as I realised you can just edit the Source property of an image from the Node Editor's Properties Shelf (N) when you have an image node selected, which will update all image nodes that share that image:

This is because when you duplicate an image node the image is instanced (shared). When you edit the Source property you are editing a property on an existing image, so the other nodes that use that instanced image see the changes. When you normally browse to a new image you break the connection to the other intances so they don't update.

So, you can inform users that changing the Source property in the Properties Shelf on one image will update all the relevant images, or you can look at my original answer, below, for other solutions.

Original Answer

My suggestion would be to group the Image node within a group, with the Vector as input and the Color and Alpha of the image as output:

Whenever you need to use the same image you add the node group instead:

Obviously, this still doesn't usefully expose the image path to the user, but at least they only have to change the one image (because all other image groups will also update).

You could even place an additional one of these group nodes in a more accessible place in your node tree with instructions that this is where you can change the image (instead of the user having to dig through a particularly complex node tree):

(The description comes from a text file, so this may or may not be suitable for your situation).

An alternative solution is to provide a small script along with your material that has an interface for providing a new path which then updates the node's filepaths.

For example:

newFilepath = "C:\Filepath\To\Image"
bpy.data.materials['MyMaterial'].node_tree.nodes['Image Texture'].image.filepath = newFilepath

This changes the filepath for the image on the MyMaterial material.

If you have questions about how to provide an interface for selecting a file and returning a filepath to your script you can either ask a new question (or search this site for Existing Questions).


How to scale properly HDRI image, to be used in ASC-CDL HDR render? I've been test rendering lighting my scene using HDR images, trying to get the right value of light and shade from. The problem is, no matter what I do, I can't get the full spectrum in one image, meaning from red to violet. I've been using the Fake Colours Look in order to scale the HDRI with no luck, most of the values I'm getting in the rest of the image are Cyan, which is mid-range.On the other hand, when I make my own HDRIs in Blender, I'm getting acceptable results, with all the spectrum range showing in the Fake Colours Look! Is it a problem with the HDRI images I'm using, or is me not knowing how to scale the HDRimages properly?
The image below shows a render using strength value of 1.0 with Colour Balance Node set to ASC-CDL, values set to default, Offset:0.0, Power:1.0, Slope:1.0
The image below shows the same render using Colour Balance Node with extreme values, Offset: 0.01, Power: 2.0, Slope: 1.3, I cranked it up just to get some gradation in the image, as you can see, most of it is still Cyan "mid-range", couldn't get any near red values, which is why there are no highlights on the model, and the dark areas are spotty.
I made this render to explain the problem, no matter how much I crank up the strength value in the HDRI map, I'm not getting any highlights "red value in the Fake Colour Look" even where the sun is!! I tried so many HDRI images, I can't even remember how many, this one here is supposed to be one of the best HDRI images available.
Check the images below for the parameters I'm using for Colour Management and Compositor Colour Balance node.

I'm quoting here "
Clamps are dangerous creatures." @troy_s
The problem was that I had value in the clamp direct and indirect under Render>Sampling, so what happened is that Cycles was clamping all values above 1, while I was trying to get the sun brighter with no luck!! Lesson learned the hard way.
But wait, this is only part of the issue, this solved the high value absence puzzle, but not the absence of gradation.
Long Answer short, this is how it was solved, no need to say that the following parameters are obviously not a magic number to go with for every HDRI, since every HDRimage, good and bad ones, has it's own unique values and light conditions:
1- HDRI map strength: 18, yes I know it's crazy, but we're dealing with High Dynamic Range, we need a bed big enough for all the values of the HDRI to fit in. Just like the story, this is the Mushroom that made Alice grow to her size.
2- Slope value in Color Balance node in the compositor: 0.18, yes even more crazy, this is the mushroom that made Alice small enough to fit in the display reference door, remember that the mushroom made Alice shrink, proportionally, it didn't chop her off to pieces.
3- Power value in Color Balance node: 1.8, convex f-curve to distribute the values from high to low in a way that gives enough space for gradation.And here's the result.No LookFake Colors Look

Of course these values would work for this particular HDR image, not necessarily a rule, but as a rule of thumb, I guess I'll be using high value for HDR image, and crank it down using the slope value, and expand the curve using a power value higher than 1, in order to make a concave easing out curve.

Finally, I'm not a tech person, and I know my description above sounds funny, on the other hand, the values still need some tweaking because there are still some white spots, which refer to over exposed areas, but at least I'm very close to achieve a good result. If you check the answer in this link is way more descriptive of this case, and in much better way. Following the instructions in this link, 14.5 is more accurate range for a standard case, for a standard HDR image.  Furthermore, here are some experiments I did with other HDRimages:


Face disappearing when imported to Unity (Not Normals) I have search through multiple threads for an answer to this, but I can't seem to fix it. I am having a problem where a face in my model is disappearing upon being imported to Unity. I checked my normals, and the face's normal is going the right way. I have attached the .blend file. Any help is appreciated! The face not showing up is the left eye when you are looking at it from the front. Thank you!

.blend file

Try exporting it to an FBX file, and then importing it into Unity. It worked for me, and it seems like the .blend import is broken somehow.


Unwrapping turns out really bard I relatively new to Blender, and try out things. As you can see on the image below, my Unwrapping disastrous.

How can I fix it, and what caused this problem?

Thanks for any help!

So you don't want the top and the back to be disconnected from the front, right?

In that case, clear the seams from these two edges I painted blue:

You can do so by doing in Edit mode: Right click + Clear Seam. Then, unwrap the UVs again.

Notice how this model looks if I mark the top edges as Seam:

And notice how it looks by clearing the seam:

When you mark a seam you are telling Blender it's OK to disconnect that part of your object from the rest, so only mark them in places that you don't want connected on the resulting UV mapping.


Is there any difference between "triangulate faces (Ctrl + T)" and "triangulate modifier"? Is there any difference between "triangulate faces (Ctrl + T)" and "triangulate modifier" ?

Traingulate modifier is non-destructive (it's a modifier) and you can choose which faces to triangulate based on their number of edges (i.e in some case you only want to triangulate ngons but not quads, like after a boolean operation that leave you with a messy mesh a part of your object and you don't want to spend time fixing it)


Static states blender game I am using blender game
How can i do an action on my caracter, as a static state (without any action on the keyboard) ? In order to get an initial state to my character.
Thanks.

The BGE is event driven. The initial event is the "object is created" event.

That can be measured with an always sensor. For example you can activate an action actuator after the object was created.

To ensure the any long running actuators are deactivated after the first frame enable the [Tap] switch at the sensor.

When you use the build-in state machine I suggest to measure when the state changes to the waiting state. A sensor measures state changes when the [Level] switch is enabled. This means the always sensor triggers on state change not just on object creation but on state change too.


Replacing part of an object's name with object.name.replace? So this is a fairly straight forward thing I want to do. Basically I've got a mesh named XXXX_HP and I want it to find the "_HP" and replace that with "_LP"

I've looked through the various object.name functions and object.name.replace() seemed the most obvious to use, but it doesn't seem to do what I expected it to do.

import bpy

bpy.context.object.name.replace("_HP", "_LP")

Replace is a string function that comes from python's string object.
Since an object's name is a string property class, that inherits some props and methods from python's built in string class, it also gets the replace method.

The string replace method doesn't replace in place, but returns a string with the replacement applied. Which means that what you actually need to do is:

bpy.context.object.name = bpy.context.object.name.replace("_HP", "_LP")


Auto-Rig Pro Hand Rigging Issue thanks for taking the time to read my question.
I'm trying to use an addon in blender called Auto-Rig Pro, which, as the name suggests, automatically rigs your mesh. Everywhere in the model it does a pretty good job, you pinpoint the shoulder, neck, chin, spine root, ankles, and wrists, and it rigs pretty darn well.
Only problem is the hands look a little bit wonky and sense I'm pretty new to rigging entirely I'm not sure if this is right or completely wrong, any help would be greatly appreciated! View the image below to see what I mean:

If you study the bones of a hand, you'll see that what we think of as the palm is really just the base of all the fingers connecting almost directly to the wrist. These bones should follow a similar structure.
I have literally just finished sorting out the hands in an auto-rig and this is what I had to do. This is in the step before you bind the rig.
In Edit Mode move each bone end to a knuckle or joint, near the top (the muscles are mostly underneath the fingers rather than uniformly surrounding the bone, and on top the bones are closer to the surface). Also it's a good idea to Ctrl +  R rotate each bone so that the Z axis goes through each joint, that way you won't get wonky gimbals after it's finished rigging.
Also check the rest of the rig this way to make sure everything is going to move as you want it to. Then hit Bind and it should be fine.


Efficient method of inserting an image into the horizon of handheld footage I'm doing the special effects for a video where I need to insert an image of a submarine into the horizon (where the question mark is):

At first, I attempted to do a full 3D Motion Track.  I properly tracked as many points as I could, but when the camera motion was solved for, it was extremely jumpy.  So then I decided that since most of the motion in the video is 2D that I would only use two tracks, and then take the image of the submarine and apply the 2D stabilization node to it.  I'm kind of surprised that it stabilized the video perfectly (including rotation), but when I used the node to translate the submarine placeholder image, it slid around quite a bit.
The effect it had can be seen in this video:
https://youtu.be/jHQHfG-YaI8

So the next thing I did was use one of the tracks, create an empty for it, import the image as a plane, and make the empty a parent of it.  This worked excellent for translation of the image, but it did not take into account the rotation needed to fit nicely into the video motion (which is normally calculated with a second tracker so that rotation can be stabilized in normal 2D stabilization).  How is it possible to properly accomplish the desired effect?

Terrible shot to track, since everything is moving (the character, the waves and the camera). There are hardly distinct features to compute any parallax, lens distortion or extract any spatial information. 3D tracking and reconstruction are not going to work here.

On the other hand because there is so little to go by, any errors on the composite will not be as noticeable... so a 2D solution might indeed work.

Track just two points on the sky an the clouds, they are about the only thing that will not change from frame to frame. One tracker on the left side of the frame an one on the right . That should give you enough information for 2D stabilization.

Use both trackers to stabilize the shot (with the trackers selected press the + sign to the right of the 2D stabilization box)

Make sure you don't use Autoscale.

and use only one to compute the rotation:

The trick now is doing the rest in the compositor: Instead of stabilizing the shot you want to make the 3D scene move (and rotate) in the opposite direction as the stabilization, and thus match the movement of the camera...

A node setup like this would work.
Where you first flip the render layer, stabilize it and scale it to -1 (flipping it again it and making it move like the camera) before compositing on top of the movie clip.

Now, how do you match the perspective? you'll have to guesstimate a bit. or use the technique from this answer: https://blender.stackexchange.com/a/40330/1853 using the background image as a reference and moving the camera using Lock Camera to View...


can't find image texture node in node editor As you can see screen capture I took, I can't find any image texture in the add menu.
All the videos I saw, there was an image texture node in Add > Texture > Image Texture, but I even can't find the first depth.

version is 2.78

Based on the node I see, you are in Blender Internal Render. If you switch to Cycles and add a new material, you will find the Add > Texture > Image Texture.


How to use script get event 3D Cursor(Position) change in Blender 0
down vote
favorite
I can't find event change Position 3D Cursor when I left mouse click new position on the TOP screen.

When click change other position, system auto print new location(x,y,z).

Now i using bpy.context.scene.cursor_location : get the cursor location

I can't find event change, please help me

Thank you so much!

You can use a handler to detect that.

Here I propose a little addon that demonstrates it:

The code contains:

A panel to start and stop the listening (the panel is in the scene properties)
Two operators: one to start and the second to stop
An utility class that handles various scene data changes

To use this utility class, you'll need to instantiate it giving the following parameters:

A context (for instance a scene)
A string corresponding to the data path to reach from the context (for instance 'cursor_location')
A function able to compare old/new values to check the changes
A function to call if there is a change
A flag indicating if the value is to be copied (in order to avoid 'pointers effect')

Here is the commented code:

import bpy
from mathutils import Vector

#A class that takes into account a context and one of its attributes value
#If the value changes a callback is fired
class EventWatcher:

    #Set of watchers
    eventWatchers = set()

    @staticmethod
    def AddWatcher( watcher ):
        EventWatcher.eventWatchers.add( watcher )

    @staticmethod
    def RemoveWatcher( watcher ):
        EventWatcher.eventWatchers.remove( watcher )

    @staticmethod
    def RemoveAllWatchers():
        EventWatcher.eventWatchers.clear()

    #From 'context', 'path' needs to exist
    #'comparer' is to compare the previous value of context.path to its new value
    #'callback' is the cb called if the value if changed
    #'copyValue' indicates if the value needs to be copied (that can be needed as if not old and new value may point onto the same object)
    def __init__( self, context, path, comparer, callback, copyValue ):
        self.context = context
        self.path = path
        self.comparer = comparer
        self.callback = callback
        self.copyValue = copyValue
        self.currentValue = self.GetValue()

    def GetValue( self ):
        value = getattr( self.context, self.path )
        if self.copyValue:
            value = value.copy()
        return value

    def Fire( self ):
        newValue = self.GetValue()
        if self.comparer( self.currentValue, newValue ) == False:
            self.callback( self, newValue )
            self.currentValue = newValue

#Global loop on the watchers. This callback responds to scene_update_post global handler
def cb_scene_update(context):
    for ew in EventWatcher.eventWatchers:
        ew.Fire()

#To stop the calls at the scene_update_post event level
class StopCallback(bpy.types.Operator):
    bl_idname = "scene.stop_callback"
    bl_label = "Stop Callback"

    @classmethod
    def poll(cls, context):
        return cb_scene_update in bpy.app.handlers.scene_update_post

    def execute(self, context):
        bpy.app.handlers.scene_update_post.remove(cb_scene_update)
        return {'FINISHED'}

#To start the calls at the scene_update_post event level
class StartCallback(bpy.types.Operator):
    bl_idname = "scene.start_callback"
    bl_label = "Start Callback"

    @classmethod
    def poll(cls, context):
        return cb_scene_update not in bpy.app.handlers.scene_update_post

    def execute(self, context):
        bpy.app.handlers.scene_update_post.append(cb_scene_update)
        return {'FINISHED'}

#The panel is located in the scene properties
class SceneEventsPanel(bpy.types.Panel):
    bl_label = "Scene events"
    bl_idname = "OBJECT_PT_scene_events"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.operator("scene.start_callback")
        row = layout.row()
        row.operator("scene.stop_callback")

def register():
    bpy.utils.register_class(SceneEventsPanel)
    bpy.utils.register_class(StartCallback)
    bpy.utils.register_class(StopCallback)

def unregister():
    bpy.utils.unregister_class(SceneEventsPanel)
    bpy.utils.unregister_class(StartCallback)
    bpy.utils.unregister_class(StopCallback)

if __name__ == '__main__':
    register()

print( '--------' )

#Example:

#The comparaison (for cursor location, it is a vector comparison)
def CompareLocation( l1, l2 ):
    return l1 == l2

#The callback to execute when the cursor's location changes
def CompareLocationCallback( watcher, newValue ):
    print( 'New value', newValue )

#Install the watcher which will run the callback
EventWatcher.AddWatcher( EventWatcher( bpy.data.scenes[0], "cursor_location", CompareLocation, CompareLocationCallback, True ) )


How to keyframe Ocean Modifier Resolution? Is it possible to keyframe the resolution of the ocean modifier if so?! How? I'm trying to create a land that will wave like its been hit by an earthquake...

As @Gorgious mentioned use the wave modifier. This example has the Speed and Height set as keyframes, but just experiment with all the settings as it depends on what exactly you want.


Subsurface Modelling method And Advice (PS4 joystick) I tried to venture into subsurface modelling to start practising and gain more knowledge. My aim
was to try using the tools and methods which I have learnt the past 6 months learning Blender.
So my final result doesn't look the best. So I wanted some advice what would be the proper or correct
method to have had a better result of this PlayStation control.

The initial top sample had less loop cuts which gave a better shape and clean mesh, but the more I was adding loops to get the bevelled circle bumps the more unclean it would look resulting in bad topology.

So what would be a better method to get a better result?

Thank you.

Maybe you should begin with the top face as a blueprint (try to follow the shape as much as possible so that you'll easily add edge loops if needed), then extrude up to give its volume, move the edge loops, etc, like that:

But you can also begin directly in 3D, roughly model the whole shape, then use the knife to bring details and additional edge loops:


Too big (in memory size) STL exports I recently exported one of the Dota 2 characters after applying all the displacement masks to give all the skin and scale textures to the character.
The whole character was divided into 6 parts and each part has to b subdivided and then the displacement has to b applied to give better effects.
I worked on Pudge and after all the tweaking the stl file exported was of 1.8GB,
yeah GB,
What to do , none of the 3D printing services around me are able to open or print the file , it taking too ling to even open and in most cases the 3D printer software crashes.

Even blender is not responding when importing the same stl file

I once had a complicated mesh that was too big for blender. I ended up using MeshLab to simplify the mesh. It might be worth taking a shot. Here is a tutorial on simplifying a mesh.


How can I add a texture to a specific face? I have a cylinder (imported from Creo, in .obj), to which I've added a material, steel and rendered it. It looks great.

I've now cut it in half, and want to see a different texture on the cut face, how do I do that in Cycles?

I tried diffent tutorials from that site but doesn't work with Cycles and imported .obj.

Here is an outside view:

Then, when cut, the blueish part should show the cutting tool path leaving marks in the metal.

Marks or scratches could be like this.

Okay, I think I found a way (since unwrapping doesn't seem to work for me).

Select the part, go to edit mode, do a Ctrl+Tab and choose Face
Then select the face of the part I want to add texture to (there's a bunch of little triangles that need to be selected)
Next, assign a new material to that face, and deal with texture in Nodes.


Can one modify Fly mode in blender to be active on press/hold of a key? In the Unreal editor, when you hold down the RMB, you can use the mouse to rotate the camera and WASDQE to move around in 3D space. When you let go of the RMB you effectively deactivate Flight mode.

Can one set up something similar in blender? I have a gaming mouse with extra buttons so it would be handy to have a "activate on press" and "deactivate on release" for say the 4th mouse button in blender.

I find "Fly Mode" indispensable in other software but I find the activation and deactivation in blender to be really clumsy.

Is it possible to customize it the way that I'd want?

Sadly, I don't know of any way to customize it the way you want.
But you can at least assign the command to your custom mouse button.

Press Ctrl + Alt + U to open the Blender User Preferences. Go to the Input rider. You can edit the hotkeys in this context. Expand the 3D View > 3D View (Global) area.

Locate the View Navigation entry and change its hotkey to your mouse button.

With the button you enter fly mode.

You exit and confirm with the left mouse button.

You exit and abort with right mouse button.

Lifting one button couldn't differentiate between those to actions.


No texture when in render mode? Forgive me if this is a silly/easy to figure out question, but I couldn't find anything... I tried the clear all restricted render option and had no luck so figured I would inquire here as google was of no help.
Camera view:

Post-rendering:

Thank you in advance.

Right click on your material,go to texture and check the empty boxes.Hope it help.