Follow path constraint - object goes back and forth when speeding I attached a sphere to a circle curve with the follow path constraint, but when i try to speed up and slow down the object with the "Path Animation > Frame" value with keyframes the object goes backwards at some point.

Instead of using a follow path constraint you can do this:
Add an empty in the world origin. Parent your sphere to it (Keep offset). Then animate the z-Rotation of the empty/sphere, which is much easier to use.
I've taken your blend file and parented the sphere to a rotating empty which is parented to an empty that's moving back and forth on the Y axis. The elliptical curve object is just to visualize the path of the sphere.
Your original sphere had an orbit with a diameter of 33.8 metres, so I set the sphere 16.9 metres away from the empty which makes a full rotation in 201 frames (to make it loop correctly on 200 frames). The second empty moves from Y = 3 m to Y = -3 m on frame 101 and back to Y = 3 m on frame 201.
This results in an elliptical movement which still has a diameter of 33.8 m on the major axis on the X axis, but the minor axis along Y is reduced by 6 m to 27.8, the Y distance that the second empty travels from one side to the other.
Because the rotating empty is 3 m away from the oscillating empty on the Y axis, the center of the elliptical movement is at X = 0 and Y = -3. (By the way, I've set the movement's interpolation to Bézier while the rotation is set to Linear, because otherwise the ellipse is somehow flattened on the short ends.)
This is because on frame 1 the sphere is on its lowest Y position and the osciallting empty is moving in negative Y direction at the beginning 8towards the sphere). If the sphere was on it highest Y position and the oscillating empty starts moving away from it, the ellipse diameter would be stretched in Y direction, exactly + 6 m.
If you start with the sphere in its lowest or highest X location, this will result in a slightly angled ellipse with different diameters (which can surely be calculated by formulas, but I don't have them at hand right now).


Increment property value with keyboard Basic question - how do you increment value with keyboard (when you're in a field in one of the windows, e.g., "X" and "Y" coordinates? I assume up or down key but doesn't seem to work

Thanks!

As @TeeTrinker said, you can left-click and drag the mouse to change the value in the field.  Of course, this will change the value by increments of 0.01.  If you want the value to change by increments of 1.0, you can hold down Ctrl while dragging:

An alternate way, purely by keyboard is to simply add 1.0 to the value in the field by typing + 1 and pressing Enter:

There may be other ways through scripts but I'm unsure.


Create a gradient effect, like for coffee? I'm trying to create a nice little mug with some coffee in it:

I can't quite figure out how to describe the issue, but I guess the coffee looks too dense. There's usually a gradient falloff effect on the edges of the fluid, like in this screenshot:

How would I recreate this in Blender? Here's my node setup:

My guess is volumetrics, but I haven't dabbled with it before so I'm not quite sure. It's for a still-frame render, so I don't care about render times.

This can actually be done quite easily (and efficiently) using the volume absorption shader:

You're correct that this is a volumetric effect - it's dependent on how far the light travels through the coffee. There are two volume shaders (three, if you count emission) - volume absorption, and volume scattering. Volume scattering is the slow and noisy one everyone is talking about when they say "volumes are slow". Volume scattering adds an additional bounce possibility within an object, hence the noise.

Volume absorption, however, does not alter a ray path or do any other probabilistic anything. It just attenuates a ray based on how far it transmitted through the object. As a result, it's not really any noisier or slower to calculate then coloring your glass or transparent shader, and the result is much more realistic. In fact, in pretty much any case where you'd use a non-white transparent or glass shader, it's best to leave the glass/transparent shader as full white and color your object instead with the volume absorption shader.  This will allow the color to vary through your object based on thickness, which is where almost all color comes from in transparent objects.

Note that finding the exact color will take some trial and error to balance saturation, brightness, and the "density" (overall strength) of the absorption. Be prepared to fiddle around in rendered view for a bit.


Making a cylinder from a plane I want to make a plane as the shape for a cylinder object and then turn that into a cylinder. This can be done by extruding, which can also be used for straight objects like skirting borders.

But extrude+rotate for a cylinder is a lot of steps (number of sides for the cylinder) and requires cleaning up of some "internal" faces and duplicate vertices, I also got some faces with flipped normals for some reason. Is there a built in operation to do this?

Example scene with the two objects:

You have several solutions, like the Spin tool or the Simple Deform modifier (with Bend option), or the Curve modifier, but I guess the Screw Modifier is the easiest way:

Create your profile shape, without any inner face. Keep in mind that the origin of the object will be the pivot of the rotation.
Assign your object a Screw modifier, choose the good axis, choose a 360° angle, and as many Steps as you want.
Keep a copy of your object before applying the modifier. Recalculate the Normals if necessary (ctrl N in Edit mode). You can also choose not to apply the Screw modifier, it will just make the edges sharpening a little bit longer at the end.
Assign your object a Subdivision Surface modifier. On the left panel (T) click on Tools > Shading > Smooth.
In Edit mode, add some edge loops to make your edges sharper (or, if you didn't apply the modifier, create some new vertices close to the existing ones: Select an edge, then create a vertice with ctrl R or W > Subdivide, then move the vertice along the edges with G G until it comes close to one of the existing vertices).


Area of bottom polygons using obj.to_mesh post modifier but without applying it First of all, I'm quite new to python so please bear with me if I'm asking dumb questions. I've seen similar questions answered but still can't get where I want.

Say we have an active object in the scene, which is a polyline, which is extruded in z direction and altered with solidify modifier to give it some thickness (like a wall for example). I'm trying to get the summary area of all the bottom faces of the object as visible in the scene without actually applying the modifier. From what I've read it should be possible via obj.to_mesh, but while I can get the area of all faces with sum(f.calc_area(), I'm missing something (possibly obvious) when it comes to getting just the sum of bottom ones.

Here is my attempt:

import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = bpy.context.active_object

# --- get a mesh from the object ---
apply_modifiers = True
settings = 'PREVIEW'
mesh = obj.to_mesh(scene, apply_modifiers, settings)

bm = bmesh.new()
bm.from_mesh(mesh)

for face in bm.faces:

    face_location = face.calc_center_median()

    z = face_location[2]

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

    if z ==0:

        face.select==True

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

    area = sum(f.calc_area() for f in bm.faces if f.select)

    print(area)

bm.free()

bpy.data.meshes.remove(mesh)

What I get is value "0" printed out 16 times (for each face in the object I guess as it has 16 faces).
I realise it's probably something trivial I'm missing but maybe someone could please explain it to me?

I guess, you are getting zero because the face.select is not assigned value True, but is being checked for condition True (face.select == True). Also if you are interested only in bottom faces, i.e faces with all vertices having z coordinate value zero, then checking for median z coordinate may not work in all cases. There could be faces with median z at zero but vertices lying on either side of x-y plane.
I can think of the following alternative (I am open to critique and corrections as I am also comparatively new to blender :)

import bpy
import bmesh

bm = bmesh.new()
#bm = bmesh.from_edit_mesh(bpy.context.active_object.data) (without modifier)
bm.from_object(bpy.context.active_object, bpy.context.scene)

#Floats are not always absolute zero, so comparing with a tolerance
total_area = sum(f.calc_area() for f in bm.faces if len([v for v in f.verts if v.co[2] < 0.0001 and v.co[2] > -0.0001]) == len(f.verts))
print('total area:', total_area)

bm.free()


How to draw a text using the bge module I I´m trying to draw a text using the bge module.
This is my code:

# import game engine modules
from bge import render
from bge import logic
# import stand alone modules
import bgl
import blf

def init():
    """init function - runs once"""
    # create a new font object, use external ttf file
    font_path = logic.expandPath('//Zeyada.ttf')
    # store the font indice - to use later
    logic.font_id = blf.load(font_path)

    # set the font drawing routine to run every frame
    scene = logic.getCurrentScene()
    scene.post_draw = [write]

def write():
    """write on screen"""
    width = render.getWindowWidth()
    height = render.getWindowHeight()

    # OpenGL setup
    bgl.glMatrixMode(bgl.GL_PROJECTION)
    bgl.glLoadIdentity()
    bgl.gluOrtho2D(0, width, 0, height)
    bgl.glMatrixMode(bgl.GL_MODELVIEW)
    bgl.glLoadIdentity()

    # BLF drawing routine
    font_id = logic.font_id
    blf.position(font_id, (width * 0.2), (height * 0.3), 0)
    blf.size(font_id, 50, 72)
    blf.draw(font_id, "Hello World")

I add an object, a sensor and a controller as you can see in the next picture:

But, when I pulse "p" on the 3D viewer screen and it´s suppose my game runs I only see this:

I´ve tried to change the text´s size and the frequency of the sensor.
Any idea about something that may be failing?

I´ve just realized that I don´t have the file called "Zeyada.ttf" so my problem is in the line:

 font_path = logic.expandPath('//Zeyada.ttf')

Apparently I need a ttf file to present the text and it makes sense, every text has format.


Is it possible in Blender to create a animated png vertical strip? I want to create a png file that is an animation of fire for a Minecraft resource pack. I can render the images as separate files and painstakingly put them together in Photoshop. I would rather see if I can do that in Blender or with another tool?

Here is an example of the desired outcome. Sorry for the size.

Spritify add-on

Spritify is an add-on for making sprite sheets and even animated gifs. It has one external dependency: ImageMagick, a command-line tool for editing and creating images.


Pass data to EnumPropery items callback I'm struggling to pass a variable to an EnumProperty items callback, resulting in making this variable a global, which I prefer to avoid. I want to be able to access the "plant" from the "model_callback", but I can't reference it as self.plant. I am unclear on the scope I'm running in within the callback.

Simplied example follows. Note that in the real example, the plant variable changes whenever the filepath is updated.

class ImportPlant(bpy.types.Operator, ImportHelper):
    bl_idname = "import_object.plant"
    bl_label = "Import Plant"
    # ...

    plant = ["spring", "summer"]

    def model_id_callback(self, context):
        items = []
        # Results in: AttributeError: 'IMPORT_OBJECT_OT_plant' object has no attribute 'plant'
        for model in self.plant:
            items.append((model, model, ""))
        return items

    model_id: EnumProperty(items=model_id_callback, name="Model")

    # ...

How can I access the plant variable in the model_id_callback without just making it a global?

The plant is a class attribute and not an instance attribute, meaning that each instance of the class ImportPlant references the same plant. Therefore your script should use ImportPlant.plant instead of self.plant.


Blender 2.78 with Windows 10 lags when interacting with the UI Update

This has been confirmed resolved in a later version 376.33 and possibly the update prior. meta

Okay, I recently did a computer update. I used to run Blender 2.77 on a Dell desktop (5 GB RAM, 2.7 GHZ, Windows 8, build in graphics card). Since that computer wasn't fast enough for my preference, I saved up and got a new gaming laptop - the Asus ROG GL552 (Windows 10, 16 GB DDR4 RAM, Nvidia GeForce GTX 960M with 4 GB DDR5 RAM, 2.6-3.5 Ghz, and quad-core intel processor). That laptop has been known to have outdated drivers, so when I got it, I updated it to up to date Windows 10 drivers.

As soon as I started Blender, I immediately noticed its speed. Even doing simple things, like clicking buttons, or rotating the view with the middle mouse button, took too long to register in the program. I tried changing some User Preference System settings, but that didn't really help much. And the hardware seems to be fine - the render is lightning fast (renders the startup scene in under .1 second; it's just laggy when loading the uv screen), so I don't know why it's like this, or what to do. Also, I ran Blender 2.77 on this computer, and it was also slow (although it was fine on my previous computer).

It could be an issue with drivers perhaps (or maybe OpenGL?), but I ran Unreal Engine 4, and had none of the same issues - the speed was pretty decent on that; so I'm not sure why Blender would be so slow. Any help is appreciated - thanks guys!

I found the solution, right click on the blender shortcut>Run with Graphics Processor>Integrated Graphics. It should run smooth when you do that. No need to roll back any graphics drivers, just use your integrated graphics to model and you can still set your 960m to render in the settings.

In case you are not able to see the option, Open NVIDIA Control Panel, from the Desktop menu and check 'Add "Run with graphics processor" to Context Menu'


Why isn't my Normal Map visible after baking&applying texture? Here's my .blend file for reference:
AllMight Blend File

I have two meshes. One Low Poly mesh in layer one, another high poly in layer 2. I believe I've followed the correct steps for baking and applying a normal map to the low poly mesh, but it doesn't even seem to appear in render mode. And I don't think it looks right in texture mode either.

If someone could take a look at my file and settings for baking/applying the normal map UV that would be tremendously helpful.

P.S. There's a sun lamp in layer 3.

Looks like you applied the texture to the silver material. I can see the effect on the belt buckle. Have you tried applying the normal texture to the rest of the materials?


How to not get hard edges in Eevee transparent emission material? I have an emission for a jet flame for a 4 sided pyramid but it just looks solid or like glass.  How can I remove the IOR value and have an emitting transparent shader for a jet flame?

If this is not possible in Eevee, how could I do it, softening the edges etc?

You will have to mix the final shader with a transparent shader and use fresnel node as factor(fac) value, then you can use fresnel's ior value or a color ramp for controlling smoothness and area to be cut.(Switch color ramp to B-spline for smoothest transition you can have.)


How is it possible to have a add-on run immediately after you open blender? What I am needing to do is that when I open blender it toggles the add-on. The add-on that I am using is the Virtual Reality ViewPoint. What I want is for that addon to activate right when I open Blender.How is this possible?

If you launch blender from the command line, you can designate a startup .py file which could either be the addon itself or trigger the loading of the addon.

Sample cli command:

blender --background --python startup_script.py

Depending on your OS, there are different ways to make the command line call clickable as an executable app for convenience.


Adding new objects in visible plane( not default XY plane) Blender adds new objects in XY plane ,however if one is  working in other planes(eg. XZ,YZ etc), this can be quite irritating having to transform the object to the desired view everytime a new object is added .Is it possible to  add a new object in the visible plane?

If you select Align to: View in Preferences, new objects will origin to current view, not world:

But if the view is not top/bottom/side (rotated using MMB), object will be rotated in same direction as a view point.

You can also adjust last operation and set align to view here:


Rendering with filmic log color space and saving output for use in photoshop I recently learned about the magic of filmic log and love the way it makes my renders look. However, I'm having issue with saving the output from blender. Specifically, for use in photoshop for cropping, sizing and minor image corrections.

My previous workflow was render > save as OpenEXR (rgba / float full) > open in photoshop and save as PSD.

With filmic log, The colors on the EXR file look wildly different in photoshop than they did in the blender rendering output screen. The brighter parts of the images are completely blown out.

Here's an example image, blender on the left, photoshop on the right:

I've tried assigning a color profile to the image in photoshop like the filmic log github suggests. It seems to make no visible difference on screen.

Saving to PNG or TIFF produces darker, low contrast images but does seem to avoid most of the blowout.

Let me know if there's any other info I can provide.

EXR files are always saved without the color management lut applied. They are always linear and is intended for compositing work.

To get a high bit-depth file with the LUT baked in, try saving as 32bit tiff.


How can I shatter a model and have it reassemble in a different shape? I'd like to have a model shatter and then have the fragments float about a bit, then reassemble into a different model. How would I do this?
I know of cell fracture, but I don't know what all of the variables and settings do when fracturing something. I know enough about physics simulations to make a model explode.
I'd like the pieces of the shattered model to be
this kind of shape.
The fragments are all pointing in the same direction and long and thin.
How would I achieve this/is it possible/is it possible for a novice user to do without a lot of confusion?
Thanks

One tactic that might be useful is to have the two models both be shattered, but the second one in reverse.  In the time between slowly replace the pieces of the first model with the pieces of the second (which will be hard to notice in all the confusion).  So the first model shatters; over time its pieces are replaced by pieces of a second model; which then unshatters.


Export FBX while keeping Collections Hierarchy I am looking for a way to transfer the hierarchy of the collections from Blender to Unity. In other programs, like Cinema 4D, this works without any problems.
Is it possible to export a fbx-file with the hierarchy of the collections?
Currently I use a script that translates the structure into a new hierarchy.
import bpy

sCollection = bpy.context.collection

def parentCol(_colParent, _objParent):
    for col in _colParent.children:
        newObj = bpy.data.objects.new("empty", None)
        bpy.context.scene.collection.objects.link(newObj)
        newObj.name = col.name
        newObj.parent = _objParent

        if len(col.objects) > 0:
            objs = col.objects
            for obj in objs:
                obj.parent = newObj
        else:
            parentCol(col, newObj)

root = bpy.data.objects.new("empty", None)
bpy.context.scene.collection.objects.link(root)
root.name = sCollection.name

parentCol(sCollection, root)

I'd love to understand if transforming parenting informations into collections should lead to possibility to batch export with Blender Function for FBX.
While I'm not skilled with coding into blender, I'd love to resolve this issue to correctly export Groups and parents/children into Unreal Engine:
My idea:
My case example:
Object01
Object02
…
Need to Create Collection automatically and set the relative object inside:
Collection01\Object01_grp (and inherited objects)
Collection02\Object02_grp (and inherited objects)
…
Hope it could be possible…


Particles are not visible when rendered (ver. 2.83.5) Sprinkles particles are missing when rendered

Camera icon ON
Properties - Particles - Render - Show Emitter checked

File -

I saw a lot of similar topics here but couldn't find the right solution :(
Please, help me to figure out the problem

This button was not enabled on your file, enabling it fixes this, it just controls whether the particles are on during rendering, it might look a bit different for you, but it should still be a camera in the particles section.


What does it mean when my Angle setting under Auto Smooth greyed out? I am trying to understand why sometimes my Angle value is greyed out under Auto Smooth in the Data Panel of the Properties Editor. Does anyone have any idea why this happens, what it means and how to fix it so that it isn't greyed out anymore? For me this has nothing to do with Sculpting or being in Sculpt Mode. This happens randomly while performing regular poly modeling with booleans in Blender or when importing objects from other 3D packages.

Go to Properties editor > Object Data panel > Geometry Data and click on Clear Custom Split Normals Data to re-enable the angle setting.


Quickest way to create UVs for a tileset using a single tiling texture I am still fairly new to Blender (couple months in)

Right now I'm working with a tileset that looks like this:

The code in Unity places these tiles procedurally and creates a world out of them. It works pretty well, but we would also ideally want to use a single texture on all of them.

The texture we have looks like this (the green tickmarks are guides for me and don't show up in the final model):

And here is a screenshot of the tile pieces that I have completed the UVs for. They work, and they tile correctly.

The problem is that this process takes a long time. I am basically moving UV vertexes around manually in the UV editor. Is there a better way to do this? As an aside, the seams I've chosen also look like crap in Unity, which is another issue but may be related to how I'm doing this.

We're trying to accomplish a look of "grass transitioning to dirt" in one texture and tileset, with a kind of cartoony, cell-shaded look.

You may try the Data Transfer modifier, which will be released with the coming 2.74, but you can still experience it in the latest daily builds here.

Add a Data Transfer modifier, choose the source object you want to copy from.
Toggle Face Corner Data > UVs, then press Generate Data Layers button, which will generate a UV data for the new object (you cannot see it until the modifier is applied).
Choose a proper method from the list on the right, you can preview it in GLSL shading mode. Finally, apply the modifier to generate a solid UV layer.

Before:

After:

NOTE:

For batch copying modifier among objects, you can enable the Copy Attributes Menu addon.
Since it is not fairly stable (currently), use it with caution.


How to make a face between circles? trying to make a face between the selected circles for a disk shape
  SHIFT TAB should let me select edges then i should be able to make a face, correct? however, the selection to select vertices, edges isn't showing up and when i hit f, a third larger circle appears? what gives? beginner here

You are dealing with a curve object. Curve objects are different than mehses. You cannot add faces to curves.

You can convert them to a mesh as stated on the other answser. but you can choose to keep them as curves.

To fill, just convert them to a 2d curve and select "both" as the Fill mode.

If you need more concentric rings, just duplicate one of the rings and resize.

If you must convert to mesh, then press Alt C in edit Mode, select convert curve to mesh. Enter edit mode, select all vertices and do "bridge edge loops"


Smoke simulation "Bake" is missing (or moved?) from 2.8.0 to 2.8.2 I'm trying to do a Smoke simulation following the various tutorial videos I've found, and could do it in 2.8.0 (after figuring out I needed to delete a BSDF texture on the Smoke Domain), but since upgrading to 2.8.2, a lot of the settings have moved and/or changed names.

Most importantly, the "Bake" command is missing in 2.8.2 (or at least moved from where it was in the Physics:Cache menu in 2.8.0). I found a "Bake Animation" command in the Object:Animation menu, but this doesn't seem to do what I need. When I render, it is always the same frame (somewhere in the middle of the animation).

See attached images for menu differences.

Any help/suggestions would be greatly appreciated.

It's now under Settings : Bake Data / Free Data.
Blender 2.82 use a brand new simulation engine (Mantaflow) for fluids and smoke, so any tutorial prior to this version is outdated.
For the given screenshot Cache > Type change to Final then the Bake option appears below.


Why are my preview renders good and my actual renders totally black I'm using Blender 2.79 and Cycles renderer.

Can't figure out why my pre view renders look like this

and my "rendered" images look like this.

Only a total noob to blender.  Have been using Modo, Max and Lightwave for about 15 years.

I've seen Render Layers as a common problem.  i don't think that is my issue

Thanks for the help

Sorry... I'm an idiot.  In case there is anybody else out there who might benefit from this.  I decided not to render the window panes and so i didn't make them transparent and I clicked the little eye icon to hide it in the 3D view.  So when you do a preview render in cycles it gives you a preview of what is visible in the 3D view.  However hiding something in 3D view doesn't mean that it won't render.  So my non transparent windows that were hidden in the 3D view were blocking the sunlight from coming into the room.  Lesson of the story is hit the little camera icon next to an object in the Outliner to make it invisible to the rendering engine.

Thanks again for the responses.


Several add-ons throw error "DLL load failed. %1 is not a valid Win32 application." Known add-ons with this issue are Tissue, RetopoFlow, and XNALara/XPS Import/Export.  I am running Blender 2.79 on Windows 10 64-bit.  I have also experienced this issue in 2.78, but not in 2.77.

Edit: This also occurs when I try to switch themes.

Try the following:

Close Blender
Rename C:\Users\YourNameHere\AppData\Roaming\Blender
Foundation\Blender\2.79 to
C:\Users\YourNameHere\AppData\Roaming\Blender
Foundation\Blender\2.79.bak
Use your login in Windows instead of YourNameHere and your version
of Blender instead of 2.79
Start Blender again


How to make particles on specific vertices of a model I am rather new to Blender, and very new here.
I have a project which is to make a hangar with a ship inside.
But I am stuck with particles, I would like to make the particles attach to specific vertices, like for instance in this model.
I give you a picture as example.
Thanks in advance for your answer.

You can use vertex groups for that.
Setting up the vertex group
Select your mesh and go to the mesh tab. Under Vertex Groups, click the + button to create a vertex group:

In edit mode, select the vertices you want to emit the particles from:

To edit the vertex group, switch to weight paint with the object selected:

Then limit the editing to the previously selected vertices by clicking on the Vertex Selection button:

Select Weights>Set Weight to set the weight of the selected vertices to one.
Using It In The Particle System
In your particle system, under Source, select Vertices:

To make it use the vertex group, go to Vertex Groups and change the Density group:


Exporting my Blender models texture to unity I am able to export my model but my texture doesn't export with it, I've tried to export my texture separately and I'm not sure if I'm doing it right but I found a video that tells me so when I export it separately it gives me a file. The file only gives my model the same texture it had when i exported it to unity (Grey). I assume it's a component I'm missing with my shading editor, can someone tell me what components I need or I could be missing or some sort of problem that could be wrong with my model?

Place the . blend files inside the Unity project's Assets folder (or a subfolder inside Assets). You can open them for editing by double-clicking the file in Unity. ...
Place all the texture files in a subfolder named Textures in the same folder as the . blend file.


"Doubled" appended custom shapes When I append a rig with control shapes, the shapes appear “doubled up”, once in a normal Object form – white in the screenshot – and again in a Rig form which can open in Edit and Pose – blue in the screenshot. (The purple Empty is just a control for the whole rig.)

Any idea why this happens?

The armature itself doesn't store all the bone shapes ('Custom Object' in 2.8+), it just references them (or the bones do). This means that when you append an armature that is using custom bone shapes it has to append the objects that are being used as the custom bone shapes as well. So what you are seeing is the armature and the custom shape objects it's referencing.

If you're in 2.79 you can just move the bone shape objects to a new layer or if you're in 2.8 you can move them to a new collection and hide them.


Cutting Irregular Shape into an Irregular Cylinder (plane cockpit) I've been battling with a problem for a few days, which i'm unable to resolve without creating awful topology/triangles etc. I've tried the Boolean route, but when it came to using subdiv surface / edge looping, the results were terrible due to all the triangles etc...

I've gone back to the drawing board to try and create a cleaner version, but i'm unable to figure out how to cut a cockpit (red line - see image) into the plane fuselage.  I tried subdividing into smaller squares then inset > pulling the cockpit quads down.  But this resulted in loads of triangular teeth around the edges.

Any suggestions on how to cut but retain good topology would be much appreciated!

So why don't you simply cut this part with a knife? Plus before adding edge loops you should make sure that the whole shape is good.

Some steps :


Animation Node Installation Error Blender says I need to unistall prexisting animation addons before it can let me download the one by Jacques. Which one of these add-ons could it be referring to?

Animation Nodes only wants you to remove other version of Animation Nodes currently installed. So just uninstall/remove any other version of Animation Nodes before installing it. So, leave those addons as is.


How do I make a hollow sphere? So my journey here is only days old, but am already struggling. I am trying to duplicate this:

I've watched countless videos and repeated the best I can learn so far. So on my first sphere I've created this:

At a different angle:

As you can see, I've created the hole, but the cylinder I used is now sticking out the other side, which I'm not sure how to remove, any thoughts?
Is this really the best way to create those hollow spheres, similar to the planets picture I pasted?
I downloaded blender yesterday (V. 2.83.1). Many of the YouTube videos I've watched are difficult to follow and often only relate to older versions, so finding one that will be 2.8 specific has proved to be difficult (might be that I'm so new to Blender so finding it difficult)

It looks as if you already used a cube with subdivision surface modifier to get your sphere. While not a bad idea, i'd recommend to use at least subdivision level 4 for a cleaner sphere, otherwise it's not really as spherical as you'd want.
Thanks to Trey Harper for pointing out the cast modifier, i barely use, which in this case though really improves the result.
That said, going from your (cube)sphere:

Apply the subdivision surface modifier on your cube(remember lvl 4, for a more spherical sphere) and a cast modifier with the factor of 1:

Marked red, important before going on is to apply these modifiers in order!
Go in front view Num 1, activate edit mode Tab
and x-ray mode Alt+Z, select half of the sphere like this:

when selecting, leave the center deselected to keep a half
With the selection, press X and choose Vertices
In the Object Data Properties we need to activate the Normals>Auto Smooth:

Auto Smooth is needed for the next step to look clean at the cut
Go back in object mode Tab and add a solidify modifier.

Adjust the modifier to your needs and you have one shell done.

You can now copy Shift+D the created shell and adjust it's size to gain the other layers of the planet.
Here a little visual demonstration:

The thickness of each layer can easily be adjusted in the modifier
As the core looks like a full sphere, you should have all needed means to your cause now.
Happy Blending


Game Engine - Change an image based on property? For a HUD I'm making I would like the ammo to be displayed based on an image instead of text. How do I link what image is being displayed on a plane (a texture) based on a property?

Figured it out. I made multiple planes and assigned different textures to each, then changed the visibility of each plane based on the property.


How to recalculate Follow Path animation after curve length has been altered? I have a Curve Object and a vehicle following it using a Follow Path Constraint. I'm using the Fixed Position method and keyframing the Offset slider.

The problem is that I had to shorten my path and now the animation keyframes no longer match up (since they are based on the length of the curve). How can I know how much to rescale my keyframes by so that they will once again occur at their proper times?

Put simply, I want my vehicle to travel along the Curve at the same speed it did before, with the same acceleration/deceleration keyframe data, but adjusted to the new Curve length (stopping sooner).

Example

In this example the red block passes the finish line at frame 15, but the last Offset keyframe is at frame 51. Is it possible to delete the point on the curve beyond the finish line while still keeping the the animation data up to the finish line in tact?

Here are the keyframes:

So what happens if we delete the last point on the curve?
The entire animation speed changes. What is the formula for correcting for this? How can we know what percentage to scale to in order to make it animate at the same speed it did before we deleted the tip point?

Is it possible that the keyframes' Y values needs to be scaled as well as X?

Semi Quick Overview

When your path has multiple temporal/spatial milestones that can move, create a path and constraint for each, create [influence] keyframes, for maintainability in the future.  Blender to the future.  The more milestones you have the more maintainability is an issue.

In the images above in the 3D view the green ball has two follow path constraints.  One path constraint to the yellow curve and one to the red curve.  Positive constraint [influence] means, influence = 1. The graph window shows that the constraint [influence] on a frame, is 1 for only one constraint at most and switches discretely to 0 in one frame.  The [influence] curve has four values [0,1,1,0].  When the [influence] is 0 the constraint has zero effect.  The [offset] curve has two values[0,1]. The constraints can independently be deleted or (enabled/disabled with the eye) and the other one will have a predictable affect.

In the 3D View are two Bezier curves, red and yellow which visually appear continuous by position and slope.  The two curves which were originally one and were [separated] to preserve slope/position continuity (piece wise continuous).  The green ball first follows the yellow curve and then the red curve. The movement is smooth across curves. Speed continuity is reasonable because the constraint influence curve has value 1 for a designed range of frames.

Curves are different colors and have positive bevel for explanation purposes only. Curves need not be rendered.  The image on bottom is to emphasize the graph [influence] values as they transition.

In this example I have repeated the location for one frame.  Change the end [offset] to a number such as ( 1 - (1/[number of frames in range])) if this suits your goals.

Method 1 Verbose Discussion of above

If you will be changing paths often this work will be to your advantage.
Consider two or more contiguous paths.   This will allow easier independent control of position and thus speed.  Create a longer path from pieces of shorter paths.  These paths will have influence on distinct ranges of frames/time and thus will ease the [Oh no! I have to change the path!] problem.
In the discussions below N1 and N2 are frame numbers such that 0 > N1 > N2 and N2 > N1 + 2.  We use the names path 1 and path 2.  FrameRange0110(f1, f2) means [influence] keyframes set on four frames. 0 > f1 and f2 > (f1 + 1), that is the range is two keyframes at least long for ease of discussion. Frame (f1-1) = 0.  Frame f1 = 1. Frame f2 = 1. Frame (f2 + 1) = 0. Four [influence] values [0,1,1,0] listed in increasing order of (frame or time). FrameRange0110(f1, f2) also means constraint [offset] values which are Frame f1 = 0 and Frame f2 = 1.  Two values indicating beginning and end of curve [0,1].  Every FrameRange0110(<.>, <.>) denotes 6 keyframes.
Independent Frame Ranges.  Lets also call two Frames ranges A = FrameRange0110(s1, e1) and B = FrameRange0110(s2, e2) Independent, if the positive [influence] values do not overlap in frame or time. Either (e1 < s2)  or (e2 < s1). The 0 [influence] of one range may exist with the positive [influence] of  another range, which should be the case for this particular example.
Action. For path constraint 1 with curve 1 create Range 1 = FrameRange0110(1, N1).
Action. For path constraint 2 with curve 2 create Range 2 = FrameRange0110(N1 + 1, N2)
Range 1 and Range 2 are now independent frame ranges and have convenient control.
This can be extended to many curves so long as the all path constraints are pairwise independent. Make small adjustments to suit your needs. Once you get independent control you might try some advanced mix of influence for interesting results.
To edit the range of influence for two adjacent curve you can select 4 adjacent points in two contiguous ranges in the Graph Window and move them in the X direction respecting the notion of Frame Range independence.

Advanced

In certain circumstances visual objects can control the Bezier curve itself.
By using [influence] keyframes with two curves and no independence one can add circle wobble which is different than the curve noise modifier. The second curve could just be a circle or other closed curve with curve cycles modifier.  Curve placement is being added.

Beware

It is not clear that simple scaling of dopesheet frames will  produce acceptable/predictable results.  I have not seen documentation of how parametric distance is calculated in Blender. Complications are Bezier versus Path. Similar mathematical information is published in computer graphics books.  It might be difficult to determine which particular method Blender uses.
Looking at source code may be more difficult than Method 1.

Method 2 (Superstitious)

Reflect on the likelyhood of further path changes.  If you believe no further changes are coming then just use the new curve and set new keyframes.  You have only doubled your work for this task.


How to make non-linear movements with a Follow Path constraint? I try to achieve a non linear movement with the Follow Path constraint.
I linked my object to a bezier circle using the Follow Path constraint.
It follows the circle with a linear movement, meaning the speed of the object always stays the same.
I want to make the object move faster by time, by changing the curve of the evaluation time from linear to exponentially.
In short I want the movement of the object to get faster and faster. How can i achieve this?

The Evaluation Time property is keyframable, you can shape its F-curve to any function you like.
Select your bezier curve object, in the graph editor and expand it to show the Evaluation Time curve (add a keyframe if necessary if it doesn't show by default).
Under the Modifier panel add a Generator modifier, change poly order to $2$, and adjust the function to get the desired speed.


How should I deal with horizons? How should I deal with the horizon in a scene? I have tried blocking it with fog, a hill, or even water but they all tend to look tacky.

Showing none of the sky tends to make it look flat.  What should I do to make the horizons look nice instead of just cutting off into the sky?

Unfortunately I don't have enough points to make this a comment, but the answer to this question is entirely subjective. "Tacky" "flat" and "look nice" could mean many different things to different people.
A visual reference to what you've tried that's not working and a hint of what it is that you're trying to accomplish would be a better starting point...

Some suggestions: It does help to have some atmospheric fog. Objects close to the camera should be sharper than those far away. You're always looking at the horizon through the humidity and other particles in the air, therfore count on some distortion caused by refraction or dispersion. In a landscape think of the horizon line as the brightest value, and make it fall at a strong point in your composition.
The horizon is so very far away, use the depth of field to blur it and bring the elements in the foreground in focus.
The sky is never as single color, but a subtle canvas of different tonalities. Use gradients and textures on it too.
You should look into the the vast history of painting (the subject has been dealt with since the renaissance).
Pick up a book or two on perspective and composition. There's been rivers of ink written about this...


3D modeling of blood vessels from 2D stack of labeled cross-sectional images I'm having stack of 2D images with labeled cross-sections, want to fit 3D blood vessel model for the cross-sections having same label across the scans in the stack, similarly for all. Is it possible to do this in Blender?. First image is one out of 777 scans and second image is the view of the vessel in 3D by stacking 777 2D-scans.

FIJI helps me to get required .obj file from the stack of scans that fixes the problem.


How to fix non-manifold geometry for 3D printing I've searched a bunch and found numerous fixes for non-manifold geometry but none of them seem to be working with my design. Can anyone help? The plan is to 3D print this object.

Blender File Download

Thanks,
Ryan

In edit mode press K and use the knife tool to cut edges across geometry and make 4 sided faces.


Changing a value node in many materials with a python script Blender and python newbee here.
I would be very happy if one of you could help me with the following problem i am running into:
i have imported a scale model into blender, which i want to render in real life scale. When i scale the model, the materials do not scale with it and look bad. The materials however all have a Value node named "Scale", which, if i edit it with the same scale i am scaling the model, fixes everything and it looks right then.
It would be so much easier to have a script to do that semi-automatically, as the model uses way over 100 objects with different materials...
What i could find was this kind of similar problem solved, but i have not been able to adapt it to solve my problem, as i have no prior experience with scripting.
What i would like to do:

Select the objects i want to change
Go into scripting
copy a script into it
edit a number that should be put into the value node labeled "scale" of all selected objects
run script
be happy to get way better rendering results.

I am using Blender 2.83.4, in scripting the console says PYTHON INTERACTIVE CONSOLE 3.7.4 (default, Feb 17 2020, 16:23:28) [MSC v.1916 64 bit (AMD64)]
Every help is much appreciated!

The script below iterates over all selected objects and adjusts the value nodes in the assigned materials if their label is set to "Scale".
import bpy

def set_scale_nodes_selected_objects(scale_val):
    for obj in bpy.context.selected_objects:
        for mat_slot in obj.material_slots:
            set_scale_nodes_material(mat_slot.material, scale_val)

def set_scale_nodes_material(mat, scale_val):
    if mat is not None and mat.use_nodes and mat.node_tree is not None:
        for node in mat.node_tree.nodes:
            if node.label == "Scale" and node.type == "VALUE":
                node.outputs["Value"].default_value = scale_val

if __name__ == "__main__":
    scale_val = 1.0
    set_scale_nodes_selected_objects(scale_val)


How to Create the UV Grid Texture with Python? How to create the generated "UV Grid" texture with the help of the Blender Python API?

Either generate a checkerboard and assign the pixels to a new image data block or just call bpy.ops.image.new() and pass UV_GRID:

One downside of using the operator is that you would have to supply a reliable (unique) name for the image data block otherwise it automatically gets renamed to Untitled.001, Untitled.002... due to Blender's nature of handling data:
import bpy
import secrets

# Generate "unique" name
image_name = secrets.token_hex(5)

# Call the operator
bpy.ops.image.new(
        name=image_name,
        width=1024,
        height=1024,
        color=(0.0, 0.0, 0.0, 1.0),
        alpha=True,
        generated_type='UV_GRID', # BLANK, COLOR_GRID
        float=False,
        use_stereo_3d=False,
        tiled=False
    )

# Get the image from data blocks
image = bpy.data.images.get(image_name)

# Display the result
if image:
    bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
    # Change area type
    area = bpy.context.window_manager.windows[-1].screen.areas[0]
    area.type = 'IMAGE_EDITOR'

    # Assign the image
    bpy.context.area.spaces.active.image = image

Related:

Is it possible to create image data and save to a file from a script
How to open an image editor window and display an image file in it?


Dynamic, script-based animations of object creation and deletion New to blender. Here's my dilemma.
I am dynamically animating a protein network using a python-script using user-provided text-files.
The animation is done using key-framing for each object's actions (see below - self.frame_number and self.disjointed_frame allow the class in question to remember what frame the animation is on)

    def add_progressive_location_keyframe(self, frame_step):

        bpy.context.scene.frame_end += frame_step
        bpy.context.object.keyframe_insert(data_path="location", frame=self.frame_number)
        self.frame_number += frame_step
        self.disjointed_frame += frame_step

So far, animating reactions that merely involve the transloation of one protein from one location to another have worked fine.
However, some reactions involve two proteins forming a complex, a new protein.
In this case, I have to dynamically delete the two reactants in a certain key-frame and in that same frame create the product.
However, I cannot add a key-frame to an object I have deleted and I am unable to add a key-frame to an object that doesn't yet exist.
This results in the two reactants being deleted and the product being formed in frame 0 (the first one).

My question: How can I add key-frames to these objects in order to dynamically delete and create them in certain frames? Is there a work around I am unfamiliar with?
Your help is much appreciated.

In that case I propose

preprocess the file into separate files per frame ( Alternatively create a cache dict if you have plenty of RAM, that way you avoid having to deal with writing/reading extra files :) )
store each cloud of atom types and their coordinates something like

this:

 C x y z
 C x y z
 C x y z
 N x y z
 N x y z

write a file reader that can take each frame's file and

on the first frame

check if the object in the next step exists already, skip this step if it does.
create a vertex based mesh object for each type of atom ( ie create a vertex for every atom of one type and put those in an object named something like atom_cloud_C, and do the same for all other atom types ). Meaning, if your file only has 3 C atoms, that your  atom_cloud_C only has 3 verts.
on subsequent frames you read the next frame's file and overwrite the coordinates of each atom, for all atom types.

code:

f_v = list(itertools.chain.from_iterable(verts))
mesh.vertices.foreach_set('co', f_v)
mesh.update()

This produces clouds of atoms as different objects, which get updated every frame.
Then create the spheres that represent each atom type (only need one sphere per atom type)
Then use the dupli feature set to Verts to duplicate the various spheres that represent the atom. (this is a low memory way to display many spheres )
instead of keyframing it all, you can attach a bpy.app.handlers.frame_change_pre to perform a function on each frame change (pre or post), examples for this can be found in the documentation.


Hiding all but the selected objects? I was doing my best to follow this tutorial from the Blender Guru, but, alas, 8 minutes in I've run into a real spot, a few moments after this spot in the video.

I can only hide the selected, not hide all BUT the selected.  (Edits then effects ONLY the selected vertices.)  I know, there is a way to invert selection, but it doesn't look like he does this.

Also, what does he mean do he says, "This is not perfectly aligned..."

You can hit Shift+H, this works for all areas of blender which support hiding (editmode, uv-editing, sequencer... etc).

In Blender, if you know the the basic action a key is assigned to such as (hide H), you can try different combinations with Shift, Ctrl or Alt to often perform the inverse.


unwanted random sharpness/smoothness, Right where the edges begin to bend they start to have an artifact, but only in a part of the whole edge... please see below

This happens because of blenders shading methods when you use a subsurface modifier

the loop cuts are so close together , so blender can't figure out how to shade it

a simple solution is to use less details (Loop cuts) and a better topology (Loop cuts that follows the bending of the car surface here)

so here it should going from one side and bending in a V shape to the other.
Also you don't need to use that much loop cuts. Instead depend on the subsurface modifier to create more detail

something like this

Note : I added the double close edges to make the edges appear sharper

I recommend the anvil tutorial of blender guru on YouTube he goes more on depth on this


How can I scale a duplicate mesh to evenly first the mesh? I have a snowflake mesh that I want to place on top of a scaled duplicate of the same mesh but when I do the points are not equidistant from their counterparts.

This first image is the scaled mesh on top of the primary mesh.
]

This next image is a rudimentary manual movement of each vertices that I hope to end up with.

The easiest way to do that, is by deleting all but one of the fingers of your snowflake, and using modifiers.

As you can see I made that snow flake with an array modifier, and an Empty as the object offset (same way as in this answer), that way I only have to model (and then change) one.

There is no easy tool to do this like scale, or even shrink/flatten.
So here is how I would do it.

With the pivot point set to 3D cursor, and the 3D cursor set to the base of the snowflake (that is so you only have to reposition it down, not both directions). Scale S up the entire finger until it is as wide as you want. (I have the original snowflake in the same spot as the one I'm scaling to be able to see the difference.)

Now move G the entire finger, except the bottom vertices in to its proper position. We are looking to get the left and right side centered here.

Here is where it gets clever, select everything, and extrude it to give the snowflake some thickness. (Don't worry this is just temporary.)
Select the two sides on one of the "branches" on the snowflake's finger.

Now press ShiftNumPad 3 to move the view to be aligned with the faces.
Change the Transform Orientation to View.

In another 3D view select the end face. Back in the view which is now perfectly aligned with the branch, press G XX to move the end face along the view's X axis.
Repeat steps 4-6 for the other branch. It should now look like this:

Delete the extra faces, by going to side view and box selecting B the top half of it, then Delete > Vertices.
Finlay move the top vertices down till they are the same space apart as the small side branches and the new side branches are.

Here in animated gif form are all the steps listed above.


Can I change default folder to save startup file (startup.blend and userpref.blend)? When I used Blender, I pressed Ctrl+U (Save Startup File), the folder generated two files, startup.blend and userpref.blend. under C:\Users\hoald\AppData\Roaming\BlenderFoundation\Blender\2.78\config

Can I change this default path into the Blender folder?

To save Blender user preferences in Blender's own installation folder, also known as a Portable Install, start by navigating to the place where you installed or unpacked the Blender archive.
Method 1 - Easy and simple
Once there open the Blender folder and search for the version number folder (commonly 2.## ) inside the root directory, and inside it create a new directory called Config such that it stays Blender\2.##\Config.
If you now run Blender from this location and press Ctrl+U startup.blend, userpref.blend, bookmarks.txt, and recent-files.txt will be placed under this config folder by default.
New addons will now be installed alongside default ones currently shipped with the installation Blender\2.##\scripts\addons or Blender\2.##\scripts\addons_contrib
If you already had any previously customized config files under your Windows profile you can manually copy them from the default profile location (generally under C:\Users\\\$USERNAME$\AppData\Blender Foundation\Blender\2.##\) to this new location to bring back your previously saved preferences.
Method 2 - Safe and maintainable
Blender supports several launch variables, a few of them are BLENDER_USER_CONFIG and BLENDER_USER_SCRIPTSwhich allow overriding the default folders for user configuration (where startup files are saved) and the folder for users scripts and addons, where third party installed addons, presets, keyconfigs and scripts are installed.
The trick is to launch Blender from a batch file that sets this to your custom desired location.
In a plain text editor like Notepad paste the below lines of code and save them to the same folder as Blender.exe, give it a any name like "Blender_Portable" but make sure you specify the file extension as .bat not .txt.
SET BLENDER_USER_CONFIG=%~dp0Portable_Data\Config
SET BLENDER_USER_SCRIPTS=%~dp0Portable_Data\Scripts

if not exist %BLENDER_USER_CONFIG% mkdir %BLENDER_USER_CONFIG%
if not exist %BLENDER_USER_SCRIPTS% mkdir %BLENDER_USER_SCRIPTS%

start Blender.exe

This will ensure any custom addons and scripts installed will be placed in a separate directory from default shipped ones, making this "portable install" easier to update for future releases without loosing your custom installed addons or having to install them and configure again.
Notes
When using any of these methods make sure Blender is not "formally installed" into one of the default protected system locations like C:\Program Files or C:\Program Files (x86) or any other place in the file system with restricted access that may require administrator privileges to write to, otherwise saving preferences may trigger UAC prompts or fail entirely.
These method are more suitable if you install Blender in some secondary internal drive, removable media like a thumbdrive, external HDD, USB device, memory cards, or similar, and useful if you jump around computers frequently (between work, home or school). This way you can keep you settings and user preferences with you, and carry them around wherever you go, without changing system installed or local defaults.


What is the algorithm behind Blender's Proportional Edit? How does Blender compute the vertex displacements during Proportional Editing?

I'm guessing it first searches for vertices within the user defined radius, then calculate somehow the weights for each of those found vertices based on degree of connectivity to the seed vertex or distance? Or does it use free form deformation approach?

A paper or reference would be helpful too.

It calculates the distance between the element you are changing. If it is within the radius the user selects it will use a falloff that the user has selected.

Basically the values of the matrix of the transformation that the user is done is influences by the distance of the other elements. As you can see here.

Possible falloffs

Note: distance = 1 - (the actual distance/radius the user selected)

Constant: 1

Random: random between (0..1)

Linear: distance

Sharp: distance^2

Root: sqrt(distance)

Sphere: sqrt(distance*2 - distance^2)

Smooth: 3*(distance^2) - 2*(distance^3)


Why are simple shapes like spheres built using polygons? I was wondering what is the reason to implement shapes like spheres with triangles instead of a mathematical equation? This could allow perfectly round spheres and not kind of spherical with some levels of subdivision surface. Not to mention the significant boost in rendering time.

Creating an "equation" for rendering non-simple objects, such as a tank model, for instance, is much more difficult, especially when it comes to ray-tracing and shading. While for instance a sphere from an equation would be very simple, a sphere next to a complex object would be difficult, and its better to build complicated meshes out of polygons. The reason you can't have math-based meshes next to polygon-based meshes together is because they use different ways of rendering, as well as to keep everything consistent. This is my understanding of it, anyways, and people can correct me if I am mistaken.


Projection of point on plane I have a point in 3d view (found out with region_2d_to_origin_3d of mouse position). I want to find its projection on a plane defined by a normal (x1, y1, z1) in orthographic view. How to do this?

Edit: Attaching a sample blend file with the script I am trying to run. If you run the modal operator from the perspective view and move the mouse pointer, the Bezier line always lies on the plane (which is the desired functionality). But the same operator from orthographic view does not produce any movement.

The code can be the following.

We principally need the view vector (axis from the camera) and the view point (cam/eye position) which are given by view3d_utils.region_2d_to_vector_3d and view3d_utils.region_2d_to_origin_3d.

Then we cast on the plane coordinates in two parts as the plane is two tris.

    # Get mouse position
    mouse_pos = event.mouse_region_x, event.mouse_region_y

    # Get object and region 3D
    object = context.object
    region = context.region
    region3D = context.space_data.region_3d

    # The target plane in order to have coordinates
    plane = bpy.data.objects.get('Plane')

    # All Transforms applied, so global space coordinates
    # (Plane is used just to get the points, in actual situation only
    # points will be available)
    p1 = plane.data.vertices[0].co
    p2 = plane.data.vertices[1].co
    p3 = plane.data.vertices[2].co
    p4 = plane.data.vertices[3].co

    # View vector (view axis) from the mouse pos
    view_vector = view3d_utils.region_2d_to_vector_3d(region, region3D, mouse_pos)
    # View point (eye position) in 3D
    view_point = view3d_utils.region_2d_to_origin_3d(region, region3D, mouse_pos)

    # Cast on plane defined by points above (2 counterclockwise tris)
    loc = geometry.intersect_ray_tri(p1, p2, p3, view_vector, view_point, True)
    if not loc:
        loc = geometry.intersect_ray_tri(p2, p4, p3, view_vector, view_point, True)

Note: have left the plane coordinates part as it was, but can also use the plane world matrix to translate coordinates to world.


Blender 2.8 UV Does not appear? I'm having difficulty with this one. I've used UV unwrap on simple objects and texture painted them just fine. However I cannot get an unwrapped UV to show up in the editor on this model. I'm certain I'm missing something basic but my Google fu has ran out.

I've got everything selected, have used Project to View on this example but doesn't make a difference really. What am I missing? Any help gratefully received.

Am on Dec 26th build of Blender 2.8 but it's been like this for a while. May be nothing to do with it being 2.8 I realised.

You can trying to make a new Workspace

I had that problem with the OLD (2.79) files


Make gap even thickness? I have two panels:

Between them is a uneven gap, in some places it is very narrow, in other places it is wide. How can I make it so that the gap is consistent width?

for testing on.

Try this way:

Select both sides, W - Bridge Edge Loops. Enable Merge, set Factor to 0 (or 1);
Keep current selection, V to rip, then RMB;
Mesh > Edges > Edge Slide ( or GG) to enable Edge Slide. E to toggle Even, if the current result is in a wrong way, then F to flip it (those are options shown on 3D View header).
Move to the expected position, then LMB or Enter to apply changes.

P.S.: For the 3rd step, you can simply CtrlB to bevel those edges. However, the normals for both islands are opposite in your case, you need to unify them before that.


blender texture paint problem: color combining with texture during stencil painting i was just texture painting using stencil and it was working fine, i dont know what i pressed or what happened but colour is mixing with the image and i cannot turn it off, if i turn color to red or whatever, that color strokes will i get, i just want to project image onto my model like it was just working before.

i solved it, i had accidentally painted some strokes of another texture so now the result i was getting was combination of two, i used the symmetry to solve it as left side of my model was fine


Compositing multiple masks I'm dropping a 3d object into footage of a real city and want it to be occluded by buildings as the view orbits the object. I can mask buildings fine, and use a set alpha node to combine the mask with the original image sequence no problem. But when I use the output of the set alpha as the image input for the next mask, nothing happens.
This works:

This however, with the next two buildings that block it from view added does not work:

Here, I highlight which mask/set alpha is applying to which building. If I reverse which mask is applied last, then the building in green is the mask that works. It's only the last mask that works. Is there another node I need to be using instead of set alpha for multiple masks. I have 4 more buildings that need to mask over the rocket as the camera orbits. I've seen examples on youtube with multiple set alpha nodes but I can't seem to get that to work. Any help would be greatly appreciated.

"Set Alpha" should be used only once, to associate the alpha channel to the RGB information on the image.
To combine alpha channel use a math node and add (or subtract) the alphas together before associating.


How to get same texture on both side in render? How to get same texture on both side in render? I made texture on both side of plane with nodes in shading. In shading mode it is what I wanted but in render, back side has no texture. I  rotated UV map for 90 degree to have right direction of texture. I want same texture on both side. Here is the screenshot of the mesh and material.

I will tell the trick. Delete the material and create it again if it is simple. If it was complex, then create a new material that is different from the material you want. Next, go to edit mode and select all the faces by pressing shift and selecting all the faces. Go to materials and click on the bluish metal material, or any material you want. Make sure the faces are selected. Below the materials, you will find assign option. Click on that. It will be assigned to the whole object, even the backside. I have used this trick a lot of times and it works perfectly and it will be rendered. For this to work, you have to make sure though that even the faces on the backside are selected. Hope it helps.
Cheers,
Aster17


How and when does clipping of RGB values happen? I was writing a tutorial on the "Object Info" node of Blender Cycles and was trying to describe what happens when a color node is fed with numbers out side the interval (0, 1). I gave up and just said "strange things happen".

I know how to map values onto or clip them to the interval (0, 1) so I can usually get the effect I'm after but I'm curious and would like to understand how the color clipping works.

The image below show a grid of cubes in the XY plane. They all have the same material as shown. The larger wire frame cube goes from (0, 0, 0) to (1, 1, 1). There are no lamps and the world surface color is set to (0.051, 0.051, 0.051) (default start up).

Outside the wire frame cube all the little cubes seem to act like emission lights. I think this is related to the answer to this question.

What I don't get is the diagonal line of black cubes. For example rgb(2, -2, 0) gets mapped to black but rgb(2, -1.75, 0) gets mapped to red. There are other lines of black cubes if we move the grid of cubes up in z.

For example all of the following cubes are black (-1, -1, 2) , (0.5, -1, 0.5), (-1, 0.5, 0.5), (0.5, 0.5, -1) , (2, -1, -1) (2.5, -3, 0.5).

Can anyone explain how this works?

This is result of Diffuse shader code implementation. Probably somewhere in the code is:

if R + G + B = 0:    # black
    renderSurfaceBlack()

To back this up I tested with this node setup:

And a cube on grey ground:

You can see red cube with red bounce light (color bleed) and red-complementary bounce light (cyan) under a anti-red (cyan) cube but which is rendered black (explained later).

When some channel is more than 1 the bounce light will look like emission (the light gets energy on bounces from the cube - energy is not preserved) and the surface will reflect redder red than it should (it will clip at 1,0,0 rendered red):

Till now all makes some sense. When the channel is below -1 actual weird stuff happens:

Try to render this, the sampling process is very wild in the start and looks like a burning fire under a piece of coal:)

When the sum of channels is not 0, all the negative values are replaced with 0 and that surface color is rendered.. You will still see the effect of negative channels in bounce light.

To sum this diffuse shader behaviour up:

When the channel sum is 0 the surface color is black.

When the channel sum is not 0, the surface color is same as with all negative channels equal to 0.


Scaling directly in obj file I can scale my model in Blender at export, and that works perfectly fine.

However, I need to do this automatically as I have many models which should all be scaled to 0.01

Can anybody tell me which values I need to change in the obj file to apply for example a scaling of 0.01?

Ok, I got it:

I simply go through each line, and if a line starts with "v ", I mulitply each of the 3 values with the desired scale.

It should be noted that a scale of 1 is "100%", a scale of 10 would be "1000%", etc.


how do you merge two bones into one? I have a generated mesh and set of bones from a makehuman model but it created two bones in the shin.

How do I merge the two selected bones into one bone but keep the skeleton intact, i.e. the knee and foot where it should be.

With the two bones selected like in the picture in your question, simply press AltM.
That will merge the two bones and take care of the bone relations.

Or You could achieve the same thing in more steps by deleting the two bones, and "filling" a bone between the two ends that are left. Then going and editing the Bone Parent and checking Connected for the top bone.


Cloth Simulation Not Rendering Correctly Over Network I have been messing around with cloth simulations and linking cloth simulations into new scenes to render over a network of computers to help the rendering process go faster.

I ran into a few problems along the way though... Firstly my computer renders the cloth simulation animation just fine, but when I send it to render across the network it comes back looking like a cache of old renders took place.

For example: I place my character in a pose and bake the cloth simulation to the pose and render a still on my main machine and it comes out looking great. Then I render the same image on the network and it renders the cloth simulation but not according to what it was supposed to render as regarding the pose.

This is a test I did as a simple animation where the character is moved to the side. The picture samples below are of frames rendered on both my local computer and the network computers.

Rendered on Local Computer

Rendered on Network

I think its rendering the cloth simulation in the initial "T" pose a character is normally posed in before animation or reposing. Which means the simulation is still occurring just not in the desired pose.

I did a second test with a different character but with the same settings and this is what happened.

Rendered on Local Computer

Rendered on Network

The cloth simulation is not following the rig during animation or stills when rendered over the network, but I does follow the rig when it is just rendered on my main computer.

When I send a blend file across the network I make sure that all the linked libraries and other objects are packed and all my paths are relative, also I make it my habit to bake all physics before rendering. The blend file is always saved before its sent across the network as well.

There must be something I am not aware of in regards to rendering cloth simulations on a network that would be the key to solving this problem.

If anyone has any ideas on how to fix this, I would love to know.

Under Cloth Cache, if you enable Disk Cache, blender will create a folder holding the cloth simulation data, without this no simulation data can be used while rendering. This cache folder needs to be copied to each computer that will be rendering.

The name of the folder should be the blend filename prefixed with blendcache_ and be in the same folder as the blend file.


Dilate/Erode: Difference between Step and Distance mode? What is the difference between the Dilate/Erode nodes Step and Distance modes? I can tell they are doing different things, but I'm interested in the technical details and the documentation does not cover it.

In Step and Distance mode, the Erode/Dilate node samples through all pixels and compares their value to the neighbouring pixels. If a neighbouring pixel has a lesser value, than it is matched the sample pixels value.

The following pseudo python shall demonstrate.

FOREACH a OF allPixels:
    FOREACH b NEXT TO a:
        IF (a > b):
            b = a

In Step mode, the adjacent pixels are right, top, left, bottom.

In Distance mode, the adjacent pixels include diagonal connections.

Here is a comparison of an example.


Why do I get a 'Failed to set value' error when trying to add a 'Copy Location' constraint to my rig? I'm trying add a Copy Location constraint but it doesn't work. I am making a metarig like in the video but if I press enter its cast nothing happens.
I tried picker thing I get this error:

Blend file link: https://dosya.co/9qudtsa52r77/1.blend.html

If you want to use this constraint between bones, try to use bone constraint in pose mode.


View gets messier as I advance in a project Hi everyone,
I've been trying out blender lately following Guru's tutorials.
Sadly, the more I advance into any project, the more difficult it gets to move my view around (not talking about camera but simply looking at the objects I'm working on) although I don't touch anything regarding views on purpose.. I must do something wrong but I can't figure it out:
At some point, whatever the size of the object I'm trying to focus on, my view and my preset views are getting messy.
For example, each time I touch the middle click (wheel for rotation), the view focus just instantly jumps meters away before I even move. With a very small object (1 mm) I just can't manage to get near it. Numpad views 1 3 7 & 9 are not aimed at my object anymore.
Weird part is that if I start off a new project, all those view difficulties disappear.  Changing the Clip start & Clip end values, I can zoom on a 1 mm sphere easily.

I spent hours trying to fix my view & zoom problems, tried every tutorial I could find, even from a professional Jeweler working on tiny projects.
YT comments didn't help either although I see many people have similar bugs with various solutions..
Quick list of what I tried to fix my problem without success:
Shift+c. Changing Units. Fly mode (won't let me use it unless in camera mode as "view offset is locked"). Setting up different view settings (focal length, clip start, end). Zoom to mouse position. "Numpad .". Auto Perspective or Depth. New hotkeys. New home brew functions. Change view lock. Lock camera to view. Zoom border. Align view. Local view. Scale down. Orthographic view.
Nothing seems to help expect starting a new blend.
The work around I use now is when I feel views are out of my control,  I copy paste the objects in a new .blend & voilà !
Frustrating that our Guru Blender seems to always have everything working smoothly.

Sad that navigating through blender's virtual space can get so damn hard.  And I can't find any working shortcuts to simply get the object properly into view or reset all the views to 0 (default).
I might have to tape out as I spend more time working around the view than 3d modeling and getting use to blender's tools.

Thanks in advance for your help & your time.
Sorry for writing too much.
Best,

Feels like there is no point in dragging this subject on. I must say I haven't found a proper solution to reset all the views, navigation & related functions / hotkeys when they aren't responding as they should anymore.
I don't know if I'm messing up at some point, accidently touching something I shouldn't.
Anyways, the work around I've found which works pretty well is to open a new blender project and copy paste my objects from the old one to the new .blend. As I do this, views and navigation are working properly again and I can go on with 3d modeling.
Thank you all for your suggestions, much appreciated. I still learned stuff :)
Best,
Kira


I have a problem with adding surfaces Hi I'm trying to make the surface of the object smooth
I tried 'shade smooth' on both object/edit mode.
However, I couldn't get the result as I wanted.
just like the illustration on the right,
I want the head piece to be smooth
it's polygonal and rough at the moment.
I also tried 'bevel'
but it still left the existence of the original edge
and lastly, the 'subdivision modifier'
gave me the closest result that I want.
but It also modified the surfaces that I didn't want them to be.
to make it smooth, do you have any suggestion?
just like bevel, I think if there's any other technique for adding
surfaces, that might help

The best way to do it is to give your object a Subdivision Surface modifier. As it will round the angles that you want to keep sharp, you'll have to add some edge loops close to these angles.
To make things easier you must try to keep a good edge flow. This site (topologyguides) gives some good tricks but in my opinion the more you'll try the more you'll succeed.
Here is a quick example of what you could do:
Before:

After:


Why is the liquid's reflection look so weird after the render? (Blender Guru tutorial) I was doing the coffee cup tutorial that made by Blender Guru,and this happened:
The shadow looks weird when there is liquid in the cup.(Look like dimanods?)
But everything looks right when there is nothing inside the cup. Don't know why is that happening.
Here is my compositing.(I didn't turn on the denoising in the render properties.)
Here is how it looks like in rendered view mode

The wireframe of the glass and the liquid.
Cup's wireframe
LIquid's wireframe

Have a nice day.

It looks like your liquid mesh is intersecting very slightly with the cup.  It's possible they have different render values for their Subdivision Surface modifiers, or a common fix (and one given by Price) you could try is scaling the liquid mesh up very slightly.
This intersects the liquid's outer faces into the glass completely which gets you a pretty good render.
Additionally, there are several posts on this site and others regarding the proper physically correct method of rendering liquids in glasses, which I will link here.
Liquid / glass interface IOR and normals in Cycles - BSE
fluid in a glass - BSE
Fluid in a Glass - Greg Zaal's blog


Independent Edit/Object mode in splitscreen When I split screen in two and switch Edit/Object mode, they both change.
How to change just one?
The intention here is:

use one to modelling with numkey view with transparent wireframe
and the other to see the progress in perspective, with solid mesh

Switching to Edit mode per-viewport isn't currently possible in Blender.
According to this rightclickselect.com request this probably won't be implemented in the near future, since it's "fundamentally incompatible with the way Blender handles objects".
(I'd like make this a more 'proper' answer with gifs and lists, but in this case....)


How to store animation properties/values, and restore them on callback I'm implementing a Python script that sets a start frame for multiple selected objects. The objects each have their own NLA strips with their respective values. I've been trying to 'group' these animations together, and shift them according to a user input value. For example, if a user inputs the start frame as 200, the offsets start from that frame.

Making each of the NLA strips move by +value works for adding to the NLA strips seems to work well, but when the value is changed to something lower, it would keep adding to the start frame value. Also, if the value is adjusted slightly higher, like from frame 241 to 242, the strip jumps 242 frames.

I've tried using conditional statements/expressions to control the values, but on user update, the results tend to vary or cause the animations to start on the wrong frame.

A solution I think would be to have the strips revert to their original values before each update, but I don't know how to achieve such a function. The code below is what I have so far. I have a Blend example with 3 cubes attached below

import os
import re
import bpy
from bpy.props import *
import bpy.utils.previews
from bpy.types import WindowManager
from bpy.props import StringProperty, BoolProperty, IntProperty, CollectionProperty
from bpy.types import WindowManager
from bpy.props import (StringProperty,
                       PointerProperty,
                       )
from bpy.types import (Panel,
                       Operator,
                       AddonPreferences,
                       PropertyGroup,
                       )

# Panel
class PreviewsPanel(bpy.types.Panel):
    # Create a Panel in the Tool Shelf
    bl_category = "My Panel"
    bl_label = "My Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    # Draw
    def draw(self, context):
        layout = self.layout
        scn = context.scene
        layout.label("")
        row = layout.row(align=False)
        box = layout.box()
        row = box.row()
        row.prop(context.window_manager, "slide_1_start",text = "Start")
        box = layout.box()
        row = box.row()

def frame_slide(self, context):
    obj = bpy.context.selected_objects
    ob = bpy.context.object
    DEFAULT = 0
    STRINGVALUE = bpy.data.window_managers["WinMan"].slide_1_start
    START1 = 70

    for obj in bpy.context.selected_objects:
        obj.animation_data.nla_tracks[0].strips[0].frame_start += STRINGVALUE
        obj.animation_data.nla_tracks[0].strips[0].frame_end += STRINGVALUE
        obj.animation_data.nla_tracks[0].strips[0].frame_start += 0
        obj.animation_data.nla_tracks[0].strips[0].frame_end += 0
        obj.animation_data.nla_tracks[0].strips[0].scale = 1

    for obj in bpy.context.selected_objects:

        obj.animation_data.nla_tracks[0].strips[0].frame_start += 0
        obj.animation_data.nla_tracks[0].strips[0].frame_end += 0
        obj.animation_data.nla_tracks[0].strips[0].scale = 1
        return None

#####################################################################

# Register
def register():
    bpy.types.WindowManager.slide_1_start = bpy.props.IntProperty(name="Slide_1_SF", update=frame_slide,min=1,options={'SKIP_SAVE'})
    bpy.utils.register_module(__name__)

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

if __name__ == '__main__':
    register()

Blend file

So, I want to create a script so that the original NLA strip values will be stored. if a user sets the start frame to 24, the NLA strips shift by +24. If a user changes the start frame to 13, original NLA strips values are restored and then shifted +13.

An example of what I'm trying to achieve is basically similar to: if I have a scene of multiple objects (like dominoes or cubes), I want to set a start frame for the animation without altering their offsets from each other.

I only added the relevant parts of the code.
The solution is to keep an additional setting that remembers the previous setting slide_1_start_previous. We now can calculate the difference by subtracting both values. and shift the strip using this value.

def frame_slide(self, context):
    difference = self.slide_1_start - self.slide_1_start_previous

    for obj in bpy.context.selected_objects:
        strip = obj.animation_data.nla_tracks[0].strips[0]
        scale = strip.scale
        strip.frame_start += difference
        strip.frame_end += difference
        strip.scale = scale

    self.slide_1_start_previous = self.slide_1_start
    return None

# Register
def register():
    bpy.types.WindowManager.slide_1_start = bpy.props.IntProperty(name="Slide_1_SF", update=frame_slide,min=1,options={'SKIP_SAVE'})
    bpy.types.WindowManager.slide_1_start_previous = bpy.props.IntProperty(default=1)

    bpy.utils.register_module(__name__)

As you didn't implement it as an operator it is hard to determine when you want to reset these values. I would suggest placing this in an operator.


Rendering a scene with shaderless objects results in a completely black image I want to do a 2d animation of a particle system.

I created a background, put my camera up, set the mode to orthographic.

I created an object for my particles to use, set them shaderless, created a particle system and chose that object to be rendered.

(camera, material and particle properties)

When I view the animation through the camera it looks nice but when I render the animation, it takes a lot of time and the image comes back just black.

(viewport vs render)

I tried putting up a light, but that didn't work.

blender project file

It's not going to work because of child particles

Unfortunately, since you are rendering child particles, you can't achieve your goal at the moment (Blender 2.79).

This is because the Particle Info node

  ... currently only supports parent particles. Info from child particles is not available.

I don't know the roadmap for this.

Other details

First, you are currently seeing a good "material" view, because it doesn't rely on Cycles. But if you change to the "rendered" view (you don't have to make an actual render, but it's practically the same), it falls back to black.

Now, even if you disable the "children" in your particle system, it's not going to get any better

this is because your material is, indeed, "shaderless"!

If you add a shader (like the "Emission Shader"), though:

Voilà!

Unfortunately, though, it won't work if you enable child particles again.


Duplicating object along curve I have an object that i would like to duplicate along a curve. To do that, I have added a Array modifier that duplicates the object and a Curve modifier and selected the appropriate curve object to guide placement of the duplicates. However, selecting none of the axes produces the correct result, which should be the obejcts placed along the curve. What am I doing wrong or missing?

This is an asteroid next to a sun object. Ultimately, I would like to create a bunch of asteroids around the sun. My plan is to duplicate the asteroids many times along the curve and then to randomize their placement, rotation and scale a bit so that the lot looks natural.

For the reference, here's my scene .blend file: Scene .blend

Select your asteroid and:

Apply its rotation and scale (CtrlA).
Move it at the same point as the bezier's origin (as it is the center of the scene you can press AltG).
In its Curve modifier choose Deformation Axis > X.
If you apply the curve's scale, bring back the vertices radius to one in the N panel.

It should work.


How to transform a cube into this I've got a cube and I want to transform it into the object shown in this picture:

I'd do it backwards:

Create a circle
Use Box Select to delete the lower half of the circle
Select all of them and extrude upward
Flatten the upper half with SY0RETURN (might be another axis for you)
(alternatively just extrude the side verts, select everything and fill the whole thing with F)
Extrude the entire shape to give it depth.

There's another way of doing this....

Take a cube and give it more resolution. Either with a Loop Cut or by subdividing the lower edges.

Then use the Proportial Editing Tool, set the falloff to spherical, select the middle edge and move the mouse up, restricting it to one axis. Doesn't always give a perfect circle though. More like an ellipse.

Luckily there's another way of doing this...

Again use a cube that has enough resolution at the bottom, put a cylinder under it (use one with enough verts, 1024 segments are fine) and use a Cast Modifier on the Cube. Apply the modifier and get rid of the cylinder.


Can multiple render systems be used? I was watching a tutorial how to design an island in Blender,
which worked really great, but i didn't want to use the .png Trees the guy used there. So i watched another tutorial and created another kind of tree - without knowing that the object isn't just modeled in Cycles Render, it is also rendered in there.

My problem is either the (lets say "simple" textured) island (rendered in Blender render) or the tree is shown. Is there any way i can "convert" that cycles object (with its shaders) to Blender Render or the other way around? Or just render with two renders in one project? I haven't found something about that til now. If there is no universal solution for that, i could also put a link to my project in here.

Yes you can combine images created with two different renderer engines. These are optimistic scenarios.

Different Scenes can have different render Engines. Cycles or Blender Internal.
The [Compositor] can invoke and combine images from different Scenes.  The Render Layer Node names the scene and Render Layer.  In the nodes above the text [Blender] was rendered Blender Internal Render and the word [Cycles] was rendered with Cycles Render.  Note the transparent background for the Cycles render.
If your desired result can be composed in visual layers fine.  Only you can determine that.
Cycles has a different approach to Blender render so only you can determine what compromises you can tolerate for a coarse translation.  Just create a new material for the appropriate render engine and assign it to the faces and judge that result.
The VSE can also combine images with transparent backgrounds for the layered composition effect.


Where are the Laplacian Lightning settings once the addon has been installed? I broke down and installed the Laplacian Lightning addon, like suggested. But now I can't find where to trigger it, that is to say, actually apply it to an object like a plane.

In specific, this plane:

I don't really have any ideas on where the button might be, but then again, I only got it yesterday. Can I have some help please?

From the addon author's website:

  UI will be in >View3D>Tool Shelf>Laplacian Lightning (object mode)

Make it appear by pressing T (View>Tool shelf) while in 3d view and scroll down to the menu in the Tools tab. It is visible only in Object mode.

If this doesn't work, make sure you downloaded the proper version that match the current Blender version. See the website fore more details.


Blender 2.8 Scripting for a simple button i was trying script a button in 2.8 i stared withe the templates UI panel

but i wanted to place in the top bar which error out if i change the layout
is there any way to place the button in the top bar?

Pre or Append to the header.

With all panels and headers in blender you can append or prepend a draw method to them.

Test script prepends a splash screen button to topbar

import bpy

def draw(self, context):
    self.layout.operator("wm.splash")

bpy.types.TOPBAR_HT_upper_bar.prepend(draw)

To find the class to "leach" onto, with developer extras on, right click and view source. With the naming convention, TOPBAR pretty self explanatory, HT it's a header type. Hence using autocomplete in python console is a way to find contenders


Blender not allowing different effector collections for two different particles systems I have two different emitters with different particle systems. When I set an effector collection on one - it also changes it for the other. Any idea how to control these independently? I am using the molecular addon.
Here is the project:
Thanks!

You're using the same particle settings in the two particle systems on your emitters. You have a different name in the particle system slot, but it's not a different setting.
Think of the particle system slot to be more like a material slot. You can put more materials on one object, but as long as the material in one slot is the same as one on a different object, changing one material will change the other, too.
In the materials this is indicated by a small number next to the material's name. The same goes for the particle settings shown below the particle system slots. And like in materials, to get a new independent particle setting, just click on the small number right next to it.


Boolean Modifier Problem Blender 2.81: I am trying to use the boolean modifier to cut out a chunk of this square. The first time i did it it worked, and then when i tried to cut another chunk out of it, didn't work. However when i tried using another shape it somehow worked. Does anyone know how to fix this?

Without seeing exactly what you were trying to do, it is hard to know how to advise you. But some general advice about using Booleans, pre version 2.91:

Both shapes should be closed volumes, with all normals pointing outwards
The shapes should not have self-intersections
The shapes should not intersect each other in such a way that edges, faces, or vertices of one shape exactly overlap edges, faces, or vertices of the other.

If any of these things is not true, Boolean might work but it is not guaranteed. This is probably why sometimes you tried, it worked,and other times it did not.
Blender 2.91 (to be released in late November) has a new Boolean solver that does not have problems with the second two of the above points. You can try it now in the daily alpha release builds of 2.91.


How to efficiently convert a PIL Image to bpy.types.Image? I'm trying to put together a function that takes in a grayscale PIL Image and returns a bpy.types.Image (to be used a diffuse texture) but it feels slow:

First I've tried a simpler non python version:

def pil_to_image(pil_image, name='NewImage'):
    '''
    PIL image pixels is 2D array of byte tuple (when mode is 'RGB', 'RGBA') or byte (when mode is 'L')
    bpy image pixels is flat array of normalized values in RGBA order
    '''
    now = time.time()
    # setup PIL image reading
    width = pil_image.width
    height = pil_image.height

    pil_pixels = pil_image.load()
    byte_to_normalized = 1.0 / 255.0
    num_pixels = width * height
    # setup bpy image
    channels = 4
    bpy_image = bpy.data.images.new(name, width=width, height=height)
    # bpy image has a flat RGBA array (similar to JS Canvas)
    bpy_pixels = [None] * width * height * channels

    for index in range(num_pixels):
        x = index % width
        y = index // width
        # read x,y int or tuple flip Y
        pixel = pil_pixels[x,height - y - 1]
        # convert to 1D index, taking channels(4) into account = red index
        r_index = index * 4
        # handle gray
        normalized_pixel = pixel * byte_to_normalized
        bpy_pixels[r_index]     = normalized_pixel
        bpy_pixels[r_index + 1] = normalized_pixel
        bpy_pixels[r_index + 2] = normalized_pixel
        bpy_pixels[r_index + 3] = 1.0
    # update pixels
    bpy_image.pixels = bpy_pixels
    print("pil_to_image completed in",time.time() - now,"s")
    return bpy_image

Which prints pil_to_image completed in 4.9107561111450195 s for a 4096 x 2160 image

I've tried using numpy, however the it's similarly slow:

def pil_to_image(pil_image, name='NewImage'):
    '''
    PIL image pixels is 2D array of byte tuple (when mode is 'RGB', 'RGBA') or byte (when mode is 'L')
    bpy image pixels is flat array of normalized values in RGBA order
    '''
    now = time.time()
    # setup PIL image reading
    width = pil_image.width
    height = pil_image.height

    pil_pixels = pil_image.load()
    byte_to_normalized = 1.0 / 255.0
    num_pixels = width * height
    # setup bpy image
    channels = 4
    bpy_image = bpy.data.images.new(name, width=width, height=height)
    # bpy image has a flat RGBA array (similar to JS Canvas)
    bpy_image.pixels = (np.asarray(pil_image.convert('RGBA'),dtype=np.float32) * byte_to_normalized).ravel()
    print("pil_to_image completed in",time.time() - now,"s")
    return bpy_image

this prints pil_to_image completed in 5.018976926803589 s

Am I missing something? Is there a more efficient way of turning a PIL image into a Blender image to be used as a DiffuseBSDF texture?

Update

Thanks to @batFINGER link I could speed up the function a tad using slice notation:

def pil_to_image(pil_image, name='NewImage'):
    '''
    PIL image pixels is 2D array of byte tuple (when mode is 'RGB', 'RGBA') or byte (when mode is 'L')
    bpy image pixels is flat array of normalized values in RGBA order
    '''
    now = time.time()
    # setup PIL image conversion
    width = pil_image.width
    height = pil_image.height
    byte_to_normalized = 1.0 / 255.0
    # create new image
    bpy_image = bpy.data.images.new(name, width=width, height=height)

    # convert Image 'L' to 'RGBA', normalize then flatten
    bpy_image.pixels[:] = (np.asarray(pil_image.convert('RGBA'),dtype=np.float32) * byte_to_normalized).ravel()

    print("pil_to_image completed in",time.time() - now,"s")
    return bpy_image

which now prints: pil_to_image completed in 3.4869320392608643 s

Any tips on speeding it up further more than welcome :)

Thanks for @batFINGER's reference to CodeManX's snippet this is the fastest option I got:
def pil_to_image(pil_image, name='NewImage'):
    '''
    PIL image pixels is 2D array of byte tuple (when mode is 'RGB', 'RGBA') or byte (when mode is 'L')
    bpy image pixels is flat array of normalized values in RGBA order
    '''
    now = time.time()
    # setup PIL image conversion
    width = pil_image.width
    height = pil_image.height
    byte_to_normalized = 1.0 / 255.0
    # create new image
    bpy_image = bpy.data.images.new(name, width=width, height=height)

    # convert Image 'L' to 'RGBA', normalize then flatten
    bpy_image.pixels[:] = (np.asarray(pil_image.convert('RGBA'),dtype=np.float32) * byte_to_normalized).ravel()

    print("pil_to_image completed in",time.time() - now,"s")
    return bpy_image

it was interesting to see that
bpy_image.pixels[:] = (np.asarray(pil_image.convert('RGBA'),dtype=np.float32) * byte_to_normalized).ravel()

was faster than
bpy_image.pixels = (np.asarray(pil_image.convert('RGBA'),dtype=np.float32) * byte_to_normalized).ravel()


Why is cycles render black and white? I have a blender project I am working on. I just started, and I made a sphere. If I switch from solid mode to rendered preview mode, I get this:

But, when I press f12 to render, I get this:

Why? Why is this happening? Please help

Here is my blend file:

https://www.dropbox.com/s/s6wato3bfp187rs/blender.blend?dl=1

It appears that you are in local view. The plane appears to not be integrated in the render layers. Perhaps you have added it in local view (it looks like a bug)?

Simply press the NumpadDivision key (÷) to exit local view.


Tutorials for simple objects like Railway wagons etc Total beginner. I want to create railway items like wagons, etc. For making .stl files only for 3D printing. No rendering, animation, or anything besides modelling needed.
Can I change the menu to only show the tools I need?
I also need a tutorial to copy over a jpg drawing that gives a side view and end view for reference.
How do I use the tool to extrude, etc? Does this tool have a name?
Show measurements.
How to make different windows etc and place in a library for use as required.
I am 76 and a bit slow on the uptake.  But just the basics is all I need.
Recommended tutorials for me to look at. Thanks. Or even a custom tutorial (you would do this in 5 mins I think !!)
Thank you
-Charles Harris

Different functions of Blenders UI is mainly split into different sections and tabs, if you stick to just the modelling sections you can avoid the clutter of buttons for texturing and rendering. You can add reference images by pressing (Shift)+(A) and going to image>Reference.
To extrude simply select your mesh and press (tab) to enter edit mode. Then select something and press (e) to extrude. You can also snap the extrusion to an axis by pressing x, y, or z.

To activate tools for measuring you can follow this simple tutorial
I also found a tutorial that leads you through a step by step process of modelling in Blender for a 3D printing purpose. Just click here.
If you have any specific questions or need help with how to approach modelling a specific object, feel free to reply to this answer and I can give you some advice.