How can I make video black and white in the VSE I have strips of video in the VSE but I want to remove the color from them. How can I do this and get a pleasing result, and can I re-use the effect on other strips?

Sure you can use modifiers, but there is a Saturation value in every strip's properties.

But it doesn't allow you to use a nice balance of colour components, to do that you need to add a Hue modifier. I choose to use an Adjustment Effect Strip so that I can duplicate it and re-use it elsewhere in the VSE timeline. Set it to S for saturation then drag down all of the hue nodes. You can do a selective colour effect at this time by leaving one of the values at its original position

But this just looks like the original desaturation effect. So we need to add a Curve modifier above it, then modify the relative contribution of each colour channel. We simply alter the curves so that they represent greater contrast for each colour.

Now don't be fooled by this last image, I am only using one Curve modifier, but I have displayed it so that you can see what I did to each channel.


Experiencing problems with UV unwrapping walls containing openings with Archipack addon I'm struggling to figure out how i can UV unwrap a wall properly where either a door or window is attached to it.
As shown in the pictures below, the two UV maps are identical, so it seems that blender cant read the autoboolean that Archipack creates in the wall when adding a door or window.
Also, when entering edit mode, picture 2 shows that blender some sort of ignores the window..

Does any one of you know how it is possible for me to unwrap the wall properly :-)?
Any help would be much appreciated!

i found out that the boolean modifier isn't applied automatically by archipack. Apply it manually and holes will be cut :-)


Area Light vs. Emissive Polygon Both an area light and an emissive polygon can be used to create lights. What is the difference between the two?

Matt's answer covers the theory of it, but to provide a visual comparison:

Area lamp, 100 samples, 11.08 seconds. MIS (Multiple Importance Sample) on

Plane, 100 samples, 12.10 seconds. MIS on

So the plane is slightly slower, but it has slightly less noise as well.

But now lets try with three lamps instead of only one:

Area lamps, 100 samples, 11.31 seconds, MIS off for all lamps (turning MIS on gave the same result with an extra 2 seconds on the render time)

Planes, 100 samples, 12.83 seconds, MIS on for all planes

Planes, 150 samples, 11.19 seconds, MIS off for all planes

Planes, 100 samples, 12.46 seconds, MIS on for two smaller planes, off for large one

So it appears that when you have multiple lights and manage which emission planes have MIS turned on, the result can me similar to area lamps, although still a bit slower and slightly more noisy. It's the other way around when you have only one emission plane, but the difference is subtle. MIS for area lamps doesn't seem to make any difference to the diffuse, except increase the render time a bit.

This only compares noise level of shadows and diffuse shading, for Glossy shaders you usually want to keep MIS on for the lamps you wish to create specular highlights. (See page 5 of this paper):

(From the above mentioned paper)

Now for arguement's sake, lets take a look at a point lamp vs a spherical mesh:

Point Lamp, 100 samples, 12.30 seconds, MIS on

Sphere, 100 samples, 13.86 seconds, MIS on

The sphere is clearly the loser here, very noisy and slightly slower. Turning MIS off makes it much worse.

To conclude - it all depends on your situation. Mesh lights are more flexible and probably more accurate, but require some understanding of importance sampling and playing around.

All these tests were done with the Path Tracing integrator. Using the Branched Path Tracing integrator, Area and Point lamp renders were much cleaner, and mesh lamp renders were much noisier (for various samples but the same render time).

Download this .blend file if you'd like to play with it.


Increase Intensity of Vertex Group I am trying to create some low poly mountains.

My issue concerns the pine trees, which I have added to make my lake look bigger. I have used the Properties panel > Particles tab > Vertex Groups dropdown > Length: setting to control the length of the trees (Hair particles), for added depth.

My Weight Painting for the Length: setting:

I like the transition, but I'm wondering if it's possible to increase the intensity (i.e. lesser values become less, greater values become greater) to increase the contrast of the sizes between the trees in the foreground and background.

If you go into weight paint mode with vertex select mask selected...

...and selected all your vertices, you can use the smooth button which works both ways.


How do I link two mirrored sides? So I've created an X and I used a mirror to make the right side of the X and have it symmetrical to the left side. As shown in the picture:
The problem I am having is when the image is rendered it looks like this:

At the axis of symmetry for the X there is a weird black line? I think it's due to two lines meeting at the same points? I don't know how to fix this and I would really appreciate any help. This is my first time using blender ._.

Actually, this can be many things:

First try to change the merge limit value, and have a render.

If it doesn't work :

in Edit mode, while zooming at maximum, make the twins vertices (of the top of your object, for example) -one for each side or your mirrored object - the closest as possible, overlapping themselves.
Try a Render, it should solve the pb.

If not :

if you don't plan to have further modification on your shape, once it's finished, in Edit mode, you can apply the mirror modifier, then press A (it will select all the vertices), then W, then remove doubles, it will merge the overlapped vertices
And try a render :)


Transparency in Eevee Blender 2.81 not working I'm editing a tank and I followed transparency for glass tutorial using nodes. I would also like to ask why is my preview different with my rendered? I'm also new to blender so there's probably something wrong Im doing. I've also tried all the tutorial but still shows the same result.

In EEVEE, I find that glass shaders don't work so well, so I leave them for cycles. For EEVEE, I use this arrangement to get realistic glass - pay attention to the blend modes I have highlighted on the right. If you absolutely must use a glass shader, go with the arrangement I placed above, but generally I find the one I have highlighted (framed) works best. I tinted it blue just to show it better with the fresnel. See image:


Copy Transform Constraint Wrong Rotation I have created an empty to hold the relation of the resting position of a bone to a weapon. I am setting a copy transform constraint on the hand IK with this empty as the target. The constraint matches the location of the empty correctly, but I am getting odd rotation.
This is the hand IK (with mesh hidden) and empty. The empty is parented to the weapon.*

This is the resting position that I am trying to achieve with the empty and copy transform constraint. This is so I can set the hand to the resting position relative to the weapon.

This is the result I get when adding the constraint with the empty as the target. Not what I want.

I have tried matching the rotation of the empty to the rotation of the hand_ik in pose mode, but that gets me the results shown above. My best guess is this has to do with how quaternions work, but I don't know how to go about fixing it. How can I set the empty rotation in such a way that the hand will have the correct resting rotation when I add the copy transform to the hand ik?

As mentioned by Denis, a child-of constraint would be easier.  But it's still possible to answer your explicit question, "How can I set the empty rotation in such a way that the hand will have the correct resting rotation when I add the copy transform to the hand ik?"

Get the hand posed how you'd like, without the copy transforms constraint.

Give the empty a copy transforms constraint (world->world space) targeting the hand bone.

Apply visual transform on the empty (ctrl A menu in object mode for me) then delete its copy transforms constraint.  If necessary, register keyframes for the empty.

Now give the hand bone the copy transforms constraint targeting the empty.


Selecting an intersecting point in a line Selecting an intersecting point in a line.
Ideally, all points in the line, not just one.
Just for visualization, here is a line.

And there are the points between the start and end of the line.

I would like to know how, in Python, if you had selected the points A and B (like in the second image), you were able to select ideally not one (but that would be an acceptable answer for something I could work off of), but all the points (1, 2, 3, and 4) between aforementioned A and B.
The important thing is that A and B are random points in 3D space. They are not flat against the ground (for example with coords 0x, 3y, 0z); but they are always connected as a line.
If someone could help me out here, that would be great. The Blender documentation is unfortunately not as good as Adobe's so I can't do everything (really anything) myself anymore.

As HISEROD pointed out, if you click on one vertex to select it, and then hold CTRL before clicking another, you will select the shortest path to that vertex:

If you indeed need a script solution, here it is:
import bpy

index1 = 105
index2 = 165

bpy.ops.object.mode_set(mode = 'OBJECT')
obj = bpy.context.active_object
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.select_all(action = 'DESELECT')
bpy.ops.object.mode_set(mode = 'OBJECT')
obj.data.vertices[index1].select = True
obj.data.vertices[index2].select = True

bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.shortest_path_select(edge_mode='SELECT', use_fill=False)


How to use Halftone Python Shader node? I've found this rad looking halftone shader but as I'm pretty new to blender I don't know how to implement it. I've put it in the text editor then tried to get a script node to run it but it hits an OSL error.

Here is where I found the code https://blenderartists.org/forum/showthread.php?125741-PyNode-cookbook/page8&p=1234519#post1234519

Here is the code itself:

from Blender import Node
import math

sqrt_2 = math.sqrt(2)

class DotsNode(Node.Scripted):
    def __init__(self, sockets):
        radius = Node.Socket('radius', val=4*[1.0])
        grid = Node.Socket('grid', val=10.0, min=1.0, max=100.0)
        fg_color = Node.Socket('fg_color', val=3*[0.0]+[1.0])
        bg_color = Node.Socket('bg_color', val=4*[1.0])
        color = Node.Socket('color', val=4*[1.0])
        sockets.input = [radius, grid, fg_color, bg_color]
        sockets.output = [color]

    def nearest(self, coords, grid):
        """Return the nearest grid coordinate to coords."""
        x, y = coords
        gx, mx = divmod(x, grid)
        gy, my = divmod(y, grid)

        x = gx * grid
        y = gy * grid

        if gx % 2 == gy % 2:
            if grid - mx > my:
                return x, y
            else:
                return x+grid, y+grid
        else:
            if mx > my:
                return x+grid, y
            else:
                return x, y+grid

    def __call__(self):
        input = self.input
        coords = [self.shi.pixel[0], self.shi.pixel[1]]
        grid = input.grid # pixels
        radius = (1.0 - input.radius[0]) * grid

        # Get the square distance from coords to nearest grid point
        nearest = self.nearest(coords, int(grid / sqrt_2))
        sqdist = (coords[0]-nearest[0])**2 + (coords[1]-nearest[1])**2

        # if sqdist is less than the scaled radius squared than color one
        if sqdist < radius**2:
            self.output.color = self.input.fg_color
        else:
            self.output.color = self.input.bg_color

__node__ = DotsNode

Here is a sample image from the original post :

How can I produce this effect?

The post you reference in your question is almost 10 years old and appears to rely on Blender features and APIs that are no longer available.

The code is definitely not for an OSL shader - so using a Script node will not work - it's actually a python script.

The first 'import' statement attempts to import 'Node' from package 'Blender' - as far as I understand it, this was the old package for API calls to interface with Blender that has since been replaced with package 'bpy' (blender python).

It is possible to create such an effect in the compositor using a similar technique to that apparently used in the original script.

To achieve this in the compositor we need to be able to determine the location of each pixel in the image so that we can determine how far each pixel is from the a grid used to position each of the halftone circles, scaling the circles based on the brightness at that point. The pixel location isn't directly availabel to the compositor nodes but we can use Blend Textures, which vary across the image, and feed those into the compositor to derive the X and Y location.

Start by swapping to the Texture properties panel and click 'New' to create a new texture. Give it a meaningful name (such as 'HorizontalBlend', set the Type to 'Blend' and set the direction to Horizontal. Ensure the Progression is set to Linear.

Repeat for 'VerticalBlend' (click the '+' to add a new texture), setting the direction of this one to Vertical.

These textures can be accessed in the compositor to determine the X and Y location in the image.

In order to create the halftone pattern we need to be able to split the image into a series of grid cells. Each cell will represent one 'blob' of the halftone pattern whose size will depend on the brightness of the rendered image at that point.

The following nodes can be used to generate an array of 'blobs' that we can use for the halftone :

This will produce something like the following :

The position in the image is split into a series of bands by the Modulo function (smaller values produce narrower bands). This is then multiplied up to the range of 0.0 to 2.0, 1 is subtracted (so the range is -1.0 to 1.0) and the Absolute node reverses the sign of the negative values. This results in a value that starts at 1.0, reduces to 0 at the grid line, and increases back to 1 - ie, the distance from the grid line. The same is done in the other dimension and the results combined (with pythagoras - a^2 + b^2 = c^2) to give the distance from the centre of each circle.

We can turn this into the halftone image by simply comparing the distance to the nearest centre with the brightness at the current point in the image. This produces the following rudimentary halftone :

To refine this a bit we can slightly change the pattern by offsetting each alternate row - this will produce a hexagonal arrangement of blobs that produces a more pleasing result :

Adding Mix nodes we can add a splash of colour for the two halftone shades and the background (set to black by setting Environment Ray Visibility to disable visibility to the camera) and the foreground (drawn using Freestyle as white lines) and nodes to allow fine tuning of the halftone (the Divide and Subtract nodes).

To finish this off we can add nodes to allow the horizontal and vertical dot pitch and better adjustment for the colours, brightness and contrast as well as Blur nodes to allow the effect to be softened (blurring before the halftone removes hard edges and fine detail that would interfere with the pattern, whereas the blur after the halftone softens the 'blobs' themselves) to produce the following nodes :

By unchecking the camera visibility of the environment (so it appears black) and by adding pure white edges using Freestyle we can achieve the following result :

Blend file included

EDIT
I've extended this to produce a colour halftone by simply splitting the image channels, duplicating the nodes, and re-combining the result. You could potentially change the dot pitch on each channel for different halftone effects.

Here's the node tree (apologies for the scale but it's included in the blend below) :

The coloured original :

And the coloured halftone :

Blend file included

You can also experiment with the dot pitch to use different pitch per channel. For example :


How to make object transparented when player approaches them based on their distance? I have an horror game project, and I want to make an object disappear when player gets near them.

Of course, the disappeared object needs to have opacity step based on player's distance to the object.

So, Is there is anyway to make an object slowly disappear when player approaches them based on their distance? (Phyton suggestion allowed)

1. In your material active (enable, check) Transparency checkbox:

2. Select the desire object

3. In logic editor, add an always sensor connected to a pyton controller:

4. script.py

from bge import logic
own = logic.getCurrentController().owner
player = logic.getCurrentScene().objects['Cube']
distance = own.getDistanceTo(player)
#if distance
print('distance : ', distance*0.02)
if distance * 0.04 < 1:
    own.meshes[0].materials[0].alpha = distance * 0.04
    print('alpha : ', own.meshes[0].materials[0].alpha)

Related

Python API (bge object material)

bge.types.KX_BlenderMaterial.alpha


Generating sleepers for railroad track Using this object as bevel curve, it is easy to generate railroad tracks. Now, how would you do add sleepers at regular intervals along the track?

Array modifier springs to mind as sleepers are somewhat of an array. It does however depend upon the way you want to extract (excuse my use of language, English is not my native language) your track.

If you intend to make some straight track, I would first create the tracks, 60 cm looks kind of right. Create a sleeper next and join it all as one object (sleeper as "root" works fine for me). I hope the included pictures enlighten you a little.

A straight track might look like this and can use an relative interval of 1:

To create a curve, this method is to crude: you get a lot of jagged connection, though if the track is only a very minor part of your scene, it might work. I reduced the interval to 0.95 to avoid gaps in the outside curve.

As you may see from my examples, I replaced your nice track-profile with a fairly crude modified cube.

I hope this helps you a little, kind regards, Christiaan


How to make edges appear smooth I'm trying to make the cut out edges of this shape appear smooth but i can't seem to do it.

It looks like you have an odd geometry (ie: it has a lot of faces with different amount of edges). But there are some other things that can lead to this.

First, make sure you have auto smooth turned on. This can be found in the data section of the properties panel in the normal tab. See this post for more information.

The other thing that could be causing it has to do with the actual geometry. It's a little hard to describe and I'm not sure this will actually fix your problem but it's important to keep in mind. Basically, you can set an object to have smooth shading to make it look smoother on the surface, but that won't fix it around the edges.


Ability to store selections Is there something similar to vertex groups for faces and edges? I find vertex groups incredibly useful for remembering custom selections I've made.

What I want to do is select faces or edges, and be able to reselect them later as easy as possible.

Sadly this feature will most likely never make it into the official release of blender.

As CoDEmanX said,

  It's not possible to implement it well in Python, as custom layer data propagates on actions like extrusion. So if you stored the selection state of edges or faces as a property of these elements, it would be copied over to the new elements when you extrude etc.

Also it is important to notice that there are some selection difficulties that would come into play. in spite of all that, there is a proposal for such a feature, and it may become possible in the future.


Use particle location as driver variable I wanted to animate this hexgrid I made with particle systems using drivers, but I can't find any way to use the particle x location (or y or any particle-specific data) as a variable for a driver, and using the hexagonal object I use as render for the particles' location makes the particles not update seperately; they all update according to the x location of the original object.

Is there any way to use drivers on particles and make them use variables from the particles.

The easiest option is the one Leander suggested; installing the animation nodes addon, then using a node setup that looks like this (the highlighted part makes it so you can animate particles seperately):


Choose distinct colors based on Custom Properties Is there a way to assign a distinct "random" color to a mesh based on the string-value of one of its "Custom Properties"? I am most interested in having this color visible in the 3D viewport to distinguish objects based on their properties while editing a scene.
I'm not sure whether the solution should be based on shading or not. The viewport "solid mode" view with "random" color assignment is close to what I want except that it chooses a separate color for each object rather than for a group with the same property.
For example, supposing that I would have a large number of meshes each with a property "country" and I wanted each mesh with value "australia" to be one color, each with value "usa" to be another color, and so on.

You can do it with the latest Blender Version (2.92+) and custom properties :

Download the latest version (At least 2.92+, which is currently in Beta but should be officially released pretty soon).
Select your object, and create your custom property, named "country".
In the value field, you can input a string of characters. Don't forget to press OK to validate your change.

Create another property, let's call it hash. Keep the min and max between 0 and 1.

Right click in the field and choose Add Driver. Delete the target variable, check Self and type hash(self["country"])%1000/1000. This will generate a (kinda) random number between 0 and 1 depending on the string inside the country property. The hash provides the same output if 2 inputs are the same.

Important : You have to enable python scripts globally for this to work. Go to Edit > Preferences > Save & Load and enable Auto run python scripts. You can add your Downloads folder for security, that way downloaded files won't execute custom scripts automatically.

Add a material to your object. Use this layout :

Add an Attribute node set to Object type, and input the hash custom property name. Link it to a Combine HSV node to create a random hue.

Result :


Unable to Weight Paint in 3D viewport I'm currently trying to spread pebbles along a plane using particle systems. Moreover, I wanted it so that it only spread on certain areas of the plane (which can be done using weight painting & adding a vertex group).

The problem is, whenever I tried to weight paint the plane, nothing shows up in my 3D viewport. No red/colors that usually appears during weight painting.

Please take a look at this 'blend file', and see what's wrong with my weight painting. I'm pretty confident that it should've worked like normal.

You have 'Face selection masking' turned on in the 3D view header (2.79):

The selection masking options in 2.8 are found here:

This means that only faces that are selected in edit mode will be able to be painted on when weight painting. It's useful to use as a mask in case you want certain parts of the mesh to be excluded from weight painting.

Either disable this button or select all the faces that you want to weight paint in edit mode before returning to weight paint mode.


Location coordinates/grid in blender - how are coordinates/locations set? I've been using blender for research purposes, i.e. matching eye movements to objects in a scene. To be sure about what I'm actually doing, I'm trying to understand as much as possible about blender.

Here's my question: I have been working with Camera View and the Location coordinates of my sphere are (X:-6.205m, Y:-8.3m, Z:37.479cm). I've been given to understand that these Location coordinates are relative to some arbitrary origin in blender, but can anyone tell me more about this grid? where is the origin? how are locations of objects set - how does blender decide on coordinates? Is the Location of an object proportional to some other measures?

I realize these are very basic questions, but it would really help me to have them answered. Thanks!

Here is a basic summary, Hope that can help:


Z axis of mapping node in Shader is not working As you can see in the picture above, touching the values of the X and Y axes moves the texture, but touching the Z value does not move the texture. What should I do?

i have new problem. please show below picture.

