text:
Is it possible to change viewport draw mode when navigating?
I'd like to write a script to automate viewport draw mode switching when navigating the viewport.  Could this be done with, say, a modal operator? I haven't written any modal operators before, so before I go all Don Quixote on this thing, I'd like to know if this is even possible.
So, can view3d.rotate(), view3d.move(), etc., be intercepted in such a way as to change the viewport to bounding box draw mode automatically whenever the viewport is being navigated?
Also, I've looked at the documentation on modal operators and I couldn't really understand it.  Maybe someone could help me understand the functions and how they work together?

Switch shading mode while navigating the 3D View
import bpy

class VIEW3D_OT_View_box_orbit(bpy.types.Operator):
    """Switch shading mode while navigating the 3D View"""
    bl_idname = "view3d.navigate_shade_switch"
    bl_label = "Navigating Toggled Shading"

    nav_mode = bpy.props.EnumProperty(name = "Navigation", items=[
        ("rotate", "Rotate", "Rotate the view"),
        ("move", "Move", "Move the view"),
        ("zoom", "Zoom", "Zoom in/out in the view"),
        ("dolly", "Dolly", "Dolly in/out in the view"),
        ("fly", "Fly", "Interactively fly around the scene"),
    ])
    shade_mode = bpy.props.EnumProperty(name = "Shading", items=[
        ("BOUNDBOX", "Bounding Box", "Display the object's local bounding boxes only", "BBOX", 1),
        ("WIREFRAME", "Wireframe", "Display the object as wire edges", "WIRE", 2),
        ("SOLID", "Solid", "Display the object solid, lit with default OpenGL lights", "SOLID", 3),
        ("TEXTURED", "Textured", "Display the object solid, with a texture", "POTATO", 4),
        ("MATERIAL", "Material", "Display objects solid, with GLSL material", "MATERIAL", 5),
        ("RENDERED", "Rendered", "Display render preview", "SMOOTH", 6),
    ])

    def modal(self, context, event):
        if not hasattr(self, "navigating"):
            self.navigating = True
            getattr(bpy.ops.view3d, self.nav_mode)("INVOKE_DEFAULT")
            return {"RUNNING_MODAL"}
        elif event.type == "TIMER":
            return {"RUNNING_MODAL"}
        context.space_data.viewport_shade = self.shading
        return {"FINISHED"}

    def invoke(self, context, event):
        v3d = context.space_data
        if v3d.type == "VIEW_3D":
            self.shading = v3d.viewport_shade
            try:
                v3d.viewport_shade = self.shade_mode
            except TypeError:
                pass # Shading mode not supported.
            context.window_manager.modal_handler_add(self)
            return {"RUNNING_MODAL"}
        return {"CANCELLED"}

bpy.utils.register_class(VIEW3D_OT_View_box_orbit)

Hmm... this doesn't seem to be working for me. When I run the operator it quickly switches to bounding box then back.

@Aldrik - Hey that's neat, thank you; it works just fine here.  I could make that into a hotkey I guess! :)
I don't understand the functions, though.  What is
context.window_manage.modal_handler_add(self)
doing, exactly?  And how are the two functions working together?

@swingsoneto It appends self to the modal handlers, which causes Blender to call the modal method repeatedly. The first time we call rotate (which appends itself and runs repeatedly), when that completes it's called again and shading's reset.

@CharlesL There does seem to be some issue depending on how the script is invoked. eg. If using the Search Menu you need to click it (instead of return). Could do with a better way to detect that the navigation operator has finished but for the expected use case (key binding) this works well enough.

Alt+LMB Press works just fine! Great for cycles' rendered preview. BTW: A macro might work here? http://blender.stackexchange.com/a/3037/1363


text:
Cutting hole into a face with a line loop?
How do I cut a hole in the plane using the hollow line loop in the middle they're part of the same mesh and both 2d.

Related, Remove part of a plane.

You could convert your objects to curves and select 2D under the curve options. Doing this gives you a bit more flexibility as you can tweak the loop and see the changes as you do so. Use AltC > Curve from Mesh/Text to do this.

Once you are finished tweaking, convert back to a mesh with AltC > Mesh from Curve/Meta/... You will notice that the plane is triangulated. To clean this up, run a Limited Dissolve on the mesh.

Done

Can you explain why we always need this two edges from outer border to inner one? Is it blender specific? And why two not one?

Thank you for limited dissolve. Thing is beautiful.

This can be done using Knife Project, however for the case you show to work, you will have to use a recent Blender build, since improved knife support was added after 2.69 release.

To use Knife Project, in Object mode select the object you want to project (use and cut the other) first then Shift select the "object to be cut". Now Tab into Edit mode and press Knife project.

Before projecting from a text object and Resulting knife projection.

Another option is the Bridge tool.

Delete the face of the plane (Delete> Only Faces)

Select all and press W> Bridge Edge loops:

Result:

If you want to use ngons instead of tris, press Delete> Limited Dissolve:

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Using 3rd party Python modules
I'm currently developing a script for Blender to handle Mesh Frequency Decomposition.
The script is nearly complete, but i need one more thing: The SciPy library to compute eigenvalues and eigenvectors.
Following the installation instructions on their site, I'm able to install it as well as Numpy. Numpy works fine, but I can't even import SciPy:
Traceback (most recent call last):
File "/CAF_FD.py", line 4, in <module>
ImportError: No module named 'scipy'
Error: Python script fail, look in the console for now...

By the way, I'm working on Linux 64 bit and I've installed SciPy and Numpy with my package manager.
Edit: When I try to use SciPy with a terminal prompt, it works.

did you install for python 2 or 3? Furthermore I think there are built in functions in blender to compute eigenvalues and eigenvectors.

Hum ... It appear that it's installed for Python 2.7. Does i have to suppose from your comment that blender uses Python 3 ?

This is covered by: http://www.blender.org/documentation/blender_python_api_2_69_release/info_tips_and_tricks.html#bundled-python-extensions In short, you can remove Blender's local Python and the system's Python will be used instead.

This answer worked fine for me - I just dragged the SciPy folder from a Python 3 Anaconda installation into Blender's Python's appropriate folder and it just worked fine (for me, then). See this comment for the details - voila! Dancing Purple Bessel Functions!

The answer is here https://blender.stackexchange.com/questions/56011/how-to-install-pip-for-blenders-bundled-python/283142#283142

Python3.4 in Blender is bundled within Blender. It doesn't share libraries with system's python (see this related post).
So, to use extra libraries you need to install it into /blender/2.72/python/lib/python3.4/.
OR you can remove /blender/2.72/python and Blender will fallback to using the Python installed on the system (however the versions must be compatible).
OR you can specify a folder in the script input of the User preferences:

Note that this folder must contain 3 sub-directories : addons, modules, and startup. So you can install the library in the modules folder.
As Gandalf3 suggested, you can find more information in the wiki here.

Expanding on Polosson's answer, see the wiki for more information on where to find blender's python directory.

i did the following on my debian install sudo ln -s /usr/lib/python2.7/dist-packages/ply /usr/lib/blender/scripts/modules/ply to expose the ply module to blender. even though blender is compiled here with python3.2 i could use that module from 2.7 because it is compatible with 2.6 and above.

@gcb Your solution did the trick for me as well. Thanks!

The tooltip in Blender 2.78 says that the required subdirs are "startup", "add-ons" (note the dash), and "modules".

just in case someone stumbles upon this on linux (CentOS) in turned out to be system-wide python, so I just had to do system-wide pip3.4 install X

So is there a preferred method among these three? Linking to the system module as per @gcb 's suggestion works fine for devemopment, but is not portable. What is the preferred method when distributing an addon? Include the module in the package? Install via pip? Make it a user-handled requirement?

OR you can remove /blender/2.72/python The BEST solution!

While blender's python doesn't come with pip installed, it does have ensurepip. That means that you can do something like this:
in blender's python:
>>> import sys
>>> sys.exec_prefix
'/path/to/blender/python'

then in a shell:
cd /path/to/blender/python/bin
./python -m ensurepip
./python -m pip install scipy

As Noam Peled mentions, you need to run these commands as an administrator on Windows - it probably depends on how you have blender installed on your linux machine, but you may also need to do this with escalated privileges.

This should be the new correct answer. Here’s a 2019 implementation

. " not recognized as an internal or external command" is probably because the answer is written assuming a bash/Linux-like shell environment, where . has the special meaning of "current working directory" (e.g., https://askubuntu.com/a/250825/734874). I think the example commands would need to be slightly modified (probably just delete ./) if running from a Windows command prompt (or you could run the ./ form of the commands from conemu, Cygwin, WSL, or other Linux-like shells/environments inside Windows).

You can install modules and their dependencies directly into the Blender /python/lib local environment folder with :
import subprocess
import sys
from pathlib import Path

py_exec = str(sys.executable)
# Get lib directory
lib = Path(py_exec).parent.parent / "lib"
# Ensure pip is installed
subprocess.call([py_exec, "-m", "ensurepip", "--user" ])
# Update pip (not mandatory)
subprocess.call([py_exec, "-m", "pip", "install", "--upgrade", "pip" ])
# Install packages
subprocess.call([py_exec,"-m", "pip", "install", f"--target={str(lib)}", "scipy"])

You just have to run this directly into the python script editor. You might need to start Blender in administrator mode.
How to run a script inside Blender

So I could install my custom module I wrote for python (like let's say in rust), in blender, while initialising an addon right?

if its available from pip install yourmodule, then yes @TheTrebuchet

Thanks for the reply @Gorgious. Well I suppose I can make a wheel, put it in the addon files and the pip should just install it if I give it the path. I have kind of mixed feelings about this whole thing, like writing addons with c or rust and python for blender should be easier, writing everything in python is just way too expensive

See this one too, it grabs the correct version for blenders python, unlike the method below:
How to use PIP with Blender's bundled Python?

By the way, I'm working on Linux 64 bit and I've installed SciPy and
  Numpy with my package manager.

You want to look for your installation directory of your system pythons scipy by importing the module in the console and using the __path__ method. It should print out the path where the module is located. That should point you to a folder named "site-packages" where the scipy folder should be in. Copy the whole scipy folder into the "site-packages" folder in the blender python version. Should be following a similar path as your system python.
If that doesn't work, for me it didn't, check if the version you installed is compatible with blender's python version. If it does but it still doesn't work, you can also try to download an appropriate source code package. Installation is really simple on linux. Should work with "python3 setup.py install" in the folder of the downloaded source code package where the setup.py is located.
The copying of the site package contents works for me on windows as well. I used the winpython package for that.

Blender now ships with a Python executable - but not distutils. You can use pip to install modules for Python, but you need to replace distutils first, and then install pip. On Ubuntu you can do something like this:
PY_BLEND=blender-2.76b-linux-glibc211-x86_64/2.76/python
cp -a /usr/lib/python3.4/distutils ${PY_BLEND}/lib/python3.4/

wget https://bootstrap.pypa.io/get-pip.py
PYTHON=${PY_BLEND}/bin/python3.4
${PYTHON} get-pip.py --user

${PYTHON} -m pip install --user -r requirements.txt

After that, you should have your modules available for import within Blender.
There is a proposal to include distutils as well which should make this easier.

I wrote a script that install 3rd party Python modules uting pip. Here is the main function, where the full solution (python 3) for windows/mac/linux can be found here:
def install_blender_reqs(blender_fol='', gui=True):
    if blender_fol == '':
        blender_fol = find_blender()
    blender_parent_fol = get_parent_fol(blender_fol)

    # Get pip
    bin_template = op.join(get_parent_fol(blender_fol),  'Resources', '2.7?', 'python') if is_osx() else \
        op.join(blender_fol, '2.7?', 'python')
    blender_bin_folders = sorted(glob.glob(bin_template))
    if len(blender_bin_folders) == 0:
        print("Couldn't find Blender's bin folder! ({})".format(bin_template))
        blender_bin_fol = ''
        choose_folder = gui_input('Please choose the Blender bin folder where python file exists', gui) == 'Ok'
        if choose_folder:
            fol = choose_folder_gui(blender_parent_fol, 'Blender bin folder') if gui else input()
            if fol != '':
                blender_bin_fol = glob.glob(op.join(fol, '2.7?', 'python'))[-1]
        if blender_bin_fol == '':
            return
    else:
        # todo: let the user select the folder if more than one
        blender_bin_fol = blender_bin_folders[-1]
    python_exe = 'python.exe' if is_windows() else 'python3.5m'
    current_dir = os.getcwd()
    os.chdir(blender_bin_fol)
    pip_cmd = '{} {}'.format(op.join('bin', python_exe), op.join(GET_PIP_FOL, 'get-pip.py'))
    if not is_windows():
        run_script(pip_cmd)
        install_cmd = '{} install {}'.format(op.join('bin', 'pip'), REQS)
        run_script(install_cmd)
    else:
        install_cmd = '{} install {}'.format(op.join('Scripts', 'pip'), REQS)
        print(
            'Sorry, automatically installing external python libs in python will be implemented in the future.\n' +
            'Meanwhile, you can do the following:\n' +
            '1) Open a terminal window as administrator: ' +
            'Right click on the "Command Prompt" shortcut from the star menu and choose "Run as administrator"\n' +
            '2) Change the directory to "{}".\n'.format(blender_bin_fol) +
            '3) Run "{}"\n'.format(pip_cmd) +
            '4) Run "{}"\nGood luck!'.format(install_cmd))
    os.chdir(current_dir)

On Windows, you need admin privileges, to the one needs to do it manually.

Blender python console doesn't have the path to the global site package directory and because of permissions limitation or the way you installed the specific package the installation often resides there.
You can add the global site package directory to your path hardcoded like this:
import sys
sys.path.append('<path to global site package directory>')

If you don't want to hardcode the global site package directory, you can add the global user site packages to your python path using this code:
import sys
import site
sys.path.append(site.getusersitepackages())

Hey thanks for the answer, I'm curious, isn't there a risk of compatibility issue if the user installed numpy in their global package directory in addition to the one that comes shipped with Blender ?

@Gorgious I think it's OK if you import numpy before adding the path, and because we are using append here to add the new path it should search in blender python repo before anyway. But of course this method is not perfectly safe, but can help if you can't install directly to blender's python dir.

Thank you for the explanation. :) cheers

Sometimes versions of python in Blender and in the System may differ. Along the suggestions from Polosson, I would try to

install an alternate version of Python in the system:

download a version of Python with the same major and minor numbers as in Blender
compile and install in an alternate location (with configure --prefix and make altinstall)

install needed modules in this alternate version (you may use pip, don't forget to use the alternate python executable, not the system one)
copy what is in site-packages in the alternate version of Python to the same directory in Blender python directory.

You should now have your modules working in Blender.

Use latest Blender build - https://builder.blender.org/download/ - which includes submitted diff: https://lists.blender.org/pipermail/bf-committers/2016-February/046728.html that allows PIP to install properly.
It looks like using the Python version packaged with Blender is preferable as that allows for better export/packaging later on (although I have not tried this yet). Installing a matching Python system version is much easier on Windows (at least, it is vs. my Ubuntu system) and does work as I have a Blender project working exactly the same as it did with the Blender Python, with Windows system Python. On Ubuntu its very difficult to install specific Python versions as they are so keyed into system functiions. Making Python from source can add further complications but could allow a separate install. Then there's Python "virtualenv" but I have not tried that.

Rather simple method fow MS Windows, requires no special permissions, and works from script code itself (https://stackoverflow.com/a/68964354/12691808):

Install the package you want right in the script with user-level permissions:
import bpy, pip
pip.main(['install', 'scipy', '--user'])

Actual installation path of user-level installation is %AppData%\\Python\\<blender python version>\\site-packages, add that path to %PATH%:
import sys
packages_path = "C:\\Users\\<username>\\AppData\\Roaming\\Python\\Python39\\site-packages"
sys.path.insert(0, packages_path )

Make sure your package imported with no errors:
import scipy

I tried all the other answers, and they mostly didn't work.  The main issue I was facing is that I needed something that I could run without administrative privileges.  In particular, I needed something I could hand off to a designer that did not require them to do more than click a button.  So now, all a designer has to do is run this script before running any of the other ones and it will modify sys.path for the duration of their session while also asserting dependencies are available.
import bpy
import sys
import site
import importlib
import os
import sysconfig
import pip

# Add global and user-specific site-packages paths to sys.path
paths = [sysconfig.get_path("purelib"), site.getusersitepackages(), *site.getsitepackages()]
for path in paths:
    if path not in sys.path:
        sys.path.append(path)

# Refresh import system caches
importlib.invalidate_caches()

# Dependencies to check and install
dependencies = [("PIL", "Pillow")]

# Check and install missing dependencies
for package, install_name in dependencies:
    try:
        __import__(package)  # Try importing the package
        print(f"{package} is installed and working!")
    except ImportError:
        print(f"Installing {install_name}...")
        pip.main(['install', install_name, '--user'])

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to get adjacent vertices of a vertex? (with Python)
How can I get a list of vertices that share edge with a given vertex over script? I need this to work in edit mode.

Yes, this is possible using BMEdge.other_vert
This script runs in edit-mode.
import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

for v in bm.verts:
    for e in v.link_edges:
        v_other = e.other_vert(v)

        # print some info
        print("%d -> %d via edge %d" % (v.index, v_other.index, e.index))


text:
Mesh gets out of sync while in edit-mode (Python)
When modifying/accessing a mesh in Python, changes made while in edit-mode by the user are not available to Python.
bpy.context.object.data.vertices[x].select

For example, doesn't change for any vertex  until I (for example) switch from edit to object mode.
Is there a way a way to access the current state of the mesh?

In edit-mode, the mesh as defined by bpy.types.Mesh is not used, there is in fact a different mesh-representation being used (bmesh.types.BMesh), which supports editing operations and modifications.
So changes to bpy.context.object.data are not displayed, and they will be overwritten when exiting editmode.
Instead, you have to access the BMesh.
import bpy
import bmesh

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

# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)

Once you have a bmesh from the edit-mesh, you are directly accessing the same data which the user is manipulating.
For the full example, see:

Text Editor -> Templates -> Python -> BMesh Simple Editmode

See BMesh API docs:
https://docs.blender.org/api/current/bmesh.html


text:
Does Cycles GPU Rendering use Single or Double Floating Point Precision?
I am trying to choose a Graphics Card for rendering in Blender, I would like to know if Blender uses Single or Double Point Operations. I have been looking at Nvidia's GeForce and Tesla line of graphics cards, but I need to know what blender uses in order to find the most high performance one.
One of the biggest dilemmas I have had while searching for the last two days is the lack of information about this topic that is newer than 2012. I do not know how much blender has changed in the last two years, but I managed to find two people who said the opposite thing. Here is what one said: The fourth post on this page Thanks in advance for everybody's help!
EDIT: Here, I found this comparison chart, and forgot to add it: http://www.systemagnostic.com/faqs/quadro-tesla/

I think it's single precision, and that your best bet would be a GTX Titan with like 6GB of ram, or a GTX 780ti; The latter has more CUDA cores, but I don't think there are any versions with as much ram has the first;

@someonewithpc Thanks, I think that would be a good choice too, I also found out that the Tesla cards are better at double point precision, and the GeForce series are better at single point. Another question, how does Blender do with the Titan? All benchmark info I can find is two years old, closer to the time it came out and support wasn't very good.

Doesn't that post on the forum answer your question? It sounds pretty cut-and-dry. Blender uses single precision floating point operations. Also, if you're looking for a  graphics card, an Nvidia Tesla isn't going to help you; it has no where to plug in a monitor. If you're looking for extreme rendering speed, and you already have a graphics card, then a Tesla would be a good fit.

@Justin I don't know if It answers my question, that answer was a couple years ago, and I don't know if blender has been updated to support double now. Actually I am making a render farm, and everything will be administered from SSH, so I won't need a monitor.

@TheCount Ah, I thought that a render farm might be the case. Otherwise, I might have said 'who cares?'

@Justin I should have clarified that it was for a render farm, sorry about that.

It looks like the user in that forum found the answer by simply asking a developer on IRC. Couldn't be that hard to do the same thing again.

@Justin Ok, I'll try that. Thank you again.

I went on the IRC, and found out that it does use Single Precision. Thanks

I chatted and got an answer from someone on the #blendercoders IRC chat. They said that Blender does use single precision floating points. The GeForce cards are going to be the best choice for rendering because they do better at single points than doubles. The Quadro and Tesla lines wouldn't perform as well because they handle double point operations better than singles, and are mostly used in CAD and software that does scientific research. So, the best choice would be to go for the GeForce line because they perform better at single point operations which is what blender uses.

That's good to know. I'm going to be developing for a server that has 8 Teslas, so I won't be afraid to use Doubles instead of Floats.

@Justin What are you developing a server for? And did you mean Doubles instead of Singles?

My university just built a server with 8 Tesla K40's. I'm developing a 4D path tracer to run on the server.

@Justin Wow, good luck to you! Email me: weston at code-bytes.net I might want some tips while I am building my renderfarm.


text:
How to fix ngons overlapping wire edges?
I am trying to make a retopo of my human head. But it seems that I already have several ngons because I couldn't create an edge loop.
So I checked it with mesh lint and it showed me the ngons

But the ngons are really quads as far as I can see.
Any idea why this is happening?
blend file

Please upload blend-file.

You have a large ngon face over the other faces. The same thing goes for the bottom of the nose and the chin. To fix this delete the large polygon and bridge the edges.

Select the large ngon faces:

Delete the faces only

Use bridge to add new polygons. Or you can fill them one by one using the fill tool: F

Do the same for the bottom of the nose and the chin.

I already tried that but that wasn't the problem. I've also uploaded the blend file itself.

Oh .. I should have looked at the faces. Thank you very much.

Alternatively, just go to Mesh > Cleanup > Delete Loose. Then delete the ngon and fill back the faces.

@iKlsR I tried this and it deletes the edges. The ngon is still there

I think this answer involves too much manual editing, since we have tools to fill in empty regions (added own answer), also, You could use Select Path before the bridge operation. one more thing - you can select all 3 edge loops and run bridge once.

There are 2 ways I would suggest to fix up a model with edges like this.
Using Fill holes:
This tool was written for almost this exact case, it has the advantage it will fill in UV's. vertex-colors and materials from surrounding geometry.
See the docs

Delete the ngons (Only Faces), x, n
Select all, a
Mesh -> Cleanup -> Fill Holes

Using Face Create:
The default face creation will fill a wire-net of faces too, but in this case it goes too far and needs one face removed.

Delete the ngons (Only Faces), x, n
Select all,a
Mesh -> Faces -> Make Face/Edge, f
delete the large ngon created at the back.

This answer is actually better. I never knew blender had these modeling tools, they must be new

@Vader, Yes they are fairly new - added last release http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.69/Modeling#Mesh_Editing

I s there a way to access the clean using keyboard shortcuts? I would expect them to be in the specials menu

No, they are intended to be tools you run to fix bad imported models to save manual work, but not used for general workflow. Note that 2.70 adds more cleanup tools http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.70/Modeling#Mesh_Cleanup

They seem to be pretty useful to me for general modeling, even if that's not what they were intended as.


text:
Can I sculpt images as planes?
I'm new to Blender, and I'm trying to figure out how can I distort images or videos 3-dimensionally. I'm importing an image or video as 'images as planes', going to sculpting mode and trying to sculpt the surface on the plane, but it doesn't do anything. When I enable dyntopo, then it works, but the image is gone. It also works in 'edit mode', but then it's too slow and it's too geometrical. I would like to achieve more organic and less precise shapes, like in Google Street View.
Is it possible to sculpt 'images as planes'?

Great! Thank you for all the tips! It works!
I'd have two more questions, since I do need some geometrical extrusions as well:

I want to place single vertices in order to copy/mark bigger, complex shapes that I see on the photo. So by holding Ctrl + right click, I can add a single vertex and I can finish the loop by merging the last and the first vertex points. But it still floats in the space and it's not 'snapped' onto the image /plane. How do I create freehand vertices (loopcuts?) on a face/ the plane? Or how do I link those vertices with the picture plane?
Then I'd like to extrude that shape, but only one side of it. E.g: if there is a door on the photo, I can extrude it. But how do I 'open the door'? I mean, the left side stays on the surface and the right side extrudes/comes forward in perspective?

I would really appreciate it if you could help me out with this! When I'm watching/reading tutorials I can't find the right answers...

https://www.youtube.com/watch?v=v_ikG-u_6r0 check this video if you want to try the modelling way instead of sculpting.

Yes, you can. You just have to subdivide the plane before.
So select the plane, and right mouse click → subdivide.
Then choose here (number of cuts) a big enough number for your sculpting. This depends on your size of your plane. e.g., 20.

You will see this dialog directly after you tapped on "subdivide" in the bottom left corner if you tap on this:

The answer is "yes"
The sculpting needs a lot of geometry so, when you import the plane there are just four vertices.

You can add the geometry by subdividing it or using subdivision surface modifier (you can also use multi res modifier if it's a complex sculpt) and you are able to sculpt.

The reason why it doesn't work with dynamic topology is that, dynamic topology distorts your uv's (where the image texture is stored) by adding geometry in a non-preservative way.

But I wouldn't suggest you to sculpt the images as planes although it works since, the image might get distorted while stretching.

I prefer modelling using loopcuts while working with images as planes.

The way I would do it is quite simple. Just subdivide the plane go into sculpt mode and it would work it may look low poly if you didn't subdivide it enough.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Randomly coloring with script doesn't work correctly
Consider:

I'm having trouble with making each of these circles to have a random color
and the problem is that the color is random, but that color applies to all of them.
import bpy
import random as r
import math as m
n=25

for i in range(1,n+1):

    material_i= bpy.data.materials.new(f'm{i}')
    material_i.diffuse_color=(r.uniform(0,1),r.uniform(0,1),r.uniform(0,1),1)
    bpy.context.object.data.materials.append(material_i)
    angle = ((i-1)*4*(m.pi))/n
    bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(0, 0, 0), "orient_type":'GLOBAL', "orient_matrix":((0, 0, 0), (0, 0, 0), (0, 0, 0)), "orient_matrix_type":'GLOBAL', "constraint_axis":(False, False, False), "mirror":False, "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":False, "release_confirm":False, "use_accurate":False, "use_automerge_and_split":False})
    bpy.context.object.rotation_euler[2] = angle

Please post code as code block. Easier to see, able to copy paste to test, wont be cutoff at edge of screen capture, etc...

@Ratt Here you are! you have to make an object , select it ,then run the script.  in this case i have used a circle.

Part of the issue is that when you append the new material to the duplicated object you never change the index of the active material slot which remains at 0 from the initial object. If you inspect the material slots of each object in turn you continue to add another material but never assign it. I would think that instead of constantly adding additional materials you would rather just have 1 material per object in this case.
import bpy
import random as r
import math as m
n=25

for i in range(1,n+1):
    ob = bpy.context.object
    material_i= bpy.data.materials.new(f'm{i}')
    material_i.diffuse_color=(r.uniform(0,1),r.uniform(0,1),r.uniform(0,1),1)
    if not ob.material_slots:
        bpy.ops.object.material_slot_add()
        new_mat = material_i
        ob.material_slots[0].material = new_mat
    else:
        new_mat = material_i
        ob.material_slots[0].material = new_mat
    angle = ((i-1)*4*(m.pi))/n
    bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'})
    bpy.context.object.rotation_euler[2] = angle

thank you so much!

Matrices, object copies  and Object Color.
Same Material with different key frames
Why does editing a material on one object change lots of other object's materials as well?
First going to give the context object the simplest of materials, that uses the object color.

All our linked copies will have the same material, and take on the value assigned to their respective object color.
Matrices.
For my circle have started with a skinny torus at global origin (the default)
To do what is akin to an edit mode transform of 2 in x direction will make a translation matrix and apply it the torus, which will have the effect of shifting the mesh 2 to the right while its origin remains at the center.
Next will make a rotation matrix that rotates $4 \pi / n$ radians about the z axis.
Each copy will have this rotation applied.
import bpy
from random import uniform
from mathutils import Matrix
from math import pi
n=25

T = Matrix.Translation((2, 0, 0))
R = Matrix.Rotation(4 * pi / n, 4, 'Z')
#M = R @ T

ob = bpy.context.object
ob.data.transform(T) # like an edit mode transform

coll = bpy.context.collection

for i in range(1, n+1):
    copy = ob.copy() # copy object
    copy.color = (uniform(0, 1), uniform(0, 1), uniform(0, 1), 1)
    copy.matrix_world @= R
    coll.objects.link(copy) # link to context collection
    ob = copy

Test Run on my torus

your approach was a little different but thanks a lot!


text:
How do you follow an animated object without using the camera?
I am animating a project where an object moves along a Bézier curve and rotates at different points of the curve. I'm having trouble with figuring out how to follow that object on the path, so I can rotate it accordingly.
I don't want to use the camera, because I don't want to animate in camera mode. The solution that I'm working with is to press Num every once in a while which is super annoying.

Under the n menu "View" tab there is an option for "Lock to Object"

Thank you so much. This saved me so much time.

You can use "Lock To Active View".
This will lock your view to the object you've locked onto.
To enable it, press "shift + numpad ."
Your keyboard shortcuts may vary, so you can look it up under
edit -> preferences -> keybind -> Lock to active view

What is "Shift numpad"? Is it Shift + the key labelled "Num" on the numeric keypad? Or something else?

Maybe it's [Shift] + [Numpad Dot]? But in Blender 2.9, searching for Lock to Active View by F3 gives me no matches. The command View > Align View > View Lock to Active has no shortcut by default, and [Shift] + [Numpad Dot] is not assigned.  But View > Align View > View Lock to Active does what is described in the answer with the screenshot (Lock Object to [Cube])

you need to search for that in the keybinds, as ive mentioned there, whoever edited it, edited it incorrectly


text:
Making face blendshapes with multiple facial hair options
I'm trying to make facial animations for my model, but am trying to think of a way to easily link up facial features to the blendshapes I'm going to make before I start to make it as painless as possible for me at the very beginning.
It's a model where the user will be able to select the cosmetics, so no facial features, mustache, beard, both, etc. Currently they are separate meshes (though if there is no way to make this easier I'll just merge the meshes and do them all manually like that) I'm mainly trying to find a way to link up the vertices and meshes in some sort of way so that making blendshapes for the bare face will also apply to the other facial features.


text:
Why does the base color ,in material, for my object (Donut) keep changing color?
As you can see the Ive been learning blender form the BlenderGurus how to make a donut videos. Ive been having a pretty smooth run of it, so far its been enjoyable. But Ive run into this problem with the color of my donut!
The donut color used to be pink. I changed it to a tan-ish color, not to long ago in the donut making process, to make it look more like a real donut.
For some reason it kept changing back to pink and then back to the tan-ish color I changed it too, while Im progressing my creation, doing different things. I was just excited to move forward, so I just kinda chopping it up to technical difficulties, it fixes itself so didnt seem like the biggest problem.
But now its irritating because i don't know why it's happening, and the color in the material section says it's the color I changed it too, but it's displayed diffrently .
Plus Ive added texture paint that is no longer visible, which is really annoying!
I tried saving and closing it to see if it would fix it self as it has previously (just randomly I might add) , but it hasnt.
Im hoping its not permanent, and perhaps its a quick fix Im just unaware of.
If anyone knows what to do please let me know.

The pink/purple color indicates a "missing" texture.
You don't have material color, you have an "image texture".
Your file is losing reference to the image file, that usually happens if the file is not in the same directory of your donut.blend file.
If you move the image file there and reassign the texture to the new path, it will probably solve.
Alternatively, you can pack your images into the .blend file. It will make the file bigger, but you will never lose reference. How to pack images into blend file

Moller you've been a great help! I found that my texture file was seen as 'missing', so following your advice I packed the images into the blend file and located the missing file manually. My project is back on track!               _Thank you!


text:
auxetic expansion
I am trying to obtain the expansion of the auxetic structure, which should look like something in the picture, but I could not figure out how to do it. Could you help me?
I really appreciate any help you can provide.

The mesh is quite messy, but the rig should be like this:
A_Top doesn't have a parent (Alt P to remove it)
B_Top is child of A_Top
A2 has an IK constraint targeting A_Top, chain lenght 2
B2 has an IK constraint targeting B_Top, chain lenght 2
Moving A_Top on Z axis will do the job.


text:
When unwrapping a UV map, how do I make the UV nodes connect to eachother instead of being many separate islands?

Here's and example of what I want to do, some parts of the object are their own separate islands, while some are connected, like the large one in the right corner is symmetrical. Any help is appreciated.

Hello, you need to create some UV seams then press U > Unwrap and choose one of the 3 first options, the islands will only separate depending on the seams

@moonboots Could you give an example on how to? Thanks.

in Edit mode, select the edges where you want the seperations to happen and press U > Mark Seam, then select all and U > Unwrap > choose one of the 3 first options


text:
Save Custom Layout in Blender 2.67b?
How can I save my custom layout in Blender 2.67b?
Changing the name of the default layout, clicking the plus-sign to the right of it, and "Save User Settings" in User Preferences all don't work!
Is this a bug? (because all the above does work in previous versions of Blender).

If the answer was what you want, please accept it. If no, comment about why.

The User preferences such as addons have been separated from the startup .blend in Blender 2.66
So as of Blender 2.66 clicking "save user settings" in the User Preferences menu will only save settings such as enabled addons, themes, shortcuts/hotkeys, etc..

To save the current blendfile (includes layout(s)/materals/models/settings etc.. Pretty much everything.)  as the startup .blend, press Ctrl+U and click "save startup .blend" (Note that this includes User Preference settings)
To save a different screen layout so it is accessible in the selector at the top of the window,

Press the + to the right of the drop down selector, Arrange the screen the way you want it, then name it whatever you want. (Note that to have it defaulted when you start Blender you then have to save the startup .blend (Ctrl+U)

What if I want my custom layout settings be available in any blend file I open? Not just in startup file. And I mean available only as an option in list, not as current layout.

@PawełAudionysos Not something that can be accomplished easily, as far as I'm aware.. You might be able to write an addon which checks for the desired screen (and appends it if it's not present).

It is possible. Check this out  https://docs.blender.org/manual/en/dev/advanced/app_templates.html *application templates.
I need help to configure that .py file to register and unregister the workspace and the splash screen.


text:
Can Blender make a timelapse video?
I was wondering if there is a script or addon that allows me to make timelapse videos of my blender projects?
For example, is it possible to add a camera to the scene which takes a quick image of the scene from that point of view every couple of seconds or moves?

Seems you are looking to make one of those 'Work-in-progress' time lapse where it shows the making of a model, correct?

This sounds like an interesting idea.. I think I'll try and write an addon which does this now :)

The problem will be the rendering... because it has to be quick enough and will comsume resources if you really render the scene. But I guess that isn't what OP wants anyways, right?

Hi guys, what they say below, they mean an image sequence creation through this screencast right? Let me know if you write this add-on. it would be great if it just recorded in solid view too.@gandalf3

The built-in Screencast tool is configurable such that you only get one frame every few seconds... or minutes.
From the docs:

The default settings will generate a screencast consisting of a series of PNG images captured every 50 ms... The FPS for video Screencasts and time between each Screenshot for an image series Screencast can be set from the System panel of the User Preferences window.

If you're wanting a fixed-position shot of the current state of your model, though, this won't work. It'll just take a screenshot of whatever your Blender screen looks like at that moment.

so it is not possible to make a recording but only via image file? i can't find this built-in screencast feature.

I don't know if the built in Screencast feature has changed, but so far as I know, it does not produce a video file, but a sequence of images that you then compile into a video with Blender or another video editor.

thanks, unfortunately I can't find it anywhere. however you can select the camera from where to capture images? if I can find the tool, of course. lol

This feature was removed in Blender 2.8 :-( Got any alternatives?

You can set Frame Step to skip frames by every certain number.
e.g.: If you want a 2x timelapse, then set the number to 2.

You can also make it by tweaking the Time Remapping option, as shown in the same image. For example, Old=100 and New=50 for a 2x timelapse, However, you should also set the new End Frame by half, in order to offset the total number of render frames, because it will be doubled actually if you don't do it in such case, so this is not so recommended, personally speaking.
Furthermore, you can also have the Frame rate doubled, but that's obviously not a nice way either.

I think the OP wants to record a time-lapse animation from a camera while they work, rather than rendering or converting an existing video.


text:
How to post a new entry to the help menu with python
I am making an updater for blender and I want add "Update Blender" entry to the Help menu. How I do that ?
I know about the menu template , I know how to make the menu, my question is how I inject it to the bottom of the Help menu.

You need to make a custom menu drawing function, accepting two arguments: the parent Menu object and context access object.
def draw_help_item(self, context):
    self.layout.operator('wm.new_help_item', text = "New Help Item")

Then either append or prepend the function to the menu's class upon registering the new class, and remove it when unregistering:
def register():
    bpy.types.INFO_MT_add.append(draw_help_item)
    bpy.utils.register_module(__name__)

def unregister():
    bpy.types.INFO_MT_add.remove(draw_help_item)
    bpy.utils.unregister_module(__name__)

The appropriate class' name, in this case bpy.types.INFO_MT_add, can be searched in Python shell assisted by autocompletion. It's usually prefixed with the area type, then either _MT for menu or _HT for header, and is fairly easy to deduce which UI element it corresponds with.


text:
Surface detection
Does anyone know if there is a way in Blender where you can arrange models in such a way that the don't pass through each other? I realize in animations you can have collision detection but is it possible in static image. Such as putting fruit in fruit bowl and having some sort of collision detection.

Aside from using physics to arrange objects (which is a common practice, there is nothing wrong with doing that), you can use Snapping.
There are several ways to snap the surface of one object to another object:
Transform Snapping:

Enable snapping 3D view > Header by pressing the magnet icon, and set the Snap Element to Face:

Now when you transform an object, it will snap to the surface of whatever object is under your cursor:

Note that you can enable or disable snapping (depending on if it is already enabled in the header or not) during transforms by holding Ctrl.
Snapping with the 3D cursor:

Snap the Origin to the point on the source object you wish to snap to the target object.
Either move the 3D cursor by clicking on the object with LMB when Cursor Depth is enabled in User Preferences > Interface > View Manipulation With the source object selected, or enter edit mode (Tab) and select the element you wish to snap to the 3D cursor and press ShiftS>Cursor to Selected. Then press CtrlAltShiftC>Origin to 3D cursor to move the origin to that element:

Move the 3D cursor to the surface of the target object either by selecting a geometry element (vertex, edge, face) on the target and pressing ShiftS>Cursor to Selected, or again by clicking on it with LMB when Cursor Depth is enabled in User Preferences > Interface > View Manipulation:

With the source object selected in Object Mode, press ShiftS>Selection to 3D cursor:

You can then reset the origin of your object by pressing CtrlAltShiftC.

You can always use a Rigid Body simulation for placing objects when it's inconvenient to do it all manually.
Here's a simple setup with a bowl set to be a passive object with some balls set to be active.
Something to note is that for complex objects, the collision will be most accurate with the Shape set to type ->Mesh
Here are some images that show mostly default settings.

And a quick animation of the result. Cuckoo for Cocoa Puffs?

True, but you should give a short step-by-step guide how to do that. "Ridgid Body" should appear somewhere as buzzword.

Hmm, that would be one way to go about but I was looking for dynamic solution where when moving an object in scene that it would automatically re-position itself against the surface normals in the other object rather than intersecting. The reason I posed this question is because I have over 12 years experience with ZBrush and with ZBrush once you have dropped an object to the canvas any other object that is still in edit mode will automatically re-position itself according to other objects that have been dropped to the canvas.


text:
Output two files when rendering an animation
I'm working on rendering out my first 3D animation from Blender!
It is a scene that I'm rendering with a transparent sky that I'll composite in After Effects later. I'm outputting to Radiance HDR so I can do HDR toning in Photoshop. . .
So, what I've done so far is render a few frames, then save them first as a Radiance HDR and then as a PNG. I use the HDR for my image data and pull the alpha channel out of the PNG, the problem I'm having is that when I render my animation I don't have the option to output both filetypes.
Is there a way to output more than one filetype while rendering an animation?
Or maybe there is something else that I'm missing all together, thanks in advance!

I'm sure there's some way to render two filetypes at once, but I would recommend simply rendering out one first, then converting it to another type afterwards using something like ImageMagick. For example, to convert a bunch of png's to jpeg's, you would simply type: mogrify -format jpg *.png

That's a thought... I'll keep that in mind, Matt's suggestion does what I was really wanting, so I'll just stick with it for now.

Yes there is a way! The Compositor has a File Output node, of which you can have more than one! This node should allow you to save as many versions of your image as you need, at whatever stage of the compositing process, and with whichever passes you need.

I'll try that, I've never messed with compositor nodes yet... Will let you know how it goes!

Cool! BlenderGuru has a tutorial that you might find helpful: http://www.blenderguru.com/videos/introduction-to-the-compositor/ Good luck!

I figured it out... At least what I tried worked pretty good, but I'll watch the video you sent as well. Thanks a Million!

While you can add more than one File Output node you can also configure more than one output setting within each File Output node. Adjustments can be made in the properties panel (N) with the File Output node selected.

I did not know that! Awesome!

Thanks! What about the annoying output option in the panel? I already have all my outputs desired in the node editor. Leaving that blank stops my rendering; writing something there is weird too.

I'm not sure what you mean. Do you mean the output section of the render settings, where you normally set output? If that's what you mean, just use that like another file output node. You don't get to control at what point it outputs an image, but you can still save out the final image from there. If it really is totally worthless (sometimes compositing behaves strangely), I'd just choose the highest compression ratio and put them all in a folder you can delete easily.

If you select OpenEXR (which is also an HDR and multilayer format) as the render file format, you will have the option to save a JPEG preview automatically.

I just figured that out... I'm just exporting as OpenEXR now and using the embedded alpha channel.


text:
Is there a working extension to import Kinect skeleton data as animation into Blender?
I already tried Bloop which would end in rewrite lots of C++ and Phyton code. The issues with bloop are described here im-so-annoyed-im-resurrecting-this-blog.
For other things like RGBDemo the dependencies to OpenNI are no longer available.
It wouldn't be necessary that the import is done in real-time.
Is there any working module/add-on, external converter?

Have you looked into http://www.ni-mate.com? They have a live kinect-to-blender plugin.

@MikePan Thank you so much I didn't notice ni-mate, can't wait to try it.

There should be a script for importing bvh files under
File -> import -> Motion Capture (.bvh)
, at least in current versions of blender.
A program to save kinect skeleton data as a .bvh file can be found e.g. on  the following site:
http://tech.integrate.biz/kinect_mocap.htm

After uninstalling the Kinect SDK (which conficlts with the OpenNI stack) and installing everything from http://tech.integrate.biz/openni.htm I still get the error: kinect10.dll cannot be found.

+1 for pointing out the existing import function for .bvh files. Thanks

After uninstalling everything and install OpenNI stack followed by Kinect SDK 1.0 (old) I was able to start BVH Motion Capture. But as soon I start recording it terminates (Caught AccessViolationException in OpenNI.dll).

The kinect drivers & openNi can be problematic to install, I would recommend 'brekel kinect auto installer' available at http://www.brekel.com/ under "Brekel Kinect (free)" -> "download".

I just found that software, currently installing, thanks

As suggested by @sarahm I tried Brekel Kinect and it worked with the following settings:

The results weren't as good as I hoped: The sceleton jitters, bones are sometimes crossed.

Kinect and similar gaming devices are designed to recognise motion more than record it, it's very limited for motion capture.


text:
Why does my Properties panel cover my whole active 3D Viewport when I press P?
Why does my Properties panel cover my whole active 3D Viewport when I press P? It never used to do this, it always toggled my Properties panel open and closed, as it should. But just starting today, when I press P, it covers my whole active viewport, but it doesn't even show any of the properties on the panel. Also interesting is that once the panel has covered the viewport, pressing P again will not close it again -- the only way to get it to close is press ESC, and then the panel just goes back to being open normally, not fully closed:
By the way, I'm using 2.70, and this problem continues even if I quit & restart Blender, and also if I reboot my computer.

Also interesting is the fact that if the Tools panel is open when I press P, the Properties panel will cover even it:

By pressing P you are starting the game engine.
N opens and closes the Properties panel.

Ugg...that's an easy way to imbibe humility...thanks.
XP

What you are seeing is not the properties panel. The keyboard shortcut P start the blender game engine, "P" for play. If you were to add in some object and hit P this would be very apparent that it is not the properties panel.
Pressing P at the default scene.


text:
Help with being unable to select a specific object
I have four objects (planes) that I have worked on, and I applied image textures, etc., and they display OK in the wireframe/solid/render views, but for some reason I now can't select them, and they aren't even showing in the outliner at all (they still show if I hide all the items in the outliner).
Any ideas? Is it something dumb that I've clicked?
I am using Blender 2.76b.

Can you upload a screenshot?

https://drive.google.com/file/d/0BxBRmMnKdkzFYmY3aFJSOEU3Uk0/view?usp=sharing

or even upload the file? (http://blend-exchange.giantcowfilms.com/ is permanent)

The possible reason why object isn't shown in the Outliner is that it's parented to another one, hence it'll be shown in hierarchy of the parent (which can be anything). It won't explain why object is unselectable though and it's hard to judge given the provided information. Please consider uploading the file as it's recommended already, thanks.

The file is 11Mb so if that's not a problem I'll upload it

The plane is there. It is selected. You can see the word "plane" highlighted in the outliner. That means it's selected. The eye icon is greyed out though.  You also have a gazillion other planes (plane.001, plane.002...). They all have their eye icon greyed out too. That means you can't see any of them in the view window. Also, you are on the wrong layer. The plane is on layer 15. You can tell because the little dot on that layer is orange. You are currently on layer 1.

The object could be inhibited from selection (arrow icon disabled in the outliner), but maybe currently outliner is also set to show only other scenes, or object types (ie: outliner is not set to "All scenes") so you don't see it, atm.

Thanks for the reply. All the arrow icons are displayed and All scenes selected (I've tried every view to try to find it!!)

Do they get selected with CTRL-A?

@morp I did notice you have multiple layers. Have you tried looking through all your layers?

Yep looked through every bloody layer (repeatedly just in case the buggers were hiding) :)

They can't be selected with any method. It may be worth adding that it was originally a SketchUp dae file imported , but as I have worked on the objects in question I didn't think it relevant.

try also appending their mesh (not object) to another fresh file, and assign the appended mesh to a native object. If they behave correctly, save the file and import them back in the current .blend

But I can't find any trace of it (apart from in the view windows) so not sure how I can do anything. I guess I'll have to transfer everything else on that layer to another and ignore that layer and redo the objects. Thanks for all your help though - much appreciated


text:
Mirror modifier: Mirroring does not come out right
In the red lines, that's my object I want to mirror. But as you can see, the mirroring does not come out right. It's not even a mirrored object of what mine originally looks like. How do I get this right?
Playing around with the merge limit didn't really change it either. It still cuts a part from the original one or overlaps it.

Did you try adding an empty at the centerpoint/line where you want to mirror to take place and then selecting it as the Mirror object in the modifier?

how do i add an empty and what is that?

What is empty. In general empty is just another way, while first way assumes placing origin point as needed. In this case origin point of the object is placed wrongly.

The mirror modifier mirrors from the object's origin, unless specified in the "Mirror Object" field. Move your object's origin to the object's corner, or add an empty in that corner and use that empty as the Mirror Object.


text:
How do I triangulate a quad along the alternate diagonal direction?
Quite often I come across a mesh where I have a quad I want to triangulate, however upon pressing CtrlT, it triangulates in the opposite direction I want it to. I'm only dealing with a single quad within the entire mesh, so I don't want to use the triangulate modifier here.
Is there an way to have more control when triangulating a single quad within a mesh?

Ctrl+Shift+T, answer below could be updated.

You can choose Fixed or Fixed alternate in the redo panel after triangulating:

If you prefer an all keyboard shortcut method, you can press CtrlE, R after triangulating to rotate the edge.

However if you are only triangulating a single quad, you can also select the verts you want to create the edge between and press J:

Another option that is available is rotate edge. This is available in Mesh->Edges->Rotate Edge or the edges popup menu with CtrlE

This will rotate any edge so that each end gets moved to the next vertex. You only need to select one edge but if you have two triangles selected it will rotate the edge in the middle.

Ctrl+Shift+T used to be set to Triangulate alternate but now apparently it is set to fixed while Ctrl+T is set to Beauty. You can go to hotkeys and search Triangulate to change it back to alternate instead. Then you have a direct hotkey for it.


text:
How to save an image created from python script including the alpha channel?
I have tried the following, and the resulting image file, when opened in GIMP, never contains an alpha channel, only R, G and B.
import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.filepath = "//Sprite.png"
image.file_format = 'PNG'
image.save()

Result: no alpha channel in png
import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.colorspace_settings.name = 'sRGB'
image.use_alpha = True
image.alpha_mode = 'STRAIGHT'
image.filepath = "//Sprite.png"
image.file_format = 'PNG'
image.save()

Result: no alpha channel in png file.

This is a bug in Blender, I've reported it on your behalf.
Setting image.colorspace_settings.name changes the alpha at the moment, reported (now fixed!)
This script works, notice it sets filepath_raw, which prevents reloading to the new path.
import bpy
image = bpy.data.images.new("Sprite", alpha=True, width=16, height=16)
image.use_alpha = True
image.alpha_mode = 'STRAIGHT'
image.filepath_raw = "//Sprite.png"
image.file_format = 'PNG'
image.save()

Thank you. I started to suspect that this was a bug. As a temporary solution I was temporarily set an empty layer and the render file path to do an empty render with ops.render.render(write_still=True) to produce an empty png with alpha channel and then create a temp image pointing to that file and reload. But if filepath_raw works I will do that from now on.

@ideasman42 I'm trying to use your code to save to OpenEXR. It works, but how do I specify the exr_codec when saving? My files are saving without a codec, so the file sizes are huge. I'd like to use the ZIP codec.

How to set a relative subfolder: //texture/sprites.png  doesn't work.

Prefer handle other issues as separate questions, feel free to link to them in comments here.


text:
Creating volumetric lighting (crepuscular rays) in Cycles
Crepuscular rays (a.k.a. "god rays" and many other names) can be created in Blender Internal by checking the Halo checkbox in the lamp properties box.
How can I create a similar effect using Cycles?

I don't think this is possible currently. This should be possible once volume render is integrated in 2.69 or 2.7

It is possible, the question is, for what effect do you need it? I don't know atm if 'light through clouds in the distance' will be pretty, but simulating halos is possible.

related: http://blender.stackexchange.com/questions/1294/how-to-use-the-volume-socket-in-cycles

Actually I just need a simple way to visualize a coded light source (something like structured light coded light grey patterns). I would like to create a coned light source that is masked by another object, and light can only pass through the slits.

@Mercury I'm not sure I understand.. you will still need volumetrics if you want to see the light in the air.

@gandalf3: you are correct. my question is if there is a way to do it although it is not possible(yet) in cycles, as I don't need somthing very complex...

@Mercury See my answer. I have listed some ways that I know of to fake this in cycles.

Update
As of Blender 2.70, cycles has had volumetric support. See this answer for details on how to set up crepuscular rays with the new volumetric features.

As mentioned by Wchargin, this will be possible once volumetrics is integrated.
However, there are some ways to fake this:

Using motion blur:

Basically you use a plane that moves through the entire scene
  perpendicular to the camera, then turn on motion blur and increase the
  frame blending enough so that cycles is calculating the entire motion.
  The plane will catch the light and blend it through the whole scene
  giving the illusion of volume lighting. I used a mix of diffuse and
  translucent material for the plane but wouldn't be surprised if there
  was a better material method.

Using BI to render halo volumes and then use compositing nodes to combine with Cycles render

You can use Sun Beams node in the Compositor, introduced with Blender 2.72.
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Compositing
it doesn't involve true volumetrics and renders super fast, although it's not as flexible and thus not suitable for all situations. Here is a simple example:

What is this Add node? I can't find it :/ the one from Math doesn't look the same

It's under Compositor nodes Color > Mix

The term you're looking for is volumetric lighting, an alternative name for crepuscular rays. Unfortunately, Cycles does not yet support volumetric lighting.
For more info, check out the Cycles Roadmap:

For 2.68, the following features are planned to be worked on:

Hair shader
Ubershader (combined diffuse+glossy+transparent node)
Look into of improvements for SSS, AO, mist, ..

After this the next big feature will be Volumetrics. Probably the
  first release with Volumetrics will be 2.69 or 2.70.

(emphasis mine)


text:
Interactive Python workflow for Blender beginner
I have need to do some 3D fluid piping simulations, and I am seriously considering Blender. I believe Blender is the right tool for the job, but I would like to confirm this before I dive in.
I want to skip the GUI tools as much as possible and instead use python to carry me initially (I want to avoid anything that needs the mouse). My goal is to set myself up for automation by building on Python right from the start. I am coming from AutoCAD, and I am hoping for a similar experience to AutoCAD command line with LISP (meaning, I don't have to touch the mouse if I don't want to).

Is Blender the right tool for what I want?
Should I consider alternatives like PyOgre (for a pure-python experience)?

Can you explain what you mean by Interactive Python Workflow? - Automation and interactivity are not mutually exclusive - but in this context I'm not sure how you intend to interact with blender without using the mouse, for eg.

Meaning I would rather build my models one line at a time rather than one click at a time. I will very likely still need the mouse and some of Blenders visual aids, but am hoping to assembly my project from a python interactive session.

do you mean you would want to build your models in python getting feedback from changes for each line of script executed?

Basically yes. I have been digging through the 2.5 py-cookbooks, and I think I like what I see. The API is a little more verbose than I had hoped, but I should get over that soon enough. My first py-module might be a set of PROXY functions similar to AutoCAD commands. Then I can just start hacking away on my model.

You shouldn't repeat your questions in multiple SE sections.

Yes, as long as Blender has the functionality you need, I would say automation in Python is one of Blenders strengths.
In fact Blender's SPH fluid simulator was developed/improved by a company who made a product that did automated fluid simulation that ran on a supercomputer to test fluids behavior in through different pipes/containers for a commercial project.
But you can automate many other tasks too. see AutoCRC (bottom of credits page link).
Blender can for example be compiled without a user interface, as a Python module (or just run release builds in background mode), and perform automated physics simulations, video editing, rendering, file format conversions, mesh processing - etc.
There are some caveats though:

Not every area of Blender has been used in automation, if you try to automate something that nobody tried before, you mileage may vary(fluid simulation should go fine, but some areas rely on a user interface - game engine or sculpting for eg).
Its best to first use the interface to setup tasks before automating.From your questions it sounds like you may want to avoid using Blender at all? I think its not wise to avoid using the UI at least for testing steps to be automated.

As a starting point for automation in Blender, I'd recommend see the Background Job template. See:Text Editor -> Templates -> Background Job.
This means you can run Blender from the command line to execute the task.
Another example (based on that template) that renders FBX files from the command line.
Any pure-python solution depends totally on the python-modules available to use, I wasn't aware of PyOgre being able to do fluid simulation - and am not familiar with fluid simulation in Python in general, so its hard to answer this part of your question.
Note:
Your question asks "for a beginner", I wouldn't consider this a beginner project, and I don't think being a beginner makes any difference to the answer. This stuff you have to learn one way or another and if you are a beginner you may just take longer to figure it all out.

I do plan on having the GUI running at all times. I said pure python as an extreme, but I expect for some staging and project management I will learn parts of the GUI. What I meant to say, was I want a strong Interactive Python experience.

Note, Im not actually simulating fluid dynamics (maybe one day). For now I was just going to use Particle systems confined to a pipeline geometry (which PyOrge can do).


text:
Snapping points of a roughly spherical mesh exactly onto a sphere
I have a mesh whose points ought to lie on a sphere.  They don't, but are roughly close.  Is there a convenient way to nudge them all along their radii to "snap" each to some fixed R?
I've been nudging each vertex by hand, for a simple demo model, but this isn't practical when I get to more elaborate cases.  I tries extrude-scaling the mesh toward the center point, then using a boolean intersection with a sphere, but that cut off all the intricate surface topology, leaving hollow shapes like oddly tapered cookie cutters.

To sphere:
You could try AltShiftS>To Sphere:
From the wiki:

The To Sphere transformation will give the selection spherical qualities.

Example:

Shrinkwrap:
Or using the Shrinkwrap modifier to shrink your mesh to a sphere object.
From the wiki:

The Shrinkwrap modifier allows an object to “shrink” to the surface of another object. It moves each vertex of the object being modified to the closest position on the surface of the given mesh (using one of the three methods available).

You could add a shrinkwrap modifier to your mesh and set the Target to a sphere:

One advantage of shrinkwrap over to sphere is that you get to decide exactly where the new sphere shaped object is and how big it is (the same as your target). With to sphere, the new object placement is somewhat random.

Hah, forgot about "To Sphere" due to lack of use the last few years. Saw it when I first learned Blender.  But Shrinkwrap looks great, since it handles non-spheres also.


text:
How to perform element-wise multiplication with mathutils.Vector?
In Blender's I can add/subtract mathutils.Vector without any problems.
vec3 = vec1 - vec2  # OK return a vector

But! It's paint to multiply/divide vector. For example if i multiply vectors i'll get a float.
vec3 = vec1 * vec2  # ERROR return a float

Is there a method to multiply/divide vectors correctly? like vec1.mult(vec2) which exists in other game engines.

Note, this is known as "component-wise" or "element-wise" multiplication, see:  http://math.stackexchange.com/questions/32516/is-this-vector-operation-defined-does-it-have-a-name

@mifth, I'll look into adding element-wise-multiple, there doesn't seem to be a convention for this for object-oriented-Vector API's though, asked here: http://programmers.stackexchange.com/questions/277583/vector-api-naming-for-element-wise-multiply

@SixthOfFour, best move suggestions to the page linked.

@ideasman42 Regarding conventions for component wise multiplication of vectors: This is the default mode in GLSL. And I think it's a sane default. I found it very surprising that mathutils.Vector does not support this. You might argue that GLSL is not an object oriented API, but doesn't numpy also use this convention? Source

After a little bit of research, I concluded that the closest you can get is to use mathutils.Vector.cross() to do a cross multiplication of two vectors, or mathutils.Vector.dot() for dot multiplication; this info was gathered from The API documentation.
However, this doesn't seem to be the behavior you want - it seems you want to multiply the individual components of the vector, for which you can use something similar to this:
def mult(vec, vec2):
    temp = []

    for x, i in enumerate(vec):
        temp.append(i * vec2[x])

    return mathutils.Vector(temp)

Just curious: does anybody know why this is not mentioned in this source? ( https://docs.blender.org/api/current/mathutils.html ) To make it even more puzzling, it is mentioned in the v2.44 documentation... Am I looking at the wrong package or something?

I am amazed mathutils.Vector class does not support vector scaling by another vector!
This can be for example useful when you get scale vector from matrix decomposition and you want to scale other vectors accordingly.
This is with a generator expression for better performance:
vec3 = Vector(x * y for x, y in zip(vec1, vec2))

generator-expression is a little nicer then list-comprehension here, edited.

@ideasman42 good point!


text:
How can I copy all selected Keyframes?
I tried to select a few keyframes and copy them at a later position in the dope sheet, but only a single finger was copied. Probably all keyframed items must be selected before copy and paste, how can this be achieved?

The image shows what happens when the keyframes to left of the current frames have been box-selected and pasted after the current frame.

Instead of copy and paste, have you tried duplicate shiftD and drag, (or type in the number of frames) to the required position?
You will find that copy is applied to the selected object/s (or in pose mode the selected bones) As shown in your example Finger-2_L is selected, the highlighting across the whole line indicates this, and therefore that bone has the only copied keyframes.
Duplicate however will duplicate all selected keyframes (all the diamonds highlighted in yellow) which is the action you want in this case.

To expand on that - the example image shows Finger-2_L is highlighted (across the whole line) as in that is the currently selected object, that current selection is what copy/paste gets applied to. Duplicate is applied to all selected keyframes.

@sambler I didn't know that - learning all the time. :) Maybe you could add it to my answer.

To Copy/Paste keyframes in the same object you can easily go to the Dope Sheet Right Click  to choose the action you want Shift+Right click to choose more then one action, then you can simply Ctrl+C to copy the keyframe.
Then go to the frame you want to paste it and Ctrl+V.
How to duplicate keyframes?


text:
How can noodles (the lines that connect nodes) be changed from straight to curved lines?
Unitl now I haven't found the option to enable the curved representation of connectors between nodes. The documentation doesn't mention such an  option. Is there a keyboard shortcut?

I thought curved was the default? (maybe you mean from curved to straight?)

@gandalf3 Just installed 2.68a and wondered why all tutorials looked different.

The option can be found in User Preferences > Themes under Node Editor:
Higher values will increase the curviness of noodles. Setting it to 0 will make them straight line.
For 2.7#

For 2.8#

Lovely that you connect nodes with noodles :D

authors: ʇolɐǝz ǝɥʇ qoq


text:
Can game settings be changed dynamically?
I manipulate a game property using logic bricks. I can read the property in the following script and set the value of bpy.context.scene.game_settings.stereo_eye_separation which is changed as long the value is less than 5.0.
Unfortunately, setting this value during runtime has no effect.
Is there any 'update' method I'm supposed to call or another way to apply the changes?
import bge
import bpy

co = bge.logic.getCurrentController()
print( co )
sep = co.owner["eye_separation"]
print( " property:%f" % sep )
bpy.context.scene.game_settings.stereo_eye_separation = co.owner["eye_separation"]
print( "gs.stereo:%f" % bpy.context.scene.game_settings.stereo_eye_separation )

The bpy module is unlikely to have any effect during game play; you should use bge instead. Try bge.render.setEyeSeparation().


text:
How can I reset the Rotation of a Meta-Rig Control?
I accidentally changed the rotation of the finger control (selected, cyan or blue color in the image)  but now I don't have a glue how the orientation could be reset. Moving the original bone in Edit Mode doesn't work. How can I reset the position of this Control to point to  the same direction as the other finger controls do?

Since we don't know how you arrived there, have you tried Alt + R?

@iKlsR Yes, then the control moves to the right direction but the finger (deformed mesh) points downward. I know you warned me that rigify isn't for beginners.

there are several possibilities here, try seeing if a constraint is affecting it. Additionally, there should be some bone shapes on the last layer, have those been changed?

@iKlsR Thanks you, now it works Alt+R, switch tweak layer on and adjust with the finger tweak (circle shaped control). Should I remove the question or answer this for the stats?

answer! :) It might help someone else in the future, list everything that you tried etc.. or where you went wrong.

In the future, here are a list of things you can go through to try and identify or fix the problem:

Try clearing the rotation of the bone with Alt+R (this is a no brainer :)
Check to see if any constraints are affecting the bone
Check to see if you have made any changes to it in edit mode
Make sure that none of the custom bone shapes on the last layer (this is the default location) have been modified.
Some of the bones have options under Rig Main Properties that can revert them back to their original state/position
Check to see if any keyframes have been accidentally added.

Thanks, can I always except dashed lines or a changed color when a bone is influenced by a constrained?

@stacker I don't quite understand what you are asking..

some of you bullet points start with "Check to see.." what I wanted to know is how can I check this? Is there always a change in colors of bones or a dashed line (like in an IK chain)?

@stacker oh yes, that is one way to tell. You can also check the bone constraints panel in the properties window.

After reseting the rotation Alt-R while the finger control was selected (as suggested by iKlsR) I had to enable the Tweak Layer (highlighted in the image) after that the finger could be repostioned by the circle shaped controls.


text:
What is the difference between a UV Sphere and an Icosphere?
When working with or adding meshes, I've seen UV Spheres and Icospheres being presented to me. What are the differences between them, when should either be used and is there anything I should take into consideration if I want to have them render cleanly?

The major fundamental difference is how each sphere is modeled. The UV sphere, somewhat like latitude and longitude lines of the earth, uses rings and segments. Near the poles(both on the Z-axis with the default orientation) the vertical segments converge on the poles. This sphere is useful for projecting terrain onto planets and/or complex modeling as it is readily subdivided even after being created, and maps onto equirectangular projections (plate carrée) readily.
The icosphere uses a different approach. A polyhedron is made with triangles which are placed(at various subdivision levels) as an icosahedron (thus the name) and more finely-subdivided solids. All faces have the same area, which may be useful for certain types of UV mapping containing non-organic textures. An example that comes to mind is an isocahedral die or billiard balls where stretch must be minimized near the point where the number is printed onto the ball.

A conparison of UV and icospheres. UV spheres are on the left. Going downward, the subdivision levels are increased. 10 rings, 3 segments; 16/8, and 32/32 for UV spheres, and subdivision levels 1,2, and 3 for the icosphere. Default BI material is used, and light is directly behind camera.
Source: manual page and experimentation with UV mapping.

I guess nothing is stopping me from mapping an equirectangular map to an icosphere, right? Because I can always compute (lat, lng) for each vertex of the sphere, regardless of its triangulation.

Although the faces of an icosphere are roughly similar in size, they don’t all have the same area (except when the number of subdivisions is set to 1, of course). For example, with 5 subdivisions, the largest triangles are about 55% larger than the smallest triangles.

Since you are asking what the difference is I thought I'd point out one of the most important differences between the two kinds of spheres in relation to modelling.

Comparison using many subdivisions
UV spheres are best used in situations where you require a very smooth, symmetrical surface (the more subdivisions the better). However, they do relatively poorly when realistic topology is your key goal. UV spheres are not the best for organic natural shapes, because of their symmetry and the use of quads.
ICO spheres are best used for objects such as:

Geodesic Domes
Planets with realistic terrain
Rough surfaces, such as golf balls.

If symmetry is important, use UV spheres because ICO spheres are asymmetrical.

A displacement modifier on the ICO sphere yields more satisfying results. With a higher number of subdivisions the difference between ICO and UV sphere won't be as noticeable. Generally, though, the ICO sphere looks more realistic and much smoother.

Displace modifier settings
EDIT:
ICO Spheres do have symmetry:

Icospheres are not asymmetrical. From Wikipedia: "A regular
icosahedron has 60 rotational (or orientation-preserving) symmetries,
and a symmetry order of 120 including transformations that combine a
reflection and a rotation." Each of these two approximations of a
sphere has many symmetries - they just have different types, with
different biases and (by some standards) imperfections. –  mjwach

+1 Very useful information! I never really knew what the ico spheres were good for before, thanks!

Little request. In the second image, could you also show the tops/poles of the spheres, where the difference is more dramatic? Perhaps also a strong shader so we can see the contrasts more clearly?

Why not use a round cube instead? It doesn't have any triangles and it's low poly at normal settings.

Icospheres are not asymmetrical.  From Wikipedia: "A regular icosahedron has 60 rotational (or orientation-preserving) symmetries, and a symmetry order of 120 including transformations that combine a reflection and a rotation."  Each of these two approximations of a sphere has many symmetries - they just have different types, with different biases and (by some standards) imperfections.

At the risk of beating a dead horse, another practical difference between the two is that a UV sphere has a distinct bias - it has poles.
When I'm making things like spaceships, they are usually elongated cigar-shapes with a symmetrical cross-section, it's far easier to shape it when the sphere has poles at each end, and all 'longitudes' run from nose to tail, while all 'latitudes' are cross-sections. That would be a big pain if I were to try to use an icososphere.
Contrarily, if I wanted to create something like a billiard ball, which should be uniform in any orientation, I'll use an icososphere.

A UV sphere has faces with 4 edges, while an Icosphere has triangular faces. This results in the UV sphere having a smoother appearance and the Icosphere having a jagged appearance. However, the more faces you have on them, the smoother the Icosphere looks compared to the UV sphere.

the UV sphere in the image above has more than four times the number of triangles in it than the icosphere does. that's hardly a fair comparison.

As for which version shape better for planets, if you give the polyhedrons a very high resolution, either would work unless you knew which shape works for certain formats.
When models were exported to 3DS, UV "spheres" were useful.
For that purpose, I made a planet model with a 256x128 resolution after realizing that there didn't seem to be any higher resolution that could be read for 3DS.
A displacement map was added to render the geology without the aid of normal/bump mapping.
Some apps like Celestia use the 3DS format for meshes.


text:
Any word on custom closures, or new ones?
In an attempt to re-create Valve's Half-Lambert effect in cycles, I found out it is basically mathematically impossible at the moment, without patching cycles.  Does anyone know/have heard/rumored/what-have-you anything about more closures, or even better, custom closures?

A valid question but I think it falls into the 'not so ideal' category. See How should we handle questions about features not yet in Blender?

This is, in my eyes, not even theoretically possible to implement in Cycles. The backside of an object cannot be influenced by a light source on the front, simply because Cycles works with samples from the camera over the surface towards the lamp. There is no way that a sample bouncing off the surface on the back could directly end up in the light on the other side as there is an object in-between.
However, I don't think this shader is necessary in Cycles. It was built to allow even light setups with very few lights to not look over-contrasted and harsh. With real global illumination, which you have in Cycles, light bouncing off of other objects around your object will automatically (at least with more than 0 diffuse-bounces) provide a smooth light distribution around your object from a single light source, which is exactly the effect the Half-Life developers tried to fake.

I'm not sure I understand what you mean by "The backside of an object cannot be influenced by a light source on the front". What about the translucent shader? (or SSS or anything similar)

Translucent/SSS/Glass shaders let samples trough on the front that can then travel through the object through to the back. You could probably program a shader that way that would replicate the behaviour you mentioned, but that would mean that the material on the front has an influence on the back, by deciding which samples to let through in which way, which is not the case in the Half-Lambert example. If you want this behaviour, you can already take a translucent or SSS shader and mix it into your material now.


text:
How to Interpolate vectors in Python?
How to interpolate vector between 2 vectors in blender-python?
I hope you get my question.
Example:

See mathutils.Vector:

Vector.lerp for linear interpolation.
Vector.slerp for spherical interpolation. https://en.wikipedia.org/wiki/Slerp

c = a.lerp(b, 0.0)
# c == a
c = a.lerp(b, 0.5)
# c == (a + b) / 2
c = a.lerp(b, 1.0)
# c == b

i think you mean C == B in your third example

from mathutils import Vector

v = Vector((0,1,2))
v.negate()
print(v)
# <Vector (-0.0000, -1.0000, -2.0000)>

def interpolate(t, vector_a, vector_b):
# t is from interval <0, 1>
    return (1 - t) * vector_a + t * vector_b


text:
Can I invert only the vertex normals?
I wish to create an inverted sphere with inverted lighting (so it appears as a normal sphere). The vertex normals need to point outwards, while the face normals point inwards (for creation of an atmosphere in Unity3D).
I have found a few solutions within Unity3d, however, each require per-frame calculations I very much wish to avoid.

I dont know Unity, but what about using two spheres ?

With 2 spheres? I am using 2 spheres, but are you thinking clouds or suggesting something else? Here is a screenshot of what i am working on, notice the glow of the atmosphere being on the wrong side of the planet.   http://i.imgur.com/chnmlk7.jpg?1 By reversing only the vertices normals Unity's lighting model will invert the light hitting the atmosphere.

I finally solved the issue. The solution is to split the normals, which I assume means telling Blender to stop the 'connection' between the two types of normals, face and vertex:

Enable 'Custom Normal Tools' in Add-Ons
Create an inverted sphere
Enable 'Auto Smooth' in Object Data
Add the 'Normal Edit' modifier to the inverted sphere
Add an empty object in the center of the sphere
Use Empty object as target in the Normal Edit Modifier with the following settings:

Radial
Mix Mode: Subtract
Mix Factor: 1.000

Source: Custom Split Normals (Blender wiki)


text:
Blender only renders one frame instead of the frames I selected
I have made a smoke simulation (cache 17 GB) 300 frames (300 sampling with denoising on).
(I turned it down and off for troubleshooting).
I had no problem rendering it, but after I looked into the image stripe it shows that I had 13 (266-278) frames blank, so I tried to re-render those frames, but it is only rendering one frame and saving it {blender save file}.
How can fix this problem? I could not render with the sequencer on.

It is because you set Frame step value:

Set it back to 1
This value use to render every N-th frame, with skipping others.
Also, you have a video strip in sequencer (VSE). So blender render from sequencer instead 3d-scene

Remove this strip, or uncheck sequencer in post progressing tab:


text:
Corner making a tri face
On the edge of my model I'm trying to eliminate the tri face it's making. If I do a knife cut vertical, it'll make a quad, but if I go horizontal it'll make a tri face. When I add the subdivision modifier, it seems like a much cleaner topology. Is there a solution when it comes to avoid the mesh from making a tris?

I don't have a answer for that specific case, but the whole Topology Guides are a must-read and should give you some directions : https://topologyguides.com/archive/

Suggest add another support edge on the side (which is needed for the subsurf anyway) and I think the problem might goes away automatically... see Jachym's answer.

You don't need the knife cut at all :).
Just inset the corner slightly, it'll move the ugly quad out of the way.
The corner is now smooth, and you can add more loopcuts to make it sharper.

A link to eg. https://topologyguides.com/ or https://graphics.pixar.com/opensubdiv/docs/mod_notes.html might be useful.

Oh, that pixar page is a new one for me, thanks :).


text:
How can I scale or extrude selected edges to the outside?
Consider:

Video: https://drive.google.com/file/d/1qnn96gvkQz9cFqGJDtE6-EbUUP-I_Oul/view?usp=sharing
.blend file: https://drive.google.com/file/d/1cxfsIRXvasJL4nldaWupl2wHCU-iOY-w/view?usp=sharing
I am trying to scale/extrude selected edges to the outside, but I can't. I tried:

S, Shift + Z
Alt + S

Nothing helps.

Select the vertices, press G twice, then C and you'll be able to move the vertices along their edges

Enable the addon called Mesh: Edit Mesh Tools and CtrlE > Offset Edges > Extrude:

Then tweak the parameters in the Operator Box:

I don't have the Offset Edges menu in the Ctrl E menu, Blender 3.4.1

This is actually an addon which is why you don't have it

what is the name of the addon?

Oh yes you're right, this is the addon called Mesh: Edit Mesh Tools

@Alex Well, it's an official built-in addon, so he has it - it's just not enabled.


text:
Python's uuid module cause c runtime error in ms-windows
I'm using requests in my addon. On OSX it seems to work fine but on windows I'm getting this bizarre message box on startup:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: E:\Blender Foundation\blender.exe

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

---------------------------
OK
---------------------------

Blender does run but I can't seem to get rid of this error. I can't see anything in the requests code that would even trigger this issue.

Is the requests library a wrapper for a C/C++ library?

No. It's purely python as far as I can tell.

This is a very unfortunate glitch, at the moment has no nice solution. Both Blender and Python devs are aware of it.
The problem is with importing uuid (which requests happens to use).
For now, you can workaround this by temporarily disabling ctypes with the uuid module.
See:

http://bugs.python.org/issue17213
http://developer.blender.org/T38364
http://developer.blender.org/T27666

from: addons/io_online_sketchfab/__init__.py
# uuid module causes an error messagebox on windows.
#
# using a dirty workaround to preload uuid without ctypes,
# until blender gets compiled with vs2013
def uuid_workaround():
    import platform
    if platform.system() == "Windows":
        import ctypes
        CDLL = ctypes.CDLL
        ctypes.CDLL = None
        import uuid
        ctypes.CDLL = CDLL

uuid_workaround()

# now import a module which uses 'uuid'
import requests

We'll likely be updating to vc2013 for Blender 2.71, I'm not sure if this resolves the issue though, this needs some further investigation from an ms-windows developer.

I experience a similar issue with Sphinx docs.

Firstly, (though it may not seem like it at first), this is primarily a programming question, so you might have better luck on StackOverflow.
That being said, I don't want to leave you twisting in the wind.
According to my research, this has something to do with Microsoft manifest files that are normally generated by Visual Studio. When they are not present or otherwise faulty they cause runtime error R6034.
What this seems to suggest to me is that there is something wrong with your Python distro, or you haven't instructed VS to include manifest files in your Windows distribution... or they're in the wrong place... or something else...
That being said, I got most of these answers literally by Googling "R6034," so

there's no guarantee they're correct ;-)
it seems like there's plenty of info out there to help get you the rest of the way to the solution.

Hope that helps!

I see it more as a setup question. It's so odd as requests doesn't have any c extensions. I've been googling for a week with no avail.


text:
How can I model a very porous rock?
Consider:

I have tried playing with the displace modifier and various texture, but I cannot seem to find the right combination.

Hello :). Displacement seems like a good approach. What's your current result? And have you tried nodes displacement?

