Accessing screen areas from render handler The code below works flawless, if e.g. triggered by a menu button in a 3D view.

        for area in bpy.context.screen.areas:
          if area.type == 'VIEW_3D':
            for space in area.spaces:
                if space.type == 'VIEW_3D':
                    space.viewport_shade = 'BOUNDBOX'

However, if I bundle it into a function and hook it to a handler, it returns a NoneType error:

@persistent
def allBound(dummy):
  for area in bpy.context.screen.areas:
      if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                space.viewport_shade = 'BOUNDBOX'

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

Returns:

AttributeError: 'NoneType' object has no attribute 'areas'

How to solve this?

Turns out that inside bpy.app.handlers.render_pre the context is different.

For example bpy.context.screen is None, bpy.context has no attribute active_object etc. Looks like its very limited when rendering.

What you have access to is bpy.context.window_manager. So modify your script like this and it should work:

import bpy

def allBound(scene):
    for window in bpy.context.window_manager.windows:
        for area in window.screen.areas:
            if area.type == 'VIEW_3D':
                for space in area.spaces:
                    if space.type == 'VIEW_3D':
                        space.viewport_shade = 'BOUNDBOX'

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

Also this now works on a multi-monitor layout.


How do I separate 1 Vertex that has 2 UVs? I've imported a model from MagicaVoxel, and it uses UV mapping to assign vertex colors. I'm editing it in Blender 2.8, but I'm running into the issue that one vertex has 2 UVs in the same UV map! I thought this was impossible, and I need one vertex per UV. See the image below:

Here's a video of the same effect in motion (you might need to full-screen to see the detail)
As explained in the image, selecting that vertex in the 3D viewport auto-selects 2 UVs in the UV editor. Alternatively, selecting one of those 2 UVs auto-selects the other, but the stats bar at the bottom says I've only picked 1 vert.
Question:
How can I split these type of vertices that have multiple UVs? I'd like one vertex for the light-gray UV, and one vertex for the navy blue UV. My scene has 135k verts, so I would be very grateful for a solution that doesn't require I hand-pick them.

A vertex exists in five-dimensional space, with coordinates (x,y,z,u,v), so while two vertices may share coordinates in 3D space, they can still be in different places in UV space.

Every time you create a UV seam, or have two different shading groups (flat shading), under the hood you are splitting those vertices along the seam into multiple vertices. It's confusing though because Blender will still treat these as a single vertex in many circumstances.

The way you can get around with for UV editing is to turn off UV Sync Selection:

The down-side is that only elements of your mesh that you've got selected in 3D view will show up in UV view, but this will allow you to manipulate vertices separately in the UV editor, even if they appear to be the same vertex in the 3D view.


Hot element's glare in a colored lamp in rotational animation? The problem was acceptably solved by using ideas from Hexbob6's reply, plus the ideas from the link he gave me in discussion of his reply (the link is in the discussion of his reply).

Problem's very gist: Need to maintain the glow of a colored lamp's hot element (the glow remains visible even in rotation, when the hot element of the green lamp disappears from sight but a part of the lamp is still seen), plus to have the element's color be close in color to its blackbody temperature all the time (and the glow be affected by it).

Tried to add glare to hot element before Z combine - didn't work (no glare visible at all). Only worked if whole scene uses glare [2.png]. Plus if the scene is rotated such that the hot element is not seen on screen directly [1b.png], the light is not giving out the glare or shine from the lamp. Tried to Alpha-Over the glare-added colored glass (without the hot element) in the compositor onto the whole scene [4.png], but the solid case around the colored glass wrongly looked transparent.

If I could also have an advice on how to make a very/even more realistic light like this, it would be really nice. Thank you!

Edit: If anyone could help with a custom node setup to control the length of light falloff such that the non-compositor "glare" fades out right after leaving surface of the colored glass (and before it leaves the volume scattering enabled cube around it which otherwise makes the glare to have a square shape), it would be really nice. Thanks a lot!

4:

3b:

3a:

2:

1a:

1b:

How to Create a Glow Effect in Cycles

Okay so although you suggested that you'd prefer this not to be a compositing-based solution, as mentioned in the comments I'll put this together regardless as it is a very useful and adaptable effect.

Here's the end result of what we'll be creating:

The bulb itself is fairly simple, with a coloured-glass, domed bulb and an inner filament object. The materials are also fairly simple. The glass bulb simply uses the Principled BSDF shader with the following settings:

It is also important to set the Pass Index to 1 in the Settings dropdown of the Material tab in the Properties panel, as this will create an ID mask of the bulb object visible to the camera, which we will use in the compositing step. The final part of this process is to adjust the render and scene settings. Rendering glass with a thickness is always a bit process-intensive and can cause fireflies and noise, so I used the Branched Path Tracing method with the following settings to help reduce it:

Now, once that is rendered out, on to the compositor! The first step is adding a Glare node and adjusting the threshold and size. This step will require tweaking on a per-scene basis, but it will add a centralised glow at the heart of the bulb, wherever the filament is visible.

Next, the outer-glow effect can be developed. Remember that material Pass Index that we set earlier? We'll access that with an ID Mask node, giving us a b/w mask of only the bulb.

Using this mask, we'll now add a Blur node and set it to Fast Gaussian. This node will act as the 'spread', or light falloff control, of our lamp; the greater the blur, the larger the width of the glow.

The penultimate step of the compositing process is adding a Color Ramp to act as our light intensity controller. The left side of the ramp should be set to pure black, however the right side should have a dark-grey value. How dark this right side is, defines how intense, or bright, the final glow will be, and should be adjusted accordingly.

Finally, this edited mask can be used as the Fac input of an Add node to mix between the original image and a glow colour. This glow colour should technically be the colour of the bulb's glass shader, however you can be artistic with it!

And there we go, a compositing node setup that adds a realistic yet entirely customisable glow to the render! Here's the final node setup in its entirety, and I've also added my .blend file to you to play about with as well.

Hope this is of some help to you, and don't forget to upvote/mark as the right answer if it is! :)


How to create text input field with Blender Python API? I need to create a couple of text input fields for my Blender addon. When the script starts, the first text should be replaced by the second one. So I need to create 2 text input fields and to have access to the data entered in these fields with Python API.
Does someone know how to do it? Tried to google something, but didn't succeed.
import bpy
from bpy.props import StringProperty

mystr: StringProperty(name="Enter something:")

class HelloWorldPanel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_hello_world"
    bl_label = "Hello! World."
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

def draw(self, context):
    self.layout.label(text="He that endureth to the end shall be saved.")
    self.layout.prop("mystr")

def register():
    bpy.utils.register_class(HelloWorldPanel)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

You would have to register a Panel and as much StringProperties as you like. In order to display your properties on the panel, call layout.prop().
Following demo is based on  How to create a custom UI?
import bpy

from bpy.props import (StringProperty,
                       PointerProperty,
                       )

from bpy.types import (Panel,
                       PropertyGroup,
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MyProperties(PropertyGroup):

    foo: StringProperty(
        name="Foo",
        description=":",
        default="",
        maxlen=1024,
        )

    bar: StringProperty(
        name="Bar",
        description=":",
        default="",
        maxlen=1024,
        )

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        mytool = scene.my_tool

        layout.prop(mytool, "foo")
        layout.prop(mytool, "bar")
        layout.separator()

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MyProperties,
    OBJECT_PT_CustomPanel
)

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

    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()


scripting: Modifying an object in edit mode I need to modify an object (for example rotate it) in edit mode, thanks to a script:

from math import pi
import bpy

obj = bpy.data.objects['my_object']
# go into edit mode
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT', toggle=False)

bpy.ops.transform.rotate(value=pi/2, axis=(False, False, True))

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

but no rotation is done. If I comment out :

# go into edit mode
#bpy.context.scene.objects.active = obj
#bpy.ops.object.mode_set(mode='EDIT', toggle=False)

bpy.ops.transform.rotate(value=pi/2, axis=(False, False, True))

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

it's working but I want a modified object in edit mode, not in object mode.

(like you do in toggling "tab", pressing "r" than the axis you want and rotate the object).

Okay, I forgot to select all the mesh after toggling to edit mode:

it's working now:

from math import pi
import bpy

obj = bpy.data.objects['my_obj']
# go into edit mode
bpy.context.scene.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.transform.rotate(value=pi/2, axis=(False, False, True))
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)


How do I unwrap a model proportionally? I have this revolver model that I want to unwrap using a combination of seams and project from view. I use Texture Atlas to combine all the models into one.

The problem with this method is that some faces are unwrapped disproportionately bigger than others, and I want each island to be in proportion so that the texel density is equal across the whole model. I don't want to do this by hand. I think this is a useful skill to know.

How do I do this? Is there an addon that can help me with this?

Average Island Scale

For this task I usually take advantage of the Average Island Scale operator available in the UVs menu. I don't know the math behind it, but the effect is to re-proportionate the uv island to the region extension of the real mesh.

Here's a basic example:

And here's an example with Suzanne UVs. I duplicated the same object, so the UV island are at the beginning overlapping, then I ran the command.


How do I Delete geometry? Separate objects are one piece? I'm new to Blender but versed in Rhino, Sketchup and AutoCAD. That of course means my approach to creation has been influenced by those programs.

I read that to delete in Blender I must be in Object mode. I'm trying to delete the tapering tube. However, the two objects are one and "delete" removes everything. Shouldn't they be separate objects? I didn't combine or join. Can someone layout the method to delete a single object?
Win 10, Blender 2.80

If you want to have the objects separated go to edit mode instead of object mode, then select one mesh pressing "L" while your mouse is over the mesh you want to select, then press "P" to separate the selected mesh into a new object.

When you're in edit mode it doesn´t matter if you add a new cube or cilinder it will be part of the same object you were editing on first place.


TypeError: UILayout.prop() when trying to display custom settings in a menu I want to make a custom menu in Blender where I can change certain custom settings (code below).

import bpy

class CustomMenu(bpy.types.Menu):
    bl_label = "Custom Menu"
    bl_idname = "custom.menu"

    def draw(self, context):
        layout = self.layout

        settings = context.blend_data.custom_settings

        layout.row().prop(settings, "type", expand=True)

class CustomSettings(bpy.types.PropertyGroup):
    my_settings = bpy.props.EnumProperty(
        name="My Settings",
        description="Custom Settings",
        items=[
            ('S1', "Setting One", "", 0),
            ('S2', "Setting Two", "", 1),
            ('S3', "Setting Three", "", 2),
        ],
        default='S1'
    )

def register():
    bpy.types.BlendData.custom_settings = bpy.props.PointerProperty(type=CustomSettings)
    bpy.utils.register_class(CustomMenu)

def unregister():
    del bpy.types.BlendData.custom_settings
    bpy.utils.unregister_class(CustomMenu)

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu(name=CustomMenu.bl_idname)

When I run this code it gives me this error:

TypeError: UILayout.prop(): error with argument 1, "data" -  Function.data expected a AnyType type, not tuple

I'm new to scripting in Blender (I do have some experience with python), and most of the code I copied from examples. I would like to have a better understanding of how these custom settings, the prop() function, and blender types work.

import bpy

class CUSTOM_MT_menu(bpy.types.Menu): # Menu name need 'UPPER_CASE_MT_mixed_case'
    bl_label = "Custom Menu"

    def draw(self, context):
        layout = self.layout

        settings = context.scene.custom_settings

        layout.row().prop(settings, "my_settings", expand=True) # Layout.prop(data, 'prop') # show data.prop

class CustomSettings(bpy.types.PropertyGroup):
    my_settings = bpy.props.EnumProperty(
        name="My Settings",
        description="Custom Settings",
        items=[
            ('S1', "Setting One", "", 0),
            ('S2', "Setting Two", "", 1),
            ('S3', "Setting Three", "", 2),
        ],
        default='S1'
    )

def register():
    bpy.utils.register_class(CUSTOM_MT_menu)
    bpy.utils.register_class(CustomSettings) #  CustomSettings need register first
    bpy.types.Scene.custom_settings = bpy.props.PointerProperty(type=CustomSettings) #  not BlendData, need Specify a data type.

def unregister():
    del bpy.types.Scene.custom_settings
    bpy.utils.unregister_class(CustomSettings)
    bpy.utils.unregister_class(CUSTOM_MT_menu)

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu(name="CUSTOM_MT_menu")

BlendData cause TypeError: UILayout.prop(): error with argument 1, "data" -  Function.data expected a AnyType type, not tuple


eye won't mirror over correctly? I am trying to mirror something over the center, I put my 3d cursor to the center of the grid, then changed my pivot point to the 3d cursor, and then tried to add the mirror modifier, and for some reason it comes out like this and I can not figure out why. It worked before with a different eye that I scrapped, not sure why this one won't do the same...

I hate to tell you this but the Mirror Modifier is grossly ignorant of the 3D Cursor up to the point of complete and perpetual denial.

It mirrors either around the object origin of the object it's assigned to or it takes the orientation and location of the mirror object if you configure it that way. Your screenshot makes it hard to see where the OO of the eyeball is, but I guess it's not on the centerline.

My guess: it's directly beneath the line created by the two eyeballs intersecting.

https://docs.blender.org/manual/en/dev/modeling/modifiers/generate/mirror.html

So you can either put the eyeball (its origin, not the mesh) in the middle of your head and then, in Edit Mode, move it to the side or you can keep the eyeball's object origin in its center and use either the character's OO or an empty for mirroring or you can put your 3D Cursor in the middle, select the eyeball and use 'set origin to 3d cursor' in the tools.


How to get duplicate id via python api? I try to copy my model and append it as child.

Before

After

When I try to duplicate by bpy.ops.object.duplicate().

It will return {'FINISHED'} which is not useful for accessing it!

I can't put any operation when the item id is unknown!

If you need the object for further operations it's best to do the duplication without the operator.

data_copy = bpy.data.objects["Cube"].data.copy()
obj_copy = bpy.data.objects["Cube"].copy()
obj_copy.data = data_copy
bpy.data.collections["Collection"].objects.link(obj_copy)
obj_copy.parent = bpy.data.objects["Cube"]


Can Blender open .DDS files? I'd like to open some .dds image files in Blender as I've extracted some files from a game and wish to view them...

Does anybody know if it's possible (either by default or through an addon) to open .dds files in Blender? And if so, how to use them?

Yes, Blender does open .dds files, though Cycles currently has a bug in 2.79 where some .dds image textures can't be seen in rendered viewport or in the final image, showing a pink texture instead.

This can be solved by converting the image to another format, like .png.

Here's a great answer on how to use an image texture in Cycles: How do I put an image texture on a material in Cycles?

Here's a similar question (and answer) for Blender Internal: [How to] add an image to an object [in Blender Internal]


My UV layout is distorted compared to the geometry of my object After unwrapping my UV layout is not projected to the UV plane. How can I rotate it to fit the image ?

I have now attached the blend file – Jan Scherders

When you unwrap an object and then add an image, the UV unwrapping will be adjusted to the aspect ratio of the image. So if you unwrap in the default square UV area and then open a rectangular image your UVs will be stretched/squashed.

Blender has an option when unwrapping called 'Correct Aspect' which should fix your exact problem. 'Correct Aspect' looks at the selected image node in the object's material and uses that to remove this stretching/squashing effect. However - it doesn't seem to like the ngon at the centre of that circle you are unwrapping.

So:

Select the ngon and press Ctrl+F> Poke Faces to triangulate it.
Press U to unwrap and, immediately after unwrapping, open the toolbar (T) in the 3D view and turn on 'Correct Aspect' or press F6 to access the same options.


Equator Hole To The Centre Of A Sphere Could someone please show me jow can i make a hole to the middle of the sphere on the equator?

Here's how you do it,

Create a Sphere
Select the Center Edge loop
Press Ctrl +  B to bevel the edge

Go to Face -> Extrude along normals

Extrude the faces inside to create the desired effect

Result:


how to make an bright spot similar to a star? how to make an bright spot similar to a star ?  i  we tried to make a sphere and add emission to it
but it didn't work it only made the sphere clear bright without looking like a star

you know something similar to this image right here

For simple static lens flare you can try blender Composite nodes:

Light source very small Object with high Emission like 1000.
Big star is Glare node > Simple Star
(Streaks works too, but I could not get them enough long)
Central effect is based on Glare node > Ghost Fog "scratched" by Cloud Texture plus Sun Beams node.

For advanced  and more flexibility try this https://codeofart.com/flares-wizard/


Input 3D line segments from real scientific data I have collected 3D scientific information on a network of rod-like filaments with a particle moving though the filaments. The filaments are static and do not move. The output of the filament data from my analysis is two X,Y,Z points for each filament identified to create a line segment between the two points. For example if I have three separate filaments the information would be stored in a CSV file organized in a table as below:

ID | X1 | Y1 | Z1 | X2 | Y2 | Z2 |
1
2
3

The output of the particle moving data is similarly stored in a csv file organized with an X,Y,Z position and a Time as below:

Time | X1 | Y1 | Z1 |
1
2
3
4
...

What I would like is to create a static environment from the line segment data and then have an animation of the particle where each frame of the animation the particle is at its given X,Y,Z position for that time point.
The organization of these filaments (line segments) and the particle in 3D space and in relation to each other must remain accurate, to scale, and precise. This is scientific data and there is no room for any artistic license. Does anyone know how this information can be brought into blender so I can create animations of the particle moving though the network of filaments using this data? It's totally reasonable for me to reorganize my input files to better fit blenders mechanisms so the files do not need to remain as X,Y,Z coordinates if other solutions exist.

Thank you.

EDIT
I was able to amend this previously answered question ( Can object parameters be set from data file? ) to get at the particle moving in time part of this but am still having trouble with the line segments. If anyone can help with just that part I'd  appreciate it.

If I understood what you where trying to do well, the best way to create the segments is to use curve object output. With the Spline from points node, you can connect all you file data into the two vectors for the object, and animate them by using the method shown in the question can object parameters be set from data file.

(In the image I let the vector inputs free)

Then you can create a loop or a group to repeat the process and create plenty of splines (segments)


Why do I have a large black and white artifact on the rendered image? Cant figure out why the rendered image has a large black and white artifact (on the bottle on the right)?

This is the blender file.

Appreciate any tips!

That big error on the top is caused mostly by Fireflies and how the denoiser works.

The denoiser has a hard time dealing with small bright elements surrounded by darker pixels, as is the case with fireflies, and creates new artifacts instead.

Just for comparison here's the image with the same number of samples and no denoising (those random bright pixels are the fireflies):

For other examples see:
How to properly denoise renderings?

What is the solution?

You need more samples and less aggressive settings for the denoiser

Or get you can get rid of the denoiser completely and use some clamp indirect to control the fireflies.

But you can also avoid those hot spots and fireflies if you change the lighting on the scene.

Don't use point lights, or very small lamps, to light shiny and transparent objects...

They will be reflected as bright shiny points on the surface and are more likely to cause fireflies.

If you use large area lights fireflies are less of a problem. Here's the same scene at 600 samples, no denoising and no clamp indirect.

For tips on how to light shiny objects read:

https://blender.stackexchange.com/a/50576/1853

