Edit Blender UI element how can i edit blender UI elements?
for example i want to change size of this button:

is it possible to do that? we can define or change UI's color easily by edit xml files. is there any way to change element's properties ???

The size of the icons is hardcoded in the c files to 16 pixels. You cannot resize it.

What you can do is to change is the DPI settings in the User Preferences in the System tab to have the whole UI in a dpi size that fits your needs. It's the first entry up left.


Can a "Blender Game Engine" powered game run on Linux? Can a "Blender Game Engine" powered game be built for Linux?

Yes. Blender Game Engine powered games can run on all major platforms, and support for Android deployment, although limited and regarded as experimental by the community at large, is gaining ground. Deployment to Linux based systems is fully supported, and is a primary focus of the Blender Game Engine.

Keep in mind that a game created with the Blender Game Engine must be built for the system in question by someone with rightful access to the source files. This means that a developer must build their game for Linux in order for the game to run in a Linux environment. The same holds true for the other available platforms. A game built for Windows will only run in a Windows environment.

One exception is Android, where (correct me if I am wrong) support only exists through a native application which requires the source file in .blend format. Again, this functionality is regarded as experimental and as such should not be considered a viable deployment solution at this time. The Blender Foundation provides limited insight on this subject, however relevant information can be found in the Official Documentation here and here.

From the Official Documentation for the Blender Game Engine:

  The Game Engine can simulate content within Blender,   however it also
  includes the ability to export a binary   run-time to Windows, Linux
  and MacOS. There is also basic   support for mobile platforms with the
  Android Blender   Player GSOC 2012 project.


Unable to convert SVG into a mesh I am trying to convert a simple logo from SVG into a blender mesh without any success.

My logo contains a simple shape and Text.

I converted the logo into SVG using both Inkscape and Adobe Illustrator. Both SVG files are imported fine into Blender. But neither can be converted into a mesh no matter how I tried.

I am very new to Blender. Can someone provide some guidance?

Jing

My SVG file can be downloaded here.

https://drive.google.com/file/d/1bUKh3SxEcaCMzHHVZctJgZxXJamNmA2A/view?usp=sharing

Thank you so much for your help.

Jing

There isn't any problem with the SVG (you may just need to increase the size). I hope you know the convert to mesh option (invoked by pressing space bar in 3d view / object mode) to convert the SVG paths to a mesh.

Just in case you haven't done this, you need to select the imported object first.


An object broken when it's rendered I have a weird error to render images. when I see the object with rendered view it is ok but only when I do real rendering part of the model is broken. Do anyone know how I can fix this?

As one comment pointed out there seems to be a subsurface modifier active on the mesh making up the wood part of your house.

As you can filter if and how many iterations the modifier should apply, depending on whether it is a render or just the viewport, you should check in the modifier panel while having the wood mesh selected if any of this holds true.

The camera icon in the header means this modifier is active in the final render and the eye icon means that this modifier is active in the viewport.

In the example screenshot from the modifier the subdivisions are set to one (1) for the viewport and two (2) for the final render.


Spin mesh (to create solid of revolution) I want to be able to take a function f(x) and first make a plot of the function on given interval and then build a solid of revolution of that mesh by rotating it around X-axis of the plot.

I've made a script that generates the graph. My question is how to spin the mesh (360° angle).

I tried to use function bpy.ops.mesh.spin:

bpy.ops.mesh.spin(steps=36, angle=2*pi, axis=(1, 0, 0))

but I still get RuntimeError

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\modules\bpy\ops.py", line 188, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.mesh.spin.poll() failed, context is incorrect

My code for generating graph mesh of given function:

# User function (return None if undefined)
def user_function(x):
    "Math function for given X, returns Y"
    if x == 0:
        return None
    return 1/x

# Resolution - number of samples
res = 100

# MIN and MAX values for the graph to plot
minX = 1
maxX = 10
minY = 0
maxY = 1

# Real size of a rectangle of the graph
sizeX = 2
sizeY = 2

# Recalculate Y-value for undefined points
recalculate_undefined = True

# Whether to delete old object
delete_old = True

# ===== Program =====
import bpy

step = (maxX - minX) / (res - 1)

coefX = sizeX / (maxX - minX)
coefY = sizeY / (maxY - minY)

RminX = - sizeX / 2
RminY = - coefY * minY

Z = 0

vertices = []
undefined = []
# Calculate values
for ix in range(res):
    x = minX + step * ix

    # Calculate and store Y-value
    y = user_function(x)
    if y == None:
        undefined.append(ix)
        y = 0
    y = min(maxY, y)
    y = max(minY, y)

    cX = step * ix * coefX + RminX
    cY = y * coefY + RminY
    cZ = Z
    vertices.append((cX, cY, cZ))

# Calculate undefined points
if recalculate_undefined == True:
    for ix in undefined:
        avg = []
        if ix > 0 and (ix - 1) not in undefined:
            avg.append(ix - 1)
        if ix < (res - 1) and (ix + 1) not in undefined:
            avg.append(ix + 1)

        if len(avg) >= 1:
            y = 0
            for a in avg:
                y += vertices[a][1]
            y /= len(avg)
            vertices[ix] = (vertices[ix][0], y, Z)

# Delete old object
if delete_old == True:
    if "Graph" in bpy.data.objects:
        bpy.ops.object.select_all(action = 'DESELECT')
        bpy.data.objects["Graph"].select = True
        bpy.ops.object.delete()
    for item in bpy.data.meshes:
        if item.users == 0:
            bpy.data.meshes.remove(item)

# Create new mesh
mesh = bpy.data.meshes.new("graph")

# Build edges from vertices
edges = [(ix, ix + 1) for ix in range(res - 1)]
faces = []

# Complete mesh and build object
mesh.from_pydata(vertices, edges, faces)
object = bpy.data.objects.new("Graph", mesh)
bpy.context.scene.objects.link(object)
object.location = bpy.context.scene.cursor_location

Edit1:

This post is not a duplicate of poll() failed, context incorrect? - Example: bpy.ops.view3d.background_image_add().

I'm looking for a solution without only avoiding the error by changing contexts.

You could use the spin provided by bmesh operators. This doesn't require any particular context. Here's an example:

From sverchok source code:

import bpy
import bmesh
from bmesh.ops import spin
import math

def lathe_geometry(bm, cent, axis, dvec, angle, steps, remove_doubles=True, dist=0.0001):
    geom = bm.verts[:] + bm.edges[:]

    # super verbose explanation.
    spin(
        bm,
        geom=geom,         # geometry to use for the spin
        cent=cent,         # center point of the spin world
        axis=axis,         # axis, a (x, y, z) spin axis
        dvec=dvec,         # offset for the center point
        angle=angle,       # how much of the unit circle to rotate around
        steps=steps,       # spin subdivision level
        use_duplicate=0)   # include existing geometry in returned content

    if remove_doubles:
        bmesh.ops.remove_doubles(bm, verts=bm.verts[:], dist=dist)

obj = bpy.data.objects['Graph']
bm = bmesh.new()
bm.from_mesh(obj.data)

axis = (1,0,0)
dvec = (0,0,0)
angle = 2*math.pi
steps = 20
cent = obj.location

lathe_geometry(bm, cent, axis, dvec, angle, steps, remove_doubles=True, dist=0.0001)

bm.to_mesh(obj.data)
# obj.data.update()   # if you want update to show immediately
bm.free()

Things to be aware of:

A small update in 3d view is required to see the result. The mesh will get updated whenever Blender call updates, so you don't strictly need to force the update yourself, but you can if you want to by called obj.data.update()
Possible downside of the bmesh.spin is that the order/topology of faces is not guaranteed or predictable.

You might prefer to use a further abstraction, which assumes the center of the rotation is obj.location: https://gist.github.com/zeffii/d4efc7c346d6aa90ae18


Cycles to Eevee conversion shows textures/materials as black I have this project file that contains some eyes I use for my characters. They look great in cycles, but when I switch to Eevee they go completely black. I didn't make it originally so it's harder for me to diagnose.

Any help would be appreciated. Thanks!

.blend file

Only part of the answer:
Eevee materials that are transparent need some additional material settings turned on; for example, Blend Mode and Shadow Mode need to be set to Alpha Clip/Hashed/Blend (depends on the usage) in order to display transparency, and (I think it was translucency) needs Screen Space Refractions turned on both in the materials tab and the Render Context tab.

I don't quite know why the eye setup is so (unnecessary?) complex; but I noticed that there are a few material nodes that do nothing, like the eyeball texture is completely muted, two Translucent shaders (almost same value) are mixed with each other, and I also don't quite know why the eyeball texture is controlled by the cubic box, but it somehow contributes to the eyes showing up black in Eevee (though setting up my above suggestions partly helps). Someone else might have more knowledge about that, just wanted to note the  basic transparency info.

EDIT: Okay, workaround: I copied the material of the cube and pasted it into the eyeball material (the one that only had a texture node controlling a Mix Shader with a Transparent Shader + nothing) and plugged the output of the last copied shader (Mix Shader) into the empty input of the Mix Shader that has the Transparent Shader connected to (the lower input). Changing the Blend Mode plus activating Screen Space Reflections then did the job for me. You can delete the cube then if it's not needed for anything else. Also, I would recommend turning down the mix value for the eyeball texture in order to have it visible.


Archimesh is missing I downloaded Blender from the official website two days ago to make a VR project, and I saw someone on YouTube using Archimesh add-on to build a room and objects. I pressed ⎈ Ctrl⎇ AltU and tried to find Archimesh add-ton to activate it. But it's not there. I even tried to install it manually from GitHub, but still doesn't appear. Any suggestions?

Archimesh in Blender Version2.79

Go to File > User Preferences menu. A new dialogue will appear showing User Preferences.

Click on Add-ons, in search and type Arch , below the search go to Supported Level and click Community.

Wooo, finally you will see Add Mesh: Archimesh on the right panel.


How do you extrude a shape without outer faces and edges? In Sketchup, if have a shape that I want to cut a section out of, I can use the pencil tool to draw an area and then extrude the area down (using the push / pull tool). The outside edges are removed:

