Adding icon to toolshelf in 2.8 I've been struggling all day to add icon with action from loop tools (circularize selection). Firstly I've added a hotkey into my keymap:

Then I looked into it's structure and tried to make it happen with ui_tool_simple template in scripting tab.

I came up with something like this:

# This example adds an object mode tool to the toolbar.
# This is just the circle-select and lasso tools tool.
import bpy
from bpy.types import WorkSpaceTool

class MyTool(WorkSpaceTool):
    bl_space_type='VIEW_3D'
    bl_context_mode='EDIT_MESH'

    # The prefix of the idname should be your add-on name.
    bl_idname = "ui_plus.circularize"
    bl_label = "Circularize"
    bl_options = {'REGISTER', 'UNDO'}
    bl_description = (
    "Move selected vertices into a circle shape"
    )
    bl_icon = "ops.generic.select_circle"
    bl_widget = None
    bl_keymap = (
        ("mesh.looptools_circle", {"type": 'LEFTMOUSE', "value": 'PRESS'},
        {"properties": [False, "best", True, 100, False, False, False, 1, True]})
    )

    # bpy.ops.mesh.looptools_circle(custom_radius=False, fit='best', flatten=True, influence=100, lock_x=False, lock_y=False, lock_z=False, radius=1, regular=True)

    def draw_settings(context, layout, tool):
        props = tool.operator_properties("mesh.looptools_circle")
        layout.prop(props, "custom_radius")
        layout.prop(props, "fit")
        layout.prop(props, "flatten")
        layout.prop(props, "influence")
        layout.prop(props, "lock_x")
        layout.prop(props, "lock_y")
        layout.prop(props, "lock_z")
        layout.prop(props, "radius")
        layout.prop(props, "regular")

def register():
    bpy.utils.register_tool(MyTool, after={"builtin.scale_cage"}, separator=True, group=True)

def unregister():
    bpy.utils.unregister_tool(MyTool)

if __name__ == "__main__":
    register()

Although it just gives bunch of errors.

Traceback (most recent call last):
  File "\ui_tool_simple.py", line 45, in <module>
  File "\ui_tool_simple.py", line 39, in register
  File "2.80\scripts\modules\bpy\utils\__init__.py", line 795, in register_tool
    tool_converted = tool_from_class(tool_cls)
  File "2.80\scripts\modules\bpy\utils\__init__.py", line 792, in tool_from_class
    cls._km_action_simple(kc, context_descr, tool_def.label, keymap_data)
  File "2.80\scripts\startup\bl_ui\space_toolsystem_common.py", line 317, in _km_action_simple
    keymap_fn[0](km)
  File "2.80\scripts\startup\bl_ui\space_toolsystem_common.py", line 52, in keymap_fn
    keymap_init_from_data(km, keymap_fn.keymap_data)
  File "2.80\scripts\modules\bl_keymap_utils\io.py", line 231, in keymap_init_from_data
    for (kmi_idname, kmi_args, kmi_data) in km_items:
ValueError: too many values to unpack (expected 3)
Error: Python script failed, check the message in the system console

If I delete draw_settings, it will let go - no errors, but when I press newly created button nothing happens. When I hold mouse and drag it only moves selected faces.

PS. Commented line meaning:

    # bpy.ops.mesh.looptools_circle(custom_radius=False, fit='best', flatten=True, influence=100, lock_x=False, lock_y=False, lock_z=False, radius=1, regular=True)

Is what python console says is being done when pressing shift + ctrl + c (as a hotkey from keymap)

To everyone who wanted to also know why this doesn't work - here after long fight I managed to make it work, here's code:

# This example adds an object mode tool to the toolbar.
# This is just the circle-select and lasso tools tool.
import bpy
from bpy.types import WorkSpaceTool

class Circularize(WorkSpaceTool):
    bl_space_type='VIEW_3D'
    bl_context_mode='EDIT_MESH'

    # The prefix of the idname should be your add-on name.
    bl_idname = "ui_plus.circularize"
    bl_label = "Circularize"
    bl_options = {'REGISTER', 'UNDO'}
    bl_description = (
        "Move selected vertices into a circular shape"
    )
    bl_icon = "ops.generic.select_circle"
    bl_widget = None
    bl_keymap = (
        ("mesh.looptools_circle", {"type": 'LEFTMOUSE', "value": 'PRESS'},
    {"properties": [("custom_radius", False), ("radius", 1)]}),
        )

def register():
    bpy.utils.register_tool(Circularize, after={"builtin.scale_cage"}, separator=True, group=True)

def unregister():
    bpy.utils.unregister_tool(Circularize)

if __name__ == "__main__":
    register()


Add a line between two objects? I have empty1, the empty that fires the bullet(s), and empty2, the empty that is always at the center of the screen. If you are confused about empty2's function, look at this question. On command, I need a line, which is our bullet, to be added. I obviously can't just add a line that starts at empty1 and is endless as that causes many issues. When the command to shoot a bullet is sent, I need a line to be created, starting from empty1, and I need to it to continue towards empty2. In other words, I need a line to be between two objects (for my case, empties). What is the best way to achieve this? Thanks!

EDIT: I prefer that the "line" is an object as I'll be planning to change its color, thickness, etc.

I added these to clarify what I do

You could select one empty, then press ShiftS --> Cursor to selected!