Other advise. Try to avoid high levels of subdivision (like you have in the plane used as the background). You are generating a very large number of unnecessary vertices by setting the subdivision to 6. Very rarely you would need more than 3.

Read: Blender render crash when using subsurf modifiers.

Last piece of advise: Try to make your objects to the size they would be in the real world. Your bottles are larger than a house at 9m tall. It makes a difference in terms of the size and intensity of the lights (and if you are going to do any kind of physics or fluid simulation), and also in terms of the depth of field on the camera.


How do I switch Auto Perspective on? I recently had an issue with Blender 2.71 RC2, which I submitted as a bug. The issue was that when I hit Numpad 1,3 or 7 the viewport would not automatically change from perspective  to orthographic  mode, as it used to in Blender 2.70.

I now want it to behave like this in blender 2.71 RC2, but I can't find the Auto Perspective check box in the user preferences.

Where is it?

It is in the Interface> View Manipulation section:


Checker Patterns appearing on the Render File link-https://www.blendswap.com/blends/view/5387
For some reason my render have these black and white checks. Please help me to remove them.  Thanks

It seems to be caused by the "use mist" in each material. I don't know why it works like that but disabling the "use mist" makes the objects solid.

Also that file isn't exactly great with scene and model work. You'd probably be better off creating your own sets. Forget about Blender Internal as the next big release won't even have it. Go with Cycles.


how to follow a list of splines one after another i try to follow a list of splines with a "emitter mover" - one after another.
I did this with animation nodes (image below)
result: the first spline works well and moves along the first spline.
the second "jumps" to the starting point of spline 2 and stays there instead of moving along the spline.
the third "jumps" to the starting point of spline 3 and stays there instead of moving along the spline.
what am i doing wrong?
update: i know, how to connect splines - i don't want that to use, because i need them "splitted"

After playing a while with the nodes you have used, I discovered that the Object Action Output Node expects to start with frame 1 for each subsequent action. You might put a math-node with Modulo selected between Time Per Char Node(b)  plus * *(a) and the Frame input from the Object Action Output Node to get what you want.


Python rotate view on any given angle x , y , or z axis Using bpy.context.screen.areas you can get the current view or set the view in  TOP or 1 of the other pre set views like LEFT or BOTTOM

How can i change the view to any given angle in Python?

For example
I would like to rotate the view 45 degrees X axis and 0 for Y and 0 for Z
or i would like to see 45 degrees on all 3 axis

in API i was unable to find any that suggest user input to rotate the view

Use rotation matrix

Similarly to object rotation to rotate the view from its current rotation 45 degrees about x axis

Using code from a previous answer

import bpy
from math import radians
from mathutils import Matrix
context = bpy.context

R = Matrix.Rotation(radians(45), 4, 'X')

for area in context.screen.areas:
    if area.type == 'VIEW_3D':
        space = area.spaces.active
        v3d = space.region_3d
        v3d.view_matrix = R @ v3d.view_matrix
        v3d.view_perspective = 'ORTHO'
        break

To set it to this rotation instead of transforming by set the view rotation (Quaternion)

        v3d.view_rotation = R.to_quaternion()

To set it to an Euler

from mathutils import Euler
q = Euler((radians(45), radians(45), radians(45)), 'XYZ').to_quaternion()
v3d.view_rotation = q


How can I get my texture correctly onto plane? I am trying to add a texture to a plane but it doesn't spread correctly across the entire plane. How could I get it right?

Try UV Unwrapping your plane mesh then using the UV coordinate from the Texture Coordinate node instead of the Generated output.

Before Mapping

After Mapping

Looks like this: http://imgur.com/a/mOb18


Why does only selecting one face select multiple faces occasionally? I'm very new to 3D modeling in general. I've been working on a Blender project over the past day, and recently, when I would edit one face on the right side of my model, it would select/edit another face on the left side. Also, I can't select anything on the left side at all. Can anyone explain why this is happening, and how I can fix it?

You probably made a linked Duplicat by pressing Alt + D insted of Shift+ D.

You can unlink them like here.

[.


How do I apply delta transforms to normal transform? How do I apply the delta transforms of a couple hundred objects (in a collection, if it helps) to normal transform? I can't even find an option to clear delta transforms.

There's the Object -> Apply -> Location to Deltas, option, but no equivalent to go in reverse!?

I ran into the same issue and used Bintang Senja solution. I also used for rotation and scale, maybe the code can help someone else:

import bpy
for obj in bpy.context.selected_objects:
# Store delta location, Eurler rotation and scale of selected objects
obj_deltaL = obj.delta_location
obj_deltaR = obj.delta_rotation_euler
obj_deltaS = obj.delta_scale

# Assign selected objects location, Euler rotation and scale as delta location, Eurler rotation and scale, Reset delta location and Euler rotation to 0 and scale to 1
obj.location = obj_deltaL
obj.delta_location = (0,0,0)
obj.rotation_euler = obj_deltaR
obj.delta_rotation_euler = (0,0,0)
obj.scale = obj_deltaS
obj.delta_scale = (1,1,1)

Please don't juge the code, I know it's crappy. I just wanted a quick and easy solution. It works fine :)


'Animation Nodes' Compared with 'Animation Nodes + Extra Nodes' What are the main differences between the two Blender addons Nodes 'Animation Nodes' and 'Animation Nodes + Extra Nodes'?

In Animation nodes + Extra nodes (AN+EN) - as the name says - there are additional nodes in there. Basically, the AN+EN is AN-fork, and it has extra nodes as well as extended version of some nodes e.g., Simulation Nodes, Falloff Tracer, Particles Output, Modified Vector Noise node, Texture Input, etc. Many of the extra/extended nodes have been merged in AN e.g., Grease Pencil, UV Map, Vertex Color, Custom Attributes, Mesh Points Scatter, etc. However, there are some nodes which may not be possible add in AN.


How to automatically adjust the levels of a grayscale I want to generate a greyscale to apply a color ramp on it to generate my texture. In order to get the most value depth on this greyscale i want to adjust the levels in the compositor so the darkest color gets a value of 0 and the brightest color has a value of 1. I want Blender to detect the values automatically like the Auto Level node of Substance Designer.

Here is an image i have created for the test with bad levels:

And the result I want to generate in the compositor with automatic detection:

Sure just grab a Normalise node from the Vector node category.

And you can apply this to colour images by separating out the value component.
In this example I have intentionally underexposed the source using a colour curve node. You can compare the results in the split viewer node.

A useful application would be to smooth out exposure of time-lapse recordings. Where lighting conditions and therefore exposure, change radical during a recording.


3D animated glass object in video -> how to add reflection I have a question regarding reflection.
I took a video from me holding a wooden plate and I want to create an aquarium filled with water on it.
I created the aquarium and the water and everything is working perfectly but I have no clue how I make the water and the glass bowl reflect the backround (me). That you can see the reflections of myself and of the wood and so on.
Can you please help me and give me some input how I can do that?
Here is a picture how it looks like so far. As you can see the aquarium is black because there is nothing that is reflecting in it.
For information, I have set the video as a background in my camera settings in blender.

Thank you very much,
Luelaes

Tough one, in the reflection you would see the person holding the tank, but from a different perspective (arms. chest and head and the sky behind).

So to get an accurate reflection, you would need to generate a 3d character that matches the person holding the tank, or shoot some video from a low angle that contains the image that would be reflected and map that onto the surface of the water.
The cheapest (and inaccurate) way to do this would be to create a surface that reflects a plane with the current image mapped to it. That plane would need to be invisible to the camera but visible to glossy rays.


Diferent issues on smoothing a mesh https://www.youtube.com/watch?v=5VpqwG1Th-w

This linked video shows a problem I have. On each of the faces that I select (in the video) I use "extrude individual faces". Then I scale them all individually. I do this to create new faces inside the once I selected.

The purpose is to have create two different shaders to use on the newly created faces, and the other smaller faces.

But like the video shows it creates an issue on the top of the mesh. I have been told it can be sorted out by enabling autosmooth. While it helps it does not solve the issue completely.

Another problem occurs when I add edge loops to smooth out some of the Subsurf so that the faces looks less circular.

So my question is how to sort this issues?

There is one operator that allows you to what you did in the video in one single step and with greater control over the distance.

You can select all desired faces and use the Inset operator, i key by default. Do change the settings and tick the Individual option so each face is inset by itself.

That will however lead to "quad corner" based topology which while still being predominantly quad based is not great for subdivision, and doesn't work well with adding control edge loops.

What you can do in your case is use the Bevel operator instead, with the right settings it will give a quad dominant topology, and continuously flowing loops along the fuselage that will lead to less "rounded faces".

Make sure you select the whole edgeloops around the ship, set the number of segments to 2 and the Profile value to 1 to it keeps the original angle


Check if group input node was passed a value, optional default value I am trying to creat a green screen filter. I would like to have the option of passing it a background image, but if no image was passed, then to just make the background transparent. How would I go about checking if a background image was passed to the input?

By default an image texture with no associated file will output a completely black value. You can use this to drive the alpha value of your background, using a "Math" node set to "Greater Than 0" in order to have full transparency when there is no image texture and zero transparency when there is an associated image texture.


Why can't I drag the frame position? I can;t drag the current frame marker, only set it using the current frame value in Timeline:

Figured it out - you have to drag with right mouse button, not left.


How can I have a light that casts no shadows? Is it possible to light an object from three locations using emitters but only allow two of those emitters to cast a shadow from the object? I have an emitter from above, right and left. However, I do not want a shadow to be cast from the light on the left but retain the shadows being cast by the other two lights.

It is possible if you're using lamps, not objects. Simply remove the check for "Cast Shadows" under the lamp material settings.