In Blender, I'm trying to do the same thing but it isn't working in the same way. I used the Knife tool to draw the area I want to remove and extrude down, but the outer edges are still remaining:

I haven't yet figured out a way to manipulate the mesh to get the desired result after this extrusion.

Is there a faster / better way to do this in Blender? Is there a tool that behaves similarly to Sketchup's push / pull tool?

This feature has just been added to Blender.
It will be available from version 2.90(https://builder.blender.org/download/).
It's called "Extrude Manifold" and is located in the toolbox T, under the "Extrude" dropdown, Or by pressing Alt+E.

↑ Here I'm using Face select mode (3) but it works in vertex select too


Make object follow curve without rotating/deforming I'm trying to make a functioning escalator. I've got an array of stairs with a curve modifier and a bezier circle for the path. When a stair is on the parts of the curve that bend, the stairs rotate and deform with the bend. How can I stop this? Thanx.

This answer will describe the creation of a single "tile" of the escalator.

Add a bone with a follow path constraint with Follow Curve checked. I also checked Fixed Position and animated the offset value.

Add a smaller bone (OrientationBone) beneath it and parent it to the original bone. When the bone is ascending the OrientationBone will be beneath it, and when it is ascending it will be above it.

Because bone > bone driver relation create a cyclic dependency error in 2.79, I added an empty.

I used a copy location and a copy rotation constraint from the bone to the empty.

Next, add a limit rotation constraint to the empty with all values at 0 and all axes checked. Add a driver to that constraints influence. Use the Y Location of the Bone as a driver variable. Whenever the Y Location is between 0 and 6 (orange in the gif below) in my case, the bone is ascending and the driver should return the value 1 to enable the limit rotation constraint and stop the empty from rotation during the ascent. I achieved this with constant keyframes of the driver.

I added another driver for the descend, which will first check if the bone is descending with the help of the orientation bone. If the Y Location of the OrientationBone is smaller than the Y Location of the Bone, the bone is descending, otherwise the driver should return 0.


Left click selection deselect object (2.8) I was astonished when I heard the announcement of left Click by Default. Anyway
I gave it a try and it felt familiar. but I got stuck when it came to adding objects to the current selection. Ok now I know shift+CTRl left Clicking ads new objects to my selection (why not shift or CTRL). But I have no idea how to deselect one object from the selection.

Can you help me?

I'm not sure if this is what you are looking for, but if you:

*Left Click and drag = Select the objects.

*Ctrl + Left click and drag = Deselect.

*Shift + Left Click = Add Objects to the selection.

*Shift + Double Left Click on an object = Deselect

Hope that helps.

Good Luck.


Is it possible to rig an STL file? Is it possible to rig an armature to an STL file?

I have been trying and it's not seeming to have it. I'm a bit of an amateur, bit it's still not seeming to have it.

Thank you,
Harry

No, it is not possible to rig an STL file.

Firstly, Blender cannot open STL files. They can only be imported to Blender and once imported the information contained in such files is translated to a format native to Blender and, so to speak, become a .blend file.

Secondly, the term 'rigging' in CG context does not apply to files or file formats and saying to rig a file format makes no sense at all. Rigging is a process of making some kind of deformation or control system to make it easier to animate objects in animation software packages like Blender. So if you want to rig a 3d model that you imported from an  STL file to Blender, then it's exactly the same as to rig any other model in Blender. Rigging however is a very complex and wide subject and cannot be described in full in one answer. You will need to ask a more specific question and provide the full context of your situation to get any meaningful help.


How does hair particle friction work? I am trying to get a collision and friction between hair particles but I couldn't find a way to do it. Can anybody help with these test files please?

Reference:
https://www.youtube.com/watch?t=17&v=1zdgV_oiJMU

[![my result][1]][1]

1)The hairs can do hair self collisions only in the same hair particle system! In your example you have two hair systems

2)Internal friction has to be set to 0.2 - 0.8 range.

3) density target slider controls collision margin smaller values equal smaller collision distance. Be careful ! values set too low will cause hair explosions.

4)Strength value (ALWAYS) has to be set to ((1)) unless you want interesting hair strands.

5) Voxel grid cell size optimal value 0.040

blendfile


Line Conversions and Bsurfaces with Blender 2.69 My problem is converting a path into a bezier, and a bezier back to a
Grease Pencil again (or path to Grease Pencil),
since I need the handle assistance in Edit mode for those to get my shapes just right, and free handing with Grease
Pencil isn't accurate enough for curves to start.
From there, my second problem is turning at least 2 Grease Pencil Lines
into the opposite edges of a corelative surface, using BSurfaces.
I can't get Bsurfaces to run.

What state do 2 opposite beziers need to be in?
Do you have to start from grease pencil only?

How do I get Bsurfaces to show me the Add Surface
button, to draw it's extrapolation for me?

I've found
the buttons, keys and mouse click too confusing here.

I'm not sure about converting back and forth between a grease pencil stroke and a curve, but you can create a surface from grease pencil strokes like this:

Enable Bsurfaces in User preferences > Addons

Create an empty mesh by adding a primitive and deleting all the geometry from edit mode > Delete:

Add a new grease pencil layer in the 3D view > Properties region (N) and select Surface:

Still in edit mode, (editing the empty object) draw grease pencil strokes on the target object with D+LMB:

In the Tool shelf (N in the 3D view), press Add surface in the Bsurfaces panel:


What is causing the edges of my models to become semi-transparent? All of a sudden, in a particular scene I am working on, the edges of all the models have become partially transparent.  It is like what happens when you have a very small start clipping pane and are looking at a small model up close.  Except the clipping panes have not been changed, most of the objects in the scene are not very small, and I am not zoomed way in.

Here is a screenshot:

The crude barn thing pictured in the screenshot is about 30'x25'x26' and the zoom is pretty standard.  This behavior is also not dependent on the zoom, and again, I have not changed the clipping panes.

And I do have limit selection to visible checked, it does look similar to what it would if that was disabled, but that is not the problem.

What is this caused by and technically what is responsible for it?

What you are seeing is directly related with the value on the clip start distance.

Bring up the value a bit and the effect will go away.

Seems like setting the start clip distance to anything smaller than 0.1 (or 10cm if using metric)  will bring that weird transparency.


Importing SVG sequence, joining all separate curves I am trying to write a quick Python script that loads .SVG sequences placed in one folder, and cleanly joins all the curves that come with it. I managed to load the .SVGs fine, but I am currently still working on joining the curves.

Here's the code I have:

##################
import bpy
import glob
import os

# path to your folder

importDir = "C:/tmp/silhouette_svg"
print("Importing all SVG from this directory", importDir)

os.chdir(importDir)

for files in glob.glob("*.svg"):
    print( files, "... imported!" )
    bpy.ops.import_curve.svg(filepath=files)

Blender's Import Curve should come with the joined option, I think.

A quick hack script (not elegant at all) is something like below.

I manage to do these steps:
1) import svg
2) select and join them as one
3) rename it somewhat (not perfect)
4) turn each one into mesh (for remove doubles?)

############# IMPORTING ALL SVG WITH SEGMENTED
import bpy
import glob
import os

# path to your folder

importDir = "C:/tmp/silhouette_svg"
print("Importing all SVG from this directory", importDir)

os.chdir(importDir)

for files in glob.glob("*.svg"):
  print( files, "... imported!" )
  bpy.ops.import_curve.svg(filepath=files)

  # deselect nothing, select all curves, join
  bpy.ops.object.select_all(action='DESELECT')
  bpy.ops.object.select_by_type(type='CURVE')
  bpy.context.scene.objects.active = bpy.data.objects["Curve"]
  for obj in bpy.context.scene.objects:
    if obj.select:obj.name = "snail.000"
  bpy.ops.object.join()
  bpy.ops.object.convert(target='MESH')
  bpy.ops.object.select_all(action='DESELECT')

Any suggestions to make the code more elegant?


In Blender 2.8 +, how do I limit the (animation / multi-frame) render to only one pass (e.g. only z-pass or only Mist pass)? Related, not properly answered: How to render only a mist pass
Related, talks about using compositor: Render Passes separately
I have the rendering engine set to Eevee here:

I have only the "Mist" pass selected and everything else (including the "Combined" pass) in View Layer Properties:

Yet, when I'm trying to output the animation like so

, the "combined" pass is rendered anyway:

I need just the Mist pass to be saved, like I can see in the Image Editor after the render when I choose the "Mist" pass from the dropdown:

I'm looking for a simple solution with the EEVEE engine, without compositor if possible, because I am doing this programmatically, via Blender compiled as a Python module.
Alternatively, if you can think of a simple way to do this programmatically via the compositor, this would also work for me.
This used to be possible with the Blender internal rendering engine before 2.8, so, if there is no way to do this with Eevee, I would consider this a regression.
Aside: In the meantime, I'll try to compile some older version of Blender as a Python module, e.g. 2.78 (2.79 has build errors that are fixed in some later commit before 2.80) and see if I can get that to work.

I figured out a simple way to do use the compositor programmatically to isolate the mist pass in the renderers (Inspired by this answer).
import bpy

# (perhaps) more code here

# perhaps defined in some function or method
node_tree = bpy.context.scene.node_tree
render_layers_node = node_tree.nodes.get("Render Layers")
composite_node = node_tree.nodes.get("Composite")
links = node_tree.links
links.clear()
links.new(render_layers_node.outputs["Mist"], composite_node.inputs["Image"])

# (perhaps) more code here