Add a curve (since you can modify it's thickness), press Tab to enter 'edit mode', select one vertex, press ShiftS --> Selection to cursor. Press Tab to exit 'edit mode'

Select the other empty, ShiftS --> Cursor to selected. Then select the curve, press Tab to enter 'edit mode'

select the other vertex, press ShiftS --> selection to cursor

result:


How to snap the 3d cursor to a specific vertex? I need to snap the 3D cursor to a specific vertex based on it's ID (to create an empty at that location) and I'm having trouble finding a simple way to achieve that.
Anyone got some pointers?

I think you want to move the 3D cursor in order to use bpy.ops to create the empties.
You should avoid using it because it involves updates at each usage and is slow.
In your case you can use directly objects data.
The code is commented below but ask in comments if anything is not clear:
import bpy
import bmesh

def empties_from_indices( context, obj, vertex_indices ):
    #Get the current collection
    collection = context.collection
    #Access to obj vertices
    vertices = obj.data.vertices
    #Get its world matrix
    matrix = obj.matrix_world
    #Loop over indices to get vertex locations
    for location in [vertices[index].co for index in vertex_indices]:
        #Create an empty
        empty = bpy.data.objects.new("empty", None)
        #Set its location converted in world space
        empty.location = matrix @ location
        #Add it to the current collection
        collection.objects.link(empty)

#Get current context and object
context = bpy.context
obj = context.object

vertex_indices = [1, 4, 6]

empties_from_indices( context, obj, vertex_indices )

If you need to access vertex location when the object is deformed by a modifier or has an armature for instance, you can use the following (same principle, only the way vertices are accessed changes):
import bpy
import bmesh

def empties_from_indices_with_deform( context, obj, vertex_indices ):
    #Get the current collection
    collection = context.collection
    #Access to obj vertices
    dg = context.evaluated_depsgraph_get() #Get the dependency graph
    bm = bmesh.new() #Create a bmesh
    bm.from_object(obj, dg) #Get object data
    bm.verts.ensure_lookup_table() #So that can access verts with indices
    vertices = bm.verts
    #Get its world matrix
    matrix = obj.matrix_world
    #Loop over indices to get vertex locations
    for location in [vertices[index].co for index in vertex_indices]:
        #Create an empty
        empty = bpy.data.objects.new("empty", None)
        #Set its location converted in world space
        empty.location = matrix @ location
        #Add it to the current collection
        collection.objects.link(empty)

#Get current context and object
context = bpy.context
obj = context.object

vertex_indices = [1, 4, 6]

empties_from_indices_with_deform( context, obj, vertex_indices )


What are the options to extrude fingers from a low poly hand? The technique I currently use to create faces to extrude fingers from a base mesh is: Cut the front and upper faces with the knife tool (as shown in the image).

Using the knife tool creates n-gons which influences the topology, creating more loopcuts would be continue over the arms to the whole body where they are not really needed (and would create more work to adjust them).

Are there any alternative techniques?

You can use inset, but I have only tried this for three fingered hands:

Individual inset (II) with both faces selected:

Select the faces inside the new inset, move them forward a bit, inset again:

Select the faces inside that inset and move them forward, extrude middle section:

Extrude fingers:


When change view into rendered, the object turning grey. I have followed this tutorial recently:https://www.youtube.com/watch?v=cLUAp4lSxLI

But I had the problem at 30:12. When he changed viewport into rendered, the object is clear:

However, I did the same as he did, but my object looks grey:

Had I skipped something important?? What's that???

In one of the previous videos he had assigned an HDR image as a light source.

In the world panel click the button right of the dark grey colored box

Then choose environment texture

Then load Your HDR image:

You can find these HDR images for free at HDRIhaven
An HDR image is basically a spheric image with awesome light information


Where to set 'use_blender_profile' option? I have seen that the Collada exporter uses a flag called use_blender_profile.

Looking at the source file, it seems that this option allows to export additional information in the Collada file :

connect to say if the bone is connected to its parent
tip_x, tip_y, tip_z to tell the length of the leaf bones

Without these values, the information is lost as Collada encodes the armature differently.

But where and how use_blender_profile can be set ?
Am I right about the exporter behavior ?

The blend file :

You find the setting in the exporter's option pannel:

Note that this is a new option (added in june 2016). This option will become available in Blender 2.7.8. Of course you can download the most recent nightly build. There you should find this option as well.


How can I use Mesh as a Tile on Geometry? I am currently developing a scene and some assets to work with.

I'm not using any UV mapping or texturing as I'm going for an old polygonal 90's look.

I have a 'Grass' mesh that I want to use as a tile on the faces of a simple plane geometry and I was wondering if there is a way to have the 'Grass' mesh scale to the faces appropriately.

I was thinking of just simply Shift-D to duplicate the grass and then place it on the mesh manually, but I would like to know if there is a better way.

Would be nice if there was a way to just extrude or scale the 'Grass' mesh and have it simply divide its appearance as it scales.

See Duplication and Particles/Hair.  I am trying to give a quick answer to get you started on research.

Some of these have scale to face area features.

See this
Tapering a tentacle mesh with uniformly scaled suction discs

Particles can have texture in (Strand/Particles) coordinates. The texture can control size of particles.  The texture may be a superior and more forthwith solution rather than size of tiles.

This proposed answer is not a tutorial. Seeing duplication and particles may be fun. Please search at BSE and the famous video site that rhymes with noonoob.   Keywords Blender Particles Duplication Dupliverts Duplifaces.

These concepts can involve some hours of work as you become more skilled with them.


Moved folders, now PNGs are pink, how do I restore? I decided to clean up my desktop and I moved all the folders into one folder, including the folder holding all my Blender files.  I opened a Blender file and saw that the objects that are textured with a PNG are now pink.  I believe this is because Blender lost track of the PNGs when I moved the folder.  Some of the objects are textured with a PNG series (movie).  They are also pink.  Is there any way I can get Blender to find those PNGs without having to do a System Restore on my computer? I tried moving the folder back to the desktop but that did not seem to help.

Select File -> External Data -> Find Missing Files.

The file browser will open, find folder with missing files here. Repeat this with all folders with textures.


Adding the percent symbol on the end of a number sequence in animation nodes The picture above shows the animation node setup I have currently. It is controlled by the movement of an empty. But I want to add a percent symbol on the end of the number. How can I do that? TIA

You can use the Join Texts node (maybe "Join Strings" in your version) to concatenate multiple texts.


Blender fluid simulation fluid not colliding with effector's inside I'm trying to fill a water bottle in blender but when I set it as effector the fluid from the fluid source passes directly through it, I don't know what to do help.

Here is the blend file

@thibsert is correct: bottle had a gaping hole at the bottom, which I clumbsily sealed by adding a cylinder.
Also...
The Collision Effector surface thickness has to be at least 0.5 Thickness, which I have reported as a bug. And I have no idea why the default Sampling Substeps is '0', when I find that is often insufficient.  This also (unfortunately) implies that you'll have to have a duplicate, 0.5*2 larger scaled (hidden) effector, if you want to fluid to touch the sides and bottom of your bottle (workaround for the bug).
You also had "Use Effector" disabled, so it was ignored by the simulation.  I also increased the Domains Resolution Division, and decreased the particle size: often a pair of culprit contributors to poor results.
here is the resulting blend file:


Cannot Open Or Start AVI Movie File? There seem to be a few people encountering this problem since I've found no answers online. I just rendered an animation but I need to render it again as the keyframes didn't match up properly because of the lag. I haven't changed any settings or anything since my last render (I think). Has anyone else encountered this problem/know the solution?

Thanks!

I was really stumped when I switched operating systems, reinstalled Blender and suddenly my animations would no longer render. Turns out my Output path wasn't writeable in the new operating system. Perhaps it's unlikely your issue ends up being so simple, but since I stumped me for a bit, I thought I'd post my solution here and hope it helps someone else.


Is it possible to "dissolve" a driver and commit its effects on an animated armature? My ultimate goal is to export an animation from Blender to Unreal. This is generally done by filmbox (FBX) files. However, my animation relies somewhat on drivers, which do not seem to export through FBX.

However, armature animations (and even scaling/rotating/translating) do export, which coverse the second half of my animations; so it seems like it should be easy to work around. Currently I've been manually transforming every armature to match what the driver would have had it doing, and this has worked well enough, but it is fairly tedious.

Is it possible to "commit" a driver's actions in an animation and remove it, simply leaving everything moving as it would have with the driver around? If so, how does one do it?

Figured it out, with the help of Rich Sedman.

What I'm doing now is establishing a complete animation in Blender, with the use of drivers and empties. Blender drivers are python-dependent, so of course they don't export; but by doing the following I can make the FBX animation-ready.

Bake the movement of the empty. (This option is in the 3D view, under Object->Animation->Bake Action)
Bake the animation of the target mesh in the same way.
Open up the graph view, go to Drivers and then the driver pane on the right, and remove the driver. It's no longer necessary.
Delete the empty that was in use. I suggest this because otherwise, the animation applying to the empty will still export; and FBX doesn't do much for identifying which meshes are associated with which animations. Tools like Unreal and Unity will get confused, and most likely apply it to the end mesh.
Export the animation as an FBX file, and it should be ready to use.


Texture is not displayed on the meshes. How to display? I'm newbie to Blender.

Please see the following screenshot.

I've unwrapped the UVs for the mesh, generated a test image, set the 3D view display mode to Texture. But the texture does not show on the mesh.

In fact, for some time the texture was displayed on the meshes. But one day I tried to unwrap a remaining mesh, the texture was not displayed on that mesh. I tried a few menus, but failed.

Then I removed the test image by Shift-clicking 'X' button on the UV image name widget, saving the file, and reloading. Then... all meshs lost the texture.

It seems that the texture link of the UV map is lost. How can I recover it? And, how can I apply texture to the remaining meshes that refuse to display the texture even after the UV unwrapping?

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?.


Compiling Blender 2.8 Beta I've compiled Blender 2.79 for macOS by using

mkdir ~/blender-build
cd ~/blender-build
git clone http://git.blender.org/blender.git
cd blender
make update

cd ~/blender-build/blender
make

Could someone let me know how to compile the latest Blender 2.8 Beta

Thanks

I'm on windows but AFAIK it's the same method, the code for downloading 2.8's repo is:

git clone git://git.blender.org/blender.git -b blender2.8

If your make doesn't work, try maybe make 2017 full (or make 2017 release for CUDA handling).


Why do I get a blank render with GPU? I'm doing a speed test. I have a scene with an Ice Tea in it. On CPU it renders correctly, as expected. When I switch to GPU rendering, the render is blank, there is only the background color - world color. What do I have to setup to correctly use GPU rendering?

Here are screenshots, using CPU and the GPU result, which is empty, it's just world color. I'm using Cycles of course. And I'm not using HDRs. I'm using mesh lights though. I can't share the blend.

Edit: I tried to render a basic plain cube, just the startup scene, and the result is the same - blank render. So I think it's not a matter of Blender settings.

Should the "Experimental" option be selected on the GPU/CPU screen? This might support a wider array of GPUs.

Make sure you have a supported CPU with the correct drivers installed.


python - how to select a vertex in a circle Any suggestions as to how to select (in python) one specific vertex of a septagon (seven vertex mesh circle)?  When I do it manually, it doesn't show up as a command or function in the python info window for me to copy into my python code.

So far I have this code which doesn't throw an error, but doesn't achieve the desired effect, either ... after running, all vertices are selected instead of just vertex 0.

import bpy
import bmesh
bpy.ops.mesh.primitive_circle_add(vertices=7, radius=1, enter_editmode=True, location=(0, 0, 0))

bpy.data.meshes['Circle'].vertices[0].select=True
bpy.data.meshes['Circle'].vertices[1].select=False
bpy.data.meshes['Circle'].vertices[2].select=False
bpy.data.meshes['Circle'].vertices[3].select=False
bpy.data.meshes['Circle'].vertices[4].select=False
bpy.data.meshes['Circle'].vertices[5].select=False
bpy.data.meshes['Circle'].vertices[6].select=False

Have to select in object mode

To select mesh vertices using me.vertices[i].select need to set in object mode, and toggle into edit mode.

When a new primitive is added all the geometry is selected by default.

Here the mesh is added in object mode (without toggling into edit mode)  all geometry is deselected (brute force) , vertex index 0 selected, and then toggle into edit mode.

import bpy
context = bpy.context

bpy.ops.mesh.primitive_circle_add(vertices=7, radius=1, enter_editmode=False, location=(0, 0, 0))
ob = context.object
me = ob.data
for g in me.vertices[:] + me.edges[:] + me.polygons[:]:
    g.select = False

me.vertices[0].select = True

bpy.ops.object.mode_set(mode='EDIT')

Please note. When an object is created with an operator the object and mesh are given default names, "Circle" in this case. If another is added then the names may or may not be "Circle" if there is another with same name.

The newly created object will always be ob = context.object and its data part, mesh in this case ob.data.  (suppose I'm saying, pays to get out of the habit of bpy.data.objects["What the first one's name is"])

or use bmesh, and load in the edit mesh and fix. (as answered by Leander while writing this), however this uses bmesh in conjunction with the add primitive operator.

import bpy
context = bpy.context
import bmesh
bpy.ops.mesh.primitive_circle_add(vertices=7, radius=1, enter_editmode=True, location=(0, 0, 0))
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
bm.select_flush(False)
for v in bm.verts:
    v.select = not v.index
bmesh.update_edit_mesh(me)


Make the outer circumference of the tire smaller Is it possible to make the outer circumference of the tire smaller.
So that the height of the tire becomes lower, but the inner size (rim size) remains the same.

This is easy using proportional editing and the scale tool.

Go into an orthographic view that shows the tire from the front (it would roll towards the camera).
Set viewing mode to wireframe, with ghost mode on.
Use Border Select, Ctrl+B, to select the entire tread area of the tire.
Switch to the scale tool.
Scale along the desired plane (the two axes that are not the axle axes). The sides of the tire WILL NOT FOLLOW yet.
Go to the Adjust Last Operation area in the bottom right of the 3D View, and turn on Proportional Editing. Set the size to something just under the former distance between the tire treads and the part that contacts the wheel.
The walls of the tire should gradually tighten towards the treads, but stay mostly the same towards the wheel.


Object, mesh, material, material slot, face, material assignment: How do they work all together? I've had a hard time to figure out why I couldn't set a different material for a given face on a mesh used by two objects (duplicate by AltD).

As soon as I was assigning a material to a face on one object, the face was also changed on the other object, in spite the material was 'object-linked'.

I initially set the material slots exactly the same for the two objects, including materials used by both objects. What I realized (and the documentation doesn't help) is that one doesn't assign a material to a face, one rather assign the material slot. This slight difference has indeed a lot of consequences.

The solution was to set different materials to the same slot in each object and not changing the material-face assignment.

Slots have a taste of C pointers for the mass... whatever, this leaves me with more questions:

Is that correct the slots are the actual entities which have the 'storage location' attribute and are stored either at mesh ('data') level or at 'object' level?
Is that correct slots (not materials) are assigned to faces, and in the case of object duplicates sharing the same mesh, the face-slot assignment done with the 'Assign' button is shared between duplicates?
Is it true that a face is assigned by reference to the absolute position of a slot in the list? The evidence is using the up/down arrow of the slot list in the Material tab, to change the order materials appear, actually changes which material is assigned to a face .

That's the general idea, do I miss an important point regarding the use of the material slots? Any reference to good documentation to go further appreciated, especially a description of the model.

Questions

Q1. Slots can be stored at Object or Mesh level to suit your needs.
Q2. Slots color faces. Slots at the Mesh Data level can be shared.
Q3. I do not believe your statement is true in all cases. I reordered slots and did not see same result as stated in your question.
Your probably know this. You can switch to shared data by choosing the existing data item.  You can stop sharing by clicking on the number which is greater than 1 in the mesh data panel, seen in the image below.  The image above shows Duplicate and Duplicate Linked.  The User Preferences can also fine tune these settings.  A Blender Material contains a sequence of slots which can be assigned to faces.


automate keyframes group to non-linear position Can't find any information about very useful feature for animation and specially motion graphics, I will very appreciate any help (before i'm starting asking my friends to write a plugin...):

Here I've added a dummy action to give me 10 equally spaced keyframes, frames 1 to 10.

import bpy

obj = bpy.context.object
for x in range(10):
    obj.keyframe_insert('location', frame=x+1)

Now running this script gives me the result you are after

import bpy
obj = bpy.context.object
action = obj.animation_data.action

x, y = action.frame_range
for fcurve in action.fcurves:
    i = 1
    L = (y - x)
    # preserve the first and last kfps
    print(fcurve.data_path, fcurve.array_index)
    while i < len(fcurve.keyframe_points) - 1:
        p = fcurve.keyframe_points[i-1].co.x
        fcurve.keyframe_points[i].co.x = p + L / 2
        print(i, p + L / 2)
        L /= 2
        i += 1


Assign metaballs to trails form a particle system currently switching from C4d to Blender, I try to reproduce some classic motion graphic effects in blender.

To illustrate my question, here's a link to watch (6min 45s): https://mattrunks.com/fr/formations/cinema-4d/eclaboussures-2d-x-particles
I am stuck when I want to assign metaballs to my trails. I could render my particles as object with a meta ball as reference, but the look will be some spheres and I want more a stroke look. Like this ...

Is there a way to achieve this?

In particle system you have render, select object and now your trail is rendering a specific object that you select


Why my highlights getting lost when re-importing a rendering into the compositor? I noticed that I'm loosing colour information in the highlights after exporting and importing pngs from Blender. I know that the compositor works with linear space but something gets lost when saving to png.
Here is what I do:

Render my image and look at it in compositor, all highlights preserved
Save the image as png and look at the png with an image viewer, all highlights preserved
Use an Image node in compositor and look at png, highlights lost
Safe the image from the node to png, highlights still lost

So there is something going on while importing/reading the file. I have checked "View as Render" in the image nodes properties. I use Blender 2.90.0
Any ideas?

Never use png, it is not a good format to store images that are meant for compositing or further manipulation, plus is a format that does not deal with alpha channels correctly.
Use EXR. Think of EXR as a way to save your render layers intact, as blender generated them.
The compositor does works using scene referred, unlimited linear data (there is no such thing as "linar space"). If you want to save images to be composited later or do any kind of post processing you need to keep the rendered images as scene referred, comopositing operations work better if the data is in a linear scale.
PNG is a display referred format, not only has a limit in the sense that it cannot store values larger than 1, but most likely the image information has gone through a display transform, set in the color management section of blender, which applies a transfer function (also known as a "gamma curve"), so the data is no longer linear.
If you "must" use png, or any other display referred format, that has an image that is meant to be viewed as sRGB, then you need to set the color management view to sRGB when you import it back to blender, so that it is interpreted correctly using "view as rendered. Otherwise the information will be processed using "filmic", which is the default color transform.
Images displayed in a different color space will always look wrong
Another way to understand the issue:
When you import an image into the compositor, you have to let blender know what kind of color space the image is using, so that blender applies an inverse view transform to "linarize" the data, then that it can be composited correctly. If the data comes from images in display referred formats, and the color space in blender is set to filmic, then the values are too low, and what used to be white in the picture(1) will only be gray, as filmic expects much larger values for white (aproximately 16.19). If you set the view transform to sRGB, then white will be set to 1 again...
read:
Render with a wider dynamic range in cycles to produce photorealistic looking images
and
Why We Bother With Linear and Nonlinear Encodings At All?


Strange metallic shading/reflections I think im having a weird reflection issue with a metallic surface. The small silver switches look great, but the big foot switches look odd. Im wondering if there is an issue or thats just how things are reflecting. I included 2 angles.

My normals are good, no double vertices. Am i missing a troubleshooting step? The shading is just the BSDF and i turned metallic to 1.0 and just adjusted roughness, very simple. No UVs either.

The green box looks good, reflecting nicely. The red box looks kinda flat or not shiny like the green box. And again, i think its just how the lighting is that makes it look "flat", but i was just seeing if maybe i was doing something wrong.

Reflections of the environment at infinity are extremely sensitive to the interpolation of normals across faces, which are calculated from the vertex, (or per-face vertex,) normals at the corners of triangulated faces at render-time.
So one thing you can do to adjust the regions of the environment which are reflected, and therefore the 'focus' of the reflections, is to introduce, and/or adjust bevels on loops surrounding relatively large faces, as on the right, below.

You had some changes of angle without bevels in your model; I put a couple of 2-segment bevels in there, and adjusted their profile with overlays switched off. so I could see what was up without wireframe in the way. I also replaced your other bevels, to adjust their widths and profiles.
My result. of course, may not be exactly the one you want, but if you go ahead and do the same with your copy, you'll see how dramatic the effects can be.


How to bake F-Curve using python? How can I bake f-curve using python for the active object?

running bpy.ops.graph.bake() in the console rises a context error so i changed the context using one of CoDEmanX seggestions as follows :

import bpy

area = bpy.context.area
old_type = area.type

obj = bpy.context.active_object
curves = obj.animation_data.action.fcurves
for curve in curves:
    curve.select = True
    area.type = 'GRAPH_EDITOR'
    bpy.ops.graph.bake()
    area.type = old_type

this will bake all the F-curve of the active object


Deform Mesh with Dynamic Paint Ridges I’m using the Displace option in the Dynamic Paint modifier to leave an indent from one sphere on another as the first sphere orbits the second. Pretty cool, right? Wrong!

I have Subdivide Surface modifiers cranked way up on both spheres (before the Dynamic Paint). I have also added a Smooth modifier after the Dynamic Paint.

How can I smooth out the ridges you see in the trail left by the metallic sphere?

Thanks!

EDIT: Displace, not Deform

EDIT 2: Sub Steps set to 20, using Volume only on the brush

Figured it out!

I checked the boxes for Multiply Depth and Multiply Alpha in the Brush Settings, and adjusted the Alpha Value of black in the Dynamic Paint Velocity Ramp. No more ridges!


Best way to clean up mesh? I used the Boolean tools to subtract one mesh to another and thus create this mesh.

The result is not very clean. How can I do to best clean this result and get a nice smooth surface?
Do I need to re-arrange the vertex one by one, or is there a faster, simpler and more effective solution?

The easiest way to fix this problem is to select the object, and go to properties editor -> object data properties -> normals and enable auto-smooth with an angle of 30 degrees or more:
.


Hide Transform Widgets Display Panel Greetings. Is there a way to hide this Transform Widgets Display Panel within the 3D Viewport, using python or otherwise? Also get it to stretch along it's width wider than it will go? I have multiple 3D viewports I'm using (in different tabs), so I only want it hidden in one of them. Also, I have a custom panel underneath it, I would like that to stay visible. Blender 2.83.3


How to fix weird edges when doing knife project? I am quite new to hard surface modeling but wanted to get into it a little bit. I am doing something like a Porsche 911 back and wanted to cut out the bonnet area. Since I thought Knife project would be easier than boolean modif I used that. I also used edge wight and bevel modif to make harder edges. After making the cut it produced those weird shapes, fliping one of the UVs helped near the bottom, but not completely. I know its something to do with the weird face and the fact that its an N-gon, but connecting the corners to something doesn't help at all.
Any and all help will be super helpfull.

here is a link to the .blend file >
 https://drive.google.com/open?id=1aodNFbnb5AjM3tHgwmuXCke7z6NYVbBY
I dont know how else to add it sorry.

there are also rough background images that I have been building off of. I dont need the whole car, just the back of it that is the reason why it cuts off like that.

So basically. Learn something new every day, even if it's super simple. Conecting Ngon edges to some lines solved the weird bits. I used Knife tool and made every odd shape into little squares.


Blender 2.83 render crashes my computer I updated my Blender from 2.82a to Blender 2.83 yesterday and when I tried to render my scene, which I was working on fine with 2.82a, my computer locks up and shuts off.

I took to combing the firs page of a Google search for similar issues and I found this guy having the same issue.

So I updated my drivers, ran it again, and same issue. the whole computer locks up and reboots.

I've uninstalled and reinstalled both versions now and it is still happening.

it doesn't affect the 2.8a at all, I have been working there all day no problem.

I can render a standard cube, it just has a hissy fit on my project.

My Computers specs are:

CPU AMD Ryzen 5 1600 Six-Core Processor 3.20 GHz
GPU Radeon RX 570 Series
RAM 40 GB

Could this be because my project was created in an early version?
Is it hardware?

I found this guide for doing a clean install of my graphics card drivers.

I followed along, and now I could see a render of cycles in the viewport but it still wasn't rendering without locking up my computer.

I checked the Preferences>System>Cycles Render Devices and I saw that my graphics card was enabled but my processor wasn't. That explains why it just about handled the render preview.

Enabled my processor and it it completed a render in 2 minutes which is insanely fast but left what looked like a burn mark across it.

I switched back to render preview and it's crashed again.

The screen flickered and then turned black.

Not sure if this helps diagnose anything

Here is a workaround for this because I experienced the same thing after downloading Blender 2.83. If you do the rendering from render preview viewport the prog crashes after the rendering is finished, and you close down the rendering window F11 and click again on the screen. If you do the rendering from material mode or solid mode viewport everything is cool. The problem resides in the rendering mode view and it happens only if you use Cycles with GPU. It's fine if you use Cycles-CPU for rendering or Eeeve. I'm using two GPU's so I didn't actually try with one GPU to see what's happening. Another solution would be to not close the rendering window F11 after it finishes and press immediately on solid mode or material mode, and after that close F11. Other than that 2.83 is really an improvement. Kudos and respect to the developers for it.


How to access a variable from another python file in BGE I have the 'distance' variable in the file 'char.py'. I wanted to get the value of this variable in another script. How do I achieve this?

When you register your script it becomes a module which you can then import in another script.


Particle not showing up in Cycles I wish to create some dust particles but my particles are not showing up.
I used some generated objects for the matter, put them in a group and use the group for the particles. The size is scaled up to 1.0 but still nothing. You see the particles in wireframe and the objects themselves shaded. I did set the particles to rendered but to no avail. I have them in a box that has a volume scatter material. The particles have a translucent shader and the scene is lit using a sun light.
The two images of the issue:

link to the file:

You have the camera ray visibility disabled for cycles on the "particleCube".


How to model 14,16 and 18 sided dice? I've already modeled the 4,6,8,10,12 and 20 sided dice via regular solids (tetrahedron, icosahedron, etc...) and the 10 sided following a tutorial.

Now I need the 14,16 and 18 sided ones, but I don't have a clue of how to get them...

Has anyone a clue of how to model them?

Equal distribution on sphere
Using the script from This answer
Need to alter the parameters. Here is what I used for the 14, 16, 18 side die. (where n is number of sides.  Had to run the 16 side twice, as it didn't find solution the first time, kill the script by hitting ⎈ Ctrl C
 over the system console.  The rat value determines the size of the hole. Too small 0.8 and the holes overlap, too big 0.999and the holes will be too small
# parameters
n = 18  # number of points on sphere
rat = (n - 1) / n # how far along the radius to bisect
u_segments = 32  # UV sphere settings
v_segments = 32
thickness = 0.2  # solidify thickness
TOL = 1e-7

14, 16, and 18 sided die, ret = (n - 1) / n
To make the die "solid" remove the solidify modifier, and grid fill each circular hole.
Solid Version
Here is an edit to create a solid version, where the holes can overlap. The holes are filled with an ngon. Poke it to make tris.

14, 16, 18 sided solid, where ret = (n - 2) / n.
Edit update for 2.8x for prior see revisions
import bpy
import bmesh
from mathutils import Vector
import random
from math import pi, asin, atan2, cos, sin, radians

# parmaaters
n = 23  # number of points on sphere
rat = (n - 2) / n # how far along the radius to bisect
u_segments = 32  # UV sphere settings
v_segments = 32
thickness = 0.2  # solidify thickness
TOL = 1e-5

points = [Vector((0, 0, 1))]
for i in range(n - 1):
    theta = random.random() * radians(360)
    phi = 2 * asin(random.random() * 2 - 1)
    points.append(Vector((cos(theta) * cos(phi),
           sin(theta) * cos(phi),
           sin(phi))))

while True:
    # Determine the total force acting on each point.
    forces = []
    for i in range(len(points)):
        p = points[i]
        f = Vector()
        ftotal = 0
        for j in range(len(points)):
            if j == i: continue
            q = points[j]
            # Find the distance vector, and its length.
            dv = p - q
            dl = dv.length
            dl3 = dl * dl * dl
            fv = dv / dl3
            # Add to the total force on the point p.
            f = f + fv
        # Stick this in the forces array.
        forces.append(f)
        # Add to the running sum of the total forces/distances.
        ftotal = ftotal + f.length

    fscale = 1 if ftotal <= 0.25 else 0.25 / ftotal

    # Move each point, and normalise. While we do this, also track
    # the distance each point ends up moving.
    dist = 0
    for i in range(len(points)):
        p = points[i]
        f = forces[i]
        p2 = (p + fscale * f).normalized()

        dv = p - p2
        dist = dist + dv.length
        points[i] = p2
    # Done. Check for convergence and finish.
    if dist < TOL: # TOL
        break

context = bpy.context
view_layer = context.view_layer
scene = context.scene
coll = context.collection or scene.collection

# make one point north pole.
R = points[0].rotation_difference(Vector((0, 0, 1))).to_matrix()
points = [R @ p for p in points]

bm = bmesh.new()
#bmesh.ops.create_icosphere(bm, diameter=1, subdivisions=5 )
bmesh.ops.create_uvsphere(bm,
        diameter=1,
        u_segments=u_segments,
        v_segments=v_segments)

for p in points:
    ret = bmesh.ops.bisect_plane(bm,
            geom=bm.faces[:]+bm.edges[:]+bm.verts[:],
            plane_co= rat * p,
            plane_no=-p,
            clear_outer=False,
            clear_inner=True)

    # fill the holes
    bmesh.ops.contextual_create(
            bm,
            geom=[e for e in ret["geom_cut"]
                  if isinstance(e, bmesh.types.BMEdge)]
            )

me = bpy.data.meshes.new(f"{n} Sided Dice")
bm.to_mesh(me)
ob = bpy.data.objects.new(me.name, me)
coll.objects.link(ob)
view_layer.objects.active = ob
ob.select_set(True)
ob.location = scene.cursor.location


How do you create a rounded, inset beveled edge? TL;DR How do you create a smooth, inset, rounded, beveled edge?

Hello! I'm sorry for the mundane question, but I'm a bit stuck. I'm trying to learn Blender and as an exercise I'm modeling a cabinet from my living room.

This cabinet has a beveled, rounded, inset edge:

So far, I've managed to create this in Blender: (bevel modifier with 3 segments)

Now here comes the problem. I'm trying to apply a subdivision modifier to smooth the bevel, but of course this smooths the entire mesh. I've thought of using 2 seperate objects but I felt like I was just avoiding the problem and it didn't even solve it completely.
So my question is this: How do you create a smooth, inset, rounded, beveled edge?

Similiar to creating the control edge loops manually (as stated in stauVictors answer), you can create them procedurally with the bevel modifier. Using a bevel modifier before a Subdivision Surface modifier, is common practice to prevent smoothing on sharp edges.

Create a vertex group for the edges, which are supposed to stay sharp and assign the edges to it

Then add a bevel modifier and select that group as the Vertex Group of the modifier. If you use more segments in the Bevel modifier, the following subdivision modifier will have less effect on the beveled segments.

Edit from Coffeehouse's comment: As an alternative to the Vertex Group, you can choose weight as the Limit Method and create Bevel Weights for the mesh.


How do I create material like this? This is the cover of the mixtape "&&&&&" by musician Arca.
I've been fascinated by the aesthetic of it and want to try similar stuff, but i am quite the beginner when it comes to Blender, so I don't know how to create something like this in terms of the material (it looks almost wet, or just very shiny) and the light (I think it makes the image look quite realistic, almost like a photo).
Maybe you can help me... thx in advance!

It strikes me as a two point lighting setup, where both lights are slightly behind the model giving the front a heavy shadow.  This is a top-down view of my sample scene.

I couldn't get anywhere close with a material until I started messing around with some very strange SSS values.

My world lighting doesn't match the reference, and it may have been taken into the compositor for some color correction.


Mesh wont move with rig This is my first time trying to rig an avatar, but the end results are that my mesh wont move with my rig like they are still sep. entities even after parenting. I've followed several video tutorials and read many troubleshooting posts, but still can't figure out what I am doing wrong. I am pretty new to blender so if anyone would be able to take a look at my file and let me know where the problem lies, that would be amazing and much appreciated! I am trying to create animations for a project that is due Sunday. :/ Wetransfer link below.
https://we.tl/t-ejI4gVXtRJ

You should:

Remove the 2 Armature modifiers from the mesh object
check and align the bones for the mouth of the metarig
Scale up a bit the armature (metarig) and object (like x 2)
Apply their rotation and scale
Select the object, switch to Edit mode, Merge by Distance in order to remove all overlapping vertices
(re)generate the rig from the metarig
Parent the mesh object to the generated rig With Automatic Weight


Change Anti-Aliasing Settings in Eevee (Blender 2.8) I'm not sure how to change the anti-aliasing settings used by Eevee in Blender 2.8. I have a simple scene with two grids slowing moving toward the camera, and the grid lines are flickering (presumably due to aliasing) pretty badly in the final render. I would like to prevent this, but I don't know how to.

Coming from Cinema 4D, in which I have direct control over the anti aliasing settings, specifically:

I'm not sure what the equivalents are in Blender for Eevee. Can somebody help me understand how anti aliasing works for Eevee animations in Blender 2.8?

I have attached the scene with the flickering problem below:
https://drive.google.com/open?id=1jroi6lKH0cSevD9S_AthZLEC73HUS4_F

try experimenting with the parameter Film->Filter Size (0 - anti aliasing)


Help modelling silicone baby fork (lumpy surfaces, lose of details, adjusting measurements of pins) I've been struggling for over a week trying to model something I thought would be simple.  It's a silicone baby fork.  The client keeps sending it back as I cannot get it quite right.  In my attempts to make corrections, mostly using proportionate editing, the fork as now lost some details such as the curve that sort of forms a bowl on the inner part of the fork.  How do I recreate that?
The measurements of the forks pins are incorrect and I can't figure out the best way to adjust it.  I think I'm close but I need to somehow square off the pins so that they are .5 cm thick.
On top of that, the bowl part of the fork is no longer smooth, now it's lumpy.  I've tried smoothing vertices, I've tried using relax in loop tools, smooth modifier almost works, but then I loose details on some edges.

If there is an addon that can help me with all this, I'll buy it.
Any other tips would be greatly appreciated!  I have less than 3 days to complete the project.
Here's some other photos that may help:

You should keep it low-poly as long as you're not glad with the general shape, then give it a Subdivision Surface modifier, and only apply the modifier when everything's ok (but always keep a low-poly version).
I would stick to the shape from top view. Make sure that the edges follow the shape so that it will be easy to add edge loops further on:

Use the Proportional Editing option to curve the spoon (hide the part that you don't want to deform):

Then extrude up:

Move down the outer edges:

Then add a Subdivision Surface modifier, add edge loops or bevels to sharp some angles, etc...


UV Unwrap is flipped horizontally? Whenever I unwrap this plane, it seems to be unwrapped horizontally flipped.
It's a simple plane that is 'subdivided' because it's for a 3D pixel art experiment. Is there anyway to 'flip' the UV? (I know I can just flip the texture in photoshop, but there is something inherently wrong with backwards textures.)
Here's a screen capture to show what I mean.

Cegaton's comment provides the right answer but leaves out a crucial detail. First, make sure all of the vertices whose assigned textures you want to flip are selected, then switch to the UV editor window, and press the key sequence S - X - 1 - - [hyphen].

ns


How do I fix automatic weight problem? I am on the final step of the character creation process for my model of Master Chief (Halo). I have made a simple rig (nothing fancy, like IK bones) and I am trying to set up some automatic weight paint on it, but it comes up with an error message going somewhere along the lines of "Failed to find weight heating for one or more bones".

Here's a few things I know about the model which may help in solving this:
There are a couple finger bones barely jutting out of the mesh.
I made the hands and head separately from the rest of the project, the mesh had a sub surf modifier applied to it.
I have textures (colors) applied to the mesh.
I have re-calculated normal's, and I have also used and applied a mirror modifier.

I'm sure there's more, but that's all I can think of right now.

In cases automatic wheight is not working well, manual wheighting is the best solution:
When parenting the model to his rig, choose "with empty group" option.
This will create one vertex group for every bone of your rig.
select the rig, go to pose mode, select the first bone to be weighted, select the model, go to edit mode, select all the vertices you need, In the "vertex group" tab choose the weight you want (from 0.0 to 1.0) and click assign.
Repeat for every bone.
Selecting the model and going to weight paint mode lets you check your work visually.


Color ramp to bump map I have this black and gold sort of paint melting cycles material. I would like to add depth to the texture using the Color ramp node. How can I create displacement using my current node setup?

My node layout:

Here is my slightly Photoshopped test render:

You can use the texture as a bump map on the whole material

Or you can add a Vector>Bump node to add the bump map to one or more of the shaders you are using.

If you need real displacement, not just bump map, enable the experimental feature set and then change the displacement to True or Both in the material.

More info: Getting "experimental" true displacement to work


Change the image of the UV/image editor with python for 2.8 i want to change the active image of my uv/editor with codes, i dont know how to do this in 2.8

could someone help ?

Try this:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        area.spaces.active.image = bpy.data.images['Your_image_name']

Deactivate image in Image Editor

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        area.spaces.active.image = None


How do you animate more than one Rigify rig in a single scene? I'm trying to create a set of animations for two human characters which will then be exported into Unity. Ideally this import will be as a single fbx that includes the two character models and all animations, which I can then use to trigger an animation by name (e.g. "shake_hands") which will then trigger the hand shake animation on both characters.
These animations need the characters to interact directly (e.g. shaking hands etc), so I assumed that the best way to ensure the interactions worked well would be to animate both characters in a single scene in Blender. I'm new to rigging, and Rigify looked like a powerful but simple tool, so I decided to use that. I heard about problems with generating two rigs in the same file, so I created the two models (for the two characters) in different files. I created a new file and appended my two models to it (by specifically going in to the Object folder and grabbing the meshes and rigs rather than going by the scene route). I had experimented with animating a single character first of all, so one of the armatures came with some animations already. By that I mean one armature had some actions set up for it, with keyframes for bones in that armature.
I assumed that when I thought about "an animation for two characters" what that really meant was "an action that has keyframes for both armatures". This means that I assumed that animating the second character would be as easy as adding keyframes for the second armature to the existing action. However, when I started trying to do so by putting the second armature in Pose mode, opening the action editor, going to the existing action and adding keyframes for bones, the bones of the first armature took on the poses that I set for the second armature, overwriting the animation. I assumed this was because the animation (the dope sheet specifically) refers to bones by names, and thus because Rigify generates the same bone names each time you generate a rig, the keyframes ended up being assigned to both copies of the bones with the same names.
This seemed weird, but I set about renaming the important bones of the second armature, so I could keyframe them separately, but now the Rigify UI started to fail, as tools like "Snap IK to FK" etc relied on bone names that were no longer there. I considered merging the two rigs into a single armature out of pure frustration, but that would have been even worse to work with.
Am I misunderstanding some part of the process? Is there a reason why noone on the internet seems to be talking about having this problem? The whole time I was working on this I couldn't shake the feeling that there has to be an easier way: so is there?

As Rigify is based on Blender's internal drivers, constraints, and scripts, it's not directly exportable to Unity, so you should think of it as a Blender instrument.
The common workflow is to program the animation into Blender, using two different Rigify rigs (use the advanced options, near to the generate rig button, to give an unique name to every rig).
When the animation is finished you can turn on the Deforming bones layer only, select all deforming bones (bone layer 29, counting from 00 to 31, all bones have the "DEF-" suffix), and in pose mode go to the menu pose > animation > bake action (turn on all the preferences), so that a copy of the rig, maden of deforming bones only, with baked action, can be directly exported to Unity.
Usually we use two rigs for two characters, but if you really want a single action, at this stage you can join (Ctrl J) the two only deforming bones rigs: all bones names and animation channels will update adding the .001 suffix to the joined copy.


Why are my creases horizontal instead of vertical in the sculpt mode? Whenever I try to sculpt creases (I am modelling a couch), they come out horizontal instead of vertical, no matter in which direction I drag the cursor. I also tried switching sculpt planes. I would really appreciate an answer, since it's sort of urgent.

My first guess would be that you don't have enough geometry in your couch. If all of your polygons are long, thin, horizontal polys, then that's going to affect the way it looks.

There are two ways to solve this problem. One is to manually add more geometry. You want the density the polygons to be the same across the whole couch, and you want them to all be as square as possible. Insert Edge Loops (ctrl+r) will probably be very helpful if you decide to try this approach.

The other solution is to use Dynamic Topology. This will dynamically add geometry as needed, but it will still have an easier time if your geometry is even and consistent.

From the Manual:

  Dynamic topology (AKA dyntopo) is a dynamic tessellation sculpting method, adds and removes details on the fly. Dyntopo is quick, just get a brush and start to sculpt. Dyntopo will add details base upon your brush size, detail type and strength.


How to adjust collision margins for objects encapsulated in one another? I have used the boolean tool to place a cone inside a cube (the cube has the cone shape cut out from it inside). I would like to make them both active objects and have them sit still until something hits it but they immediately try and separate. I have tried changing the collision margins but can't seem to get it so they don't move.

Any ideas? Thanks

Here is a project to explain

Best idea is to make the cone slightly smaller. And don't forget to turn Shape from Convex Hull to Mesh for both of them.


What is the single line of code required to change a preference in 2.8? I am trying to use one line of code in the console to toggle...

Preferences>Navigation>Orbit Around Selection

bpy.context.user_preferences.view.use_rotate_around_active = True

This line works fine in 2.79 and updates the user preference window.

bpy.types.PreferencesInput.use_rotate_around_active = True

This is my best shot at the equivalent code in 2.8rc. Nothing happens and yet there is no error message either.

Figured it out myself via "Blender 2.80: Preferences API" although it should have been easier to track down.

bpy.context.preferences.inputs.use_rotate_around_active=True


Get RGB value of texture from face on mesh I need to extract the RGB information from a a face on a mesh with a script. I know it sounds ridiculous, maybe it is the main reason I could not find any solutions. I know the index of the face but I don't know how to extract the color of the texture on it. The texture of the object is set from an image so I don't know if extracting color is even possible.

That's a great question! A given face can have any number of colors contained within the texture though – in order to solve this problem you'll also need a specific point to map to a specific pixel on your face's texture.

I recently solved this problem for the Blender addon Bricker, which applies the nearest texture colors of the original model to each of the generated LEGO bricks. See this link for more information about the problem and how I solved it.

Here's a simplified version of the code I wrote to solve the problem:

import bpy
import math
from mathutils import Vector
from mathutils.interpolate import poly_3d_calc
from bpy.types import Scene, Mesh, MeshPolygon, Image

def getUVPixelColor(mesh:Mesh, face_idx:int, point:Vector, image:Image):
    """ get RGBA value for point in UV image at specified face index
    mesh     -- target mesh (must be uv unwrapped)
    face_idx -- index of face in target mesh to grab texture color from
    point    -- location (in 3D space on the specified face) to grab texture color from
    image    -- UV image used as texture for 'mesh' object
    """
    # ensure image contains at least one pixel
    assert image is not None and image.pixels is not None and len(image.pixels) > 0
    # get closest material using UV map
    scn = bpy.context.scene
    face = mesh.polygons[face_idx]
    # get uv coordinate based on nearest face intersection
    uv_coord = getUVCoord(mesh, face, point, image)
    # retrieve rgba value at uv coordinate
    rgba = getPixel(image, uv_coord)
    return rgba

def getUVCoord(mesh:Mesh, face:MeshPolygon, point:Vector, image:Image):
    """ returns UV coordinate of target point in source mesh image texture
    mesh  -- mesh data from source object
    face  -- face object from mesh
    point -- coordinate of target point on source mesh
    image -- image texture for source mesh
    """
    # get active uv layer data
    uv_layer = mesh.uv_layers.active
    assert uv_layer is not None # ensures mesh has a uv map
    uv = uv_layer.data
    # get 3D coordinates of face's vertices
    lco = [mesh.vertices[i].co for i in face.vertices]
    # get uv coordinates of face's vertices
    luv = [uv[i].uv for i in face.loop_indices]
    # calculate barycentric weights for point
    lwts = poly_3d_calc(lco, point)
    # multiply barycentric weights by uv coordinates
    uv_loc = sum((p*w for p,w in zip(luv,lwts)), Vector((0,0)))
    # ensure uv_loc is in range(0,1)
    # TODO: possibly approach this differently? currently, uv verts that are outside the image are wrapped to the other side
    uv_loc = Vector((uv_loc[0] % 1, uv_loc[1] % 1))
    # convert uv_loc in range(0,1) to uv coordinate
    image_size_x, image_size_y = image.size
    x_co = round(uv_loc.x * (image_size_x - 1))
    y_co = round(uv_loc.y * (image_size_y - 1))
    uv_coord = (x_co, y_co)

    # return resulting uv coordinate
    return Vector(uv_coord)

# reference: https://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts/addons/uv_bake_texture_to_vcols.py
def getPixel(img, uv_coord):
    """ get RGBA value for specified coordinate in UV image
    pixels    -- list of pixel data from UV texture image
    uv_coord  -- UV coordinate of desired pixel value
    """
    uv_pixels = img.pixels # Accessing pixels directly is quite slow. Copy to new array and pass as an argument for massive performance-gain if you plan to run this function many times on the same image (img.pixels[:]).
    pixelNumber = (img.size[0] * int(uv_coord.y)) + int(uv_coord.x)
    r = uv_pixels[pixelNumber*4 + 0]
    g = uv_pixels[pixelNumber*4 + 1]
    b = uv_pixels[pixelNumber*4 + 2]
    a = uv_pixels[pixelNumber*4 + 3]
    return (r, g, b, a)

Assuming your mesh object is active, and the cursor is placed on the mesh in the location you want to extract the color from, you can call the getUVPixelColor function like this (simply replace the image_name argument with the name of your UV texture image):

obj = bpy.context.object
mesh = obj.data
point = bpy.context.scene.cursor.location
face_idx = obj.closest_point_on_mesh(point)[-1]
image_name = "test.jpg"  # replace with the name of your texture image

rgba = getUVPixelColor(mesh, face_idx, point, bpy.data.images.get(image_name))

Note that depending on which color space you're working with, you may have to apply a gamma correction to the color before using it as an RGBA value in Blender.

Hope this is helpful!


Set a camera to free fall like a Rigid Body? I want to capture freely falling objects from their reference frame. i.e. to have the camera freely falling due to gravity in the exact same manner.  Is there a simple way to make a camera free fall just like a Rigid Body?

No python needed.

Simply add a Copy Location constraint to the camera. Set the Target to an object with an active rigid body. (I simply duplicated one of my colorful cubes and moved it back from the rest of the bunch. Remember to turn the visibility off). That will get the camera to fall down with gravity.

To get the nice camera shake when it hits the ground we need two more constraints. A Copy Rotation constraint and a Track To constraint.
The Copy Rotation is copying the rotation of the same cube the camera is glued to, that gets the real shake from the impact with the ground. (I have the Influence of that set to 0.5 just to tone it down a bit.)

The Track To is to keep all my cube in frame. (you can see how much the cubes tumble, and without this constraint the camera would do that too.)

These are my constraints on the camera. Do note the object "Cube.001" is the cube I moved off screen for the camera, and the "Cube" is simply one in the middle of the pack.


Height Map: how to deleted unwanted faces? SupFolks!

I applied a height map to a plane and was wondering if there's an easier way that I can delete faces circle in red w/o doing it by hand.

Thanks in advance.

Heightmap

Unwanted faces circled in red

for 2.79 :in Edit Mode, hit numpad 5 to go to ortho view and hit either numpad 1 or 3 to get to perfect sideview then hit CTRL+tab and hit E to make Edge Selection then hit B to start the box selection tool hit X and select faces to deleted unwanted faces


"scale to bounds" missing in blender 2.9? In blender 2.8 there was a search result when hitting space that allowed me to scale an object to perfectly fit within a specific size, called "scale to bounds" I believe. in 2.9 this appears to be missing or I can't find it- can this still be done in 2.9? it was very useful for me and I still need the feature for the stuff I need to create.

"Scale to bounds" is from the "3DPrint" addon. Activate it in the preferences.


Glass edges look blurred I'm modeling an interior. As you can see, a part of the table's glass top looks blurred. I think this is given by the noise due to the engine lacking data to understand how to render the transarency of glass.
Here is a detail of my problem and the the nodes of the glass material.
Any advices for "sharpening" the edges of the top?

It looks like the "blurred" part is mostly volume shader, surface is tranparent.
If you don't want to change your shader, you can try to use a bevel on the edges to catch the light and make it look real somehow.


Why is my World shader with a gradient in 2.8 only showing some of the colours in my colour ramp? I would like to set the 'world' shader to a gradient, which should be one colour at the nadir, another colour at the zenith, and other colours in between, using a ColorRamp node.
There is an answer here, but it's for an older version of Blender and doesn't seem to behave quite as described in 2.8. I do get a gradient, but no matter how much I fiddle with it, I can't seem to get it to cover the whole range of the ColorRamp.
There are also various answers covering how to get a gradient across the window, but that's not what I want. I'm aiming for more of a sky dome sort of effect.
This is my current set-up, which isn't quite working - it seems to be correct in the upper half of the sky, but the lower half is a uniform yellow-green.

I solved this for myself after a bit more fiddling around. I'm not quite sure what I was doing wrong, but I figured I'd post this for others, because it's somewhat simpler than the setup in the linked question.


transform dialog boxes I am trying to access transform tools dialog boxes without having to move the mouse around. Eg. Bevel tool.
Desired behavior. Select edge - click bevel - view dialog box for measurement input.
Current behavior: Select edge - click bevel - move mouse around to have dialog box appear.

It appears the software is set up to do transformations through mouse movement which takes some time to get exact dimensions and I am looking to input exact dimensions for most transformations.

Thank you in advance.

It's not a dialog box, but anytime you are modifying something through mouse movement while using a tool, you can directly type in the measurement you want. Eg if you want to bevel an edge by an offset of 1 unit, click bevel, then type 1, then press enter (or left click) to complete the action.

You can view your input value in the box at the bottom of the viewport (in the red box), along with some other information/options/values for whatever tool you are using.

Once you have completed the action, you can also fine tune with the menu that pops up at the bottom of the toolbar. This will appear after you complete any action.

I assume this menu is the dialog box you are referring to when you wrote "Select edge - click bevel - move mouse around to have dialog box appear", but I figured I should mention it just in case, because it seems to be what you are looking for. If the problem is that you don't want to move the mouse around before having the menu appear, you can select the tool (eg bevel), then, without moving the mouse, press enter or right click to have the menu pop up.

You might also want to look at some of the options in the properties panel (you can turn it on or off by pressing 'n' on the keyboard):

The options change depending on the mode you are in/what type of object you have selected, but for example when you are in object mode, you can modify the selected objects transform. (in the picture it's right at the top of the properties panel). It's not as relevant as the first two solutions I mentioned, but I'm not sure how famiar you are with Blender so again, I figured I should include it. (sorry if this is all stuff you already know).

Hope some of this helps.


Why does displacement modifier produce a different (and unwanted) result when applied to a selected plane in a 3d object? I am trying to model 3d blocks of terrain by adding topography to the upper face of a block diagram.

You can use the vertex group to achieve what you want. Take a look at the image.

Other option, could be to set the direction to apply the modifier, in this case to the Z axis, but it will replicate the effect on both faces (top and bottom) of the mesh.


Subsurface Modifier on a cube versus just adding a sphere itself Lately I've been noticing that when people need to use a spherical object, instead of going Shift A -> Mesh -> Sphere, they advise adding a cube and then applying a Subsurface Modifier to it, without any real explanation as to why. This is an especially prominent technique when the object needs to be low-poly, like for a particle system or something.

So my question is, why do people do this? What advantages does this offer over using a sphere itself? Wouldn't it be more useful to just add a spere? Even if it needs to be low-poly, just adjust the resolution, right?

Catmull-Subdividing a cube does not result in a sphere. You will need to cast to a sphere with ⇧ Shift⎇ AltS To Sphere operation or a Cast modifier. This question covers that.

The sphere and the spherized cube may look similiar, but the topology is different.

The key advantages of the subdivided, spherized cube are

Even Topology The sphere has dense topology at the top and much less dense topology at its equator. If you want to sculpt or otherwise modify the spherical shape, you want to have similiarly sized faces everywhere.
A 90° rotated sphere would also not give the same results as a sphere with no rotation.
Only Quads In organic modeling, which uses subdivision, we strive for topology which main uses quads. The sphere has many triangles at it's poles. Triangles will produce unnatural creases in combination with the subdivision surface modifier.


How to turn on Eevvee rendering live preview? How can I turn on Eevee rendering live preview in 3D view window?

The new Blender version has some interface changes, and in the Eevee rendering mode I can render an image, but I don't see live preview of the shading, Bloob and other effects in the 3D view.

How can I turn it on?
Thank you very much in advance!

I found Rendered Shading in the Shading menu on the bottom of the 3D view window.


How do I create a magnified glass effect in Cycles? Currently I'm trying to create a sniper rifle scope, and would like to create a magnified scope effect (with modeled lenses if necessary).
But I'd like to make this a more general question, as that would be more useful.

If I have a magnifying glass, or a gun scope, or a telescope, and I want to turn it into a magnifying lens, what's the best way to go about it in Cycles?

The Glass BDSF material in the Cycles renderer does this quite nicely. The controlling variable is the IOR (index of Refraction). Set it to 1.0 and the lens will act like it is made of air (no effect, in essence). Keep it at the default 1.45 and apply the material to a lens-shaped object, and you should see the effect you are looking for. Play around with IOR until you get what you need.


I can't render animation in Blender with the rendered model and a picture background I have created in Blender a Star Destroyer Model from scratch, with textures and all, and rendered it to an image ( it's attached here ).

It looks great in my opinion. So I decided to create an animation with it. It is supposed to look like this: https://youtu.be/ljvxzYJhRYo ( it's my own video on my Youtube channel).
The animation above was made with opengl render and my problem is that it doesn't have the background that I put as well as any textures and displacements on the Star Destroyer like in the rendered image attached here.
I tried to render also with the normal render button and always it rendered a black screen. I am 100% sure that my camera angle is right so I know that is not the problem.
This is how I want to be the animation, of course with all the textures and background image.
https://www.youtube.com/watch?v=9qc9WmDYXFs&feature=youtu.be (my own video recording of my screen)

Can you tell me why my normal rendering doesn't work? This is how it looks when I render with the normal button NOT opengl:

The renderer doesn't do anything and I don't know why.

You would help me a lot if you could help me with this project of mine.

I suggest you familiarize yourself a bit more with the software. The background images you see in the 3d viewport will NEVER be rendered. In order to get a background image you can use the compositor:

How to composite in a background picture?

As for the rendering to black screen, check the compositor as well (is everything set up correctly) and check if the light sources work. (This you can check in the viewport by changing to the cycles preview)

What does the Render and Preview of the Samples section do?

a relevant tutorial is
here


Exporting overlapping material to gltf format I am new to Blender, and trying to export a tshirt Blender model in gltf format. This model has individual materials for example front, back, collar (as given in the attached picture) etc., and also a material called "whole_design" that covers the entire model.
But when I export this model in gltf/glb format, I could see only "whole_design" material being exported and not the individual (front, back etc.) materials.
Is it possible to export the overlapping materials? Or am I doing any mistakes while setting up the Blender model or exporting the same.
Thanks in advance.

The glTF exporter in Blender won't use materials that aren't assigned, and as mentioned in the comment above, only one material may be assigned per face.
But, glTF also has a relatively new extension called KHR_materials_variants that allows certain viewers to automatically swap between materials on an asset.  Check out the announcement of that extension which includes an embedded demo.

I haven't tried this myself yet, but you may also want to take a look at a Blender glTF material variants plugin which is in early devlopment by one of the ThreeJS/Hubs contributors.  It actually plugs in to the existing glTF addon, creating some new Blender UI for assigning multiple materials, while still making use of the official Khronos glTF exporter for the final result.
There's also a glTF Meld Tool.  I haven't tried this either, but this tool is said to take glTFs with identical geometry, where only the materials are different, and automatically meld them into a single glTF with KHR_materials_variants applied to it.


Python: add object, then change properties I use a python script to place a whole bunch of plane objects in a 3d grid (in layer 2 but that's not important), like in this example, where I just copied the primitive_plane_add syntax from what appears in the "info" pane when I add a plane object.

import bpy
layer2=(False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)
for i in range(-5,5):
    for j in range(-5,5):
        for k in range(-5,5):
            bpy.ops.mesh.primitive_plane_add(radius=0.2, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=layer2)

I found this post on blender.org that explains how to change a property for all objects, but what I want to do is change the property of the given object right after creating it. So, the above code would look like this:

import bpy
layer2=(False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)
for i in range(-5,5):
    for j in range(-5,5):
        for k in range(-5,5):
            bpy.ops.mesh.primitive_plane_add(radius=0.2, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=layer2)
            #So we've just added one more plane.
            #While we're here, select the just-created object
            #Then, change the object's color, transparency, tell it to be shadeless, etc

When using add primitive operators, the object that is created is marked as the active object. You can access the active object using obj = bpy.context.active_object.


Something wrong with my hole I am doing the Introduction to Camera Tracking in Blender tutorial by Blender Guru.

Somehow, I managed to mess something up, and supposedly hidden parts of the hole are showing. I don't understand where I went wrong. Thoughts?

Here is the .blend file:

You can also mix the material of the sides of the hole with a holdout shader while using the backfacing output of a geometry node as the fac input of the mix shader.

Without the holdout shader:

With the holdout shader:


Need to lock an axis of the soft body animation I have to make an animation of a bouncy sofbody, but it keeps moving around.

I thought I could lock the Z axis for the softbody's animation, but I could not find information about it anywhere.

Add an object constraint, limit location to the body and limit the distances.(you might want to start at a negative z).


Fluid simulation only renders surface leaving cavities against domain The simulation runs fine, but only seems to add the mesh to the surface layer of the fluid. Any space between the surface and the domain that should be filled is left as a void. I tried changing the concavity numbers in the mesh settings, but that didn't do anything.
When I see other fluid simulation tutorials, there is no gap between the fluid and sides.
How do I fill the whole space with mesh that should be filled with the fluid?

After giving this a bounty because I had the same problem, I found the solution. When you simulate the fluid, the default settings only simulate the surface layer of the liquid. This is called a narrow band, which reduces memory and computational power needed. For some reason, the fluid mesher only meshes the narrow band.
Scroll to the Liquid settings, and set narrow band to 0 to disable it.


need to display speed on my ship while keyframing (view3d) animating a plane(keyframe or may be path), ideally want ship to display its speed just like it can display its name (if checked true from object display settings) or at screen bottom(view3d) where selected object and frame number displays.
started writing a simple function to get speed first. even this isn't working correctly, may be because view doesn't get refreshed as i run and it doesn't actually go to previous frame and capture location.

import bpy

def calcSpeed():
    ship = bpy.context.object
    cf = bpy.context.scene.frame_current
    pf = bpy.context.scene.frame_current - 1
    bpy.context.scene.frame_set(pf)
    pl = ship.location
    bpy.context.scene.frame_set(cf)
    cl = ship.location
    speedVector = pl - cl
    print (pf,cf)
    print (pl,cl)

any ideas or pseudo code will really help, huge thanks for time and support.

Using pl - cl will give you a vector that tells you how much you have moved on each axis, this is not normally the same as distance travelled which is the length of the diagonal line between the two points. You may recognise the equation c2 = a2 + b2 used to calculate triangle lengths which can be adapted to 3d points. If your object is moving on only one axis then you can do simple calculation of the locations on the one axis.

def distance(a, b) :
    """distance between two 3D points"""
    return sqrt((a[0]-b[0])**2+(a[1]-b[1])**2+(a[2]-b[2])**2)

To draw the speed in the 3Dview, have a look at the bgl and blf modules. You can find some examples here

If you have animated the planes movement then you should get better results by using fcurve.evaluate(frame) to get the object location.

import bpy

ship = bpy.context.object
ship_curves = ship.animation_data.action.fcurves

def distance(a, b) :
    """distance between two 3D points"""
    return sqrt((a[0]-b[0])**2+(a[1]-b[1])**2+(a[2]-b[2])**2)

x_curve = ship_curves.find('location', index=0)
y_curve = ship_curves.find('location', index=1)
z_curve = ship_curves.find('location', index=2)

for cur_frame in range(0,12):
    cur_x = x_curve.evaluate(cur_frame)
    cur_y = y_curve.evaluate(cur_frame)
    cur_z = z_curve.evaluate(cur_frame)
    cur_loc = (cur_x, cur_y, cur_z)

    prev_x = x_curve.evaluate(cur_frame-1)
    prev_y = y_curve.evaluate(cur_frame-1)
    prev_z = z_curve.evaluate(cur_frame-1)
    prev_loc = (prev_x, prev_y, prev_z)

    travelled = distance(cur_loc, prev_loc)

    print('Travelled {:>8.3f} since the last frame.'.format(travelled))


How to configure blender so that it uses only 50% of total CPU when rendering? I need to render a very computer-intensive scene using cycles and for some reasons, I decided to use my home computer (i5 3.30 Ghz, 10 GB RAM, 2TB Hard Drive) to render it. However, the problem is that many people needs to use this computer. So, being generous and feeling responsible, I want to know whether there is a way to configure blender so that it uses only half of the total CPU. (Currently, it is using 100% all the time).

Thanks!

While it's often more efficient to leave this to the Operating System, to answer your question specifically with a method that works, look under the Performance Panel in the Render Settings. It should be set to use the max amount of CPU threads by default, click Fixed and set it to half of however many threads your CPU has. It might look a bit different for BI and Cycles but the Threads part is what you want.

Obviously, you need a CPU with multiple cores for this to work. If you are on a single core machine, altering the value under Fixed will have no effect and your machine will also not use more threads that the value in Auto-detect.


Setting the context for cloth bake I'm having trouble using bpy.ops.ptcache.bake().

I get the error message bpy.ops.ptcache.bake.poll() failed, context is incorrect no matter what I set the context to. I tried using bpy.context.area.type="PROPERTIES" but I still get the same error.

How can I set the context in order to bake a cloth simulation in a script?

You need to override the context. AFAIK setting area.type does not work.

Baking cloth is very similar to baking fluid or smoke.
This question has already been asked for smoke and fluid, so I will quote one of the answers here:

  Baking smoke is very similar to baking fluid, so I will quote
  brecht's answer:

    It's a bit more complicated than it could be because fluid simulating baking is only exposed as an operator. That means it expects an active
    object in the context, which is usually provided by the user interface
    that is not available in background mode.

  However, it is possible to override context manually, see the api
  docs.

  So for a smoke simulation:

import bpy

for scene in bpy.data.scenes:
    for object in scene.objects:
        for modifier in object.modifiers:
            if modifier.type == 'SMOKE':
                if modifier.smoke_type == 'DOMAIN':
                    override = {'scene': scene, 'active_object': object, 'point_cache': modifier.domain_settings.point_cache}
                    bpy.ops.ptcache.bake(override, bake=True)
                    break

  This will bake the selected cache for all domain objects in the file.

Using the simple script below which is adapted from the script in the above quote (which is in turn adapted from brecht's answer about baking fluid), you can bake the cloth cache for every object in the file which has a cloth modifier:

import bpy

for scene in bpy.data.scenes:
    for object in scene.objects:
        for modifier in object.modifiers:
            if modifier.type == 'CLOTH':
                override = {'scene': scene, 'active_object': object, 'point_cache': modifier.point_cache}
                bpy.ops.ptcache.bake(override, bake=True)
                break


Get particle location using python Is it possible to get the location (world space) of every mesh particle of a particle system and following that the vertex locations of every mesh particle using python?

Use the depsgraph

Using the code suggested here https://developer.blender.org/T58792

Adds an empty, displayed as a cube, at the particle location.   Make the object with the particle system active, move to desired frame and run script.

import bpy
from mathutils import Matrix

context = bpy.context
# beware removes all empties from scene (for testing)
for mt in (o for o in context.scene.objects if o.data is None):
    bpy.data.objects.remove(mt)

# get the depsgraph and the evaluated object
dg = context.evaluated_depsgraph_get()
ob = context.object.evaluated_get(dg)
# assume context object has a ps, use active
ps = ob.particle_systems.active
# this is the instance object
po = ps.settings.instance_object

for p in ps.particles:
    # make a matrix for the particles
    M = p.rotation.to_matrix().to_4x4()
    M.translation = p.location
    # put an empty at particle
    bpy.ops.object.empty_add()
    mt = context.object
    mt.matrix_world = M
    # the scale
    mt.scale = (p.size,) * 3
    mt.empty_display_type = 'CUBE'

The global location of each vertex of the instance object of the particle system will be

mt.matrix_world @ vert.co


How to attach rigged cloth with a rigged character.? Guys i am in a big problem and don't know how to do that.i want to attach rigged skirt/cloth with my rigged character i don't wan't to lost cloth bones.

Use a Child of constraint on the cloth armature to make it a Child of the body armature and a related bone. Then you can animate the strength of the constraint if you want to take it off. (Or use the addon for dynamic parents.)


Custom Font Thumbnail Is it possible currently to replace the text in the Thumbnails font preview with a user defined text?
Currently it displays default text that may not be helpful in searching for match for specific letter in the font because most of the letters are too small.

No, this is not possible, that font-preview text is defined statically in code (only 'customization' allowed is its translation, such that e.g. Chinese or Arabic languages can show some relevant glyphs…).


Blender Nodes in Editor doesn't show preview Image I have a small problem with my blender lately. I want to make some compositing with my compositing nodes but the problem is, blender won't show me the preview Image. I have a Screenshot for you guys.

The preview Image itself is enabled, but it just won't show.

Thanks for your help in advance!

-Marten

You need to render the scene before anything shows on the compositor. HitF12 or press Render.

To have the Viewer Node's image as background behind the node tree you need to enable the backdrop button:

If you press N on the Node Editor's window  you'll see Controls for size and placement of the backdrop:

Or you can zoom in and out by pressing V or ALTV

You can also choose to see the Composite Node or Viewer Node in a UV/Image Editor window.
Selecting Render Result will display the Composite Node


How to cut holes in an object using another object? I'm trying to model a M16 but I have a problem with cutting the holes on top of the handguard of the weapon.

As you can see in the picture above, I have tried to cut holes into the handguard (The marked mesh in edit mode) with the object above it (The multiple cylinder one). But I simply can't. I have tried the Boolean modifier but the handguard just disappears and doesn't make any holes. Same with the Knife Project thing. Nothing works, it won't make a hole in it. I also installed the BoolTool 0.2 but that didn't work either...The multiple cylinder object goes invisible and doesn't make any cuts.

In the picture above you can see how I want the cuts to be made. I want the holes of the multiple cylinder object to be there on the handguard when I take it away. Nothing works. The 3 methods I tried with worked on other parts of this model but not on the handguard. It should be the handguards mesh's fault but I can do nothing about it. Is there any solution?

How to do a subtractive boolean

Make sure you've selected the object to be carved from, and add a Boolean Modifier (when in Edit mode, look for a wrench icon on the right-side panel when you have the object to be carved from selected - this is the modifier panel).
For the modifier's Operation choose "Difference".
For the Object field choose the object that will do the carving.
Apply the Boolean Modifier and delete your carving object.

Tip: For step 4, as an alternative non-destructive approach you could also leave the modifier on without applying it, and hide the carving object from rendering. If you want to see the carving object's shape and its effect at the same time, instead of totally hiding it in the viewport you could go to the Object Tab and set the Maximum Draw Type to "Wire".

Tip: Low-poly meshes may not boolean so well, while high-poly meshes can be slow to calculate or in extreme cases even crash Blender. So consider your mesh density before using a boolean.
Tip: If either mesh's normals are facing the wrong direction you will have problems when doing a boolean. Recalculating normals can sometimes be a solution if you find a boolean is not working as expected.
Tip: Remove doubles. If your normals are just fine, the next thing to try is removing doubled-up vertices. This can be done from within Edit Mode by pressing W and choosing "Remove Doubles". At the top of the interface near the tiny Blender logo a message will momentarily appear saying "Removed __ vertices". If this number is not 0 then you'll know that some doubles were removed and that the problem has probably been fixed.
Tip: Large n-gons can cause booleans to fail. The solution is to convert to triangles. Here is a post addressing this problem in more detail.
Tip: Avoid booleans if you plan to SubSurf. Modeling with booleans may be fine for simple hard-surface geometry, but if you then put a Subdivision Surface Modifier on that object you can expect unsightly results. This is because for things like subdivision and mesh deformation topology is important. An all-quad mesh is ideal, but still requires some good old-fashioned manual modeling to create. It's worth learning the concepts of edge-flow and poles if you intend to create a low or med-poly mesh with "holes" cut into it that still looks good when SubSurfed.
Tip: Sometimes using "Smooth" shading doesn't go so smoothly after modeling with a boolean. This has a lot to do with the topology issues I mentioned above, but there is a quick fix that is suitable for many cases. Navigate to the Mesh context tab and check the Auto Smooth option. Adjust the slider until the shading looks desirable in the viewport. Here is a before/after example:

Note that regardless of the angle specified for Auto Smooth, any edges that have been Marked Sharp (CtrlE) will be sharp as long as the Auto Smooth feature is enabled.
The solution for your case

It was caused by conflicting normals, as I mentioned in one of the tips above. In fact, you can even see from the darkly shaded geometry in your screen shots that some of the normals are inverted. After recalculating normals on both objects I was able to boolean just fine. Here's the solved file:


UV Unwrapping so that every face takes the whole UV? Trying to make so that when I unvrap each quads takes the whole UV squard; i tried scaling down to 0 then scaling up but somehow loosing information ?
Is there a faster way to individually select all faces and make them fit ?
Thanks !

Just to illustrate Robin's comment (and show off my gif skillz)

Select the whole mesh
Go UV > Reset
Done


Is it possible to drive other properties in realtime with a single float or int property button without using drivers? Say I want yo have a float property in the 3DView Toolbar (T), and make it update in realtime several properties in the selected object without using drivers.
For example, the "scale" of an object, its an array of 3 values, but I don't want the UI to display its three values, because I want to use only one float slider to drive the three at once (with the intention to preserve the proportion). Even more, think that this could be very useful if I want to drive any kind of values together with just a single slider, not only the scale's array.
I spent several days investigating and trying to achieve that, but I finally understood that Panels and Operators are instances of well defined classes which draw functions remain separated, and I can't just make a call from a Panel to a property defined inside an Operator (I use the operator because I want it to update the object in realtime).

Here's a very simple example, just to illustrate the point (I didn't include an Operator here). Note that the script only changes the object's size when the script is rerun.

import bpy

bpy.types.WindowManager.float = bpy.props.FloatProperty(name="Object's Scale", default=1.0)

class OBPanel(bpy.types.Panel):
    bl_label = "Selected Object"
    bl_idname = "selected_object"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Tools"
    bl_context = "objectmode"

    def draw(self, context):
        wm = context.window_manager
        layout = self.layout
        layout.row().prop(wm, 'float')

    wm = bpy.context.window_manager
    bpy.context.object.scale = wm.float, wm.float, wm.float

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

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

if __name__ == "__main__":
    register()

Yes, this is possible, it can be done 2 ways.

Using a property set or update callback.This lets you either use your property as a way to access other data (by having get & set callbacks, you could for example, keep your property outside of the blend file even).With an update function you can use this property to control others.See https://www.blender.org/api/blender_python_api_current/bpy.props.html#get-set-example
Using drivers, although these need to be setup in the file each time and probably not what you're after.


Blender doesn't render anything on my laptop So I have a decent laptop that used to render perfectly. In fact I'd throw some heavy scenes and it would do just fine. But recently after formatting my laptop, i am getting this weird issue where even the default cube-light set-up doesnt seem to light anything.Please help me out!
This is what the issue looks like..

I'm guessing you have an AMD GPU in your laptop? Your symptoms look identical to an issue AMD users were having recently regarding the latest Adrenalin drivers. You may be able to correct things by checking (enabling) "High Quality Normals" under Render Properties > Performance. If that doesn't work, try rolling your graphics drivers back to an earlier version.


UV Editor - Use other Units of measurements This is a follow up to my previous question (related, not a duplicate): Units in UV Editor (Imperial to Metric)

I would like to use:

Inches
cm
mm
m

During the creation or export phase:

So I won't have to do conversions from a unit to pixels.

if there is no option yet, I'll do the below then. - Thanks

I'll look the dev repo on github and will make a pull request.

To support: cm, mm, m, km, inches, feet/foot, yards.

This doesn't exist yet.
I will be submitting a pull request to the Blender3D Repo for version 2.80+
It will allow you to enter:

MM, CM, M, KM, Inches, Foot/Feet and Yards

with a screen DPI of 96 DPI
it will take input: 20cm
and it will output: 756px

Using this formula:

dpi = current monitor/screen or blenders dpi setting
scale = getScaleFromInputField() * 2.54
pixels = RoundUp(input * (dpi / scale))

getScaleFromInputField will convert MM, M, KM, Inches, Foot/Feet and Yards To Centimeters and return the correct value
Using this conversion chart:

You can contribute to my repo: https://github.com/DeanVanGreunen


How to make acrylic/plastic effect with shader? I am studying texturization and found this reference image. I would like to know if anyone could help me replicate the material shown on this "rabbit-astronaut".

I already tried to map using images in PS, and even reflecting images but it did not look similar. This texture appears to be more opaque.

Final

A little bit exaggerated to show the effect.

Material

I've used only Principled BSDF shader. Most important thing is to use Rough material (1.0) with Clearcoat. You can manipulate how much reflection will be visible by changing Clearcoat value and/or change Clearcoat roughness also.

Lightning

I've used really simple setup without much of a thought for this example. 4 Area Lamps with different size, strength and Blackbody value (color).


How can I animate the transparency of a image texture ontop of another image texture Here are two photos of what the effect that I want. I want to be able to have a slider that will change the opaqueness of the "hi" and I want to be able to animate it.

You can multiply the "top" texture's Alpha by a value between 0 and 1 before feeding it into the Mix node's Fac. Use a Math node (Add > Converter > Math) to multiply. 0 will let the "bottom" texture through; 1 lets through the "top".


Retopologizing this mess? I sculpted this based on my beginner knowledge (forsaking any complex sculpting knowledge that might discourage and keep me from getting to the end), but now I want to paint and pose the character and I have a feeling this topology is going to be difficult to work with. Where do I start?

Heres one way of doing it, but It envolves recreating the topology.

Set the snapping mode to face.
create a new mesh, and delete all except one vertice.
press g and move the vertice, the vertice will automatically snap to your character mesh!
now, extrude the vertice to create edges and faces, (using the poly to poly method of modeling) and whenever you extrude or move the vertice, it will snap to the mesh.

I realize this is time consuming, and I suggest you plan your topology flow with the grease pencil, setting the stroke placement to surface.

With your current mesh, I don't see any fixing it, I think this is the only way to get a mesh suitable for rigging.

hope this helps, and please comment if you need more detail.

P.S, I like your model, and It's really good for a beginner!  I'm a beginner at sculpting too, and I'm not sure I could create that model.


When I rendered my project, it seems to be completely grey. Also, I have Blender v2.79 I'm a noob at Blender so that maybe the problem. I have Blender version 2.79. I rendered it a couple of times, but it still came out gray. These are screenshots taken before and after the render. (the first one is before, the second one is after)

Please help!!

Try changing from Blender Render to Cycles Render in the drop down menu along the top? That's where I'd start at least.