How to darken crevices/grooves/engravings

I mentioned Pointiness in the comments and you said you tried it; the thing with Pointiness is that it's a bit hard to handle so you really need to "crush" the value down in something like a Color Ramp.  In this image, both of the stones are exactly the same model, but on the right hand side is the node graph you see below.  Note how the words are visible on the right and invisible on the left?  I squeezed the pointiness values in on both sides of that Color Ramp:

This might not be the exact solution you want, as the bumpiness of the surface and the edges of the stone also show up in my example due to the pointiness, but if you tweak that color ramp you might get the result you're after.  You can also tweak the Mix node to make it more or less subtle.
You can also try the "Advanced Pointiness" from that link I shared in the comments above.  It gets rid of the spottedness and might be more what you're looking for:

Where I have that "Noise" texture that would be where you put your actual texture; I just did that to give the cube some kind of texture.  To adjust the darkness, you can change that -10 to anywhere in the range -10 to 10 based on how sharp you want the color.  0 would be gray and likely invisible.


How can I open an image with a Python script in Windows?

Looks like a bug, it works in Blender 2.78c – I've reported it here: https://developer.blender.org/T53446

Update: Fixed in 2.79a: https://developer.blender.org/rB5b3c15e3363aa7bea5d26c56191b7e8e74021868


How to get diffuse color of a material via Python?

Python language itself is only a small part of the whole experience. You should expect Blender's and Maya's Python APIs to be very different.

The materials are assigned to material slots of objects in Blender, every object's faces have material indices matching those slots.

You can reach your selected objects using context. That would be bpy.context.selected_objects. You can loop through them.

Faces are stored in object's data, so, you would need to work with a specific object for example first one from the selection bpy.context.selected_objects[0].data.polygons. You can loop trough them and see material indices:

import bpy

for face in bpy.context.selected_objects[0].data.polygons:
     print('Material index of face ' + str(face.index) + ' : ' + str(face.material_index))

You can change material indices, but you do not need to do that if you only want to assign a material to an object. You can just add a material to an object as described here that will create the slots automatically. You can see material slots bpy.context.selected_objects[0].material_slots and materials assigned to them bpy.context.selected_objects[0].material_slots[0].material.name

You can also reassign materials to material slots. Materials are stored in bpy.data.materials so let's say you wanted to change an existing material that is assigned to the active object's already existing second material slot with one that is called 'Material':

import bpy

obj = bpy.context.active_object
material = bpy.data.materials.get("Material")
obj.data.material_slots[1].material = material

or you could just make a new slot:

obj.data.materials.append(material)

By this point I am sure you are frustrated about how in the world one is supposed to know where what is in Blender's Python API. Well there is a nice structure there that you can explore easily with the auto complete function of the Python Console in Blender. Just start typing and hit ctrl+space:

You can see everything there. That is how I found that faces have material indices:

For functions and operators you can just use Google, that will most likely point you to Blender Stack Exchange or Blender's Python API documentation that is really useful.

You can also explore Text Editor's Templates menu for examples and also every single add-on that you get your hands on is a great resource for learning.

Edit: Oh, I forgot to actually answer the question. You can get the diffuse color of your selected objects like this(assuming you use Cycles and you use nodes in the materials):

import bpy
C=bpy.context

for o in C.selected_objects:
    if o.type in {'MESH', 'SURFACE'} and len(o.material_slots) > 0:
        i = 0
        for s in o.material_slots:
            if s.name:
                print('Object ' + o.name + ' has a material "'
                      + s.material.name + '" in slot ' + str(i)
                     )
                if s.material.use_nodes:
                    for n in s.material.node_tree.nodes:
                        if n.type=='BSDF_DIFFUSE':
                            print("The color of it's Diffuse BSDF named '"
                                  + n.name + "' is "
                                  + str(n.inputs[0].default_value[:])
                                  + '\n'
                                 )
            i += 1


After searching for some time I found that there is no such function in blender, so I tried to make an add-on that provide this function.

https://www.youtube.com/watch?v=IwE1PQiqCb0

Thanks for the help :)


Cannot pass arguments to Python script when executed by blender.exe

You can't use

return parser.parse_known_args(sys.argv)

Because what you have in sys.argv is '-- --input-folder...'
Instead, cut off the '--' from the string.

return parser.parse_known_args(sys.argv[sys.argv.index("--")+1:])


OpenCL rendering with Cycles is relatively young in Blender and largely experimental at this point. It is still feature limited, unstable, and prone to crashing as it currently stands.

Can you provide a blend file that crashes?

Try upgrading your graphics drivers, restarting and see if the situation improves. Otherwise it is probably a bug and should be reported in the bugtracker.


Bake indirectly to custom property

If you add a custom property, in this case on the cube, give it a keyframe,  Note make sure to set the maximum to more than 1 when defining the custom property

Bake your sound to custom prop.

Drive a value with the custom property. Here I'm driving z scale of the cube

Can type a driver expression straight into property box. Initially a hash # signifies it to be a driver.

In 2.79, switch graph editor to drivers mode.

Because I used the same object that has the custom property as the one who's scale I wish to drive I can use self in drivers.  Note since use self is not default, have to set this manually, and will need to update dependencies, since without use self, it doesn't know itself

The driver expression is

1 + self["prop"]

returning a minimum of one when the bake is zero.

Can amplify, etc

1 + 20 * self["prop"]

Or to make things more interesting. add two more custom properties.

self["min"] + self["amp"] * self["prop"]

allowing the animation of the minimum the amplification.

If you know the maximum of the fcurve can use a generator or an envelope to adjust.

What's the range of values on a sound-baked f-curve?

How can you invert an F-Curve

Please Note, the now-defunct sound drivers addon was my first addon project.  I have it way back on the back burner, and am replacing it with a third party module aubio version.  Check out the site, baking sound is much quicker with aubio


I had this same issue.
I discovered I had two versions of python installed and after deleting the oldest version, my issues were resolved. Do the same and hopefully it works.

To check if you have multiple versions of python installed you can go to the command prompt window and enter C:\Users\YourUserName>py -0 and it should list all your current installs.


How to modify mesh after sculpting with multiresolution modifier?

The Multires modifier does not like changes on the low-poly base mesh very much. It can mess up the high-poly levels and add spikes and other abnormalities.
You can try to select and separate the new extruded mesh, remove the Multires modifier from the separated mesh, then join it again with the body object (that has the Multires modifier). Make the body object the active object (selected last) to keep the Multires modifier.
If this doesn't work then it's time for plan B.
Plan B: Shrinkwrap
Make a copy of the original unchanged object, remove the Multires modifier from the copy, add the inside of the mouth to the copy, add the Multires modifier. Finally, add a Shrinkwrap modifier and shrinkwrap it to the original mesh to transfer the sculpted details. For a better result use Wrap Method Project, and tick the Negative checkbox (project direction). Then apply the Shrinkwrap modifier.
Example videos:

Blender Sculpting Tutorial: Full Advanced Creature Creation Workflow
Projecting High-Res Models in Blender 2.8 using Shrinkwrap  (use a Multires modifier not a Subdivision Surface modifier like in this video)


Soft body collisions give missing cache error

Not exactly a general solution to the missing cache error but I solved my problem.

I think the error has something to do with the physics simulations running with all the separate meshes that have no physics modifiers attached to them alongside the meshes I'm interested in that do have the physics on.

I solved this issue by using collision groups so that each mesh only interacts with those that it overlaps with anyway.


Transparent image planes in cycles have strange borders

Seems like there is some aliasing issue with your alpha channel.

I can see two solutions:

Change the texture interpolation from Linear to Closest.

If that doesn't work try adding a Math node to the alpha channel and set the mode to Greater than and the value to .5


audio track and video track are not the same length

When you import a video with audio into the sequencer, the following happens:

The video and audio are split into individual tracks, so they become effectively separate entities.
The audio track is imported into the sequencer while respecting the total play-length of the audio, So there is no pitch shift. (Basically, the audio is never sped up or slowed down, it will always sound right)
The video is imported frame-for-frame at the Frame Rate set in Blender's render panel, this means there is no frame interpolation or frame dropping going on.(Basically, the video will always play frame-by-frame, so it will be sped up or slowed down if the source video does not match the Frame Rate setting in Blender)

This has the unpleasant effect that if you import a 10 second video that is 24fps into Blender's 25fps timeline, the audio will last 10 seconds, but the video track (which has 240frames) will be squeezed into 240/25 = 9.6 seconds, hence the mismatch.

So, if all your source videos are the same FPS, then just set the Blender fps to that number, and you should be fine. If you have source videos of different FPS, then you can use the Speed Control strip to adjust the timing of each.


I've only a week ago done a basic but effective looking snowfall. I'll try and place the Blender file up here.  I used two emitters, one for distant flakes and another for closer and a circular variety.  The Blender file  (just over 3 MB)...

As for directional flow, go to the emitter's "Velocity" tab and drag X, Y or Z values to suit.  You can also turn gravity off if desired.  You'll find that under the "Field Weights" tab further down.

As snowflakes can flutter on the way down, I've adjusted the Brownian value in the "Physics" tab.

Apologise for the missing texture files - tried to pack them into the Blender file but it kept coming up with "cannot find errors" even when I moved the files into the project's folder and re-saved.

Everything you need is still there and the snow still works though. (CTL-A)

Screenshot -


How to implement joystick rotation in BGE?

How about give an empty a joystick sensor to drive a message actuator with an appropriate subject, then give your character a message sensor to pick up the message and drive a motion actuator?


"Install from File" not working to install addon

Sometimes when you download add-ons from the internet the files are saved as HTML code and not as text files, so Blender has no way to interpret them.

The error might be caused by using the save otpion from the browser and not using the link on the page that triggers the download of the correct file.

To make sure your Python scripts are in the right format you can open them in a text editor, which preferably supports python syntax highlighting.

It should look like:

And not like this:

Another common error is when the addon is contained in a .zip file instead of on a single .py file. If you unzip (or decompress) the file, you are left with a folder that contains many more files that are not easy to install manually. In such cases install directly from the .zip file instead of decompressing.


Have you tried to invert normals for the object? I had problems with darker objects when worked with materials, and there was a problem with normals.


How do you reference a scene property by name?

getattr(obj, prop, default)