bops.render.render(animation=True)
```


how would one go about creating an epic animated landscape? I would like to create a large natural landscape with animations(waterfall, river, ocean, wind moving objects). I am a just wondering if the polygon count of a epic landscape is feasible in blender. I dont know how a plane or ANT terrain object subdivided many times for detail would behave in the scene window or even if the entire object would need high subdivision but I do know I would need high subdivision at many points on the objects since I would be sculpting detailed cliffs and mountains(not simple smooth falloffs created with proportional editing) and I also know a cube I created with 100,000 verts rotated ok in the Scene window(Wireframe) but the next subdiv(400,000 verts) barely moved.

To operate with high polycounts you should make sure that your scene preview subsurface levels are as low as possible when you aren't working on them(so split up your scene into smaller sections). Also, you can put sections you aren't working on in wireframe view(this does help). Splitting stuff up into different scenes also helps.

When I do high polycount scenes I work on them section by section on different layers then put them all together but only leave the center in solid mode.

So yes, Blender can work with high polycounts on a lower machine but you'll probably have to jump through some hoops to do it.


Determining the optimal suspension location for jewelry I'm creating jewelry with Blender and I'm wondering about finding/calculating the optimal suspension location.
Looking at the image I uploaded, you see a small eyelet.
I've used the chain simulation with rigid body physics, using higher than default iterations, etc.
However the chain keeps dangling like crazy even after a few thousand frames.
I would love a few hints to create a more quiet 'gravity simulation environment' to see what happens when I move the eyelet further to the centre or to the outside. What do you suggest?
Thanks in advance,
Wim Roskam

Set the origin of your object at the center of its volume.

Create a passive rigibody.
Make the jewelry an active rigidbody.

Increase the positional and angular damping.

Connect both with a point constraint where the 'hook' is supposed to be.
Simulate the rigid body simulation.


off band with Ambient Occlusion and Environmental lighting in Blender render? Im trying to tweek the ambient occlusion factor with environmental lighting on and I get an odd band across suzzanne.

Is that normal?

8.0 is probably too high for your scene.Remember AO is specifically for shadowing in tight spaces, not large shadows.


Most efficient way to create a frame for eye glasses? How would you make a frame for eye glasses? More specifically, the part that sticks out over the ears.

I'm looking into curves and deforming a cube to do this, or possibly just beveling a curve into what I want. What would be the easiest and best way to create this shape?

Yes, the fastest way would be to use beveled curve. Here's a simple one using only curve with a Mirror modifier:

Cyclic property of the curve splines that form each lenses' rim is toggled on, and the frame's width can be varied by Alt-S on selected control point. To some extent, the frame's shape can be further modified by using taper and bevel object:

Note that both objects affect the appearance of all splines within the curve. Modifying just part of the curve will require that part to be separated as a new curve object.

Handle Part

Modeling the glasses' handle can be done manually as the others' answers, or by using a Curve modifier on the handle's mesh object:

You may get lesser control than by shaping it manually. But using this method, you can quickly adjust the handle's curvature by editing the curve, editing the mesh itself mostly to control the shape along its length:


How can i create this slightly bumpy wall? I want to create a material that looks just like this, how do i do it?

You can mix a couple of layers of noise to produce a range of effects around the one you've posted.  Try this node group and mess around with the sliders.


Why Am I Getting This Stretching On My Texture? I have this piece of concrete that is stretching a lot on the sides:

I've tried applying scale/rotation, but that didn't help. Any ideas? Thanks!

It appears that the UV maps for the sides of your object (the top is fine) are not properly aligned with the texture and/or not properly scaled. I would need to see your UV map overplayed on the texture to give any more help, though.


How to rotate half of a plane around the split edge after cutting it in half using loop cut I have split a plane in half by using the Loop Cut tool and now I have two faces which both share an edge. When I select just one of the faces and press R+Y to rotate it, it rotates around an axis which goes through its center of area. This causes the other face to follow the shared edge as the first one rotates and sort of stretch.

I am not sure how to make my selection so that Blender knows to rotate the face around the shared edge. What I am after is rotation one of the faces around an edge shared with the other as if you were opening and closing a book, its spine being the shared edge.

I read some answers, but most that I could find deal with rotating an object around on of its edges. I also couldn't get some of them to work. This is different from what I want to achieve, I am trying to rotate one face within a mesh without affecting the rotation, location or shape of the other faces of the mesh.

I am using Blender 2.80 beta.

Select the edge, set the 3d cursor to it (Shift+S, 4); Set the cursor as the pivot point for rotation (Dot); then select your face, and create a new custom transform orientation, it will give you the correct gizmo axes for rotation (if your edge matches any of the world axes you can skip this step); rotate as you wish. :-)
You can also use the "Active element" as your pivot point. In this case you have to select all the edges of your plane to rotate, and the "hinge" edge should be selected last (to become that active element).
And for the simple plane you can also use "Normal" as your transform orientation (it works great in this case, and you have not to deal with creating custom transform orientations).


The filename in Chinese can not be display in Blender 2.8 when file explore in open When I tried to load a video to video sequencer, the file name in Chinese could not be displayed.

The default font used for the interface does not contain all characters, Chinese is one of them.

There are two options to solve this in the preferences (Edit > Preferences)

Activate Translation  and set language to Simplified Chinese or Traditional Chinese. It may also work with Automatic depending on your OS language configurations.
Choose a different Interface Font for the interface which includes Chinese characters.

I think the first option is likely the best for your problem. Optionally you can also activate the checkmark next to Interface in the translation options to switch the entire interface to Chinese.


Fluid simulation sticking through mesh I'm having an issue with my fluid simulations. I'm a beginner, so I might be missing something obvious.

I'm trying to fill up a cup with water, but the liquid is behaving very strangely (see below).

Most of my settings are default, except the cup's volume init is shell and the slip type is free slip (to prevent sticking). I've made the problem less severe by increasing the resolution of the simulation, but it still sticks out of the cup.

The resolution is still too small. You should try at least doubling "Final", and setting "Viewport Display" to "Final" too.

Any obstacle which has a width smaller or comparable with the voxel size is likely to be ignored by the simulation. In your case the voxel size (domain size, divided by resolution) is too big!

If the problem persists after increasing the resolution, check that the normals on your obstacle object are facing outwards (in Edit Mode: select all with A then CtrlN, or ShiftN in Blender 2.8+)


How to write __annotations__ (scene property) in new scene? I have a scene with custom properties, written in a class, I am now able to access the values of these properties,
I would like to know how to write these values in a new scene. For example:

This is the properties:

class MySceneProperty(bpy.types.PropertyGroup):

    my_bool: BoolProperty(default=false)
    my_int: IntProperty(default=0)
    my_float: FloatProperty(default=0.0)

def register():

    bpy.types.Scene.scene_prop = bpy.props.PointerProperty(type=MySceneProperty)

I would like to create a new scene and use the previous parameters, as they could be changed by the default value, so the approach would be.

def my_function(self,context):
    first_scene = bpy.context.scene

    ###get attributes:
    for key in first_scene.scene_prop.__annotations__.keys():
        first_attributes = getattr(first_scene.scene_prop, key)

    ###new scene creation:
    new_scene= bpy.data.scenes.new("New scene")
    context.window.scene = new_scene

    #Here I would like to set the attributes of the previous scene but I
    #don't know how to do it

    ###set attributes???  (this obviously produces an error)

    for key in new_scene.scene_prop.__annotations__.keys():
        setattr(new_scene.scene_prop, key) = first_attributes

Free you mind and think simple: new_scene.scene_prop.my_bool = first_scene.scene_prop.my_bool

If however you need to batch-set properties from a list of strings, like the __annotations__.keys() method returns, you can use Pythons setattr and getattr methods:

for s in first_scene.scene_prop.__annotations__.keys():
    setattr(new_scene.scene_prop, s, getattr(first_scene.scene_prop, s))

So in the end, your function from above could be turned into:

def my_function(self, context):
    first_scene = bpy.context.scene

    ### new scene creation comes before the loop:
    new_scene= bpy.data.scenes.new("New scene")
    context.window.scene = new_scene

    ### copy attributes from source to target scene:
    for key in first_scene.scene_prop.__annotations__.keys():
        source_attribute = getattr(first_scene.scene_prop, key)
        setattr(new_scene.scene_prop, key, source_attribute)


How to setup blender to generate 2d background(s) Okay. Let me describe in detail what I would like to achieve.

I have created a 3d scene that I would like to render so I can use it in my point-and-click adventure game as a background.

I know how to add a camera and set it to ortho and I can set the rendering to 640w 180h but when I renderer it looks pixelated (maybe 300w 80h) which might be because it uses a wrong resolution?

Is there a tutorial explaining what I need to do?

Thanks in advance.

First of all, make sure your render resolution slider is set to 100%,
Also, (forgive me if I'm mentioning the obvious here), but If you're rendering in Cycles, you need to set your sample-count higher, as that may be what's causing the "pixelated" look. A good starting point should be something like 500 samples. See below:


How to set a custom center point (pivot point) for the "copy location constraint" (include a simulation video in content) I would like to know how to set a custom center/pivot point for the "copy location constraint”. So when we set the X/Y/Z invert of the copy location constraint, two objects can move toward the opposite directions within a certain area. Please see the simulation video:
https://drive.google.com/open?id=1bSmByVFAe1Na12U35pxzNZnx7k05Q2Zu

Currently, by default, the center point is on the world origin point (coordinates X,Y,Z=0,0,0), so when I set the copy location constraint with X/Y/Z invert, two objects are separate far far away according to the center point is on the world origin point. please see the recording video of the result of default setting:
https://drive.google.com/open?id=1cqONcr4gopfTiHIwQ96gmEb_yy9scNxC

Please download the testing blender file:
https://drive.google.com/open?id=1Lj128BZKfHOe8av16_At_7vneEjoKNVW

Thank you very much,

Ava

Thank you.

Please see the reference images and blender file below :

You can use drivers as constraints: in your example the cursor is at 0,0,4. So X and Y can be managed by the copy location (inverted) constraint. Your new Z value has to be 4 - (Zold - 4). So you can set the Z driver as 8 - Z.

The same can be done with different X and Y values.

Another way can be set the copy location constraint in local space (instead of world space), check the offset option, then move both meshes to the pivot point (Shift S - selection to cursor).


pitchipoy IKFK parameter not showing in dopesheet or fcurves i am using blender 2.76 on win 8.1 x64.
if i create normal metarig, generate and select arm control and insert keyframe with RMB on IKFK parameter in property bar, i get keyframes start showing on 'newly created action in dopesheet or fcurves.
where as similar behaviour on pitchipoy meta rig , generate and attempt to keyframe IKFK parameter doesn't show keyframe / channel name in fcurve. it shows a keysframe in dopsheet main action  (top) but i can't move it, and no special channel is added, i can't see that in time time or fcurve.
any ideas would be appriciated.

Ahh, i found solution. If anyone is in same situation. rig maintain ALL IK FK switches and stretch options at end of dopesheet (mostly hidden) you have to make sure, following

mouse icon "showing selected object channels" is OFF
ghost icon "include channels from bone hidden etc" is ON

now when i know this, i think its very reasonable to have them there separately managed. this behavious is slightly different than rigify but good enough. thanks pitchypoy for awesome rig.


How to create 'Jeep stick shift' shape? I have been redirected to Stack Exchange from Stack Overflow to ask my question.

I am relatively new to blender and have been working on my first blender project for a while now. I have come across this shape and I am kind of baffled at how I would go about creating it.

I have no trouble creating the actual stick except for that weird shape below the stick that looks almost like a rounded pyramid.

Thank you for your time and any help would be appreciated!

Create a plane in edit mode.

Then, scale it along the y axis until it is slightly longer than it is wide. Exit edit mode with TAB and then press CTRL + 2 to add a subsurf modifier. Adjust length and width with the scale commands until it looks like the base of the "pyramid". Add edge loops by pressing CTRL + R and sliding to make the sides flatter. Scale the two end edges to make it rounder. See the first picture for the end result. Then, press I to inset faces into the shape. Use extrude (e) and scale (s) to build up the shape. Remember, you can use e+s to extrude the shape outwards. My example isn't awesome, but I also didn't pay a whole lot of attention to proportions. You could easily do better than me! :)


Do mirrors have fresnel? I hear people say everything has fresnel which means the smaller the angle is that you look at an object, the less reflective it is.

I was wondering if this applies to mirrors.

Physically speaking - that means if we are talking about a 100% reflective material - I'd say no.

In reality there is no material that has 100% reflectivity and of course it depends on the materials. If you have a highly polished chrome ball, the fresnel effect would be much lower than that of a normal glass mirror, that has only one side coated with aluminum, sliver or gold.

But in any case, the reflections on a highly reflective surface would surpass every possible Fresnel effect to a point where you wouldn't notice it anymore.


Painting vertex with 0.1 but it acts as if it has 1.0? So, I am painting these vertexes, assigned only to 1 group.

I put the rig in pose mode and start painting, but they move too much, so I lower the strength by a lot and paint again. No effect.

Even if I paint with 0.001 it will deform as if it was 1.0.

Also, if I use 0.5 in one bone and 0.5 in the other one like:

0.5 thigh/ 0.5 leg

If I do this the mesh will shrink when I rotate the leg

This is really frustrating...

It seems you have a common misconception about how bone deformation weighting is calculated.  The way it actually works is as follows:

If a vertex belongs to one or more vertex groups which are parented to bones, that vertex's bone-deformed location will be equally split between the bones' locations according to the ratio of their respective weights.

The key here is that deformation is calculated based on the ratio of weights per vertex, not on the absolute value of each weight.  So if a vertex is only parented to one bone it's deformation location will be entirely decided by that one bone, no matter how small a weight it has in that bone's vertex group.

To get the vertex's position to be 10% affected by the bone you have to specify what affects the other 90%.  You can do this by adding another bone that does not move to your armature.  Then add a new vertex group for this bone and assign the vertices to this vertex group with a weight of 0.9.

In the above example both "legs" are parented to jointBone with weight 0.1, but the right one is also parented to basisBone with weight 0.9.


How to make an object fade out from one end? I've been trying to make an object fade from one end in cycles, sort of like a gradient of transparency. I was wondering of anyone could help.
Here is an example of what I want to achieve in terms of transparency:

You can use an object as mapping coordinate for a coloramp, and by moving it around you can tune up the effect or transparency which is obtained by mixing a transparent and a diffuse shader in this case. Just an example.

You can also use the generated mapping coordinate depending on your geometry. In the last picture i had put the object used for mapping a little backward in the scene. Here the input is a texture coordinate node and the mapping is slided on x


Baked texture is tinted pink I followed this tutorial for baking the texture of barrel.
(https://www.youtube.com/watch?v=jLEpjSFHl4o&t=355sa)

Now, the baked texture turned out pink.
Which doesn't happen in the tutorial video.

Did I miss something?
Thank you in advance.

More images here on Imgur.com

Your current bake setup is set to Normal baking. I believe what you're attempting to do (if you're following that tutorial) is either Combined or Diffuse (colour) baking.


How to make a mesh follow certain rules? I am unable to understand a scenario where a whole turret is moving with an empty object. And it also follows physics rules.. Like if empty is moved along side z axis, mesh will move till a certain point.
Then after mesh won't move, won't deform, or won't loose it's shape. Also when turrets head is rotated it will rotate some parts of it automatically. It moves according to it's joints and moves other parts automatically as well. Even moving a single bone far from mesh won't strech the mesh.
A gif file will be able to clear the scenario in more detail and there is blender file link too. So help me understand how this is acheived and what's the name of this process.

Blender file

After the help of @amonroejj i found the solution. To achive this kind of scenario we have to set up FK and IK while connecting bones. And I was not aware that connecting two bones allows mesh not to deform and strech...


How to get rid of out of frame black borders around a scaled down movie overlay I'd like to know how to get rid of the black borders that are created when I scale down or offset the x or y of a movie overlay on top of another movie. I'm using a chroma keyed video on top of another video but when I use a scale node to make the character in the chroma keyed video smaller it shrinks the whole frame and leaves black borders around the underlay video. Thanks!

The default blend type for a strip is Replace. This will replace the underlying strip with the new one, filling with black any unused area.

Change the Blend mode to Alpha over or Over drop to keep the underlying video visible. This can be set in the Edit Strip panel in the properties sidebar (press N)


Can multiple characters share a base rig but still use custom bones? I'm currently rigging a feline-humanoid character for a UE4 game project using the Rigify add-on. However, this character has some extra features than that of a standard humanoid, including a tail, whiskers, cat ears and hair that I would like to rig as well.

My goal is to animate the base Rigify humanoid to perform common actions (idle, run, etc.) that I can recycle for any humanoid character, but also somehow augment this rig to include this character's unique tail, whiskers, ears and hair to animate alongside the common shared animations. Does anybody know how one might achieve this?

After you generate a rigify rig, it becomes a standard armature, that can be edited adding new bones and parenting them to the appropriate bones.

The only thing to consider is that the Rigify rig is quite complicated, it has a bone layer with all, normally hidden, deform bones, a couple of layers containing "service" and "machinary" bones, and a lot of layers which organize all control bones (thoose who have custom shapes).

To avoid problems of interference with the structure of the rig, I think it's better not to move, rotate or scale any bone of the original rig, and use the deforming bones (those who contain "DEF" in their name) as parents of your added bones. You can find them in one of the last bone layers (normally hidden, you have to atcivate it in the bone layers tab of the armature properties panel).

If you perefer to have a separate rig (and animation) for your added bones you can use copy transform constraint (in world space). In example you create  a head bone in the exact same place of Rigify head bone, set a copy transform constraint with the rigify DEFhead bone as target, and use it as parent for your ears bones.


How to do continuous integration with gitlab when developing blender addons? I'm developing a blender addon and would like to take advantage of gitlab-ci to continuously test my addon, as well as have badges on my repository indicating the status of the latest build.

Advantages of using a continuous integration include automated merges and deployments when tests pass, as well as the peace of mind of being able to quickly know if you've broken anything with your latest changes.

Which are the steps for an addon developer to enable continuous integration? Blender specific caveats?

Introduction

Continuous integration requires a few things, namely tests, a CI server and tooling to run the test suite and read results automatically. Let's take them one by one.

Testing

There are various ways to write unit tests in python, but I decided to go with the classic unittest module because it is included with blender's python.

While I started off with tests in a different repository, I decided to move them alongside the addon in order to eliminate the need of keeping tests and addon in sync.

Let's say our addon is named toaster. I would advise naming the tests folder toaster_tests. You'll see why.

The test suite

The test suite is written in classic unittest manner.

class ToasterMeshTests(unittest.TestCase):
    def setUp(self):
        if bpy.data.objects.get('Cube') is not None:
            bpy.data.objects.remove(bpy.data.objects['Cube'], do_unlink=True)

    def tearDown(self):
        pass

    def test_addon_enabled(self):
        self.assertIsNotNone(toaster.bl_info)

Some caveats:

You need a way to override context because the tests are not always run in the same context as the actual operators. I have found this to mostly work but not always.. Some times you will have to rework your addon in a way that it is less context-sensitive, for example using bmesh instead of operators to manipulate meshes. You will also need to provide a path for context passing all the way down to the last operator call (which is a good idea anyway as you might find that things break due to context changes when you move your UI around). This context override function seems to work most of the time for me (unlike the one in the API reference)

def context_override(self):
    override = bpy.context.copy()
    for window in bpy.context.window_manager.windows:
        screen = window.screen
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                override['window'] = window
                override['screen'] = screen
                override['area'] = area
                override['region'] = [region for region in area.regions if region.type == 'WINDOW'][0]
                override['selected_objects'] = [o for o in bpy.context.scene.objects if o.select]
                override['active_object'] = bpy.context.scene.objects.active
                return override

I found a weird bug when reloading the startup file (bpy.ops.wm.read_homefile()) in setUp so for now you need to manually start the suite in an empty file, and clean up after each test.

Graphical version

If your addon is graphical it might make sense to run some of the tests manually and eyeball the result instead of writing complex geometry-understanding scripts. For this reason, I made the tests folder an addon by itself, with a panel and an operator that calls each test separately. This is why I recommend naming the folder toaster-tests, in order to avoid name conflicts in the blender addons folder.

This is the operator

class TestsOperator(bpy.types.Operator):
    bl_idname = "toaster_tests.run"
    bl_label = "Toaster Tests"
    bl_options = {'REGISTER', 'UNDO'}
    testcase = bpy.props.StringProperty()

    def execute(self, context):
        if self.testcase == "all":
            suite = unittest.defaultTestLoader.loadTestsFromTestCase(ToasterMeshTests)
        else:
            suite = unittest.TestSuite()
            suite.addTest(ToasterMeshTests(self.testcase))
        unittest.TextTestRunner().run(suite)
        return {'FINISHED'}

And the UI panel

#A new panel in the tools section of the 3D view
class View3DPanel():
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

class ToasterTestsPanel(View3DPanel, Panel):
    bl_label = "Toaster Tests"
    bl_context = "objectmode"
    bl_category = "Toaster Tests"

    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)
        col.operator("toaster_tests.run").testcase = "all"
        col = layout.column(align=True)
        col.operator("toaster_tests.run", text="Test 1").testcase = "test_add_column"
        col.operator("toaster_tests.run", text="Test 2").testcase = "test_add_beam"

Running the test from the console

To enable continuous integration you need to be able to run the tests from the terminal. While this is trivial, it is not as trivial to make sure that the CI runner understands if the tests failed or passed. Blender has the --python-exit-code parameter but this returns non-zero only if an exception is thrown in the supplied python file, immediately before exit.

Thus we need to throw an exception if the tests fail, catch it and immediately exit. This is what this script does.

import unittest
from toaster_tests.suite_1 import ToasterMeshTests
import sys

def run():
    suite = unittest.defaultTestLoader.loadTestsFromTestCase(ToasterMeshTests)
    success = unittest.TextTestRunner().run(suite).wasSuccessful()
    if not success:
        raise Exception('Tests Failed')

try:
    run()
    sys.exit(0)
except Exception:
    sys.exit(1)

You can try to run it like this

blender --addons toaster,toaster_tests --python toaster_tests/run.py --python-exit-code 1

You will see blender momentarily launch and output like this:

Read new prefs: /path/to/userpref.blend
Toaster Loaded
Reloaded modules
...
----------------------------------------------------------------------
Ran 3 tests in 0.003s

OK

or if the tests failed

Read new prefs: /path/to/userpref.blend
Toaster Loaded
Reloaded modules

.F.
======================================================================
FAIL: test_add_column (toaster_tests.suite_1.ToasterMeshTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/qwazix/.config/blender/2.78/scripts/addons/toaster_tests/suite_1.py", line 45, in test_add_column
    self.assertEquals(bpy.data.objects['Cube'].location, Vector((0,0,-8)), "Column not at the correct position")
AssertionError: Vector((0.0, 0.0, 0.0)) != Vector((0.0, 0.0, -8.0)) : Column not at the correct position

----------------------------------------------------------------------
Ran 3 tests in 0.002s

FAILED (failures=1)

CI!

In the first reference link there's a nice writeup on how to make the CI server (in that case Travis) to download blender in the new VM the CI engine uses. While this allows you to use the shared runners in the case of GitLab (I assume something similar happens with Travis) however I find it wasteful and unnecessarily heavy on blender foundation's servers to download blender each time I push to my server, so I decided to spin up a virtual machine on my local computer.

So go install yourself a distro with your favorite blender version on a virtual machine and then install gitlab-ci-multi-runner.

  If you are wondering why a VM, it's because you might have done all sorts of weird things on your local blender installation (enabled multiple addons, installed python modules and other things) that a user might not have and thus the fact that the tests pass on your machine doesn't mean it will work on a clean environment.

Register your runner with gitlab

gitlab-runner register

It will ask you to provide a token from your gitlab repository and give a name to the runner. For the first time it might be useful to do it as user rather than as root, in order to run it manually and be able to observe what is going on. Afterwards, registering as root allows for unattended tests by just having the VM booted up, though you might run into issues with the X11 display. Choose a name and labels as you like and set executor as shell.

Now run it (except if you set up as root, where it automatically runs in the background)

gitlab-runner run

CI configuration

To trigger a CI build in GitLab you need to add a .gitlab-ci.yml in the root of your repository. The following file works for me

job1:

  script:
    - mkdir -p ~/.config/blender/2.78/scripts/addons/
    - rm -f ~/.config/blender/2.78/scripts/addons/toaster
    - rm -f ~/.config/blender/2.78/scripts/addons/toaster_tests
    - ln -s `pwd`/toaster/ ~/.config/blender/2.78/scripts/addons
    - ln -s `pwd`/toaster_tests/ ~/.config/blender/2.78/scripts/addons
    - blender --addons toaster,toaster_tests --python toaster_tests/run.py --python-exit-code 1

If you choose to run it as root you will need to append the following switches to the last line, as the runner runs under the gitlab-runner user which does not have a DISPLAY, nor access to alsa.

-b -noaudio

  Note that I suspect that running with -b might incur additional context issues with blender, since it's possible that context override won't work (no windows to loop through in context_override()). This theory is not tested.

Passed!

Now if all went well, your runner should show

Checking for builds... received                     build=6237996 repo_url=https://gitlab.com/d-e/blender-addon-boilerplate.git runner=78a379b6

Build succeeded

and the build page in gitlab should show the output from blender. After a while a nice green reassuring

badge should be besides your last commit.

Wrapped and ready to go

I've updated my boilerplate blender addon (now named Toaster) with CI configuration. There are two branches, one that launches the full blender gui in the runner and the nogui-testing branch which runs blender in the background. Go get it.

References

Automatic Blender Addon Testing with TravisCI
Terminate Blender with Exit Code “1” when run from command line
Blender Manual – Command Line Arguments
Gitlab runner documentation


Wrinkled model (normals?) Learning to model with Blender. Trying to modify an existing model, at some point I "wrinkled" it. I'm suspicious about some custom code (I'm developing a Blender plugin to export/import models from a game) to save and reload normals, but the case is I have this model now and I want to know what's going on so I can fix it.

With autosmooth turned off:

With autosmooth on:

What causes this? How can I fix it so when autosmooth is enabled, it looks like the figure on top?

Well, I found out that Reset Vectors in the Normals menu (Alt-N) seems to be the answer (you need to select all your vertices):

The result:

I don't know what I'm doing in my export/import code (that I mentioned above) but that's another story.


Running a blender script on linux hosting I am currently working on a web app which spits out a .stl file in blender. I have used php and I am calling the script in php using exec(). Please look at the code below. I found the code from https://stackoverflow.com/questions/23563809/php-running-a-python-scrip-using-blender-from-a-php-project-using-cmd-commands

$script = "C:\\xampp\\htdocs\\test\\test.py";
$blender_path = "C:\Program Files\Blender Foundation\Blender";

$output = exec("cd $blender_path && blender -b -P $script", $data);
echo "<pre>";
print_r($data);
echo "</pre>";

And all works well locally. I uploaded the content to my site(Linux hosting), Uploaded Blender(Linux - https://www.blender.org/download/) changed the paths and nothing happens. It doesn't even output any errors. Is there a separate command line code for linux? I am not used to using Linux and I have been struggling with this for the past 3 days.

Any help is appreciated.

I'd start with running the script with test parameters directly from the terminal on your server using SSH. If you get the expected results from the terminal, then something with the way you're executing the script in PHP is the problem.

You might also see output that you wouldn't through your PHP script (blender spews out various output to the standard output and error streams).

Also, if your script imports from other scripts or addons, you need to include them using another pair of command line params in your script:

blender -b --addons addon1,addon2,script3 -P yourscript.py

Make sure to list all the addons and scripts after the --addons in one string without spaces (the entire comma separated list is one command line parameter).

You don't need to list standard blender or python libraries in the --addons list (bpy, bge, os, math, mathutils, etc), but if you're importing any of blender's addons, or any custom addons or libraries of your own you must include them.

Addons and script files listed in the --addons list must be present in one of the paths available to the blender script. If you're not sure what's included, save this little script locally on your server and run this it from the terminal on your server:

import sys
print( sys.path )

Assuming you saved this as "print_path.py":

>> blender -b -P print_path.py

You can either copy or create a symbolic link to these libraries and addons in one of the blender $PATH folders to make them available to your blender script.


why I cannot render the first layer After I rendered an animation in second layer, my render always render the second layer. I changed my camera setting and clicked 1st layer and then click render, but it still pops out the rendering of my second layer (my animation render).

How can I change back to render my first layer again? There are some pictures about my interfaces below, if they help.

Link to .blend file:

You need to go in the Properties panel > Render > Post Processing, and deactivate Sequencer. I quote the Blender manual: "Sequencer
Renders the output of the Video Sequence editor, instead of the view from the 3D scene’s active camera."


Why does UV orientation affect tangent space normals? When using a tangent space normal texture, the orientation of UV islands affects the normals even when using the Generated or Object Texture Coordinate. How can a UV map influence a texture that is NOT using any UV map ? How can tangent space itself be affected by the UV map ?

Here's the basic setup :

a plane split in 2 faces, each one being rotated differently in the UV map
a noise texture with generated mapping.

And here's how it looks :

Here's the file

See how turning one face by 180° in the UV map removes the seam, while the noise texture is using a generated mapping.

The normal map node takes the default UV map, if one exists, to generate the tangent vectors. So while your noise texture uses generated UVs, your normal map node still uses your UV map. Pick Object Space in the Normal Map node instead to fix it.

Tangent space is affected by the UV map because the tangent and binormal vectors basically just represent the up and right directions on the UV map. So when you rotate a poly on the UV map, the tangent vector rotates with it.


Refresh the UV Map with a new topology I will use an easy example to focus my problem.

I have a cylinder, with this unwrap below. I scaled and moved the islands in the UV layout in order to optimize my UVs.

Right now, I don't want to modify my Uvs' island more . . . Suppose island's position and scale are perfect for my purposes. They have just to stay there.

Here's the problem: I can't export my cylinder with this topology (problem of my engine) then I have to fix my mesh in this way:

I didn't touch any mark seams during the process.

My question is: is there a command or a path in order to refresh the UV map? I would like to "refresh" the UV map with the new topology for the top and bottom face of cylinder without doing again the unwrap and scale-move my island.

P.S. I don't want to move again my UVs' islands because I already created the texture (with the first UV) and I'm afraid of not bieng able to match all perfectly with a new unwrap.

Thank you!

In this example you have 2 options. One is to poke face, which will divide it without distorting UV map and second is to pin vertices of the UV map, do what you need to do with the face and unwrap everything again without moving UV map.
Here is how it's done:


Need help with modelling a cylinder with a piece cut out? I need to model a cylinder with a piece cut out (a quarter of it), but I can seem to get it with nice edges:

Test 1: Even with the a bevel added, the middle part is distorted.

Test 2 Added more mesh to the top to 'fix' it, but the mesh at the bottom is ruined.

I think this topology doesn't work too bad. You'll have to move a bit some edges to prevent a bit of pinching, I don't know if it can be perfect with an only 12 vertices cylinder though.


Texture paint's brush is always black I've been trying to paint onto a mesh I created, and I was able to paint onto it yesterday with no issues. I had to resculpt some details with dynotopo and redo the UVs so now I'm repainting it, however I have an issue. No matter the brush or settings, the color of the brush is always black, not the texture itself, but the brush. I'm trying to create a subdermal texture for a hand

Thanks!

Try delete brush and create new. That worked to me.


How to add an object with texture inside another object? I am trying to make an eye. I made the iris in Photoshop and now I am trying to add it to a UV Sphere. I would like to make a realistic eye but maybe I am not in the correct way. Any thoughts? This is my work so far:

The first thing you need is to model a proper eye. Like so:

The outer part is 0.1cm away from the inner in this case.

The outer part needs to be refractive (or even just transparent) and it will also need specular as it will catch the high spec of the eye.

Depending on the render budget you have you can add SSS to the inner part. I did in this case but the difference here is subtle. In this case i'm aiming cartoon semirealistic eye but the principles are pretty much the same for any eye.

You now have to UV unwrap the inner part. Easy, divide the eye in two parts on its XZ plane center and Unwrap.

Now you can add the diffuse texture to the inner part of the eye, but note that for a proper eye render you will need more than just a diffuse shader.
Personally I add a specular map only to the iris using an high IOR and roughness value, a bump (or displacement if needed) map aswell.

Here is the final graph of my setup:

and a little GIF preview:


How can I unwrap polys into a perfect square? first question here and yes, I already searched  and couldn't find anything for my case.

I'm trying to UV map a model I managed to get from a PS1 game as I'm doing a track conversion for rFactor 2, but the problem is that basically all the models use a perfect square projection (edge to edge on the UV) on it. My issue is that no matter what unwrap method I use (including modifying their settings), they never get unwrapped into a perfect square. If I could find a way to do that I would save a lot of manual work as like I said, all models use a square texture edge to edge.

EDIT: I found out that what I'm looking for is basically per face texture mapping but I can't find any way to do that

I had a similar problem way back ;)

I used this addon:
http://blenderaddonlist.blogspot.com/2015/05/addon-quad-unwrap.html

What I did was to unwrap all my quads that should share the same texture at once, used the addon to make all lines straight and then scaled the resulting grid so that one cell occupies the whole uv space, forcing the other cells outside thus making them exact uv copies of the first cell.

EDIT: It seems the author did not update the link he posted on blenderaddonlist. However in his youtue tutorial he posted a downloadlink in the description that still works ;)
https://www.youtube.com/watch?v=DcFEdK5TQv0
https://www.dropbox.com/s/li6nuop9c4omlih/wahooney_uv_quad_unwrap.py?dl=0

EDIT2: Triangles are a bitch. It does not work with them, since there is no way for the addon to know which way to follow to the next quad. So you would have to get rid of the triangles first. Unless the geometry is very complex the build in blender tri to quad function should be able to do it.

EDIT3: Feeling stupid right now ... using U -> Reset on the faces already does a per face mapping. Is that feature new ? I could swear the reset option was not there two years ago ;)


Blender for Previs/Layout I'm a professional Previs artist working in Maya and now deciding to give it a try with Blender. I am absolutely new to it...
I couldn't find any chat here related to that (not even tags about it). Is there anybody out there making previs with Blender? Is it possible? Hard/easy? Need much scripting?...
Let me know :)

Cheers everyone!

Well, blender.stackexchange focuses around usage oriented questions, specific tasks etc, not opinion based, open questions about the market place.

But the answer is: Yes, there are people doing that. At the Blender Conference 2018 was a talk from someone working at Lucasfilm:

https://www.youtube.com/watch?v=UpcKPJTmqSI
(Blender Workflow for Feature Films - Jama Jurabaev)

Grease Pencil is a beast.

https://blenderartists.org/ might be a better place to have a discussion


How do I fix this issue with weird faces? When I'm modelling, I often end up subdividing a lot of edges and creating a lot of faces/edges. However, I often end up having a face that doesn't follow the edges or vertices assigned to it when it's created.

Can I get any help with what this is? or how to solve it? It would help a lot. Thanks :)

In short, the face shown in your screenshot has 2 problems:

it is Ngon (face with more than 4 vertices),
it is non-planar Ngon (all its vertices do not share the same imaginary plane).

Chances are that you'd like to get rid of faces of this type and make sure they won't come up in future.

The thing is that there probably aren't any ways to avoid faces of any type in an automated way. It could happen that object is allowed to have Ngons on planning / modeling stage, but isn't on the final stage of working on it (when lighting / rendering). So no one knows if you are designing model or cleaning it. See When should N-Gons be used, and when shouldn't they?

The only viable option is to keep track of your topology which may be quite important for overall look of your model. So if it's a problem to have these faces, make sure not to create them! Do not subdivide faces while modeling (unless subdividing all of them); use LoopCut tool to add details along with managing edge flow orientation.

See also Topology Guides blog for great tips about modeling.

A lot could be written about different ways of modeling while preserving topology as good as possible, but generally 2 global principles should be listed:

cleaning up the model in the end of modeling stage (this could include retopologizing too);
modeling with quads or quads-tris only from the beginning.

While second comes mostly with practice, the first could be achieved with some tools which already exist (keep in mind that these tools are meant to be used for finding Ngons in meshes and finding / repairing non-planar faces in particular).

Default tools for mesh Clean-Up in Blender

Split Non-Planar faces tool will split adjacent faces if they are present and thus will show you where are they;
Degenerate Dissolve might help in deleting geometry which is not preferable like zero-area thin faces.

Mesh Lint addon

Check for Ngons in mesh with enabling adjacent option in Properties editor > Object Data > MeshLint rollout.

Mesh Analysis

With Distortion enabled you can preview faces which are not flat (non-planar, like one on your screenshot) and possibly can cause distortion of texture / shading artifacts etc.

See also:

How to flatten a non-planar face to a targeted plane?

How to make all quads or ngons on your mesh planar (2d)?

How to flatten a face to avoid distortion (make an ngon planar)


Selecting faces in Python For the sake of simplicity, lets start with the default screen.

How would you go about selecting faces in Python?
Top, Bottom, Sides?

bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.mesh.select_face_by_sides(0)

This seems to select everything.
I can't find a subscriptable face[0] anywhere...

I also know you can do:

bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.select_nth(nth=6, skip=1)

but I'm not too savvy on the whole 'nth' thing.
I had it at one point, but I don't recall what I did.

set nth= to the number of faces,
then use skip= to pick different faces?

Is that the only method, or can I find a simple list of faces somewhere?

bpy.ops.mesh.select_face_by_sides allows to select faces which are matching an amount of sides (border edges). It also needs named arguments:

Examples:

#Selects faces bordered by 3 edges
bpy.ops.mesh.select_face_by_sides(number=3)

#Selects faces bordered by more than 3 edges
bpy.ops.mesh.select_face_by_sides(number=3, type='GREATER')

The object's faces are stored in polygons (obj.data.polygons).

So for instance, for top, bottom and side faces you can use:

import bpy
from mathutils import Vector

def NormalInDirection( normal, direction, limit = 0.5 ):
    return direction.dot( normal ) > limit

def GoingUp( normal, limit = 0.5 ):
    return NormalInDirection( normal, Vector( (0, 0, 1 ) ), limit )

def GoingDown( normal, limit = 0.5 ):
    return NormalInDirection( normal, Vector( (0, 0, -1 ) ), limit )

def GoingSide( normal, limit = 0.5 ):
    return GoingUp( normal, limit ) == False and GoingDown( normal, limit ) == False

obj = bpy.context.object

prevMode = obj.mode

bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

#Selects faces going side
for face in obj.data.polygons:
    face.select = GoingSide( face.normal )

bpy.ops.object.mode_set(mode=prevMode, toggle=False)


How to Add a Material to a Lamp in the Blender Game Engine I'm making a game in UPBGE mainly it has a day/night cycle. I made a street lamp with a spotlight. I'm asking for a way to use nodes in for the lamps in the game engine.

If you're still trying to do this, or if someone else is trying to, you can animate the brightness of the spotlight and use logic bricks (or python) to play that animation.


Problem importing the blender model into unity I followed a tutorial in youtube into creating the rig and animations of a humanoid model. I successfully finished the tutorial but when I import it in unity, and make the rig humanoid I get this error.

Causing the whole rig to malfunction. I don't understand because the bones are complete. Tried renaming the foot bones but it does not fix the problem.

Here's the blend file: model

In Blender you need to rename the bone AND any weight groups you have already assigned when parenting to the armature. The armature bone name needs to match the weight group created for the mesh, otherwise the foot won't be moving with the bone in Blender or in Unity.

Additionally in Unity you can go to Rig-tab and click the button configure the avatar where you can manually assign the left foot to the bone that your model has. But I assume if you fix the weight group naming first (which is mandatory for the rig to work) Unity should be able to correctly automatically detect the foot afterwards.

Finally after you have configured the avatar you can proceed to importing the animations.


How to build and submit Mac builds to Graphicall? I've used a few of the custom builds on Graphicall, and I'd like to give back by helping contribute some back. I've got a Mac, which is a bit of an underdog in terms of building submitted, and I've got decent experience with Subversion and other version control systems, but haven't seen a "how to" on compiling builds for others.

How do I set up a build environment on my Mac for compiling and bundling build packages to Graphicall?

There are easy to follow steps clearly outlined on the wiki. It tells how to setup the environment and how to download and build the source.

If you then go to graphicall and create an account, after logging in, there should be an option to upload a new build.

Update: To create an account on Graphicall.org, people now have to go to the IRC channel #blenderstorm on freenode and leave a request for an account (just preferred username + email-address is enough). An admin will create the account when the request is received.


Geometry nodes vs particle system I just want to know the benefits of using geometry nodes over particle system.
Will I be able to generate more particles with less memory usage in geometry nodes?
Why are geometry nodes such a big deal. I didn't find anything interesting in it (or maybe i just don't know how to use it)

The big deal with geometry nodes is that we're effectively getting the functionality of geometry shaders now. That's kind of a blunt way of putting it, but if you look that up in the context of GLSL you'll find that they stand between vertex shaders and post processing, and govern full primitives; that is, they can create meshes in the graphics pipeline itself, without having to copy data over for every single instance.
GLSL geometry shaders are largely superseded by compute shaders now, but it's still a common practice to use them for extremely primitive-populated models and the concept is the same. In the past we did indeed use particle systems for this, but a particle is much more simplistic and restricted than geometry nodes, particularly if you aren't trying to work in real-time. They are much more flexible and easier to work procedurally with. (Think Cinema 4D, if you've used it; it's had this advantage for a while now.)
If you attempt to model the same scene with both geometry nodes and particle systems, you'll already notice, as I did, that geometry nodes are substantially easier on your hardware. On top of this, we are opened to node programming for geometry nodes, while particle systems require what I consider to be a much clunkier interface.
Now, if you have something you've already implemented as a particle system, and it works, that's fine; they aren't going anywhere and you shouldn't feel like you have to replace it just yet. Technically they are two different systems that involve instancing; but for geometry nodes it's a core concern whereas with particles it was always more of a tacked-on option.


How do you know poly count or how many triangles are there in your mesh or object? How can you know your poly count? I searched online, & all the answers are for versions from years ago. How can you see the number of triangles you have in Blender 2.83?

Shoot, I just found out on another post.
The post was indirectly related to my question, but didn't answer it directly, however, I found out it actually answered my question in the details it provided.
The poly count is shown in the bottom right corner of the screen.


Blender video editing: shortcuts for selecting video strips I use Blender 2.8 to cut videos and find myself selecting strips that I want to delete using my mouse - that's slow :( Often I cut a strip (Shift+K) and the strip on the wrong side of the cut gets selected (Apparently because my mouse cursor is located on the wrong side of the cut when the cut is performed.)

How can I quickly (i.e. via hotkey) jump to the strip on the other side of the cut and select it?

Except moving the mouse cursor to the side you want selected before cutting(use K, unless you need a freeze frame), there is only this selection option, but it'll select all strips to the right of the playhead:


Help sculpting Malwiya mosque I need help to sculpt the Mawiya mosque depicted below:

.

I tried to do that in Blender 2.81 but I couldn't bring the same spiral walking path. That is what I came out with:

I have used Cylinders to preform that but I was stuck with creating the walking path from the ground to the top of the mosque! I imagine that should be easy for an expert to do in Blender.

I think you can probably achieve what you're looking for using (mostly) the Screw modifier. Here are 3 approaches...

Method 1: Screw + Proportional Editing

I forgot to make sure the walking paths aren't partially above one another on the Z-axis in this approach, but I think it can be adjusted to get that right:

Start with a simple plane:

Apply a Screw modifier:

Then we'll apply the Screw modifier to the mesh, and get ready to use proportional editing to adjust the mesh's shape:

Next we'll actually do the proportional editing. Note that I'm doing this with Shift+Z (to only edit the width & length, not the height, of the structure), that my proportional editing circle-of-influence is quite large, and that I've set the Pivot Point to my 3D cursor (which is set to a position in the center of the structure's X-Y plane):

This process leaves an open hole in the center of the structure, so I then added a single cylinder to fill it in. I think you'll probably need a separate cylinder for each layer, but the same basic idea should work:

Method 2: SimpleDeform + Screw + SimpleDeform

We start with a plane in the same setup as in Step 0 above (not shown here). We can then add the 3 modifiers in the title of this method, with setting as given below, and get a reasonable facsimile to the Malwiya mosque's structure:

You may then want to apply modifiers and edit this, but it seems like a good starting point for the desired structure. To give a little bit of intuition for why this particular modifier stack seems to work: I started by observing that the Malwiya mosque looks like, well, a screw, except that its walkway's radius tapers off as you approach its summit. Simple deform gives us the option to taper (either before or after the Screw, or both, as we did here), and so playing with a few combinations of these two modifiers seemed natural.

Method 3: Archemedian Spiral with Extrusion

I couldn't quite stop playing with options, so here's a third one: you should be able to pretty easily generate the desired shape using a curve to model the desired spiral, adding Bevel & Taper objects to get the desired walkway shape/height, and finally filling in any gaps with cylinders or other objects as appropriate.

In particular, there is a very nice "Archemedian Spiral" object available for free (though I believe you have to turn on the "extra objects" add-on to see it):

If we add a Bezier curve with 3 points as the Archemedian spiral's Bevel object, then we can play with it a bit to get a nice basis for the kind of spiral walkway that wraps around Malwiya mosque:

You would then probably want to rotate this a bit to get the walkway to angle in the same fashion as in your image, and convert it to a mesh and extrude the geometry to fill in empty space.


UV unwrapping mesh with radial array modifier I have this floor mesh which was modeled using the array modifier w/ rotation to create an hexagonal shape. I started unwrapping and marked my seams (in red). The edges selected in ORANGE are the ones on which I do not want any seams, but they happen to be on opposite sides of the mesh. Therefore I need to align them (as if they were merged) but the weld and stitch commands are no good because they are on opposite sides of the mesh. How to superpose them precisely on top of each other so there are no visible seams, or at least how do I align these islands based on the selected edges without moving only the edges and distorting the map (I need the whole island to move along).

Enable UV snap and change it to Vertex, then move one island till it snaps to one of the connecting vertices.

Select the connecting vertex and snap 2D cursor to its location using Shift+S Shortcut and change Pivot Point to 2D Cursor

Select one UV island and rotate it till it snaps to the other side of second UV island.


Render result in current ui I'm currently using 2.8.2 but this also happens with 2.8.1 when I hit F12 for render it opens a new window, can't seem to find any options to have it display the render result in the current ui layout instead I get a full 1:1 pop up of my render taking over my screen I rather have the render inside of one my window panels. Has this been changed or just removed?

EDIT: apparently it's still there in 2.8.1 but not 2.8.2

In the current development version of Blender 2.82 the option can be found in the preferences. The Interface tab contains the Editor panel, which contains the Temporary Windows sub-panel, where the Render In option is located.


Camera (F12) wont render correctly I have a small problem. The f12 wont render correctly. This is my viewport:

and this is the f12 image:

Blender File here: https://jmp.sh/pIbvOCR

Could someone please help me :)?

See the little Icon with the Camera in Outliner its not checked.
Click that Camera to get the plane appear in Render view

By Clicking The Camera Icon in outliner you are restricting the plane to appear in Render.


Changing default Blend Mode settings for materials I would like to know how to change the default Blend Mode and Shadow Mode for any newly created material, because Opaque mode is useless to me. I wish Blender always gave my new materials Hashed mode because I use lots of transparent textures and want them to instantly look realistic.
I think the script responsible for material properties is:
C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\startup\bl_ui\properties_material.py
But I have no coding skills, so I'm only capable of swapping some parameter in source code if someone tells me exactly where to do it - I hope it's that simple.
I also went to Online Python Reference for the Blend Mode setting:
https://docs.blender.org/api/2.90/bpy.types.Material.html#bpy.types.Material.blend_method
And I found there a phrase that I guess will do the trick (with the right context), but I don't know how to use it. Maybe I could use it in an empty file, execute the script and save the file as default startup file so that any new file would use the typed blend/ shadow mode as default. I don't know if it all works this way. If so, this would be quite satisfying solution.
<< enum in [‘OPAQUE’, ‘CLIP’, ‘HASHED’, ‘BLEND’], default ‘HASHED’ >>
I'm on Windows 10, Blender 2.90.

You may not like the answer, but I'm afraid the way you possibly imagine it is not meaningful to implement. Basically there are two ways to expand Blender programmatically: Either with an add-on (via pyhton API) or by hacking the C++ files. The latter means that you have to compile your own version of Blender every time a new official update appears. Gone are the days when you simply pressed the download button and installed it. That also means that you have to mess around with things like compiler choice and dependency management (which can be very painfull in C environments). If you are not familiar with it, then I would rather advise against this.
The far more convenient way would be to write a small addon and use the Pyhton API provided for this use-cases. However, this has the disadvantage that you have to press your own button for your adapted material, similar to what you are used to from other addons. But, as long as the Pyhton API doesn't change much, you can still download and install new Blender versions as usual and nothing will break.
Take a look at the following script and run it in Blender to test whether you would like to go the path of an add-on. If you need further help with the adaptation, feel free to ask me, but in principle you only have to expand or add a few lines to adapt it to your needs.
You can easily test it by pressing "Shift - F11", creating a new file and inserting the script. Then press the play button. Then, as with many other add-ons, another menu should be available in which you can create your material with a mouse-click (don't forget to select a mesh). I have tested the script but it is far from "bullet-proof" so do not test it in your project that you have to hand in tomorrow ;). Hope that helps.

Useful resources:
https://www.youtube.com/watch?v=eo7UjKFiagk
https://docs.blender.org/api/2.90/bpy.types.Material.html#bpy.types.Material.blend_method
https://docs.blender.org/api/2.90/info_quickstart.html

import bpy

class ADDONNAME_PT_main_panel(bpy.types.Panel):

    bl_label = "Add Hashed Material Panel"
    bl_idname = "MYADDON_PT_main_panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'My Default Material'

    def draw(self, context):
        layout = self.layout
        layout.operator("addonname.addbasic_operator")

class ADDONNAME_OT_add_basic(bpy.types.Operator):
    bl_label = "Add My Material"
    bl_idname = "addonname.addbasic_operator"

    def execute(self, context):

        material_basic = bpy.data.materials.new(name= "Basic")
        material_basic.use_nodes = True

        material_basic.blend_method = "HASHED"
        material_basic.shadow_method = "HASHED"

        bpy.context.object.active_material = material_basic

        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

classes = [ADDONNAME_PT_main_panel, ADDONNAME_OT_add_basic]

def register():
    for cls in classes:
        bpy.utils.register_class(cls)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)

if __name__ == "__main__":
    register()


Creating Identical Materials for Multiple Objects I have a bunch of keys on a piano that all share the same White Key material. I will eventually be animating values in the material to make the keys glow at different times. Now, obviously, if I animate the value, it will affect all the keys. Splitting all of the materials by clicking the + button each time for every key could understandably take a while.

Is there a Python script or feature that I could utilize to give each object that uses White Key its unique copy of White Key (White Key.001, White Key.002, etc.)?

You can of course use scripts to duplicate the material around, but I have the feeling this will create a trap for you in another corner: When animating, you somehow need to animate every single material, and this I cannot imagine to be comfortable.
I suggest a slightly modified approach: Use one single material on all white keys, and create a node setup in Cycles which will hook up to an attribute of your object. In essence, you can tell the material:

hey, if the attribute of the object which I live on has a value of X, do this. Else, do this.

In other words: If X == 5 (given that X is the value you animate), and attribute Y on the object == 5 as well, glow. Otherwise, stay non-glowing. A simple Blend file showing this approach can be found here:

Edit
Animated ID value in the Blend file can be tested here:

In this Blend file, each cube has a different Object Index, starting at 0 and going up to 6. I'm using the Object Index Node to get my source value to check against:

But you could also generate a custom property on each object and read that using the Attribute Node. Whatever you decide, the next step is to generate a node tree similar to this:

The framed part is the IF X == Y expression. It works like this: Say we want to check if the Object Index is 3. Set the value of the top input to 3. Now, the top half of the IF expression will deduct a threshold (0.1), giving you 2.9, and then feed that into a Less Than node. So, for all Cubes with Object Index 0, 1 and 2, this will be 0 (=False =Black), as their Object Index is not less than the ID we're checking against. The bottom half works reversed, now the cubes with Index 0, 1, 2 and 3 will output white. You can preview the node outputs of less than and greater than nodes to see what I mean. The multiply nodes will multiply the results together. Since only the Cube with ID 3 received white in both cases, and only 1 * 1 = 1, it will be the only white one in the end.
The rest is 'normal' shader switching as you've done plenty of times. Now, the only value which you need to animate is the ID value in the Node Tree. You could even create an expression on it (enter #frame into the field for instance to setup a driver which links to the scene frame).


Auto add keyframe at regular intervals? Is there a way to automate adding keyframes at a regular intervals? I'm mimicking stop-motion movement by

keyframing the animation
manually adding inbetween keyframes every 4-5 frames
setting Interpolation to Constant

Works pretty well, but I'd like to automate step 2 if possible.

Rather than keyframe with Constant interpolation, you can simply keyframe normally (using smooth interpolation) and add a modifier to your f-curves to mimic the 'jumpiness' of stop-motion.

The modifier you need to use is the Stepped Interpolation modifier. This modifier takes your f-curve and splits it into time slices based on the Step Size, retaining the value at the start of that 'slice' for the duration of that 'slice' exactly as how you are currently doing with 'constant' interpolation.

You will need to add the modifier to each f-curve in the Graph Editor and set the Step Size to the same value for each.

Note : For added versatility you could potentially use a Driver to set the Step Size based on a single custom property in your scene. This way you can easily adjust the stop-motion frame rate for your whole animation rather than having to change each modifier individually.


Making Property sliders act similar to Operators When you use an Operator button there is an execute method that allows you to add custom functionality to the button.  I want to be able to do the same thing with a custom slider.  What I am trying to do is adjust the length of a sequencer strip that is in between other strips and have those other strips automatically move over to fit the new frame length.  I thought that perhaps I can do something with col.prop(strip ,"frame_final_duration") by catching the values from that object first and using that info to move over the other strips before the length gets adjusted but doesn't seem possible.  So I am thinking of making a custom 'frame_final_duration slider' instead but there is no execute method associated with Property sliders.  Is there a solution to this or am I going to have to use buttons?

You can use the 'update' function value that can be assigned to the property's definition:

Update function is triggered each time the slider's value is changing.

import bpy

class SomePanel( bpy.types.Panel ):
    bl_label = "Property panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

    def draw(self, context):
        layout = self.layout
        scn = context.scene
        layout.prop( scn, 'someValue' )

#Update function example:
#self is the object to which you have assigned the property
#context is similar to the context given in the execute function of an operator
def whenUpdate( self, context ):
    if context.active_object:
        context.active_object.location.x = self.someValue
    print( 'update', self.someValue )

def register():
    bpy.types.Scene.someValue = bpy.props.FloatProperty(
        name = "Float",
        description = "Enter a float", min = -100, max = 100,
        update = whenUpdate ) #Assign the update function here
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.someValue

if __name__ == "__main__":
    register()


Blender Armature Rotation causes Scaling I'm still new to rigging in Blender, but I'm working on a basic door. I have a door with a doorframe and two doorknobs on either side.

To rig it, I did the following:

Create a door. The doorframe, door, 2 x doorknob base, and 2 x knob
itself are separate meshes joined together with ctrl+j. Make sure it is scaled to 1 in every direction.
Create vertex groups: 1 includes the door, doorknob base, and knob.
Two other groups include each separate doorknob.
Create an armature. Enter edit mode and scale slightly smaller.
Extrude the root bone and disconnect it. Move the bone into the hinge
of the door so I can open and close it. Name the bone to match a
vertex group containing the door and doorknobs.
Extrude the root bone and disconnect it. Move it into the center of a
doorknob so I can rotate it. Name the bone to match the name of the
knob.

The problem I'm finding is that if I rotate that bone for the doorknob, it also scales the doorknob down and back up. I found an earlier post about it that said maybe there was a problem with the armature, so I deleted my armature and re-did it, making sure to only ever scale, rotate, etc. the bones in edit mode with that bone selected. I'm not sure what else to check to troubleshoot why rotation also causes scaling, since it seems very counter-intuitive.

Link to blend: https://www.mediafire.com/file/y8vh8fvqh41rzva/upload_door.blend/file

I did not realize that if I opened up the object and looked at the modifier for the armature, I would have the option to preserve volume! It seems that is the setting I was looking for. I have an inkling that what was said in the answers here about the distance between the root and other bones might be the reason. Either way, once applied, my doorknob no longer shrinks.


Active object falls only through parts of the other active object i have these red cylinders that should slide into these slots. It works great in the middle of the object with the slots. But at both ends the red cylinders keep falling through the slots and land on the surface of the object underneath. I added some pics.
Maybe someone can help me out. Thank you.

I think you may have edited the object after applying the RB, delete the the current RB sim and reapply with collision type as mesh.

edit:i think I know the problem your object does not move, normally rbs are added to moving objects by default, yours doesn't, causing some problems, i tried recreating the scene and ended up with messing in the sensitivity panel and the dynamics parts, what you want to do is try adding a small amount of sensitivity, and disable the dynamics in it, reply if this worked.


Strange shader/material on all my cubes I created in blender 2.8 Sorry if this is trivial but I can't figure out what this is and how I can disable it.
I have this strange shader/material (don't know which exactly it is) artifact on all my objects:

You see the outlines of the object and in the middle, it changes from a light gray to a dark gray. What is this? I tried deleting all materials on these objects but it's still there.

I have no lights and no camera.
It's there both in solid mode and in LookDev mode.

Please tell me if you need any more info. I genuinely don't know what this is and what info you need to help me

Thanks!

Update:
I made a brand new material and just changed the color to green and it's still there. This is what it looks like:

Update 2:
Here's the project file:

Unfortunately you cropped the screenshot too tight so we can't see the shading settings on top of the screen.

That shading you see is just to help you see objects better in the 3D viewport, specially in solid mode, where you don't have materials to help you and it would be hard to distinguish shapes otherwise.

You have some control on how things are presented on the screen by clicking on the controls for shading. For solid view you can choose from several presets Flat, Studio or Matcap.
Among the setting and you can also choose to rotate the light source. In matcaps you can see the object with different textures.

For DevLook,is the same, you can visualize your object under different environments, or the actual light from the scene.

Note that this is not necessarily faithful representations of materials or lighting. Depending on your choice of shading for the viewer you might see a material that has nothing to do with the actual materials, but will help you visualize your object. will render or how the lights on the scnene are working. The light on final render will depend on the light sources and the environment. To make an assessment of the real materials and the actual lights of the scene use Rendered view.


What is lighting my scene? Ok I stumped myself (maybe I need more coffee).

What the heck is lighting my scene!?!?

I have no lights and I turned the HDRI to 0. I also unplugged it.

This is layer one in rendered view with an earth that is completely black (because there are no lights, perfect!).

This is the layer below in rendered view showing the material, and its lite just fine. This is bad, not what I want.

Here is the outliner, no lights.

What am I forgetting?

The only other "light" source in blender is the Ambient Occlusion. Its not real light but purely a rendering trick that tends to look nice because generally in real-world surfaces that are close together (like small cracks) will be darker than surfaces that do not have anything in front of them, because of shadows, dirt, etc.

You can disable it in the World Properties under the tab Ambient Occlusion.


Bake matcap from material This is all my data I used to make a material like MatCap , any way to bake and export material as MatCap ?

like this MatCap that I exported from Zbrush even I don't know how to use it in blender :)

Matcap is about giving color information relatively to the normal of the faces.
It is spherical to encode all the possible normal orientations smoothly.
So, if you render your material onto a sphere plus a plane that cuts the sphere at its middle, you can obtain the desired image texture.

To render a square texture, change the settings is the output properties:

The camera is placed on top, on the middle, and its focus length is adjusted so that the sphere fits the view:

I've placed all the shader nodes in a group.
For the sphere (the node group contains your shader settings):

In order to reuse it for the plane with a tangent input as we want the plane part to continue smoothly from the sphere at 90° angle:

Once all this is done, you can simply render F12 the image and save it.
To reuse it in Blender, you can setup a node tree as indicated here for instance.
You may also want to add it in your preferences to use it in viewport rendering:

Result: