Switching render engine in a script without using .context.scene All the suggestions on switching or setting a render engine that I have found here and elsewhere involve using bpy.context.scene.etc except for this one, which doesn't provide a solution to the problem that the API is now designed to throw an error if your script uses that approach.

For example, I have an __init__.py acting as a panel: it imports the script that actually does the work. The package (3 files: __init__.py, test_Shaders.py and figure_Def.py) installs fine. When I try to initialise this, Blender Python throws an error:

  Traceback (most recent call last):
    File "/home/robyn/blender276/2.76/scripts/modules/addon_utils.py", line 324, in enable
      mod = __import__(module_name)
    File "/home/robyn/.config/blender/2.76/scripts/addons/make_Shaders/__init__.py", line 42, in
      from . import test_Shaders
    File "/home/robyn/.config/blender/2.76/scripts/addons/make_Shaders/test_Shaders.py", line 68, in
      for scene in bpy.data.scenes:
  AttributeError: '_RestrictData' object has no attribute 'scenes'

The offending code looks like this - this is the __init__.py:

# GPL LICENCE BLOCK
bl_info = {
    "name": "Shaders-Poser Figures",
    "author": "Robyn Hahn",
    "version": (0, 3, 5),
    "blender": (2, 76, 0),
    "category": "Pynode"}

# allows the [F8] to reload changed scripts, seems that it's within this 'if' statement that the add-on activation fails
if "bpy" in locals():
    import imp
    imp.reload(test_Shaders)
    print("Reloaded test_Shaders.py")
else:
    from . import test_Shaders
    print("Imported test_Shaders.py")

import sys
import os
import bpy

class MatShaderPanel(bpy.types.Panel):
    """Create shaders for your Poser figure: Panel"""
    bl_label = "Figure Files Util"
    bl_idname = "MATERIALS_PT_shaders"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.label(text='Figure Name')
        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        row = layout.row()
        row.prop(obj, "name")
        row = layout.row()
        row.prop(context.scene, 'conf_path')
        row = layout.row()
        row.operator("object.run_script", text = 'Apply Shaders')

class runScript(bpy.types.Operator):
    """Runs the script"""
    bl_idname = "object.run_script"
    bl_label = "Invokes Shader Script"
    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        filename = 'test_Shaders.py'
        exec(compile(open(filename).read(), filename, 'exec'))
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.conf_path = bpy.props.StringProperty \
      (
      name = "Images Path",
      default = "",
      description = "Define the path to your images",
      subtype = 'DIR_PATH'
      )

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

if __name__ == "__main__":
    register()

and test_Shader.py:

import sys
import os
import bpy
tPath = os.path.dirname(__file__)
sys.path.append(tPath)
from figure_Defs import *
"""
Will need to change this to not-hard-coded path.
"""
tPath = '/home/robyn/Documents/Blender/Projects/AllTextures/AllSkin/PS_Syri/'
sys.path.append(tPath)
from imageList import *

#print(tPath)

# sets renderer to Cycles - here's where the error happens
for scene in bpy.data.scenes:
    scene.render.engine = 'CYCLES'

Are there alternative methods to bpy.context.scene?

Update:

I was actually reading that very page you suggested while you were suggesting it, batFINGER - and thank you for validating my suspicions - and used the sample code they offered as a sort of template. Lo and behold: it loads. There is still a long way to go to make it a workable script, but I can see the validity of isolating context-specific behaviour and keeping it from the general code base that doesn't know what context it is going to wake up in (so to speak). So, for the curious:

import sys
import os
import bpy
from bpy.types import Operator
from bpy.props import IntProperty, StringProperty

class MatShaderPanel(bpy.types.Panel):
    """Create shaders for your Poser figure: Panel"""
    bl_label = "Figure Files Util"
    bl_idname = "MATERIALS_PT_shaders"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.label(text='Figure Name')
        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        row = layout.row()
        row.prop(obj, "name")
        row = layout.row()
        row.prop(context.scene, 'conf_path')
        row = layout.row()
        row.operator("object.run_script", text='Apply Shaders')

class runScript(bpy.types.Operator):
    """Will run script"""
    # was bl_idname = "object.run_script" - is now:
    bl_idname = "object.run_script"
    bl_label = "Invokes Shader Script"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        filename = 'test_Shaders.py'
        exec(compile(open(filename).read(), filename, 'exec'))

        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.conf_path = bpy.props.StringProperty( \
      name="Images Path",
      default="",
      description="Defines the path to your images",
      subtype='DIR_PATH')
    bpy.types.Scene.conf_figure = bpy.props.StringProperty( \
      name="Figure Type",
      default="",
      description="Defines the base mesh name of your figure")

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

if __name__ == "__main__":
    register()

Not finished yet, but at least I have this question sorted.


How to fill gap in mesh? Creating a bridge loop no longer works.

Based on the fact that the hole is not open inside (comment), it means there are faces connecting the front and back of the hole, you need to delete the faces on the 3 sides of the hole, then in "Edge Mode" select the back side 3 edges and press F and repeat the same with the 3 edges in the front.

Here visual explanation:


Can I control an object using a driver with multiple inputs? I'm trying to set up a facial rig, and I want to control each eyelid with a control object, or both using a slider.

I have set up a simplified example where a slider moves both eyelids together. How do I set it up so I can also move the controls to move each eyelid?

I'm thinking that it should use the maximum input of either the eye controls or the slider. I also experimented with custom values, but didn't quite get it.

In my actual project it uses shape keys to close the eye lids, but the principle should be the same as this example.

Here's the blend file:

And here's what the example looks like:

I got it working like I wanted to:

Upper eyelid

Just add both values (slider and ctrl_up) as variables and use Type: Minimum Value, since they are going from positive to negative and we want the smallest one.

Lower eyelid

Just add both values (slider and ctrl_down) but use Type: Scripted expression, and invert var2, so when it moves up, it still gives a negative number.

Here's the final blend:

Hope this helps someone with understanding drivers!


Can't merge vertices or create faces with edges I am trying to connect a bunch of duplicated and slightly modified shapes together, but merging or create face between lines does nothing. Any suggestions?

You have to join the meshes together first. Select an object, and then shift select all the other objects you want joined, and right click and press Join.
If you encounter another circumstance like this and they are joined, do what Christopher said and use the Knife tool.


How to make web games with Blender? I'd like to make games within Blender, and then have them run inside a web browser, ie. have the Javascript code somehow be "made" or "exported".
I'm especially curious to know whether this will be possible with the new "Eevee" thing in 2.8? can I simply play the game inside Blender, and, subsequently, on the web? I have zero experience with Blender so far, but I'd love to learn, IF it is possible.

If it is not possible within Blender alone, can I use Unreal Engine in conjunction with it to achieve the above? And - is it humanly possible to learn BOTH together?

While still in development Armory looks to be a promising solution. It has multiple export options including HTML5.

It is open source and maintains a GitHub repository here.

Here is an example of an HTML5 game.

EDIT

The best way to get Armory is through Armory's Patreon page.
Building from GitHub is a difficult if not impossible task at the moment.


How can I place the rollers of a corner roller conveyor evenly? I manually copied each roller by hand and rotated/translated into place but it is not exact. How can I automate this?

Doing it by hand can be very precise and actually one of the faster ways.

First figure out how many rollers you need, then divide 90 by that number and you have the amount of degrees between each roller. For this example, I use 9 additional rollers, making it an even 10 degrees.

Then place the 3D-Cursor in the center of your curve and set the pivot point in the header to 3D-cursor.

Select your roller, duplicate it with SHIFTD and then without even confirming that hit R10RETURN.

That way, Blender considers duplication and rotation as a single action, not two.

You can now use the repeat hotkey SHIFTR to create lots of rollers and they will be rotated evenly around the cursor. No manual translation needed anymore.

If they don't have to turn, you could use an array modifier with object origin or dupliframes, spin tool or similar, but this solution is the fastest that I know and leaves the rollers as separate objects, ready for animation.

Sometimes it might be useful to put the object center of the rollers into the center of the curve using set origin in the tools area. But you should be fine with the method mentioned above.

You can use ALTD to create linked copies instead of SHIFTD if you want to save a bit of memory and filesize. All rollers will then use the same mesh.


How does blender really save a blendfile? While working on a blendfile that is approximately 1GB and consists of many different objects, groups, materials, particle systems, etc.
When saving your file, does blender overwrite the entire 1GB blendfile or does it simply add, change or subtract certain data to the repository?

According to the Blender wiki provided by lemon:

Saving and loading complex scenes in Blender is done within seconds. Blender achieves this by saving data in memory to disk without any transformations or translations. Blender only adds file-block-headers to this data.
A file-block-header contains clues on how to interpret the data. After the data, all internally Blender structures are stored. These structures act as blue-prints when Blender loads the file.

If I read this correctly, it means that blender just performs something like a memory dump and writes that to a file and just adds some meta data to it. This is a quick way to write big chunks of data to the harddrive, but makes for a though job when re-loading the .blend file.
This is because during load you must check for changes in platform, blender version,... as described in the wiki article as well.
All in all I think the answer to you question is yes: Blender does indeed write the full 1GB file to your harddrive. It is a lot faster than writing (for instance) a 1GB Word document because blender just 'dumps' the data rather than exporting it in a document format that is fairly easy to interpret on reload.


How can I make a cylindrical outline to a mesh (2.9) I am modeling a cello in blender 2.9, and I have finished modeling the basic shape of the cello (see image below)

However, to make it more realistic I would like to add a slight 3d outline to the mesh like on a real cello.  (example seen below)