How can I Make Sure No Hair Is In The Mesh? I am making a leopard. I have modelled the mesh, and it is sitting in the file. I am trying to add hair to the leopard, and when adding the hair to its body, it is inside the body. How do I make sure that all of the hair is outside the mesh? What if I want it inside?

In your case the hair cannot get inside as the default Path render method is used. Shorten the hair as I can see it has the default length which is way too long. Make the length something like 0.1. And If you want hair all over your mesh, increase the hair number. If it's too low not all faces get it. Like check at the info bar how many faces your mesh has, multiply this number e.g. by 2 and input this value as the hair number. Set your Hair/face to 2 et voila.


cannot connect two bones together i want to connect bone 1 and 2 together however i am not able parent any to the other

notice that bone 1 is not in the same group as of bone 2
, basically group "2" is a duplicate of group "1" with a rotation of 180 degrees about the z-axis

thanks in advance.

In edit mode select the head only of bone 1, then press Shift S "Cursor to selected", then select the tail only of bone 2 and presse shift S "selection to cursor". Then select the bone 1, shift select the bone 2, and press Ctrl P "Connected". Different bone groups are not a problem because they are referred to pose mode, not edit mode.


Planes don't show assigned colors/ images I am having trouble using assets from blender 2.79b I personally made for a project. I made sure the user preferences and add-ons in 2.81 were the same ones I used in the older files. Screenshot is what I see when I open an older file. I made sure all files were there and mapped accordingly. There is about 2 hundred images parented into this scene. This problem appears in all of my other .blend files last saved in version 2.79b.

Is there something I am overlooking? Or am I going to have to re-import all images and rig everything back up to use these assets? I can provide more images if needed.

The problem:
You are using the Compositor Editor.
This will never work, you need to use the Shader Editor.

How to:
1) Open the Shader editor.
2) Select your object and click the + New button, to add a new material.
3) Add an Image texture node and select your image.

Open your Shader editor.
With your object selected, click the New material button.

Add the Image Texture node, and connect it like this.
Then click Open and find your image texture.

This is the result.
If you want to see it, you need to be in the Material Preview or Rendered Preview.

If you're a beginner, I wholeheartedly reccomend BlenderGuru's Donut tutorial series for beginners.
Spend some time there, and you'll learn much more :).

Good luck! :)


Set orthographic view using python? Is there a python function that sets ortho view such that X and Y axes are visible - the equivalent of numpad 7?

Thanks in advance!

You can override the context when calling view_axis() operator:

import bpy
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.view_axis(override, type='TOP')
        break


How can I see a rescaled image in UV Editor? I've been having some troubles when I change the mapping scale of a texture that I'm using as Base Color map in Blender.
In Maya when you change the scale of an image you can see this changes reflected in UV Editor like this:

That way you can tile an image (without rescaling the Uvs) and know exactly where you're placing your Uvs
in the texture if you need to make some especific Uvs concur with something in your image.
However, in Blender, when I replicate this process it happens differently:

As it's shown I'm only able to see the image with the original mapping scale.
I figured out that this happens because in the UV editor you're seeing the "loaded image", not the "applied image" (which includes the scale changes) so here's my question:
Is there any way to see the image tiled in the UV Editor, like in Maya example I've uploaded?

EDIT
To tile/repeat an image in the material using the UV editor, you would need to scale up the UV map and place it manually on the image (the UV map will need to be larger than the bounds of the image). The tiling/repeated-image used as texture will be visible on the 3d viewport in material preview mode or in render preview mode.

To view the tiled the image in the UV editor. Press N to show the editor properties and in the view tab enable Repeat Image.