It's moving but you can't see it because the projection is flat, it means that the image is only projected on the object local Z axis and therefore on the side you'll only see the stretched pixels of the picture. If in the Image Texture you choose Box instead of Flat you'll see the texture projected on the sides and you'll be able to move it.

But keep in mind that even with the Box option, if you rotate your image, it will stretch it. It's not because it is projected on its face that it can't be stretched if you rotate it.


Animation renders object for every single frame for entire animation I'm trying to create a simple rotation/translation animation with a cylinder and I end up with:

When you press play, the mesh animates but the material preview is the same throughout each frame (as seen). It's the same if I render the animation...

Am I missing some setting somewhere?

Here is the blender file:

Blender v2.70

You've enabled dupliframes (which duplicates it for every frame). Set duplication to None:


Viewport performance changes when in camera? I am working on a fairly simple scene (80k verts) that is mostly made up of simple objects with some subsurf. Normally, my viewport performance is just fine. However, when I hit numpad 0 to view the scene through the active camera (not rendering) my performance takes a massive hit and begins to lag. Disabling subsurf and solidify on objects helps, but does not solve the problem. (This drops the scene to 53k verts.)

This performance hit is strange as I have not seen it before, even in earlier versions of the same project file, and I normally have no problem handling much more complex scenes (GTX Titan GPU.)

What could be making it change merely by being in the active camera? The amount of the model visible is the same in both cases. The viewport and actual camera have the same lenses and clipping distances.

Update: I did some further testing. I created a second camera , and it does not have the performance drop when I use it. The first still does. They have the exact same default settings. I even tried changing the first camera to the second's data, and the second to the first, and still the performance hit only takes place in the first camera, regardless of camera data. So it's something to do with the object, not the camera settings. But I can't find any differences. I also tried duplicating the first camera both with ctrl+D and alt+D, and neither of the duplicates have the problem.

After more troubleshooting, I found it. My character's rig had an eye target bone constrained to copy the location of the camera. I had totally forgotten about it because the constraint was disabled. So apparently, disabled constraints still get calculated in some way and eat up a ton of resources? But that's a whole other question. Deleting it fixed the issue.


How can I control playback of video textures? I’m working on a video in which photographs inside picture frames come to life but I do not know how to control the playback of the video textures.
I already have the video texture loaded in the picture frame. Right now it plays immediately when I start playback in Blender.
Here’s what I want to do.
I have the camera animated to approach the photo.  Until the camera reaches it, the video texture is “paused” on the first frame.
When the camera focuses on the photo, I want the video texture to play.
Finally, I want to pause the video on the last frame.
The camera then moves over to another picture frame and the process repeats.
What is the best way to do this in Blender.
Thank you!

Select the object with the material. Go to the Properties window, click the Material Properties tab, and extend the Base Color settings by clicking the little triangle. Now you can see a field for the Start Frame value.
Alternatively select the material in the Shader Editor window and change the Start Frame value in the Image Texture node.


How to access custom properties from python How can I access a custom property of an object from python, the suggestion Blender gives me if I pass the mouse over the custom properties named "prop",

bpy.data.objects["Cube"].["prop"]

get me this output in the console

>>> bpy.data.objects["Cube"].["prop"]
  File "<blender_console>", line 1
    bpy.data.objects["Cube"].["prop"]
                             ^
SyntaxError: invalid syntax

You just need to remove the dot, so the correct invocation is:

bpy.data.objects["Cube"]["prop"]

Python's subscription syntax doesn't use dot character.

Note: In Python terminology this is known as getitem rather then getattr access.


Make a mesh be pure light? maybe strange question but is it anyhow possible making a mesh be just light? So if I turn down emission it would just disappear until I crank it up again?
Thanks for your attention

You can use the volume material output to make your object pure light :

the emission volume is fast to render (not as smoke).
with very low emission strength :

Be aware that, sometimes, using 0 for strength will make your object black (bug). Use very low values instead.


Is there a way to get the current rendering frame number? Is there a way to get the frame number of the current animation rendering happening in a particular render mode.

This is to estimate the render time required to complete a job.

And, also to troubleshoot the machines, when any render errors happen.

Whats not really clear is how you mean 'get', since Blender isn't actively responding to events for example. Nevertheless, there are ways to do this.

Use the "Placeholder" render option

This writes an empty file, before rendering starts, other tools can check for these files to see which file is currently rendering.

With users and file ownership, its possible to check the file owner to see which system created the file.

Of course its possible Blender is interrupted, so, you may end up needing some supervision scripts to ensure the state is clean before starting.

Use Python "Handlers"

Blender has events you can subscribe to using bpy.app.handlers.
This is a catch-all since Python is very flexible.

In this case I think you would want the render_pre handler, which you can run when immediately before rendering.

eg:

import bpy
from bpy.app.handlers import persistent

@persistent
def render_handler(scene):
    filepath_to_render = scene.render.frame_path()
    print("Render Handler:", bpy.data.filepath, filepath_to_render)

    # access a file, log information over the network... whatever :)

bpy.app.handlers.render_pre.append(render_handler)

Inspect Blender's Output

Blender prints render information to the stdout,

You can log this to a file, and inspect the file for lines formatted as follows:

Fra:1 Mem:15.47M (0.00M, Peak 15.47M) | Time:00:00.00 | Preparing Scene data
Fra:1 Mem:15.47M (0.00M, Peak 19.87M) | Time:00:00.14 | Sce: Scene Ve:8 Fa:6 La:0

Even though this isn't 100% fool proof (its possible some Python script prints Fra:123), its easy enough to make a regular expression to parse the frame with reasonable certainty that its not mistaking output from elsewhere.

This is a simple example of a script that extracts the frame from a log-file, eg:

#!/usr/bin/env python3

"""
Get the current rendering frame from Blender's text output, eg:

python3 frame_from_log.py /path/to/file.log
"""

import sys
LOGFILE = sys.argv[-1]

frame = None
with open(LOGFILE, 'rb') as f:
    lines = f.readlines()
for l in reversed(lines):
    if l.startswith(b'Fra:'):
        frame = int(l[4:].split()[0])
        break
    elif l.startswith(b'Saved:'):
        # we're not currently rendering if it saved, early exit!
        break

if frame is not None:
    print("Frame found:", frame)
else:
    print("No frame found")

You may want to optimize it only to read the last lines of the file (for very long logs). but its a start.