As shown in the example above I would like my cello to have a sort of cylindrical outline around the whole side of the mesh.  I know I could just make a cylinder and start extruding it along the edges, but that would be tiresome and take forever.  Does anyone know of a faster way to go about this?  Any help will be appreciated! :)  (PS, I will leave my file below for anyone who needs it)

One way of doing this would be to start with your base shape (this is an obviously simplified version):

Use insets and/or edge loops to give a "seam" to your edges.

Select the "seam edges", right-click and select "Extrude Faces Along Normals" and drag the mouse to bring out the edges to your desired depth. You may also want to check "offset even" in the operator panel in the bottom left corner.

Once you have the desired width/depth to your "Seams", add a Subdivision Surface Modifier to round them out. Don't forget to shade smooth.


Why are the objects in my hair particle system not sitting on top of the ground? I made a hair particle system and set the Dupli Group to a group of 3 objects. Each of the 3 objects has:

it's origin set to be touching the XY plane (on layer 2)
it's Scale applied to 1 and it's Rotation applied to 0

I am trying to get each of the objects to sit directly on top of the ground, but instead, they are centered in the plane, half above the plane and half below the plane:

What am I doing wrong? Here is my blend file.

This is because hair particles use the global +X axis as "up" for orienting the particle.

If you rotate your objects 90° on the Y axis so that the direction you want to be facing up is instead facing global +X, you get the following result:

It isn't necessary to apply the rotation, since you have Rotation enabled in Particle Settings > Render.

Note that if you don't have Rotation enabled, for some reason the "up" direction becomes global +Y, and you will need to apply rotation for changes to take effect.


Cannot locate the "Multi Resolution" tab I'm reading a relatively old book on Blender (The Essential Blender), which covers version 2.44 of the software.

Though I'm using version 2.72 of the software, I've been able to work my way around most changes since the version referenced by the book. However, in the chapter I'm currently covering (Sculpting and Multiresolution Modeling), I've seemed to have hit a bit of a road block. Here's what a quote from the book:

"Let's make the cube "multiresolution". RMB to select the cube and press "Add Multires" in the Multires Panel of the Edit Buttons (F9)."

Maybe I'm blind, but I can't seem to find this 'Multires" tab anywhere.

In version 2.72, where is the tab located?

What you want is the Multiresoultion modifier. It is in the Modifiers tab under the Generate category.


point light strength in cycles renderer I am trying to understand the exact lighting computation going on in cycles renderer. I've set up a test scene as follows:

Cube whose corners are at [-1, -1, -1] and [1, 1, 1]
Its material is set to [1, 1, 1] diffuse and [0, 0, 0] specular
Lamp at [0, -3, 0] with no distance attenuation (light falloff set to constant)
Lamp's strength is set to 10 with 0 as smooth value
Camera at [0, -5, 0]
Background light set to [0, 0, 0]

I've also disabled sRGB output (display device is set to None instead of sRGB). The exposure value is set to 0.

With these I am getting an image with cube's pixel value 65 at its very center (the region that receives light parallel to the surface normal). What can be the explanation of this?

I would expect something like 10 / (4 * pi). The reason of division by 4 * pi is that cycles defines point lights using power (in Watts). I also tried rendering in EXR format and it still doesn't produce the expected value.

Ok, I believe I solved the issue. Although my material's diffuse reflection was set to [1, 1, 1], for physically correct rendering the actual diffuse reflection must be divided by $\pi$. In other words, an energy conserving diffuse BRDF is defined as $f(w_i, w_o) = \frac{k_d}{\pi}$, where $k_d$ is the diffuse reflectance (note that my specular reflectance was zero so we are not concerned about the specular part).

This means that if light fall off is disabled, the actual radiance that gets reflected off the face of the cube is $\frac{10}{4\pi^2}$ (with physically correct quadratic fall off this would be $\frac{10}{4\pi^2d^2}$ where $d$ is the distance).

So in my case, this value turns about to be $0.253$ and that is what I see as pixel value in the center of the cube's face if I save the rendered image in EXR format.

As for the PNG format, cycles appears to simply multiply this number with $255$, the maximum storable value in 8-bits. This corresponds to $64$. This happens because I had disabled gamma correction. Otherwise, cycles would have gamma corrected the value before multiplying it with $255$. This produces a value of $138$ and I confirmed that by experimentation.


Attach the points of one path to the location of another path Basically, I want to model a ship hull, but rather than modeling it by hand, I would like to use paths. One way to do that would be to create two sets of paths, where the points of the one set (which would be the ribs) are constrained in two axes by the second set (would run the length of the ship).

If there are other ways to parametrically model a hull (as opposed to using brushes), those answers are welcome as well.

Not natively no, as far as I know. That sounds like the realm of NURBS based modelling, which is a stranger in Blender lands.

Maybe you should look into ACIS solid based modelling software, or NURBS surfaces modelling tools instead.

Otherwise if you want to stick with Blender maybe look into parametric modelling addons like Animation Nodes, or Sverchok which allow parametric modelling with a node based workflow.

If you want something simpler BSurfaces may also be worth a shot. It allows creating surfaces between bounding curve objects, like lofting, tabbed surfaces or ruled surfaces.


2.92, Simple Boolean, Won't Work... Why? I am no stranger to booles, but this one won't work and it is driving me crazy. What am I missing here?
Project file here.

1.) select channel

2.) Tab -> change to edit mode
3.) A -> select all
4.) mesh -> normals -> recalculate outside

5.) select all vertices at the end of your channel and press 'f' to create a closing face (make sure you are in "vertex select" mode

6.) tab -> object mode
7.) change to "display as" -> bounds
8.) result


Compute device list not showing card name when using OpenCL I have an AMD Radeon R7 M265, and when I force OPENCL with the batch file it only shows Iceland, Intel HD and the CPU.

I followed this instructions:

R, type CMD, press ⏎ Enter, go to your blender folder. ex:

cd C:\Program Files\Blender Foundation\Blender

Press ⏎ Enter and then type: set CYCLES_OPENCL_TEST=all
Start Blender with blender.exe
Inside blender go to File -> User preferences -> System
Under compute device select OpenCL and then your card
Close the preferences and go to the render panel and select
device: GPU Compute.

I have the latest beta driver from AMD, but when I try to change the compute device it only shows this list:

Am I doing something wrong? Is my GPU is not supported? Or is it because it's in development and not every card is supported yet?

I've tried blender v2.74.5, v2.62, and v2.63. Every one gives the same list.

AMD GPUs appear in blender by the codename of the GPU

Iceland is the name of the processor inside your AMD card. Apparently they name
their cards with the names of volcanic islands for that series of cards...

Choose that one and good luck.

AMD cards have a long list of problems with cycles. Some of the limitations for OpenCL rendering are listed on the blender manual: https://docs.blender.org/manual/en/dev/render/cycles/features.html

As an alternative, you might want to try other render engines, as detailed on this link: Alternative Render engines can I use instead of Cycles for AMD Radeon GPUs?


Using UVWarp modifier to position part of an image on an object I have been attempting to use the uvwarp modifier to position parts of an image on an object. More specifically, the image is a subdivided plane composed of a number of mouths (to choose from) with which I would like to be able to use a bone to move from one mouth to another. The chosen mouth will then be displayed on another plane (a display plane - which has a uvwarp modifier and has been edited in the uv editor to display one mouth at a time). However, when moving the bone along the image's subdivided grid, intending to choose a mouth, the snapping alignment and the mouth display do not stay consistent. For instance, if I move the bone an arbitrary snapping unit and then move it back to its original position, at a later point in time (whether in pose or object mode), the mouth that was originally position with the bone's original position has changed. Furthermore, if I move the bone anywhere else along the image's grid, the mouths, which should match the position of the bone, do not stay aligned to where the bone is positioned.

The file works fine when snapping is turned off. However, when snapping is turned on, these issues arise. Therefore, I have been trying to figure out why this is occurring because I need to have snapping enabled in order to position the mouth accurately for various keyframes.

This question appears to be similar to another question posted, but was not answered.
UVWarp modifier scales the UV image

Does anyone have any suggestions as how to fix this?

Thanks

Found out how to do it through this forum. https://blenderartists.org/t/uvwarp-not-mapping-correctly-with-lego-mouth-annimation/1118084/3 When imported the image into the file, I scaled it up and then set the scale back to 1. This caused the issue. However, when trying to fix it, I imported the image again and did not adjust the scale. Now it's working.


Accidentaly didnt set output for animation I accidentaly left default settings for my animation and hit render. After it rendered out I couldnt find the output image sequence. It said that they are outputed in /tmp/ but there is no images/videos in /tmp/ folder
I cant add it to video edditor because I dont know where the image strip is....

To render an animation, you need to click the 'Animation' button shown below. And to see the location of those renders click on the folder icon marked with red box in the below image. Once you click that icon, it will show you the exact path in the top portion of the screen.


Properties panel content gone Where did the stuff in properties panel go?

The Properties Panel in your screenshot is simply retracted. I marked the arrow that expands it. Some of its previous options can also be found in the Tool Tab, also marked.

On top of the Outliner, top right of your image, there is also a dropdown menu that contains some of what before was in the tool panel.


Why do my models have black fuzzy bits on them? I've been working on a hmmwv and it was going fine until this glitch randomly appeared on every object in the scene.

The 'Texture' of object mode/edit mode has black fuzzy bits in it and some of the mesh you can see through some of the mesh you can't but their is clearly a face their as when I go into face select mode I can highlight the ones I can see through. I've also tried to fix it by highlighting it and removing doubles but that doesn't seem to do anything.

I have a screenshot of what I mean:

It looks like "z-fighting" -- when you have multiple polys that are overlapping (normals facing the same direction) and very close to each other... and then your camera is far away, then the renderer has a hard time figuring out which pixels of which poly to draw first, and you end up with erratic drawing that ends up looking like that.