Old Answer (I'll keep it just to reference the comments)
Use a texture coordinate node to set the texture to use UV coordinates.
With a mapping node you can control the location rotation and scale of the texture used.

Changing the scale will allow you to repeat the texture within the UV coordinates.
Note that when you use Pont as the type, a scale of 5 means that the texture will be repeated 5 times on a given axis.
Also note that the image texture node has to be set to Repeat.

If you choose Texture as Type on the mapping node then you can repeat the texture by using values smaller than 1.0, for example a value of 0.2 will repeat the image texture 5 times.

The texture can be visualized in the Preview window for the material


How to create a Eye rig with cornea deformation I'm trying to create a realistic Eye rig that uses bones instead of shapekeys to achieve more realistic results. I want the eyelids to deform around the cornea when the eye is moved around.

And while I have the eyelid being entirelly moved by bones I can't make it wrap around the eye because of the cornea. As you can see in the picture below the eyelid is clipping trough the eye mesh.

The eye was made with anatomic references and thus it's accurate, as such it has the "bulge" of the cornea.

Video showing what I want to achieve: https://www.youtube.com/watch?v=TAZIvyAJfeM

Is it possible to achieve this in Blender?

I tried with the Warp modifier but it seems hard to make it work with a complexe topology, a Lattice modifier seems much more convenient:

First remove all the Copy Transforms constraints of your 3 bones (not sure why you want those).
In Pose mode, close the eyelid a bit so that you'll be able to test the modifier when the eyes are closed.
Create a lattice in front of your eye: shiftA > Lattice. Scale it down.
Subdivide it a bit, for example U and W values > 7, and make it flat on the Y axis with a V value of 1.
Give your eyelid mesh a Lattice modifier. Choose the lattice as Object.
Select your lattice, go in Edit mode, select the central vertices and make it a bit round, use the Proportional Editing / Sphere falloff type to help you.
Parent the lattice to the eye bone: ctrlP > Bone.
Now when you'll move the bone, the transformation of the eyelid will follow.
If necessary make some adjustments to the lattice in Edit mode, or scale it up or down in Object mode, play with the modifier Strength (and create keyframes if the influence changes through time). You can also limit the lattice influence on only a part of the eyelid mesh (with a vertex group that you'll set in the Vertex Group field of the modifier), etc...


Creating a 3D printable terrain model with blender Hi dear fellow blenders!

I am trying to create a 3D printable model of an existing nature protected area in Germany and kind of hit a wall since i am very new to blender and 3D modelling.

The end result should look like this (apart from my model only having one texture on the up side):

What i did so far:

creating a plane with the dimensions of roughly 40x40x1.2 cm.
subdividing the plane by 500 and adding a displacement modifier to mold  the surface of the plane into the shape of the actual relief.
applying a texture using the aerial photo of the area

so far so good. as far as i know, i need to modify this plane to make it an actual 3d printable object. i would like to have it look like in the first picture but being kind of a hollow cube with a relief on the up side to minimize the costs.

so i thought i would create another plane with the same dimensions, place it underneath the first plane, subdivide 500 times like i did with the first and finally join the vertices along the edges. in addition i would solidify both planes using the modifier.

now i solidified the first plane (unfortunately i can't post the picture)

i actually have the feeling that this is not the result i had in mind, since it seems like only the rim of the plane got solidified as can be seen in the picture. i don't seem to actually have created thickness.

after adding the second plane, positioning and solidifying it i got this result:

and now i hit the wall. i assume that one way to proceed would be to build the four "sides" of the cube by connecting the vertices along the rim since they mirror each other (because i subdivided both planes 500 times and located them parallel to each other).

how would i connect the vertices in blender?

what would be the quickest way to achieve the intended end result?

I am completely new to blender and assume that the result could be achieved fairly quickly, but i don't know how and i am not sure if my intended method would actually be the best method to achieve the result...

has anyone experience in creating printable 3d reliefs in blender who could point me in the right direction?

thanks in advance,

Hannes

Starting from the displaced plane
Apply the displace modifier
Enter edit mode Tab
Select all A
Place yourself in front (NumPad1) ortho view (NumPad5 if needed)
Extrude E then Z
Now scale along Z to zero to flatten the base : S Z then 0

Note: all keystrokes are not visible in the gif as 500 subdivisions is a bit too much on my computer. But the keys are written above (and you can see the operations on the bottom left of the screen)


Adding armature with shift+e, but doesn't mirror in x-axis the file link
I want to add the armature that mirrors to the x-axis. But with mirror x-axis turned, press shift+e and armature turn to be strange.

If you know what happened, please tell me! Thanks!

Your armature object as some rotations.
In object mode, select the armature and press Ctrl+A / Rotation to apply it.


Documentation for accessable object properties I'm looking at an export script and I see where it extracts the various 3d properties from an object named "me" like these 3 lines:

me = bpy.context.object.data #EDIT: This is what "me" is, I think
me_verts = me.vertices[:]
materials = me.materials[:]
faceuv = len(me.uv_textures) > 0

Which it goes on to format and write to a file. Where can I find a list of all the things I can access like this? I found the python API but I haven't found this specifically.

The export and import scripts are indeed an excellent form of documentation.
There is a massive amount of documentation. This includes a quickstart and API overview. More importantly it has a good search box (warning: avoid including parenthesis when searching functions).
Interactively you can use the python console to investigate which properties are available on a given reference. It has a ctrl+space auto-complete (auto reveal).

in the console for instance

>>> obj = bpy.context.object   # the current active object
>>> obj = bpy.data.objects['Cube']   # object specified by name
>>> obj.

if you type obj. and hit ctrl+space you'll see all the attributes of the object at that level. This list is long, and you can scroll the sidebar

As you state me = obj.data, the me named variable is just a convention, it could be called whatever, but it's handy to stick to the convention.

obj.data.<ctrl+space> looks like

If you want to see information about the mesh you might do

# get coordinates of 1st vertex (index=0)
>>> obj.data.vertices[0].co

# indices that make up the first polygon in the mesh
>>> obj.data.polygons[0].vertices[:]

Note that the ctrl+space feature will show all attributes starting with the letter v if you do obj.data.v<ctrl+space> like this:

This becomes useful once you get a mental picture of the API, it can speed up navigation big time.


How to 'merge/dissolve' two faces? I had trouble merging/dissolve two faces together, like merging these two faces in the screenshot. Any help is appreciated :)

I think what you're looking for is the F key, this joins any selected faces if it makes sense topologically.

But, you will get an Ngon on that face.


Equivalent of Material.alpha and Material.use_transparency I am working on upgrading a 2.79 plugin to 2.8.
The plugin was using the Material.use_transparency and Material.alpha fields, which got both removed in the 2.8 api change.
I am new to this, and I wonder what is the new equivalent of these fields, or if there is a new way to get these information.
Thanks a lot!

This is more complex because materials now almost always use nodes.
Whether to use alpha is controlled by the Blend Method. As a replacement for reading material.use_transparency, try using material.blend_method != 'OPAQUE'.
To fetch the actual alpha value is harder since it now flows down an arbitrarily-complex node graph. But for simple graphs you can try this
from bpy_extras.node_shader_utils import PrincipledBSDFWrapper
ma_wrap = PrincipledBSDFWrapper(material)
ma_wrap.alpha  # use this instead of material.alpha
ma_wrap.alpha_texture.image  # use this if you want the alpha texture image

This wrapper is used by the OBJ/FBX exporter. See Import & Export of Node Shaders in the manual for more about it.


How do I seperate two faces by shared vertices? I want to split two faces exactly where the vertices lay as seen below. How can I do this?

Select the 2 vertices you want to split and press v to Rip the edge. You'll have a result like that

(from the blender manual)

  Rip creates a “hole” into a mesh by making a copy of selected vertices and edges, still linked to the neighbor non-selected vertices, so that the new edges are borders of the faces on one side, and the old ones, borders of the faces of the other side of the rip.


How to make a knight helmet face? I want to make a knight helmet, and the face part of the helmet comes to a point in the middle and i'm not sure how to go about doing this.

Here's one approach:

Create a mesh circle with 8 points in the side view:

Scale it to get the profile you want:

Delete all but the bottom corner of it:

Go to the top view and make an 8 point cylinder and align it with the circle from the side view:

Then go back to the side view and scale it so that it matches your quarter circle mesh:

Subdivide the vertical edges and then drag the points to the right and down to match your profile:

Go to the top view and delete the edges on the left half:

Delete the back faces:

Select the vertices in the back and snap them even with the right side:

Add a Mirror modifier:

Grab the middle vertices and pull them downwards:

Select the edges to the right of the middle:

Subdivide them:

Select the new edge and do Edge Slide to move them right up next to the middle edge:

Add a Subdivision modifier, and you can see we've got that pointed crease in the middle:

If you then go to the front view and pull up the middle verts a bit:

Then go to the side and delete these faces:

Select the upper row of edges:

Subdivide:

Select the new edge and Edge Slide it up near the top edge:

And that's got you pretty far along on the top visor already:

You can do the bottom similarly, but it's almost straight, so you wouldn't need as many edges.  Just make another cylinder in top view, cut it in half, mirror it, and move the edges where you want them.

I hope that's enough to get you going.  Sorry if it's too much detail as I don't know your modeling skill level.  Good luck!


How do you create grass? If you were using a plane as a terrain, how would you add grass to the plane and make it bend and flow like there was wind. Also, how would you make the grass color vary in shades of green so you would get yellow, dry patches of grass.

This can be done with a Hair particle system.

Add a hair particle system to your mesh:

If you want to simulate the hair dynamics with realistic wind, you can use a Smoke simulation:

Add a smoke domain object and a Smoke Flow object
Add a Wind force field and a Turbulence force field (ShiftAAdd > Force field)
Adjust the settings until you have a nice simulation (optionally add some collision objects) and bake the smoke
Disable the Wind and Turbulence force fields for the particle system in Particles > Field Weights:

Add a Smoke Flow force field and select the smoke domain object for the domain.
Enable Dynamics in the particle system and increase the Stiffness
Bake the particles, then hide the smoke domain and emitter:

As for the color variation, you could use a Procedural texture:

Result:


Multiple flames from one mesh Is it possible to produce several small flames from different parts of the same mesh? I'm modelling a birthday cake with 42 candles, and in a weak moment I joined the cake and the candles into a single mesh (don't ask why, I honestly don't know). I created the candles by modelling one, which I used as a template object for a particle system, which I then converted into objects. Then, ¤#!& knows why, I joined it all, including the cake, together into one glorious whole.

Could I put a smoke domain around each candle, or do I need to separate them? Or could I even accomplish it with a single domain?

I save pretty often, so although I have Blender keeping five backups, I can't recover the individual meshes (my /tmp is a tmpfs, and I've rebooted since the "accident", so no quit.blend either).

You can separate into loose parts like @gandalf3 said P > Separate By Loose Parts then have multiple flames in one domain, like this:


Blender 2.8 VSE "No Items available" when adding the scene to the sequencer Hi,
I am learning how to use the VSE, how i can add my 3d scene (collection1) to the sequencer ? (I've deleted the defaut scene and create a new one )

EDIT : Ok,i have to save 2 times the same project ( test1.blend and test2.blend for exemple ) Then, File/Append and select the first blend file, navigate into the scene folder, and select my scene.

You can't add a scene strip referring to the same scene as you're currently in. So make a new scene/or a copy and this one you'll be able to add.


Snap vertices to a grid when moving Similar to how you can snap UVs to the 2D pixel grid in the UV editor, can I make vertices snap to a virtual 3D grid-space where I could specify the distance between each point of the grid-space?

In the 3D view header, at the bottom of the 3D window change the snapping type pulldown menu to Increment, after that a button will appear by it's side allowing you to change the increment type to Absolute Grid alignment.

I am not sure but I think you can control the size of the grid in the 3D View Properties Shelf > (N menu) under the Display Panel > Grid Floor > Scale


How can I merge or join Grease Pencil objects in collection? I was working with grease pencil and I made a little character. As I was experimenting I separated the eyes and couple of more objects.

How can I now join and make them as one single object?

Thanks for your help!

W

Select all your objects -> go to Object menu -> Join. (Or use the shortcut Ctrl + J)


Uv Sphere Unwrap Perfect Square Hello all i'm trying to do is get this sphere

to be unwrapped as a perfect square to fit into the image i've been playing around with the uv settings can't seem to figure it out if anyone here knows how to do that please let me know thanks.

I personally like to think of this backwards

see this link or this other one that mean starting with an unwrapped plane and making a sphere out of it, to avoid using a UVsphere and the triangle fans at the poles.

But if you want to use a UVsphere here's an alternative:

In edit mode go to front back or a side view, chose an edge loop and mark a seam.

Switch to face selection and choose a face adjacent to the seam, that will make it the "active face".

Press A to deselect everything and press A again to select all. You will see that the previously selected face is still the active face.

Press U to unwrap, and choose "follow active quads" and then press on OK using the default values

That will give you a perfect grid UV map, but the map will be much larger than the UV space.

you can scale it down to fit within the image you want to use.


How to get Anisotropic Filtering in Blender Internal? Is there any way to obtain Anisotropic Filtering with Blender Internal renders?  I have it enabled in User Preferences->System, but that only affects viewport rendering, and does not affect the full render.

Anisotropic filtering affects the sharpness of textures at oblique angles. The setting under Preferences -> System affects only the OpenGL viewport (and games) as designed.

Blender Internal renderer's texture filtering is controlled by the Image Sampling settings under the texture panel. Changing the value from the default Box to something like EWA with 32 samples should give very good result.

Box Filter on the left, 32 tap EWA on the right


Video Colors Washed Out On Export Export png sequences. Composite them together in new Blender file with audio.

Export as FF-MPEG H.264. Colors come out all washed out and yellow in all media players.

Import exported video file back into Blender and it looks fine, it only looks right when imported into Blender.

RIGHT Windows Media Player LEFT Blender (Same exact exported MP4 video)

Video File

In the render settings, try to change View Transform from Filmic to Standard:


How to Inset irregular (unevenly scaled) shapes? To start: I'm an amateur and only using Blender for this one thing. I've learned everything from videos, forums, or just tinkering so I don't know a lot of the terms. I did apply scale though so that's not the problem.

I'm trying to create 3D numbers that extrude a bit, then inset the remainder of their depth as seen here. I've created SVGs and for the "1" I just extruded twice and manually moved the lowest vertices inward and it created exactly what I wanted. However, with most every other number this doesn't work and I've tried a few methods:

Inset

Scaling (and scaling individual parts)

And I don't want to move every vertex individually because there's so damn many plus it's impossible to get even remotely clean.

One thing I noticed was the problem with Inset is it creates a mess where the crosshatch-y things overlap and extend past the original shape boundaries (seen in the Inset link). Is there a way to remove the protrusions or contain it within the number shape? Or is there just a way to get irregular shapes that don't scale evenly to inset?

I don't know how it evaded me the past multiple searches, but I've discovered the solution! Blender 2.8 comes with the Inset Straight Skeleton add-on bundled. Add it under Preferences>Add-Ons>Mesh>Inset Straight Skeleton. It's accessed by searching (F3) and has only two parameters: Amount and Height. Using this I was able to accomplish exactly what I wanted! Hope this helps others in the future!


Animation Nodes 2.0 Reload (F8) Not Working I've downloaded the Windows prebuilt AN 2.0 and installed on Blender 2.78C. AN loads fine on startup and seems to work, but I am doing additional development and when I reload with F8, the following AN error is generated.

Animation Nodes can't be reloaded.
Exception in module register(): 'E:\00visualNotes\workspace\visualNotes\addons\animation_nodes\__init__.py'
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\addon_utils.py", line 349, in enable
    mod.register()
  File "E:\00visualNotes\workspace\visualNotes\addons\animation_nodes__init__.py", line 176, in register
    bpy.utils.register_module(name)
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\bpy\utils__init__.py", line 618, in register_module
    raise Exception("register_module(%r): defines no classes" % module)
Exception: register_module('animation_nodes'): defines no classes

Any help with this would be greatly appreciated.

Animation Nodes 2.0 does not support reloading.

This is because Python does not support reloading of extension modules, which AN has a lot of since it uses Cython.

So unfortunately you will have to disable AN completely during development or restart Blender every time you make a change.


Is there a hotkey to subdivide geometry? I’ve been following this tutorial for a model, and I’m wondering if there’s any hotkey to change an extruded plane (like it was done in the video) from this:

To this:

If not, do I need to use a cube mesh and edit it?

You're looking for subdivide. It doesn't have a shortcut by default, but you can assign a custom hotkey by rightclicking on the menu item under mesh-> edges -> subdivide

in my case it's set to alt + w


Animation works in viewport but not in render So I'm making a basic animation for a character dropping down consisting of a rigged mesh and a cloth simulation. When I play it, the character actually moves in the viewport, even in Render Preview. When I render it using Render Animation, however, the character seems not to move (apart from the cloth, apparently).
Here is the example render result in the output folder, but the camera is moved upwards a bit to see character's original position.

As you can see, the character doesn't move. The cloth here actually moves with the simulation, though.
What I checked so far:

Making sure the "visible in render" on armature modifier is active in viewport,
Making sure that the step size is not 0.

Here's the blender file.
Edit:
I realized that when I render an animation, the only thing that is rendered is the current frame that is on my viewport (aside of the physics). So if I my workspace is at frame 35, the character is stuck just like what it should be at frame 35. The clothes are still, oddly, fine, though.

I found the answer why does anyone else can't replicate my error and why does this error exists in the first place.
So I used an external plugin called "wiggle bones", and I realized that you're supposed to bake the animations first before rendering. Others might not have this plugin installed; that's why they don't have this error.


Blender Collision Simulation Data Is it possible to access data from a collision, such as point of collision and impact force? I am trying to simulate a "drop test" in Blender and cannot figure out how to access the information. As of now, I am trying to use the Blender game engine and python.

By using collision callbacks you can retrieve the hit object, point and normal (not sure about how to retrieve the impact force though). See the API reference for more info. Example file below.

def my_callback(object, point, normal):
    ''' Do whatever you want with your collision data '''
    print('Hit by', object.name, 'at', point, 'with normal', normal)

def register_callback(cont):
    ''' Run this with an always sensor (tap enabled) when the game starts '''
    own = cont.owner

    if not my_callback in own.collisionCallbacks:
        own.collisionCallbacks.append(my_callback)

Example file:


Blender 2.9 Not Displaying DDS textures in viewport I've heard something about Blender not rendering DDS textures in the viewport somewhat. It does seem to be true. Is there not a fix to this?

I'm having a similar issue with .DDS files on a project and apparently all you have to do is convert them to .png. Should be as simple as just renaming the suffix from .dds to .png (but make sure you do this with backup files!)
Can Blender open .DDS files?


Separate by loose parts creates weird pattern I'm building a submarine for 3d printing and I have a removable top lid that I want to remove from the model to machine separately. I do a SHIFT+D on my selected area and when I move it off and do a separate loose parts to make the objects independent, I get this weird staircase pattern on the back of my boat.
What is this and how do i fix it?

Is this the result you're looking for?

If so, then, yes, the problem was duplicate vertices - 222 to be exact. Select the whole thing, go to Mesh> Clean up> Merge by distance. When I did this, I still noticed two stray edges bisecting planes near the back (second time I tried I found only one for some reason) - look for them, select them, right click and choose "dissolve edges".
After that, re-select the area you want to duplicate/separate, and it should work the way you intended.
Also, is there some special reason you're separating By Loose Parts, instead of by Selection? By selection is what I used without thinking, and I can guarantee it works (I tried both ways and they both work).


How can I create 3D surface of sine waves? I would like to make a surface that obeys the equation:

z = Asin(x) + Asin(y), 0<=z<=1; 0<=x<=2npi; 0<=y<=2npi

Where I would like to be able to change n to increase/decrease the number of cycles and change the amplitude A. I attempted to generate a sine wave via a script that I found; then I tried to extrude it, duplicate it, and then rotate one of the planes so that they intersected at a 90degree angle. The results were not very satisfying...

I don't think there's currently a way to add surfaces, but if you are okay with using meshes, you can use the Extra objects addon (it's not enabled by default).

To enable the addon, open the User Preferences, by pressing Ctrl + Alt + U; then, switch to the Add-ons, search for "extra" and enable the one that reads "Add Mesh: Extra Objects", by checking the box.

Then, you can close the User Preferences window and, in the 3D View, press Shift + A and then select Mesh>Math Function>Z Math Function.

After that, in the Toolbar (T), you will find a box where to enter your function.

If you prefer, you can bring these options up by pressing F6.

After you've entered your function, you can add a Subdivision Surface modifier to make it smoother.


When is cubic texture interpolation helpful? I noticed that Cycles is capable of using cubic texture interpolation for image textures but there is nothing in the manual about it, and every tutorial I've seen only mentions it by saying to leave it on Linear most of the time. I've done a bit of research on image scaling with linear/cubic/sinc but I can find very little in the context of texture filtering. What I'm wondering is this. Are there specefic cases where Cubic might be more useful than linear or where cubic could cause artifacts? For example when using textures that are smaller or larger than they appear in screen space, what would the pros and cons of each interpolation mode be?

Let's look at what the two mean and create examples. Our example image will be this (enlarged) $2\times2$ pixel grid:

Linear: In spaces between other pixels, there is a linear gradient of the two mixing colors:

Cubic: In spaces between other pixels, there is a cubic (also called Ease) gradient between the two colors:

When we compare the linear and cubic interpolations, the eased one seems to "bleed" a little bit, creating a much smoother interpolation, but it doesn't leave the original lines as defined, so it will blur the image.

Let's look at it with a more complex image:

Linear:

Cubic:

Essentially, Linear interpolation will hold to the original definition of the shapes in the image, but won't look as pretty. Cubic interpolation will look nicer and smoother, but that comes at the cost of image clarity, since the image will appear blurred.

Also, when I did (very) small test renders on my computer, Linear was milliseconds faster than Cubic.


Scaling down texture When building this building, when I add the brick texture, it's way too big (as should be expeted). And I know I should probably already know this but, how do you get it to scale down? I've triesd adding Texture Coordinate>Mapping>Image Texture and everything turns cream colored.

In your Mapping node, it looks like Texture increases the size of your image texture, instead of reducing it, so decrease it or use Point. Also, if you've unwrapped your object, use Texture Coordinate > UV output instead of Generated.


Mesh Analysis - Why the thickness is uneven on sphere? Any reason why are colors of thickness distributed unevenly since it is sphere shape?
I would expect one color.

Your Y-scale factor is 0.189, perhaps this is skewing your expectations.


Animation Nodes - Extract single object from group to perform independent translations I have a simple setup that uses "Objects from Group" to then do some falloff translations on the group.  I need to isolate a specific object in that group to perform an independent translation on it after the falloff translations.

I'm not an expert with AN but after fiddling around with "Loop Through Objects" functionality from the "Objects from Group" node, I have been unable to isolate the object I need from the group using varios "list" and "get" nodes.

Any help would be greatly appreciated.

Let us first simply your node tree into something that is more efficient. Since you are not using matrices and setting the rotation and locations independently, we can use a vectorized Object Transforms Output node to do both. Moreover, since you are only offsetting the location component of the matrices, we can use a vectorized Offset Vector instead. So our node tree reduces to:

If you want to edit the translation of each object independently, you can input the custom translation vectors into the offset input, for instance, we can translate the first and thrid objects in the opposite direction as follows:

What if you want to animate the rotation? Simply offset zero vectors, convert them to eulers and set them to the objects:

Want to implement a non animated offset? Add the offset vectors after the time based falloff offset:


Blender 2.8 stuck on some selection mode - no idea what it is I'm in object mode, there's a circle around the cursor - exactly like what would be there if circle select were active, but it's not active.
Single click on things does nothing, I need to double-click to select anything.
And hitting C simply enables the normal circle select.
I have no idea how to turn it off.
BTW - it only applies to this project, none other. So I think I just hit some key by mistake - Thanks.

Tap the 'W' key.

I'm suffering this problem right now. I was using 2.82 while following a tutorial based on 2.78, and heard "tap W" to get a menu to pop up for doing something.  Nope, not in 2.8 and later. These days, 'W' turns on this permanent circle select mode.


Problem loading custom addon first of all hi to everyone first post !
I've recently (10 days ago) started to learn Python specifically for Blender. Obviously I got eager to try something out and I cant (for obvious reason) find a solution to this problem.
I am an absolute beginner in programming and I don't have the right jargon so please be patient with me if I said something wrong  :).

What I want to achieve is having a custom panel for some extra settings under the Render Tab. I was able to do so and convert it to an Add-on (so I can have it loaded at startup) but my custom operator (that contains 2 actions) doesn't load up together with the Add-on.. I have to manually run the script but in this way I have to do it every time I log in.

I am super sure the problem is with my custom operator since in order to make this script I've basically just dug around other people/template scripts to see how they work.. without knowledge of what I am doing (I just go too excited)

all the help will be highly appreciated

bl_info = {
    "name": "HTML Render Combo",
    "author": "Virgil Sisoe",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "Properties > Render",
    "description": "Quick panel to export Documen HTML",
    "warning": "",
    "wiki_url": "",
    "category": "Render",
    }

import bpy
#DEFINE CUSTOM OPERATOR FOR HTML EXPORT
def main(context):
    # WANT IM TRYING IS TO HAVE A SINGLE BUTTON DOING RENDER AND EXPORT DOCUMEN
    bpy.ops.render.render()
    #DOCUMEN HTML IS AN ADDON I HAVE
    bpy.ops.scene.export_documen_html()

#CREATING CLASS
class SimpleOperator(bpy.types.Operator):
    """Export HTML"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

# JUST COPIED AND PASTED FROM ANOTHER RENDER SOURCE IT IS COMPLETLY WRONG
    @classmethod
    def poll(cls, context):
        scene = context.scene
        return scene

    def draw(self, context):
        layout = self.layout
        return {'FINISHED'}

def register():
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()

#DEFINE CUSTOM PANEL FOR EXPORT
def draw(self, context):
        layout = self.layout

        # ROW COLUMN LAYOUT
        row = layout.row()
        col = row.column(align = True)
        col.scale_y = 3
        row.operator("object.simple_operator", text="Render + HTML", icon='RENDER_STILL')
        #EXTERNAL ADDON (DOCUMEN)
        row.operator("scene.export_documen_html", text="HTML", icon='FILE')

        # LAYOUT EXPORT PATH
        scene = context.scene
        box = layout.box()
        row = box.row()
        row.prop(scene, "documen_folderpath", text="Export Path")
        row.prop(scene, "buttons.directory_browse")

#render tab path
def register():
    bpy.types.RENDER_PT_render.append(draw)

def unregister():
    bpy.types.RENDER_PT_render.re.remove(draw)

if __name__ == "__main__":
    register()

Ive added the .py file

custom_export.py file

There are two register and unregistered functions. When running the script both are registered as the __name__ == "__main__" evaluates to True and use the version of those functions that are defined upon that time

When running as an add-on the full module is loaded and blender will handle the calls to register and unregister functions. After loading the module only the latest version of the register and unregister functions are known. Hence only the custom draw function is registered.

This can be fixed my merging the two register functions and the two unregister functions.

bl_info = {
    "name": "HTML Render Combo",
    "author": "Virgil Sisoe",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "Properties > Render",
    "description": "Quick panel to export Documen HTML",
    "warning": "",
    "wiki_url": "",
    "category": "Render",
}

import bpy
#DEFINE CUSTOM OPERATOR FOR HTML EXPORT
def main(context):
    """for ob in context.scene.objects:
        print(ob)"""
    bpy.ops.render.render()
    bpy.ops.scene.export_documen_html()

#CREATING CLASS
class SimpleOperator(bpy.types.Operator):
    """Export HTML"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
#CHECK
    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

#DEFINE CUSTOM PANEL FOR EXPORT
def draw(self, context):
    layout = self.layout

    # write the layout code below here
    row = layout.row()
    col = row.column(align = True)
    col.scale_y = 3
    #row.operator("render.render", text="Render", icon='RENDER_STILL')
    row.operator("object.simple_operator", text="Render + HTML", icon='RENDER_STILL')
    row.operator("scene.export_documen_html", text="HTML", icon='FILE')

    scene = context.scene
    box = layout.box()
    row = box.row()
    row.prop(scene, "documen_folderpath", text="Export Path")
    row.prop(scene, "buttons.directory_browse")

#render panel path
def register():
    bpy.utils.register_class(SimpleOperator)
    bpy.types.RENDER_PT_render.append(draw)

def unregister():
    bpy.types.RENDER_PT_render.remove(draw)
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()

There are other stuff missing from the file like the "scene.export_documen_html" operator.


How can I clean up Boolean operations? I'm trying to create a mesh as shown in the image. The best way I could think to do this was to use the Boolean modifier, which looks nice shaded flat. However, this creates a messy topology with several large n-gons which causes unsightly artifacts when smooth-shaded.

I was wondering how one could create proper topology from this. Or is using a Boolean modifier the wrong way to go about it? I'm pretty new to Blender and 3D modeling as a whole so I would love to hear how someone more experienced than me would create a shape such as this. Thanks in advance!

I would do it this way:

First apply the Scale on your object because if you've scaled your object in Object mode the bevels won't give anything good.
Only keep the front face.
Use the knife to create quads all over your plane: K to activate, Z to cut through, C to cut perpendicularly.
Make sure you don't have vertices very close to each other, if so use merge, remove doubles.
Extrude.
Give your object a Subsurf modifier and smooth it.
Bevel the drawings edges.
Bevel the border edges.
Cut an edge loop with the knife along the background face (or mirror the front face so that you don't have to work the back).
Clean all the corners.


How to remove Mesh Data of a Blend File? Hi recently I was working with big files in a Blend file now I decided to separate the Objects so well I was able to do that but now I just have one object. But I have a lot of mesh Data.

As you can see I only have one Object in the scene called "Banquita" but It seems that I have A lot of "Meshes Data" inside the Blend file that increases a lot the size.

I already check DataBlocks but there's not option for this, delete the Mesh Data.

Well it was more easy than I thought. Just go to the Outliner, change to the Blender File. There you can see all the data of the actual .blend file

Select all the unwanted meshes and right click Delete .
That's all.


Render Image F12 shows non-existing plane after Boolean modifier I created a hole in the top of my door using a Cube and a Boolean modifier.
I show you several screenshots of my Blender in various Viewuport shadings, where you can see right through the hole, into the blue colored hallway with a lamp in it.

When I press Render image F12, this hole is closed with a plane of some sort.

I do not understand this, in all other 3D views there is no face at all, no plane, it's a hole, why is there a plane visible in the final ender Image?
I updated with an extra image in Solid View where I put the normals view on.
This could explain something?

Thank you!
Regards.

Pictures:

Final F12 render Image shows plane:

Normals view on:

Thank you for posting your question clearly.
1. make sure you have really applied the boolean modifier on your object (lamp).
If you did and you still get a non-boolean operation in your lamp, additional objects may have been created.
2. Go to your outliner and click on your modeled lamp. See if there are any children under the main object.
3. If there are (and surely there will), just click the EYE icon and the CAMERA icon to the right of the outliner icons. Those will disable render view and display view.
Try rendering now.

It is quite possible you have a duplicated object as a result of the boolean operation. But instead you´re seeing the END result object. At render time the original boolean object gets also rendered.

If you find this is the answer, please click the check mark icon to the left of this post, and thank you for your consideration as the answer voting it up.

BFCT_Schiller


How to preserve the main dimension when adding space between elements I’ll ask simple, then explain why I need it. Here’s the idea –
There are 2 squares and rectangles next to them (image below).

The height is 1.795 and their combined width is 5.795. If we add spacing between each element the dimensions for the height and width will be preserved (image below).

Also, the space between the squares is the same length as the space between each rectangle. Now, the snapping tool works well for preserving the main dimensions (shown in orange), but how can I make the spacing the same length between each element? Yeah, I can bevel them, but the squares are supposed to be identical as well as the rectangles.
I need this for creating kitchen cabinets where the main dimensions are already defined. This is sort of a practice where I’ll get serious later on and make some money. There’s no overlapping edges in real life and I believe this is an essential feature for architectural visualization, such as: Desks, Cabinets, Objects next to\on top of each other etc. Is there a way to make this in blender? Any workaround will be appreciated :).

let's start from your exemple with those objects (i'll call them Base):

1st, we create objects (i'll say Spacers), they don't need to have geometry but giving them a shape make them visible and selectable. The important thing here is their origin, it has to be in the middle of the space between the objects we want to control.

The horizontal Spacers on the right have to be rotated 90° on the Y axis in Object mode, because we'll use their local X axis.

Now select 1 of the Spacers RMB and the Base object touching it (in this order) Shift+RMB and enter Edit mode Tab. Select the face touching the Spacer, hit Spacebar to search for Hook to selected object, click it with LMB. Now your face is hooked to the spacer object. Get out of Edit mode Tab. You can move the spacer to check if the face is following as it should.

Repeat the same operations on every Spacers and their  adjacent faces. There are 3 Base objects that needs to be hooked to the same spacer.

Now select the second Spacer, go in constraints tab and add a Copy Scale constraint. The Target has to be the 1st Spacer, the controller. Remove Y and Z axis, choose local space from in 2 Space menus. For this spacer, we'll use an Influence of 0.5. This is important because the concerned Base object will be affected by 2 spacers but the left Base object is affected by only 1, so the scale has to be 1/2.

This one needs an Influence of 1.

The selected Spacers have an influence of 0.5, the others have 1.

Now you can select the Controler Spacer and scale it on it's local X axis with S->X->X and all object should be modified to use the same space between them!

Here is the .blend file


How to properly report Blender 2.8 crash and what files to send? I experience all of a sudden crash of Blender 2.8. I am actually doing nothing and it closes.
I would like to report it properly.
Could you tell what and what do I send?
Where are crash related files?
Thank you!

Blender can open the bug report page for you, and with 2.80 it also automatically fills in the blender build info and operating system data for you. Then you just have to fill in the details of what happened and how it can be reproduced.

Note that random crashes that can't be reproduced would be impossible for a developer to find and fix. The easier it is for a developer to make blender crash, the easier it is to find what is causing it. The more info you can give, including a sample file that can make getting the error easier, the easier it is for the developers to fix.

While the position may change over time, you can find Report a Bug in blenders Help menu.


Import FBX file doesn't appear I'm trying to import this fbx file in blender but the armature doesn't appear (no bones,...) Any idea please why this is happening?

The armature is there, it is huge.
To see it select the object on the outliner and on the 3D viewport press Numpad Period

You might need to adjust the clip start and end for the viewport...

Alternatively use the scale option on the importer to make the size more reasonable:


How to use array modifier with follow path constraint (Cableway Chairs) I am making a ski lift, pictured below. For the chairs, I am hoping to use a mix of an array modifier and a follow path constraint.

I have tried to use a curve modifier, but this offsets the whole thing which isn't what I want either. I would really appreciate any advice on how to solve this problem. Thanks!

A simple Array modifier will deform your object, so you can use 2 methods:

With Follow Path constraint:

Give your chair a Follow Path constraint.
Duplicate your object with AltD (linked duplication), and press Enter so that the copy stays at the exact same position.
Play with the constraint Offset value to place the copy before or after the original object.

With Duplifaces:

Create a curve. Put its origin to its beginning point to make it easier.
Create a plane at the exact same point. This plane will be used as a base for your chair.
Apply the curve and the plane scales.
Give the plane an Array modifier, choose Constant Offset or the Relative Offset value, choose the Count value.
Give the plane a Curve modifier with the curve as Object. The plane should be duplicated along the curve.
Keep the plane selected and in the Properties panel > Object > Instancing, activate Faces.
Parent the chair object to the plane, the chair should be duplicated on the planes.
If you want the chair to stay vertical along the curve, create a single vertex instead of a plane.
To animate, move the plane on the right axis.


How to make face between two layers of irregular pipe How to make face between two layers of irregular pipe. I select edges  of both layers and try to make face but I get the face which closes  pipe instead of connecting these two layers to one wall.

You can use the bridge edge loops option in order to combine the loops.

You can find some additional information on the blender Wiki. In order to get a seamless connection between the two meshes both need to have the same number of vertices otherwise some will have multiple connecting edges.

Link


Unwanted edge outside of the geometry I'm sorry, I'm a blender modeling beginner but I don't know why I have an edge floating outside of my geometry that I can't get ride of. I don't know how it got here. I tried "remove doubles" but that didn't do anything. In edit mode, the edge or the vertices can be selected but not deleted.

Thank you

You have to go into Edit Mode, to be able to delete geometry.

Then, click the selection-box with a line. (Directly below the yellow highlighted line).

After that, you can select the line you dont want and press the "X" key, and select "Edges" in order to delete the unwanted edge.


Why I cannot shorten a GameObject property into a variable? This script intends to show the differences in changing a GameObject property directly...

obj["prop"] = value

And indirectly, it is, with a shortening / variable previously defined...

prop = obj["prop"]
prop = value

The point is: the change works directly, but not indirectly. Why does it happen?

import bge

def main(cont):

    # Basic
    own = cont.owner

    # Sensors
    key = cont.sensors["key"].positive # Keyboard sensor

    # Props
    direct = own["direct"] # If process prop directly (bool)
    prop = own["prop"] # The prop (int, float or timer)

    ############################
    ######## INITIALIZE ########
    ############################

    # Add value to prop directly. It works, showing in debug properties
    if key and direct:
        own["prop"] += 1

    # Add value to prop indirectly (through reference). It doesn't work,
    # as shown in debug properties or through print in console
    elif key and not direct:
        prop += 1
        print(prop)

... shorten a GameObject property into a variable?

what do you mean with shorten?
Game Object Properties
A property consists at least of a property name and a property value (it has an owner too).
Within the BGE you do not have direct access to a game object property. Therefore a property is no object to be used. What you can get is the property's value.
You get the value by key access:
value = gameObject["property name"]

or
value = gameObject.get("property name")

The goal is to get the value. After getting the value the property name is usually not of further interest unless you want to change the property.
Write access means you assign a new value:
gameObject["property name"] = newValue

If the property did not exist before it adds a new one, otherwise it replaces the value.
This way the game object behaves like a dictionary, with property names as keyword and property values as values.
Your question

obj["prop"] = value

These is (as described above) a write access to the property with name "prop". It assigns the object referred by variable value as property value.

prop = obj["prop"]
prop = value

This creates a variable named prop and assigns the value read from property named "prop".
The second line creates a new variable named propassigning the object referred by variable value. The variable of the first line is gone (life time ended).
Investigation
I guess you think you can manipulate properties without using the write access. This is not possible. You can manipulate the value (which is an object) but assigning a new value has to be an write operation.
Example:
Lets assume you have a property called "amount". The value is 5.
gameObject["amount"] = 5

At a later stage you want to change the value from 5 to 4.
How can you do that?
You can't change a 5 to a 4.
A 5 is an int constant. It has no operation to change it's value. So you need to assign a separate value (other object) to the property that represents 4.
The code will be:
gameObject["amount"] = 4

This is a restriction of immutable objects. You can't change them. Immutable objects are string, int, bool, float and more. Basically the basic object types.
What with mutable objects? Here you can manipulate the object as often as you like without notifying the container it lives in.
Example:
Lets assume you have a property called "last position". The value is a Vector(0,0,0).
gameObject["last position"] = mathutils.Vector([0,0,0])

To get the position object you read it from the property:
lastPosition = gameObject["last position"]

now you can manipulate lastPosition as much as you like:
lastPosition.x = 1.2
lastPosition.y = 2
lastPosition.length = 10.3

You do not need to assign lastPosition back to the property. The object is still the same, but with other content.
This "referring" effects do not just apply to game object properties. This applies to all containers e.g. list, dict, even module. They store a reference to a specific object. You can manipulate the object without reassigning. If you reassign the object, you assign the same reference again.
Be aware the variable refers to the property value. Assigning a different object to the variable will not manipulate the property. The container (game object) does not know about your variables.
Negative Example:
lastPosition = gameObject["last position"]
lastPosition = mathutils.Vector([1.2, 2, 0])

The first line:

creates a variable called lastPosition and assigns the property value.

The second line:

creates a variable called lastPosition and assigns a new vector object.
The variable lastPosition of the first line is gone and will be freed by the garbage collector.
The property value still exist, but variable lastPosition does not refer to it. It refers to a different vector object (the one from last line).


How do you make a cycles volume material fade to invisible at the edges? I'm trying to model a spark using Andrew Price's tutorial (Blenderguru), but the sparks always look wrong. You can always see the outline of the ico sphere. I'm wondering if there's a way to soften the outside of the ico sphere (using volumetrics) to the point where it's invisible?

I know that one way to color depending on distance from the center of an object is to add a texture coordinate node, and then connect the object output to a spherical gradient texture node. This is what I have so far:

I know the solution is probably so simple but I've practically been pulling my hair out over this, and haven't been able to find anything about it online.

Apparently using a mapping node with a quadratic sphere texture gives the effect of faded edges... and it looks REALLY nice (especially with some tweaking). The node setup in the image I linked is what I used to get a sun-like fade-off effect at the edges.

If you copy the nodes on the underside of my node setup you should be fine, but one thing to keep in mind is that the quadratic sphere gradient is NOT automatically calculated from the center of the object. You'll have to manually adjust the X,Y,Z location on the mapping node to get the gradient's center to match the object's center. I had to eyeball it.

Also, changing the interpolation of the B/W color ramp in the image changes how quickly the color falls off, so it can blur the light at the edges even more. You can add extra control points to further control this.


How to make character-mesh deform naturally when animating? I have created a character-model in Blender. After rigging and skinning it, I noticed that it deforms in a undesired way. Everything moves pretty much as expected, but the mesh around joints deforms weirdly(Screenshots below).

Why is this happening? Is it due to a low amount of vertices? What can I do to create smoother deformations that look natural?

Character in T-pose:

When his arm is rotated downwards. Look at how thin the upper part of his upper arm is:

Up close:

His upper arm is very thin at the shoulder area, but has normal width at his elbows.

Add edge loops on your mesh  at both sides of a bones joint.

Ctrl+R with the mouse cusror on an edge, click to add one (roll middle mouse button for more than 1), slide mouse to place it, click when it's where you want.

When done, parent your armature again with automatic weight (you'll play with weights later :))


align objects on a surface I got two cube objects I want two align their bottom to be on one surface , like they are buildings on the ground. i dont want to change objects center

You use vertex snapping.

Hold down Ctrl when moving your objects to activate it.


How can I render different scenes at different frames? I have 4 scenes, each of which needs to be rendered at a different frame.  If I go through each scene and set the proper frame in each scene right before rendering it will render the proper frames.  However, after doing this Blender seems to forget the specific frames for each scene and sets them all to the same frame as the scene I rendered from.  So I have to go through this process of manually setting each scene's frame every time I render, which is a royal pain.  Is there a way I can get each scene to render at a different frame and have Blender remember the frames for each scene?

Each scene has a start frame and an end frame in the Scene > Render > Dimensions.  If you set those both to the frame you want, then rendering the animation will render that single frame.

This setting is per-scene.


face.center returning wrong location I wrote and released an add-on and part of the code finds the center of the faces and uses that for other stuff. A user of my add-on sent me this mesh and running this test code:

import bpy
ob = bpy.context.object

for face in ob.data.polygons:
    bpy.ops.mesh.primitive_cube_add(location = face.center * ob.matrix_world)

creates the cubes like this:

They aren't at the right position, doing face.center * ob.matrix_world doesn't fix it either.
The weird thing is that if you do Cursor To Center and then Selection To Cursor and then run the code it works. Any ides why this is?

.blend

The order of operands is important. See matrix multiplication.
face.center is a 3x1 column vector. So swapping the operands

òb.matrix_world * face.center

will yield the correct result.


How can i recreate this orange texture in blender? I have been messing around with noise textures but can't get anything reasonably close to this.

I agree with Duarte, I would use a voroni texture plugged into a normal map. Then use the principled shader with SSS set to 1 or 2.

I used a texture in the roughness slot just to break up the shininess.

maybe scale the voroni texture even more than I did to make smaller divits and then bump the strength up a little more. Possibly invert the bump.