Problem with weight painting strong pencil I can't create a soft move of mesh with armatures because when i paint with low strength (0.001) it's like it's (1,000).
Can you tell me what I'm doing wrong.
(sorry but english is no my native language and I can't explain better)

It Can solve by adding corrective smooth modifier to your mesh but if you are creating for unity game then it will not work in unity. And i am also having same problem if you get the answer the please reply to me because i have the same problem.good luck


Is there a way to add 2D guide lines to my view that help you align? I'm wondering if there is a way to add lines like these in the view?

[1:
Having lines stay like this while working in 3D

You can use the Grease Pencil, and set the Stroke Placement to View, like this:

You can hold Alt to create orthogonal lines


Blender 2.78 .obj import via script So is importing .obj in 2.78 via script broken, or am I not doing it right? It's crashing on import in my script when I try and reference the object at all.

import bpy
file_loc = 'C:\\Users\\MyComp\\Documents\\3Dobjects\\obj\\humans\\human_figure_JOINED.obj'
imported_object = bpy.ops.import_scene.obj(filepath=file_loc)
obj_object = bpy.context.object
#print('Imported name', imported_object.name)
print('Imported name: ', obj_object.name)

Running this with the first print statement yields this:

AttributeError: 'set' object has no attribute 'name'

If I let it run as shown, the second print gives me an object "Point.001" which is I think the last created object, so the active one?

I have tried to link the imported object to the scene by adding the following code, but this doesn't seem to work:

scn = bpy.context.scene
scn.objects.link(imported_object)

This gives me an error:

TypeError: SceneObjects.link(): error with argument 1, "object" -  Function.object expected a Object type, not set

Appears to me to be something wrong with the import.  If I import via the UI (File..Import...Wavefront(.obj) everything seems ok, as in it imports and can be manipulated.

Any ideas?

I would select it referencing the name but I can't even get the name because the reference getting it from "imported object" fails.

You need to get the context selected object as shown below:

import bpy
file_loc = 'C:\\Users\\MyComp\\Documents\\3Dobjects\\obj\\humans\\human_figure_JOINED.obj'
imported_object = bpy.ops.import_scene.obj(filepath=file_loc)
obj_object = bpy.context.selected_objects[0] ####<--Fix
print('Imported name: ', obj_object.name)


Addon: how to make Blender run check()/redraw when option changed? Operators have a check() function that Blender calls when it wants to check if it should redraw. Exporters usually use this to attach a file extension to the file name (eg).
I know check() already runs after the user has edited the filename field, or after they click a file in the filepicker. I would like it to run after the user changes an option too. For example, the glTF exporter does this:

If the prop is drawn by the operator.draw() function this happens automatically. However it does not happen automatically if the option is drawn by a separate panel. How can I get it to update in that case?
Here is a complete example you can test with: https://pastebin.com/2k6mBNGz
(PS. I already know how the glTF exporter does it. I'm interested in a "proper" solution.)

Set the filebrowser filename
The code for the ExportHelper mixin class is shown in this question Right way to stop export operator from saving with empty filename?
As demonstrated in question it appears only the FILE_PT_operator is live wired to update the parameters using check.
def update_ext(self, context):
    # if we wish to set filename_ext
    self.filename_ext = f".{self.extension.lower()}"
    #the filebrowser parameters
    params  = context.space_data.params
    # printed to console
    for k in dir(params):
        print(k, getattr(params, k))
    # set the file name
    params.filename = f"{Path(self.filepath).stem}.{self.extension.lower()}"

And use this as an update on the operator enum
extension: bpy.props.EnumProperty(
    name='Extension',
    items=(('FOO', '.foo', '.foo'), ('BAR', '.bar', '.bar')),
    default='FOO',
    update = update_ext,
)

If also using filename_ext make it a property and give it a default to match the enum, however can pretty much do without. The check_existing if set will deal with alerting re pre-existing. (Assume it does haven't checked)
So can pretty much replace the check method to redraw the file browser properties.


Why are my soft body objects doing this?[Blender 2.8] so basiccally, I want to recreate some things I made in v2.79 and can't. Now when I attempt soft body physics they always end up like this.

Here's the blend file if you need it:

The image and file are following a tutorial on this link https://www.youtube.com/watch?v=LeO5eOunzeQ&t=85s and I did everything from scratch the same as them.

Either the default settings are different for whatever reason, or blender 2.8 has changed something I don't understand.

Add SubSurf(Subdivision Surface) Modifier to your UV Sphere:
And increase the values of Render and Viewport. Also, make sure they are same or you'll get different results in the render.


Why does blender delete the headlessly baked cache on startup? So I am baking my smoke simulations on a headless machine. I am using the following snippet of python (bake-all.py):

import bpy

for scene in bpy.data.scenes:
    bpy.ops.ptcache.bake_all({'scene': scene,})

Together with:

/path/to/blender -b scene.blend -P bake-all.py

The smoke cache files are created properly. I then render using (for example):

/path/to/blender -b scene.blend -f 2

However, the smoke is not rendered into the scene and the smoke cache directory is empty; all cache files have been deleted.

What am I doing wrong?

After quite some digging around and wading through the source code, I found that upon initialising the ptcache for the smoke simulation, blender checks a flag PTCACHE_BAKED. This flag appears to be saved with the blend file. If the flag is not set, the cache directory is flushed.

To prevent this from happening, the file must be saved after baking. For this, a modified version of bake-all.py works:

import bpy

try:
    for scene in bpy.data.scenes:
        bpy.ops.ptcache.free_bake_all()
        bpy.ops.ptcache.bake_all({'scene': scene,})
finally:
    bpy.ops.wm.save_mainfile()

Two additions here:

A try-finally block to save the mainfile, even if the bake is aborted with Ctrl-C.
A call to free_bake_all(); this is required for re-bakes, otherwise bake_all will not do anything, for the same reason as blender will not delete the smokecache when starting (it assumes the bake is already finished).


Particles don't collide with rigid bodies I have a scene with 2 Cubes, Cube 1 (using a soft body (Rigid body doesn't work either))falls through Cube 2, and Cube 2 has a particle system on it. I want Cube 1 to "push away" the particles on Cube 2 however, goes straight through. I have Collision physics on Cube 1, but it doesn't seem to interact with the particles at all.

Here is my .blend file:

also: to clarify, i don't want the two cubes to collide, I want the particles on Cube 2 to colide with Cube 1

I see what you were trying to do with the Soft Body Physics, but what you really need is a Rigid Body Physics simulation. You can learn a bit about it in this quick, fun tutorial, but it is basically a simplified physics engine for gravity and whatever else you want to have affect your meshes.

For the falling-through-the-bottom-box issue, I turned off Collision Physics for all of the meshes except the floor because it has to deal with the particles. I changed some settings to make the particles bounce nicer. I also added all of the meshes to the Rigid Body Physics simulation. You can tell this because when you select them, the outline is green instead of orange. Additionally, I adjusted the particle settings so that they began emitting at the collision of the two boxes.

Final result:

Here is the modified .blend file:


Problem with camera view My camera view is not right. i'm new in blender so i dunno how to fix it, i have tried everything but can make it right the camera view on the right seems to have like a lens that makes it look that way, Thanks

there are two settings viewport focal length (35, in your case) and camera focal length (30.72 in your case), 35 would be default.
on your picture i cant really see a problem, you just have zoomed out while being inside the camera so you se the fisheye-distortion of your camera around the real sensor area. if thats the problem just zoom in.
Your render should look good with 30.72 focal length. If you want ist exactly as in Viewport put it to 35 in Camera-Lens menu.
but maybe i'm missing something?
Greetings AM


How to display the motion path of bones in pose mode? I'm making animation with a single bone for UE4. The motion path is showing when I animate an object in Object Mode but not in pose mode. Is there any way to display the motion path of a bone in Pose Mode?

Use the Calculate available in Pose Menu.

With a pose bone or bones selected in pose mode, go to Pose > Motion Paths > Calculate
Or as mentioned by @FFeller in the Armature (DATA) Motion Paths panel.


How to get world back? I started to learn blender, deleted the world icon-thing in the outliner panel and now, I don't know how to get it back -.-

Blender's concept is to work with objects. So if you don't see your world in the outliner anymore, you probably just unlinked it. The object itself still exists in the background and will be kept until you close blender.
In the gif you see how to might have unlinked the world and how you get the (still existing but not linked) world back.

If you closed blender anyway and the unlinked map is lost, just create a new world by hitting + New in the world tab.


How do I remove parts from my 3d printing file? I have purchased a 3d model online in the form of stl files.
It all printed really well apart from one part. The hook shaped part at the front of the image.

I can't work out how to delete the other three objects from the file so I can print out only the part I need.
I've tried selecting in edit and deleting but it seems to leave a cloud of undeleted bits.
Any help would be much appreciated!
Rob

select vertex of part you want to keep
select linked by L
invert selection Ctrl+i
delete X


Bevel modifier not working on SVG converted to mesh I'm running Blender Version 2.83.0 (2.83.0 2020-06-03) on mac 10.15.5.
I've been tinkering with modeling items and I can't make mesh modifier operations work for me.

I draw a path in Adobe Illustrator
It looks like like the outline of seahorse.
Export to SVG.
Go blender.
Import SVG
convert to mesh
extrude
Boolean two cylinders

The last item want to do is break the edge with a bevel. It won't bevel.
I've also tried to use the geometry tab to extrude the SVG curve and bevel it there before converting to mesh. However then it won't let me boolean the cylinders out.
Any direction would be appreciated.

Curve objects get really bad topology when converted to mesh. Boolean operations will also contribute to make the topology even worse.
And at the end the irregular and triangulated topology of the object will not let you bevel.
So keep the object as a curve.
Create the object, with the holes, in illustrator as a path (no need to use booleans).

Import the SVG into blender, do not convert to mesh.

To do the extrusion as curve make it a 2D curve, set the fill to mode  to "both".

In the Geometry controls set the extrusion level and the bevel  as well.


Ambient Occlusion Bake problem smooth I'm stuck in a problem for last few days with my project. My AO bake isn't very smooth. When I increase the size of the UV island, the error gets smaller, but it does not go away. I tried increasing the island margin and bake margin, but neither works.

My uv map is 2048px and my project does not contain many faces.

Here are my settings:

AO Factor: 0.10 ADD
Environment Light: 1.0 (White)
Gather Raytrace,
Attenuation: 10.000,
Falloff: 1.000,
Constant QMC: 12 Samples (I have changed this value many times but got the same result)

One solution is to Boolean your intersecting pieces together:


Rotate Vector/Point with Python How can I rotate Vector/Point with python? Could you help me guys?
Here is screenshot:

On the left - normalized vectors. I need to rotate according to UpVectopr.
On the right - non-normalized UpVector and a point. I need to rotate a point with UpVector.

How can this be done?

A vector has a rotate function - see mathutils.Vector.rotate

vec = mathutils.Vector((0.0, 1.0, 2.0))
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')
vec.rotate(eul)


What is the importance of low poly vs high poly? From the point of view of a beginner in Blender, the vast majority of learning resources & tutorials seem to focus on low poly objects/scenes. Many questions here on blender.SE echo that focus. Perhaps this may deal with difficulty level or style preference but suspect there are other factors at play.

What are the differences I should keep in mind when creating something in low vs high poly?

How can I determine what is the appropriate level of detail?

What is "the line" that defines low poly from high poly?

Highpoly is important to achieve superb surface detail. The problem is how you control such enormous amount of vertices:

with brushes (sculpting)
through control low-poly cages (subdivision surfaces)
through curve or nurbs surfaces
generated by some simulation, 3D scanning, etc.

Lowpoly is important for:

game-engines
subdivision modelling
low-polygon proxy geometries of high-poly ones - for rigging and animating
low-poly style and such..

Problem with low-poly is topology, which has to follow some rules, so the shading looks righ, the subdivision surfaces are right or the sculpts will be right. That's why you see so much about low-poly - with knowledge about low-poly topology the high-poly comes along.

You convert low-poly to high-poly through sculpting, or catmull-clark subdivision
You convert high-poly to low-poly through retopology, or decimation. The details from high-poly can be baked into texture maps.

What is considered low-poly and high-poly changes with time and computer power, it's safe to say that low-poly is everything that can be displayed on target hardware in real-time. That means that for mobile phone this is different than for workstation.

Appropriate level of detail depends on how small the object will be on screen - basically how much pixels it will cover on screen:

for textures on lowpoly you want them 2x larger than a texture that has same size pixels on a model as a pixels on screen. This is because texture filtering. Or how the target hardware GPU memory lets you use.

For game models this is usually from 1024x1024 to 4096x4096 or more for next-gen.
For mobile-phones aroung 256x256 to 512x512.

for lowpoly polycounts:

around 10k for character or more for next-gen. Depends on the object size, hardware, if it is in background or not etc.

for highpoly you want the polygons small enough that the surface detail will be well defined, this is usually smaller than screen pixel size or even smaller than that. Polycounts in millions.


Moving with "Right Mouse Button+WASD" while Editing [I understand that you can move the view-port camera with Shift+` command and enter walk or flying mode].

What I want to do, is move the view-port while editing by holding down the "Right Mouse Button" then flying the camera with WASD. Similar to "walk mode" but only... while editing and using the Right Mouse Button like Middle Mouse Button so that other commands aren't pressed.

Essentially, what we have right now, is you hold "Middle Mouse" and then you do some weird shimmying with "Shift" and "Scroll wheel" until you arrive at the intended view. It is far less precise and I would like to change the existing implementation to mirror Unreal's set up.

Is this possible?

If so, please let me know! I love Blender and this would go a long way to making this feel like home for me.

Thanks!

As far as I'm aware, the closest thing Blender natively has for that style of navigation is the Shift+` thing that you mentioned.  It seems that walk/fly navigation is better for navigating through scenes like you would need to do a lot in a game engine whereas turntable navigation (like what Blender or Maya have) is more useful for modeling or animation, which is probably why Blender's walk/fly mode isn't as good as Unreal's.
There are a few other navigation options that might work for you, but ultimately, the best option is to just get used to Blender's navigation.  So, I'll first explain some options that can help make Blender's navigation more (or less) natural (depending on who you are), and then I'll gives some alternative options that you might want to explore.
Blender Navigation Options
You can change the Blender navigation settings by going into Edit -> Preferences and then clicking on the "Navigation" tab.

Orbit & Pan
Most likely, you'll want to keep the orbit method on "Turntable" rather than "Trackball," but you could try out both options.  Basically, Turntable keeps the objects from getting rotated sideways whereas Trackball lets you control each axis of rotation.  Beyond that, it's kind of hard to explain, and I don't know how to record GIFFs, so you can just try it out yourself.
Although it's disabled by default, I like the "Orbit Around Selection" option.  That way, if you have a large scene, you don't have to fumble around with Shift+ to what point you want to orbit around.  Instead, it will just rotate around the selected object.  The disadvantage with this setting is that if your selected object is a really large object such as the ground or a room, it rotates around the origin point of that object, so it might still be a bit confusing if you have that object selected.
The "Auto Perspective" option just automatically  switches the view to orthographic view when switching to left/right, top/bottom, and front/back views.
The "Auto Depth" option is also pretty useful.  There can be times when zooming just becomes painfully slow because the way zoom works is by zooming onto a particular point, and it gets slower as you get closer to that point.  If the zoom focus point is somewhere between the viewport camera and the object you're trying to zoom into, zooming will feel painfully slow.  The only way to fix it is by using Shift+` to get closer to the object you want to zoom in to and thus change the focus point of the zooming... or just check this box so that it finds out how far the object under your mouse point is and just uses that as the zoom point.
Zoom
Most of the zoom settings you'll probably want to keep the same.  Probably the potentially most useful option in this section will be the "Zoom to Mouse Position" option, but I personally don't like it.
Other Tips
Blender's navigation is best when you're not trying to navigate around a room or anything.  It can be helpful to hide large objects such as buildings when working on smaller objects such as furniture.  Then, to place the furniture in the buildings, you can use the walk/fly navigation to move your view and then place the furniture.
Other Navigation Options
3DConnexion Space Mouse
I was going through a faze where I was really into Blender, and my birthday was coming up, so I decided to get the 3DConnexion Space Mouse for $130.  In Blender 2.8, there are two modes you can use with the space mouse, a fly/walk (free) mode or an orbit mode which the mouse was originally designed for.  In the fly/walk mode, it feels like you're holding the joystick to a space ship or something and can push the vessel through the scene.  In the orbit mode, it feels like your holding the actual object itself instead of the joystick and are rotating it directly... at least it would if I ever took the time to use it enough to get more used to it.
The settings for the space mouse are found in the Preferences under the Input tab and the NDOF expandable section.

The space mouse works great, especially if you're doing something like painting or sculpting with a pen, but there are two major disadvantages to it.  First, it cost $130, and honestly, it's probably not worth that much unless you're really into 3D design... or if you're really really really really curious about it and can't get sleep at night thinking about what it would be like...
The second disadvantage is that it takes away one of your hands.  Blender is designed for one hand on the keyboard and another on the mouse.  The most practical way to use the space mouse is with your right hand on your regular mouse and your left hand on the space mouse.  However, you then have to let go of one of your mouses to hit the shortcuts.  Granted, there are programmable buttons on the mouse that can open radial menus that hit various shortcuts, also Blender 2.8 doesn't depend on shortcuts as much as Blender 2.7, but it still can be a bit impractical in my opinion.
Unreal Engine Navigation Mode Keymapping
I saved this for last because I'm not sure how or even if it will work in Blender 2.8, but I found this YouTube video that talks about how to set up Unreal Engine navigation using this page from developer.blender.org  Again, I haven't tested it out, but it might be just what you're looking for (or it might not work at all)


Picture - saving in high resolution versus low resolution When I print the camera view to a jpg file, the file size is about 650k.  I would like to have a much higher resolution picture, with a file size of at least 3MB.

How do I do that?

(Assuming Blender 2.80)
Go to the tab shown in the screenshot and increase the pixel count for the x- and y- axis and set the percentage to 100%. Doubling the resolution quadruples the render time though.


Animating transparency of an object with an alpha channel applied I have an image mapped onto a plane, with an alpha channel on it. I would like to make this entire object fade in over time. However, since I have "use alpha" turned on, obviously only the alpha channel will change. Is there any way to globally decrease the transparency, besides animating the texture and applying it as an image sequence? I'm using Blender Internal rendering.

Two images above are a black transparent texture named Texture.003. Not the Show.

In the materials texture panel create a blend texture with Colors Ramp Selected True.  Solid black 100% transparent on both ends of color ramp.

Select Influence Alpha.  Alpha of 0 is 100% transparent as you know.  We are affecting the final value with our new alpha target value at 0.0 .  If we [were] targeting with a new alpha value of 1.0 we would have an opposite affect.  This is mentioned to keep the influence idea separate from the actual alpha value of the texture pixel alpha.

Create animated value from 0.0 to 1.0 on the appropriate keyframes with alpha. Blend Type Multiply.  The yellow numeric background indicates a value with a keyframe.

Image above. Shows texture in first slot which has transparent pixels.  The sphere was only to avoid a solid black background.


Baking normal for high poly sculpture not applying to low poly mesh I will list the steps that I did -
I opened the high poly mesh that was initially sculpted, with multires modifier on. (I did not apply the modifier)
I duplicated the high poly mesh and made a low poly mesh using decimate modifier in the collapse tab with the ratio of 0.1.
I UV unwrapped the low poly mesh, created a new image with default settings.
I created a new blank material for both the high and low poly mesh and applied it to both of them.
I opened the shade editor, and added a image texture node with the image created before opened up.
I turned my render settings to cycles, GPU compute, and selected the high poly mesh and baked a normal map using the ‘bake with multires’ setting.
Once the map is baked, I created a normal map node and connected to the material node to complete it.
However, nothing seems to be happened… What would be the problem? I think the problem is in the unwrapped UV of the low poly mesh, but it is only a guess and I am still not sure…
https://www.youtube.com/watch?v=bFOkHxZzVZ8 This is the tutorial that I followed.
https://drive.google.com/file/d/1FAElBG4TOwq6HVqRG3IiGr1LBfk6O9MC/view?usp=sharing Here is the link to the file.

Bake from multires only bakes the information of the multires onto the same object. Since you used the decimate modifier, you probably changed, if not destroyed the UVs. That's not the option you need. You need to bake the normals with the option Selected to Active checked, with your highpoly selected and your lowpoly active and slightly inside the high poly. Do check the UV map of your low poly one though.
Also: Make sure to check the normals in rendered or shaded view, your screenshot is a bit too low res to really make out what's going on.


Interactively change camera's focal length Does anyone know how can I change my camera's focal length interactively, in the 3d viewport, (while looking through the camera)? I'm not looking for the "lock camera to view" feature, just so you know! I'm looking for the real zoom of the camera change/perspective "distortion"...

With your camera selected press W > Camera Lens Angle

Then move your mouse left/right.


How do I import multiple OBJ files into blender using python? So far I have the code:

scene = bpy.context.scene
import_avHat1 = bpy.ops.import_scene.obj(filepath=avatarHat_1)
import_avHat2 = bpy.ops.import_scene.obj(filepath=avatarHat_2)
import_avHat3 = bpy.ops.import_scene.obj(filepath=avatarHat_3)
hats = bpy.context.selected_objects[:]

for obj in hats:
    # print the name of the current obj
    print (obj.name)
    bpy.context.view_layer.objects.active = obj

obj_camera = bpy.context.scene.camera
scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = "~/mark/renderOutput.png"
bpy.ops.render.render(write_still = 1)

It only renders the first hat and I get no errors importing the others. What should I do? This occurs in blender 2.8.

Manually debug your code one line at a time by pasting it into the Python console and checking the results.


Blender 3D UVs scale issue appearing after export _FBX_OBJ_COLLADA I have an issue with UV textures coordinate - exporting some .fbx/ .obj/.collada objects from Blender 2.78c to Kanzi Rightware.

I'm working in a company developing product design and electronics, and I'm making research of what software will be suitable for future OpenGLES production pipeline with Kanzi Rightware.

At that moment I did specific tests and experiments with Blender, 3Ds Max, Maya, Cinema 4D.
I shaped and transformed an object with same operations in each program - subdivided x3, simple booling operation, triangulating, applying scale. rotation. location. (called also freezing -cinema, Maya) and exporting to Kanzi etc.

The program - Blender is looking really suitable to me for the project, I've been using it for years, but the problem it appearing with UV's.

After the export, I import the file (I've tried with .fbx/; .collada/ and .obj) in Kanzi.
Blender's object always looks with different UVs compear to the default of Cinema and Max...?!?

Can you give me an idea what could be wrong with it. Is it UV calculation on export wrong or what?

Basically what I'm doing step by step in each of those program is the following steps:
 1. Create default cube + UV generated
 2. Add subdivision 3 times
 3. Convert/Apply the modifier to mesh
 4. Creating one more Cube - without UV generated
 5. moving the new cube to Z, -1 unit, press enter /Now the cube is aligned
 6. with it's the top part to the center of the grid
 7. Add Booling modifier between the cube and the shaped sphere
 8. Apply Booling Modifier/
 9. Check the UV-s are correct after the operation
 10. Exporting the model via .FBX file

I did experiment with different file formats including .dae, and .obj. The Geometry export is correct but when I import all them in R_Kanzi there are big UV differences.

What should I do? And how this UV scaling could be fixed?
Best Regards

Zak!
Thank you, yes I did that after the boolean operation.

Actually, I found the thing... I opened the programs individually and I saw the process of UV generating in the early beginning - by the default cube. It looks like there is the KEY for my issue.

In each of the programs by default UV layers were generated for the 1st cube in a different configuration. I saw that in 3D's max, and Cinema4D they are equal to reset textures in Blender operation, stretched to the whole UV for each individual face.

Thank you! Anywhay!


Tab key not editing text Usually, when I edit templates, I can just press Tab and I can edit the text. Suddenly, when I press Tab, this happens:

One of the drawbacks of using "template" files created by someone else is that you have no control over them. Whatever choices the creator made are now part of the file.

The text in question is not editable as text anymore because it has been converted to a mesh. There is no operation to turn a mesh back to text.

You would need to create a new text object that fits your needs, and then copy or link to it whatever other attributes or animation the original mesh was using.

Something to be asked in a different question.


Shadow control by vertex paint Is it possible to accomplish something like this or this in blender? In this video you can see some results in BI, but I can't (and many other people in comments) render it (you can download .blend in the description and try it yourself, result can be seen only in the viewport). Maybe somebody can show node setup (at least the base of it) for cycles?

I'm aware I'm necroin' a 8 month post, but I'd like to aid any others who happen to come across this post in desperation for a solution.

It took a whole day of investigating and cross-referencing, but another Blender user back in 2010 managed this effect rather well.

https://youtu.be/cEnZe0TIkLM

Now, the barely readable 480p is not very helpful for those unfamiliar with Blender Render style or Nodes period, such as myself, but I managed to crack the code.

And for those who are working in Cycles (as Eevee is a blast to edit this with). I apologize for the slightly clumped Cycle composition, I hope the colors help.

Tips:

You can't use this method to "pre-program" how shadows fall, so this won't be great for 3D/live rotation video games. This is a clean up method for specific scenes, if not specific frames in general. You will need to reset the Vertex color base every time you want your shadows to start fresh for changes.

Materials and Render do not match up, do not trust 'em for switchin back n forth.

You can change the black Vertex Paint base to a lighter shade, you just need to adjust the ColorRamps to match.

It's ok if your first strokes are jagged, Blur/Blend in the Vertex Paint will smooth it out, although it'll take some back and forth to get the contour you want.

Depending on your mesh, there will inevitably be spots that don't catch the shader right and cannot be vertex painted. Change your lighting or change your positioning. All tools have limits :(

Oh yeah, and this shader HATES subtle lights. I thought the shader was broken until I shoved a spot at full power in my meshs's skull. Just be aware, if your model in Materials or Render looks like a silhouette colored by your shadow, you either need to shove a light in it's noggin or you didn't connect the Vertex information right.

VERTEX COLOR TO IMAGE

ATTRIBUTE COLOR TO IMAGE

why am I screaming? Because it took me 15 minutes to figure that out just because someone thought it'd be a good idea to have the node threads use gradients in the video's version of BL. (Also I'm dumb)

Hope this helps any others


Weight painting is acting wierd What does it mean when it looks like this? I'm not sure what I did wrong?

A vertex can be in multiple vertex groups. I think that's why you groups look good but move like that : other associated vertex groups. You can see that in edit mode with the selected vertices in N panel, vertex weight with associated groups.

Here you can change weight or remove a group from the list of vertices associated groups


Removing Doubles Destroy Topology Problem:

When two vertices are being too close to each others, during the operation of "Remove Doubles", they merged together as it considered as a single vertex. It happens during my organic modelling, picture below shows before and after removing the doubles from my part of my mesh. Preserving quads topology is the primary, is there a solution to this problem?

Constraint:

This part of the mesh is limited to this size proportion. In other words, it's not rational to just scale up these faces to avoid the problem.

Assumption:

I assumed ensuring no doubles exists is important for avoiding the problem of "Bone Heat Weighting:Failed to find solution for one or more bones." during parenting mesh to rigs with automatic weights.

Solution tried:

Scaling up the mesh by factor of 10 or 20, but it doesn't help in blender to not consider the vertices as doubles.

From what I have seen, you should try adjusting the merge distance. This can be found in the bottom of the tools panel after you remove doubles.

This process will adjust the limit for considering something a "double".


Subdivision while keeping Volume for Level of Detail Is there a way to use the Subdivision Surface modifier on my mesh while keeping the silhouette more or less intact? The Catmull-Clark algorithm reduces the volume and the form of the mesh a lot. I want to create Level of Detail versions that should blend into each other based on procimity/the space they take up in the camera view in my game engine. The following picture hopefully clarificates what I am going for.

The black Wireframe is the original unmodified model.
The displayed mesh is the outcome of subdividing with Catmull-Clark algorithm.
The red outline I painted in is kind of what I need. The silhouette shouldn't "change", just get a little more smooth/detailed with each level of subdivision.

I tried to Shrinkwrap the subdivised mesh back to a lowpoly copy of itself, "Apply Base" in the Multiresolution Modifier but nothing helps, the volume and silhouette is always compromised.
Maybe there is a way to achieve this with some clever combination of modifiers?

With Blender 2.82 out, there is a good enough method to keep the volume while subdividing the whole mesh without actually using the subdivision modifier.

It's the Bevel modifier.
Select the percent method and set the value to 50%.
uncheck the clamp overlap option and now, you might notice there are now duplicate vertices.

But there is a new modifier: weld; and its job is to get rid of those in a non-destructive manner, so you can keep your bevel modifier.
you can then add as many segments and tweak the profile as much as you want.
Make sure to set the outer Milter to "patch" for concave meshes.

As you may notice, the subdivision isn't as perfect as the subdivision modifier,
so you might encounter problems like
In that case, buff the distance of the weld modifier juuust until it fixes everything.

After that, you can add a subdivision modifier for a better edge flow and tweak the profile of the bevel (even the custom profile works) if it looses too much volume to your taste.


Mesh deform Large file size Recently, I used mesh deform modifier with armature to animate a character, but after clicking on the "bind" button, I saw that not all the mesh was deformed by the cage, so I clicked "unbind."
I've repeated this action about 7 times and finally I got the results that I want. BUT the problem is after saving my project, my blend file became very very large: about 800Mb.

Why does it happen? How to reduce my blend file size?

Unbinding the Modifier should reduce your file size to the previous 60Mb,
but the deformation data from your binding will be deleted.
Same with the Surface Deform Modifier.
I recommend to keep the modifier unbinded and bind it only before final render (if your workflow allows that).


Why does origin point change its location after joining objects? As you can see there are no hands in the 1st picture.
I created the hand separately from the body and then joined them with Ctrl+J.
After that the origin(I'm not sure it's called so but I mean a thing poited with arrow) changed it's position and I suppose it's the reason of the mirror modifier fail.
How to change coordinates of origin or to solve the problem if the origin is OK?

It's likely that you selected body object first and the hand - second, then joined them with Ctrl+J. This means that origin point of the joined object was where it was for the last selected (i.e. active) object prior to joining, and in your case that was the hand. Probably the latter had its origin point where it is for the resulting object on your screenshot.

It should be possible either to:

undo joining and join again with body object selected last in order to preserve origin point where it should be for Mirror modifier to work properly,
or reposition origin point which should be easy. In Edit mode select the center edge loop of the body mesh, snap 3D cursor to it and in Object mode put the origin point to cursor.

Also read How can I make the mirror modifier work right?

As a side note, correct the normals in your objects by Ctrl+N as this can give some unexpected results while modeling in particular. See Why are some faces in my mesh darker?


How can I add a detailed material/texture to a curve? I know how to add a material/color to a curve, but I want to add it like a detailed texture, like the sphere on the right of the image, as you can see if I render the image (left image) the curve is still just red, it doesn't have the level of detail of the real material/texture.

Is there any good way to do it? I was thinking on converting the curve into a mesh and then just add more polygons...it could work, but if in the future I need to change the curve shape, that won't help at all.

The bumps are showing up on the curve, however they are very stretched out. You need to add a Mapping node to adjust the scale of the texture with. Press Shift+A and select Vector > Mapping:

Now press Shift+A again and select Input > Texture Coordinate:

Now take these nodes and set them up as shown:

By changing the Scale values you can now change the size of the texture you are using.

Notice that it will repeat/tile, so it is best to have a seamless/tileable texture.


How to Properly Import from Blender to Unreal 4? I am having difficulty importing my ".fbx" from Blender into Unreal Engine 4. The error I am receiving says the model has "degenerate tangent bases, which will result in incorrect shading". Unreal and Blender are fully updated and I have the newest versions. I am on Windows 7 and have tried it on Windows 10 as well as a Mac so I know that isn't the problem. I've tried it on Intel graphics and Nvidia graphics so that isn't it either. Also I tried multiple .fbx versions such as FBX 7.4 binary and FBX 6.1 ASCII already.  I tried different computers that had 4, 6 and 8 GB of RAM.  The processors I ran it on were Intel 2.3 GHz and 3.3 GHz. Also the computers were running at 64 bit. Is Blender compatible with Unreal?  And if so how?  There are no tutorials online that have helped or shown the correct way to import into the Unreal Engine without errors. I've searched high and low across multiple websites for the answer but I have had no luck.  Please help!

Thanks!
-Rob

This is just a warning, not an error. It's usually the case when UVs aren't unwrapped well; either there are overlapping UVs, or some UV's are backward. It will still work, and I haven't noticed any problems with shading or texturing on the models I've imported into Unreal.
There is apparently a way to get Unreal to correct some of these problems for you.
From the Unreal forums:

Double click onto your static mesh in the UE4 -> Select the recompute tangents/normals and click save


one side of image as plane is normal, the other is white I believe this has something to do with the translucent shader but I'm not sure.

Your plane is white on one side because of light shading. If you do not want your plane to be affected by light, set the Specular of the Principled BSDF to 0. This makes the plane not reflect any light.


Creating a emission plane and hiding it in Blender 2.81 How do I create emission material and then hide the plane that emits the light in Blender 2.81?

Use the Light Path node to make the material appearance different from its influence.

From Add > Input > Light Path use the Is Camera socket to mix between your Emission Shader and a Transparent Shader.


Array object in straight line but rotate object on z axis So how would I do that I have an object which I want to array in straight line or a slightly curved path (~10 iterations) but I also need that every iteration is rotated for lets say 30 degrees along z axis, what kind of black magic I need to perform to achieve this I tried using empty and rotate it on z but it makes array circular even when I use curve modifier as well. Thanks in advance!

Dupliframes Method:

The first step is to keyframe the location of desired object at the origin at the first frame (0 or 1). Then we will add a keyframe 10 frames from our first, since we want 10 iterations, at location (5,0,0) and key a rotation of 300 degrees since we would like each iteration to be rotated 30 degrees from the previous (300 = 30 degrees each iteration * 10 frames). In the curve editor we want to make sure that we're using linear interpolation (select keys and press 'T'). This makes sure that the iterations will be evenly spaced. In the Object propeties tab, find Duplication and select frames. Since we only want 10 iterations we will end at frame 10 (It may look correct if left to 100, you will have extra meshes in the same location as the last iteration. Finally when happy with the result we can convert the dulpliobjects to real objects with Ctrl-Shift-A, and Ctrl-J if desired.


Can not delete an animation action Like to preface this by saying i have searched the whole internet to no avail, found several people with this problem (usually several years ago) but never found an answer that helped.

For some reason there is a junk action that can not be deleted.

As you can see, all of my actions are fine and dandy except for Cube.040.action.
When I export as FBX into unity, it can often nearly crash Unity because there are all of these junk animations called [Object Name]|Cube.040Action.

This action is not visible in the NLA editor, cannot be cleared in the outliner, cannot be deleted in Data-Blocks and cannot be cleared by python unless I'm missing something.

What leads me to believe it is some kind of bug is occasionally it will appear in the NLA editor, but is not deletable as the expand button does nothing when clicked.

Any help would be appreciated and im willing to upload the blend file if that would be helpful.

In the outliner, switch the type of information to display to Blender File. Extend Current File > actions. There you have your Cube-Action – right click it and select delete. See screenshot below.


Is There a Good Way to Change Many Joined Meshes in Order to Make One Mesh With No Inside? I'm attempting to kitbash a number of different models together to make a new one. The problem that I now have a lot of badly joined together meshes. Ideally, what I would like to do is to join them on the correct vertices (So I can do things like sculpting). Also, it would be great if it removed all of the vertices which were inside the model.
Is there anything we can do to do this automatically, like a plug-in or some other  option? Or do I need to do this by hand?

No garantee it will work but you could try to boolean.
First make sure you don't have holes, select all in Edit mode and Mesh > Clean Up > Fill Holes (set the values in the Operator box):

Then select all your meshes except one and press CtrlF > Intersect (Boolean), and again choose the right settings in the Operator box. If the meshes are closed it should delete all inner vertices:


2 Colors on 1 object After some tutorials this is my first own object in blender -a race track for unity. The main object should be white, but the road itself should be red, without creating 2 objects.
So I marked all the road-faces and assigned them to a new Material. But somehow the white color shines through depending on the camera angle.. even if I remove the white material, the grey default color also shines through. If I separate the road to an own object, it works fine -but I don't think that this should be the solution :/

(Object Mode)

(Edit Mode)

(Face Orientation)

(Unity)

You need to slightly offset the road along the Z axis. This is what is called "Z-fighting" where the renderer does not know which material to render because the faces are overlapping, so they are randomly rendered on top of another.


Cutting out irrregular parts of a mesh out I work with reconstructing fossil skeletons of human ancestors. Bones are usually incomplete and I need to assemble whole virtual bones from laser scans of different fossil parts of the bone I have scanned. How can I efficiently delete parts I don't need so that I can assemble whole virtual bones? I know it's easy to delete by bisecting, but that's not enough for what I need  Does this image help explain what I wantto do?

Hope this helps:

You can try centering the mesh in an axis (X or Y most commonly) and then use numpad 1 or numpad 3 to get an isometric view of the mesh along that axis. (Depending on your blender config, you might need to also press numpad 5)

Then you can press z and tab to go into wireframe mode and edit mode respectively.

Once there, you can select whatever vertices are not needed (To select vertices you can use the hotkey ctrl+shift+tab and select vertices in the popup menu) and delete them. Then press tab again to go back to object mode and add a mirror modifier to mirror the whole "correct" side of the mesh along the axis you need. Fiddle around with the merge and clipping options to get whatever desired effect you were looking for.


How do i add a certain amount of objects without lowering the frame rate? I am making a combat animation and it involves a character fighting a large number of people. however the only problem is if i add too many the framerate drops drastically how do i fix this

There are many factors that determine frame rate.

Computer...Particles...

The complexity of the scene is one such and probably the reason why you are losing frames.

You can check the simplify box, but I for one wouldn't rely on that, it may help but not by much.

You can view everything in wireframe.

Another method is to use proxy characters in place of the 'final' characters.

Another method, that I use is to not use the in-blender time to base your animation judgment, instead take a video of yourself doing said action and place it in the bg, you can use that as your basis of time, action and reaction if you so require.

A good addon to said methods would to be to render the animation at a low resolution opengl render (after you had done...) that way you can check that the animation is too your liking without waiting for the long render times.


Extruding two sides at 90° angle What would you say is the easiest way of extruding the two faces at the first screen so that the model ends up looking like the second?

In these situations I like to delete the edge and use F2 add-on for reconstructing the geometry(F2 comes with Blender and just needs to be activated in the Preferences). I have it enabled anyway for modeling and this process is quite pleasant because of the simplicity of it - only pressing f a few times:


Make Curve Have A Fill and Border Setting a fill and border is pretty easy in apps like Illustrator and Gravit Designer but in Blender. I've found it to be more tedious as I can't find anything online to solve this problem.

The picture above is a simple 2d mouth with lips. I would like to be able to move the lips and still have a fill but in Blender I needed to add another path for the mouth. Is there anyway I can move my lips path while having it also take the exact same shape (but not material) as my mouth's path?

lips.blend|attachment (454.2 KB)

I work in Blender 2.79 cause 2.8 doesn’t run well on my laptop at all.

Since curves can't be rigged, the only way I see it is using Hooks.

Enter Edit Mode and hook each separate curve vertex you wish to move independently to a new object using the option Hook to new Object.

Then go into the second curve and repeat the process. For vertex you want to move together first select a existing empty you wish to hook it to, then enter Edit Mode, select said vertex and use the other option Hook to selected object.

If two vertex from different curves are hooked to the same empty they will move together. If you still want some independence occasionally you can always hook to separate empties, the parent two empties to a third "controller" empty that moves both simultaneously.


Creating and Animating Line Segments? I have a zig-zag figure I want to import and manipulate in Blender, preferably on a segment-by-segment basis.

The canonical method for doing "line art" in Blender appears to be to create a curve object then, in the Properties, crank up the Bevel Depth to a suitable value.  The problem is that, for "curves" having hard, acute angles, you end up with a very thin, distorted shape.

Here's an example curve.  All handles are set as vectors:

Here's the same curve with a bevel applied.  Note how the generated tube is flattened, making it nearly invisible when viewed along the Z-axis.  The sharper the angles, the thinner the resulting tube:

I'd like uniform "thickness" no matter what angle I view it from (particularly along the Z-axis).  How can I best achieve this?

This mesh is maden by 7 vertices only, with a skin modifier. Tweak the thickness with Mean Radius values, and don't forget to select one of the starting vertices and use the "Mark Root" function on the skin modifier.


Memory efficient way to store many numbers (floats, ints) in a .blend file For my addon I need to store large amounts of data in a .blend file (mostly floats, but other types are possible as well).

I tried using a normal CollectionProperty. Performance wise this works fine (with foreach_get and foreach_set). However some rough measures show that Blender stores roughly 128 bytes per float this way, which is quite a lot of overhead and therefor not really acceptable.

Is there a better solution to this problem?

Collections are indeed not ideal for this use case.

You can store raw arrays in ID properties, which will native data types that don't take up excessive space in memory or on-disk. eg:

bpy.context.object["my_array"] = [1.0, 2.0, 3.0]

You can assign from an array type too:

import array
data = array.array('f', [1, 2, 3])
bpy.context.object["my_array"] = data

Internally float values are stored with double precision (8 bytes per value), as with Python's floats.


UVs disappear once Loop Cut is done I couldn't figure out why my models UVs were not showing up, so I went step by step with a new object to see when it would happen.
Create a box, open UV Editor, the UVs are there. Do a Loop Cut anywhere on the box, the UVs then disappear from then on.
Anybody else have this issue and is there a way to fix it?

Your UV editor only shows currently selected vertices.
When you add a loopcut, all other vertices are de-selected.

Just check the UV Sync Selection button and it will work.


Rotation and keyframes I am working on a gun turret for a spaceship. The turret has three parts. It resembles a Gatling gun type. I have animated the barrels to start turning very rapidly to simulate rapid anti-aircraft fire. The first keyframe is set to o degrees in the rotation, I then move the keyframes 3 seconds further and then enter 5000 in the rotation. The animation starts exactly as I want but about half way, the rotation slows down and then accelerates again. It does the same thing when rendered. What causes this slowdown? Could it be the processing power of my laptop or is there a better method to use? Thank you.

I think the accepted answer works but could be better. What you are seeing is an optical illusion. The barrels in the middle of the animation are lining up with the previous frame, so they appear to not be moving.

Enabling motion blur should let you see the motion throughout the animation, but still allow you to use smooth interpolation (so the spin up and slow down would be smooth).


How to use an if statement inside the draw function to change the UI at runtime? I have a basic panel and an enum property and I want to change some of the things shown on the panel depending on what is selected in the enum. I tried what was logical and this is what I did:

if self.icons == 'Brightness':
    row.prop(scene.ignit_panel, "brightness_icon")
elif self.icons == 'Backlit Keys':
    row.prop(scene.ignit_panel, "backlit_keys_icon")
elif self.icons == 'Volume':
    row.prop(scene.ignit_panel, "volume_icon")

However it isn't working, it's no longer displaying those things, and everything below it is no longer displaying either. Can this actually be done or am I just showing my noobiness again?

*Update*

I tried playing with the buttons and started getting errors:

Traceback (most recent call last):
File "/Users/MacBook/Documents/Blender/Blends/MacBook/MacBook.blend/macbook_controller.py", line 302, in draw
AttributeError: 'IGLayoutDemoPanel' object has no attribute 'icons'

location: <unknown location>:-1

Thanks, Matthew

Found the problem, 'icons' wasn't recognized because it was from a different class, I just had to reference it.

icons = scene.ignit_panel.icons

if icons == 'Brightness':
    row.prop(scene.ignit_panel, "brightness_icon")
elif icons == 'Backlit Keys':
    row.prop(scene.ignit_panel, "backlit_keys_icon")
elif icons == 'Volume':
    row.prop(scene.ignit_panel, "volume_icon")


Front ortho opposite way around to expected I have a box and have drawn with grease pencil
F on the front (+Y)
B on the back (-Y)
R on the right (+X)
L on the left (-X)
T on the top (+Z)

Right ortho shows the R
Top ortho shows the T (upside down)
Front ortho shows the B!?

Is this correct? It's extremely confusing.

You should accept the orientation presented by Blender.
You should not fight with Blender on this small matter
I think you should switch to each view and then use the grease pencil
I think it is more likely that you can work successfully with Blender on a second try ... rather than you have discovered a flaw in Blender.
You may want to see a tutorial on grease pencil


Pie menu goes away after selecting an option For example when I used the pie menu to set the mode to edit mode, the pie menu immediately goes away after i select edit mode. How do I keep the pie menu floating even after multiple lmb clicks on the menu. There was a similar post here which was old, and I'm asking this again because the pie menus are updated now maybe ?

Pie menus are not intended to stay there and if it would be possible it would be a terrible workflow to get used to. I'd reaaly like to see popups like Shift + A stay but pie menus don't even have the right layout and would take up way too much space.


Eevee Transparency gradient started blender a month ago.

I'm trying to combine nodes to create a specific skin effect on BLENDER 2.8, Eevee.

The one you would see on the chin of a breathing frog. A skin really tensed, with a gradient of transparency opaque at the bottom, nearly see through at the top of the "sphere".

I tried all the advices to do glass, plastic or I don't know. None of them where satisfying and had any real control over the area of transparency, nor the gradient I'm looking for. I Tried to combine it with a fresnel, I was close but no gradient, even with a color ramp.

I found out this awesome video solving the problem throught texture painting:

https://www.youtube.com/watch?v=O5PpEkv1ls4

It works for me. The problem is that I'm not using any texture, only nodes. I don't know how to paint on it.

Do I need to first finish my mesh, somehow extract the "node texture" from it, re-apply it, and then paint it with transparency?

Any suggestions?
Thanks a lot for your time.

Arthur

Here is a node setup to achieve the transparent gradient sphere effect:

I'm using a Mapping node to control the direction of the gradient, Gradient Texture node for the gradient itself, and a ColorRamp node to control the transition. For the transparent part of the object, I'm using a glass shader with IOR very close to 1 (or it will look like real glass), and 0.6 roughness to make the object behind appear more blurry.

And make sure you enable screen space refraction in both render and material settings, or the transparency won't render correctly.

I don't know why you are trying to avoid using textures. While this procedural setup works well on a sphere, I don't think it will work if you are going to apply it to something more complex (like a frog model). Since it's using a simple linear gradient, it's very hard to make it fit perfectly on the frog's chin. I would recommend using texture painting if you really want to do that.


How Blender sets its reference frame? I would like to know how Blender defines its global reference frame, and if it is possible to modify its definition.
By reference point, I mean the x, y and z axes that we can see at any time when we model objects.

No. However, by theory of relativity, you can achieve the exact same effect by placing the 3D cursor at the origin (Shift+C), setting the transform orientation from “median point” to “3D cursor,” selecting all, and then transforming.


How do I change the value of the "To:" text field on the Message actuator? So I'm making an RTS type game, just for practice and exercise, but when I send someone somewhere, I want them to know when they need to stop. I decided this could be done by having the marker that they go to send them a message when they're near it. How can I make the message send only to the guys that are within, say, 3BU from it?

You need logic set up like in the image below on each of your markers.

It is just an Always sensor, set to True level triggering; and a Near sensor. Those two are plugged in to the python controller, which will activate the message actuator. The property in the Near sensor is not needed, that is only to limit what objects get the message.

The script will send a message to every object that is near (3 units or closer) the marker.

import bge

cont = bge.logic.getCurrentController()

list = cont.sensors['Near'].hitObjectList

if cont.sensors['Near'].triggered:
    message = cont.actuators['Message']
    for obj in list:
        message.propName = obj.name
        cont.activate(message)

The script gets all the objects that are near the marker and stores it as the list variable (line 5).
The if statement works like this, when anything is near the marker, the near sensor is triggered, thus it is True.
It then loops through the list of objects that are near, and sets the message actuator's "To:" field to one of the objects. (message.propName = obj.name)
The last line still part of the loop, activates the actuator - sends the message.


Is it possible to use curve modifier without stretching these holes? As you can see in the second picture the holes are stretched. Is there a workaround to this?

You can replace the curve modifier by a simple deform modifier.

The point of interest is to augment the second array count until the holes stretching disappear.

Thanks to the deform modifier this is much more easy to tune than the curve modifier.

So:

Add an empty at the same X,Y location than your grid.
Add a simple deform / bend with an angle of 360 and turning around Z. Set the previous empty as origin.
Rotate this empty 180 around X.

Now tuning:

Augment the second array count to 180 (or around that).
The simple deform will make a larger ring.
But you can now scale it in X, Y (not Z) to readjust the shape to the speaker diameter.

You can see above:

The result
The added empty
The scale given to the grid
And the added simple deform parameters


Resetting camera after camera collision (BGE) When my camera collides with my wall, after I move the camera back to where it isn't colliding with anything, the camera stays fixed very closely to the player. What can I add to the code below to fix that(or fix it with the blender logic bricks)?

from bge import logic

def collision(cont):

    own = cont.owner
    scene = logic.getCurrentScene()
    target = scene.objects['playerOne']
    ray = cont.sensors['Ray']

    if ray.positive:
        own.worldPosition = ray.hitPosition

Here's the answer;

Add an empty, slightly behind the player, and put the ray on that, set the ray distance to however long you wan it to be, and turn on true level triggering.

you will need to change the code a very small amount:

from bge import logic

def collision(cont):

own = cont.owner
scene = logic.getCurrentScene()
target = scene.objects['Camera.001']
ray = cont.sensors['Ray']

if ray.positive:
    target.worldPosition = ray.hitPosition

and viola! mow the camera is added to a position based on the empties ray! if the ray is obstructed, the camera moves to the closest position!


How to update values based on existing properties via Python? I've written a script takes the start and end values of a VSE strip, and copies those values to the NLA strip of a selected object (effectively syncing the NLA strip with the VSE strip).
The script works well enough, however, I have to click the 'Run Scrript' button every time I move the VSE Strip.

How would I go about making it so that when I move the VSE strip, the NLA strip moves automatically as well?

I've researched using handlers and the def update functions but nothing has worked for me (including drivers).

Below is the script I've worked up. I'll attach the .Blend I use with it as well

import bpy

targetName = 'My_Strip'

for vsestrip in bpy.context.scene.sequence_editor.sequences_all:
    if targetName in vsestrip.name:
        vsestrip.select = True
        vsestrip.frame_start
    else:
        strip.select = False

vsestart = bpy.context.scene.sequence_editor.sequences_all["My_Strip"].frame_start

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

somewhat important note: this way if doing it should work, but its really hacky and might be unstable or interfere with other parts of blender (im using blender 2.80).

  step one

create a new file in C:\Users\--Username--\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons or the eqivalent path in other operating systems,  its important that the file ends with .py copy the code below and paste into the new file.

  step two

open blender and go to Preferences>addons search for test and enable the test addon, save user preferences, open a new file (in blender) or close and reopen blender, if you have a sequence selected and press the left mouse button you should get a message in the console that says "The Script goes here" (open it by going to Window>Toggle System Console).

from bpy.app.handlers import persistent
import bpy

bl_info = {
    "name": "test",
    "author": "Syler",
    "version": (0, 0, 0, 1),
    "description": "test",
    "blender": (2, 80, 0),
    "category": "Object"
}

@persistent
def load_handler(dummy):
    print("Load Handler:", "test")
    bpy.ops.test.modal('INVOKE_DEFAULT')

def script():
    print('The Script goes here')

class TestModal(bpy.types.Operator):
    bl_idname = "test.modal"
    bl_label = "test Modal"
    bl_options = {"REGISTER", "UNDO", "INTERNAL"}

    def modal(self, context, event):
        #note: using context.area.type to check weather the event got called in the video sequencer doesn't work, don't know why.

        if event.type == 'LEFTMOUSE' and event.value == 'RELEASE':
            if context.selected_sequences != []:
                script()

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

classes = (
    TestModal,
)

def register():

    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.app.handlers.load_post.append(load_handler)

def unregister():

    from bpy.utils import unregister_class
    for cls in classes:
        unregister_class(cls)
    bpy.app.handlers.load_post.remove(load_handler)

the way this works is the addon gets registered, then when a file gets loaded it calls the TestModal Class, which checks the input for the left mouse button, when you also have a sequence selected then it calls the script def.


How to make a generated texture follow a Bezier curve? I'm animating a representation of fluid flow by using a generated Wave texture, animating the mapping to make the rings travel. This works well for a cylindrical object; but for a bent tube, the rings get distorted, as I'm (simplistically) animating along the object's y value (which works fine for the cylinder).

Here's the textured tube and the material nodes:

The tube is a Bezier curve with a circle used as a bevel object. I can convert to a mesh if need be, but I'd prefer not to.

Is there a mapping that would cause the texture to propagate along the Bezier, with one animatable parameter that will cause the rings to travel along the tube?

Thanks for the pointer, Carlo. Yes, enabling "use UV for mapping" helped; but I also needed to change from Object to UV as the input to the mapping node:

Animating the Y parameter of the mapping node makes the rings travel along the tube as desired. Thanks!