Are you layering polys that way?


Can the UV map be updated without unwrapping the mesh? I am modifying a pre-made armor mesh. The armor has some holes in it that I would really like gone. So I deleted the faces with the holes and replaced them with new faces. The problem is that the UV map does not add the new faces, so the new faces are not being textured with the rest of the armor. I know I can unwrap the new section, then patch the UV map manually, but I would prefer a more automatic way since it would probably look a bit better.

Here are the holes I don't want in the mesh.

Here is the mesh after I replaced the old faces, and used unwrap on the new ones.

I am pretty new to Blender and I am using an outdated version, but any advise would be greatly appreciated. Thank you.

First select the original UVs and pin using P shortcut and enable Live Unwrap

Then in the UV/Image Editor move one of the vertices of the new created faces and it should snap the faces in the right position.


Emission material problem Good day!

When I use Emission material on objects - reflections turns out very grainy in rendered results. This does not happen with lamps. What is the best solution to remove fireflies in a situation like this?

Here is an image rendered with 1000 samples and reflections still doesn't look good... I am making an animation, so I can't render with 10000 (but it looks good with that many) samples because it will take ages..

Try using Branched Path Tracing instead of the default Path Tracing Sampling settings. This allows more control of the different light paths and how much effort is spent rendering each. This allows you to increase the samples for Mesh Lights (which should reduce the graininess) independently of the other paths.


How to draw mesh Schwartz Primitive Topology Can you help me how can draw these geometries with add mesh Math Function (XYZ Math Surface) for this equation : (cos(x) + cos(y) + cos(z) = t)

I can't help with mesh creation but you may like to use volume shader for visualisation.
Notice that the cube has a size of 10 units, and a scale of 1.
Cycles will give more precise results but you can use EEVEE too.
In cycles (orthographic view):

In EEVEE  (perspective view):

I used an emission shader but you can use simple volume shader with some external light.


Texture only one side of face So I have a vase which I have textured.

But as you can see, both the outside and the inside have the same texture, however, what I want is the outside to have the flower pattern, and the inside to have a solid color. Is there any way to do that?

PS: I am making this model for a game, not for render.

In 3D view, Tab into Edit Mode. Set your selection mode to face select (mode toggle is in the upper left hand corner of the 3D viewport). Select the inside faces of the vase. Press P to separate then select Separate by Selection from the pop-up menu. It should be the default option. If so you can just left click after pressing P. Tab into Object Mode, select the separated inner surfaces and apply a new material to them.


Viewing background through alpha channel of foreground object I have set up two planes, one in front of another, and I want to see the back plane through the alpha channel of the front plane.  In the node editor I use the render results as input to a key node so that the green screen is turned into alpha, but it appears that it's only transparent to the plane itself.  Have I reached the limits of Blender?!!  Is there a way to do this?  (see screen shot).

If you want the planes to be in 3D space, then you could try using a material like this on the plane with the green screen:

This mixes between a transparent shader and a emission shader based on the difference between the the second color input of the mix node and the pixels in the image. Pixels which are within a .07 tolerance of the green color in the mix node will be transparent, other pixels will be opaque.


How can I remove weight? I'm still learning on how to add weight just so i can animate but i add a LOT of weight on the head, and I don't know how to reset everything.

https://gyazo.com/29159ff8de844e05e033716da0793f1d

In weight paint mode, if you click on the ball with colored streaks, there will be a menu. Click on the farthest right icon. It is called 'Subtract', and will remove the weight. I don't know about a complete reset, but this should work. Here is an image:

Hope this helps.


How to render height map in Blender? I've seen several tutorials on how to use a displacement modifier and a texture to create a terrain from height map data, but I want to go the other way.  Given that I have used sculpt tools to hand draw a landscape on a mesh in Blender, is there a way to generate a height map from it?

I've tried setting up an orthographic camera, going into compositing and sending the depth channel to my output layer, but this results in a distorted image with the peaks being much too high:

Using the assumption that the depth buffer is calculated the same way OpenGL does it, I tried piping the calculation through a 1/n math node:

This fixed the distortion, but I'm finding it very hard to set up my network since I have no real idea how the 'depth' values are actually calculated.  I've used a bunch of math nodes to try and map the depth buffer onto height values, but I'm getting weird results that make me wonder how blender is actually calculating all of this.  For example, simply doubling the resolution of the output gives me this:

Why is it so light?  Shouldn't the Normalize node still transform the image to the full range of 0 to 1?
If anyone knows how to generate a height map, please let me know.

I don't know the method you're using, here is one that seems to work and that is close to the one explained here by CGMatter as linked by @NascentSpace:

Create the 3D object you want to bake, put an Orthographic camera over it, give your object the following node setup: Texture Coordinate (Generated Output) > Separate XYZ > ColorRamp (if you need to tweak the highest and lowest) > Emission > Material Output:

In the Render panel, choose a good Sampling resolution. In the Output panel choose OpenEXR as File Format, otherwise you'll have artifacts. Keep the other settings as they are and render the image.

Create a plane, subdivide it, give it a new material with an Image Texture (in Non-Color mode) that you plug into the Height of a Displacement node that you plug into the Material Output Displacement socket. Load the OpenEXR image in the Image Texture node. In the Material panel > Settings > Surface > Displacement, choose Displacement Only. It should work:


Unlink text from audio I'm really new to blender, I actually just started using it today. I'm usually pretty good at using software like this but I underestimated the difficulty of the tutorial I was trying to follow.

Anyways, I hit a problem towards the end of the tutorial and I think it was something to do with rooting light rays to the audio, and I think I linked my text to the audio instead of the light rays I made or something like that because my text seems to be locked and i cant add other keyframes on to it.

Basically what is happening is that the keyframes i made on the text disappeared and now instead of moving with the keyframes my text spazzes/pulses randomly with the bass of the music.

Something i noticed is that the location and rotation positions for the text are already keyed (in green on the right in the screenshot). I want to get rid of this.

Here's the screenshot

Thanks to anyone who might help me out here
-Tom

If you baked a sound file to the text location an rotation channels, then try deleting the affected animation channels in the graph editor. Then you should be able to insert keyframes again.


My object is missing when i turn on alpha I have my camera set up to render my object with a transparent background in PNG format. But when i enable transparency, I get nothing rendered other than an empty PNG.

These are my settings for blender render shown in the image attached (may need to open image in another tab to see it larger):

Also as a side note, is there such an option in cycles render, as I could never find the option to render with transparent background so had to resort to blender render.

According to your file, the problem is you are trying to use Cycles material node as BI material node, which cannot happen.

Solution:

Switch the Render engine from Blender Render to Cycles;
If you want to render it in Blender Render (BI), you have to either toggle off the Use Node button, or create a new material node readable for BI.

I assume the first one is your better option, since it seems you sort of mis-switched the engine at some point (or the material node is appended from anywhere else).


How do I extrude a vertex group in Python, the same way that the 'E' shortcut does it Been smashing my head against this all day. When I select a vertex group and press E on the keyboard, I am able to extrude the selection to a locked axis/direction that is in line with the geometry.
How can I do this in Python?
I made a quick video: https://www.youtube.com/watch?v=f5fW5Ug2ZPU&feature=youtu.be

A simple way to reproduce operations in python is by using the the info editor.
In this case i first executed the "extrude-region" in edit mode and copied the info log to my python script.


Removing an area from a cuboid shape I'm trying to model a Bar top and it has an indentation on its underside, I have tried to set loop-cuts and extrude all relevant pieces but it keeps coming out less than stellar. What are some faster ways to remove an area from a shape in blender?

Looking at the dark silvery colour under the countertop

As you can see below, I tried using loop cuts but it hasn't lead to any success for me.

⎈ CtrlR  to add a loop cut.
G, G to edge slide.
G to move/grab.
G, Y to move along global Y axis.
⎇ Alt RMB to select an edge loop.
E to extrude.
⎈ Ctrl↹ Tab to switch the selection context.
B MMB to box deselect.

Double Geometry  (not that good)

Add two loop cuts. Edge Slide the lower loop cuts upwards. Deselect the back vertices and select the lower ones. Move them back along Y.

N-Gon  (not that good)

Delete the side faces, add two loopcuts and move the vertices together. Move the lower face along Y. Make the missing face F.

Extrusion

Add one loop cut. Select the upper face. Extrude the upper face.
Multiple meshes

Duplicate the geometry, move and scale it accordingly.

  Now, although you probably had #3 in mind, I'd advise you to think about the benefits of #4. In the real world, these object would be two separate pieces as well, with separate materials.


How can I generate an UV-coating effect i try to get an effect on an image texture in blender like an UV-coating.

Example could be:
https://i.shgcdn.com/1d8071fc-58f9-4ed8-b1f6-4e6febb330d9/-/format/auto/-/stretch/off/-/resize/3000x/-/quality/lighter/
or
http://fourprint.pl/wp-content/uploads/2018/02/Spot-UV-Logo-MocUp-full1.jpg

I used image texture node and put it into an glossy and diffuse node. As the fac i used Frensel node but I was not able to manage to get the effect of the reflection.

I am using cycles render only.

Should be easy, but I am not able to manage it.

Thanks a million.

You will have to play with the settings to get the exact look you want, but the base of this material is a noise texture that controls the roughness and the displacement of the material (technically the roughness should be consistent, but it gives it more contrast IMO)


Make particles slip around objects in Animation Nodes I would like to create a particle animation that shows a particles flowing and slipping around objects instead of penetrating them. The effect I want to achieve is shown in this gif by Étienne Jacob:

I will divide the answer into two parts being:

Implementing a simple particle system in Animation Nodes that is adaptable to achieve all the effects we want.
Adapt the particle system to avoid and slip around the sphere as shown in the gif posted.

Particle System

The advantages of giving up on blender's particle system and using Animation Nodes instead are numerous. It is intuitive, easy to use and flexible. However, one of the main issues with implementing such system is losing render engine support, both Cycles and BI have options specific just for rendering particles and we won't have such options if we don't use blender's particle system.

A particle system is an iterative implicit discretized system, meaning we can't evaluate the particles locations at anytime we want, to compute the particles location at a certain frame, we have to know their locations in the previous frame. Subsequently, if we want to get the particles locations at some frame, we have to compute the particle locations at all of the frames before it; because you have to know the previous frame and to know the previous, you have to know its previous and so on.

A particle system has an initial condition, which is the state the system was at the beginning of the time, in our case, the initial condition is the particle locations at the beginning of the time. At the next frame, the particles are moved in a certain direction based on some factor that is either: their location, index or simply a random arbitrary movement. At the frame after that, the particles are also moved based on the new locations computed at previous frame and so on.

Practically, in Animation Nodes, to implement such iterative system, you would need to store the new locations of the particle somewhere where you can access them in the next execution. For instance, lets say we have a particle that has some initial position, we will store that position in memory, at the next execution (frame) we use the stored position to compute the new one, then replace the old positions in memory with it, at next execution, we compute the new position based on that in memory and replace the old one with it and so on.

Currently, there is no way to pass data across executions, however, there are ways around it that are easily implemented, the way we will be using is described in my answer here. Make sure to read this answer carefully before continuing.

The first step is to create the initial condition of the system. In our case, it will be a grid of random vectors included in the xy plane, I will generate random vectors such that they belong to the visible part of the xy plane, there will be a good portion of the point lying outside of the view, but since our implementation won't be expensive we can safely ignore them:

And then I am going to use that as the initial condition for our particle system. I will define the velocity vector field as a constant vector going to the positive y direction. By adding the vector field to the particles, we observe them as they start to move:

Notice that the first expression node has the expression:

initial if bpy.data.scenes[0].frame_current == 1 else animation_nodes.particles

Which basically says, if this is frame one, return the input "initial", if not, return whatever is stored at animation_nodes.particles. The data is stored using the second expression node using the expression:

setattr(animation_nodes, "particles", data)

So, at the first frame, the current particles are viewed (Initial) and the particle locations of the next frame (second frame) is computed and stored in animation_nodes.particles, at the second frame, the particles that are stored at animation_nodes.particles are viewed (The ones we computed before) and the particle locations for the next frame (third frame) are computed, and stored in animation_nodes.particles (Replaces the old data) and so on.

We notice that the particles will keep moving to infinity leaving empty space behind, so, what I am going to do is reset their $y$ location after they exceed their maximum location (Maximum value of the random y value), the reset is easily done using a modulo operator:

We notice that in the gif, the grid is not strictly uniform in its randomness, in other words, there are certain areas that are low in density and others that are high in density, and we can see that the density is almost constant along the y axis. A possible way to achieve such areas of rarefactions is by moving the particles by an amount equal to a smooth low frequency perlin noise, though I believe moving based on the magnitude of its gradient might return better results, but I shall not cover this. Number Wiggle Node can be used to get the values of the perlin noise where the evolution parameter is the x location of the particles, that is, the x random value:

We can add another offset based on a y location based perlin noise creating some nice randomness as the particles move in the y direction:

Now that there is noise involved in computing the initial condition, we should probably cache the result (The initial condition will only be used at frame 1 and it doesn't really change, so we can safely cache it), caching will reduce the execution time from 40ms to just 2ms:

I think this conclude our work on the main part of the particle system, we may come back later to adjust some settings, but for now, we will move on to the second part of the answer, which is adapting this system to avoid obstacles like the sphere we placed in there.

Boundary Conditions

Currently, the particles have no regards to each other or to objects in the scene (Like the sphere we put in there, they are penetrating it like it is not there). So what exactly tells the particles where to move or how to behave? It is of course the velocity field which we defined as constant vector going in the positive $y$ direction. A vector field associates a vector with each point in space, in our case, that vector represents the velocity of the particle, that is, the direction it should move in. And as we said before, the field so far is constant for all points in space. If we want to make the particles avoid the sphere, we have to edit that field such that the particles slip instead of penetrate the sphere.

Now, I want you to open a new blend file to try somethings out. If we want to visualize the velocity field we have, we can create splines from edges that points in the direction of the velocity as follows:

We notice that they all point in the positive $y$ direction and that is indeed that's what our field is doing, that is, move the particle in that direction. We could edit the velocity field such that it points away from the origin simply by normalizing the particle locations:

We could rotate the velocities by 90 degrees obtaining this radial field that will rotate the particles around the origin like a tornado:

Now, I could mix between my original constant vector field and this vector field we just created using a linear combination where the distance from the surface of the sphere is the coefficient:

The vector distance node computes the distance between the particles and the origin, the subtract node is used to compute the distance between the particles and the nearest surface point of the sphere (Check my answer here to see why this work). The rest is the linear combination between both vector fields (Check my answer here to see how this works for Eulers which you can easily translate to vectors). Now imagine some particles moving along this field from bottom to top, if the particle is at the left side of the sphere, it will start moving upward and at some point start moving along the surface of the sphere tangentially as if it was slipping, isn't that exactly what we want?! As for the right side of the sphere, it is a bit of a mess and rather incomprehensible, but since we already have a working left side, lets mirror it. Mirroring can be done by inverting the vectors on the right side of the sphere, in other words, multiplying them by negative one. To get a scalar field with negative one on the right side and one on the other side, we copy the sign to one from the inverse of the $x$ location:

And we can start to see that this is actually the path of the particles, but we are not quite done yet. We will do a spline visualization for the paths of the particle so that we can tune the field even more intuitively. A loop is created to move the particles along the field, append their locations to a list, reassign the particles locations to the new locations and so on some number of times. Then another loop is created to create splines from the appended points and the splines are output:

It is not crucial that you understand this and I know it is not easy to understand, so I shall not explain it further, if you want to know why it works, I will provide more details. Let us now see how the particles move in the current field:

We can see that it is close to how the particles in the reference gif behave around the object, however, there still some work that need to done. The area at which the particles start moving tangentially is rather large, the particles--in the reference gif-- starts to move tangentially when they get pretty close to the surface, so we should reduce it. Reduction can be done by changing the rate at which the distance changes, in other words, multiplying the distance by some scalar:

Now I think it matches the vector field used in the reference gif. So lets go ahead and implement that in our original blend file! The only difference is that we are going to subtract the location of the sphere from the particles locations because in our study, we assumed it was at the center.

One thing we need to take care of is to make sure no particle were inside the sphere in the initial condition, this is easily done by some simple distance based masking:

And finally, we can see in the reference gif that the particles don't move tangentially after they pass the sphere along the $y$ axis, so I am just going to make sure all points with a positive $y$ have a zero coefficient in our linear combination, that is, they have the value of the original constant vector field. To avoid using loops or overly complicated node trees, I am going to use this simple list comprehension:

[factor if Y < 0 else 1 for y,factor in zip(Ys, factors)]

Had we had a vectorized compare and switch nodes, we could have just used them. This produces:

Which when applied on our node tree produces:

We now need to fill the spaces that are left in front of the sphere which appears to be appearing from inside the sphere itself. We will do this by implementing a secondary particle system for this. The secondary is quite trivial to make, if you understood how our main particle system work, then you can do the secondary one on your own. This secondary particle system concludes our work producing a final result:

If rendered with motion blur, it will look something like this:

All you have to do now is tune in the settings to achieved the exact result of the reference gif.

Blend file:


Creating Millions Of Particles With Spheres I have a scene where I need to put in millions of particles. I want to represent each particle with a primitive, for example, a meta-ball object. All the particles can share the same primitive. The locations of the particles are from somewhere else, therefore I need to import them and create the particles inside blender with python scripts.
Currently, I'm testing the following scripts:
 for i in range(0, 100):
    for j in range(0, 100):
        bpy.ops.object.metaball_add(type='BALL', radius=0.1, enter_editmode=False, align='WORLD', location=(i*0.1, j*0.1, 0), scale=(1, 1, 1))

I input the code via the console, but this seems inefficient and freezes blender. Is there a way to create many copies of the same object more efficiently?
I also found the array modifier. The array modifier seems to be able to handle a very large number of objects without a problem. However, I'm not sure how to input arbitrary displacements for each individual copy. As in my case, each particle has its own displacement.

I found a workaround, following this post:
https://devtalk.blender.org/t/manipulating-particles-in-python/7552
I'm able to manipulate the positions of a particle system. So I created a particle system and then write in the positions. Then, I set the instance object of the particle system to be the primitive I want. I found a Nurbs sphere could work for me. In this way, I'm able to render 1 million particles with no problem.


Why are my mesh edits reverted? I've received a model from someone else. Any changes I make to the mesh in Edit Mode seem to be undone when I return to Object Mode.

On the left is the mesh in Edit Mode, on the right is the same mesh in Object Mode:

Try going through the following checklist:

Check to see if the problem might be caused by Modifiers.
Try turning off or deleting Shape Keys on the Object Data tab.
Clear out any Keyframes
Clear displacement and rotation of bones
Try removing the armature from the object


Glass Transparency Seems Dark I rendered this glass material, however, the transparency of the glass is  darker than what I was looking for.
I tried to increase the light bounce number but it didn't work.
How can I achieve glass material that looks like this?

EDIT
The engine is in Cycles,here's my blender file, base color is pure white but it still appears grainy.
file

In the Principled BSDF shader, the default Base Color is a very light gray. To make sure the surface absorbs no light, set the Base Color to pure white.
(If you are using the Glass BSDF shader, make sure its color is white as well)
I'm assuming you have a simple 1-node shader setup. If you have something more complex, it is possible that the other materials are affecting the transparency color as well. Make sure you aren't mixing the material with a darker material in a mix node or similar.
Also check that there is no volume absorption shader set on the material. This can cause it to appear darker as well.


Cloth particles: Seeking workflow I'm trying to make a stream of money (bills) flow into a toilet.

A metaphor for our times :/

I've created several low poly bills and grouped them for a particle system. I've created a particle system and have the bills streaming out. I can get the bills to collide with the toilet: some go in, some go out, that's fine. But the bills are stiff, do weird things when they collide with walls, and they all rotate/move from their object origin rather than collide with corners/edges of the bill. They stick in the floor upright from the origin: they rarely lie down :/

I don't know how to apply the cloth simulator to either the paper objects or the emitter.

File here: https://www.dropbox.com/s/sfr5pxfgn8uo681/toilet.7z?dl=0

With the cloth simulation, you want to select your dollar bill object and go to physics tab; it's in the Properties window under the Outliner by default, same window you go to for your particle systems. The icon is a bouncing ball. If you can't see it, over over the panel and scroll until it's in sight, or enlarge the window. Hit the cloth button. You're going to want to play around with the stiffness setting in particular. You don't want it to act like a dollar-printed hankie. Once you have setting to work with, you'll need to let it run it's simulation. You'll probably do this several times until you get something you like. After you're finally satisfied, bake all your dynamics.

Go back to your particle system; make sure you have gravity on. Mess with the weight values; your money could just be too light. Finally, apply the bill's orientation so that the origin is in the middle of the bill, and it lays flat on the floor by default. That part should help with the standing problem, at least.


Shadows distorted and enlarged upon rendering When I render the scene, the shadows of the fish have become distorted and enlarged. I have played around with the shadow settings on the meshes, materials, textures and environment but cannot fix the problem. Any help will be appreciated. Thanks.

It appears from your image that you have two lamps lighting the scene. The properly sized shadows from your sun lamp are visible, but you also apparently have a spot lamp near the surface of the water, and that is causing the enlarged shadows. Look in the Outliner panel to make sure you have this spot lamp disabled.


How come when I play rendered animations all of my old animations play too? Okay so I'm in a new project and I've animated a heartbeat, when I go to play that animation I see it, then after that all my other animations from old projects start player after it in the same window, why is this happening?

I cannot find an answer anywhere, it's really annoying!

Could it be that all your animations are frame sequence renders and that they have the same name and live in the same render folder? Blender will play any frame sequence that has a consistent sequence of numbers in the same folder.

To fix this behavior try creating new folders for each rendered sequence or at least different names each time you render.


Mesh deforms when parenting to the armature I was trying to make a character rig , I have done all the steps necessary except one , when I parented the armature to the mesh , the mesh went haywire.
This is an image before parenting :-

And this is an image after parenting:-

file -

9 out of 10 times, rigging problems are caused by problems in scaling.
make sure that figure feet are at world center and the armature fits in it.
Before you autorig, apply scale(and other transforms) to the mesh and
apply scale (and transforms) to the bone system


How to render a sky in game engine? I tried to follow this question.

How do I render a background image as a sky in blender 2.7x

I've also tried to follow a number of older tutorials and posts, but my shading panel doesn't contain an Alpha option as mentioned in that answer.

Also, under World I don't see a commonly referred to "Paper Sky", "Blend Sky", and "Real Sky" option, which causes me to lose context in most tutorials.

You can see below that I got the picture in, but it doesn't get rendered, and I can't find a tutorial or Q&A answer that seems to match the settings I see in Blender 2.78. So either things have changed or I've broken things beyond recognition (the later seems quite plausible). :)

Also, I'm rendering this in the game engine if that matters.

Add a 'Scene' actuator in 'Add Background Scene' mode and add a Scene to the background of the current scene. You have lots of options when doing this.

See the example file, where I mixed two scenes and (using Python) I copied the rotation of the 'game' scene camera to the 'skybox' scene camera. Try to read the script, see the logic bricks, explore the scenes and you will understand how this method is powerful, allowing you to make a dynamic skybox in a scene and simply adding it to the main game scene.

http://pasteall.org/blend/index.php?id=48431

Alternatively, make a skybox object and parent to a single vertex of your game character. The skybox will follow your character location, but not the rotation, which is good for a sky.


How to create a plane that follows the dimensions of an object? I'm trying to create a plane object, which perfectly follows the selected object in x-z dimensions and also on the positioning and the origin of the axes (pivot). I messed up and I don't understand where to look and what.
This script generates a plane of equal size, but does not rely on the inverse matrix.
So the obtained plan has the dimensions of the input object (in this case the monkey) The position z does not interest me.
I'd like to get the same position with the same x, y origin as the monkey
this is the function in part of the code:

import bpy,mathutils,bmesh
from bpy import context
from mathutils import Vector

def createPlane(context):

    obj = context.object
    size= obj.dimensions
    loc= obj.location

    verts = ((0,0,0),(size.x,0,0),(size.x,size.y,0),(0,size.y,0))

    bm = bmesh.new()
    for v in verts:
        bm.verts.new((v[0], v[1], v[2]))
    bm.faces.new(bm.verts)

    bm.normal_update()

    me = bpy.data.meshes.new("")
    bm.to_mesh(me)

    plane = bpy.data.objects.new("", me)
    bpy.context.scene.collection.objects.link(plane)

createPlane(context)

Instead of using the dimensions property, create your own bounding box.

Create a list of the vertex positions matmultiplied by the objects world matrix. This list will hold the coordinates of the vertices in world space.
Get the min and max of the x and y property of the coordinate list.

def createPlane(context):

    obj = context.object
    coordinates = [obj.matrix_world @ v.co for v in obj.data.vertices]

    x_list = [co.x for co in coordinates]
    y_list = [co.y for co in coordinates]

    x_min, x_max = min(x_list), max(x_list)
    y_min, y_max = min(y_list), max(y_list)

    verts = ((x_min, y_min, 0),(x_min, y_max, 0),
             (x_max, y_max, 0),(x_max, y_min,0))

    bm = bmesh.new()
    [bm.verts.new((v[0], v[1], v[2])) for v in verts]
    bm.faces.new(bm.verts)

    bm.normal_update()

    me = bpy.data.meshes.new("")
    bm.to_mesh(me)

    plane = bpy.data.objects.new("", me)
    bpy.context.scene.collection.objects.link(plane)


UV unwrap and get same coordinates How can i uv unwrap but keep x and y coordinates of my vertices the same?

The transform coordinates are referred to the world coordinates, expressed in Blender Units, while the UV coordinates are expressed in pixels, with 0,0 left bottom corner, and 256 x 256 as default (size changes according to a selected image in the UV/Image window), so it doesn't make sense try to match the two values. If you want to mantain the shape use a square texture and select "project from view" as UV Unwrap algorithm.

A workaround can be using your texture as reference, create a "cage" with the dimensions of the texture, then inset the face you need, choose Unwrap "project from view (bounds), then delete the faces you don't need.


How to fill the inside of the Flange I need advice how to fill the inside of this flange ,so the holes and ellipse to be empty.A step by step advice or a video will be helpful. Thank you.

I'll recommend you this:

Start with a flat geometry (in your case you can delete the extruded faces):

Notice that I only add one circle (You should lower the circle vertices number for ease of work).
In this particular case the two big figures (the big circle and the ellipse) have 32 vertices and the small one have 16 vertices.

Select 3 quarters of your geometry like this:

Erase the vertices

Then add a mirror modifier that affect the X and Y axis to get this result:

Now fill up the geometry the way you need it:

If you get this kind of effect, the darker faces (it may not happen) this is due to some normals that have been gone the wrong way, to fix this select your entire mesh by pressing A and then press Crtl + N to flip normals.

Now, get a better view angle.

Extrude on the Z axis, press e (extrude) and move your mouse until you get the desired results.

For more detailed mesh you can add two modifiers. First the Edge Modifier and then the Subsurf modifier. The order of the modifiers will impact in how your mesh looks.


How to model notched detail on a gun? I am modeling an MTAR familiar and I have to create certain part of the gun which is quite complex. I am not sure what would be the best way of doing it, I was thinking to do it with and Array modifier and then somehow join it, or maybe by adding a lot of loop cuts.

So I would like to know how one would Approach this task?

To do this I would first add some loop cuts along your object where you want the extrusions, one loop cut for each extrusion.  Then, with the loop cuts selected, bevel them with Ctrl+B.  You can then select the proper up-facing faces and extrude them to your liking.


How to wrap a spiral around an object? I'm trying to make a spiral wrap around a bent object. Or at least, bend the spiral itself to be placed and scaled accordingly.

The example here is of the tights, two seperate spirals mirrored and merged, wrapping around this characters leg.

Is it for a still or animate character? Here is a way to do it for a still character, I hope someone will give you a solution if you need to animate your character:

Model your character.
Create a bezier curve that loosely wraps around the shape of the leg. Put the bezier origin point on its bottom vertex, check its direction so that it goes up.
Give your bezier a Shrinkwrap modifier with the leg as Target, enable the fourth displaying option of the modifier (Apply this and all preceding deformation modifiers...).
Create a cylinder, subdivide it horizontally and put it on the origin point of the bezier.
Give it an Array and a Curve modifier, enable the Merge option of the Array, and choose the bezier as the Object of the Curve modifier. Play with the parameters so that it follows the bezier correctly. Give also your cylinder a Subdivision Surface modifier.
Play with the Offset of the bezier Shrinkwrap modifier to tighten the pipe along the leg.


Objects are transparent from certain angles So i've been editing a few models and at random times the model would become see through depending on the angle i was at. Both in Edit and Object mode.

If i go to Compositing it stops.

For example if i look head on at a character head i can see the inside o fthe back of the head, the front appears to be in wireframe mode.

Then if i rotate the camera to be at the back of the head, i can see the inside of the face.

I think i hit a shortcut but i'm not sure

Based on the description of your situation, you might have inverted the normal of your mesh object.

Go into mesh edit mode.  Select the entire head/or everything, go to mesh menu, select Normals option, select Recalculate Outside option.


Texture along the shape of the mesh I have been looking for a solution to this problem for a long time, and getting to this was my last alternative. I intend to correctly texture my mesh as the image below:

As you can see, it is an every day situation but I would like to know how to solve it in the best possible way without making an extensive mapping of the figure that forces me to make a larger UV texture image in every sense.

I tried many ways, but I did not get the desired effect. I think that my biggest problem in this situation is that English is not my native language, and therefore, I have difficulties to find the exact search title of my problem. (please consider this before mark my question as possible duplicate)

Thank you very much for your help.

You should use Follow Active Quads.  The problem you're seeing is because the geometry doesn't have a lot of detail so it's not giving you nice curves.  Add a Subdivision Surface modifier and you'll get better results:

You may need to tweak the UVs a bit still in a couple of spots but I think you'll get really close with this.


I dont know how to open the side bar I cant find the properties bar, or reopen the bar on the side, all i get is the Transformation bar. That didn't work, it just opened a double.

There is a ridged corner in the 3D window (top-right), move the mouse there and when you get the "cross" mouse icon just drag it to the left (it seems that you have already performed this step).

After that, you will have an editor type selector with a "cube" icon in the left bottom corner, click on that and, from the drop-down, choose the icon next to "properties".

Alternatively,
Just save your work as it is and go to File then Load factory settings, then open your file again, unchecking the "Load UI" checkbox in the File browser.


How do I correct my character falling through when cloth is enabled on his cape My character falls through the "stage" when I use cloth on his cape and pin it to the verices. How does one correct this issue? Forgot to add that my character and his cape are one piece

If they are one piece (or mesh) then your character becomes cloth as well, he is not pinned and will therefore fall. You probably dont have a collision modifier set up on the stage as well.

Separate the meshes, add a collision modifier to your stage and the character and parent the cape to your character. That should solve it.


Cutting leaves triangular edges Hello I have a problem when trying to cut object into 4 pieces. I an completly new to Blender. How can I make it smooth?

You just deleted some central vertices, however if you want to cut you actually need to generate new vertices at the cutting plane (so no delete is necessary). To do this you can either:

Copy the mesh four times and do four boolean operations with some cubes you add (see boolean modifier)... this might be the easiest option
Or: Use the knife bisect tool in edit mode (and set the exact cutting plane in the popup menu after using knife bisect). You can then use seperate (select and press P) the parts as seperate objects.


Spline from Object" in Animation Nodes? I'm trying to get this result (picture in this post). Anyway, I created a Bezier circle, but I can't find the "Spline from Object" node neither the "Combine Mesh Data". I guess I miss something but I can't see it.
Does someone could help me to get this ?
Thank you.

I think I've found. The menu is called "Get from object" in "curve" menu. This displays the "spline from object" node....
Anyway, the final result is not working for me. If someone can help me with a tuto, I could appreciate.
I edit:
The problem is fixed:

First, the "combine mesh data" node is "combine mesh" now.
Second, in the "Mesh Data Output"node, if you look for the "target" object, you'll not find it. You have to click on the "+" icon.
Last, in the "Mesh Data Output" node again, don't forget to click on the button that becomes blue in front of "MeshData". And it works.


Does decimate an object helps cycles rendering faster in blender? Does decimate an object helps cycles rendering faster in blender?

If we decimate the object and use smooth shading, will it render faster specially in those scenes where lightning matters the most?

Sure. Just like always in computer science: the more data you have, the longer it takes to calculate and the more memory it takes as well. However, it's not that much as you'd probably expect since the lighting needs to be calculated anyway.

Original Geometry vs. Decimated Geometry

Quick comparison of rendering a high-poly model (3.519.529 faces) and its  decimated version (35.224 faces ~1%) in a static scene using a simple backdrop and 3 area lights:

Render Time: 10:07.97 | Faces: 3.519.529  | Memory: 447.2 Mb

Render Time: 07:37.17 | Faces: 35.224 | Memory: 6.5 Mb


Slower Rendering in newest daily build 2.79.4 vs. 2.79 I've installed version 2.79.4 and it is a bit slower than 2.79. I render with GPU 980TI, and the same scene with the same settings (opened and rendered without any changes).

Older - 1000 samples, denoiser, 2K res - 3:45min
Newer - 1000 samples, denoiser, 2K res - 4:00min

Am i missing something? Or should i turn on or off something?
It's not a big deal, but 15sec is about 6% slower.
Just asking

Thank you in advance!!

With the amount of changes that happened between versions, I am not surprised at the performance difference.

Blender 2.79a also switched from CUDA 8 to CUDA 9, which Could be slightly slower on older generation hardware.


Step forward button in Blender (Redo)? When I pressed the undo button in object mode it somehow brought me waaaay back in my steps and I wanted to know if there was a shortcut to undo the undo? Or a step forward shortcut?

To Redo press Ctrl+⇧ Shift+Z.

You can also press Ctrl+Alt+Z to get a list of your undo history. Handy, if you've gone overboard with Undo.


Highlight specific edges of a shape I have a semi-cylinder and I'd like to highlight the arc on the front, made of lots of vertices and smoothed. How can I highlight this? Best would be some kind of coloured glow to represent the arc.
I tried using a wireframe modifier but it seems the wireframe requires an actual shape, not just a line of vertices.
I wasn't able to add a glow to just the vertices either.

You can select the vertices you want and duplicate them.  Right click to send them back to their original position.  Then press P and select Separate by selection.

Go back to object mode and select your new object.
If your selection has any faces, enter edit mode and delete only faces.

At this point you have a circle, or a loop, or maybe just a line of vertices.  You're now able to convert this to a curve from Object mode.

You can give this some bevel depth.

And then apply a shader.  For example, volumetric emission.


I can't install any addons into Blender I know this question has been asked before, but I can't really find a solution.
This was happening years ago too I think, so... I'm pretty stuck.
I've even re-installed my entire os since then, but I remember addons working at some point.

The two addons I need are these;
https://github.com/sugiany/blender_mmd_tools
https://github.com/ousttrue/pymeshio

I've tried to install them in a couple different ways - I tried using 'install addon' and using the zip, but nothing.
I tried to put the extracted folders into the addons folder of my Blender installation, still nothing.

When I click on the button to install an addon from user preferences, it just does nothing. It doesn't ever appear in the list, and I can't see any errors. This happens every single time I try to install the addons, just nothing happening.

I tried this with a portable install as well, there was no difference.

I realize I'm probably doing something very wrong like an idiot, but I would appreciate some help. Thank you.

These might be the possible errors:-
1. Check if there is sufficient space in the drive your os is installed.
2. Check if the addon downloaded is of correct windows architecture I.e. 32 bit or 64 bit.
3. Check if the blender version you are using is same as mentioned for the addon.
4. Install a stable blender release instead of nightly build or alpha build.
5. Check that the python version you are using match the one on which the addon is scripted.
6. Check if the addon is complete and is not missing any command line.

If it still doesn't work you may have a error or bug report on the respective page.


A reliable way to make a brick tower I have been trying to make a brick tower, but the method I'm using doesn't seems too reliable.

This is the method I'm using:

Move the brick origin to the center, followed by an empty object/array to rotate it.
Make another empty object for the second array (tower height) and rotate it so it mixes the bricks a bit.

The problem with this method is that I need to do lots of tinkering, since I need to rotate the second array to mix the bricks, then move the second empty object to try to get the tower "straight".
As you can see in the picture, the tower is not perfectly straight. Is there a better way to do it?

Instead of two empties use one curve and an empty as follows :

add a curve circle
add  Array modifier with some offset ( 1.05) and set it to fit curve
add a curve modifier and set to use the curve circle
add Array modifier with the empty as an offset object
this is the setup now :

and the modifiers ( on the brick ) :

the result and manipulation :

all object should be at the origin, sclale the curve to change the diamater , and rotate the empty to create the rotation offset

update : for any wall shape :

add a stack of 3 array modifiers and one curve modifier as follows  :

You control the length and shape of the wall using the curve :


What is the best approach to modeling a non-human character with an obscure/disproportionate anatomy? I have a character/creature I am attempting to model whose anatomy is quite obscure and disproportionate.  Very long tentacle-like structures protruding from a mushroom-like torso just to name a few characteristics.  My initial idea was to start with a base mesh object like a cylinder and just transform/scale/rotate/subdivide that cylinder until voilà: my creature has been modeled.

Now, I'm thinking I will need to tackle each limb/tentacle/section separately and build the entire creature out of many base mesh objects.  Perhaps, a cylinder for the torso, some cones for the tentacles, etc.  However, this approach will leave me with a bunch of disconnected body parts that I will somehow need to "fuse" together.

What approach is most efficient?  If neither of my approaches sound like the right thing to do, I would greatly appreciate a detailed explanation of an alternative approach.  Examples would be nice too.

For now, I'm going with creating and/or duplicating objects and linking/unlinking them as necessary.

I suggest using sculpting with dynamic topology. It is perfect for extruding tentacles, ears and horns.

Also available are extrusion in edit mode. Select a quad and hit e. Drag out a bit, move and rotate and continue extruding to form your limb. Apply subdivision to get a smooth surface (2 or 3 steps maybe).

With subdivision modifier:


How to model this in a flexible and nondestructive way? I need to model this shape in a way that makes the general shape of the brackets easily editable, without having to extensive re-model and move many vertices each time I need to change the shape. I've tried tons of approaches using nearly every modifier and tool in blender's toolkit, but just cant seem to come to a workable solution. Desperately looking for an effective solution for this! Here are some of the shapes I need to be able to create with this setup (these renders were done using a displacement modifier and height maps that I generated in after effects, but would love to be able to maintain the entire workflow in Blender):

Make the bracket shapes, and set up an armature to deform them. Maybe just make one bracket and use a mirror modifier to copy it after it’s been deformed. Next, make a heavily subdivided plane, and put it where it would be if it was over the bracket’s location but they weren’t there. Use the shrink wrap modifier on the plane, and I think there is a setting where you can tell it to only deform along a certain axis, and make sure it stays outside of the target mesh.


Problems with smooth shading can you please help me? I need to fix this to make weapons for my game, I use boolean operators, and then active the smoothing, after activating the smoothing appears strange artifacts in my mesh, an example image - first image:

Then I add the Edge Split modifier or activate Auto Smooth, so the artifacts disappear, but when I add bevel, the artifacts appear again, only weaker or stronger,
example image - second and third image:

these artifacts are visible in unity, and in other programs, and this is very bad, is there any method that can fix this, please help me, can solve using flat shader, instead of smooth shader, it seems that the problem is smooth shader, but I need to use smooth shader.

sorry about my english, I'm from Brasil.

Try using bevel modifier with weight rather than edge split.

Select the sharp edges and assign mean bevel weight to 1 in side properties panel(n). Then change in bevel modifier bevel limit method to weight. play with width and segments. It works fine in blender, but I don't know in unity. Because of huge ngons in middle


Blender 2.79b crashes on start V2 This question is a continuation of this: Blender 2.79b crashes on start up

System: Windows 10
Drivers:

Nvidia: **397.93** 05/24/2018 - this is the lastest driver
Intel: I use Intel® Driver & Support Assistant to update all CPU drivers and i also have the lastest one.

In weekend I reinstalled Windows 10, and install Blender 2.79b.
When i double click on the blender icon, the Console starts first, then i get the gray Blender window and it's immediately closes.

Here is my log file, when i run "C:\Program Files\Blender Foundation\Blender\blender.exe" --debug-memory --debug-gpumem --debug-all > results.txt. in CMD:

AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
SRNA Subclassed: 'Context'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'PropertyGroup'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Bone'
SRNA Subclassed: 'EditBone'
SRNA Subclassed: 'PoseBone'
SRNA Subclassed: 'UIList'
SRNA Subclassed: 'Mesh'
SRNA Subclassed: 'Object'
SRNA Subclassed: 'Texture'
SRNA Subclassed: 'Header'
SRNA Subclassed: 'KeyingSetInfo'
SRNA Subclassed: 'Node'
SRNA Subclassed: 'NodeInternal'
SRNA Subclassed: 'ShaderNode'
SRNA Subclassed: 'CompositorNode'
SRNA Subclassed: 'TextureNode'
SRNA Subclassed: 'WindowManager'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'RenderEngine'
SRNA Subclassed: 'Panel'
SRNA Subclassed: 'Menu'
SRNA Subclassed: 'Operator'
SRNA Subclassed: 'PropertyGroup'
SRNA Subclassed: 'AddonPreferences'
I0603 15:00:57.028302  7828 blender_python.cpp:186] Debug flags initialized to:
CPU flags:
  AVX2   : True
  AVX    : True
  SSE4.1 : True
  SSE3   : True
  SSE2   : True
  QBVH   : True
  Split  : False