A custom bpy.props.prop property only has an ID property obj["prop"] once the value is assigned obj.prop = value.  If it hasn't been assigned it returns the default value set when defining the property.

value = getattr(obj, "prop", None) is the equivalent of value = obj.prop if "prop" is an attribute of obj, None otherwise.

import bpy
context = bpy.context
scene = context.scene
for n in range(1, max_number):
    test = getattr(scene.test_vars, "line_%d" % n, None)


how to unparent objects without everything moving?

alt P (Clear Parent) > Clear and Keep Transformation. Otherwise the child will come back to the position it got before the parentage.


Why does the screen turn completely white in render view when using 2.8 eevee?

This may be too late, but someone might find it handy if a search lands them here.

I just had this issue. My computer crashed and when I re-opened the file I had been working on, everything was white. Zooming way out made it seem like it was a giant bloom effect in the middle of the scene.

I tried reopening the file multiple times without luck, but what did fix it was opening a different file. I spent a moment panning around that scene, switched render views, then re-opened the file with the issue.

The bloom was gone, so I assume it was just bug that was cleared when I opened the other file.


I've had some luck with this workflow, it still needs some polishing though.

The steps are as follows:

Choose a surface to deform(in this case the plane)
Use cell fracture add-on to brake up the plane (Note that you should probably add a solidify modifier to it first).
Add a hook modifier to the plane object for every generated fracture (very important... and tedious). It can help to create a vertex group for each shard and then just go into weight paint mode loosely paint that shard onto the plane.
Turn off gravity in properties panel under the scene settings, this is vary important for the simulation to work properly (also because metal deformation isn't really effected by gravity it shouldn't be of much consequence).
If we are going to deform metal then we need something to deform it with. A sphere will work fine for know (any object will work). After you have an object then set it as a rigid body object in the physics, then check the animated check box:
Now we need to animate the sphere, Of course the animation part is all up to you (so long as the sphere intersects the plane). This is what I did, add a keyframe on the first frame in a high position, then add another keyframe on about frame 15 with the ball intersecting the plane.
Set the shards as rigid body objects.
Now it's time to run the simulation. Make sure that the shards, sphere and plane objects are all on the same layer(or at least visible), and press play. You will probably need to stop it around frame 12 or so before the dents get to deep and weird looking.

And here is the final result!

Hope this helps someone out there, it took me awhile to figure it out and it still needs polishing but I think that it has a lot potential.

blend file link: example blend


All you really need to do is change the current frame (via frame_set).

import bpy

C = bpy.context
jump = 5 #however many frames you want to jump
C.scene.frame_set(C.scene.frame_current + jump)

These few lines will move the playhead 5 frames ahead. That is all it takes to do that. To make the button takes a bit more python.

This script creates a property to store how many frames you want to jump. It creates an operator, which does nothing more then the script above. Finally it adds a button and number input to the header of the timeline.

import bpy

class FrameOperator(bpy.types.Operator):
    """Jumps from the curent frame the amount set in scene.frame_jump"""
    bl_idname = "frame.jump"
    bl_label = "Frame Jump Operator"

    bpy.types.Scene.frame_jump = bpy.props.IntProperty(name="Frame Jump Count", default=5, min=-499999, max=499999, description="Amount to jump from the current frame. Can be negative. Used in bpy.ops.frame.jump()")

    def execute(self, context):
        bpy.context.scene.frame_set(bpy.context.scene.frame_current + bpy.context.scene.frame_jump)
        return {'FINISHED'}

def draw_frame_jump(self, context):
    scene = context.scene
    layout = self.layout

    layout.prop(scene, "frame_jump", text="")
    if scene.frame_jump > 0:
        icon = "TRIA_RIGHT_BAR"
    else:
        icon = "TRIA_LEFT_BAR"
    layout.operator("frame.jump", text="Jump " + str(scene.frame_jump) + " Frames", icon=icon)

def register():
    bpy.types.TIME_HT_header.append(draw_frame_jump)
    bpy.utils.register_class(FrameOperator)

def unregister():
    # remove header menu
    bpy.types.INFO_HT_header.remove(draw_frame_jump)
    bpy.utils.unregister_class(FrameOperator)

if __name__ == "__main__":
    register()

A more detailed walk through of this script.
class FrameOperator this is where I'm defining the new operator. The doc string (first line triple quoted) is the tooltip. The bl_idname is how blender access it, in this case bpy.ops.frame.jump().

The bpy.types.Scene.frame_jump line is very important. This creates a new integer property, it is this property that hold the amount bpy.ops.frame.jump() will use to jump.
The execute function is what gets run when the bpy.ops.frame.jump() operator is called. It is in here that you can see the same code from the first script.

The draw_frame_jump function holds the code that will get added to the timeline header. First I add the property I created earlier layout.prop(scene, "frame_jump", text=""). The if statement is just changes the icon in the button. The layout.operator line adds the button to run the operator. Notice the first argument "frame.jump" is the same as defined in the bl_idname.

Now we get down to the register function. This simply adds the interface code to the timeline header TIME_HT_header.append(draw_frame_jump), and registers the frame.jump operator. (Without registering an operator you can not use it in blender.)

Then it is only a matter of adding the bl_info and you have a full blown addon.


The RGB Curves node sounds like what you are looking for. It functions almost exactly the same way Photoshop's curves command does, so it is very useful for pushing light and/or dark values.
See the image below for a quick example, where I left lighter colors (on the right) more or less unchanged, but drastically darkened anything below about the halfway threshold.

The RGB Curves node is also handy for tweaking the exposure levels of a background photo/HDRI without having to modify the original file.


Can I let a tracking marker paint a mask?

You will probably need to do it with dynamic paint, as Charles recommended, and it is possible without solving a camera motion:

You can easily set it up by tracking the wall where he is painting with a simple 4 point track, so you get 5 markers. Then, link empties to those markers, hook a plane's vertices to the wall markers and parent a cube or other object to the "painting" marker, so you can get a canvas (plane) that deforms with the footage without solving or reconstructing geometry.

Set the dynamic paint to output an image sequence of the object painting's on the plane, and then use that image sequence in the compositor as the mask, or alpha, that you need to create the effect that he is painting it.


How to use/enable multi-therading in Blender 2.8+

It's on by default, it will use all the cores you have available. Although if you have a capable GPU you might want to use that instead.
Some things are single threaded thought (I think physics and cloth sims are single threaded, but I don't know if that changed lately).


Cycles, Materials Baked to Texture Lost Shading

"Lighten" mode needs brighter color in order to show something

With your setup are baking the Color component of the Diffuse pass. This means that the bake texture will show only the exact color input that's being provided to every diffuse shader in the nodes of your scene; no bump map/normals are being considered in this process, so the only way your texture could show some variations comes from the Mix factor of the Color Mix node (in your case set to Lighten blending mode)

Regardless of what color texture is coming into the factor, the output of the node will always be the light grey you see in the baked texture you are showing in your question: you are infact trying to Lighten a bright color with a darker one.

The manual is not quite clear about what the blending mode is doing:

  Like bleach makes your whites whiter. Use with a mask to lighten up a little.

I may guess is adding the second color only when it's brighter than the first one, but it's a fact that using a second color darker than the first one results in a color that is always the same of the first one.


Why do 360° videos look low res when uploaded to Youtube?

This has been driving me nuts too, haven't come up with a fix yet and I'm outputting using Premier Pro: unsharp mask, color correction, 4k resolution, ~30bps bitrate and 59.94 fps.  Looks great on my computer, then uploads to YouTube like garbage.

Even 1080p/60fps renders terribly on YouTube and you would think this would be their default 'let's make this look as good as possible' configuration they'd want to get right in-terms of their compression.

Johnpbuck submitted a video that looks decent I guess, but in my mind it's not a real world example.  Here's the quality I'm trying to get to without buying new cameras (which I don't think will solve the problem considering how good my cameras perform BEFORE YouTube) - https://www.youtube.com/watch?v=LByJ9Q6Lddo

The only trick I can suggest that others may not have tried yet is forcing rendering of your video at 59.94fps.  My cameras don't go that high but YouTube does grant a higher bitrate during uploading to a frame rate beyond 30.


Creating realistic procedural wall plaster texture

You could use the Musgrave procedural noise node as displacement texture for a very simple plaster like surface. You can change the node settings to control how rough and detailed the plaster would be.


It depends on the scenario.
Situations where the GPU will help more:

Extremely high poly scenes
Scenes with complex materials
Scenes with large textures
Scenes with advanced procedural textures

The GPU is mainly used to draw the pixels on your screen, so if you have lots to draw, a better GPU will help. A good way to tell if your GPU is the limiting factor in your performance is to check your frame rate when you are only moving your viewpoint, and nothing else.
Situations where the CPU will help more:

High frame rate animations
Scenes with lots of ridged bodies or simulations
Scenes with complex armatures
Scenes with lots of booleans
Scenes with geometry nodes
Complex animations
Scenes with procedurally generated objects, such as those with displacement modifiers
Particles
Scenes with lots of Multi-resolution/subdivision modifiers

For the most part, the CPU will be your main limiting factor. The CPU must apply all modifiers, animations, deformations, and simulations before finally sending it's data off to the GPU to be displayed. If you are looking for a CPU specifically to speed up the viewport, you should prioritize single threaded performance, as many modifiers are single threaded.


Boolean on Objects with smooth surfaces?

Select the model Go to edit mode and press w and Remove doubles

Select the cylinder and add one subdivide

Now with the boolean modifier selecting the difference select the object.


Displacement using UV map affecting all maps, not just the one selected

When you create a second UV map in Blender, the operator (or better said, the + Button in the Mesh Data / UV Maps Panel) will create a COPY of the currently active UV map. If you rethink the steps you made, what happened is that you copied the UV map you created in the steps 1-5, and you cannot get rid of already unwrapped faces. And that's why you get the effect on both faces in step 12, you basically really have a UV map containing both sides of the Cube.

Try this: Start off with creating two UV maps on a new Cube as step number 1.  But make sure you create the UV map while in edit mode and no vertex or face selected! This will create a UV map where all UVs have the coordinates (0, 0). then do the unwrapping part for both of them as you did in your description. That should ensure that both UV maps are "totally empty" when you dig into the details.


As far as I know, Freestyle SVG Export is meant exclusively as a stroke export solution, for the freestyle part of the render only

It is not a full featured rendered solution, for backgrounds and diffuse colors, nor would it even be possible to reliably export the whole rendered output as an SVG file.

I am pretty sure if you tweak the settings of the SVG file in an external editor like Inkscape or any other vector graphics editor capable of opening or importing an SVG file, you can easily achieve the look you are aiming for.

For an alternative solution check out the excellent SVG Output Script


Blender crashes when opening the particle editor

I think I solved this myself, so I thought I would post it in case anyone else has the same problem.
Blender seems to crash when entering particle edit while still in the render view mode. Switching back to shading view seems to solve it.


Not sure if it's what you're after, but you could put your 25 original trees in a collection, then have a particle system emit instances chosen randomly from that collection.


Import sequence of obj files to multiple frames

As you are importing an object for each frame, you want to keyframe the visibility of each object so that it is only visible on the frame that it is made for.

You can use the following script to import each obj and keyframe it's visibility.

import bpy
scn = bpy.context.scene
for f in range(scn.frame_start, scn.frame_end):
    fpath = bpy.path.abspath('//sim_data_{}.obj'.format(f))
    bpy.ops.import_scene.obj(filepath=fpath)
    obj = bpy.context.selected_objects[0]
    # key as visible on the current frame
    obj.keyframe_insert('hide',frame=f)
    obj.keyframe_insert('hide_render',frame=f)
    # hide it
    obj.hide = True
    obj.hide_render = True
    # key as hidden on the previous frame
    obj.keyframe_insert('hide',frame=f-1)
    obj.keyframe_insert('hide_render',frame=f-1)
    # key as hidden on the next frame
    obj.keyframe_insert('hide',frame=f+1)
    obj.keyframe_insert('hide_render',frame=f+1)

If you have the option to export in .mdd or .pc2 format, you could look at using the mesh cache modifier.

Depending on how much the "particles" in the simulation deform, you may also want to look at exporting a location and size of each item per frame. This way you could just use the exported data to keyframe the location of each object.


How can I render all render passes to files in Cycles?

Render OpenExr Multilayer for Blender, Nuke and Natron. Go to the Scene Tab, enable all passes  which key for compositing and set the Output Format in the Render Tab to OpenExr Multilayer.

Blender automatically writes all enabled passes and layers as single channels to the EXR as expected.

For After Effects and Fusion I'd suggest render single EXR's. For more information on rendering passes and layers as EXR's, see: Save all render passes to a single EXR image.

Note: If you want to use Index Passes (IndexOB or IndexMA) see this answer: How to use index passes in other compositing packages?


Cannot get rid of reported missing files

Blender won't remove the image because to it, the image is still in use. That is because the image has a 'fake' user, indicated by the 'F' next to the filename:

Add another background image (so you can access the image properties again, like I did above), choose your image and click the 'F' to remove the fake user. The image will now have 1 user, the background image, which you can then remove. After saving, closing and re-opening the file (or by clicking File> Save then File> Revert) the image will now be gone.

Fake Users are used for the very purpose that was causing you an issue, to keep data around even when it's not in use. This can be useful if you have multiple materials and you are swapping between them. The material might not currently in use, but you might want to keep it around in case you want to use it in future. You would click the 'F' to create a 'fake' user of the material data, making sure blender never deletes it, even if it's not in use.


In
fc = mocap_action.fcurves.new(dp, index = i)

Delete index = i.
That sets fc.array_index which is for things like locations (index=0 targets X, 1 targets Y, etc.). You don't need it for shape keys.


Does Blender bloat unnecessarily the Windows Registry?

If you are unsure about entrys in the registry and want to keep your system clean, you can take the portable version.
Extract to a folder of your choice and pin to startmenu or what ever.

I personally dont use Blender installer at all, i use the portable every time and when there is a new build i override the folder content and have the new version.
If you have multiple versions you can have different folders.


How do you add orderly wrinkles to faces?

If you want your lid to stay flat, so you can put a nice bevel on it, extrude the cylinder's cap-poly first. This will create a circular loop to hold that edge.
Get enough separations in the side of the cylinder to hold your
detail.
Select the parts you want to push in, the "valleys".
If you have a lot of those, after selecting the whole row of edges, use Mesh > Checker Deselect to get the pattern of selection, that you want
Shrink/Fatten the faces in or out (Alt + S)or Extrude them into or out of the cylinder (E) by using Individual Origin as the Pivot Point.


How to interchange 2 vertex position ? I want vertex A to be at vertex B position and vertex B to be at vertex A position

If you need vertices to be swithced places you can scale them by -1. Select them and hit  s followed by -, 1 and Enter.


I think you're referring to the motion blur. Your scene has motion blur enabled which is what you want for smooth animations. But if you just want to render a still image and you want it to render sharp (without motion blur) then you'd just disable motion blur for that one shot.
The amount of blurriness depends on the strength of the motion at any given frame, so you should not be suprised that some frames render with less motion blur than others (depending on your animation).

Motion Blur is not enabled by default but is recommended to use for animations so that movements are perceived as smooth, but if you're rendering at very high fps (60+) you don't need it. You can also use it for stills in order to depict rapid movement. (Take for example a render of a racing car moving fast on the race track: if motion blur is disabled then it would appear as if the car was just parked on the street since everything is rendered sharp and thus no sense of motion is transmitted).
As a final side note: As far as I can tell cycles does not support motion blur for the fire simulation per se, but in this case applies the motion blur from the rotation animation.


IK claw control with driver / controller

I have solved this problem by recreating bones without segmenting, what I did is to create the bones in edit mode not by adding new object rather extruding the main one, whenever one creates new objects inside edit mode those would be treated as joined objects, but in my case, there were some issues I think, so I eliminated that step and extruded every bone one after another and at the claw level extruded and rotated by 120 degrees (3 claws for me, just divide 360 by the number of claws) and re extrude from each pole.
here is a brief guide..................................................................

Adding a controller bone at the claw and arm joint which can be done extruding the head of the last arm bone.