It looks like a noisy volume to mesh transformation might work for you.
Perhaps a modified "Swiss Cheese" geo_node setup (below) would work with a noisy displacement shader added. Best of luck :)

On second thought...
Here is a material nodes only answer:

It will take a pretty dense mesh:

But, It renders pretty quickly.

You could:

Subdivide a cube, sculpt it:

Give it a Displace modifier with a Cloud as Texture:

Add some fake displacement with 2 levels of bump noises:

Select random faces, extrude along normals in order to dig some holes:

Deform the whole shape with the Proportional Editing on:

Work on the color to give it small grains, create a vertex paint mask in order to create an area with a different color:

Etc...


text:
How can I scale instances based on the length of a curve? (Geometry Nodes)
I’m currently trying to Array a group of objects/instances along a curve in geometry nodes and am wanting to control the scale of them via evaluating their position on a curve.
I.e., the objects in the middle of the curve would be the largest with them gradually getting smaller the closer they get to the ends
(I was hoping to potentially control this using a float curve node graph if possible but not sure??)...
I'm trying to do it at the moment with a 'Map Range' node, but it's not quite working as I'd hoped (see below for a screenshot and what the desired result I'm going for):

..If you did want to follow your scheme, and use a Float Curve, you could do something like this..

.. without thinking, this one goes via Curve to Points, for the convenient rotation. You could go directly, in which case you wouldn't have to capture the 0-1 Spline Factor.