CUDA flags:
 Adaptive Compile: False
OpenCL flags:
  Device type    : ALL
  Kernel type    : DEFAULT
  Debug          : False
  Single program : True
  Memory limit   : zu
I0603 15:00:57.049250  7828 device_opencl.cpp:59] CLEW initialization succeeded.
Error: EXCEPTION_ACCESS_VIOLATION

i found a solution. This is all because of Intel HD Graphics dirver, which works together with my Nvidia Geforce graphic card.

Step to solve:

a. Press Windows Key + X, choose Device Manager.

b. Expand the Display Adapters.

C. Right-click on the Intel HD Graphics graphics card driver and click on Uninstall.

Then i start blender and all works fine!
But what happen with Intel craphic driver, i don't know)


how to make the Curve shape and join it with the another mesh I am new to the blender and aiming to make the below model for practice which i picked from google images. But i am having difficulty in making the curve part.

I tried making the curve using another cylinder mesh and solidfy modifier and then used boolean modifier to make the curved hole but how do i make that extruded curve and add it to the mesh.

In the below image i made the curve hole using semi cylinder and boolean modifier. But i dont know how to do the extruded curve and the slant shape.

And in the next image i tried to make the extruded curve but i dont know how to add it to the rest of the mesh. Do I need to make loop cuts in the square below and fill each face or is there any other method.

