How to UV map low res textures. So what I want to know is how to UV map low resolution textures. When I was exporting my UV layout it said the size of the UV layout was going to be 1024x1024 but I need the textures on my model to be 64x64. I was wondering if I put my 64x64 textures inside this 1024x1024 UV map in an external image editor then re-imported that UV map with my textures, would that keep my textures 64x64? I doubted that so that's why I'm here asking how to UV map low res textures. I'm new to using blender so sorry if this is a really nooby question.

I think what Duarte was trying to say is that the resolution of the textures doesn't matter for the UV layout. UV coordinates are bound to the mesh, not to the texture.

You can create a 1024x1024 texture in blender, then resize it in whatever image manipulation software you use. For example I tend to create quite hi-res textures (4k and above) in blender, baking them and later resizing them in gimp to whatever size the final result should have. The only problem is that you are losing detail on your texture map, the UV layout fits perfectly, though.


How do i texture a long cylinder without so much stretch? I have a long cylinder that i am texturing. The texture becomes really stretched because of the long length of the mesh. Is there some way or setting to fix this or is it all about resizing the UV image/tile the texture/finding a higher resolution texture etc.

Edit: Maybe some tricks or tips for the process of texturing theese kinds of things is also much welcome!

Thanks, much appreciated!

I find that if you're UV-unwrapping the mesh, you need to make sure to apply the scale on the mesh before unwrapping. Do this by selecting the mesh and pressing CTRL+A, then click "Scale" on the popup menu that appears. When that's done, re-unwrap the mesh:

Note: you can also apply the Rotation and Location if needed, and it's generally a good idea to apply Location, Rotation, and Scale on  your mesh before doing things like UV unwrapping, texturing in general, physics effects, particles, etc.


Zoom in camera viewport As you can see in the picture in the camera the red bordered rectangle is what the camera sees. How can I zoom in to this rectangle without changing the camera viewport/settings.

Use the scroll wheel, it exist a short cut that is somthing like klick+Shift+Ctrl or klick+Alt+Ctrl and drag.
In the N menu remove lock camera to view.


Is there an easy way to create a model with multiple texture inputs and then easily switch between them? I created a model in blender and wrapped it with two custom images, I want to be able to toggle between each wrap. Is there an easy way to have two inputs for the wraps and then turn one off/on?
I used uv mapping in order to wrap the model.

In Object Properties tab add a custom property:

Right-click its value and choose Copy As New Driver:

Go to your shader and put a Mix RGB node as a switch between the two textures, right-click its Factor input and choose Paste Driver:

In 3D Viewport select your object (in Object Mode), press N to open the Numbers panel, expand Properties section and change the property.


Uneven bevel width in Blender 2.82 I'm getting weird uneven bevel width then trying to use bevel tool (ctrl+B) on those 3 edges in the edit mode. Scale, rotation, and position are applied, everything is 1 1 1 in the item's transform.

Never have this strange behavior in Maya, is it that Blender's bevel algorithm just can't work with this type of geometry?

Normally Id suggest checking normals and non manifold geometry for anything causing trouble.

However I did a little mockup and found that simply blender doesn't support it. I did hear stuff about miter options that might change this stuff in the future, but I recommend using the knife tool with cut through or a loop cut if you want more straight loops.


Why are the following manual instructions not working (render/freestyle/export_svg)? Just installed blender and need to generate an SVG file, but am not seeing the add-on that the instructions mention.

Thanx, Alan

This add-on is under the community tab in your user preferences>add-ons.
 Search for freestyle and it will come up


How to create a button on the n-panel? I would like to make a custom button on the N-panel.

I already went through blender's templates and amended the ui button script to 2.8 but I don't understand where and how I should implement my code into the template.

Also I would love to be able to remove doubles and display the current vertex count next to it before and after the operation:

import bpy
context = bpy.context
scene = context.scene

bpy.ops.object.select_all(action='SELECT')

for ob in scene.objects[:]:
    bpy.ops.object.editmode_toggle()
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.remove_doubles(threshold=0.02)
    bpy.ops.object.editmode_toggle()

Q: How can I add a custom button with that functionality on the N-panel?

I suggest start here: How to create a custom UI?

To extend the Properties Area of the 3D View you can either register a custom panel to add UI elements onto or you can append elements to existing panels.

1. Panel

Blender comes with a few UI templates (Text Editor > Templates > UI ...) . I'd suggest start with UI Panel Simple ui_panel_simple.py and use it as base to work on. You just have to edit its default variables in order to display the HelloWorldPanel as part of the properties panel:

Set bl_space_type to 'VIEW_3D' to make it part of the 3D View
Set bl_context to eg. 'mesh_edit' or 'objectmode' to either match Edit or Object Mode

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Sub-Panel in the Property Area of the 3D View"""
    bl_label = "My Tool"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "My Tools"
    bl_context = "mesh_edit" # "objectmode"

The HelloWorldPanel comes with a predefined draw method where you can edit the layout as well as adding UI elements to the panel. More interestingly: You can easily add existing operators like bpy.ops.mesh.primitive_cube_add() to the panel by calling the operator() method on the layout element like row.operator("mesh.primitive_cube_add") without the namespace (bpy.ops*).

row = layout.row()
# bpy.ops.mesh.primitive_cube_add()
row.operator("mesh.primitive_cube_add")

row = layout.row()
# bpy.ops.object.origin_set()
row.operator("object.origin_set").type="GEOMETRY_ORIGIN"

To pass multiple arguments read: How to pass multiple operator properties via UI layout?

2. Operator

If you want a custom function assigned to a button, you'll have to create a new operator. Blender comes with operator_simple.py template which is easy to understand. In most cases it's enough adding your code to the execute method, which will be called when the button is pressed.

def execute(self, context):
    my_variable = "Hello World"
    print (my_variable) # Prints 'Hello World' to the Console
    self.report({'INFO'}, my_variable) # Reports 'Hello World' to the Info Area
    return {'FINISHED'} # Return the execution is finished

If you want to call another operator as part of the operation like bpy.ops.mesh.remove_doubles() which only works on meshes, it's a good idea to limit the scope to mesh objects using the provided poll method, even if the operator is only accessible in Edit Mode because otherwise the operator is still callable using the Search Menu (F3):

@classmethod
def poll(cls, context):
    obj = context.active_object
    return (obj is not None and obj.type == 'MESH')

def execute(self, context):
    # Your code here
    bpy.ops.mesh.remove_doubles(threshold=0.02)
    # ...
    return {'FINISHED'}

Also read: What do operator methods do? (poll, invoke, execute, draw & modal)

If you want to display the vertex count after mesh.remove_doubles, you can store the vertex count before calling the operator and then report the actual result:

def execute(self, context):
    obj = context.object
    verts_before = len(obj.data.vertices)
    bpy.ops.mesh.remove_doubles(threshold=0.02)
    verts_after = len(obj.data.vertices)
    result = verts_before - verts_after
    self.report({'INFO'}, "Verts removed: {}".format(result))
    return {'FINISHED'}

3. Registration

Register your classes properly, add your operator(s), labels, and properties to the panel:

import bpy

class MY_OT_custom(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        obj = context.active_object
        return (obj is not None and obj.type == 'MESH')

    def execute(self, context):
        # Your code here
        # ...
        bpy.ops.mesh.remove_doubles(threshold=0.02)
        return {'FINISHED'}

class MY_PT_custom(bpy.types.Panel):
    """Creates a Sub-Panel in the Property Area of the 3D View"""
    bl_label = "My Tool"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "My Tools"
    bl_context = "mesh_edit"

    def draw(self, context):
        obj = context.object

        layout = self.layout

        row = layout.row()
        row.label(text="Active object is: {}".format(obj.name))

        row = layout.row()
        row.prop(obj, "name")

        row = layout.row()
        row.label(text="Vertex Count: {}".format(len(obj.data.vertices)))

        row = layout.row()
        row.operator(MY_OT_custom.bl_idname)

def register():
    bpy.utils.register_class(MY_PT_custom)
    bpy.utils.register_class(MY_OT_custom)

def unregister():
    bpy.utils.unregister_class(MY_OT_custom)
    bpy.utils.unregister_class(MY_PT_custom)

if __name__ == "__main__":
    register()

Appendix

TLDR; If you want to 'remove doubles' (merge by distance) for multiple meshes in Object Mode for whatever reason, use the bmesh.ops.remove_doubles() operator as suggested by @batFINGER, it's 3 times faster.

bpy.ops.mesh.remove_doubles()

As of 2.8x we can enter Edit Mode for all selected objects simultaneously, which avoids looping over all the objects as well as switching to Edit Mode and Object Mode each iteration so your code can be simplified as follows:

def execute(self, context):
    # get all mesh objects in selection
    meshes = set(o for o in context.selected_objects if o.type == 'MESH')
    # store the vert count on all objects
    verts_before = sum([len(o.data.vertices) for o in meshes])

    # switch to edit mode
    bpy.ops.object.mode_set(mode='EDIT')
    # select all vertices
    bpy.ops.mesh.select_all(action='SELECT')
    # remove the doubles
    bpy.ops.mesh.remove_doubles(threshold=0.01)
    # switch to object mode
    bpy.ops.object.mode_set(mode='OBJECT')

    # store the vert count again
    verts_after = sum([len(o.data.vertices) for o in meshes])
    self.report({'INFO'}, "Verts removed: {}".format(verts_before-verts_after))

    return {'FINISHED'}

Although this saves a lot of time, it still takes 0.0814 seconds for 100 cubes with a vertex count of 8080.

bmesh.ops.remove_doubles()

    def execute(self, context):
        # get all mesh objects in selection
        meshes = set(o.data for o in context.selected_objects if o.type == 'MESH')
        # store the vert count on all objects
        verts_before = sum([len(o.vertices) for o in meshes])

        # Remove doubles using bmesh based on:
        # https://blender.stackexchange.com/a/68133/31447
        bm = bmesh.new()
        for m in meshes:
            bm.from_mesh(m)
            bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=self.merge_dist)
            bm.to_mesh(m)
            m.update()
            bm.clear()
        bm.free()

        # store the vert count again
        verts_after = sum([len(o.vertices) for o in meshes])
        self.report({'INFO'}, "Verts removed: {}".format(verts_before-verts_after))
        return {'FINISHED'}

Bmesh method takes 0.0290 seconds for 100 cubes with a vertex count of 8080.

Final Panel & Operator

Panel in Object Mode and a proper implementation of the operator (Undo, Merge Distance etc.) in order to remove possible doubles for all objects in selection:

import bpy
import bmesh

class MY_OT_rem_doubles_bmesh(bpy.types.Operator):
    """Remove Doubles on Objects in Selection"""
    bl_idname = "object.remove_doubles_bmesh"
    bl_label = "Remove Doubles (bmesh)"
    bl_options = {'REGISTER', 'UNDO'}

    merge_dist: bpy.props.FloatProperty(
        name="Merge Distance",
        description="Merge Distance",
        min=0.0,
        step=0.1,
        default=0.02
    )

    @classmethod
    def poll(cls, context):
        obj = context.active_object
        return (obj is not None and obj.type == 'MESH')

    def execute(self, context):
        meshes = set(o.data for o in context.selected_objects if o.type == 'MESH')
        verts_before = sum(len(o.vertices) for o in meshes)

        # Remove doubles based on:
        # https://blender.stackexchange.com/a/68133/31447
        bm = bmesh.new()
        for m in meshes:
            bm.from_mesh(m)
            bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=self.merge_dist)
            bm.to_mesh(m)
            m.update()
            bm.clear()
        bm.free()

        verts_after = sum([len(o.vertices) for o in meshes])
        self.report({'INFO'}, "Verts removed: {}".format(verts_before-verts_after))

        return {'FINISHED'}

class MY_PT_custom(bpy.types.Panel):
    """Creates a Sub-Panel in the Property Area of the 3D View"""
    bl_label = "My Tools"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tool"
    bl_context = "objectmode"

    def draw(self, context):
        sel_objs = context.selected_objects
        sel_vert_count = sum(len(o.data.vertices) for o in sel_objs if o.type == 'MESH')

        layout = self.layout

        row = layout.row()
        row.operator(MY_OT_rem_doubles_bmesh.bl_idname)
        layout.separator()

        row = layout.row()
        row.label(text="{} Objects in Selection".format(len(sel_objs)))

        row = layout.row()
        row.label(text="Vertex Count: {}".format(sel_vert_count))

def register():
    bpy.utils.register_class(MY_OT_rem_doubles_bmesh)
    bpy.utils.register_class(MY_PT_custom)

def unregister():
    bpy.utils.unregister_class(MY_OT_rem_doubles_bmesh)
    bpy.utils.unregister_class(MY_PT_custom)

if __name__ == "__main__":
    register()


How can I get ripples with the Waves modifier in 2.8? As seen in this tutorial, adding a Waves modifier to a subdivided plane results in multiple concentric ripples - and that's the behavior I remember from versions of Blender prior to 2.8.

However, when using 2.8 and adding a Waves modifier to a subdivided plane, I seem to get only a single wave which deforms the plane, even when editing the Width and Narrowness etc values.

How can I recreate the earlier behavior with the current modifier? Sorry if this is a dumb question, I've been messing about with the modifier and I'm somewhat baffled.

EDIT 01: It seems like I can get something close to the behaviour from the video with the following settings - but they're fairly extreme. Am I missing a 'frequency' setting or something?

EDIT 02: I downloaded 2.77, as this is the version Gleb was using in his tutorial (linked above) and the Waves modifier works identically to how it works in 2.8, requiring extreme values to create multiple ripples.

But in the tutorial video, Gleb just brings in a new plane, subdivides until there’s 66,049 verts and adds the modifier… and voila:

Default values, no changes to width or narrowness and yet there are the desired ripples…!

I’m baffled.

I think I’m going to have to chalk this one down to gremlins.

The Wave Modifier seems to be somewhat broken (or at least very unintuitive).
It works best with larger objects, and doesn't scale very well.

Here is an example of my settings on a 1x1m plane, just to help you out.
I couldn't make it work on a smaller plane.

And while this image from Blender Manual is sweet, the manual's reccomended settings don't seem to work well either.


Navigating viewports in Blender for beginner Hi so I have just installed my blender software on windows. I have just finished watching how to navigate viewports, and this is where I'm stuck unfortunately :D
Yes, I am a noob at this, I am very familiar with GIS software but not this.
So to say, when watching the tutorial on navigating viewports I see that the guy can easly zoom, pan and rotate the view with only using his mouse and his left and middle button. What happens when I click the left m-button is I only shift the place of a white and red circle with a black cross in it. see picture here: https://drive.google.com/open?id=1EIjb5COfmdECQwwo_jPxEMNYRozDHa4g

This is very annoying, I want to be able to pan and rotate to move around in 3d space when I use left m-button.
And what is this marker for actually?

Sincerly thanks
P

If you like:
1. Download this file

open blender. Press CTRL+ALT+U (File>User preferences>Input)
At the bottom of the window there's a button: "Import Key Configuration".
Point to the file you downloaded on (1).

Alternatively: Customize your mouse PAN, ZOOM, DOLLY. Go to CTRL+ALT+U (File-User Preferences)
Go to Input tab. Unfold "3D view", find "zoom view" - mouse - Wheel In. If there is not such command create a new one using those options:

To use the Middle Mouse button (MMB) to Rotate around the view and move (drag) etc... check this out;

The cursor is deactivated. It will TOTALLY get in your way now that you´re beginning to use the software.


why i cant bent my plane? I want to bend my plane in y-axis but it's not happening. I have been facing this problem from many days

Simple deform modifier is sometimes... not very intuitive.

You need to rotate the origin point by 90 degrees, so that all axis work
Check Tool > Transform > Origins and use the Rotate tool. Then uncheck.
When using an Empty as origin, the same rule applies.

I'm not sure why it works like this :).


Baking Ambient maps, black noise? I have been struggling a lot lately with AO map baking, and just ran into a new problem! I'm currently trying to bake out occlusion maps for a few rocks, been doing it to several different ones with little problem, but just finished rendering a few out from a few very highpoly rocks and get weird black "pixelspots" Not sure what I'm doing wrong, i am on highest sampling possible, and i tried raising the "bias" which helped, but as it decreases the amount of shadow aswell its not quite the solution i wanna go with!

Has anyone bumped into this, and got a solution for it?

Here is the solution for this baking senario:

Note The result are correct, you will need deep crevices to create really
dark shadows or details. If you need more shadows on your ambient map consider using a 2D image editor like photoshop or Gimp to up the levels.

Change your baking bias from 0.001 to 0.01


How to recreate the lighting of a reference illustration, with low sun and pink shades on the mountains I am fairly new to blender and am wanting to create this particular lighting.

I can do the background in illustrator so it's just the pinky kinda light I'm having trouble with.

I was able to recreate it with two lights, a (lightly emitting) backdrop, and a very dark, but slightly violet tinted, world.

Breakdown

The lights are Area lamps with a fairly big size (for soft shadows), illuminating from the two sides, slightly towards the horizon. One is bright pink/orange (750W), the other is a slightly less bright (500W) blue/violet.

An alternative, if you'd like to have more realistic shadows, is a three-light setup, with one sharper, brighter pink light coming from the direction of the sun: see pic below ↓

The world, as you can see, is dark violet (because the ground in the foreground is in a violet shade).
The backdrop is just an image with low relative emission (1.0). Actually I used a mesh plane and circle with a gradient texture.
The ground is just a default principled material with no specularity.

I also used a high focal length (100mm) camera.

Results

(these are based on the two-light setup)

Eevee

Cycles

Note: I picked the backdrop color with the color picker from your reference image, but they appear duller in my render because I used the default Filmic Color Management settings. Depending on the kind of color you want to give to your scene, you might opt for a different color management scheme.

The file

This was created with an alpha version of Blender (2.82), so it may have compatibility issues.


How do I limit particles to move only on certain axis? I have a turbulence force field that moves some particles around, but I don't want the particles to move on the Y axis but only on the X or XZ axis. Is there any way to achieve it?

I already tried using wind force fields with no strength and some noise, the effect it's not really the same of a turbulence.

I have made Extra Nodes for Animation Nodes (blender 2.79, blender 2.80) which allows to control particles very easily. Here is solution for your problem:

So, in this node-tree, using particle data node, first get the locations of all particles (unborn, alive, dying which is crucial step) then multiply the locations with vector (1, 0, 1) which makes y-axis locations zero or limit the particles in the XZ-axis but you can limit them in any axes. Now, use these new locations of particles and plug them into the locations input of the particles output node. Here is tutorial link how to install and use Extra Nodes: https://www.youtube.com/watch?v=hvzr8lu5Ef0


Integrating CG imagery with footage from cameras using ACES As a Corollary to this question (Using Blender with wider gamut than 709 primaries (like ACES)). How can I use blender to integrate CG, and footage from cinema cameras using ACEScg?

My goal would be to convert the footage to ACEScg in Resolve, generate and composite in blender and return to resolve without having to re-grade the images. Is that workflow doable?

As a loose outline, it’s much better to skip the ACES complexity and focus on what is required. ACES comes with its own entire set of issues, not the least of which is obfuscating the goals and the technical needs.

It’s All About Radiometric-Like Ratios

Integration requires using a specific encoding. That is, the key here is that we seek the radiometric ratios as they existed in the scene. This is perhaps the number one aspect of integration that is, and has been, overlooked for a long, long time amongst many folks.

The key here is to understand that cameras capture scene data. However, despite all cameras doing so, they all do not encode the data in a manner that is useful. Typically, camera encodings can be described in one of two manners:

Ready to view as an aesthetic, display ready encoding
Ready to decode and work with further

The Encodings

You’ll find countless examples online where people take random footage and attempt to integrate it. Some even can look pretty remarkable, such as some of Ian Hubert’s work.

The sad part is that this isn’t the appropriate means to make life easy for themselves. If the footage “looks ok” when played back, it likely is the absolutely wrong encoding to work with, and will result in no end of massaging, sucking up countless hours of time and energy, only to never-quite-look terrific.

This should be common knowledge now for anyone who has tried to take a generic JPEG photo found online and attempted to integrate it into a Filmic based scene; it just can’t be done well. Why? Because the display-ready image has become an impossible to decode combination lock on its way to becoming pretty to look at.

The Cameras

It might shock a majority of readers to learn that you don’t need an Arri Alexa LF to get these sorts of magical encodings. Sony, Nikon, Panasonic, Fuji, Canon, and other vendors now commonly include a log-like encoding scheme in their affordable consumer grade cameras. A good number of them offer the ever-more-useful-and-important on-board 10 bit or greater bit depth recording.

While countless YouTube videos wax lyrical with misinformation about “flat” picture styles and what they are good for, the value of the documented log encodings is entirely and completely missed; log-like encodings capture and encode scene reflectance!

That is, for every log-like encoding scheme such as Sony’s SLog1-2-3, Fuji’s F-Log, Panasonic’s V-Log, Nikon’s N-Log or Canon’s C-Log1-2-3, there is a documented function available in a PDF that describes how the values are encoded with a unique transfer function.

Unlike a display’s transfer function that encodes display linear light however, the gold is in the little detail that those normalized code values can be unlocked back to scene reflectivity!

Where sRGB’s transfer function can be undone to reveal the display linear light output from 0-100%, a log-like encoding can be taken back to the scene’s ratios from some low value to some high value.

Try It Right Now

To really hammer this point home, a simple and revealing test can be done:

Take any old generic render with a reasonable dynamic range to illustrate the point.
Save the image with a sixteen bit integer TIFF using Filmic Log Encoding Base. That’s the very flat, non-aesthetic looking one.
Assert that no looks are baked into the output. We want data, not aesthetics.
Using the Image Viewer, sample around the render using the Right Mouse Button. Note the values from some of the scene energy that appear on the left side of the information bar that appears. That is, the RGB values to the left of the CM values, not the right. They should extend up arbitrarily high.
Also save the exact same image using Filmic with Base Contrast to make it look OK. Save the exact same sixteen bit TIFF.

Once saved. Open up another instance of Blender.

Load the Filmic Log Encoding Base image.
Set the colour space on the image to the corresponding Filmic Log Encoding Base.
Set up a compositor node to assert the file is promoted to float and sample the values in the Image Viewer.
Add in one more input and load the aesthetic output Filmic with Base Contrast. In this instance, the image was encoded for an sRGB display, so the transform is sRGB.

Note the values? Despite the fact that the sixteen bit integer TIFF was encoded using a device referred 0-100% range in both cases, when properly transformed via an appropriate transfer function such as Filmic Log, the values magically are transformed right back into the scene referred domain. The aesthetic “looks good” Filmic with Base Contrast? Hrm... only 0.0 to 1.0 representing the display linear aesthetically warped light, not the scene.

And guess what? Those logs for all of those awesome cameras listed above? They’ll do exactly the same thing!

This allows one to take the log-like encoded footage and seamlessly integrate it into any CGI with nearly no effort whatsoever. Use them as reflections, as emissions, and have interactive lighting on all your work.

But Wait, There’s More

There is one little gotcha with the log-like encodings; they are almost always coupled with a unique set of primaries that are different from the BT.709 assumed lights in your sRGB display, and the default set of rendering lights in Blender for Cycles and Eevee. The details of the particular encoding are unfortunately often referenced as some sort of a “gamut”. That is:

F-Log will be also encoded with F-Gamut
C-Log 1-2-3 may be encoded with a few different gamuts
N-Log will be encoded with N-Gamut
V-Log / V-Log-L will be encoded with V-Gamut
S-Log 1-2-3 may be encoded with a few different gamuts

One must take care to, after linearization with the proper transfer function, to also take the primary lights to the same primaries in the rendering / working space. This is a slightly nuanced subject, and likely requires another answer unto itself once the camera specifics are known.

No Log Camera? No Problem!

Beyond all doubt, this is a mind blowing experiment for the intrepid 3D peep to muck with, and hugely encouraged for anyone who has a log-capable camera.

But what about all of us schmucks who don’t have the releativey more recent cameras with log encoding options? There is indeed hope with a little bit of effort.

It’s entirely possible to take generic camera footage and document the transfer function manually. It’s a little elbow work, but the results will be similar to a native log, and the output will be significantly better than ignoring the core issues. Thankfully, there is an absolutely amazing set of tutorials to achieve just this via Paul Chambers’ website. After having read that amazing series, there is another little hidden gem on his site to help you use that radiometric scene reflectance too!

The key point in all of this is never let some overhyped bit of a plug-in or system prevent one from learning the core principles. No amount of any canned system can help you here; it takes a bit of elbow grease and learning to unleash a heck of a lot of amazing work. You never know... there might even be a super top secret and visually stunning project being developed in dark crustacean labs. I wonder what would happen if someone asked them...


Simple Panel script is not appearing on 3d view I followed a tutorial on youtube showing how to make a simple panel on blender, i copied it one to one but the panel is no nowhere to be seen. The script runs fine without errors and I have no idea of what is wrong.
I'm using blender 2.90 following this tutorial:
import bpy

class TestPanel(bpy.types.Panel):
    bl_label = "Test Panel"
    bl_idname = "PT_TestPanel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'My 1st Addon'

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

        row = layout.row()
        row.label(text = "Sample Text")

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

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

if __name__ == "__main_":
    register()

You are missing one underscore under the registration above the last line in __main__
It reads
if __name__ == "__main_":
    register()

but is supposed to read
if __name__ == "__main__":
    register()


Blender 2.8 (python) - input RGB doesn't match hex color nor actual color A python script inputs RGB values into a Principled BSDF surface node.  The system-computed hex equivalent is wrong as is the color.

The color I want is 414c55.

The script passes RGB values 0.254, 0.296 and 0.332 to the node.  The node correctly shows those values but the color is wrong:

Switching to the hex tab, we see that the system is showing the wrong hex value for the RGB values I provided.

Here's the node:

MY QUESTION:  what do I need to do to get the color I want?

All suggestions are welcome.  Thanks in advance!

TL;DR Enter hex values in the hex tab of the color picker.

Hex values in itself don't specify how they are supposed to be displayed. It depends on the color space that is used to interpret the value and the display transform to show it on your monitor. For the internet, where these hex codes are commonly used, it's standard to use the sRGB color space. It uses the Rec. 709 primaries. The conversion of values from CIE XYZ to RGB values includes gamma correction.

If you want to use your gamma corrected sRGB values represented as hex, then you have to use the hex tab to directly enter them. The RGB selection in the color wheel is using scene linear data / scene referred values that are not gamma corrected, which is why you're getting a different color than you're expecting.

  In Blender, the Hex and HSV/HSL values are automatically gamma corrected however, for the RGB values, they are in Scene Linear color space, and are therefore not gamma corrected. For more information, see the Color Management and Exposure page.


Error when Adding a Python Script to a Driver I seem to have a bit of a problem that I was wondering if someone could help me with.  As the title says, for some reason I keep getting an error when I try to add my script to the driver, and I can’t seem to figure out why at all. Here is the screenshot of how I’m applying it to the driver:

and here is the code:

import bpy
import math

def ShiftMoonMonth(objectName):
    obj = bpy.data.objects[objectName]
    sourceRotation = obj.rotation_euler.z
    finalRotation = (math.floor(sourceRotation/389.10)*29.10564039280042)
    return finalRotation

bpy.app.driver_namespace['ShiftMoonMonth'] = ShiftMoonMonth

I have auto-run python scripts turned on, and when I look through the available namespaces in the blender console, ShiftMoonMonth is one of the options I can use.  So I’m pretty sure that the code is linked to the driver, but for some reason it’s still giving this error.

The place I got the code template from was this tutorial here: https://youtu.be/rfEFU0Mdq3Q?t=21m50s at 21:50, where he is trying to solve a very similar problem to what I’m solving.  As far as I can tell, it seems to be the same as what I have, although it is quite old, so there may be something else you have to do. I also don’t understand the language, so I may have missed something.

Anyway, any help would be very appreciated!

For a single property type driver variable you need also to set the path value.  For example

import bpy

def x(name):
    print(name)
    return 0

bpy.app.driver_namespace["x"] = x

for example shown prints "Lamp", the name of the lamp object, to the console.  Ok, string properties can be passed via driver variables.  (personally don't recommend it) (note also for this case, the expression could simply be x("Lamp") with no need for a driver variable)

Not setting path for the single property driver variable will result in "None" being printed to console.

Ok, now that we know a name can be passed, it's best to check for errors with something like,

if name is None:
    print("problem with name variable")
    return 0

obj = bpy.context.scene.objects.get(name)

if obj is None:
    print("no object named:", name)
    return 0

as errors will mark the driver as "bad" which can result it in being turned off.

A more usual way would be, where the x Euler rotation of the Lamp object, is passed as a float variable, "var", to the expression floor(2 * var / pi).

PS also of note is that rotation in blender is in radians.


How to mix textures with colour? I am attempting to add a logo to a metal material.
Unfortunately, when I render it, it has no color.

I fed the metal shader and the logo's image texture to a mix shader.
Then I used the same image texture as the fac input.
It has colour in material viewport mode, but not when rendered.

Oddly, if I  feed the image texture only into the fac input and not as a shader, it makes no difference to the render.

The upper 3d view is rendered, the lower is material viewport mode.

Realized the answer 5 minutes after posting.

I was trying to mix a texture with a shader.
I needed to mix two materials together.
So I simply added a Principled shader with the logo in its colour input.


Subdivision surface problem 1 Please help. As I am facing a problem regarding this modifier.
all other edges and faces are fine but few edges and facing are stuck to Vertices/ Edges and are not smooth. The crease of all edges is 0.

You probably have flipped normals.

You can check your normals from Face Orientation under Overlays. Blue is outside and red is inside.

You can fix it in Edit Mode by pressing a to select all vertices and from Mesh tab under Normals press Recalculate Outside.


Buttons fall off & shirt opens during cloth simulation I've loaded a figure and clothing from DAZ 3D via OBJ. I've assigned a cloth modifier to the shirt and set it to collide with the figure. The buttons are already part of the same object as the shirt. When the simulation starts, the buttons fall off the shirt and the shirt opens (please see attached images). I've tried to attach the buttons using intersect knife and then remove doubles, but apparently none of the button vertices are on a shirt edge. I've tried to separate a button to become its own object and used the CSG modifier to union it with the shirt. These do not work. As the 3rd image shows, the button is floating inside shirt mesh. So, there is a circular cross-section of the button that is in contact with the shirt mesh. Here are my questions:

Can I (semi-automatically?) add some vertices along this cross-section that are attached both to button edges and shirt edges? If not, what is the best (or easiest) way to attach the buttons to the shirt?
What is the best (or easiest) way to keep the shirt from opening during the simulation?

Thank you,
D. Vyd

The best way is to make the buttons same object with the shirt, select all the buttons, then select the shirt, in that order, so the shirt is the active object, then press Ctrl + J.
The cloth simulator doesn't understand that those buttons are supposed to keep the shirt closed, you need to weld the open vertices where the shirt is open. In order to keep the visual of the shirt, you should do that in modeling, as you did for the collar for instance.


Object won't retain position or animation when exported I am trying to export this plane in the center of the room. I can't get it to export with it's position in tact. Also I have it animated to disappear from the render at frame 30. This won't stick to the export either. I am also trying to export the object of all of the pieces of the frame when it shatters. This animation doesn't get exported either. Also all of the pieces of the plane appear scattered all around the new scene with no animation or position applied at all.

This is how these objects import into a new blender file with a similar room.

Here is the file. How do I export the plane and the broken pieces of the plane after it shatters and import them into a new file?
https://drive.google.com/file/d/10G93zGssfynaHU4Ed2_Rip69pIfNeGin/view?usp=sharing

I found a work around. First I open up the file that does NOT contain the object that I want to import. Then I go to File > Append. In the dialog that comes up, I navigate to the .blend file that contains the object that I want to import. I open this .blend file in the dialog box and it actually opens like a folder. Inside it are many directories including a folder called "Object." I open the Object folder and all the objects in the blender file exist in this directory as stand alone files so I just click the one I want to import.
The object now appears in my current blender file. The thing that's amazing is that the object seems to retain all of its properties like position and animations.


what file to put float property and properties class blender 2.8 Thanks in advance for any help :)

Premise:
I have three .py files for my blender addon:
1. init.py
2. panel.py
3. quadfaces_op.py

I'm trying to make a float slider that controls the face and shape thresholds.
When the code is in one .py file it works well enough.
Now that I've split the files I cant figure out the following:

Do I need to register the classes in the init.py and/or in the file from which they originate.
When I create a MyVariables(PropertyGroup) my intuition is that it ought to go into panel but it doesn't seem to work...

I've looked at various bits of answers but I can't seem to shoehorn them into what I'm trying to achieve here.

I if there's some basic premise (what file is inheriting from what) that I can be pointed to for further reading please let me know. The docs have been pretty cryptic so far.

A clean approach for registration is to provide a register and unregister function in every file that contains classes that need to be registered. Provide a top level register and unregister function in the __init__.py which calls the respective functions of the imported modules.

You can put the property groups in a separate file, they don't have to be in the same file as the panels.

A good reference for this approach is the Cycles add-on that can be found in your Blender install [version]/scripts/addons/cycles or intern/cycles/blender/addon in the repository.


Movie Clip Not Showing in Background of Final Render or Output I added the clip in while compositing to serve as a background to the logo animation. It shows up in the preview window of the composite node and viewer node, but not in the render of final output. Is it a setting I have not done correctly?

You using the alpha channel of the render layer to the output image, effectively making transparent the area where the background image should be.


Extrude without creating new faces Hi, I am new to Blender

I have extruded these faces inward (arrow 1), but I had to come back to adjust it (arrow 2). When I do this I create new faces (with edge and vertices) that create me problem later on. Is there a way to do extrude adjustments without this happening?

From the point where each vertical edge was at Arrow 1, in edit mode you can shift-select each of those inset vertical edges, and then hit s to scale each edge and push them inwards.  That will move just those edges and their vertices all inwards (or outwards) symmetrically.

If you're already at Arrow 2 and can't go back, from edit mode you can select each horizontal edge at Arrow 1, hit "x" to bring up the delete sub-menu, and select Dissolve Edges to eliminate them.  You can then scale the vertical edges at Arrow 2 using the process above to move them without creating any new edges.

Does this accomplish what you were trying to do?


Selecting longest edge in triangle I've got traingluated mesh in which I want to select longest edge of each triangle. I have a feeling that this isn't hard via python script, but my coding skills are.... well not good.
I know that you have to iterate through triangles in an object, then compare edge lenght, add longest one to some group and at the end select this group - I just don't know how to code it :(
This is a workaround to not very good tris-to-quad tool.

Bmesh script

Simply running through and selecting the longest edge of each tri, the result can have any of 1, 2 or all edges of tri selected.

Added code try and avoid this somewhat.

Test script showing how to:

Load current edit mesh into bmesh
Find all triangles in bmesh
Find the longest edge and select it.
Update the edit mesh.

script:

import bpy
import bmesh

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

# triangles
tris = [f for f in bm.faces if len(f.edges) == 3]
# deselect all edges
for e in bm.edges:
    e.select = False

for f in tris:
    # if an edge already selected continue
    if any(t.select for t in f.edges):
        continue
    # sort by length and selected (if not using continue)
    edges = sorted(f.edges, key=lambda t : [t.calc_length(), t.select])
    # pop the last and select
    edges.pop().select = True

bmesh.update_edit_mesh(me)

Alternativey

Each edge has a link_faces collection. If there are two link faces (not boundary) and the edge is longest of all edges in both faces, then turn into quad.

Find all edges that have two triangle link faces
For each these edges, (sorted maybe): if it is longest edge of 2 faces and no other edges selected disolve edge to make this face a quad.
otherwise go to next edge.


How can a rigged model be used multiple times in a scene? I've created a rigged model and created and grouped the model and rig.

I would like to add it multiple times in a single scene. I used File > Append selected the group, made it local L and created a proxy Ctrl + Alt + P.

But I can do this only once, when I try to repeat the procedure described before nothing happens.

It works when I save the group in another file, and link two different groups into the scene.

What am I doing wrong?

One you have imported the model. You can add it to the scene just as you would add any other object. Just open the Space Menu and go to Group Instance and you should see a new entry there for the rigged model.


Why can I not use the Make Segments command on my Surface NURBS Curves? I followed the tutorial on the Modeling/Surfaces/Skinning wiki page, and then I created a simple test. I created a Surface NURBS curve, made 3 copies with space between them, selected all, and hit F, but nothing happened. No error or any indication that F is supposed to do anything was displayed. I am new to Blender and am using version 2.70, so not sure what I am doing wrong. Any ideas?

After reading the tutorial, here are a few points you can check in your workflow:
Point #1
Make sure you add a Surface NURB Curve, not any other kind of object. A "Surface" is different from a "Mesh" or a "Curve", as you can see here in the Add menu:

Notice there are other objects that have NURB or Curve in their name, but these are not what the tutorial is describing:

So, when adding a new object, go by the first level of names, as shown here:

Point #2
After Adding the first Surface NURB Curve, you must be in Edit mode when you duplicate it
(SHIFTD), because the Make Segments command (F) will only work in Edit mode.

If you were not in Edit mode when you made the duplicates, each one would be it's own separate object and the F command would not work.
By duplicating the surfaces while in Edit mode, all of the duplicates are considered one object,
even if they are not connected (which they aren't until you use F)
Point #3
After duplicating the Surfaces, stay in Edit mode, then select All with A, and then press F to Make Segments (connect them all together):

Just to explain the name of the command, when you use "Make Segments" (F), the "segments" that are made are the ones connecting the vertices together, shown here in yellow on the right:


The animation in my timeline is not displayed when I hit the Animation button I previously animated a short animation. I wanted to redo the animation. So I redid the animation and it can be seen when you scrub through the frames in the time frame but when you hit the animation button it replays the old animation. Can can I force blender to use the new keyframes?

It's quite common to render an animation, load it in the Video Sequence Editor, and forget that it was there. If you make changes to your 3D scene and render, you'd be looking at your old scene, not the newly altered one. The video strips on the VSE override your 3D scene unless you unclick the sequencer checkbox.


No-collide-Chain Wrecking Ball So, I am having this problem with a wrecking ball simulation from a Youtube tutorial: https://www.youtube.com/watch?v=nHVYYMG3QVY

Because the Chain under the Top chain is Not Colliding from the Chain Over,

Looks like I need help.

Data:
/Top Chain Collision(?): Mesh
/Top Dynamic Or Animated?: None
/Bottom Chain Collision(?): Mesh
/Bottom Chain Dynamic or Animated?: Dynamic

Okay, I found out the problem, It was too big so I needed to scale it down.


Is it possible for an object to follow multiple Clamp To constraints? I am trying to figure out how to get an object to follow two different "Clamp To" constraints. I am not interested in "animation only" solutions, so the Follow Path constraint seems to be out of the question. If there is an entirely different solution than using Clamp To constraints I would love to know about it.
One of my requirements for any solution is that in the end it just works without having to animate it or fiddle with any settings to get the object to follow the path wherever it leads.

I am attaching a Blender Scene file so I can better illustrate the challenge I am facing. When I move the object designated Slide A up and down along the Z axis I would like the object designated as Pin to follow the path designated PinSideToSidePath to constrain Pin's movement only along that path while at the same time following the path designated BezierCircle. Is this possible?

Note: I rotated the animated gif so it would display better. This is a quick animation showing the type of behavior I am trying to create with constraints.

Add a Follow path constraint to the Cylinder, with the bezierCircle object as the target. Enable Follow Curve and set forward to -Z and Up as Y.
(For this to work the curve and the cylinder must have their origins on the same location)

The cylinder follows the path now, as demonstrated here changing the offset values:

Align your Cube.001 sliding object to the cylinder and add a child of constraint, with the cylinder as target. Disable all the boxes except for Location on the Z axis.

To control the slider change the offset values on the follow path constraint for the cylinder.


Difference between using VSE and direct output as video? I recently learned that for rendering animations I could directly output the rendering as a video file instead of using the VSE to assemble the images and then rendering the video from there. My question is, is there any difference between the end video between these two methods? Any quality loss or change in video properties? It just seems like there is no point to using the VSE for creating animation videos, clarification would be very much appreciated :)

Difference is huge!

Imagine you have animation of 2000+ frames long and you outputing it straight as HD video. Let's say at frame 1900 electricity went down or another PC problem occured - it will ruin all rendering! Output file will be corrupted and useless.

Now think about Image sequence + VSE combination, if everything went wrong during rendering - you still have 1900 frames ready, so nothing to worry about. This is very simple case, but there are much more advantages of image sequence output (like distributed rendering on several PC's, re-rendering minor oversights and others).

Straight to video might be usefull for quick OpenGL viewport preview or low-res renders, where actual rendering process takes about 1-10 seconds for a frame.


Where do I configure the pressure sensitivity settings for Sculpt Mode? I'm currently sculpting hair on my model using my Wacom tablet in Sculpt Mode and I was wondering if there are settings somewhere which I can modify to specify how Blender would react to my pressure input in the context of sculpting.

The small buttons next to radius, strength and autosmooth that look like fingers pushing in something will turn that on for you.


How to know if the model can smile or talk I've been trying to learn 3d animation. I'm a software developer. I don't have a formal education in animation or about graphics. I found this tool for maya
https://www.animationstudios.com.au/advanced-skeleton
And upon watching the tutorial on the website the tool is super cool. I've read that the blender can also do this. But the problem is I don't know how to make a model. So i will look for models online. But the problem is this. The free models i downloaded online is glued as one. They doesn't have a parts like eye, tongue, mouth, face. So i need to buy a model. But i need to know the requirements before buying a model.
How do i know that the model can blink, smile or talk?
Thank you,
Regards

Ideally, the lips need to be not fused together for a face rig to work properly on the mouth. Otherwise, you'll need to separate the mesh yourself, which can be a pain. Most commercial rigs will not have this problem. Also, if the mouth, teeth, and eyes are not separate objects, they'll be very easy to separate if they have their own vertex groups. Failing that, you can select and isolate by material in the Edit menu. If these things are not stipulated in the details for the figure you're downloading, then you may need to ask the creator specifically.


Object On Characters Back Follows Character but Not In Unity I have a backpack object attached to my character model in Blender.  It is parented to the armature, and then the chest bone.  It moves well with the character in Blender completely fine.  But when I export to Unity, it doesn't want to follow anymore along with the animations.
The weird part is that I also have a weapon slot with the exact same settings as the backpack, and it works fine in Blender and in Unity.
I've applied all transforms, and both the backpack and weapon slots origins are at world origin.
Any ideas?

Nevermind I figured it out.  Turns out I did not have my backpack meshes vertices assigned to the chest bone in weight paint


Image Sequence Texture I was following this tutorial to create an animation. There was a step to create animation using Image Sequence Texture in shader editor. Even though author said that using keyframes on offset value will stop animation but it's not working. I've used 2.92 released version and the latest 2.93, however in both cases I have to change offset value on each frame so my sequence holds a particular frame while playing. Currently I'm using same approach for cycles and eevee but both are not working as in tutorial.
Is there any way to completely stop image sequence?
upd- model link

If all else fails, you should be able to do it this way - produce an identical texture in the VSE but with the desired frame frozen and use that for your texture instead.
As far as I'm aware vers 2.8+ would still allow this.
Here is an original image sequence - 600 x 400.

...and after when paused midway through and re-rendered -  identical but with the freeze inserted.

.
Details for those who may not know how -
The original sequence can be laid into a VSE strip and 'Split' with SH-K at the frame after the one to be frozen.
Select the sequence at the right of the split section and drag it out of the way.
Go back to the remaining left hand strip and select it's handle at it's right hand end.
Pull that to the right as far as needed.  This will freeze that frame.
Play it to get the frozen interval right, and once ok -
Select the frames you moved earlier and drag them back to join up with the stretched right hand end of the left strip.

Set the render output to the same pixel dimensions as the original but to a DIFFERENT folder.
Render this to the same format and dimension as the original and use that for your texture.
HINT - the VSE has a habit of acting up when making changes to it's strips, so each time a change is made, save the Blend file as something different, (increment?) exit Blender, then reload to try it out.


I want Glass to be transparent where nothing exists So I am making something for a video overlay. It should be semi-transparent to allow some of the video to be seen through it.

This was not a problem at first. The item was a glass ellipsoid with text (opaque) and other objects (opaque) in front of it which casts shadows and reflections. Using glossy surface and playing with roughness and also adding a transparent shader (mixed shader) did the trick.

Now the project includes putting something opaque behind the glass which should be diffracted through it.

Transparent shader does not diffract what is behind it. The glass shader does but once it is introduced, I lose all transparency in the glass.

Adding a mixed-shader with transparency gives a diffracted and non-diffracted view of behind. Adding a mixed-shader with holdout makes the ellipsoid and its diffractions semi-transparent, even so the opaque object is now semi-transparent (though the glass). Also tried refraction shader. Same issue as glass.

What I am trying to do is make anywhere where no light hits the glass (environment transmissions/reflections, refractions) are all transparent but opaque objects in front and behind the glass are still opaque.

Blender 2.73a, Cycles. Nodes.

One way you could do this is by using a sort of "greenscreen".

Add a big sphere which encloses the entire scene, and give it a material which will only be visible when seen directly through a transmissive material. Also disable visibility for unwanted ray types:

Put the sphere on it's own layer (I put it on layer 2), and create a second renderlayer which excludes it:

The first renderlayer is identical except for the Exclude setting.
Use the compositor to turn the green channel of one renderlayer into the alpha channel of the other:

If there is already red green and blue in your scene, you could try using the compositor to turn the difference between the two renders into transparency:

However you may need to tweak things to get it to work as desired.


How to maintain the same pixel appearance, when rendering a exported image sequence I need to import a animation png (with alpha) sequence into Blender, then put it on a geometry (a simple plane) to move some vertices (very subtle animation) and after that, export it again with the new deformation animation.
How can i maintain the same pixel ratio/animation when rendering the output? i don't want or need Blender to soften the edges for example.
(i want to render this on render internal, with plain colors, not adding any kind of light)
I also need to mention, the frame 0 need to be the same as the static image, with the same pixel appearance, without any 'filter' appeared.
Thanks in advance.

Imagine an image of 140x139 (this one : )
If you import in blender with images as plane addon, with emission or shadeless shader
And set your render output to the same resolution and framerate
And add an orthographic camera above to the center of your image, with orthographic view
[
[
You can adjust the size by zooming a lot in a corner from the camera view (Numpad 0) and adjust the Orthographic Scale.
Set color management to standard to don't have filmic transformation
And sampling to 1 to avoid anti aliasing.

The resulting image shouldn't be different.(I checked on photoshop : )
However, if you want to move the plane (rotate, or distort) the pixel will change as the raster sample the same pixels to in the same location. It will rasterize the image depending on the new transform, some pixels may stay the same, but some others will change.
Example of a distorted image :


EXTRUDE - is this the best way to simulate separate wooden planks on vertical face In an effort to try and make the face of a vertical surface represent 2 planks of wood, one above the other I thought of the Extrude tool which I have never used before.
I had no trouble using the tool (except for some strange reason moving now jumps preset distances instead of smoothly so I have to hold the CTRL key while dragging) BUT I cannot work out how to select each part to mark the seams for applying texture.  Is there a better method and if not how do I select each part separately. I have included an image to try and explain what I mean - the large top object in the view.  Thanks in advance.

I found using an ARRAY solved my problem.
I created an array with a count of 2 on the Z axis with an offset large enough so that I could see the 2 separate objects one above the other.
I then selected the bottom object and added a material
Then I unwrapped the object and used the UV editor to ensure all faces were horizontal.
Next I set the UVs Offset U to 0.1 to ensure the 'pattern' from my material texture image was slightly different on the object above.
Lastly I moved the two objects in the array back together.


Mask out effect in the compositor I have some glare effects on my image that looks fine on some places but ugly on others, in fact I don't even want it to appear on certain parts of the image.
Is there a way to just mask out this effect using a black-white texture map for example, so that the image's lower parts get glare while the upper parts don't?

Ok, this should do the trick. Set the glare node's Mix
 value to 1. This will cause it to only output the glare, not the mixed image. Then, simply use an Add node to mix the glare onto the original image, using your black and white Mask imagein the Add node's Fac to Mask out where you want no glare. In the example below, black would be no glare and white would be full glare.


Tracking beginning of the light path I am writing postprocessing script to the cycles rendering.

Can I somehow track the whole lightpath of a single pixel from the camera to the origin of the light?
For example the I have 3 lamps(A, B, C) and an environment map in my scene. I want to know that pixel (200,100) is in 30% made from light of lamp A and in 70% from lamp B.(some of render samples came across one, some across another) And pixel (300, 200) reflects the environment map’s coordinate (2000,1000).
Is there any way to extract the information about from where the light comes, maybe at least from single render sample?(since in one sample each pixel should reflect/refract only one light source) If so, at which level I should integrate with blender? Python scripting is ok or do I need to recompile some parts of cycles?

My final point is to find origin of each light path and track how the object interacts with environment.

Rendering doesn't work like that. Tracking only 1 light path would give a very bad representation of the scene and would be inaccurate.

Each pixel is an origin for infinite amount of light paths leading into different light sources, each bounce determined by probability. Rendering infinite samples is not doable, so the more samples (light paths traced), the better the image (better representing the scene).

There are 2 approaches you can go:

Render the image in N-dimensional color space, N being the number of light sources, each light-source being monochromatic only. Render as many samples as you can. Each pixel's color will exactly correspond with what light influenced it.

My guess is you will have to compile your own Cycles for this.
Render the image multiple times, one light source at a time. This can be scripted with python, or even done by animating the lights and rendering N-frames long animation, where N is number of lights. Each frame will be an exact map of how that light influences the scene.


Is Blender Compatible with Powerpoint? Can 3D images from Blender (and their motion paths) be imported into powerpoint
Can 3D characters created in powerpoint '16 be revised using Blender and then reinserted into Powerpoint

ActiveX controls exist for Powerpoint allowing you to put 3D objects into powerpoint -- see http://www.3dcompress.com/web/download.asp as example.  Using Adobe Illustrator and some back-and-forth, you could handle shapes as SVG thru AI-- Why can't I import a SVG file from Adobe Illustrator or Inkscape? -- which can be edited, and you can export SVG from Blender and import into Powerpoint after converting it to an .emf, which I believe is the only cross-compatible way to do so... But I have only recently started using AI '16.

You can certainly create effects within Blender that can be inserted into PPT as video files, too. A lot of neat visual stuff can be accomplished with embedded AVIs.

You can also create a hyperlink within PPT to a 3D model on a service like Sketchfab if your goal is to show the model itself... but not in an editable way that can be shown containerized within PPT, and this requires an Internet connection to Sketchfab.

Finally, I believe you were able at least in the past to make a Blender game and insert it as a browser object in PPT -- see http://geta3d.com/index.php?option=com_content&view=article&id=15&Itemid=20. I have not done this... and the file is not actually "in" the PPT.... it is linked.

But as I understand your intent, I think the answer is mostly "no"... or "not seamlessly."

EDIT: VRML might offer some compatibility, too, for shapes: VRML 2.0 import/export is an add-on in user preferences.


Array modifier make unwanted offset I want to array this object on Y-axis only.

I make Y offset 1.00 and both X,Z are Zero.
But when I do that it shows an offset in x-axis so both end circle are not match each other like the one in the image above.

I also apply scale and rotation but it still the same.

Where is the "offset" coming from? It is built in as part of object, the mesh is not aligned in the $X$ axis. The array modifier will only repeat that offset as well.
There are two basic options:

Rotate the object in edit mode so that the object is aligned on the $X$ axis

In the Relative offset parameters of the array modifier, play with the values on for the $X$ and $Y$ axis until the objects align. Note that by doing that the object will still not line up to the $Y$ Axis. But maybe that is what you want? I don't know.


How to stop the emission of particles for an amount of frames, and then continue? In my animation wondering if there's any way for me to stop the emission of particles for an amount of frames then continue. If there isn't anyway could someone please give me a suggestion that will give the same effect because all I've thought of so far is replacing the emitter

You can add multiple particle systems to the same object, each one with  different start and end frames


Pose vs Rest position are different I'm using a manuel Bastioni model and trying to add a facial rig. When I weight paint the eye lids even though they are at 100% they don't follow the bone all the way. Only when I remove them from the head deform bone will they follow the eyelid bone.
The other problem which might be related is that pose and rest mode are different. I tried to find the IK constraint that might be causing this, but I can't... Any help would be appreciated. link to the blend file:
https://drive.google.com/file/d/13uL7Bso-9EbK9btwYCpp1Tp_xsf815J1/view?usp=sharing
thanks in advance

In the Properties panel > Data > Skeleton, display all the layers so that you can see all the bones, now you can check the influence of the different bones, for example the head bone has an influence on the lids so of course the lid bones won't influence them 100%.

Also, if the bones in Pose mode have a different position, it's because they are influenced by some constraints like Copy Rotation or IK. To get exactly the same position as in Edit mode it may need some small bone readjustments.


How to maintain smooth curves on meshes with lots of uneven loopcuts? On models with a lot of holes/protrusions and other details which require extra loopcuts, how can I keep those loopcuts from having a large effect on other parts of my model?

For example, I want to keep this edge smooth like it is now, but there are some unwanted subsurfing of the inner corner:

If I add a loopcut to fix it, it adds a bump in the nice outer curve:

Is there a way sharpen up the inner corner without messing up the nice outer curve?

I tried mean crease, but it causes a lot of distortion and too-sharp edges.

Here is the example .blend.

Another example of a similar problem:

IMHO, it is hardly possible to keep that curve exactly the same as what it is after adding support loop, unless you take GiantCowFilms' second way, though it will bring new problem for subdivision. However, you can make the difference unnoticeable:

You can either do this by sliding GG or ShiftV on each side; or, select both sides, then W > Smooth, tweak levels and axes in F6 panel.


Why is the scaling point not in the middle of my selection? When I'm modelling, why does this happen? When I want the two faces to scale in the middle, the point from where the scaling happens is on one side, so when I scale it becomes weird.

You can select from which origin point to apply the scale using transform pivot points. They are at the top of your 3D view.

Right now I can see that your transform pivot point is set to "active element" which means you are scaling relatively to the center of the left face.

I am not sure what exactly you are trying to achieve but I suggest using "individual origins".


How to allow Rigid Body Physics take over after follow path constraint? I'm trying to get a car to crash into a wall after a couple curves. I've followed Jonathan Lampel's tutorial on http://www.blender.org/support/tutorials/ which worked well using keyframes for animation. But is there a way to use the "Follow Path" Constraint and get the same effect? Or do I need to work in keyframes instead?

I move to frame 70 (when object reaches end of path), keyframed the animation check box, moved to frame 71, unchecked the animation and keyframed the checkbox again (like done in the tutorial). When I run the animation the object goes down the path like I want, but as soon as hits frame 71, the object disappears and reappears really far away and just falls forever.

Anyone able to help me out? Don't want to make the whole thing with keyframes but can do that if no better way.

At the frame before you want to switch from the "follow path" to rigid body, keyframe the "Follow Path" Constraint influence to "1" by hovering over the influence slider and pressing "i". Then go ahead one frame and set the influence to "0" and keyframe the influence again.

Then to do the same thing on the same frames to your rigid body. (I believe the dynamic checkbox controls the rigid body the same way the influence slider would for the "follow Path", but I'm not 100% sure.)


animate part of the way along Follow Path I want to have an object Follow a Path until some percent of the path and then stop Follow Path:

I can set the frames to animate the path:

and the offset time to start the animation:

But I don't see a way to stop the animation (small cube towards large cube) when it is part-way along the path.  I created and aligned the objects and path with the empty objects (in blue), so that they would all be aligned.  And actually it would be better if I could stop the animation at some intermediate path vertex.
In 3ds Max, I am able to frame-key % path, so that I can speed up and slow down a path-based animation.
How can I accomplish this?

Change your follow path constraint like this:

Then keyframe offset from 0 to 0.8

Result:
https://youtu.be/6IdUgpwBVgw


Blank image when I render I went to animate a project, Blender was returning a blank screen.
I have attempted to restart both Blender and my laptop, as well as re-downloading the program.
With each attempt, Blender exported a black movie, which I attempted to watch multiple times.
I even attempted to reanimate one of my older Blender files, and even that reexported as a black movie.
I have attached a picture of what I see when I render.
Please Help!
Thank you!

There are unused strips on the VSE. If the Sequencer box is checked that takes priority over the 3D scene render...
Uncheck Sequencer and you will be able to render the scene.

(for versions previous to 2.8:)


Parenting a rigid body: Physics problem I made a car using the Vehicle Controller (demo file at the end/bottom of the page) concept.

It's a "rigid body" chassis, that attaches four "no collision" wheels at run-time. It works pretty good, except for this :

I modeled a "car body" and parented it to the chassis, but no matter what settings (mass/radius/form factor) I try (for both the chassis and the body) I cannot seem to make the car body a "rigid body" (or anything else than "no collision") : When I press "p" my car flies frantically up like a balloon...?

Exactly what is the force that makes my car fly up like this ?
The child's mass, radius and form factor values should generally be smaller than those of the parent's, right?
Do I have to make sure the parent and the child don't intersect?
Are there other variables that I should look for?

just use a generic rigid body joint constraint -> 6dof and lock all the values to 0

Also, you are going to want to check linked collision (so it won't collide with the chassis)

one thing to note, rigid body joints are broken in 2.73a if you delete any item, it remove ALL rigid body joints in the scene...


UV wrap a rectangular texture on a circle mesh I'm a programmer who's trying to get into modeling, but i'm having a hard time achieving the effect i want, in the way i'd like to.
I have a circular mesh, on this i'd like to project a square texture. Using a custom shader i can easily overwrite the UV values to roughly what i want, namely the length of the local vertex positions xy.

However i'd like to just export the mesh with the correct UV's, but i cant wrap my head around how, what they should be. This is roughly what i got going at the moment:

I think i want the top vertices to have V 1, and the bottom vertices V -1, same with X. But i dont know how to set the correct value for each vertex. How do i know what selection in the UV view corresponds to what vertex in the world? Is there a better way to go about achieving the effect i want? Maybe the mesh should be triangulated differently, with a vertex in the center?

You can use a triangle fan, and simply reset the UV map.

Use a circle with a triangle fan (one vertex in center)
UV > Reset
Rotate and Scale the UV map

Done.


Keeping the animation running in a Python script triggered by Always sensor in bge? I am trying to create my own sensor block in Blender's Game Logic to detect a text file being created in my C drive by another program.

Is it possible to perhaps hack an existing sensor or to create a new one in which you can define where the text file is located?

I tried using the suggested answer method stated below, but the python code would only run once upon finding the variable in the test.txt file. Any ideas on how to keep the always loop running? Here is some sample code:

import bge
from bge import logic as GL #GL=GameLogic
import os
import re

# Get the whole bge scene
scene = bge.logic.getCurrentScene()
cont = GL.getCurrentController() #access the logic brick that the script is being called from and assign it to a variable
#logic brick is returned by getCurrentController() -this method is passed to the variable cont
own = cont.owner #accessing the Armature object that is the owner of the controller

#Sensors - now have access to the controller and to the object that owns it. The next thing to do is to retrieve the necessary sensors
AlwaysSensor=cont.sensors['Always1'] # sensors assigned meaningfully name variable
#Actuators -  retrieval of the actuators
box_action = cont.actuators["Action1"]
#Now all the necessary logic brick components are accessible within the script, and the code for the movement itself can begin.

#setting up Action - animations
box_action.action = 'upMovement'
box_action.frameStart = 1
box_action.frameEnd = 24
box_action.mode = 2 #play modes are represented by integers: 0 represents the Play play mode, 1 represents the Property play mode, 2 represents the Flipper play mode, 3 represents the Loop Stop play mode, and 4 represents the Loop End play mode.

print("writing read charcters")
#note text file is in blender file in C drive
text_file = open("test.txt", "r")#varialbe=parameterOpen(parameterFileName, r read)
#print (text_file.read(1))#prints the first character '1' in txt file
var=(text_file.read(1))

print ("var=", var)
if (var == "a"):
#if (text_file.read(1)) == 'h':
    if AlwaysSensor.positive:
        cont.activate(box_action)#run upMovement animation
        print("a found+animation run")

text_file.close() #closes the file once read

Here is a screenshot of the game logic blocks setup:

I would connect an always sensor into a python controller to run a python script that tests for the file and handles it accordingly.


Eyes follow me, but i don't want them to I imported a .vrm file into blender, and for some reason, the eyes follow me, not the camera, ME, in the viewport. I actually have a few .vrm files that do this. Is there a setting where i can turn that off? i'm using 2.79.
picture: https://i.imgur.com/xPiAPRh.gifv
there are no constraints, no modifiers, nothing that i can find.

Ohhh, that was clever!
I'm almost 99% sure it's just a trick of topology.
They eyes are sunken so they appear to rotate in the opposite direction as the observer (you!).
It's the exact same illusion as this mask:

The fact that your viewport has no or little shading reinforces the illusion.
Can you go into edit mode confirm that the eyes are sunken and when you make them flush with the face, the creepy effect stops?
If yes, then rest assured, your computer is NOT haunted.


Add deflection in middle of edge (catenary curve) I'm very new to Blender and trying to use it to design cut patterns for a tent I plan to sew. In tent design, you need to add catenary curves to edges so they tension the panels nicely. For instance, you can see the curvature where the panels join in this image

In modeling terms, I need to create a 3-point arc edge. I'd like to specify the deflection at the midpoint to accomplish this

I have a feeling the solution is something related to beveling. However, the answer here does not work if I add a vertex to the middle of my edge - the bevel just adds additional vertices without introducing any curvature. Another answer shows beveling for faces, but I need to bevel the edge connecting two faces.

I guess somebody has to suggest a cloth simulation, although I'm not sure it will meet your specifications. The curves resulting from pinning and tension don't appear to be catenaries, until the tension is wound up to an unrealistic level.
The topology is as shown, with the selected vertex-groups pinned in the simulation:

The edges between planes have also been given some damping in tension.. there may be more accurate settings, depending on the real-life constraints. The cloth settings are a slight variation on the 'Rubber' preset, supplied in the .blend as 'Tent', with a Shape > Shrink Factor providing the forces.
The result after running the simulation for ~75 frames:


SheepIt! Rendering produces weird icosphere-esque object Whenever I render my scene in Blender (cycles) normally, It produces the following result (What I want):

Whenever I render it using SheepIt! (It is me rendering it) It produces the following:

I have no clue what that thing is. The two files are the same.

Figured out the problem. SheepIt! Does not support fluid, which is why it made that shape.


How can i view white wire in sculpt mode? I'm beginner in English and blender3d.

When i study sculpting of blender in youtube, there are white wires only in front-face of object in streamer's viewport like below picture.

But when i select wireframe of viewport shading in sculpt mode, there are orange wires besides back- face wires shown annoyed me like below picture.

How can I let view port shading be seen like youtube streamer?

Two things to do.

For the wireframe color, go to User Preferences > Themes > 3D View > Active Object colour.
In the "N" (shortcut) panel turn on Backface Culling under Shading tab to hide back part of your mesh.


Can I relocate the manipulator in Blender 2.79? I would like to be able to move the 3d Manipulator, in edit mode, so I can manipulate a vertex/vertices, edge or face about another location.

In the gif I select a vertex, I then move/relocate the 3D manipulator to another vertex (though it could just as easily be an edge or somewhere on a face) and, using the 3D manipulator, I move the location of the selected vertex. I then move the 3D manipulator again and repeat the process. There are many reasons I usually do this, the example shown here is just one reason.

How can I accomplish this in Blender 2.79?

The dot (normally in the centre of your primitive object is your origin point. (Picture 1 and picture 5)
The red and white crosshairs cursor in your viewport is your 3D cursor.
Individual vertices can be moved to the 3D cursor in edit mode OR the 3D cursor be snapped to a single vertex or median point between selected vertices or faces or edges using the shortcut Shift+S. There are various different options for interaction between mesh objects and the 3D cursor.
To place the 3D cursor to the centre of the viewport, press Shift+C. This will also centre your view.
The origin point can be changed in the Toolbar (T) where it says Origin. (Image 5)
The way a mesh translates or rotates or scales can be changed to use the origin point or the 3D cursor. The is very very useful. You can change these settings with the options at the bottom of your viewport. (Image 6)
If you would like your 3D cursor to sit on top of faces when you click on a mesh, you might find switching on Cursor Depth quite useful. This option can be found in the User preferences in the interface section. (Image 7)
the precise location of your 3D cursor can also be changed manually in the properties tab "N" if you scroll down. It's about halfway down or less.

Here is how the manipulator can be moved around in the viewport using the 3D cursor. The images go in order from left to right and top to bottom.

One other thing to note: When using proportional editing, scrolling the mouse wheel increases or decreases the area of influence. you'll see a circle getting bigger or smaller as you scroll up or down. Using shift and scrolling allows you to increase or decrease the influence much more accurately.
To place the 3D manipulator to the centre of 3D space, (0,0,0 in global coordinates), in Edit mode, press Shift+C to move the 3D cursor to the centre of 3D global space. Change the pivot point to be the 3D cursor (image 2 in the first diagram or the 3rd image in the second diagram).
The 3D manipulator will share the same place as the 3D cursor. If you want to make that permanent in Object mode, open the Tool Tab (Hotkey T) and click on the drop down menu which says "Origin". Set the "Origin to 3D cursor" in that menu. This menu also has a hotkey (Ctrl+Alt+Shift+C).
Perhaps this is what you were wanting to know. Let me know if this doesn't exactly answer your question.


Why are these keyframes longer? I was just wondering if anyone knows why these particular keyframes are longer than the others? I can see that the tips of the yellow lines for keyframe 0 and 16 are green, but I'm not sure why.

These are Grease Pencil keyframes that are created when drawing with the Grease Pencil tool.

You can change the Dope Sheet editor mode to Grease Pencil from the Dope Sheet header menu to view and/or delete these keyframes:

Alternatively, you can manage the keyframes from the Grease Pencil Layers panel in the 3D View Properties Shelf (N).


how to get a smoke domain and flow object to follow a parent that is driven by a rig following follow path bone constraint? Figured it out before I finished asking, see below for answer, but i'm going to have to continue typing so that my question meets the minimum amount of characters...hmm will this be enough.

For anyone else who might stumble on this problem, there's nothing different you need to do, but like me you might be thrown off by the viewport showing the smoke sim stuck at frame 1 with the domain not following along with the object, and the smoke sim not updating.

All you need to do is parent all of your smoke objects to any child of the rig that has a path follow constraint (which you've probably already done), and then select the domain and click bake. It will then bake properly. The problem is only that blender tricks you into thinking you've done it wrong for a few hours by giving you the completely wrong result in the viewport unless you bake.

Hope that helps someone.


What is the shortcut for orientation? Blender 2.81
I frequently change the Gizmo orientation in modeling between Global and Normal. There is no shortcut shown.
The Blender documentation says , (comma), but using comma the orientation shown at the top right side is changed, not the one I need (marked red in the picture below). Both have the same tool-tip though.

So there are two questions:
Important: What shortcut shall I use to change the highlighted orientation?
Out of curiosity: What orientation do I change using the comma shortcut and what is the correct name for the orientation I need. Both say "Transformation Orientation".

While both "Transformation Orientation" options have the same tool-tip, they are used at different times.

The left one you marked, is used for gizmos and only when you grab the gizmo and use it, overwrites the "globally" used one to the right.

While the right one is used when you use the G,R and S keys to move, rotate, scale respectively as well as other functions like E for extrude etc.

Only if you use gizmos, will the left one be used, as it also only becomes available when the gizmo is activated. It can be seen as giving the tool it's own specific orientation option.

The documentation is sadly referring to the same link/explanation for both menus.
After looking through the key-mapping, and checking in the console regarding what is reported when changing the selection for either of the two transformation orientation options, i found, that both set the exact same variable:

bpy.context.scene.type = 'LOCAL'

So using , you only get the pie menu to change the right "globally" used "Transformation Orientation", and it seems to me that there is no key for the tool specific options on the left, neither for a pie menu to change them. And adding a shortcut for those tool specific transformation orientations is not possible either.

That sadly means, that there is no solution i can offer you aside the explanation.


Why is my glass plane displaying diffuse at specific angles? I have a glass plane mixed with a diffuse fresnel (and a .png texture):

This glass plane shows up diffuse when viewed at an angle. When viewed straight on, it looks fine, like a regular glass plane. How can I get rid of this diffuse effect?

The problem is due to a flipped normal - this can occur when extruding a plane, depending on which way the extrusion is applied.

In the following example one plane is extruded 'upwards' (the left-hand one) and the other is extruded 'downwards' (the right-hand one). The 'upwards' plane has correct normals but the other has inverted normals.

When adding a Glass material the glass acts based on the Index of Refraction (IOR). For normal glass in air the IOR is usually around 1.45 - ie, the default setting for the glass. However, with the flipped normals the mesh actually behaves as if it is a cavity of air within a glass solid and this causes the "surface" to refract unexpectedly and behave as if the IOR is the inverse (in the case of an IOR of 1.45 it behaves as if the IOR is 1/1.45 - ie, 0.69).

The solution to this problem is to either Flip Normals or Recalculate Normals so that the normals are pointing 'out' of the mesh.


I want to Transfer Weights from a Vertex or Multiple Vertexes one VG to Another in the Same Mesh Object using Python I have a model that I want to move vertex groups or a vertex from one group to another.  I almost have the code down, but I'm running into a problem.

This is the code I have so far (I'm only learning and there is probably an easier to code it, but this is code I can understand at my level of experience)

import bpy
vgname1 = 'Leg_L'
vgname2 = 'LegD3_L'
vgi1 = -1
vgi2 = -1
vvgi1 = -1
vvgi2 = -1
verts=[]
vWeight=[]

Get current mode and name for active object
mode = bpy.context.active_object.mode
obname = bpy.context.active_object.name
print(mode, obname)

Walk through Vertex Groups and determine if the New Group
already exists, if not, create the new Group Also Get the
index numbers for the 2 Groups in question

for ob in bpy.data.objects:
    if ob.name == obname:
        for vgn in ob.vertex_groups:
            if vgn.name == vgname1:
                vgi1 = vgn.index

            if vgn.name == vgname2:
                vgi2 = vgn.index

            if vgi2 == -1:
                ob.vertex_groups.new(name=vgname2)
                for vgn2 in ob.vertex_groups:
                    if vgn2.name == vgname2:
                        vgi2 = vgn2.index
Test the results
        print( ob.name, vgname1,vgi1, vgname2, vgi2)

Put the object into Object Mode and get the
vertexes that are currently assigned to the group to be removed
Put the vertex indexes to be moved into a list

        bpy.ops.object.mode_set(mode = 'OBJECT')
        for v in bpy.context.active_object.data.vertices:
            for vg in v.groups:
                if vg.group == vgi1:
                    print(vg.group, vg.weight)
                    verts.append(v.index)
Ignore            vWeight = vg.weight

Now add the vertexes to the other group

                    vg2 = ob.vertex_groups
                    for vga in vg2:
                        if vga.index == vgi2:
                            print(vga.index,vga.name)
                            vga.add(verts, 0, 'ADD')

This is where I go astray.
The new group is added and the vertexes are assigned, but what if the new vertex group already exists and I just want to add the missing vertexes? I don't want to create another instance of the new group. (which is what this code does if I run it twice)

I went to the Blender Python documentation and this bit on Vertex Groups doesn't tell me anything

add(index, weight, type)
Add vertices to the group

Parameters:
•index (int array of 1 items in [-inf, inf]) – Index List
•weight (float in [0, 1]) – Vertex weight
•type (enum in ['REPLACE', 'ADD', 'SUBTRACT']) –
Vertex assign mode
◦REPLACE Replace, Replace.
◦ADD Add, Add.
◦SUBTRACT Subtract, Subtract.

I see types for add, replace and subtract, but no append...

I understand what add and subtract will do, but what the devil does Replace do?

I'm setting the weight to 0 in the vga.add(verts, 0, 'ADD') statement because using a variable seems to set it to 1 by default.  I can add another routine later to reset the weights on the vertices in the new group before removing the old group.

I'm stuck right now on when the new vertex group already exists in the object and I want to add vertices to it without creating a .001 instance of the new group name.

Help???

Thanks

Solution:

This code is clunky and really inflated. I know that actual coders out there will tell me that there are much better and more efficient ways to write this, but as I said, I'm just learning.

After playing with this abit, I found that this new code does just what I need it to do...

import bpy
vgname1 = 'Leg_R'
vgname2 = 'LegD_R'
vgi1 = -1
vgi2 = -1
vvgi1 = -1
vvgi2 = -1
verts=[]
vWeight=[]
x = 0
y = 0
z = 0
mode = bpy.context.active_object.mode
obname = bpy.context.active_object.name

for ob in bpy.data.objects:

    if ob.name == obname:

        for vgn in ob.vertex_groups:

            if vgn.name == vgname1:
                vgi1 = vgn.index
                x=x+1

            if vgn.name == vgname2:
                vgi2 = vgn.index
                y=y+1

        for vgn in ob.vertex_groups:

            if vgi2 == -1:
                z=z+1
                ob.vertex_groups.new(name=vgname2)

                for vgn2 in ob.vertex_groups:

                    if vgn2.name == vgname2:
                        vgi2 = vgn2.index
                        print(vgi2)

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

        for v in bpy.context.active_object.data.vertices:

            for vg in v.groups:

                if vg.group == vgi1:
                    verts.append(v.index)
                    vg2 = ob.vertex_groups

                    for vga in vg2:

                        if vga.index == vgi2:
                            vga.add(verts, 0, 'ADD')

                    for v1 in bpy.context.active_object.data.vertices:

                        for vg1 in v1.groups:

                            if vg1.group == vgi1:
                                    print(v1.index, vg1.group, vgi1)
                                    vWeight = vg1.weight

                                    for v2 in bpy.context.active_object.data.vertices:

                                        if v2.index == v1.index:

                                            for vg2 in v2.groups:

                                                if vg2.group == vgi2:
                                                    vg2.weight = vWeight

            bpy.ops.object.vertex_group_set_active(group=vgname1)
            bpy.ops.object.vertex_group_remove()

If you wish to leave comments on how this code "should" be written, please go to the posting I made on here https://blenderartists.org/t/solved-trying-to-move-weights-from-one-vgroup-to-another-in-the-same-mesh-object-using-python/1156842/2 and post there.

Thanks


Why is the subsurf modifier not creating smooth geometry? I'm totally new to Blender. Excuse me, if my problem is dumb.

I'm trying to model something rather simple from a mesh. A handle. When I try to merge vertices of those two highlighted faces, I'm getting pretty awful result with subsurf modifier. The same thing happens, when I snap one face to another and then remove doubles. I guess the root of the problem is something simple, but can't figure it out.

And the result:

Scale along the Y axis to 0 (S > Y > 0), delete the faces (X > Faces), and remove doubles (W > Remove Doubles). The issue you are having is there are internal faces, if you just remove the doubles, then there is still a face inside of the mesh, which leads to this weird artifact.


Smooth shading causes steep gradient line on a simple mesh I think there is something wrong with this mesh, but I cannot find the problem. Am I missing something?

Download blend file here:

https://blend-exchange.giantcowfilms.com/b/2889/

Like m.ardito said, it it an issue with smooth shading. Contrary to what he said though, it won't render correctly in many situations. That is how Blender calculates the normals...
To fix the problem, you could add a bevel modifier and potentially turn on auto-smooth in the mesh settings.
Here is what it looks like with this bevel modifier:

To understand what's going on, let's look at the default cube with smooth shading.

It too has rather hideous shading "problems" shown by the sharp gradient lines between the closest and furthest vertex on the top. As I understand it, smooth shading averages the normals from the vertices so that there isn't a sharp change at the face's edges. But unless you use a normal map, you must use some sort of math to set what the normals will be across the face. For flat shading, the normals are the same across the face, but have a hard cut at the edges. An easy way to fix this is to just add more geometry. This allows the smoothing to look much more like what you'd think. Here are a few examples of ways to introduce this geometry.
Bevel Modifier

Notice how the normals get better and better with the higher amounts of geometry.
Subsurf Modifier

Notice that the subsurf modifier is just subdividing the faces. It is not doing any smoothing itself because it is set to simple instead of Catmull-Clark.


Morphing object along curve is there a simple way to morph object along a bezier curve?
For example: a rope with one square end and one round end.

Example:

If it can’t be done, that is helpful too.
I’ll stop trying to find a way.

Thank you.

I’ve found the solution.

Notes:
1) There isn’t a direct way to morph along a curve
2) The result can be achieved with the curve modifier

My solution:

Big thanks to:
Duarte Farrajota Ramos for pointing me in the right direction
Patdog
Haunt_House


Emboss or deboss a more complex logo into a mesh I’d like to know how to emboss or deboss a more complex logo/mesh into another flat surface/mesh as shown in the example:

What I have got so far is: transforming a logo into an *.svg from Illustrator and importing it into Blender. Now that I try to convert it to a mesh it becomes quite messy and complex and I don’t know how to emboss or deboss it into another mesh.

I tried it with the Displacement modifier, however you need to really subdivide the mesh a lot of times to get an suitable result. Is there a more elegant solution?

Here's a quick guide for doing it with microdisplacement. Note this won't work for you if you actually need a good mesh, but it'll give a result similar to your reference image.

1) Enable Blender's experimental feature set:

2) Add a new Cycles materal, and set its displacement method to True:

3) Add a subsurf modifier; select Simple, and enable adaptive rendering:

4) From edit mode, select all vertices and unwrap the plane (U):

5) In an image editor, threshold your logo and blur it a bit:

6) Add the image texture to the displacement at your material output node:

The result should look something like this:


Blender Bevel can not bevel a simple all-quad geometry! Bevel modifier has no problem giving a beautiful result for a mesh with a bunch of N-gons (The outer mesh) but cannot properly bevel a simple all-quad mesh (The inner mesh)?!

I have found a solution. Turn out all I have to do is to flip normal of faces at the area with the problem.


Will there ever be support for audio speed control? My question is simple: I can change the speed of video in the sequencer, but not audio. Will this feature ever be supported in Blender? If there is no such plan, is there some hints of implementing that in plugins?

I haven't looked a lot into Blender API yet, but I would like to do it "the Blender way" if there is one. Currently, I have to render only the audio, edit that using other applications (eg. Audacity), and import back. This is tedious. The simplest way might be just automating this, but I would prefer not to touch the core of Blender (i.e. modify things like Blender source code).

Update

I now have a procedure of simulating this. First, assume I have a segment of audio/video to be accelerated 2X. First, I hard cut out both the audio and video (try to get an even number of frames, call it F. The beginning of the cut is B, and the end E), then do the speed effects on video as usual. Then, on the cut out strip of audio, I change pitch to 2, and change the Start frame of Trim Duration(hard) to the half of current value, then hard cut again at B+F/2 (or change its length to F/2). This will allow you to speed up both the audio and video to twice, but without the need to render the audio strip separately. Very tedious, but very procedural, using only Blender functions. It might be easy to either automate it using a plugin or implement it right into the core. I will check Blender API and code, too.

Note: It seems that I must change pitch first, then change starting point, then change duration

You can change an Audio Strips speed by changing/animating it's pitch. Though it has to be done independant from your videos Speed Control strip.

And it will (as it is labled) change your pitch. So if you want to maintain the pitch but only change the speed that has to be done in another audio editor like Audacity.


Change from global to local I am working in global, however when I enter edit mode I would like to change to LOCAL. The python code is missing something.

  bpy.context.scene.type = 'LOCAL'

On the 3D header, there is a button where you can change it from Global to Local.

Hope that answers your question :)