To achieve what you show in your example, you can use the following setup:

Here I use the value Factor that the node Spline Parameter returns. This starts at the beginning of the curve at $0$, and ends at $1$.
By multiplying this by $2$, and sending it into Math mode with the Ping-Pong setting, I get a value that starts at $0$ at the beginning of the curve, has $1$ in the middle, and $0$ again at the end.
This value can then be used directly as Scale.


text:
How can I make foggy, uneven liquid with clumps?
I'm trying to render a barrel with an opening on one side to view inside, but I want the liquid inside the barrel to be sort of "uneven", kind of like how fog looks, with "clumps" here and there: like it's being mixed unevenly and has various thicknesses.
I'm hitting a wall trying to google it as I come up against only stuff like viscosity and thickness.
It's not an animated render, just a render of a barrel with an opening on one side and liquid inside.
I've added a WIP of my render (it's from an old game called Blood).

Hi, VirtualForce. I edited the title so it's more descriptive. Hopefully, it will help people know what the question is about just by looking at it in a question list and also it will be easier to find for people who might be searching the web with similar questions in the future. I hope you don't mind.

Hi, no problem at all! Appreciate all the help I can get!
Thank you

Use a noise texture as the density input for the volume.

The noise texture's output values are in the range $[0, 1]$, but most noise values are closer to $0.5$. Setting the From Min/Max values to something around 0.5 (e.g. $[0.3,0.54]$) increase the contrast in the noise. That way there are less voxels with $0.5$ density and more with $0$ or $1$ density. The To Max value of 3 just moves the maximum density to 3. This slider can be used to control the overall density and fit the liquid to the scale of the model.

Could somebody elaborate on the map range settings here as to why these numbers are chosen?

@Glenp Does the last paragraph help?