sorry for the late reply.

To make the semi-spherical shape alone, you can do it this way. If you want to make the whole object in one piece you will have to apply the Solidify modifier and start with this topology, which is totally possible.


How to cut out holes nicely, without applying subsurf modifier (in the correct topology order) Basically, this is what I want, without applying any of my modifiers. I assume I just need to put the modifiers in the right order? I'm sorry if the video is in bad quality, but I used the screencast option in Blender, then used FormatFactory (free software) to convert it to an animated GIF.

GIF animation of problem

The way I would approach this is:
Make the cylinders with as few sides as possible. then add the boolean modifier before the subsurf. And apply it.

Additionally, you should move your surrounding geometry so that it "encompasses" the 3 holes. That way, when you apply the modifier, all the weird lines are going to be in the small space surrounding the holes.
If you can't change your geometry, then try adding a loop cut to do the same thing.
Hope this helps!


Dark Emission when using MixRGB with Colour and Image I am trying to overlay an image over an object so that the background colour does not change, but the image is overlayed on top. My Image was created on Inkscape and exported with no transparency so I don't think it is an alpha problem. I am getting a grey tint over the Pink background colour that I cannot seem to remove. Any suggestions?

[edit] Blender version 2.8

You should plug the alpha output of your image texture into the alpha input of the principled BSDF, then use the color output directly in the color input of the BSDF.

Make sure to check the blend mode to something else than "opaque" in the settings of the material. Press N to open the panel when in the shading node editor then go to Options>Settings>Blend Mode. Depending on your blender version you might have to try different ones to achieve your goal.


Animation not responding in time? Under certain conditions, I need my animation to be played. The rig gets a message every 5 tics and it seems that the animation is being played every 15-20 tics. My animation frame rate is 60, and same with the refresh rate. The player is in one scene, and the weapon is in another. I will not explain the "certain conditions" right here as it may be difficult; I will show you a .blend which is somewhat a replica of the functions that I have with this issue.

EDIT: I don't know how or even if this helps in any way, but if you have the animaion set to "loop end" instead of "play," the animation goes faster and slower randomly, sometimes it even stops! Just some more possibly useful or useless info: if I just do Always (freq. 0) > and > Play (0-5), the animation is still being played slowly, but if I do the exact same thing except I use "Loop End" rather than "Play," the animation seems to go the right speed. I am not saying I want to use "Loop End," I am just pointing this out if this helps. Thanks!

The reason for this is that there is a big difference between frames and logic ticks. There is a default of 60 logic ticks per second, and 20 frames per second.

The current frame rate in your scene can be found here in case you accidentally changed it, but the default is 20.

If you add a delay sensor, and hover over the
 delay field, the tool tip that opens shows this:

The relation here is three logic ticks for every one frame. So for your mouse sensor, it should have the true level triggering set to 15 for 5 frames to play on your action actuator

You can avoid this by changing your mouse sensor's delay between positive pulses from 5 to 15


Why does the math node change the noise texture's color output to B/W? Could someone please tell me why plugging a color into a math node (in this case set to subtract) makes the output black and white?

This is because the math node only deals with single scalar values (note the gray sockets).
See What is the meaning of the color of the node sockets in the node editor?

If you use a node with yellow sockets (Color > MixRGB), it will maintain all the color channels:


Losing stairs in other meshes when joining objects I am a Newbie to Blender.

My dilemma is that l have four sets of stairs as individual objects in a scene, with various other objects and when l combine all the objects into one scene/object, the stairs are integrated into the other meshes and disappear.

Is there any way of combining the objects without losing the stairs?

Screenshots of before and after joining objects. I have applied textures using Cycles render before joining the objects, is that the problem?

They shouldn't join meshes. One object can have multiple parts. Are you in cycles or render mode? I think your problem is most likely an unapplied subdivision modifier on one object and when you join the others this affects them. To fix this apply your modifiers before you join.
Hope this has helped.

Just a note for next time: please post either the .blend file or screenshots of the problem. That makes it a lot easier to see what's wrong.


Cycles color diffuse baking results in black image As you can see on the image above the baked image appears black with exeption to the handle part. I use the free PBR node from Blender Brit for the metal material. The normals are facing the right way. And enabling ambient occlusion didn't solve the problem neighter.

You cannot bake a glossy material.  I think that is your problem.  By looking at the picture, it appears that the handle is the only thing that does not have a glossy material.  Try removing the gloss material from the blade and changing it to a diffuse material.  You shouldn't have a problem after you change that.


It is possible repeat a set of commands for multiple objects? I have 645 objects and I would like to repeat the same commands for each one.
I followed this tutorial:
Is there a way to repeat a set of actions on an object?
But the script gives me an error.
    import bpy

