How to show the vertices or edges of the mesh when using subdivision surface? I'm applying the "Subdivision Surface" modifier, and when I change the places of certain vertices and edges, they seem to disappear under the mesh, so I can't see them clearly. Is there something I can enable that will help me see the vertices on top of the mesh?

Try selecting this option:

It will make the effects if the modifier visible in edit mode. the down side is that your edges will be curved.

Selecting limit selection to visible will also make your it visible. The only issue with this is that it can be hard to select the right vertex since all of them, even the ones behind the object are visible.


Play movie, image, or image sequence at specified time? I have a live-action shot of someone holding a gun and fake-shooting. I want to add muzzle flashes with Blender's compositor, so I grab my muzzle flash stock image to overlay onto the shot. How can I make the flash appear at selected points in my shot?

So far the only thing I've found that seems close to this functionality is the Offset option on the Image node when an image sequence is selected, but this just skips frames, it doesn't place the sequence in time.

What I really want to do is decide when a Movie, Image or Image Sequence plays in my composition. How can I do this?

Image sequence

You can specify the frame one which the image sequence starts with the Start frame property of the the image node:

Video file

I don't know of a way to do this with a video file in the compositor (there is no start frame option on the  movie clip node).

Note that this is a very trivial matter in the VSE (Video Sequence Editor) for still images, image sequences and video files:


Blender Vertices Merge Problem I am a using Blender version 2.82 on Windows 10. I'm following this tutorial on
YouTube https://www.youtube.com/watch?v=zHv4VDoCwYc at 28:00 where he merges 2 vertices. However when I try it, it turns out like this:

He is definitely doing it right in the tutorial so the problem lies somewhere in the part you have not revealed any information about - in something that you did differently. The thing to do here would be to redo it all again until it works carefully tracking and keeping all your actions in mind. This is how tutorials should usually be approached.
I guess, you may have double geometry and when you select the vertices, some overlapping vertices remain unselected. You could try to redo the whole part from start or select all and merge vertices by distance first.