2.Adding controllers to each claw head (once you have placed the 3dcursor to the centre of claw joint geometry just pull it down along Z-axis >> using right-hand side properties bar (access it by pressing "N") go under view and you will find 3d cursor location options.
when the 3d cursor has been placed in the right location each claw head controller handle and fix their heads to the cursor by >> Shift "S" >> "selection to cursor"(you must be in edit mode with the bone selected.)
then when all of the controller's heads are conjugated select them all and extrude along Z-axis.
3.Select the geometry or mesh you want to attach with the bone, then selecting any of the bones,  (being extruded from one they are one object, so selecting any of the bones will work) press >> ctrl + TAB to go to pose mode
(****select the bone, at last, that should be the ACTIVE object in a yellow colour not orange, otherwise, The POSE MODE will not be available)
Inside pose mode select the exact bone you want to connect with the mesh, that will become blue, and you will notice that the geometry is already highlighted in yellow, so just selecting the bone press>> Ctrl + "P" >> select "Bone"
******** if you don't have segments like organic objects like a hand (not hand skeleton just skin) or sausage you have to use Weight paint or  Armature reform auto weight distribution or Vertex paint, just search this terms in youtube and you should get a comprehensive guide.***********

complete parenting (when you are doing bone parenting mesh parenting isn't necessary, but you should so mesh parenting if you don't have bones for trivial meshes>> like the arm end or claw head ball, I didn't add any bone for that but that is parented to the arm mesh.

now select the arm end/ claw head handle and assign "bone constrain"( you have to be in pose mode) select "Invert Kinemetice" if you don't specify chain length that will be assigned to the whole chain root, for claw select the controllers and do similar just adjust the chain length to the claw root (chain length is the no of bones connected to the way to Root, you will get a yellow dotted line indicating the root of that Invert Kinematic setup).

Go to edit mode selecting any bone and select individual bones except controllers and press >> "H" that will hide them.

I am adding  My new file Here >>>>>>
https://drive.google.com/file/d/1Rj--YtLs5Hwj2yXDrztZndAl2jFTj7Rt/view?usp=sharing
**press Alt + H to unhide bones.
*** there are 3 controllers of the claw are conjugated in one place so select all of the 3 when posing.
****if you want to change the orientation of the claw ARM controller bone you have to go inside edit mode with one of the bones selected and have to select the controller then press >> ALT + P >>> " clear parent" >> rotate/move/scale as your desire >>> select the controller then the head of the Arm bone (inside the ball)  the head must be the active object (yellow not orange) the press Ctrl + P >> "Connected" / "Keep offset"(parents but keeps distance).
I hope it helped.
New model image


Is there anyway to change the rotation mode of multiple bones at once?

Here is a script that will change all the pose bone rotation mode to the value set for to_mode in this case 'XYZ' for XYZ Euler Rotation on the active (context) object.

import bpy
from bpy import context

to_mode = 'XYZ'
arm = context.object

for pb in arm.pose.bones:
    pb.rotation_mode = to_mode

Possibly more useful to use context.selected_pose_bones which will set the mode only for those pose bones selected.

import bpy
from bpy import context

to_mode = 'XYZ'

for pb in context.selected_pose_bones:
    pb.rotation_mode = to_mode


Enable screen space reflections. Answers vary depending on the render engine you are using, please always specify what you are using


You should be able to achieve this by mixing your "porcelain" material with an Emission Shader, driven by a Fresnel. Don't forget to enable bloom - you may want to increase the intensity as well (assuming you're using EEVEE).

If you want to take it one step further and use the compositor, you can enhance the effect using a Glare node set to a high quality Fog Glow:

The Fresnel trick may not work for the Vase, as it will cause the underside (shadowed areas) to be lit as well - unless you have the perfect IOR and camera angle, it ends up looking like a lamp. Instead, just use a very bright light, using the same bloom as before and the same compositor set up:


Material.copy() is what you want. Also you have to duplicate the object's mesh because materials link to the object's data by default.

import bpy

scn = bpy.context.scene
obj = bpy.context.active_object
mat = obj.active_material
mesh = obj.data

dup = bpy.data.objects.new(obj.name, mesh.copy())
dup.active_material = mat.copy()
scn.objects.link(dup)

dup.location.x += 3    # just for clarity


Does bmesh guarantee order of vertex in a edge according to the time they were added

The order of both vertex indices stored in an edge (me.edges[#].verts), or the vertices references respectively (bm.edges[#].verts) should not change unless you make it so (by flipping an edge I guess).

That is because the order is important. Think of a line of 3 connected edges: if you flipped the vertices referenced by the middle edge, it would still look like the same edge. But both vertices would need to be switched (as in coordinates) - but that doesn't work because they are used by other edges.

(Unscientific) stress test:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        break
else:
    raise Exception()

ctx = bpy.context.copy()
ctx["area"] = area
ctx["region"] = area.regions[-1]
bpy.ops.ed.undo_push(ctx)

ob = bpy.context.object
me = ob.data
bpy.ops.object.mode_set(mode='EDIT')
print()
print()
t = {}
for e in me.edges:
    v1, v2 = e.vertices
    t[(v1, v2)] = "{: 8.4f} {: 8.4f} {: 8.4f} | {: 8.4f} {: 8.4f} {: 8.4f}".format(*(me.vertices[v1].co[:] + me.vertices[v2].co[:]))

bpy.ops.mesh.sort_elements(type='RANDOMIZE')

bpy.ops.ed.undo_push(ctx)
me.update()
bpy.ops.transform.translate(value=(0,0,2))
bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.ed.undo(ctx)
bpy.ops.mesh.sort_elements(type='RANDOMIZE')
bpy.ops.mesh.flip_normals()

for e in me.edges:
    v1, v2 = e.vertices
    if t[(v1, v2)] != "{: 8.4f} {: 8.4f} {: 8.4f} | {: 8.4f} {: 8.4f} {: 8.4f}".format(*(me.vertices[v1].co[:] + me.vertices[v2].co[:])):
        raise Exception()

The order of geometry elements is not guaranteed on the other hand (me..index / bm..index), although it is practically stable, as long as you add and remove in stack principle (last in, first out).

If a vertex / edge / face other than the one with the highest index is deleted, all elements with a higher index will shift to fill the gap.

There are also mesh operations to sort mesh elements based on properties like distance to camera, or randomize the indices even.

You could use a custom data layer to store an explicit order (e.g. bm.verts.layers.int), but beware of the value propagation: if you extrude a vertex for instance, that custom data will be carried over to the new vertex.

This patch might be interesting for you: https://developer.blender.org/T42865


How to add details from an image to a model

There are several ways to about getting the detail or illusion of depth on a simple or flat model. The fastest IMO for a use case like this is to use the Displace Modifier. Simply Unwrap your object or the face you want the detail on or in this instance, it might be better to do a Project from View and then scale the UVs to match the image.

Next add a texture and set the Mapping coordinates to UV and use that texture in the displace modifier. After that, just tweak the settings until you are satisfied, the Strength value is the one you will primarily use.

Two things that can improve the final result.

Convert the image to grayscale (black and white) as the displace modifier works best with explicit black and white values
Use a flat surface and subdivide it several times rather than modeling extrusions etc, the modifier will handle all of that

Here is a quick test using the same image as yours with the steps I outlined above on a flat plane.


If you want to use the empty as a kind of control object, you could parent the object(s) being deformed to the empty using Ctrl-P and the objects would move around the curve when the empty was moved.


How can I assign shortcuts to "Auto Execution" and "Always" checkbox of animation nodes in node editor toolbar?

As far as I know, one can't set a shortcut to toggle a checkbox. The only way to do that is to create an addon that register an operator that does the toggle and create a custom keymap for your shortcut as described here.

Animation Nodes define the key combination Ctrl + Shift + Q to disable Auto Execution as described in the documentation.


When doing 2d animation, you are still in 3d space but your camera is positioned vertically above the drawing plane.

So to get back you just

press Numpad 0 if there is a camera in the scene
or press Numpad 7 to go into
top view with the viewport camera.


In the Properties area, Render tab, Layer group, there's a setting to override every object's material:

As of Blender 2.8x there is a new Override panel as part of the View Layer Properties:


Enable "Developper Extras" in the preferences, so that you can "Edit source".


Game Engine: Object with character physics shakes for some reason

The problem you are experiencing is due to the way blender calculates the collision for the quads on your ground plane. There are two ways to fix this, you can use a cube as ground instead (with collision bounds set to box), or you can set your plane's collision type to box, even though a plane is infinitely thin.

To help see the problem,
First turn on Physics Visualization.
This does not effect anything except what you see, so in the end it does not matter if it is on or off.

If your plane's collision bounds are not set to anything, blender automatically calculates it as if it were made up of two triangles.

However, if you set it to Box collision, This problem goes away.

If you use a thin cube instead for your ground, (with collision type set to box) this problem goes away entirely.

Another thing you can try is putting all of your logic bricks and python on a invisible low detail object, for a collision mesh, and having your detailed car as no-collision but parented to the collision mesh. Even if this alone does not remove the shaking, it will dramatically help performance.


How do I make an animation from a curve?

Select your object and Export as .MDD - you might have to enable it under preferences. Apply the Curve Modifier to your object.

In a new file append your object and remove any animation curves from the Graph Editor. With the object selected Import the .MDD file - you will see per frame that curves have been added to the graph editor. You might have to move the frames to correspond to the peaks of the action. In my example I just started before the first frame and stopped before the last...

Update: While the above method does work, there is also Alembic .abc export which you might try. Export the number of frames you want - when you import the .abc file in a new Blender you will see the animation is baked in. There are no key frames in this export.


Make vertex paint affect mesh texture greyscale

A transparent shader converts the brightness of the input image to transparency. There is no such thing as "grey scale of a transparent shader", because the transparent shader only absorbs light (based on the color and value of it's input). To get a white feedback of the shader (independently of the background), you need to use a shader, which reflects the light based on the brightness of your attribute. To archive your objective, you have to input the factor of your attribute (your vertex paint layer) into the diffuse shader:


This keyframes work only with object transforms and you are working with mesh itself (in Edit mode).

Using Armature is the most convenient way to control mesh deformations. In this case you will keyframe location and rotation of armature's bones in order to perform mesh folding.


Why does it look like the skin of my character model is peeling when I join the hands to the mesh in Blender 2.82?

It looks like you've got two nearly identical, superposed meshes.

Since you used a boolean, make sure to Hide the boolean target (the one you selected in the Object field of the modifier)


How do I change the direction of an object set to "Bake Sound to F-Curves"?

Idle Chit-chat

I assume that by "in a downward motion" you mean that you want its jittering effectively reflected over the x axis. There is a way to do this.

Solution

Go to the Graph Editor, select the baked-sound f-curve, key N to open the Graph Editor's Properties panel, and open the Modifiers drop down menu (it should be at the bottom of the stack). Add an Envelope modifier and change the settings to this:

You will need to click Add Point before you can change the bottom-most settings (1, 0, and -1.8). This should make the cube move in a downward motion.


Just do some math in the X offset field directly. Look at the Original Dimension of your Clip where you will find out its width x height. Then type into the X offset "1920/2-width/2" (replacing width with the actual one from its Dimensions) and hit Enter. Do the same with Y, typing "1080/2-height/2"...

Or with an Editor/View of the type Python Console opened and the Clip selected in the VSE you should be able to just run this line of code to center your Clip/ImageSequence:

seq = bpy.context.selected_editable_sequences[0]; seq.use_translation = True; seq.transform.offset_x = bpy.context.scene.render.resolution_x/2 - seq.strip_elem_from_frame(bpy.context.scene.frame_current).orig_width/2; seq.transform.offset_y = bpy.context.scene.render.resolution_y/2 - seq.strip_elem_from_frame(bpy.context.scene.frame_current).orig_height/2


how could I turn active a bone in ui header? (blender 2.79)

Select active bone in pose mode from UI

Use the draw method to draw UI elements only Cannot set properties of ID elements in draw method (the error arm.bones.active = d_bone ).

In general, Use operators or property update methods to assign values

To set the active bone in pose mode from the UI, can simply put the "active" property of the armature bones collection into the layout.

Below I've used a UI_Layout.prop_search there may be a template that also does similar.

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

        obj = context.object
        arm = obj.data

        row = layout.row()
        row.prop_search(arm.bones, "active", arm, "bones")


Texture is not displayed on the meshes. How to display?

To show texture on the mesh in Blender Internal it's enough to open / create an image texture in UV / Image Editor (or choose already existing one from the list of the images in the .blend file) while all faces of the mesh are selected in Edit mode.
The mesh even doesn't need to be UV unwrapped (although it isn't a good solution as there isn't any control of the image assignment).

Note though that it's necessary to unwrap the mesh in order to control appearence of the texture on it and open desired image in UV / Image Editor with all faces selected.

The last step in order to show assigned image in the 3D Viewport is either to enable Texture Shading (note - lighting setup will be taken into account) or enable Textured Solid (note - assigned face textures will be displayed) in the Properties shelf > Shading rollout.

See more on previewing textures in 3D Viewport -How to show textures in the 3D View editor?.


Object Data Properties > Geometry Data > Add Custom Split Normals


ColorRamp works in Material mode but not when it's rendered

Another approach is to assign a single colour material to each piece. You only need to model a segment with one of each colour and then use an array modifier to duplicate it to length.

In this example I created a section and used an array modifier to duplicate it a few times and then a simple deform to twist it 360 degrees, then I used a second array modifier to duplicate that multiple times.

You can also use an object to define the offset with a rotation as shown here.


Yes. Hair particles do respond to the Collision physics option. However, if you have Collision on the cube already to keep hair from going through it, it’s margin may cause the hair to stick straight out despite the stairs.
As a sidenote, Rigid Body and Collision can coexist.


How can I output the Compositor result instead of the Render Result when rendering an animation?

I found a simple solution to this problem using Python:
import bpy

def render(rex_x, res_y):
    oldx = bpy.context.scene.render.resolution_x
    oldy = bpy.context.scene.render.resolution_y
    outpath = bpy.context.scene.render.filepath

    try:
        bpy.context.scene.render.resolution_x = res_x
        bpy.context.scene.render.resolution_y = res_y
        bpy.context.scene.render.filepath = ''

        bpy.ops.render.render(animation=True, write_still=False)

    finally:
        bpy.context.scene.render.resolution_x = oldx
        bpy.context.scene.render.resolution_y = oldy
        bpy.context.scene.render.filepath = outpath

The try/finally is to put back the original values in case of semi-catastrophic failure (which actually happened to me just now since my script is more complicated than the minimum version posted here).  In my case I also needed to alter the resolution, which cannot be driven using a Driver.  So, two birds and all that...


Is there a way to animate the pivot point of a bone?

This is an idea I have but I haven't tested it.  Hope it can be used.

Set up a chain of elongated, non-renderable cubes in the same spaces as the bones. Move their pivot points to the correct end, and link them so they're like a chain of bones.

Now you can use a Child Of constraint on the relevant cube to parent it to an Empty. Set Influence to zero until you're ready to switch to the new pivot point/Empty. Do this 3 times after moving the Empties to where you need the 3 pivot points. You need a 4th Child Of constraint to have the next cube/bone in the chain as the target/parent. You can then animate Influence to switch between pivot points.  When you want to rotate a bone around a different pivot point, you rotate the Empty.

The reason for leaving the bones there is you need them for skinning purposes.

If one could use a Child Of constraint directly on a bone that'd be easier, but as far as I can see it's a mesh-only constraint.

You could try the above if the bone whose pivot point you want to animate is at the head of the hierarchy. Otherwise the you'll rip the chain apart.


How to force update the 3d view port in blender during python file execution

Found the answer, threading can be used

def my_timer():
    from threading import Timer
    main();
    #print(i);
    t = Timer(0.1, my_timer)
    t.start()

Hope this helps, we took a lot of time to come up with it


Why is the same texture rendering on all objects?

Maybe in the Properties panel > Render Layers > Layer > Material, click on X to close the selected material


i think you have to remove every other keybinding to "M" so there are no conflicts.

For me,

3dview -> object mode-> move to collection is blocking

but I would advise you to use "G" for G.rab as it is, because it's not Move - it is grab. You grab stuff in all Editor windows and then you move it around… Keyframes in DopeSheet, or things in the Viewport and I belive in you, you will adjust your Habits and you will handle that.
In a few weeks you will not go back.
You will G -> X ->5 and R -> Y ->90 and G-> Z -> 4 like a Pro!


How to obtain max and min of f-curve in python

Vectorize evaluate with numpy
Having done similar via What's the range of values on a sound-baked f-curve?
Can vectorize the fcurve evaluate method and pass in an numpy array of frames, then  using methods available  get the minimum maximum etc.
Will find this much quicker than looping as in question code above.
Test script finds the minimum of each fcurve of each action from frames 1 to 250 using 0.01 subframe increments.
import bpy
import numpy as np

frames = np.arange(1, 250, 0.01)

for action in bpy.data.actions:
    print(f"{action.name}")

    for fc in action.fcurves:
        print(f"{fc.data_path}[{fc.array_index}]")
        points = np.vectorize(fc.evaluate)(frames)

        print(f"min {points.min()} at {frames[np.argmin(points)]}")


The animation in my timeline is not displayed when I hit the Animation button

It's quite common to render an animation, load it in the Video Sequence Editor, and forget that it was there. If you make changes to your 3D scene and render, you'd be looking at your old scene, not the newly altered one. The video strips on the VSE override your 3D scene unless you unclick the sequencer checkbox.


API: how to iterate over a planes vertices row-by-row, column-by-column

Not elegant, and it has no verification that the object is a regular plane (only 4 outer edges) but the below has been tested a bit and provides a single sequence of vertices as described in your question. Maybe someone else can follow up with a cleaner solution.

import bpy
import bmesh

my_data = []
my_corners = []
my_seq_cols = []
my_seq_verts = []
edg_cnt = 0
my_mode = 'OBJECT'
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.mode_set(mode='EDIT')
obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table()

def set_mode(my_mode):
    bpy.ops.object.mode_set(mode=my_mode)

def set_data(my_data, edg_cnt):
    for vert in bm.verts:
        my_data.append([vert.co[0], vert.co[1], vert.index, edg_cnt])
    return my_data

def find_corners(my_data, my_corners):
    for edg in range(len(bm.edges)):
        for vert in range(len(bm.edges[edg].verts)):
            for i in my_data:
                if i[2] == bm.edges[edg].verts[vert].index:
                    i[3] += 1
    for i in my_data:
        if i[3] == 2:
            my_corners.append(i)
    return my_corners

def find_edg_from_verts(v1, v2):
    for edg in bm.edges:
        if (edg.verts[0] == v1 and edg.verts[1] == v2) or (edg.verts[1] == v1 and edg.verts[0] == v2):
            my_edg = edg
    return (my_edg)

def find_start_col(corners):
    for edg in bm.edges:
        if (edg.verts[1].index == corners[0][2]):
            col_ind = edg
    return (col_ind)

def find_start_row(corners):
    for edg in bm.edges:
        if (edg.verts[0].index == corners[0][2]):
            row_ind = edg
    return (row_ind)

def get_row_verts(my_row_start):
    bpy.ops.mesh.select_all(action='DESELECT')
    my_row_start.select = True
    bpy.ops.mesh.loop_multi_select(ring=False)

def seq_sel_verts(start_vert):
    found = False
    fwd = True
    sel_verts = [v for v in bm.verts if v.select]
    for l in start_vert.link_loops:  # try to find next vert of loop
        if l.link_loop_next.vert in sel_verts:
            next_vert = l.link_loop_next.vert
            found = True
    if not found:
        for l in start_vert.link_loops:  # last row requires direction change
            if l.link_loop_prev.vert in sel_verts:
                next_vert = l.link_loop_prev.vert
                fwd = False
    cnt = len(sel_verts)
    if fwd:
        while cnt > 0:
            for l in start_vert.link_loops:
                if (l.link_loop_next.vert in sel_verts) and (l.link_loop_next.vert not in my_seq_verts):
                    next_vert = l.link_loop_next.vert
            for v in sel_verts:
                if v == start_vert:
                    my_seq_verts.append(v)
                    v.select = False
            start_vert = next_vert
            cnt -= 1
    else:
        while cnt > 0:
            for l in start_vert.link_loops:
                if (l.link_loop_prev.vert in sel_verts) and (l.link_loop_prev.vert not in my_seq_verts):
                    next_vert = l.link_loop_prev.vert
            for v in sel_verts:
                if v == start_vert:
                    my_seq_verts.append(v)
                    v.select = False
            start_vert = next_vert
            cnt -= 1

def seq_sel_cols(start_vert):
    next_vert = start_vert.link_loops[0].link_loop_prev.vert
    sel_verts = [v for v in bm.verts if v.select]
    cnt = len(sel_verts)
    while cnt > 0:
        for l in start_vert.link_loops:
            if l.link_loop_prev.vert in sel_verts:
                next_vert = l.link_loop_prev.vert
        for v in sel_verts:
            if v == start_vert:
                my_seq_cols.append(v)
                v.select = False
        start_vert = next_vert
        cnt -= 1

def output(row_len):
    col_len = len(my_seq_cols)
    print("Vertex sequence")
    cnt = 0
    for i in range(col_len):
        print("<row:", i, end="> ")
        for j in range(row_len):
            print(my_seq_verts[cnt].index, end=", ")
            cnt += 1
        print()
    print("Total vertices:", len(my_seq_verts))

def main():
    set_mode('EDIT')
    set_data(my_data, edg_cnt)
    find_corners(my_data, my_corners)

    my_corners.sort()  # organize list so lowest (x,y) is 1st
    start_col = find_start_col(my_corners)

    # sequence leftmost(-x) column bottom to top(-y...+y)
    get_row_verts(start_col)
    my_start_vert = start_col.verts[1]
    seq_sel_cols(my_start_vert)

    # sequence rows from left to right (-x...+x)
    for v in my_seq_cols:
        found = False
        my_start_vert = v
        for l in my_start_vert.link_loops:
            if l.link_loop_next.vert not in my_seq_cols:
                found = True
                next_v = l.link_loop_next.vert
                start_row = find_edg_from_verts(my_start_vert, next_v)
                get_row_verts(start_row)
                seq_sel_verts(my_start_vert)
        if not found:
            for l in my_start_vert.link_loops:
                if l.link_loop_prev.vert not in my_seq_cols:
                    found = True
                    next_v = l.link_loop_prev.vert
                    start_row = find_edg_from_verts(my_start_vert, next_v)
                    get_row_verts(start_row)
                    row_len = len([v for v in bm.verts if v.select])  # added for formatting output
                    seq_sel_verts(my_start_vert)
    output(row_len)
    bm.free()
    set_mode('OBJECT')

main()


How do I set up a driver to drive a node value with a node group input?

The best way is to completely avoid drivers inside node groups. They do not update correctly and are only trouble.

You should make your own custom Rotate node with the angle value accessible. You can make almost any spacial transformation using the correct math put together with Math nodes. Rotating a 3d vector around Z axis θ degrees looks like this:

x' = x cos θ − y sin θ
y' = x sin θ + y cos θ
z' = z

In nodes it looks like this:

The white node is there to convert degrees into radians.

If you really need you can build your own Mapping node with translation, rotation and scale inputs exposed.


My main question is: Is there a way to show a camera's innate timecode within the editor?

If your question is regarding LTC, the answer is absolutely not.

You can muck with libLTC, but even then, it won't be what you are looking for.


Random Actuator change "int_max" via Python

Without knowing the error it's hard to guess, but I think it's caused by a syntax error in the last line. If you don't set a value for Rand.int_max, python won't execute this script. To get detailed information about the error, you can open the Blender Console (Window > Toggle System Console).

So instead of Rand.int_max = write Rand.int_max = [some integer].

But, you can't set int_max directly via BGE Python. Instead you have to use a call to Rand.setIntUniform(lower_bound, upper_bound)(API). lower_bound is int_min, upper_bound int_max.

A few other things you could improve:

Timers are actually floats, but Rand.setIntUniform() requires an Integer, so put the timer value into int().
Instead of else: if Dif == 0: you can write elif Dif == 0: (or just else: if Dif is never negative).
If you only need the logic module and no other bge modules, you can delete the first line, you only need the second line (from bge import logic as l).
Variable names in python are in snake_case by convention, so don't call your variables Dif or Rand, call them dif or rand instead. But this is a matter of taste, your code is working the same regardless of the naming conventions. The Blender API calls (like getCurrentController() are in CamelCase because Blender is written in C and C++ and these languages use CamelCase.
If you want to activate (= execute) the Random Actuator after setting the value, add cont.activate(rand)(API) to your script. Other than the other Controller types, a Python Controller doesn't execute all connected Actuators by default.

So here is a version of your code that should work:

from bge import logic as l

cont = l.getCurrentController()
own = cont.owner

dif = own['DIF']
timer = int((19 - (dif * 3))) # Convert the result to int
rand = cont.actuators['Random']

if cont.sensors['Always'].positive and dif != 0:
    rand.setIntUniform(0, timer)

# just 'else' if dif can't be negative
elif dif == 0:
    rand.setIntUniform(0, 0)

# If you want to execute the Actuator
cont.activate(rand)


Blender 2.8 (Python) - convert text to mesh

The laziest way to do it is to use the same operation that the Alt-c performs when done interactively : bpy.ops.object.convert(target="MESH") .  Unfortunately, this shares the problem of every function in bpy.ops.  You have to set up the interactive environment (what object is active/selected).  It would look something like this:

import bpy

def mission1(obj):
    scn = bpy.context.scene
    for o2 in scn.objects:
        o2.select = ( o2 == obj )
    scn.objects.active = obj

    bpy.ops.object.convert(target="MESH")

mission1(bpy.data.objects['Text.001'])

If there is a way to accomplish this without using bpy.ops, I was too lazy to dig it up.


I'm not sure exactly what you mean (what's a CNC?) but the short answer is, the 3D information needs to be available somehow. Blender cannot invent or deduce it.

My suggestions:

you can take 2D to 3D if you have enough visual elements. That means a few pictures. Meshroom can help you.
You can remodel a scene. For sceneries, rooms and the like, fSpy can help for camera angles and measurements
This tutorial about projection mapping can help: https://www.youtube.com/watch?v=p9IfDeNU8K0, but there will be no miracles. It works well with planes, mostly.
You may be after parallax effect, which can be achieved as explained here: https://www.youtube.com/watch?v=gvaiHqBuTz8

For grey scale relief, there is a Gimp filter that does it (something like emboss). If you want to do it on a sequence of images, I suggest you try Natron rather than Blender.


'Clear Sharp' doesn't seem to be working

There are no sharp edges on the mesh. What you are observing there is geometry obstructing itself or forming some unexpected shadows because of the way it is triangulated. When rendered, the mesh is triangulated and some faces that may look smooth when you rotate them in the 3d view get divided into triangles that obstruct each other looking at them at some angles or produce unexpected shadows:

There is nothing to do about it - the geometry is just not detailed enough to be rendered nicely, you do need to use Subsurf modifier or modify the geometry some other way.


How to close view panels is well covered elsewhere. However in your particular case I would recommend clearing out the UI layout completely and starting from a clean setup.

To do this, save and re-open your .blend with Load UI disabled. You can disable Load UI persistently, by deselecting the option in ⎈ Ctrl⎇ AltU> User Preferences > File, or temporarily, by deselecting the option available while opening a .blend:

Also note that opening a .blend with Load UI disabled will keep the current layout, so to get back to the default you will have to load your startup .blend (⎈ CtrlN) first. Or if you want the default default, press File > Load factory settings before opening your .blend with Load UI disabled.


Rendering problem with Neon lights - Blender guru tutorial

You have the duplicate of the original, flat text object still visible. You can delete it, hide it from the render or put it in a collection you disable with the checkbox. I hope that this is clear enough, otherwise just ask me your remaining questions.


Bevel not matching the curve object source

Turn the base curve to 2D. That will adjust the corners profile to the bevel object:

2D curves have limitation though: they need to be planar.

If 3D, the corner profile corresponds to the bevel object rotated 45°. So this is matter of choice.


You plugged your Transmission map into Alpha input.
Alpha input considers white color as opaque.


There are two possible reasons for this happening.

Reason I - Object Render Disable

You can disable specific objects from being rendered in the Outliner. It is possible you did this without knowing it.

The Camera Button to the right of the Cube Object is disabled, meaning the Cube will not be rendered. Click the camera button to turn on/off rendering.

Reason II - Render Layer Settings

It could be that you have disabled the Render Layer(s) of your object in the render layers.

In the example photo, Scene: layer 1 is active and will preview render in viewport, but since Render: layer 1 is not active, then The objects in Layer 1 will not actually render.

More Render Layer Explanation -
The square buttons below 'Scene:' are the layers that are active and currently shown in 3D viewport. You have these correctly selected if you can see them in the 3D viewport and see them in the render preview.

The buttons below 'Layer:' are the layers that will be rendered. Select every layer that you have objects on to render.

The buttons below 'Mask:' will cause what ever objects on this layer to cut a transparent area through your render.


Alpha transparency making wall transparent

Adding a grunge texture or decal is very easy (even easier then in cycles).

All you have to do is add a grunge or decal texture with a alpha channel under the base color,in your case the second texture slot.
Your material  and texture does not need any transparency. Both textures only influence the Color.


How do I make objects in my bpy script have transparent materials?

This sets up a Principled BSDF using the transmission input for transparency. It also throws all the renderer switches for Eevee to show the transparency.
import bpy

name="MyMaterial"
overwrite=True

if(overwrite is True) and ( name in bpy.data.materials ):
    blenderMat = bpy.data.materials[name]

else:
    blenderMat = bpy.data.materials.new(name)
    name = blenderMat.name

    # get the nodes
blenderMat.use_nodes=True
nodes = blenderMat.node_tree.nodes
    # clear all nodes to start clean
for node in nodes:
    nodes.remove(node)
    # link nodes
links = blenderMat.node_tree.links

    #create the basic material nodes
node_output  = nodes.new(type='ShaderNodeOutputMaterial')
node_output.location = 400,0
node_pbsdf    = nodes.new(type='ShaderNodeBsdfPrincipled')
node_pbsdf.location = 0,0
node_pbsdf.inputs['Base Color'].default_value = (0.8, 0.05, 0.05, 1.0)
node_pbsdf.inputs['Alpha'].default_value = 1 # 1 is opaque, 0 is invisible
node_pbsdf.inputs['Roughness'].default_value = 0.2
node_pbsdf.inputs['Specular'].default_value = 0.5
node_pbsdf.inputs['Transmission'].default_value = 0.5 # 1 is fully transparent

link = links.new(node_pbsdf.outputs['BSDF'], node_output.inputs['Surface'])

blenderMat.blend_method = 'HASHED'
blenderMat.shadow_method = 'HASHED'
blenderMat.use_screen_refraction = True

bpy.context.scene.eevee.use_ssr = True
bpy.context.scene.eevee.use_ssr_refraction = True


Mesh objects take the color of World (Blender 2.81a)

In renders, all objects reflect the World color.
White objects are affected most, they reflect it almost perfectly. Like in reality.

Solution 1 - Emission node
Use the Emission node for your object's color.
That way, the object will not receive any shadows or color tint.
It will just be a silhouette emiting white light.
Might work well for 2D animation.

Add > Shader > Emission

Comparing different materials.
Even colored materials get a slight tint.

Solution 2 - Using the compositor

Available here on Blender Stack Exchange by the legendary cegaton himself.

Cegaton's answer offers a different approach using the compositor.
Rendered objects keep grey shading, but the background color can be changed at will.

Try what works best for you :).


UV unwrap your mesh as Project from view (I did it from top view).
To put gradient in center, use a gradient texture node, add Mapping node and modify X,Y coordinates. You can use ColorRamp node for better control of color blending.


Where is Enable 3d manipulator option in user preferences?

Check User Preferences > Interface tab > Manipulation: option and dropdown.

Note that you can also disable/enable it in the footer of the 3D Viewport.

On:

Off:

Lastly, as metaphor_set points out, you can key Space to open the Search menu and search for Enable 3D Manipulator.


TypeError: expected 'Depsgraph' type found 'Scene' instead

Some API changes are newer than others
The bmesh from object method requires argument 2 to be a depsgraph, not a scene, as IIRC it was prior, circa when answer was written.
Consult more recent docs, however for this stuff highly recommend using the console's autocomplete feature
>>> bm.from_object(
from_object(object, depsgraph, deform=True, cage=False, face_normals=True)
.. method:: from_object(object, depsgraph, deform=True, cage=False, face_normals=True)
Initialize this bmesh from existing object datablock (currently only meshes are supported).
:arg object: The object data to load.
:type object: :class:`Object`
:arg deform: Apply deformation modifiers.
:type deform: boolean
:arg cage: Get the mesh as a deformed cage.
:type cage: boolean
:arg face_normals: Calculate face normals.
:type face_normals: boolean

will notice depsgraph doesn't make the doc string, clearly it is an argument.
Test clean up.  Have made minimal changes to get this to run as a frame change post handler. Have used a 256 vert  "Circle" as a test object, (giving it the requirement that it have at least as many verts as the number of angles.)
The script throws an index error for mesh with too few verts...
The method is hooked up to a frame change handler, so it will do "its thing" when the frame is changing.

_An example moving a couple of cubes with the animation playing, to call (handle) on a  frame change event the mesh update with the handler code.
import bpy
import bmesh
from mathutils.bvhtree import BVHTree
import mathutils
import math
import numpy as np

EPSILON = 0.00001
MAXIMUM_DISTANCE = 5

object_name = 'Circle' # change this to your object name
radius_start = math.pi*1/4
radius_end   = math.pi*3/4
radius_step  = math.pi/256

angles = [(math.cos(a), math.sin(a)) for a in np.arange(radius_start, radius_end + 0.00001, radius_step)]
print(angles)

def set_positions(scene, depsgraph, ob, angles, obstacles):
    trees = []
    for obstacle in obstacles:
        bm = bmesh.new()
        bm.from_object(obstacle, depsgraph)
        bmesh.ops.transform(bm, matrix=obstacle.matrix_world, verts=bm.verts)
        trees.append(BVHTree.FromBMesh(bm, epsilon=EPSILON))

    for idx, a in enumerate(angles):
        min_dist = MAXIMUM_DISTANCE
        v_loc = mathutils.Vector((a[0], a[1], 0)) * MAXIMUM_DISTANCE
        for bvh in trees:
            v = (ob.matrix_world @ mathutils.Vector((a[0], a[1], 0))) - ob.location
            loc, no, i, d = bvh.ray_cast(ob.location, v)
            if d is not None:
                if d < min_dist:
                    min_dist = d
                    v_loc = ob.matrix_world.inverted() @ loc
        ob.data.vertices[idx].co = v_loc

def my_handler(scene, depsgraph):
    ob = scene.objects[object_name]
    selection = [oo for oo in scene.objects if oo != ob and oo.type == 'MESH']
    print(ob.location)
    set_positions(scene, depsgraph, ob, angles, selection)

# to debug n test clear the lot.
bpy.app.handlers.frame_change_post.clear()
bpy.app.handlers.frame_change_post.append(my_handler)

TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector'
EDIT
See Scan plane "shadow" re my take on an update for 2.8.


How to distinguish material and material slot

Material Slots
A Material Slot is simply a selection of geometry elements. Nothing more. They define which material goes on which part of an object.
For a mesh object, a material slot contains a selection of mutually exclusive groups of faces (one face can only belong to exactly one material slot at a time) to which you may apply a material.
A material slot is a property of the geometry of an object data and is tied to its shape. At the most basic level for a mesh object, you can specify which discrete faces belong to which material slot. Under other object types, it is more limited but the principle still applies, you select a bunch of elements (like a continuous spline in a bezier curve, or a few characters in a text object) and assign it to one slot.
In other words, if you want to apply several materials to different parts of the same object, you create several slots to determine which material goes where.
Material Slots are not materials and hold no color or surface information whatsoever on their own. They are completely independent of material definitions.
Material slots do hold materials in them, and may commonly then have materials assigned or just remain empty. The same material can be applied to several different slots in the same object or shared across different objects, but one slot can only have one material assigned to it at any given time.
Material
A material, on the other hand, is a collection of information (surface properties, textures, colors, images, volumetric data among others) that define the appearance of a geometry either through its surface, volume or emission properties. It may or may not make use of image-based textures.
Materials can also be assigned to a slot in a "Per Object" or "Per Object-Data" basis. The difference is that if you apply a material "Per Object" every instance of that object can override that material independently per individual occurrence and have a different one in its place.
If you apply it "Per Object-data" to all objects sharing that object data (geometry) will have that same material applied to that one slot regardless, if you change the material assigned to that slot in one object, it will sync change it for all instances sharing that data.
Say for example the same car mesh that can have a yellow chassis in one place but a red on another while remaining a linked instance (per-object material), but the tires will always be black rubber regardless (per-object data forced material), if you change the tire material in one car it changes for all of the copies.


Particle as Hair on oval Sphere act wired, goes crazy

You probably made the scale in object mode, press Ctrl + A  to apply the scale. Use edit mode to change the mesh properties


How can I keybind the fly navigation camera in 2.8?

It is in View>Navigation>Fly Navigation

Right click And you have "Assign Shorcut" in menu


How to make particle grains move across screen on render?

Watch closely from 43:30 - he adds a keyframe to some node values and then adds a noise modifier to the the keyed value.

A little later about 47:05, he adds a translate node and keys the x and y values to get some parts moving across the screen.


Model displays a non-existing outbound edge when outside edit mode

You seem to have a hidden vertex. Go into Edit Mode, unhide it with Alt + H and delete it.


How to merge (boolean) two objects that share faces/edges

Boolean operation doesnt handle this co-planar faces, known issue. That is why I used in thelink Remesh. In your case (from screens) it can be done by several ways.

like in your last screen higher cylinder, after boolean select upper vertices, scale (S) Z = 0, than delete (X) Limited Disolve (or after boolean ad another cube and cut it from both sides at once)
on top of cylinder add rectangle in edit mode and use Knife Project so you got edges on place were cube cross cylinder, select faces and extrude
or try Remesh Modifier with some luck https://blender.stackexchange.com/a/165574/2214

... or any other technique, but there is no direct setup for Booleans to fix this issue, sorry.


how can I make my animated robot pick up an object (a pole) during an animation

The object can be parented to the empty, and the empty can be constrained to the robot's arm. You will need to use keyframes to control the constraint on the empty. That's how I usually do it. Then you can animate the object independently if you want to. It's hard to answer this question without more information about the problem and your current ability with Blender. Are you a beginner? How are you currently animating this and what is giving you trouble?

Anyways, if you're totally averse to using keyframes on anything but your robot rig, add a bone to the rig where the object will be when it is held (Object-Socket). Duplicate the bone (Object-Parent). Now, remove any parents from object-parent by pressing alt-p, and make sure object-socket is parented to the hand bone (or whatever the robot is picking it up with). Create a Copy Transforms constraint by selecting the object-socket bone and then the object-parent bone (order matters) and press shift-ctrl-c --- choose Copy Transforms from the menu. Now, parent the object to the object-parent bone. When the Copy Transforms constraint on  object-parent is enabled, the object will stay in the hand. When it is disabled, the object-parent bone will return to its place, which can be animated as normal (and may look like a jump when you disable the constraint. To fix this, turn the constraint back on, press the I key and set a keyframe for Visual location/rotation/scale, then turn the constraint back off. the object should now be in the position it was in with the constraint, but it no longer follows the hand. This is useful when the object needs to be put back down, thrown, etc.). I wouldn't really reccomend doing it this way unless you have a reason not to use the first method, which I think is cleaner. And of course the visual location/etc. keyframe trick works on any constrained object.
I'll add more detailed explanation if you need me to, but if you're unsure about rigs/armatures, constraints, parenting, etc. the first thing you should do is study those features of Blender, since they're essential to animation. There's no need to be a superstar rigger, but an animator should understand the basics.

I hope this is helpful.


The process is rather simple. First take your torus knot, select one edge loop and press P to separate by selection. Then you are left with 2 objects - the Knot and the "loop"

Then, you can delete the knot, leaving only the edge loop (if that's what you want). Select the loop and convert it to a curve.

Then, add the mesh you want to repeat along the curve and give it an Array Modifier and a Curve modifier.  Make sure the curve is the second in the list. For the curve object, select the "curve" you made from the edge loop.

As usual, you can rotate/transform the "following mesh" (in edit mode) to give different effects.


How can I control the size (Diameter) of a ring that is made with the simple transform / Bend?

Different, slightly quicker approach -

Add a cylinder and change the radius and depth in the last operator panel to match the desired values:

Then in edit mode, select the top and bottom faces, extrude in place (press E, then immediately after Enter before the faces had a change to move anywhere), then change the pivot point to individual origins:

Now scale the top and bottom faces to match the desired radius. Since we change the pivot to individual origins, each face will scale around its own origin, and in effect both faces will be inset.

Now the only thing left is to bridge the two faces to create the inner hole and geometry (see answer above to explain how to activate the looptools addon if youre not familiar with it):


Rotating particles in two different axis

Here's a setup for having the objects rotate only on 1 axis:


It looks like you can use soft body physics for this. However, you'll need to lower the Shape Match threshold. (If you turn it off entirely, your shape will just crumple.)

You'll also need to subdivide your cube a lot, if you haven't already done so. If you're using a modifier for this, you'll need to apply it.


Trying to create a material for to apply a texture on a game model

Okay, the thing is that you're using cycles but are not using the nodes to actually apply the image texture, you can do it like this:

Select the model in object mode -> go to materials -> select the material->go to node editor

After that, check the box use nodes

It'll look like this, then you have to create an image texture node by pressing SHIFT + A and click search, search for image texture, after that you only have to select the image you already have in the .blend file:

Hope this helps!


How do I clear this list so I can start empty and fresh?

I don't think that there is a way to clear this list without a script. If you don't want to use a script, save your objects individually, and re-load the Blender start-up file. Then import your objects, and make new shaders.


object rotation and alignment to a face in another objects

This is how I got what I wanted:

I got 3 connected vertices of face2 (polygon5) from the cube (v1, v3, and v5).
the vertex (v1) connected to both other vertices (v3 and v5) is going to be the origin of my new local coordinates.
each vertex is represented by a vetcor (from origin to vertex) in Blender.
I chose vector v1-to-v3 to be x axis, vector v1-to-v5 to be y axis, then the cross product of both (normal between the two) to be z axis.
Construct the 4x4 rotation matrix.
give face 1 the same rotation.

This is inspired by: My attempt to construct transformation matrix using 3 vertices (didn't work, need help)

code:

import bpy
import mathutils

p = bpy.data.objects['Plane']
c = bpy.data.objects['Cube']

# You need to know which face of the cube is selected, in my case it is no. 5
# you need to know the vertices of face 5, in my case they are 1,2,3,5
# you need to pick a vertex to be origin, I chose 1
# you need to know which vertices connected directly to vertex 1 by an edge, in my case 3 and 5

x = c.matrix_world * c.data.vertices[3].co - c.matrix_world * c.data.vertices[1].co
i = x.normalized()
y = c.matrix_world * c.data.vertices[5].co - c.matrix_world * c.data.vertices[1].co
j = y.normalized()
z = x.cross(y)
k = z.normalized()

rot = mathutils.Matrix((i,j,k)).transposed().to_4x4()

p.matrix_world = rot


import bpy

context = bpy.context

# choose from data
tracks = bpy.data.movieclips["clip_name"].tracking.objects

# choose from context
tracks = context.scene.active_clip.tracking.objects

# selected camera tracks
selected_camera_tracks = [t for t in tracks['Camera'].tracks if t.select]

# selected object_tracks
selected_object_tracks = [t for t in tracks['Object'].tracks if t.select]

# toggle selected object tracks
for t in tracks['Object'].tracks:
    t.select = not t.select


Scripting an inspector/editor for custom properties

This can be achieved with custom property getters/setters.
Use custom getters/setters to read/write to the desired data instead of the default behaviour.
def get_array(self):
    mc = self["blk_flags"]
    return list (map (lambda i: ((mc >> i) & 1) > 0, range (8)))

def set_array(self, values):
    mc = 0
    for i in range (8):
        if values[i]: mc |= (1 << i)
    self["blk_flags"] = mc

class BMBlockSettings(PropertyGroup):
    blk_flags : IntProperty (name="Bit Flags")
    blk_arr : BoolVectorProperty(name="Toggles", size=8, get=get_array, set=set_array)

class BM_PT_block_inspector(bpy.types.Panel):
    bl_idname = "BM_PT_block_inspector"
    bl_label = "Block"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        self.layout.row().prop(context.object.bm_block, "blk_arr")

def register ():
    bpy.types.Object.bm_block = PointerProperty(type=BMBlockSettings)

def unregister():
    del bpy.types.Object.bm_block


How to distribute / align objects in a line or grid with even spacing?

There's an ol'-school method to distribute your objects on a grid made for the purpose, here with 'Faces Only' deleted:

Add  or link your assets to a collection.
Give your display grid a particle system, set to emit [ its vertex-count ] particles, all at frame 1. Non-random, from vertices, particles with a long life.
Particle Physics : 'None'.
In the system's 'Render' panel, set to render the collection, scale 1, no randomness
In the (collection-context) 'Collection' panel, check 'Object Scale' and 'Use Count', with default (1-per-item) setting.

In the grid's modifier stack, you can convert the particles to real instances.


Copying mask key frames but different shape

In the movie clip editor.

Select the vertices of the mask you want to move, then shift-select one of the control points of the other mask and press Ctrl+P to parent.

For example: this mask is parented to a tracking point.

If I create a second mask, and parent it to one of the points of the first mask, then they both move together.

If you don't want to create a new mask but duplicate an existing one. Just select the mask, and hit shift+D to duplicate it and move it where you want, all of the atributes and keyframes of the original mask will be duplicated.


Boolean Modifier Trouble - Yes.... The Anvil

Rotate the cylinder a few degrees around the zed axis to fix it.


Create custom physics for an object with python

Yes it is possible, there are 2 ways of doing this, but there are also 2 big drawbacks for both methods:

method 1: You can script your own modifier in c++, here is how to start. The drawback is you need to build your own Blender version yourself. Modifiers cannot be add with python or addons. If your modifier gets approved it can be added in the trunk (official release).
method 2: You can add your physics simulation code in the app handlers. This way your code gets executed for example every frame change. You can manipulate objects, change mesh etc. This will work from addon but the code will be very slow and you will unlikely get real-time fps.


Is there a way to select edges marked as sharp via python?

There isn't a single command for this, but a script to do this is quite simple:

Note that with BMesh, the same smooth option is used for faces and edges (not smooth == sharp).

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)
for e in bm.edges:
    if not e.smooth:
        e.select = True

bmesh.update_edit_mesh(me, False)


Should I open two blenders to render with my GPU/CPU?

This should work, but I don't know if you want to risk it because you are rendering directly to a video file.

If the animation render stops the avi file could be corrupted. Not to mention if your computer crashes it will be lost entirely.

This is why it is considered bad practice to render directly to a video file.

If you were rendering to an image sequence, then it wouldn't be a big deal even if your computer crashed completely because everything up to the previous frame would be on the hard drive.

To answer your question:
Performance wise, I tested this with a GTX 460 and a quad core intel xeon rendering two separate scenes in separate instances of blender.

There was a slight slowdown on the CPU scene when I started the GPU render, but it was barely noticeable. What made me certain that there was indeed a slowdown is that the time estimation for the CPU render jumped backwards about a second or two when the GPU render was started.


After starting up Linux I wanted there to mount the windows partitions. NTFS filesystem couldnt be mounted though since Windows was not shut down properly (which is not true). I cleaned the state and mounted them, worked with blender, then restated into windows. Blender then worked again. Not sure now if that was coincidence or if this was the result of sth else I did... but perhaps it's worth a try if someone runs into this problem.


How to mix a jpeg background image with a 3D scene generated using Filmic Blender?

I'll try to answer simply but even for me it's not. But what you try to do isn't possible. (see the edit 1 for the answer of your problem)

1st, prerequisites:
In our world light is linear, but we didn't see it linear, the eyes make it looks with more contrast (what we can call a transfer curve).
Your display (let's say a computer screen) have it's own transfer curve (for technical historical reason), so to see a picture close to what we see in real life (a linear light interpret non linear by the eyes) we need to bake a transfer curve "inverse" of the display one to bring the image a linear signal to the eyes.
At this stage it's a bit confusing, let's make it simple:

Real life: Linear light --> non linear interpretation by the eyes

sRGB image: non linear (transfer curve of sRGB) --> linear ("inverse" transfer curve by the screen) --> non linear interpretation by the eyes.

CG: Scene referred linear image (what Cycles calculate internally)--> non linear (ex: filmic+high contrast transfer curve) --> linear ("inverse" transfer curve by the screen) --> non linear interpretation by the eyes.

It's a bit simplified but what's important to understand here is that the eyes need to recieve a linear image, like in real life eyes recieve linear light but we don't see it linear.
One more important things is that each of the above have their own transfer curves (eyes, screen, filmic, sRGB, APN, smartphone... they are all different).

If you set up a color space to filmic for an image in 8bits sRGB .jpg that you don't know how it was manipulated, you try to see informations that were lost in the compression + you're mixing transfer curves.

You must look filmic in two parts.
1st, the filmic itself, that is a LUT which compress values to be in 0/1 range in a logarithmic way (transfer curve). So, the end result is a nonlinear image.
2nd, the contrast looks which modify the transfer curve shape.
There is one more caracteristic with filmic, the desaturation of the high value colors.

I'll see if I've made mistakes or forgot something in what I've said, and will correct them if it's the case.
Don't hesitate to tell me if I'm wrong or need more informations.

Edit 1: Sorry I've understand a bit more your problem and have more infos.

When you try to compose your image with your final render you need to remember that filmic in the color management is aim for linear scene referred images and is applied at the very end of the chain, so your image that is composed with the linear render will have filmic conversion too. But your image is an 8bits sRGB .jpg and must be threat as a sRGB EOTF.

What you need to do is save your render with filmic and all compositing but without the background, and after that compose your render with the background image both in sRGB for image colorspace and color management view in sRGB, no more color transformation at this stage since you are in 8bits.

This is the problem when you work with both linear scene referred data and display non linear data.

Hope I've all understood this time.


Yes, its possible:

You have to use GLSL, make your horror scene, dont use any lights (for the scene).
After, you may parent a Spot to your camera (Ctrl+P make parent, keep transform), and set the color of the spot to a green tint, decrase the energy for a better effect. There is many parameters for the spot, you just have to try ;)


EDIT

If you are using an array modifier the mesh of your object is sill only one plane that is repeated along a curve. The follow active quads will not work until you apply the modifier: only then your mesh will be a sereis of connected planes.

Once you do that then you can do proper unwrapping.

First select just one face.

Select then all of the faces (press A).

You'll see that the face you had selected first is marked as active (with a dotted pattern)

Then do unwrap (U) Follow Active Quads.


baking normal maps for games. Smooth shading issues

If you get the bakes that looks good they should be fine. If it's a glossy surface then you can get stair casing in the normals where they are nearly flat since 8-bit reproduces only a limited number of angles. The simplest way is to add hard edges the windows edge to make it perfectly flat.

Triangulate meshes before baking them. Software does not always agree how to split the faces so it's good to make sure you decide.

You should avoid thin triangles. Thin triangles can act as a hard edge since they usually don't get enough pixels to bend where normals changes. Perfectly flat surfaces with no normal changes can handle thin triangles though.

Separate all hard edged faces on separate UV-islands and give them enough margin.
If they are to close they might fight over the pixels. Remember that mip-maps will be in lower resolution.

Align bevels and other details with pixels where possible. Prioritise sharper bevels.

Give detailed areas of your mesh a bit more UV space so the smaller triangles will get what they need.

You can get distortions and other artefacts where the normals bends but I think it's better if you encounter them, figuring out way they appear and how to mitigate them.


Shift - A -> Mesh -> Cylinder

R -> X -> 90

S -> Y -> 3

Object -> Quick Effects -> Liquid

change flow behavior from geometry to inflow

check "Initial velocity" -> y: 20

Select Cylinder -> Shift D -> S -> 1.1

Tab -> Select top face

X -> delete face

Tab

Change type to effector

add solidify modifier, thickness: 0.1 -> move to top (before fluid)

select domain and press S -> 2 to double the size of the domain

change resolution division to 140

start animation by pressing Space
result:


I think you should get something pretty good with sculpting, you just need to observe how the fabric behaves. Here's a quick try, I've given the object a Multiresolution modifier, when you're fine you can bake the normals, delete the Multiresolution modifier and use the normal map on the original low-res version.


At the time of this writing (April 2017), it appears that this might need to make use of an external platform like Spin 3d from NCH Software; there does not presently seem to be a way to do it directly. However, that said, the 3MF format specification is open source, and I would expect that there will be, sooner or later, the possibility of direct import to, and direct export from, Blender.

Implementing either of these will take programming capabilities that are outside of my skillset, so I won't have direct involvement.


Do not repeat the texture on Collada export?

As far as I know Collada (and most other export formats for that matter) concern themselves mostly with exporting geometry, UV's and some times animations and constraints, not materials or textures.

Materials are very tied to the rendering system they belong to and can't generally be easily exported between applications apart from some basic properties.

Whatever changes you make to your material and/or texture settings are not at all guarantied to be correctly exported, and will most often get lost, many of them are (as you already stated) not even supported as in the viewport as rendered preview (like the clipping setting).

Now I do not know Collada export very well, nor do I know MeshLab software, but if you want your texture to show up in one face alone I'd advise either to use a different material for that face, or to unrwap your mesh accordingly, having in mind that by default all textures will tile infinitely.

That probably means setting the UVs for the faces that should have no texture to 0,0 like for example scaling them down to one corner of the UV editor.

For any other more complex material properties it's probably better to do it in meshlab or whatever final destination application you will be using.

Also see .fbx export why there are no materials or textures?


Modifiers: add and set "live" parameters then apply via python

In point 1 for the add modifiers operator you set obj to the active_object but don't use it. Rather than using other operators it would be better to perform the task as -

obj = context.active_object
dm = obj.modifiers.new('Decimate','DECIMATE')
dm.ratio = 0.5

And similar for other modifiers.

For point 2
Inside draw() for your panel class you want to add

obj = context.active_object
row.prop(obj.modifiers['Decimate'], "ratio")

That will show the decimate modifiers ratio property right there in your panel. Adjust for other modifier properties you want.

For point 3 the apply modifiers needs to be inside the execute function.


How to increase Font size in blender-3d (2.79)?

From the Release Notes: The user preferences now have a Display Scale setting in the Interface tab, to adjust the size of fonts and buttons relative to the automatically detected DPI.


Right click to access to Object Context Menu and Shade Smooth (or header menu > Object > Shade Smooth). You can change the angle threshold of smoothness in the Properties panel > Object Data > Normals > Auto Smooth. But the whole shape will still look angulous on its borders, if you need to round it for real you need to give it a Subdivision Surface modifier (and apply it if you want to import into a game engine).