bpy.ops.material.new()
bpy.ops.node.add_node(type="ShaderNodeAttribute", use_transform=True)
bpy.ops.node.translate_attach_remove_on_cancel(TRANSFORM_OT_translate={"value":(-1405.21, -1784.65, 0), "orient_type":'GLOBAL', "orient_matrix":((1, 0, 0), (0, 1, 0), (0, 0, 1)), "orient_matrix_type":'GLOBAL', "constraint_axis":(False, False, False), "mirror":True, "use_proportional_edit":False, "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "use_proportional_connected":False, "use_proportional_projected":False, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "cursor_transform":False, "texture_space":False, "remove_on_cancel":True, "release_confirm":False, "use_accurate":False, "use_automerge_and_split":False}, NODE_OT_attach={}, NODE_OT_insert_offset={})
bpy.data.materials["Materiale"].node_tree.nodes["Attributo"].attribute_name = "Col"
bpy.ops.node.link(detach=False)

So I run these commands for one object, then select the others and run the script, but it gives me an error.
I don't know how to use Blender or Python well but I need it for my thesis work.
Thanks to anyone who wants to help me.

Using bpy.ops is really not recommended, as it needs context. The context will be wrong.
I suggest this instead:
If you want to create only 1 data block of a material:
import bpy

scene = bpy.context.scene

mat = bpy.data.materials.new("My Material")
mat.use_nodes = True
nodes = mat.node_tree.nodes
node_attribute = nodes.new(type="ShaderNodeAttribute")
node_attribute.location = (-1405.21, -1784.65)
node_attribute.attribute_name = "Col"

for o in scene.objects:
    if o.type =='MESH':
        o.data.materials.append(mat)

If you want to create a new material for each object instead:
import bpy

scene = bpy.context.scene

for idx ,o in enumerate(scene.objects):
    if o.type == 'MESH':
        mat = bpy.data.materials.new("My Material_"+str(idx)) #to make your personal index into name (if you want)
        mat.use_nodes = True
        nodes = mat.node_tree.nodes
        node_attribute = nodes.new(type="ShaderNodeAttribute")
        node_attribute.location = (-1405.21, -1784.65)
        node_attribute.attribute_name = "Col"

        o.data.materials.append(mat)

Note:
If you want work only on selected objects , you have to replace for o in scene.objects:with for o in bpy.context.selected_objects:


Can I use code in Cycles Mode that will run my human baby AI? I'm creating a real learning human baby in Blender Cycles. To create the "brain" or "AI" I must of course use code. But, can I run code in Cycles mode? I don't want to be in BGE mode. P.S. I don't need interactivity.

For example I'll need the code to move armatures, get numbers from a accelo-meter in the baby and use the numbers in the code, etc.

Using python you can create an animation that can be played back and rendered using any render engine at a later time.

bone.rotation_euler.x = 15.0
bone.keyframe_insert('rotation_euler', frame=10)

As you want to read external data while creating your animation you might want to look at using the subprocess module to keep blender responsive.

Without wanting interactivity you could capture your data to a text file and have your script read it in to create the animation.

with open('mydata.csv') as csvfile:
    inFile = csv.reader(csvfile)
    for row in inFile:
        bone.rotation_euler.x = row[1]
        bone.rotation_euler.y = row[2]
        bone.rotation_euler.z = row[3]
        bone.keyframe_insert('rotation_euler', frame=row[0])


Is the Blender GUI package available for other programs? I really love the look of Blender's built-in GUI, and would potentially like to use these tools in some of my other Python applications. As I understand it, Blender created all of these tools from scratch, instead of inheriting them from one of the other standard GUI packages (wxPython, Tkinter, qt, etc).

Do these tools exist as a stand-alone package that I could use, either in addition to or instead of other packages (preferably something as simple as import blender_gui)?

For example, how could I use Blender's Node Editor setup in another Python application?

Short answer: no

...at least nobody has split off Blender's user interface from the application so that it can be used separately, and doing this isn't trivial.

Even if such a task were undertaken, keeping the code-bases in sync would be a challenge, so I think there is not much interest to do this. Besides, there are many UI toolkits out there.

There is GHOST (General Handy Operating System Toolkit), which can be used outside of Blender, but it's very low level, only providing window access, mouse, keyboard, ndof and tablet events from X11/MS-Windows/OS X.
It doesn't actually draw anything; buttons or text, for example, are handled by Blender's own code. So likely GHOST isn't what you want.

Rather then using GHOST you're better off using a general purpose library such as SDL, Allegro, GLFW, or SFML. Some of these libraries have Python wrappers; for example, PyGame is a popular SDL wrapper.

And, as for UI toolkits, there are too many to mention here; there are enough resources online.
See: Q What are the best cross platform widget toolkits?

On the other hand, nothing is stopping your from making a fork of Blenders UI for your own purposes, its just likely you'll end up having to spend time refactoring code out for your own use where you might better spend time working on the application its self.


How to create an object by dimensions I have taught myself a few basic things in Blender using Youtube video tutorials but still am "all thumbs" when trying to work out how to create an object (for MSFS2020) consisting of a dock used by float planes.

I have created a motor vehicle tyre-like object but not added a material using the TORUS mesh object (very easy).
I have downloaded and imported some 3D objects to try to work out how it is done but still I am scratching my head.

It would be great if I could watch a video tutorial which someone can point me to which shows how to create a similar looking model (doesn't have to be a dock but similar in shape to a dock) or give me some easily understood ideas.
I have included part of an image showing the type of object I would like to create in Render.
An example would be to create a 'cube' which like a regular plank of wood. I see that I can drag the vertices of a cube to represent a plant of wood but how do you ensure all sides are parallel to each other ie that the plank is as think one end as the other. I am thinking for this object all that is required is a number of 'planks of timber' placed in correct places or joined together.
Thanks
[added later]
I just found a youtube video tutorial how to make a wood plank but still nee to know how to create to a particular dimension eg 3.6 metres long, 200mm wide, 50mm think. Also I will have to create a number of different 'plank's and then duplicate some and attach all the parts into the dock. Youtube video

The dock should be rather easy to make.

Add > Mesh > Cube and enter the plank dimensions (3600x200x50)
Then go Apply > Scale
Now add the Array modifier (to duplicate your planks)
Use the same principles to create the rails and the bottom floating part

Planks made using Array modifier

Bottom part

Final model


Mix shaders with blend modes besides Add and Mix? Prompted by my previous question, I am wondering if (since there is no apparent way to convert a shader to color) there is any (even using  post processing) way to mix cycles shaders with blend modes besides Add and Mix.

Is this possible?

I think the answer to this is also negative.

Let me try to explain my understanding of the problem with a different blend mode. To have an example to work with, let's use Multiply:

When Cycles uses the shader, it uses it with exactly one sample. It doesn't know anything about the previous samples, and neither does it know anything about future samples for this pixel and material.

To be able to multiply two shaders with each other, you would need the averages of all samples from one shader and all samples from the other one, as it could happen that for each sample, one of them is 0 and the other one is 1 (with a 50% chance for either one to be 1). In average, both would still be 0.5 in brightness, so the correct Multiply-result would be 0.5 * 0.5 = 0.25, but because Blender only sees one sample at a time, it would always calculate 1 * 0 = 0 or 0 * 1 = 0 and the material would be black. This is why all blend-modes have to be independant of the respective other input to make sense. Add and Mix are pretty much the only two useful blend modes for which the output is only influenced by the two inputs independently.

Any linear modifications that are supposed to happen to either of the inputs or the output can be applied to the color before it even enters the shader, as all shaders are (as far as I know) linear in respect to the input color. Subtracting also works that way, you can replicate it with negative brightness in a Diffuse/Glossy/...-Shader.

This is not the programming explanation for why it doesn't work but only the explanation that I think is correct and describes the problem from a rendering process point of view, please correct me if it's not correct but I hope it helps in some way to understand what works and what doesn't and cannot work.


How can I bake camera occlusion? I'm perfectly willing to entertain answers like, "You shouldn't, do it like this instead," so I'll explain my ultimate goal.

I've been working on a model in Blender, including materials, and I'd like to prepare textures for use in a different, much more primitive engine.  Because I've been building for Blender appearance, I would like to use renders from orthographic cameras (starting with 6, but we'll see) to build a texture up on an unwrapped UV.

My problem is concavity.  Some areas of the model will be occluded from any given camera-- from all cameras.  I can manage that by separating these faces out, but I'll need to know which ones.  The ideal way for me to know would be to have a texture on my unwrapped UV that represented whether a given pixel was visible to the camera (or any proxy for it), in a black-or-white fashion, no grayscale, so that I could feed that into a nodes setup to integrate all of my renders into a final image.

Is there some way that I can create a material that returns white if and only if it is visible from a given position with an orthographic perspective?  Obviously, I can do this just fine for the render-- everything that renders is visible and everything that doesn't, isn't-- but I need it mapped to my model's unwrapped UV coordinates, like a bake.

From what I gather, you want a pure black and white mask for face visibility.

If this is purely a geometric issue then a face (triangle) will either be visible or not. You could probably get away with a fairly accurate representation without needing any rendering.

With that in mind then you could just place the 3D viewport at the correct view angle with an orthographic camera.
With the border selection tool select all object faces. If you have the Limit Selection to Visible option enabled, occluded geometry wont be included.
You may have to triangulate your mesh beforehand if partial visibility is an issue, like if you have many NGons or highly distorted quads.

From then on, with the selection at hand you can do whatever you want with it.

Either give them a different material and OpenGL render the viewport, texture paint it, export its UV map and paint it in an external editing application, etc.

Alternatively if you require partial per-face visibility you could try texture painting it from a certain viewpoint.