Origin rotates but object does not Baffling problem that is a follow up to unresolved problem (Object created by joining several objects doesn't rotate uniformly consistently). This object is created by joining 3 objects..large gear, shaft and small gear. Its rotation is constrained to object in scene that's hidden along with other objects. When I play scene it rotates correctly until I change direction of target object, Then the large gear appears to stop rotating while its origin (denoted by axis and widget) and the shaft and small gear resume rotating.  Here's youtube vid https://www.youtube.com/watch?v=NfXAFHCkRxE&feature=youtu.be

My Blend:

Any ideas?

As already said by @Xtremity in the comments, it is rotating but you don't notice it. Your big gear has 30 teeths, so every 12 degrees (360 / 30) one teeth. Before the short stop, you rotate by +6 degrees every frame, so half a teeth of the big wheel. After the pause however, you rotate by 12 degrees, exactly one teeth, per frame, so you just don't see it rotating.

By the way, you're not rotating in the opposite direction after the stop, it just looks like it.

Rotation in frame 209:

Rotation in frames 210 to 230:

Rotation in frame 231:

You can clearly see, that before frame 210 it rotates by 6 degrees, after frame 230 by 12 degrees.


Scale Interior While Retaining Objects Scale I was wondering if there was a way to take the object in the first picture and increase its interior radius, without scaling the actual rectangles scales.

1x1x2 Blocks

1x1x6 Blocks

If you specifically want to use the scale command you can only do it using modifiers to add thickness, otherwise the scale command will also affect the thickness of the blocks.

Otherwise use the move command instead and move the vertex 2 units in X or Y.


Image textures are only displayed in edit mode I created, unwrapped, and textured an object in edit mode.
However, when I switch to object mode (or try to render the object) the image textures included in the material I created disappear from the surface of the object.  In both cases, Viewport Shading is set to Material.  What am I doing wrong?

Edit mode:

Object mode:

Material node setup:

Thanks in advance!

Apparently this was being caused by a Remesh modifier. Deactivating the modifier fixed the issue.


Unable to Drive Animation from Timeline using Scripted Expression Driver I'm following this tutorial: https://www.youtube.com/watch?v=sfn1MJ3X-dg&list=PLbjn7kaP877u1sX4zl081V8jUeSHDY18G&index=6

And halfway through he shows an example of how to drive the y-rotation of an object via a driver with the script: bpy.context.scene.frame_current

His object then rotates according as he scrubs through the timeline. This doesn't work for me.

He's using Blender 2.8 and I'm using Blender 2.81.

Did scripting change in 2.81?

I'm running 2.81 on a Mac

A simple way around this issue would be to add an input variable with the the scene's current frame, then referencing it in the expression.

Your final setup will look like this:

The steps to set this up are as follows:

Add an input variable
Change the variable type to 'Single Property' (from the dropdown next to the variable name)
Change the 'ID' type to 'Scene' (from the dropdown in front of the 'Prop:' label)
Select your active scene from in the Scene ID property search menu (from default startup you'll only see one scene named 'Scene')
Type 'frame_current' into the 'Path' property
type 'var' (or whatever you've named your variable) into the expression field

Input Variables are the proper way to read from RNA properties when using Driver expressions.  This way Blender knows to update the dependencies and ensure the driver functions properly.


Show current image from node editor on viewport's mesh I can't recall a feature in Blender where the user selects a node from material editor, presses a button and that node's image result will be shown on the mesh in the viewport. What is it and how to get it?

This, I believe, is a feature from the Node Wrangler addon

Never used it myself but it apparently creates a temporary emission shader to act as a texture viewer in the viewport.

Hotkey is Ctrl + Shift + Left Mouse button Click as illustrated in the wiki page by Greg Zaal.


Bevel mess over UV Sphere Liam trying to achieve a vibe over this uv sphere and a cylinder as I did over a cube but when I apply the bevel it messes up the mesh. suggestions welcomed!

thanks!

A subdivision approach would be to let Catmull-Clark do your bevelling

Start with a level of subdivision lower than the one you want to wind up with, and cheat if you can: choose the number of segments in your sphere to fit your chimney profile nicely. Retain a highly-subdivided copy of the sphere in the same place, as a future Shrinkwrap target. Hide it if you like.

Create a 6 or 8-sided circle to be the profile of the chimney, raise it above the sphere, position and orient the profile over the sphere

Knife-Project the circle down on to the sphere

X Delete the faces created by the projection, and ShiftD copy the edges on the perimeter of the hole: raise them in Z and scale to 0 in Z to flatten. Select all the vertices on the surface of the sphere, and create a vertex group from them. Assign a Shrinkwrap modifier to that group, with the intact subdivided copy of the sphere as target.

J or K Cut some edges in the sphere joining the 'loose' vertices of the hole to existing sphere vertices, creating convex polygons, not too skinny or irregular, but don't worry about making all quads.. we're going to let the first level of subdivision do that for us.

CtrlE > Bridge Edge Loops between the hole and the profile, and Catmull-Clark subdivide the whole model once with a Subdivision modifier under the shrinkwrap. We're almost done.  (You can use Loop Tools > Circle to make the profile regular.) If you apply this first level of subdivision, you're all quads. Selecting loops to slide them around becomes easier.

The rest is tweaking, smoothing, Because of the Shrinkwrap, you can move vertices around on the surface of the sphere quite a bit without disturbing its curvature. If you were really fussy, you could create a shrinkwrap target for the chimney, too. The sharpness of the bevel can be altered by sliding / adding / removing edge loops in its vicinity.


Are there more standard patterns besides diamonds which will preserve quad only meshes? In order to bridge two edge loops having an unequal number of edges the diamond pattern can be used. Video tutorials by Jonathan Williamson.

Are there more patterns that preserve the quads?

Steps:

Select 3 vertices (Image 1)
Merge at Center
Select another 3 vertices connected to the ones selected in step 1.
Merge the in 3. selected vertices. (Image 2)
Remove the superfluous (single edge) edge loop (Image 3, to illustrate how the edge flow is redirected)

Usually one can catch such topologycal tricks by watching
the vertices (poles) neighbour count. In your example there
is a cube which has one vertex with 5 neighbour and another
with 3. The following example shows one where these poles
are neighbours. As Hount House notet in his comment,
sometimes they are called N-poles and E-poles.

When avoiding triangles, you can reduce or increase edge amount
somewhere by the cost of doing it somewhere else. In your example
on the same side you loose one and another edge. In my example I
added a new edge in the right side, and had to redirect the loop
Flow to the top. When simply removing an edge loop, you take
one edge from one side and one from the front side.

Generall, when using only quads on manifold meshes, every sub-mesh
of it (for example strangly subdivided planes like these) must have
even number of border edges (only one face connected). So a hole
with odd number of edges cannot be filled with quads.

Maybe I am getting too wild now. I am currently
working on a trees retopology, where you can see,
that I mostly only have the usual poles or E-poles.

A similar example to yours (two edges taken
from bottom side), but with another loop Flow:

Must note the tutorial in this related
question. I Recommend to watch all episode.


Fluid simulation not continuous flow I've a fluid simulation in which the emission object, an icosphere, is moving upwards quite fast. The problem is that the fluid that is emited form balls instead of a continuous flow. I tried to change the velocity of the fluid, but that just make the balls goes faster...

Any ideas?
Thanks!

You can always increase the Timesteps in the Domain which calculates more data inbetween frames to make it smoother which then applies to all fluid objects in the domain.
Or, if you have different fluid objects in the domain, you might only want to increase the Sampling Substeps on the fast moving Flow object (the picture shows the default values for Domain and Flow).

For more details check the Blender Manual:

Adaptive Time Steps
Sampling Substeps


Uses of the 3D Cursor I know the 3D Cursor can be used to position new objects, or snap existing ones to a certain location - but what else can it be used for?

An exhaustive list of every possible use would be great (without repeating similar things like "pivot for spin tool", "pivot for screw tool" - which could simply be said as "Pivot for modeling tools").

Below are some uses of the 3d cursor in Blender with examples

Precise placement of new objects
Pivot for transformations, example - Transforms moving around the 3D cursor?
Pivot for modeling tools and modifiers (e.g. mirror, spin, screw...)
Moving the origin of objects (Ctrl-Alt-Shift-C), example - Change pivot or local origin of an object
A visual placeholder, for example to remember where something was previously in an animation.
Accurate relocation of objects/relocating objects to exactly the same place
Source location for the Clone Brush Tool (Ctrl+LMB to set).


Polygons shifted after random clicking I was following Blender Guru's tutorial when I accidentally went into layout mode. I didn't realise this and clicked a load of random things and this happened:

Can it be fixed or do I need to start again?

Just move the vertices back where you want them in Edit mode. Looks like they’ve been moved only in the X direction so should be simple enough to G (grab), X (in X axis only), drag them back. There aren’t many so shouldn’t take long to put them back.
It’s difficult to give more precise instructions without knowing about what it is you did to mess them up.


Detect short or long mouse event in BGE I am creating a product user interface mock-up, which has a series of buttons which will be navigated using a mouse. I would like to add a timer to one of the buttons to detect short and long button presses (>2 sec) of the left mouse button to set different actions accordingly.

For example:

sensor detects left mouse press > and > scene actuator sets camera to CAM1

sensor detects long mouse press > and > scene actuator sets camera to CAM2

How could I detect /differentiate between these two types of mouse click, and set the corresponding action?

I don't know how to use python, but happy to try with clear instructions : )

Good question! I was sure this is possible with logic bricks only. Check out the *.blend with a minimal example:

There are two actions:

AC_1: Turn cube by 1 Degree
AC_2: Turn cube by 20 Degree

The cube has a property "prop" initialized by 5, which decreased on every positive pulse when the left mouse button is pressed.

The releasing event for the left mouse button is detected by the M_RELEASE sensor and is connected to three controllers doing the following:

Executing AC_1 in case the property was larger than zero
Executing AC_2 in case the property was smaller than zero
Resetting the property back to 5

There should be a lean solution using Python as well. Maybe someone else has this at hand as a Plan B.

Have fun!


Monotone/ desaturated reflection material in Blender/ Cycles Does anybody know how to get desaturated reflection (monotone) made from colorful object? Blue object, white plane beneath. With standard settings the reflection is blue. I would like to have it black and white. I tried adding HUE/SATURNATION node to diffuse or glossy shader (connected into mix shader) but this doesn't seem to work… I know it's possible with compositing but it's a bit tedious…. Any idea?

You can use the Light Path node in your colored object's material.
Then, the object's reflections will be monochromatic.

Connect the Is Reflection Ray output into the FAC input of a mix shader.


Exporting to Collada: Physics don't get exported I added basic rigidbody characteristics to a default sphere in Blender and exported it to Collada but the physics information isn't exporting.

How can I get the physics data to be exported along the geometry?

Thanks in advance.

I'm using Blender 2.68.4

EDIT:

As for Blender 2.68.4 there is no support for physics data to COLLADA :(

Althought it seems that there is already a patch to export physics:

http://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/COLLADA

https://projects.blender.org/tracker/index.php?func=detail&aid=25601&group_id=9&atid=127

This patch was already accepted into upstream so maybe in a near version support for this is added :D

I will leave the question open to notify the ones that favorites this question once this functionality is added.

IN THE MEANTIME:

You can solve this issue by:

Saving the scene with physics in Blender format (.blend)
Importing the .blend file into Unity Engine (free edition)
Use the Unity Collada Exporter to get a fully physics functional COLLADA .dae file.

Credits to Rémi Arnaud.

Assuming you want the motion generated by the rigid-body simulation (not the mass and other parameters), you can bake the simulation to keyframes.

There are two ways to do this:

Method one:
In the Tool shelf (N in the 3D view) > Rigid body tools, press Bake to Keyframes:

Method two:
Press 3D view > Header > Object > Animation > Bake action:


Append Texture Coordinates I have a chessboard object that I've appended to the file. However, no matter what I do I can't edit the behavior of the texture coordinates. 3d Texture view and UV window clearly show the appropriate coordinates, but the render clearly has old coordinates.

I tried deleting the textures and making new ones by selecting the same images in the file browser pop-up(switch-up). No change. I also duplicated the object and deleted the original; 'no change (not sure if all this is silly).

I'll add a link to the file tonight, as soon as I can connect to the internet with the other machine/have access to thumb drive.

are you using cycles, BI, or something else?

For cycles, you might have to add a texture coordinates node.
For BI, you might have to switch the coordinates to be UV in the image mapping section.


(Python API 2.82a)how to pin vertex group with python api how to pin a vertex group in Cloth modifier with python API?

Here's a quick minimum working example with Blender 2.82a and Python:

import bpy

def clear_scene():
    for block in bpy.data.meshes:
        if block.users == 0:
            bpy.data.meshes.remove(block)
    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete()

def make_cloth(vertices):
    """Make a plane at height 0.2m and subdivide. Then, pin vertices."""
    bpy.ops.mesh.primitive_plane_add(location=(0, 0, 0.2))
    bpy.ops.object.editmode_toggle()
    bpy.ops.mesh.subdivide(number_cuts=20)
    bpy.ops.object.editmode_toggle()
    bpy.ops.object.modifier_add(type='CLOTH')

    # Pin the designated vertices.
    gripped_group = bpy.context.object.vertex_groups.new(name='Pinned')
    gripped_group.add(vertices, 1.0, 'ADD')
    bpy.context.object.modifiers["Cloth"].settings.vertex_group_mass = 'Pinned'

if __name__ == '__main__':
    clear_scene()
    vertices = [0]
    make_cloth(vertices)

Note: the clear_scene method is not necessary to get pinned vertices. I just had it there to remove the starting items so that the only thing left would be the cloth.

If this file is called test.py, then run blender -P test.py. I get this when I open the GUI:

Notice the vertex groups shown to the right in the screenshot above.

Clicking the "play"' button to animate the scene, I get this at frame 85:

Unfortunately, it isn't always clear how vertex indices are determined. I would consult this question for further information.


Mesh reconstruction using tracking data I searched around Blender SE, and I have seen no questions down this slant at all, so I'm going to ask it.

Blender uses all the information necessary to successfully solve a track to re-position a camera in 3D space in relation to the tracked footage.

My question is, since all of these "Control Points" get solved to some high degree of accuracy, and become a known distance and angle to the camera, is there any quick way to actually build a mesh from the video track once it is solved (allowing the rest of the texture to become auto-trackable based on commonality between frames - maybe something similar to how microsoft kinect gets used for 3D scanning, but as a post process after the solve of course)?

To maybe add more references of my thought process into something (at hopefully the most simplistic level) most could follow (as you jump into my rabbit hole of theoretical thinking), it would be something like the following image portrays.

If I imagine this fast wiggle as an accelerated fast-forward/rewind view of the footage & solve, my own brain is solving the 3D of this image (even if I close one eye - unlike stereo view).

This leads me to believe that Inverse to a stereo camera (such as a kinect/artec snanner/ etc... - which uses at least two camera's to form a triangle to millions of points in space, and solve their positions) you would have multiple basically solved locations in the space triangulating back to at least a single camera (eg. my one eye open that is pretty stationary OR both eyes open which helps average the solve in my brain I guess, Ultimately the Blender Camera(s)). This effect works so well, because it acts as a POV (persistence of vision - not referring to point of view) to the brain. It just so happens that Blender has this information in the next & previous frame locations in the form of pixel data of the footage, so what's the technical difference in terms of visual memory/persistence?

Also this image is very clean in terms of focal subject and little occlusion, except for at the very perimeter of the sphere. All the rest of the Image Texture is clean and trackable (hopefully with some sort of automatic help in the future).

I've tried this visually/manually from two images, and got some pretty amazing results, but it requires manipulating the mesh in such a way to where the topology in true 3D space & the UV's in 2D space would form the solve to look good.

There is currently no way to reconstruct a more detailed mesh between the camera-solved Control Points from within blender. Thats because the Camera Solver does not look at the image data at all, It only deals with the marker positions. The Control Point-Tracker is the one who finds commonality between frames. So you could just add more Control Points, but you'll of course never get a z-value for every pixel of the frame.

So I see this two ways of achieving, what I think you want:

Manual Scene Reconstruction - this works well with rectangular scenes like rooms, hallways, roads, houses

Blender Movie Clip Editor offers a few basic tools for scene orientation after camera solution: automatic origin, floor or wall plane setup from selected tracks. With this you can line up Blenders coordinate-grid with rectangular objects in the movie clip. In a camera-viewport with the movie-clip enabled as background its easy now to manually reconstruct rectangular objects via extrude on the axes x,y or z. Also, the BLAM Blender addon may be helpful with this process. It also features camera solution from one single image instead of a movie clip.
In the end you can texture the mesh using the UV-projection modifier to project the movie onto the mesh.

Foto Series Reconstruction Workflow - also works with non-rectangular scenes and objects, like reliefs, uneven terrain

Extract ca. 25 frames with significant parallax from your clip (e.g. take every 10th frame), then...

Option A:
Use the free 123D Catch-App from Autodesk to generate the model and export it to Blender.

Option B:
Follow this video tutorial, which describes the workflow of reconstructing and texturing a mesh from a series of fotos using the free programs VisualSFM and Meshlab, and exporting the model to Blender.
VisualSFM is used to reconstruct a 3d-point-cloud from a series of fotos, with Meshlab you approximate a mesh from the points and optionally create a UV-Map with projected parts of the fotos as texture. From there the model can be exported to Blender.


Disable "Extrude region together along the average normal" dragable UI element The yellow circle with the + icon. I pressed something accidentally on my keyboard, but I don't know what. I don't know how to get rid of it either. I suspect it has to do with the "Show Overlays" setting in the drop down above the view controls in the top-right of the view port, but I've tried all the options in there, none of them disable this circle with the +.

in the tools menu on the left side of your 3D viewport press on this icon

Or just press W to select the same tool "Select Box".


How to select all keyframes between two markers with Python I'm very new to Blender scripting, and coding in general, so any help would be appreciated.

Basically I'm trying to create a small addon to help me create smaller actions out of my larger ones by duplicating them and deleting the parts I don't need. I've been able to create a small script to set up markers where I want, but I can't seem to figure out how to select all of the keyframes within those two markers, invert that selection (ctrl + i), then and delete them.

I would iterate through all the keyframes and check which frame they're on. That's the first number in the x.co vector. Then check that against start/end variables which you would get from markers (didn't include this code). If the frame is between start/end deselect, if outside of that then select it.

import bpy

obj = bpy.context.object             #active object
action = obj.animation_data.action   #current action

start = 20 #first marker variable
end = 80 #second marker variable

for i in action.fcurves:
    for x in i.keyframe_points:
        if x.co[0] > start and x.co[0] < end: #check greater than/less than marker frames
            x.select_control_point=False #deselect if in between markers
        else:
            x.select_control_point=True #select if outside of markers


How can i add a text help window and a help button into the 3D View? I have seen in a video form cgcookies that they added a Help button and a Help text box right into the 3D View. How can this be achieved within an Addon?

Been playing around with bgl visualizations for sounds. Used a non modal approach akin to https://blender.stackexchange.com/a/40676/15543  Later on decided it would be nice to have some way to hover over and display information.  Left clicking involved having to keep tabs on the 3dcursor.

Here is a stripped down but working version of where I got to with hover.  Meant to get around to giving "buttons" a state eg mouse_over etc but... Also an alignment eg (TOP, MIDDLE, BOTTOM) (LEFT, CENTRE, RIGHT)

Uses screen area indexes to keep tabs on which area to show help screen.  Button is white when initialised, blue when mouse in area and red when hovered over.  The green help window appears when hovered over.

The modal operator is invoked with 'INVOKE_SCREEN'

Note: you can save settings to the screen datablock, which is a nicely away from prying.

import bpy
import blf
from bpy.props import IntProperty, FloatProperty
import bgl

class BGLWidget:
    handle = None

    def __init__(self, op, context, areatype):

        # Calculate scroller width, dpi and pixelsize dependent
        self.pixel_size = context.user_preferences.system.pixel_size
        self.dpi = context.user_preferences.system.dpi
        self.dpi_fac = self.pixel_size * self.dpi / 72
        # A normal widget unit is 20, but the scroller is apparently 16
        self.scroller_width = 16 * self.dpi_fac

        self.op = op
        self.areatype = areatype

        self.handle = self.create_handle(context)
        theme = context.user_preferences.themes[0]
        self.theme = theme

    def create_handle(self, context):
        handle = self.areatype.draw_handler_add(
            self.draw_region,
            (context,),
           'WINDOW', 'POST_PIXEL')
        return handle

    def remove_handle(self):

        if self.handle:
            self.areatype.draw_handler_remove(self.handle, 'WINDOW')
            self.handle = None

    def draw_region(self, context):
        # check validity

        self.visualise(context)

    def draw_box(self, x, y, w, h, color=(0.0, 0.0, 0.0, 1.0)):
        #bgl.glDepthRange (0.1, 1.0)
        bgl.glColor4f(*color)
        bgl.glBegin(bgl.GL_QUADS)

        bgl.glVertex2f(x+w, y+h)
        bgl.glVertex2f(x, y+h)
        bgl.glVertex2f(x, y)
        bgl.glVertex2f(x+w, y)
        bgl.glEnd()

    def visualise(self, context):
        # used to draw override in class def
        pass

class Button:
    def __init__(self, x, y, w, h, color=(1,1,1,1)):
        #draw a box
        self.x = 0
        self.y = 0
        self.w = w
        self.h = h
        self.color = color

    def __str__(self):
        return "Button %s" % str(self.color)

    def __repr__(self):
        return "Button %d %d color(%s)" % (self.x, self.y, str(self.color))

    def in_box(self, x, y):
        return (self.x < x < self.x + self.w
                and self.y < y < self.y + self.h)

class ButtonWidget(BGLWidget):
    help_screen = -1
    buttons = []
    screen_buttons = {}
    def button(self, w, h):
        # add a new button
        b = Button(0, 0, w, h)
        self.buttons.append(b)
        return b

    def visualise(self, context):
        if self.help_screen > -1:
            print("HELP", self.help_screen)
            if context.screen.areas[self.help_screen] == context.area:
                self.draw_box(0, 0, 10000, 10000, color=(0, 1, 0, 1))
                context.area.tag_redraw()
        for b in self.buttons:
            self.draw_button(b, context)

    def draw_button(self, box, context):
        m = [i for i, a in enumerate(context.screen.areas) if a == context.area]
        if not len(m):
            return None
        key = "area%d" % m[0]
        b = self.screen_buttons.setdefault(key, Button(box.x, box.y, box.w, box.h, color=box.color))
        b.x = context.region.width - b.w - self.scroller_width
        b.y = context.region.height - b.h - self.scroller_width
        #print(b.x, b.y, b.w, b.h)  # debug shows box coords on draw
        self.draw_box(b.x, b.y, b.w, b.h, color=b.color)
        #self.screen_buttons[key] = b

    def mouse_over(self, screen, area_index, x, y):
        key = "area%d" % area_index
        box = self.screen_buttons.get(key, None)
        if box:
            area = screen.areas[area_index]
            if box.in_box(x, y):
                box.color = (1, 0, 0, 0)
                self.help_screen = area_index
                area.tag_redraw()
            else:
                self.help_screen = -1
                box.color = (0, 0, 1, 0)
            #self.screen_buttons[key] = box
            area.tag_redraw()

class ModalOperator(bpy.types.Operator):
    """Move an object with the mouse, example"""
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    def modal(self, context, event):
        def in_area(area, x, y):

            return (area.x < x < area.x + area.width
                and area.y < y < area.y + area.height)

        screen = context.screen
        mx = event.mouse_x
        my = event.mouse_y
        #print(mx, my)
        areas = [i for i, a in enumerate(screen.areas) if a.type.startswith('VIEW_3D')
                 and in_area(a, mx, my)]

        for i in areas:
            a = screen.areas[i]
            region = a.regions[-1]
            x = mx - region.x
            y = my - region.y
            ui.mouse_over(screen, i, x, y)
            if event.type == 'LEFTMOUSE':

                print('PRESS in screen["%s"].areas["%d"]' % (screen.name, i))
                #click events ???

        if event.type in {'ESC'}:
            # dont have to remove the UI here

            ui.remove_handle()
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

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

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

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

if __name__ == "__main__":
    register()

    # create a UI
    context = bpy.context
    h = 50
    w = 200
    ui = ButtonWidget(None, context, bpy.types.SpaceView3D)
    button = ui.button(w, h)
    for a in context.screen.areas:
        if a.type == 'VIEW_3D':
            a.tag_redraw()
    bpy.ops.object.modal_operator('INVOKE_SCREEN')


Advanced Rigging For Robot Arms/ legs IK I build a Robot working on Gears, Chains and Pistons and I'm trying to rig it with IK for the legs and Arms but I'm stuck.
the arm/Leg is supposed to work as such:

first part(shoulders) need to rotate around itself only
Second part (ArmTop) need to rotate at Z pose only
third part (ArmBTM) need to rotate around himself only
forth and fifth part (Arm and forearm) is the IK

When the 1,2,3 parts need to follow the IK So if The Arm wave Hello for example :

first part will rotate a bit
second will rotate up
third will rotate as the arm

if it was in FK it was (1=Y19.5 / 2=Z-119 / 3=Y-70 / 4=X-25 / 5=X-12)(the last picture)

I don't know how to add a file so if you want the Robot file for you to try on it explain how to upload file on here and i will add it

if there is anything you can help
Thanks A head
Omer

when you have an bone set to use an IK constraint, every bone in that chain enables the Inverse Kinematics tab, found in the bone properties (almost down the bottom)

Here you can set limits on the XYZ axis of each bone. the X and Z axis limits show up in the display as a red and blue circle. Y doesnt show up as Y is rotation along the axis of the bone.

using axis limits does cause some popping, so you will want to use a Pole target for the IK constraint to allow better control.


Python script to align object to edge or two vertex coordinates I want to align an object to an edge via Python.
I have an edge in the 3D space, the edge has a rotation, euler or quaternion, like a 3d object, but this edge is part of an object.
I want to copy the rotation of the edge to a external object (like a cylinder).

This seams like what I want, but the result doesn't work.
Align Object to Vector using python

I've found the solution. To align to edge direction, you can use the script in this link: Align Object to Vector using python

But for the vector you must use Vector = Vector2 - Vector1 where the Vector1 e Vector2 are the coordinates in vector of the verts of the edge.


How do I save an instance of a custom class to a .blend file? I've created a custom class which creates a new object, loads a mesh from an .OBJ file, then modifies the mesh based on the scene's current frame number. When I create an instance of the class (via the Python console), everything works fine. I'm able to successfully import the .OBJ file and changing the current frame produces the desired effect on the mesh. However, when I save the .blend file and restart Blender, the mesh is still in the scene, but the instance of the class is gone. I have to delete the object and re-create it with the Python console.

Is there a way to save the instance of this class as part of the .blend file?

I've been dealing with a similar problem; I have a number of instances of custom Python classes defined during the execution of a custom Python script, and I'd like to be able to maintain (or restore) references to these custom class instances even after the script has finished running, or after Blender has been closed and then later re-opened.
The simplest solution I've found so far is to use the standard Python pickling module, extending the base pickler and unpickler classes to build picklers that know how to recover 'persistent external references' to Blender objects. This isn't as nice as saving the custom class instances as part of the .blend file itself, but does allow me to save the custom class instances whenever my script is run, and to later unpickle them with correct Blender object references. With a few minor changes to the script, this lets me optionally run the script multiple times while actively modifying the same class instances, without losing them in between script invocations.
To illustrate what I mean, here's a simple example of a custom class instance with active Blender object references I'd like to be able to pickle to a file and re-load later:
>>> class example():
...     def __init__(self, obj, ex_dict):
...         self.obj = obj
...         self.ex_dict = ex_dict
>>> ex = example(bpy.context.object, {1:2, "dog":"cat"}

By default, I can't pickle this:
>>> with open("example.pickle", 'wb') as f:
...     pickle.dump(ex, f, pickle.HIGHEST_PROTOCOL)
...
Traceback (most recent call last):
  File "<blender_console>", line 2, in <module>
TypeError: can't pickle Object objects

But I can write a custom pickler, unpickler that know how to store and revive references to 'persistent external (Blender) objects', like so:
>>> class BpyPickler(pickle.Pickler):
...     def persistent_id(self, obj):
...         if isinstance(obj, bpy.types.Object):
...             return ("BpyObj", obj.name)
...         else:
...             return None
...
>>> class BpyUnpickler(pickle.Unpickler):
...     def __init__(self, f):
...         super().__init__(f)
...     def persistent_load(self, pid):
...         type_tag, type_id = pid
...         if type_tag == "BpyObj":
...             return bpy.data.objects[type_id]
...         else:
...             raise pickle.UnpicklingError(f"unsupported obj with persistent id {pid}")

And with these changes, I can now successfully pickle and unpickle-with-restored-bpy-obj-references my class:
>>> with open("example3.pickle", 'wb') as f:
...     BpyPickler(f).dump(ex)
...
>>> with open("example3.pickle", 'rb') as f:
...     ex3 = BpyUnpickler(f).load()
...
>>> ex3
<__main__.example object at 0x000001BD0C4013C8>

>>> ex3.obj
bpy.data.objects['floorPanelSharpCorner.007']

>>> ex3.ex_dict
{1: 2, 'dog': 'cat'}


is .blend file size proportional to the unit settings? i have created tire treads for my car.added bevel,subsurf,array and simple deform modifiers to it and saved it.file size shows 1286 kb. but when i applied all the modifiers to make it a single mesh and saved it, the filesize goes to 140,541 kb.my unit setting was inches and scaling was 1.0 . the size of the tire was 20.4 X 20.4 X 6.37 (in inches ). my question is why filesize goes this high after applying those modifiers ?? will it make any difference if i change the unit settings like inches to cm or scaling to .01 or change both, and then recreate the mesh ??
i am working on 2.8 beta.

It comes down to the information needed to describe the scene.

When you have modifiers, you only store the input mesh and the settings of modifiers. So in the case of subdivision modifier (for example) you save only the low-polygon mesh and a number indicating how many subdivisions there are. When you open the file, Blender generates all the subdivided vertices and displays them - they are kept in system RAM when the file is open, but not saved when you save the file.

When you apply the modifier(s) all that generated geometry becomes real - you can change each vertex individually. The information how to generate all that is lost because the modifier is gone. So when you save the file, Blender needs to save all the geometry.

Unit settings have no effect for file size, you are saving the same amount of values. The values themselves are just different (instead of saving the number 1.5 you save 3.81 - inch vs cm). Blender stores all these numbers as 32bit floats so no matter the value they occupy the same space in memory: 32bits = 4 bytes for each.


Single a single material across several objects with individual control Is it possible to share a single material across several objects but have control over some aspect of the material (e.g. factor on a fade node) on individual objects. Each object can be associated with an individual FCurve. I am currently building N identical materials for N objects, but its getting old. Thanks.

Select the part of the material that you want to share and make it into a group with ⎈ CtrlG. Use the group in each material with any custom nodes you may want for the object.

Using a group you can connect any inputs you want so that each material can use different values to customize the material for each object, while the nodes in the group stay the same.


wind / pressure inside a volume? with blender's simulation system, is it possible to simulate s.th. like an airdancer, a party horn, or the blowing up of a balloon?

is there a way to create a force field that – when placed inside an object's volume – creates air pressure / flow and only acts on the surrounding mesh? (as opposed to the wind force field, which works globally, which is why it does not matter what its actual location is.)

Simulating actual airflow and pressure would require complicated fluid dynamics simulation - but you could simulate the effect using Soft Body physics.

Create you mesh and add Soft Body in the Physics properties.

Select the vertices that you want to tie to a fixed point (eg, the ground) and assign them to a new Vertex Group. This will be used to pin them in place so that the mesh is anchored.

It is then just a matter of adjusting the Soft Body properties to get the desired effect, simulating the lack of air pressure by reducing the Soft Body Edge Spings and applying the pressure/air flow by increasing the Edge Springs.

The Soft Body Goal pins vertices in place - set the Vertex Group to the group created to act as the 'anchor' and increate the Strengths and Stiffness to force them to stay in place (otherwise they'll be allowed to drift from their start points).

Decrease the 'Bending' Soft Body Edges setting to allow the body to collapse and increase it to "inflate". You may need to adjust the other settings to get the desired effect.

To prevent the mesh from collapsing too far, set the Edge and Face collision checkboxes and enable Soft Body Self Collision. You might want to change the Self Collision settings to prevent the mesh folding too far into itself and/or change the Soft Body Solver settings for a more accurate simulation if it's behaving erratically (eg, reduce the Error Limit).


How can I select the faces that haven't been UV mapped yet in a model? I've manually UV mapped some of the faces in a model (ex. with "Project from View"). But now, I want to just do a "Smart UV Project" on the rest of the faces. Is there a shortcut to select the faces that haven't been UV mapped yet? It'd be cool if there was a faster way besides manually selecting and deselecting faces.

Selection in the UV origin

Each UV map always contains the UV island relative to each face: if they hasn't been unwrapped yet the way I imagine, you'll find them collapsed in a point in the origin of the UV space (0;0).

In the example above only the upper part of the head has been unwrapped. The black dot in the center of the 2D cursor are the island of all the other faces.

You just have to take advantage of any of the selection tool (e.g. Box-Selection) while keeping UV and edit mode mesh selection in sync.


How to generate a normal map from a bump map? I want to generate a normal map from a bump map in Blender. It is possible to do it with Crazy Bump (you need to flip it in Y to make it compatible with Blender), i want to reproduce the result in Blender.

Here is the Source:

And the result:

In Cycles, you can do like this :

create a plane and unwrap it
add a material to it, like this in the node editor, from left to right : UV input node, your source image, a bump map vector, connected to the displacement of the material.
The result image (on the right) is added and selected in order to be baked to.

Now go to the render panel, in the bake section : choose bake type = "Normal", and click "bake".
Here is the result :

The blend file :


Retopoflow needs an update? So I would like to use Retopoflow for Blender 2.8 but it requires an update by the looks of it, so I searched around for a solution but no luck. Any idea on how to update it? Thanks for your time.

Retopoflow is an add-on that is still in heavy development, and the authors would need to do the work to update it since there are many changes in the way Blender handles graphics now, as well as API changes for python.


Cycles lighting Principled BSDF differently on CPU and GPU working on a scene right now, where I used Substance Painter for a simple plane and plugged all my maps into the principled shader.

Turns out the scene is lit differently when rendering on CPU or GPU.
That results in flickering which is not tolerable.

The scene is exactly the same, I saved it and only changed the render device.

The scene uses filmic color management and seems fine otherwise, only the objects with the principled shader are affected.

I had to censor the character, sorry.

Any help would be appreciated.

OK I found the answer, really stupid mistake.

I had direct light clamping on 10 and it did really weird things where light sources would be randomly clamped out.

I could re-render the same frame several times and achieve different results each time.

I just turned it off now.


Exporting Cycles Sky to skybox images I followed a tutorial Adding Clouds to Blender Cycles' Sky Texture on how to generate a nice sky in Blender with good  results.
Now I want to  export the sky as 6 images for making a skybox in my game engine (Esenthel). I tried with rotating the camera in the six directions needed( front, back, left, right, up and down) and saved the renders, but that didn't work to good as I got visible seams when applied in my engine skybox.

Do anyone have an advice on how to do this export correctly?

You can UVmap a cube and add a Glossy Material to it.  Set the Roughness parameter to 0.0
Add a Sub-Surface Modifier to the cube and set it to about 4 iterations, this helps for baking the Glossy Shader properly.

Add a texture node to the material so the sky can be baked to the UV Coordinates.

Now invert the faces for the cube so they face inwards. This should work as a SkyBox.

If you want the sky to be available in a GLSL shader as a reflection map then you may want to pay closer attention to how the UV's are laid out since a game engine may have specific layout requirements for skybox/enviroment/cubeMaps.

Here's some reference on how to code a cubemap using a runtime technique that was published by nVidia, it uses nVidia CG which is a shader language that is compatible with both OpenGL and DirectX.

https://web-beta.archive.org/web/20160408223256/http://http.developer.nvidia.com:80/CgTutorial/cg_tutorial_chapter07.html

And the source code to go along with the CgTutorial

https://developer.nvidia.com/cg-toolkit-download


I made an IK foot bone and it moves the entire body while bending the foot. Anyone have any idea's why this is happening? Here's the file if anyone needs it so they can help figure out the problem, thanks.

You need to reduce the Chain Length to 2, so that only this bone and the thigh move, otherwise the IK also makes the Lower_Body bone move, and therefore the whole armature.


Python and Blender. Why does any editing on my box create a new box? So im pretty new to this. I'm using python on blender and i created a box with this code
import bpy

bpy.ops.mesh.primitive_cube_add()
box = bpy.context.active_object

box.location[2] = 4
box.location[0] = 2

The issue is, when i run the code blender creates a brand new cube and moves it

So lets add line-by-line comments to your code:
# Import bpy tells Python you're using the Blender main library
import bpy

# create a brand new cube
bpy.ops.mesh.primitive_cube_add()

# make 'box' a reference to the active object
box = bpy.context.active_object

# set the box's z location to 4
box.location[2] = 4
# set the box's x location to 2
box.location[0] = 2

As you can perhaps see from the comments, every time you execute bpy.ops.mesh.primitive_cube_add(), you're going to get a new cube. Removing that line means you will move whatever object is active. You could explicitly move the default cube with:
 box = bpy.data.objects['Cube']

Where 'Cube' is the name in the outliner.
You can also move the box using a vector like this:
 box.location = (2,0,4)


hooking cloth to cloth I want to pin two cloths together like the beginning of a second rope.002 to the end of a first rope.001.   If I use a hook (pin rope.002 vertex group "top-end" to rope.001, it seems incomplete (and doesn't work), like I need to specify what vertex group on rope.001 to hook "top-end" vertex group on rope.002.  I'm guessing that I need to do some sort of Hook-Empty to a tail-end vertex group, and then some sort of rigid-body Constraint?

And per Nathan's suggestion I think it went over my head.  Here's a screencap and a blend file:

A hook modifier uses additional methods to determine what gets hooked.  It only affects vertices that have been assigned to the hook.  One way to do this is to use "hook to new object" operation (or any of its siblings, ctrl h in edit mode for me) which will automatically assign all selected vertices to the hook.  If you want to just do it manually, you can; enter edit mode on the mesh, select the vertices you want hook, and click the "assign" button on the hook modifier.
Vertex groups work in addition to this.  If you tell the hook modifier to use a vertex group, it will only affect verts that are both assigned to the hook and assigned to the vertex group (to the extent that they are weighted to that vertex group.)


Does an HDR environment texture affect the Shadow pass? I am compositing a scene using a standard process in Cycles, and it worked correctly as long as I had my lighting setup in the scene, however when I switched to HDR, my Shadow pass seems to become a solid black. Why is this, and how can it be avoided?

My node setup:

The HDR environment does not affect the shadow pass. At all. The problem originated with the removal of the lighting setup.

In other words, the shadow pass only supports lamps. Mesh lights and world lighting will not affect it. See Why does the shadow pass not account for mesh lights?


skin become dark after render in cyle render I just used a blender. I need to ask why the skin turns black after switching from the material display to the rendering display, even though all the light is already bright, here SS. Thanks


Realistic Light Reflection I have an object that I'm trying to recreate in Blender. It's a bookmark with lights in it, and I'm trying to get it to have the correct light bounces.

I'm trying to get it to look like this, where the light gets trapped at the edges of the glass and reflected inside. But when I tried making it, the results looked like this.

The light doesn't get reflected from the edges of the glass but it escapes. I wonder if there is a way to create it so the light looks like how I want it to.
I used area light to light up the glass. For some reason, I had to put the light source inside the glass. If it were to be a little bit behind the glass, no light would get through even after I made a hole for the glass to insert in the wooden section. I also increased the light intensity for that render because if I didn't, the light wouldn't reach the end of the glass. The max brightness I could set is about 1 W before the red starts overpowering the upper part of the glass in false color mode

I'm extremely new to Blender, so please don't use any weird Blender terms.

Fake
In edit mode select side faces and assign material with Emision Shader.

Realistic
This glass plate consists from three materials:

front/back side with Glass Shader
bottom side with Emission Shader
top/left/right side with Glass Shader but now with Roughness 1


Are Groups or Sketchup-like components feasible in Blender? Apart from testing it myself, I've seen a few posts here and there, including from Sketchup users like me, sort of circle around this topic but never ask this question directly.
How can I overcome these problems in DupliGroups or Collection Instances?

moving its origin seems to require moving to World origin (and using up a layer for clarity) <=> linked meshes have their own local origin which I can move data around in Edit Mode (easy enough)

It is impractical to link up DupliGroup data to previously created meshes because the origin mismatch as above, and the mesh data that remains in it and needs to be deleted somehow

Linked meshes don't have the above two problems (can be 'blocked in' and then detailed up all at once) but I can't add objects to them, only faces. Say I'd like to add handles as linked meshes, because handles are used elsewhere in the model too.

How feasible would it be to make a linked object type with deeper hierarchy?
Say an object that would look at its children and simply make every other instance have the same children. It would also mean dragging and dropping in outliner would be the simplest way to manage it by the looks of it.

The  Dupligroups or Collection Instance workflow in Blender are indeed a bit unorthodox, and somewhat different from other applications (like so many other things in Blender), but not any less capable.
TL,DR
The gist of it is that in Blender group definition and group usage are two separate and distinct procedures all together. This means you can't directly edit an instance of a group/collection, nor can you generally define a group directly from its constituting parts at target location.
Explanation
Dupligroups or (Collection Instances for 2.8+) are a way of creating bundles of independent objects that are grouped together and can then be deployed as a single object or stored as a library for later reuse. In most ways similar to AutoCAD Blocks, Sketchup Components, or 3DsMax Groups.
Unlike most other programs however, group definition and group use are completely separate in Blender, that means you define a group with a set of included objects but they aren't 'converted' into an instance of that group, nor is a group directly created from them at present location. They always remain as a separate editable "originals" you can go back to to modify, but never directly use nor actively participate in your actual scene.
In much the same way an instance of that group is generally an independent object chosen specifically as duplicator that generally has no other geometric data or geometry associated with. The group/collection instance is also not editable, merely a dummy used to mirror what was defined above.
Suggested Workflow

In a work file (or even a separate 'library' file if you wish to reuse them later or in different files or across projects) I usually create a new separate scene exclusively for "group definition" where I create your "group originals". In 2.8+ with the advent of Collections, you can simply create a separate "master collection" (called "Instances" for example) inside which you will place all your "originals" and define your groups or components. In your particular case that would be where you would place the window frames.

Those objects can then be grouped (with Ctrl+G for 2.7# or moved into individual sub-collections with M) and they can belong to several distinct groups/collections at once even (say one same window with a handle other with hinges and all possible combinations).

Each group/collection has by default it's own origin at the scene's center (coordinate $0,0,0$) but this can be adjusted to accommodate several group definitions in the same scene but keep their individual origins in a convenient place relative to their participating objects. If you go to the Properties Window > Object Tab > Groups (Collections for 2.8+) you can set a different origin for each group (use the option Set offset from Cursor for easier adjustment).

You can also create nested groups, or groups instances inside groups
if you wish to have several modular reusable components that are
repeated and combined often in different ways.

Adding instances to a scene
In your actual work scene where you want to use your group instances just access the add menu Shift+A and choose your group from the last menu entry Group Instance. This will list all available instances (both local and linked) in a searchable menu.
Group instances are generally used from an Empty type of object by default that doesn't have any mesh data or geometry of it's own. Only exception is if you want to create a non renderable dummy geometry as helper object for snapping or correctly placing the dupligroup in a scene. For 2.8 this is mandatory, instancing from other object types has been deprecated.
Adding objects to existing groups

Select all newly added objects you want to add to an existing group,
then Shit-select an object already in the desired group,
making sure both remain selected, but the object already in the
group remains the active one.
Then press Ctrl + L > Groups to match the
groups from active to all selected objects.

Advantages and Disadvantages
By keeping group definition and group use separate you gain some and you loose some.

You can't edit instances in place.

You can't really add an object to a group directly through it's
instance, you always have to go back to the original and do it there; changes propagate automatically to all instances.

You do avoid trouble with object offsets, since they were safely
preserved and well defined at source.

Editing in cluttered scenes can be made easier by separating the two actions.

Same objects can participate in any number of groups/collections
saving some resources.

Creating groups with similar features or variations is made more
modular and less repetitive.


Set all selected objects to be displayed as wireframe I have positioned blocks as a rough draft of the area I plan to build.

I did this with the high-poly models and high-res textures but I have to replace them all with the low-poly, low-res version of the basic building block.

So now, I have to duplicate the low-poly many times and move them all into place and I would like to use the high-poly scene as a guide for rotating and placing the new assets.

However, it will be very difficult to do this if they are all shaded and the same problem will happen if they are all in wireframe.

I'd like to be able to select all the objects from the high-poly scene and change the view for them to be wireframe without having to do each object separately.

If we press Ctrl+L, a menu will pop-up that allows us to transfer attributes to several models all at once so my question is this:

Can we do something similar with the Draw Mode setting in the Object Properties?

Yes.

Select them all and set the Max draw type to wire.

Right click on the max draw type menu and select Copy to selected.

This works for many buttons and settings across blender.


My Scene bpy.types.Panel appears on all tabs I created a simple bpy.types.Panel to allow modification of custom scene properties, wanting it to appear only on the Scene property tab, and thus created it like this:

class MK8PanelSceneCourse(bpy.types.Panel):
    bl_label = "Mario Kart 8 Course"
    bl_idname = "SCENE_PT_mk8course"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"

This works fine, and the panel appears on the scene property tab as expected:

However, I noticed it also appears on every other tab. Here's an example with the World tab, where it's even the World name textbox:

How can I make it appear only on the scene tab?

It looks like I forgot to set up the bl_context member of my panel. Sadly, the documentation is not very clear about the possible values (it would be great it if someone could list them and link it in a comment).

For the scene tab, the panel code would be:

class MK8PanelSceneCourse(bpy.types.Panel):
    bl_label = "Mario Kart 8 Course"
    bl_idname = "SCENE_PT_mk8course"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "scene"


GTX 1070 8gbs Rendering In Cycles Out Of Memory I don't quit understand why my blender is running out of memory. Is this memory for the GPU or The CPU.

GPU:GTX 1070 Armor 8gbs

CPU:i7-6700 4.00ghz

Ram:16gbs

Scene Info, Verts:1,601,803 Faces:1,422,392 Tris:2,844,680 Image Size 1920X1080
1200 samples
I am trying to make a house with trees and grass around it. I am not using volume scattering, I used subsurf on quite a few objects in the scene and I have no clue about bit size or depth.

Picture of Scene.

One screen the only card in the system and I am using windows 10

Once you have an ambitious project that goes beyond what the hardware can do... well you will run out of resources. Even 8 gigs of vRAM is not a lot (some of the resources are also not available since the card is also being used for the images on the monitor or monitors)

Every element in your scene uses some memory. Once you add it all up, the demand for resources can easily push beyond what your GPU can handle.

Multiple Particles systems for grass, leaves and such will eat up a lot of vRAM in no time. Large textures and multiple subsurf modifiers among many other things can also use a lot of resources.

You have many non exclusive options:

Simplify your scene (reduce the number of vertices, particles and subdivisions, use smaller textures, bake complex shaders into simpler materials, etc). Can you get rid on unseen elements? How much detail do you really need in the final rendered scene?
Split the scene in different components that are manageable by your system and composite them later into a single image.
Render on CPU, probably slower, but you are not limited by the amount of memory on the GPU anymore, and even if you run out of RAM the system can probably use some form of Disk Cache...

Part of the art of 3D is dealing with the reality of your computing power. Time- Low cost-Quality... choose any two at the expense of the third one.

In an ideal world we want to render using all of the best settings with unlimited detail... but for all of us with a limited budget and limited lifetimes, we have to learn to optimize.


python - Creating an addon, what am I doing wrong? I'm trying to make an addon in 2.81 and for some reason I'm getting this error:

register_class(...):
Warning: 'dp.clear_menu' doesn't contain '_MT_' with prefix & suffix
register_class(...):
Warning: 'dp.ui' doesn't contain '_PT_' with prefix & suffix

I have no idea what "dp" is. Here's the link to what I have:

https://github.com/kojocrash/Blender-Weld-Plugin

I'm using Visual Studio Code to run & test my addon and it got fixed for one of these 3 reasons:

I ran VS Code as an administrator
I reinstalled python (but checked the PATH option)
I installed the ptvsd as done in this video


NURBS surface from branching curves? I'm looking for a way to do something very similar to the technique using the skin modifier, but with NURBS. In other words, I'm looking for a way to do something similar to a convex hull, but not necessarily convex. I want a tree-like meshing with custom branch morphing.

Example with skin modifier:

With surfaces, the make segment command f doesn't allow to do branching.

Extruding a nurbs curve only works with uniform extrusion (unless I'm mistaken), meaning you cannot morph from, say, a circle to an oval. You can only uniformely reduce the size of the extrusion shape.

Python code is welcome as an answer.

Initial curves describing the volume:

Desired meshing from NURBS:

Make segment unwanted result:

Blender is not known or marketed for its NURBS support, it is primarily a polygon modelling tool. While we have great modifiers like the Skin Modifier you mentioned, we don't have anything out of the box that would produce comparable NURBS surfaces.

A scripted solution also seems a bit beyond what is convenient to do in Blender, the API has limited support for generating arbitrary patch shapes that would be needed to do your Question justice.

I'd like to be proven wrong someday, or today, but for now I'd like to offer this as an interim answer and not just a cheeky comment. There are better tools for generating NURBS, consider freeCAD or any of the other free CAD/NURBS alternatives.


Unreflectable greenscreen-plate (Sorry for my ill English skills)

Hi, I'm working with an animation including the television seen in the picture. The TV's "cover-material" (don't know what it's called) is an aluminum texture that has the ability to reflect other objects (of cause).
Anyway, The screen itself is green because I would like to use it as a greenscreen to edit later on (in another video editing software). The problem is that the green plate reflects in the aluminum, which makes it look very weird when replacing the greenscreen.

My final question... Is it possible to make that one object (the screen) "unnoticed" by other objects, so that it doesn't have a reflection?

If you have another way to solve the problem, that could work too...

In my opinion it makes no sense to generate CG elements to be color keyed out when you can generate the perfect matte directly as an Alpha Channel.

In real life chroma key is used because there is no way to generate transparency and occlusion information directly using a camera. No need to replicate such laborious and imprecise workflow when generating CGI.

You can use to use a Holdout shader.

  The Holdout shader node is used to create a “hole” in the image with zero alpha transparency, which is useful for compositing

Enable Film>Transparent and Save the image in a format that supports an alpha channel (like OpenEXR) and composite in other software with no further processing other than distorting the image to match the perspective of the screen. If you save in a format that does not support alpha then you can save the black and white alpha information as a separate file and use that to key the image.

If you absolutely must use green, because you love doing things the hard way, or with extra work, then you can use a shader that is only visible to the camera but transparent for the rest of the scene. It will not create any reflection or unwanted green spill in any of the surrounding surfaces. Using a Light Path node and using the Is Camera Ray to control the mix of shaders will allow you to do what you want.

The downside of both of these approaches is that the image on the screen will not affect the rest of the scene in any way, making the integration less realistic. A monitor is an emissive surface that would both illuminate and be reflected on other objects. The most realistic way to do this would be to integrate the image as part of the material used on the screen directly.


Geometry following a curved object I was looking for a way to snap one object ( wooden plank ) in a rounded surface ( sphere ).
actually i'm using a shrinkwrap modifier but the result is not what i want..

I would like that the wooden plank follow the curve of the sphere like the brick follow the curved surface in this picture.

I hope I explained myself.

create a 2D lattice and match it with your tile
use the Lattice modifier on the tile and assign the create lattice
parent the tile to the lattice
add the Shrink wrap modifier to the lattice
Enable Snap to Face on your target object
move the lattice on the target object.

Play around with shrinkwrap offset, lattice resolution and subdiv modifiers to tune it.


How to avoid doing physics simulation and get the final rendering quickly? I'm super new to Blender and I hope I'm not offending others asking this. I am baking physics using the method described here and then do the rendering using the code below. However, it takes a while for the simulation to take place and I only care about the final status of the system/simulation. So I was wondering, is there a way to shortcut the simulation and only get the final status/scene?

self.scene.render.filepath = output_name
logfile = '/dev/null'
open(logfile, 'a').close()
old = os.dup(1)
sys.stdout.flush()
os.close(1)
os.open(logfile, os.O_WRONLY)

# do the rendering
if simulate:
    bpy.ops.render.render(animation=True)
else:
    bpy.ops.render.render(write_still=True)

# disable output redirection
os.close(1)
os.dup(old)
os.close(old)

Thanks

No, it needs to calculate each step through the animation to make sure that the physics are correct.  There is no way to "cut in line."

Think about it in terms of a stream of marbles across a plane in Blender.  If (theoretically) you could calculate the end frame, you would image a line of marbles moving along.  But due to calculating the end frame, you missed the fact that a cube slid across the path, pushing marbles out of the way.

Blender needs to calculate every frame to make sure physics are correct.

If you already know the locations of the objects you want on the end frame, then I recommend just placing the objects there.


How to layer images and create alpha transparency? I've created two node maps (or whatever they're called), one of which layers image textures on top of each other...

And another which allows the transparent parts of the images to be properly rendered...

But, when I try to combine the two, I notice something's missing.  Specifically, I don't know what to plug in to the "Fac" slot on the Mix Shader.

I've tried connecting everything from every other node, but it either screws up what I've already done (for example, certain textures disappearing) or does nothing.  I'm pretty new to this, so I have no idea what I should do.  In fact, the node maps were taken from some tutorials I found.  Any help would be appreciated.

Good news!  I managed to figure it out.  I found this thread here, recreated the node map in the last picture on that thread, and lowered the emission strength so the villager wasn't blindingly bright.

Edit: Turns out replacing the Emission node with a Diffuse BSDF node works as well.  Good to know.


Movie clip node as mask I am trying to do something simple but i encountered a problem i can't resolve. I am using a movie clip node as a mask  which last 30 frames in the compositor. For the 30 first frames it works well but right after the 30th frame the movie disapear. I would like to make the last frame of the mask movie clip last to the last frame of the render movie.

Thank you.

Instead of using a movie clip node use an Image Sequence node (you can also load videos in it)

Then you will have control of how many frames to use, at what point in time and offset.

To hold the last frame just untick the Cycle box

See these related links:

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

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


How do I stop both my path animations starting at the same time? Hello I have been having trouble animating a scene. I know how to make the cars follow the path but my problem is that both of them start at the same time. The red car starts at frame 1 but I want the truck to start at frame 300. How do I do that? Thank you

The option Fixed Position let you control the position of the car from the starting point of the path (0) to the end (1).

To animate the position of the truck, go to frame 300 and set the value to 0, then press I to add a keyframe.
Do the same for the last frame of the animation and set the value to 1.

This method allows you to use the same path as a "Follow path" constraint for multiple objects.


What is the difference between Translucency and Transparency? I have been wondering this for a while. What is exactly the difference between a translucency shader and a transparency shader?

Transparency allows light to pass through without refracting or scattering it, while translucency scatters light to some degree.
What the manual says about the Transparent shader:

Transparent BSDF without refraction, passing straight through the
surface, as if there was no geometry there. Useful with alpha maps for
example. This shader affects light paths somewhat differently than
other BSDF's. Note that only pure white transparent shaders are
completely transparent.

The Translucent shader is more like a Refraction shader with a high Roughness and an IOR of 0 (no refraction) It is also a little bit like an SSS shader in that light is scattered when passing through. (The main difference between the two is that the translucent shader scatters light more uniformly)

To visualize this using the manual images:

The Transparent shader lets light straight through:

The Translucent shader scatters light:


assign color polygon python API how can I assign colours to a specific face/polygon in the python API? I have found a way of creating materials, but how can I use them through the API on chosen polygons of an object? Does an object have to be fully covered with a material before you can change that of individual parts?

Thank you for your time!

The mesh doesn't have to be fully covered with a material, but it does have to have material slots(at least two) if you want to be able to change individual parts.

import bpy

obj = bpy.data.objects['Cube']
mat = bpy.data.materials['Red']
mat_slots = obj.material_slots
polys = obj.data.polygons

#add a material slot using a material
obj.data.materials.append(mat)

#remove material from material slot
mat_slots[0].material = None

#add the material slot that will be used for individual face
obj.data.materials.append(mat)

#apply material to one face
polys[0].material_index = 1


I can't get Object Index to give me a clean Luma Matte. Please Help! Why is it that I can't get a clean looking Luma Matte from either Object Index or Material Index Pass. As you can see in the example I provided, I do have anti-aliasing checked in the ID Mask. What is it that I'm doing wrong here? Or does it even work? Please help!

My guess is you are only rendering at 50% resolution. At 100% resolution it will look sharper.

1920 px x 1080 px at 100% is probably fine for video.

If it's for a still image go crazy and try something like 6000 px x 4000 px at 100%.


Is there a way to change the phase of a wood texture? Is there a way to change the phase of the wood texture that is used for a Displacement Modifier?


Is it possible to set all characters in a text object to capital regardless of input? I am currently using an addon to serve the value of a .txt file to two different text objects, which works great. I want to force all characters to capital though, and am unsure about how I would do that given the current data flow. I am open to using a completely different addon/script to do this, sadly google didn't turn up any results.

In your script after you have created your text object and are in edit mode for it just run these two commands.

bpy.ops.font.select_all()
bpy.ops.font.case_set(case='UPPER')

That will convert all the characters in that text object to upper case, but leave it all selected.

If you want to have your text unselected (still in edit mode) run this command after the two above

bpy.ops.font.move(type='LINE_END')

Documentation on the font operators.

Here is an example script that uses the operators above to get a string from an external text file, convert it to all upper case, and make a new text object in.

import bpy
data = ""
with open('path/to/file.txt', 'r') as file:
    rawtext = file.read()
f.closed

bpy.ops.object.text_add(view_align=False, enter_editmode=True, location=(0.0, 0.0, 0.0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.font.delete(type='ALL')
bpy.ops.font.text_insert(text = rawtext, accent = False)
bpy.ops.font.select_all()
bpy.ops.font.case_set(case='UPPER')

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

This script gets a string from an external text file, converts it to all upper case, and makes a new text object in blender; same as the script above, however this one does not use ops which will have better performance.

import bpy

#get letters from file
file = open('path/to/file.txt')
rawtext = file.read()
file.close()

#create new text curve and object
curve = bpy.data.curves.new("curve", 'FONT')
text = bpy.data.objects.new("text", curve)

#add uppercase letters to text curve
curve.body = rawtext.upper()

#add text object to scene
bpy.context.scene.objects.link(text)


i am stuck on how to weight paint my human character using the rigify add-on i am trying to weightpaint my character. I have used the riify add-on to rig it. I do not know what the relationship between the rigify rig and weight painting is. Do i paint on the human meta rig? I am trying to make it so that i can control my character using the rigify rig. I know how to weightpaint the human meta rig but i am unsure how to approach it with rigify. Help would be really appreciated as i am desperate to get animating after making this character for so long! Thanks!

The metarig is only used to lay out the bones on the mesh. I recommend a tutorial if you're not familiar with Rigify.
Place the character model so that it stands on the "ground" (soles of the feet at z=0). Make sure you have applied All Transformations (scale, location, rotation) to the mesh with Ctrl+A (in Object mode) before you start. The bones of the elbows and knees should be bent slightly.
When you're happy with the layout, apply All Transformations to the metarig, then press the Generate Rig button. You can use this button more than once. Rigify can override the generated rig. See section button Advanced Options.
The Generate Rig button creates the actual rig. It's just named "rig" and has all the control bones and deform bones (layer 30) on different layers.
After you have created the generated rig you can parent it to the mesh with Automatic Weights and test it in Pose mode.
There might be some issues that need to be fixed.

The fingers might need some corrections. To make the fingers "grab" you need to scale the red handle. If it doesn't work proper have a look here: Rigify finger controls rotation not moving correctly

The eye lids you might have to weight paint manually. And you need to parent the eyeballs to a bone of the rig to make them follow the control. Video: Fixing the Metarig - The SECRETS of RIGIFY: Part 3 and Weight Painting - The SECRETS of RIGIFY: Part 4! - [Blender 2.8]

The teeth and tongue might need some weight painting


Mixamo import edit clothing textures Thank you in advance for any help.
My question is regarding editing the colour of an mixamo armatures clothes.
I looked up some related questions and could not find anything that helped me.
I don't think this should be difficult but I have spent countless hours just trying to change the colour of the clothing of an import from mixamo.
I can't find anything that explains how to do this.
I am relatively new to blender and I'm looking to import a mixamo character that has a suit on and I'd like to change colours of clothing items.  I played around with materials and nodes but could not figure it out.  I'm hoping there is a simple way to change colours.  I was able to apply some colour changes with texture painting but none of those changes were permanent.  They did not show up if I went to render or animation render.
Thank you for any help!

Okay, so I figure out a solution for now.  I was able to use texture paint and switch to vertex mode to paint each part of the armature (shirt, body, tie, etc..)
These changes were permanent.   FYI it is not as good as textures but I am still trying to figure out how to change the colour of the original textures.  If I figure it out I will update.


Engraving with Displacement maps I want to engrave a drawing into a mesh.

I UV unwrapped the mesh exported the UV layout and textured it.

Now I don't know how I can get it into the displacement of the material. I already changed the displacement do Displacement Only but when I plug the texture into the height of a Bump Node which is connected to the displacement everything goes to hell.

You can try using the "displacement" node, check screenshot below.
Please keep in mind that you'll need a mesh with many faces to see any results.

Feel free to share your original file here if this answer is not helping you:
https://blend-exchange.giantcowfilms.com/


Is it possible to use a custom shape for proportional editing? I'm trying to add perspective to a picture however, I would like the proportional editing tool to affect only a certain part of the plane I imported. So, is there a way to pull only a specific zone (not a perfect circle), while using the the proportional editing?

Or is there an other way to easily add perspective?

Another method would be to select all vertices that should not be affected and hide them temporarilly H.

It could be easier to select the vertices that should be influenced and invert the selection I.


How do I see what is using Memory? During the creation of a recent project the amount of memory used by Blender inflated to a massive(!) 11.8GB while attempting to render.

This makes rendering on GPU unusable for me (no Titan X's here).

How do I see what is filling up this memory?

Open a Command Prompt window and navigate to the Blender application folder (e.g.  CD "C:\Program Files\Blender Foundation\Blender")

Start Blender with the command blender.exe --debug.

You can now see memory usage by pressing Spacebar and searching for Memory Statistics.  This will produce a detailed list of memory usage in the command window used to open Blender:

total memory len: 46.457 MB
peak memory len: 55.115 MB
slop memory len: 5.271 MB
 ITEMS TOTAL-MiB AVERAGE-KiB TYPE
   223 (  13.936    63.992) subsurf arena
  1498 (   8.520     5.824) BLI_Mempool Chunk
     4 (   5.881  1505.508) CDNormal
    14 (   4.996   365.455) imb_addrectImBuf
     1 (   3.000  3072.000) OCIO GPU 3D LUT
    39 (   0.923    24.242) Chunk buffer
  3779 (   0.914     0.248) PropertyRNA
     1 (   0.874   895.125) CDMloopCol
     2 (   0.750   384.016) eh buckets
...


Light dots Animation Nodes I'm a novice in using Blender and I have to create with the animation node's addon
a 3D graphic effect of "connecting dots". In detail: a certain amount of spot spreaded randomly in a dark space become illuminated without an order. In a second time all those spot light begin to link together randomly with emitting segment that starts from the spots themselves.
I need to develop the correct node map.
Thanks to everyone who would like to help me.

First, instance a sphere a certain number of times and position them based on a number of random vectors.

Then, we create a material for those objects such that its emission color is initially zero and randomly increases to become one. The random output of the Object Info node ranges between zero and one, if we subtract one from it and clamp the result, it will be zero, if we add one to it and clamp the result, it will be one. So if we add to it a value that animates from negative one to one and clamp the result, we get the result we are looking for. The animating can be done through the Cycles material Output and Animate Float nodes.

Then, we will use the Find Close Points node to create connections between the dots.

Finally, by animating the Bevel End of the splines, we can make them grow as follows.


Exporting fbx animations includes Garbage (UE4) When I export the animation as fbx for UE4 there are lot of garbage animations some of which are 2 frames long and others are same length as the required animation.

Once I made a walk cycle of 180 frames with 30 fps and the exported animation was 40MB!!!
Lot of it was garbage animation in which the mesh was just twisted and deformed like hell, but my correct animation was somewhere among them.

So can anybody tell me how to avoid it? or how to manage and export multiple animations as fbx? I don't know anything about actions or NLA nor can i find any proper tutorial on it.

what i do is make the animation using keyframing , ik and directly select the armature and mesh and export is using FBX with selected objects , baked animation ,all actions ,NLA strips checked in export.

Please understand that I'm not trying to render animation in the blender but I actually want to export it , so I am looking for how does actions and NLA editor work in relation with fbx export

Please guide me

Even without Rigify you get junk animation tracks. At least I get in my own hand made armatures. But what I do is keep an eye open in the NLA editor if there is any animation on objects I remove their tracks.

I'm gonna try and explain NLA and also FBX export to UE4 here, at least as my workflow goes.

I always create new action before I start animating to keep the "root" timeline clear. Open Dopesheet Editor, and switch to Action Editor (yellow cube icon). In this case Jump_1_End. Once done click the (F) to make a fake user and then the dubble down arrows (in NLA editor or to the right in header) This will save the Action to a NLA Track (you can rename them, something better than NLATrack.001 etcetera. I did rename my NLA Tracks to my Action Set name.)

Export to FBX, I use the default settings exporting both Action and NLA Tracks as separate Anim Tracks in FBX file.

You can check your export in Autodesk FBX viewer, I do this often to check that export from Blender and import in UE4 is correct. Somehow Unity can read .blend files and get Action animations without pushing down to NLA tracks and no junk data. How they do it, I don't know. I wish UE4 could read .blend files also :)

Anyway here you can see junk anim tracks, try and clean up in Blender by removing animations on objects etcetera and just have NLA track and Armature animations. To keep the junk animations to a minimum.

Drag and drop, or import how you want. But drag-n-drop requires you're hovering a couple of seconds with the FBX file in the Content browser. Once loaded (just went with default settings, it could find the skeleton and all) I clean up and remove the unwanted animation tracks. This works for me, in time I might find a better way. It's not super beautiful, but it gets the game done.

in the NLA Editor in blender you can stack and repeat animations this is good for checking loop points and maybe just have a overview of your animations before exporting. I use this for mock-ups sometimes. You can also blend NLA Tracks when doing longer animations, but in this scope. Game asset creation, you kinda just want to have each Action set in a separate NLA Track layer to get all animations into UE4.

To check your animations on your armature mesh, or skeleton mesh in UE4 you need to make a animation blueprint with simple blueprint logics, there are other tutorials on the internet on this and since it was not your question check unreal engines youtube channel.


Wind force field only works in the center of the scene I am playing with cloth waving in the wind and I have the problem with positioning the force field (wind). It would only affect the mesh (cloth) geometry if the mesh is positioned in the center of the scene. Put in other words, if I move the force field to a different location (so that it could not affect the mesh) the mesh still waves in the wind. If I position both the force field and the mesh to a different location so that the force field would be aimed at the mesh, the mesh is not affected by the force at all. Waving only works when the mesh is positioned in the absolute scene center no matter the actual position of the force field. I am attaching the .blend file where you will find the cloth in the absolute center and the displaced wind source. The cloth is still waving. Is this a bug or am I doing something wrong? Thank you.

The Wind force field gives a constant force in a single direction. It's like a Sun light but emitting force instead of light, so You can imagine it as an endless flat plane emitting force.It's a global force. You can change only direction of it.
I checked your file and everything seams to be ok. It worked wherever I put cloth or wind source, so when You noticed it's not working You must've not back the animation to start position.


Hardops + Blender 2.9 Support https://gumroad.com/l/hardops
Can anyone confirm if the HardOps (2.8) addon is compatible with Blender 2.9?

Current version of HardOps (00986_MercuryX_24) works with Blender 2.9. You might have to restart Blender before it starts working.


Getting really fine details without taxing too much VRAM? Alright, so I've used Photoshop to create a displacement map for some tire tracks going off trail (A crashed truck)

Blender registers this fine using this node setup:

I also have Displacement set to "True" in the material settings (So it actually displaces the geometry of the mesh, not just a bump map).

Now I am trying to figure out how I should SubSurf it. I've watched BlenderGuru's video on using Adaptive SubSurf modifiers, which seems like a really convenient way of achieving what I'm going for. Using the following settings produces the following results:

From what I know, having the dicing scale set to 1px should subdivide the mesh again every pixel, correct? That should mean a perfect output, right? So why does the one simply using a SubSurf of 5 look better?

Right now it almost looks like something out of the Lego Movie. I guess it could be the displacement map, but I don't think that's the case because the displacement map is 4096x4096, and I blurred the displacement map to avoid jagged edges this seems to produce.

I've hit a wall. I have 6GB of VRAM (GTX 1060) and 8GB of RAM, so I need to be conservative with my geometry. If anyone want's to look around and see if they can find a solution, I've included the .BLEND:

The 1px adaptive displacement is the more accurate one. The reason you see it as worse is because it exposes your displacement map for what it is: an 8bit file (and one with an odd value range at that).

Your standard 8bit integer images store values as integers (whole numbers) from 0-255. That means an 8bit integer displacement map has only 256 possible height levels. Worse, your map is very low contrast. The 'blank' value is 128 (I think you might have another misconception here, see below). The lowest value I could find in a quick check is 108, meaning your entire tire track has only 20 different heights in it. Obviously, you're not going to get smooth gradients over only 20 possible heights!

Unfortunately, painting in Photoshop is rasterized immediately, so you'll have to repaint in a 16 or 32bit file to fix this. Even just using 16bit gives you 2^8 more height possibilities than 8bit. And remember, you were only using about 1/10th of the 8bit range. So make a solid white 16bit file, and paint some tire tracks with a heavy hand, the deepest point in the track should be close to black.

Above I commented on your use of 128 as a "blank' value and recommended using full white on the repaint. The reason for this is how Cycles interprets the displacement height. Cycles' displacement system is designed around floating point inputs, and simply takes the value given as literal distance. Meaning the "blank" value is black, and negative numbers need to be used to displace downwards. Simply Photoshop isn't really conducive to painting negative values, it's easiest to paint in a 0-1 range then just subtract 1:

As far as memory savings go, this answer of mine might be useful as well: Render fails at tesselation with out of memory error


Wanted: Cycles "Shadow Only" Lamp - Not a simple "shadow catcher" question Hey BSE, thanks for reading!

I'm working on a project in which my scene is brightly lit solely by world surface emission.  This creates a stark, bright "ambient light" or "global illumination" look, with subtle shadowing in corners and tight spaces.

This was exactly what I was asked to achieve and everyone's happy - until the project lead asked for interesting shadows.

My task now is to:
1. somehow introduce shadows that can be cast by a lamp in a normal, intuitive way.
2. force those newly-shadowed areas to be darker than they should be given the ambient light.
3. ideally, prevent those lamps from adding any light to hit surfaces.

The problem is two-fold:
1. The lamp which casts these shadows should not necessarily add light to the objects it hits.
2. The shadows cast must be much darker than the ambient temperature of the shadowed surfaces.

I'm convinced there is a clever way to achieve this in the compositor, but I'll be darned if I can figure it out.

Can someone help me learn to achieve this illusion?  A push in the right direction might go a long way.
My humble thanks,

Edit: Added Screenshot: http://imgur.com/kBekWjy

Use two different render layers

Put the "lamp" on a separate layer and Exclude that layer from the render by clicking on the corrisponent box in the Layer panel.

Your scene now should be affected only by the environment's light (and eventually other light sources, but not the mentioned "lamp").

In the second render layer, uncheck the Use Environment box to remove world's shader influence. The result is a scene lit by the lamp only. Enable this this time the Shadow pass in order to acquire the info about where the shadow fall.

Finish by color mixing the Composite pass from the first render layer with the Shadow pass from the second with Multiply option. Use the Factor slider to adjust the influence of the lamp's shadow in the final image


How to tell if an add on is present. Using Python I want to add a button to a script that will detect if an add-on is present and then enable additional options if it is. I'm not sure how to go about locating this in python itself. But I think this would work better than having options that boot into an error if the add-on isn't present.

for example:
if addon_prefs.automirror:

Wouldn't I need to be more specific to query the add ons folder?

import addon_utils

addon_name = 'some_addon'

success = addon_utils.enable('some_addon')
if success:
    print("enabled", success.bl_info['name'])
else:
    print(addon_name, "is not found")

addon_utils.enable returns None if it failed to enable the addon, but returns a module reference (which evaluates to True) if it did manage to enable it.

The precise name of the addon is either:

the .py name if it's a single python file addon,
the directory name if it's directory based

Sometimes, especially prevalent with github .zips, the addon name is suffixed with -master. The addon name would then be 'some_addon-master'.

over the top, addon seeking

bpy.utils.script_paths() returns a list of directories where Blender looks for add-ons. With a bit of python-fu you can iterate through them and find any .py or sub-directories that contain part of an add-on name -- Then try to enable it :)


Blender Texturing Problem, cant figure it out im trying to get this work now since almost 1 week and i cant, im watching serveral Videos etc.. nothing can help me (beside this, there is no video for something like this , at least i couldnt find any),

so now i try to get help,

i got this Wall on the Right, i try to Copy it to learn, i got all the Textures the Person used for it but i still cant get it work, nothing fits together, im cluesless tbh.

(Im a hobby Coder and now since a certain time im trying to get 3D Art done and no its not easy but im putting so much time in it and it doest work out :S)

You need a texture coordinate node and a mapping node.

It might be wise to use a Principled BDSF also.

I couldn't check if it was correct because the images were not packed into the blend file but this was the first thing I saw.

Also in your Diffuse Shader, there is a normal input where your normal map goes if you still prefer to use a Diffuse Colour node.
Purple coloured slots use vector information.
Gray coloured slots are for black and white images/info. So the displacement slot on the material output is only really good for grayscale Displacement maps.

Let me know if that works for you now :)


Select sharp edges what's the angle value in the manual

here is what is said about the "selecting sharp edges" command:

  This tool selects all edges between two faces forming an angle greater
  than the angle value, Where an increasing angle selects sharper edges.

Ok, but what's the angle value then?

I tried to play with the angle value in the data tab of the properties editor (with autosmooth on), but it doesn't seem to affect my selection, so what is it? is it a fixed value internally coded?

You determine yourself the value on the bottom of the 3D view Tool panel (on the right of the 3D view, activated with T). Every edge with an angle above this one will be selected.


FPV camera inertia/movement I'm trying to make a sci-fi short movie. I have a camera inside the cockpit of an helicopter, and I would like to have some inertia or a small movement when the helicopter moves. Right now I have a camera parented to the helicopter, but it stays fixed as you see here:

https://www.youtube.com/watch?v=L-lN1HLvJDk

I like to have some movement when the helicopter turns or banks, like in this Star Citizen trailer:

https://www.youtube.com/watch?v=-rQDDc7Pxlc

All you have to do is animate the camera too. You're already animating the helicopter to displace the camera. Now animate the camera to give it the desired details, as if the person inside was moving its head.

There might be a script or something to do it automatically, but seems to me like it would be actually more complicated.


Image offset only applies to single frame and not to metastrip I put a series of images in the Video Editor but they get scaled to fit the render size. To prevent that i click "Image offset" and that puts the original dimensions back. However it only does it for a single image frame.
If I metastrip the image sequence and apply "Image offset" to it, the dimensions are not brought back.

So I would need to apply the option to every single frame manually....very inconvenient.....is there some command to apply the setting to every selected frame?

Note: I tried scaling up the strip to the correct ratio, but i notice a signficant loss in Image quality, when comparing 2 identical strips with the 2 techniques..the Image offset retains the frame detail, while scaling up degrades the image..

You will need to activate a Sequencer addon, that comes included with the official Blender download.
Extra Sequencer Actions https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Sequencer/Extra_Sequencer_Actions

Change one image to the Offset value you want, then select all the other images and include the changed image last, eg. shift right-click to make this last one active.

Go down to the Strip Menu in the VSE timeline and select Copy Properties > Input - Image Offset

Now all of the other images will inherit the setting from the active strip.


Pros and Cons of Branched Path Tracing To start, I am familiar with What is branched path tracing and how is it useful?

That answer is great, but I am wondering with all the pros of Branched Path Tracing, like...

Splitting rays
Advanced control over sampling
Reducing fireflies
Overall greater realism

...it seems that there are no cons, yet Path Tracing is still the default. I guess what I'm asking is why shouldn't I use Branched Path Tracing?

I've tested tens of scenes using BPT and regular PT and so far there are no major cons at all when using BPT.
Some somewhat minor issues would be, knowing how to tweak the settings manually and slower viewport refresh during the first few samples (samples in BPT are slower)...

Other than that the its easier to test your models using regular PT and at the end of your scene switch to BPT when you know all the details of the shaders you are using...

As far as CPU vs GPU it seems to work the same, meaning it always beats regular PT, at least in all my tests, probably older (2015-2016) versions of Blender had no advantage using CPU, but as far as newer versions (2.78 and up) it is the better.