reflecting direct light on glossy surface in Cycles Working in Cycles.

Say I have a "disco ball" with a glossy shader. I'm pointing a spot light to it, and I'm trying to have the reflections of that light illuminate the diffuse material on the walls with the patterns from the ball.

I get this:

but I'd like to get something like:

For the illustration I placed a point light inside the ball an removed faces. But what I'd like to do is move the light around the ball so that the light reflected from it changes like it would do in real life.

Is that possible at this point?

EDIT:

Just for the record here's the image rendered in LuxRender (yet another program to learn...)

Unfortunately cycles isn't very good at rendering caustics yet, due to the way it traces rays "backwards", from the camera to the light source; it's very unlikely for a ray to bounce off a diffuse surface, a glossy surface, and then hit a point light source.

However there is a working patch which adds Metropolis Light Transport (MLT) and adaptive sampling based on noise detection.

In the mean time, if you don't want to compile blender with the MLT patch, you might want to try Luxrender, an open source render engine which supports unbiased MLT and Bi-directional sampling. It can also use openCL to render using a GPU.


How to hide custom shapes' object for bones in armature? I'm using custom shapes for a character armature. These shapes are objects that are floating around in my 3D space. They aren't really connected to the armature or the character mesh.

However, when I append the character mesh to a project, all these custom shapes follow along, as objects. This clutters up my 3D view, and I have to remove these objects every time I append a character mesh.

Is there any way of hiding these/putting them into the armature layer/not appending them somehow when I'm appending a character?

Unlink these objects from the scene:

import bpy

bpy.context.scene.objects.unlink(bpy.context.active_object)

Pros:

There will be no clutter, even no extra stuff in outliner
You will be able to still see them in the dataview outliner.
Bones will still use them as shapes
They won't be deleted with file save
It will still work with file linking

Cons:

You will have to link them back to scene to make changes, so do this last
Other people won't know what's going on, it's not standard and I would do this only on personal projects
It might not work with future blender releases, its a hack.


Object referenced by PointerProperty in Python can not be deleted properly I am trying to replicate the functionality of Object Parent using the dropper select tool in Python (an image is attached for what exactly am I trying to replicate).:

For this purpose, I am using the PointerProperty to get a pointer to the object. Most of the functionalities work as expected, similar to the implementation above. However, if I delete the object (either using the keyboard shortcuts or the python method), it disappears from the 3D view but it is still present in bpy.data.objects. Moreover, the PointerProperty does not clear the object field as is the case with the original object parent field. I have tested this in Blender 2.79 and 2.81 with similar results. Any suggestions would be appreciated.
This is the code I am using.

import bpy
bl_info = {
    "name": "Pointer Property Test",
    "author": "Mr. Potato",
    "version": (0, 1),
    "blender": (2, 79, 0)
}

class PT_test_constraint(bpy.types.Panel):
    """Add Rigid Body Properties"""
    bl_label = "TEST PROPERTIES"
    bl_idname = "addon.test_constraint"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context= "physics"

    bpy.types.Object.test_constraint_parent = bpy.props.PointerProperty(name="Parent", type=bpy.types.Object)

    def draw(self, context):

        layout = self.layout
        col = layout.column()
        col.prop_search(context.object, "test_constraint_parent", context.scene, "objects")

def register():
    from bpy.utils import register_class
    register_class(PT_test_constraint)

def unregister():
    from bpy.utils import unregister_class
    unregister_class(PT_test_constraint)

if __name__ == "__main__":
    register()
    #unregister()

Based on the suggestion by @batFinger, I realized that if I delete the object using the keyboard shortcut or using the Python console, it is unlinked from the scene and its reference count decreases by 1. Since the pointer property still has a reference to the object, it is not removed from bpy.data.objects. Therefore, I check in my Panel draw() function (which updates automatically) if the desired object is present in the scene as follows:

if context.scene.objects.get(desired_object.name) == None:
# That means that the object has been deleted from the
# scene graph, therefore remove it explicitly
    bpy.data.objects.remove(desired_obj)

This lets me reproduce the functionality inheret to the Blender when dealing with PointerProperty Objects as mentioned in my question.


How to put animated background to keyed video? I keyed out a video because it had grass and put in an animated background. How do I get the keying to work?
Before background with keying:

Now with animated background:

What am I doing wrong? Thanks!

Enable "convert to premultiply" to show the top video/image over video/image.


How can I decimate a mesh to remove unnecessary triangles? I have the following mesh. As you can see there are quite a bit of triangles that are unnecessary, and can be reduced. However, if I use the decimate modifier, other triangles are also decimated and morphs the shape.

If decimate is too destructive, then while in edit mode, select all, then press X>limited dissolve to remove excess edges in your model. You can adjust the angle threshold in the operator panel as needed. Don't forget to also remove doubles with W>remove doubles.

You can also try tris to quads. Press Spaebar and type in tris to quads, and select the operation from the menu, or or press Alt + J


What causes this weird collision? Pretty sure that there is some answer to this already somewhere since it seems such a basic action. But I could not find an answer to it. Maybe since I just started with Blender, I just don't know the relevant keywords for it. I try to let some Tetris blocks fall on to each other. But for some unclear reasoning, the collision happens in mid-air. Rather then on the surfaces of the two rigid objects. I've made a video to see what does happen.

Both objects only have a rigid body set in the Physics tab, with the following parameters:

Rigid Body

Type: Active, Dynamic
Mass: 1

Rigid Body Colisions

Shape: Convex Hull
Source: Deform
Friction: 1
Bounciness: 0
Collision margin: 0

There is a difference between the shape of the mesh, and the shape used for collision detection. Often a mesh is too complex to allow for real-time collision detection.

What you "see" is the convex hull of the Tetris block. It's basically the shape that you'd get when wrapping a shape with an elastic band (in 2D) or elastic sheet (in 3D). In this image, the green shape is the convex hull of the black shape:

The Convex Hull is easy to do physics sims with. It's also quite predictable, since objects cannot hook into each other and will be able to slide off of each other. If you want to have the exact shape of the object used for the collission detection, use the "Mesh" choice. Since your meshes are simple Tetris blocks (compared to, say, high-polygon, detailed game characters) this should work fine.


Way to temporarily draw a uv grid over blender meshes? I have a scene where all of the objects have a material assigned to them.  However, it would be useful if I could temporarily assign them a special material which simply a texture map of a grid square.  The point of this would be to let me see the UV lines to help me make editing decisions.
As far as I can tell, Blender does not allow you to do this.  Am I wrong?  Is there some way to temporarily view my scene with this grid material and then switch back to the materials I've assigned?

Select your object, in a shader editor window create an image texture node, create a new UV grid image, mantaine the node unconnected and selected.
In the 3d window you can now select the solid viewport shading, in texture mode, to show your UV Grid.
By selecting the material texture nodes you can display the UV grid or the material images.


Why fingers bones don't bend properly? I'm new to animation and rigging in Blender, matter of fact new to blender. But I want to learn rigging and animation right now, and I've setup this rig:

And everything moving the large standing bone at the palm of the hand moves the entire arm properly. Yet when I try to curl/bend the fingers into a fist pose, here's the result:

Basicly I've setup the finger bones to copy rotation on Z axis from floating curl control bones. That's all. Any ideas?

It can be fixed by adjusting your weight paint. Try distributing the weight more accurately according to the vertices. It should fix your problem.


Key frames appear in dopesheet but not in the timeline When animating, i just realised that sometimes when i add a keyframe, it appears in the dopesheet but not in the timeline!! Why?

An update if anyone is still having problems seeing keyframes on the timeline even though the object is selected. On the far left of the timeline there is a tiny arrow, if you click and drag this open you will see a summary of keyed items. Opening all of these and selecting one or two will, kinda reset your view.
Hope this helps someone.


How put some objects (array of objects) to cover other object with its shape and curvature I am very new to blender so forgive me please. I am trying to model a glock for practice since...couple of days. Starting again and again making some progress, using new more efficient features etc in a model. However I faced a problem which I can't solve.

I am trying to model a gun handle, to be precise-a grip part of handle.
So far I created a small grip part and I made 2 arrays in both axis.

I would like to shape the whole array so it will follow the curvature and shape of handle and I would like to mask/limit array size/iterations to the shape of handle. Is it possible?  It looks like this

So how to "cover" the part of handle (describing the final shape of grip cubes array) with grip cubes? Or how to limit/mask grip cubes so they take a shape of the handle part in the back?I would appreciate your advice.

Reference handle part image:

There are plenty of ways to achieve the same, one of them is using particles, if the mesh of the grip is suitable, in case you don't want to use particles, here's one of the ways using Shrink Wrap modifier, since the object you're positioning is a simple object, this will work, in few words, delete all the faces in the object except for the face(s) that will touch the grip, apply the Array modifier, position the object in an orthagraphic view to the right place, add a Shrink Wrap Modifier, choose the grip as the target object, choose the method of Shrink Wrap that suits your case: Nearest Point, Project ...etc. Apply the Shrink Wrap modifier, in Edit mode Extrude the faces, while still selecting the new faces, use (Individual Origins) as Pivot center for rotation, scale the new faces, and your done. Following are the detailed steps:
1- I'll refer to obj#1 to the grip, obj#2 to the object to be positioned.
2- Select obj#2, Tab to go to Edit mode, select the base (the face that will be touching obj#1, Ctrl + I to invert the selection, and delete the other faces. You'll end up with obj#2 as an array of planes.Tab to go back to object mode.
3- Apply the Array modifier.
4- Place obj#2 properly in an Orthographic view to fit the desired area on obj#1, use Numpad 5 to set the viewport to orthographic view.
5- Still in Object mode, obj#2 still selected, add Shrink Wrap modifier, choose obj#1 as the target using the eye-drop in the modifier interface, or choosing it from the drop down list.
6- Choose the projection method that suits you better in the Shrink Wrap modifier panel.
7- You can still transform obj#2 using G, R or S to fit better it's position on obj#1.
8- When sure that the position is appropriate, apply Shrink Wrap modifier. It's a good idea to copy obj#2 using Shift +  D , move it to another layer using M before you apply the modifier, just as a back up.
9- Selecting obj#2, Tab to toggle Edit mode, press A once or twice to select all faces, press E to extrude the faces.

10- While still in Edit mode, new faces are selected, Choose Individual Origins as the Pivot Center for Rotation/ Scale, it's a small icon at the bottom of 3D View, Next to shading icon.
11- Press S to scale and drag to scale down the new faces.


Can't scale biezer curve object after editing object in Blender 2.8 I can't scale a bezier curve object in Blender 2.8.  The thing is I was able to do this when I created the object.   I worked with it a little bit and it just stop scaling.   See animation below

I know people have had similar issues and they say "deactivate the Manipulate Center Points"  deactivate manipulate center points
But I can't find that in Blender 2.8

Here's how I created the object from the beginning.

I'm running Blender 2.8 Ubuntu 18.04 64 bit.

You need to understand how vertices in curves work: they are defined by a center point, where the curve goes through, and two handles which can be on the same axis or not.

The handles define the direction of the curve while exiting the vertex and their easing, just like a keyframe in the Graph editor. The central point is just a positional reference, like a normal vertex in a mesh, so it doesn't have a scale (it's a point: it's a "0D" element). The reason why you can scale multiple centerpoints is that they behave like vertices in a mesh, so if you scale them up they increase their distance from the median point.

In this gif you can see that you can scale the vertex up if you select 2 of them or you scale it from another point (the 3D cursor in my case)


Grease pencil strokes disappear in surface mode in Blender 2.8 I'm learning grease pencil in Blender 2.8, hope you can help with a small frustrating issue:

When the stroke placement mode is set to 'surface' for drawing directly on a mesh, only the current stroke is visible as it is being made. Any previous strokes drawn on the surface disappear while a new stroke is drawn, and then reappear as soon as the current stroke is stopped. This makes it quite hard to draw.

I've seen videos of grease pencil 2.8 being used on a surface without this behavior, but I can't find any setting to alter it. If anyone can help (new to Blender) be very much appreciated.

Many thanks in advance!

I just recently experienced the same problem!

Maybe a solution to your problem:
In the "stroke placement" dropdown if you select "surface" there is also an option for an offset.
This works good.
However I found out that the offset to the projected surface as well as the thickness of the Gpencil is relative to the viewing distance to the object.

There should be an option for relative to object and relative to screenspace if you have placement on surface selected.
Where can we report this? I don't know how I can get in touch with devs...

Anyways, I hope that helped!


Why is my object rendering correctly in blender render and not in cycles? Ok I'll make this simple:

Cycles render:

Blender render:

How do I make them both show up?
Thanks!

Cycles render and blender render use different types of materials, to "transform" a blender material to a cycles material there is the button "use nodes" in the materials tab:

By the way, this may result in a model with no texture so you will probably have to apply the texture in cycles.


How to get a clean geometry An image is attached after making the difference between the two object im not getting a clean geometry. The edges are not sharp. What should i do to get a clean geometry

The impression of smooth edges is due to enabled Smooth shading. If you wanna to have sharp edges and smooth shading still active, add Edge Split modifier to the object.


Redo armature without stacking modifications? I'm making my first attempted at rigging and animation. I have a model which I just finished rigging and weight painting, and now I am ready to begin animating. However I quickly realized that my armature got disconnected from my mesh somehow...Looked around and found that I accidentally applied the armature modifier on my mesh (while the pose was changed) and lost the armature.

Here is what it looks like, taken in edit mode

as you can see, the arm bones are bent downward which is how I originally made them. But then i posed the arms and added the armature modifier by mistake.

Here's what it looks like back in pose mode

Here they are matched together, but they aren't physically connected, when I move the bones the mesh doesn't move.

I thought I could fix this by adding an armature back on, but then this happens

It appears that the raising of the arms has doubled, as to add the modification - twice. The modifications are stacking.

How can I fix this?
Thanks!

You need to apply the new pose of the armature as its rest pose before adding the modifier to the mesh. The mesh is deformed by the armature by using the difference between the armature's current pose (what is set in pose mode) and its rest pose (what you see in edit mode on the armature).

In pose mode, under the "Pose" menu, select "Apply Pose as Rest Pose". This will make the pose mode position of your armature become its edit mode position.


What's the difference between pressing S and Alt+S? Sometimes I see Alt+S online but I don't notice a difference between it or just using S. What does Alt+S do?

I don't get Blender wiki's brief explanation.

The key command S is used to scale whatever is selected in the viewport, regardless of mode. However using the command Alt+S to scale selection along the normals is only possible in Edit Mode.

When you scale the object, all the distance ratios between various vertices and all angles will remain exactly the same, just get larger or smaller:

However when using the Alt+S command, blender will try to shrink or fatten the mesh. This can lead to unusual results if done on certain meshes:

I have noticed that it works much better with more vertices. This really shows exactly what is happening. The inner vertices appear to have a greater weight, being moved a much greater distance. This leads to a convex shape after fattening, or a concave shape after shrinking.


Resize vertex group using bpy.ops.transform.resize I have a mesh with a series of vertex groups, and each vertex group must be resized based on specific proportions (i.e. by a factor of 2, factor of 3, etc.).
The code I've been trying to run is:

However, this scales the entire object.
I've also tried:

However, this creates the attached image
I would like the end result to look like this (which was created by manually selecting the vertices and scaling):
Is this at all possible?
Thank you!

Using a scale amount of 0.2 means scale to 20% of the current size, to increase the size you want to use 1.2 to be 20% bigger than the existing size.

You can also simplify what you have by using two operators to set the active vertex group and then select the vertices in that group.

import bpy

sfac = 1.2
vgrp = 'Group'

obj = bpy.context.active_object

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

bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.object.vertex_group_set_active(group=vgrp)
bpy.ops.object.vertex_group_select()
bpy.ops.transform.resize(value=(sfac,sfac,sfac))

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

Part of the issue I see in the first image is that having a mirror modifier causes the scaling to pull away from the centre of the object and I think most of them are going past the halfway point to give you inverted mesh in the middle. One option is to do this without the mirror modifier. The other may be to position the 3D cursor and use it as the pivot point but that may get difficult depending on what else you plan to do.


How to smooth a curved surface without it looking like a paper plate? I have always had issues with curved surfaces, like the foot of a wine glass, for instance, but I have found that with smoothing them, it makes them to look like either a pancake or a paperplate, here is a fine example of this cylinder that I used the subserf modifier on:

It's just a simple cylinder:

And when I subsurf it, it makes like these ridges in the middles of what would be the tris.

You will automatically have these artifacts with this kind of topology (if you leave the top without any edge loop along the rim), because the subsurf won't leave enough faces to interpolate correctly between the slice and the top. So create a bevel or at least an inset to fix the problem:


Instantiating objects and applying different material to them I have a scene with hundreds of cylinders of different sizes and colours, which I create with a python script. Needless to say that they take a lot of memory. I just learnt about object instantiation for this kind of cases (yes, I'm pretty new to Blender of CGI in general).

However, while I can scale them independently, I cannot seem to give each of them a different material (as they need to have there own colour). I find this strange, because, in my understanding, they are the same instance of a mesh, which could well be (in my logic) separated from the materials which are simply applied to them.

Am I missing something here? If instantiated meshes cannot indeed have their own materials applied to, what is the proper way to display hundred (and eventually thousands) of primitives in a scene?

Thanks!

Both the Object and Mesh classes actually have place to store materials. For object it is Object.material_slots and Mesh.materials. This means that Mesh always has their own "default" materials but they could be overridden on Object level. I don't know the origin of this but it comes in handy.

Normally the settings are paired but to override material per object, you need to set the object's material slot from "DATA" to "OBJECT". This makes Blender store the material per object instead of reading it from the mesh data. It is easiest to set this up for the source Object, all clones will inherit this setting afterwards.

In python you can set this via.

object.material_slots[i].link = 'OBJECT'

After you make the change, you need re-assign the material slot as setting this clears any reference.

Here are links to official Blender python API in case you want to dig around some more:
https://docs.blender.org/api/current/bpy.types.Mesh.html?highlight=materials
https://docs.blender.org/api/current/bpy.types.Object.html?highlight=material_slots

Depending on your case though, if you only want simple color variation instead of having completely different materials, it might be better way to set up your material so that you get a random per object color using Object Info > Random and color ramp for example. Or Object Info > Location plugged into textures like Musgrave or Voronoi for patterned variance.


How to export an animation into unity (sound baked to an f-curve)? I made an animation, using bones and converted sound into an f-curve, like in the first part of this tutorial: https://www.youtube.com/watch?v=OAes-ITNaGA. How can I export this animation into Unity now?

As I understand this animation depends on "constrains" and “drivers” inside Blender, is there an acceptable way to export this animation into Unity?

You should try FBX (it bakes animation, so it should work, provided you are not doing too exotic things). Collada (DAE) is the other format that supports animation, but not sure it’s natively supported by Unity.


All geometry looks glitchy in viewport in Blender 2.8 I'm using Blender 2.8 (release, not beta) for my new project and after adding some objects (just as placeholders, no complex geometry) all geometry around edges looks strange.

This however doesn't occur while looking through a camera.

I have used Blender 2.8 beta before and there wasn't this problem

Check your viewport's clipping. The min value may be too small for your scene, or too large.


Creating shape keys using Python I want to use the Python API to create a sequence of absolute shape keys that deform a mesh over time, however I'm having a lot of trouble figuring out the proper way to do that.

Currently I'm trying to mimic how I would do it by hand, i.e. using bpy.ops, which I'm sure isn't the best way to begin with, but even then I can't get it to work. A minimal sample of what I'm trying to do:

import bpy

if __name__ == '__main__':
    # Create nx*ny points as a starting mesh
    nx = 11
    ny = 11
    data = [(x/10., y/10., (x**2+y**2)/200.) \
        for x in range(nx) for y in range(ny)]

    # Create edge loops to define faces
    faces = []
    count  = 0
    for i in range(ny*(nx-1)):
        if count < ny-1:
            faces.append((i, i+1, i+ny+1, i+ny))
            count += 1
        else:
            count = 0

    # Create mesh and object
    mesh = bpy.data.meshes.new('mesh')
    obj = bpy.data.objects.new('obj', mesh)
    obj.location = (0, 0, 0)
    bpy.context.scene.objects.link(obj)
    mesh.from_pydata(data, [], faces)
    mesh.update(calc_edges = True)

    verts = obj.data.vertices

    # Create a base shape key. This much seems to work.
    bpy.context.scene.objects.active = obj
    bpy.ops.object.shape_key_add()
    bpy.ops.object.shape_key_retime()
    obj.data.shape_keys.use_relative = False
    skeys = obj.data.shape_keys
    skbs = skeys.key_blocks
    skbs[obj.active_shape_key_index].interpolation = 'KEY_LINEAR'

    # Create 10 sequential deformations
    for n in range(10):
        # Create new shape key
        bpy.ops.object.shape_key_add()
        skbs[obj.active_shape_key_index].interpolation = 'KEY_LINEAR'
        bpy.ops.object.shape_key_move(type='BOTTOM')
        bpy.ops.object.mode_set(mode='EDIT')

        # Deform the mesh
        for i in range(len(verts)):
            verts[i].co.z *= data[i][2]
        mesh.update(calc_edges=True)
        bpy.ops.object.mode_set(mode='OBJECT')

This does create the shape keys and put them in the correct order, but the mesh deformations aren't linked to the keys (because I'm modifying the vertices directly instead of using the edit-mode tools?), so the mesh always resembles the initial data. If I manually add another shape key after running this script, it magically takes the geometry of the last iteration, but the ones in between still don't seem to do anything.

What is the proper way to implement this (ideally without as much reliance on bpy.ops)?

You can create shapekeys directly as well as set the position of each vertex for each shapekey without using edit mode or even changing the active object. An object has a shape_key_add method that you should use instead of the operator, one advantage of the object method is that it returns the shapekey it creates, so you don't have to use an index into the array or set the active shapekey, you just work with each shapekey you create.

Each shapekey block has a data property that holds the location of each vertex in the object.

So after creating the mesh object -

verts = obj.data.vertices

sk_basis = obj.shape_key_add('Basis')
sk_basis.interpolation = 'KEY_LINEAR'
obj.data.shape_keys.use_relative = False

# Create 10 sequential deformations
for n in range(10):
    # Create new shape key
    sk = obj.shape_key_add('Deform')
    sk.interpolation = 'KEY_LINEAR'

    # position each vert
    for i in range(len(verts)):
        sk.data[i].co.z *= data[i][2]


Texture mapping option disappear in Blender 2.72 I want to make explosion pieces fade out when particles reach their life limits, just as this video does: https://www.youtube.com/watch?v=gD8qlNdEt6E. In the video, begin at 18:55, the video maker creates a new material texture and set its mapping coordinates to "UV", I can see the option "Mapping" from the video:

Yet, somehow when I try to do it in Blender 2.72, I just cannot find such an option, here is the picture I took from my Blender:

You can see there is just no mapping option at all. So could anyone please tell me how to solve this problem?

By the way, you may want to know the Material.001 is created in cycles engine, because I really need to blend this effect with some other cycles-created stuffs to make an animation.

For cycles you can fade out particles by using the particle age and lifetime to control the mix of transparency.

By dividing the age by the lifetime you get a value that goes from 1.0 to 0.0 over the lifetime of the particle, then connect that to a ColorRamp and you can clearly control what part of the lifetime the particle fades out.


How to Properly Unwrap an Intermediate Mesh? I am running into trouble with what seems to be a simple UV unwrapping.
THE INTENDED END RESULT:
Essentially for the end result I am looking to place two sperate logos (size, shape and subject) on the box; one on top and one on the bottom. Additionally I need to place a leather texture over the entire box.

THE SET UP:
The Box is hollow as per my image, and there is no usage of logos on the interior.
I am including images of both my current state and a photographed end result for reference. (Logos have been replaced out for copywrite reasons.
THE PROBLEM
I have added seems to the box, in what I believe could be the proper places (But not sure) and used smart UV unwrap to project onto the test grid.
The projection seems stretched. and shrunk in the center? This only applies to the top and bottom though (Where I will need to include logos)
Could someone please help me figure out why this isn't unwrapping properly? And help me figure out how to place two logos on one material?
"UPDATE" : PREVIEW WITHOUT ANY UV MAP
As you can see with the below 2 images, with out any unwrapping or reseted unwrapping The material applied still appears to be warped from the edge?
TOP

BOTTOM

Thank you.

hello select some edges and mark seams like this, then uv wrap and select the conformal option, and it should appear like this...

your model with a uv grid should look like this:

Additionally you can turn on the stretching option there to check stretching issues...


How can I open a circular window in a cylinder? Just like in this picture.. This is a cylinder with a circular window.
Please notice that the frame is evenly distributed along the cylinder and I want to achive the same result, any tips?

Start by adding a circle where the window will go.
E then S to extrude then scale the circle giving making a (still flat) window frame.

Add a Shrinkwrap modifier then a Solidify modifier to the window frame.  Set the Shrinkwrap modifier Target to your main cylinder object. Set the Mode to Project and choose the correct axis for your object (in my example it is the positive Y).
The Solidify modifier is simple, give your window frame the Thickness you want, and set the Offset to 1.

Last step is to cut a circular hole in your mesh for the window. You can do that with a boolean modifier, knife project (how I do it in the gif), or manually adding loop cuts and deleting faces to make a hole. The answers to this question do a good job of explaining the processes.

Animated gif of the entire process.


Scaling an object up and down in an animation? i'm trying to make a very easy animation rotating an object (pretty much a plane) while making it grow and shrink. i know there must be an easy way to do it as i've done something similar before but my brain's done a fart and can't seem to get it right.
at the moment when i try to scale the object down in a keyframe it scales to that size permanently, affecting the size in all other keyframes. does anyone have any helpful tips and tricks? thanks in advance!

If you have moved and rotated your object and only created Location and Rotation keyframes, without creating any Scale keyframe, the animation will take into account the first Scale keyframe it meets and the scale of the object won't change until it meets the next Scale keyframe. If you want to make sure that the scale is taken into account at frame X you should keyframe with LocRotScale (or LocScale or RotScale).


Cloth blowing around by itself? I'm trying to animate a scene of my character in bed but my cloth keeps blowing around for no reason. There is no wind force or anything that should be causing this. I can't just apply the cloth modifier because I need the cloth to move around while the character moves. What am I missing? Thanks.

Example (https://youtu.be/cFSYUOeiEeQ)

Blend file: https://drive.google.com/file/d/1-99fwbKE0bFlTjav9pPB-VLcm53cgE2X/view?usp=sharing

I've downloaded your file and the problem appears to be twofold.

Firstly, there is a very large difference in mesh detail between the 'matress' and the 'quilt' meshes - due to the 'subdivision surface' modifier on the matress before the 'collision' modifier. This seems to be causing a lot of 'noise' in the interaction between the surfaces. The Cloth simulation is quite dependent on the scale of the subdivisions of both the cloth and the collision surface. The matress contains a large number of vertices around the edges and the subdivision surface modifier (set to 3) is exacerbating the problem.

The other issue (and possibly the most significant one) appears to be that the meshes are starting off intersecting. This means that the cloth solver is struggling to determine how to properly repel the cloth - and it therefore moves erratically until it can find a stable situation (which it never can since due to the intersection).

To resolve this I firstly moved the Collision on the matress object to be able the Subdivision Surface modifier in the modifier stack and moved the 'quilt' mesh above the surface so that it could fall down onto the matress at the start of the animation (you can suppress that part from your final animation) and found its own point of rest.

There is a further issue with the geometry of the folded over top edge of the duvet - some of the faces intersect with other faces in the mesh. This results in a similar problem with the self-collision - where faces are intersecting with faces and the cloth simulation is unable to determine how to move them apart so they continue to self-intersect and repel each other. You need to review the geometry and move apart the intersecting parts so it is a consistent cloth at the start.

Once the collision and intersection is resolved the cloth simulation should have more of a chance of settling down to a stable simulation.


Can't see beyond a certain point in viewport? For some reason I can't seem to see things in my viewport beyond a certain point, as if there is an invisible wall. For reference, the photo shows a cube, but I am unable to see the rest of it. If I drag my perspective around, the line at which the objects stop showing remains constant. Please help!

It looks like you might need to increase the Camera End Clip Distance. Press N in the viewport, and select the "View" tab on the right side of the menu that appears. Clip distance is near the top. See below:


Animation node instancing an object with children I'm trying to instancing an object with all it's mesh children, but i can't find a way, I've seen in previous version of blender the "object from groups" but now that there is the collection system, i can't.
Any good solution?

Thanks

Since an object doesn't store reference to its children, I would advise to use a collection for this, and create an empty as a collection instancer. Be aware that every instanced collection will have the same animation as the first one:

For example, I have this collection with a cube and a Suzanne children.

Create empties as instance collections :

Loop over them and change their position :

Increase the number of instances :


Select the edges drawn by freestyle I want to be able to select the edges freestyle determines (e.g. silhouette edges), and then, say, draw only those silhouette edges from another view. Is it possible?

Freestyle does not keep track of mesh edges selected as feature edges.  It is not trivial to identify the mesh edges corresponding to the feature edges from the information Freestyle can provide.

Freestyle feature edges are ordinary straight edges between two vertices.  It would be possible to map the feature edges to input mesh edges (to some extent, because the mapping involves comparison of vertices that are floating-point real numbers).  To make it possible, you need to apply all mesh modifiers, since there is no way to select dynamically generated edges (e.g., by a subsurf modifier).  Anyway some programming effort using the Blender Python API is required.

Depending on your application requirements, another solution could be to visualize Freestyle feature edges by creating a new curve object.  The script viewmap_to_curve.py shown in this link is a style module you can use as it is in the Python Scripting mode of Freestyle.  All visible feature edges will be converted into a single curve object named Viewmap at the location of the feature edges in the 3D space.  This allows you to look at the feature edges from a different view point (as illustrated in this blog article).  By a bit of Python programming to extend the script, it is possible to select feature edges of a certain edge type, e.g., to visualize only silhouette lines.


Problems Exporting FBX from Blender? Hello I have been having some problems exporting my fbx model from blender to unreal. In blender there are no issues, but when I import it into unreal, the front part of the mesh is extruding.

Any Suggestions? Thanks for reading this!

Possible solutions:

apply all modifiers before exporting
apply rotation location and scale (ctrl+a)
Check your export options in Blender
When importing in UE4, import the skeleton first and then the skeletal mesh


How to combine images using Python I have a couple of images in a python script that I want to add together. Here is a rough example of what I want to do. All the image variables are of the type bpy.types.Image:

final_image = bpy.ops.image.new(name="lightmap.png", width=1024, height=1024)

#This line does not work
final_image = lightmap_direct + lightmap_indirect + lightmap_emissive

So my question is if there is an easy way to add these images together. I am mainly interested in the add blend mode, though others modes are also interesting.

Blender comes bundled with numpy. Image references have a property called .pixels which you can turn into a numpy array of the same dimensions. Numpy does use overloaded operators for array math. The initial setup aside, you'll see it is quite close to what you were trying.

import math
import numpy as np

import bpy

def np_array_from_image(img_name):
    img = bpy.data.images[img_name]
    return np.array(img.pixels[:])

pixelsA = np_array_from_image('A')
pixelsB = np_array_from_image('B')
pixelsC = np_array_from_image('C')
pixelsD = (pixelsA + pixelsB + pixelsC) / 3

image_D = bpy.data.images['D']
image_D.pixels = pixelsD.tolist()

# then click in the UV editor / to update the view..to see the pixels of `D` updated

Maybe this will give enough insight, and push towards learning some numpy.

This does 'mix' btw..

I'm not sure about the algorithm for add.. (below shown using material rgb mix nodes)

it's not as simple as a+b+c.  maybe something like adding the smallest value of each array:

# add smallest element values
interim_1 = np.minimum(pixelsA, pixelsB)
pixelsD = np.minimum(interim_1, pixelsC)

producing this:


Is there a way to mirror an object without using the mirror modifer? Is there a way to mirror an object without using the mirror modifier?

I have a left foot that I want to make into a right foot. I use the mirror modifier and it uses a crooked bounding box and completely ruins my foot. Even when I re-align the crooked foot, it is causing issues in the platform I'm exporting it to. So I'm wondering if there's some way I could duplicate the left foot and somehow flip it so that it "mirrors" the other foot.

Please ignore the flat feet there, I need them for when I transfer weights.

I duplicate the foot so that I don't mess up all the work I've ALREADY done over and over, and move it to another scene. This is the foot I want to mirror so that I may create a perfect opposite for the other leg. Something goes wonky when I do that. It mirrors with a bounding box even when I use empty. This causes me to have to re-align the mirrored foot. Something else is happening too because when I rez the mirrored foot alone in Second Life, it really acts weird. The original foot can be rezzed in world with no problems. This makes me feel like it's the mirror modifier that's causing all my troubles but I'm really not sure.
Here is the crooked mirrored image:

Here is the bounding box, where it shows it's crooked:

You can do this destructively by scaling around the 3D Cursor. Place the 3D Cursor at the center you want to mirror across. Next, choose the axis that you want. Hit ., to set the Pivot Point to the 3D Cursor. Finally scale it by negative 1 along the desired axis.

S then X, Y or Z then -1


mesh.edges.foreach_set() doesn't update Function to create a mesh from a numpy array.
Object gets created, but edges and verts are only shown when I toggle to edit mode and back to object mode.
Small example, run in object mode with Plane selected.
 def write_obj(verts, edges):

    me = bpy.data.meshes.new("new_mesh")
    me.vertices.add(count=len(verts))
    me.vertices.foreach_set("co", verts.ravel())
    me.update()
    me.edges.add(count=len(verts))
    me.edges.foreach_set("vertices", edges.ravel())

    obj = bpy.data.objects.new('new_obj', me)
    bpy.context.scene.collection.objects.link(obj)

def read_verts(mesh): #return np.array
    mverts_co = np.zeros((len(mesh.vertices) * 3), dtype=np.float)
    mesh.vertices.foreach_get("co", mverts_co)
    return np.reshape(mverts_co, (len(mesh.vertices), 3))

def read_edges(mesh): #return np.array
    fastedges = np.zeros((len(mesh.edges)*2), dtype=np.int) # [0.0, 0.0] * len(mesh.edges)
    mesh.edges.foreach_get("vertices", fastedges)
    return np.reshape(fastedges, (len(mesh.edges), 2))

active_obj = bpy.context.active_object
verts = read_verts(active_obj.data)
edges = read_edges(active_obj.data)

write_obj(verts, edges)

What kind of update() am I missing in my function?
mesh.update() doesn't work.
//
Okay, foreach_set doesn't seem to have a way to update.
Except toggling between object and edit mode, but that made the script really slow.
Originally I wanted to run a time comparison against from_pydata
def write_obj_from_pydata(verts, edges=None):
    if edges is None:
        # join vertices into one uninterrupted chain of edges.
        edges = [[i, i+1] for i in range(len(verts)-1)]
    me = bpy.data.meshes.new("new_mesh")
    me.from_pydata(verts, edges, [])

    obj = bpy.data.objects.new('new_obj', me)
    bpy.context.scene.collection.objects.link(obj)

Use me.update(calc_edges_loose=True). Make sure you do it after you set the edges though, not before where you currently have me.update().


Adding Shadows to Hair Particle Emitter I've been using Grass Essentials for grass in my scene, but I've recently noticed that the grass isn't casting shadows. I've added a bright light to amplify the issue below. The first image is from the rendered viewport, the second is the scene render.

Previous answers online don't seem to be of any help here.

Converting ~60,000 grass strands to a mesh is not an option.
Strand Render is no longer an option in 2.81, and isn't relevant here since this uses a Collection as the render object.
All Ray Visibility options are enabled for the emitting ground plane.

The Render settings for the particle emitter are shown below. Thanks for any help in advance.

Fixed - even though the "hair shape" doesn't directly affect the appearance of the individual strands of grass, it apparently was affecting the shadow. I just boosted the tip thickness, and radius scale of the particle emitter.


How to get a material to keep the transparent border from it's texture I tried almost everything from fiddling with import properties, to adding a Transparent BDSF (As answered in other questions I found on this site) yet nothing seems to work...

below is the picture, that appears, it's in material view, and I also tried switching to rendered view.

Here I have added a Color/Invert Node to swap the Black/White of your texture before feeding it into the Color of the Mix Shader

On the left is with the Invert node and on the right without. Showing what is and what is not being transparent.

and the final result.

FYI For more control plug the Alpha into the Factor on the Invert Node and then change the colour.


Double faces on UV map? I added seams to a cylinder that had a solidify applied to it, the inside is fine and is all connected on the UV map as it should be with the seams  I added but on the outside the majority are messed up with a bunch of duplicates that I can't delete.

If I do remove doubles it doesn't remove any verts and if I move the face either on the 3d view or the map it moves the same face with the same verts and edges connected? I've never seen anything like this...

Smart UV Project works for me on 2.79. I added a primitive cylinder Edit/Face mode/deleted the cylinder top face. Back to Object mode/added "Solidify Modifier" (BTW hate that name), applied "Solidify Modifier". Back to edit/face mode, select all/apply Smart UV Project at default settings. Result is fine.

So are you saying that the faces/verts of the outside of the cylinder are locked to the inside faces/verts?


When using the 2D tools is it possible to copy drawings into the next frame? I am going to preface this by saying I am a total begginer so please excuse any mistakes. I recently downloaded blender to create 2D animation projects and have been enjoying getting to grips with it, however, I am looking for a way to copy and paste the entire frame into the next frame too. I want to do this to 'slide' my background images to create a panning camera effect wihtout having to redraw the entire background every frame.

Any help would be greatly appreciated!

In the dope sheet, just select the keyframe and duplicate it(shift-d) to wherever you want.

I would also like to mention that you don't have to slide your objects to pan the camera(assuming your using 2.80, which you definitely should, especially for 2D animation because there is major improvements.)  This is part of the beauty of using a 3d program for 2d animation.  you can animate the camera itself.

please comment if you need more information.


Scale of Freestyle SVG export A quick question about using the Freestyle SVG exporter. What units does the exporter assign to vector objects in the SVG export file- meters, millimeters, pixels?

Suppose that I was exporting Freestyle edges with lengths that correspond to a few meters in the real world, but I haven't made a setting for modeling units in the scene- I simply adhere to a modeling practice of having 1 modeling unit correspond to 1 meter. In a graphic design program such as Inkscape I would want to reproduce the vector objects at a conventional scale, such as 1:100 or 1:50. With an orthographic camera, I would be using the Orthographic Scale setting to fit the objects into the area rendered. What would be good practice for ensuring accuracy of scale, at a desired scale?

Having made tests with SVG files produced by Freestyle, I found that:

Freestyle exports in pixels, and in Inkscape the default pixel density is 90 dots per inch. I don't know if this can be changed in Inkscape, and other vector drawing programs may use different pixel densities.

Therefore a rendered image whose pixel size is calculated in multiples of 90 will become an Inkscape sheet with dimensions in the corresponding number of inches. For example, a 900x900 px render will be 10 inches by 10 inches. 900x900 px is a practical size for a scaled Freestyle SVG export, because it gives you fast rendering and easy math.

The scaling of the camera affects the relative size of an object in the viewport, measured in pixels. When pixel densities in a piece of graphic work software are measured in imperial units and in a project you need to use exact scaling in metric units, you use the conversion factor 25.4 or its multiples in the scaling of Blender's camera. Multiply 25.4 by 2 to get scales of 1:20, 1:200 etc.; multiply 25.4 by 5 to get 1:50 etc.

This method will not support the entire range of architectural scales from 1:1 to 1:10 000, or the entire range of objects of drafting from doorknobs to urban planning proposals. In most cases you have to scale the SVG objects again on the Inscape sheet, but that's a piece of cake. This might not be the most popular use for Blender among its many uses, but I had a need for it and had fun figuring it out.

Afterword: after I posted this answer, Inkscape changed its default pixel resolution from 90 dpi to 96 dpi, to better suit web graphics. So every number 90 or its multiple in the text above should be replaced with 96, or a multiple of 96. If you open an old Inkscape file with the latest version of Inkscape, you get a notification about the change of pixel resolution.


Rigid body motor constraint reversing when crossing the 90 degree angle on the Z axis I'm experiencing some strange behaviour on a rigid body simulation. First I'll explain my situation a little bit.

There is half a cube and a cylinder, both with an active rigid body. The cylinder is attached to the cube with a hinge rigid body constraint so it can rotate like a wheel. The cylinder also has motor constraint attached to another small cube (passive rigid body).

With this setup I would expect that the wheel keeps spinning in the same angular direction but it doesn't. In the animation below you can see that the angular rotation of the motor reverses when crossing the Y axis on the world axes.

http://s27.postimg.org/4jha0ugkh/mechani_small.gif

Any idea how I can overcome this problem? I just want the wheel to be spinning in one direction while dragging the cube along with it.

UPDATE

Bithur's solution works like a charm:

http://s10.postimg.org/6jhof0buv/mechani_02.gif

Here is the file:

Changing the Object 2 to geo_body in the motor parameters seems to solve the problem


link new object to scene with python in 2.8 In Python 2.8, I would like to create copies of the object 'CubeTemplate' but am having no luck.  I have reviewed every blender.stackexchange post on this subject (this, this, this and this) but cannot get them to work - either they don't apply or the sample code throws errors (perhaps because it was pre 2.8).

The code below throws this error:

  AttributeError: 'bpy_prop_collection' object has no attribute 'link'

for x in range(1, 3):
    bpy.data.objects['CubeTemplate'].select_set(True)
    bpy.context.view_layer.objects.active = bpy.data.objects['CubeTemplate']
    me = bpy.context.object.data # use current object's data
    me_copy = me.copy()
    ob = bpy.data.objects.new('CubeCopy'+str(x), me_copy)
    ob.location = (0, 0, x)
    scene = bpy.context.scene
    scene.objects.link(ob)
    scene.update()

The issue with your code comes from an api change in 2.80.
We no longer link objects to the scene, they have to be linked to a collection.

So all you have to do to make your script work is to change your scene references to collections

You old code:

scene = bpy.context.scene
scene.objects.link(ob)
scene.update()

Replace with this:

scene = bpy.context.scene
scene.collection.objects.link(ob)

Or shorter:

bpy.context.collection.objects.link(ob)

Or if you wanted to link the objects to a specific collection you'd do this with this line:

bpy.data.collections["Collection Name"].objects.link(ob)


How to know which object is using a material How to know which object is using a material.

I know that a material is used 4 time -> picture under:

I'm searching a solution with python and I'm blocked here :

bpy.data.materials['Y.000a'].users

But this function only return the number of users and not the name.

Of course the solutions, that I'm searching for, doesn't have to obligatory use python.

The outliner is a great place to find things. Entering a string in search field located in the header not only finds items containing the string but highlights them for easy access. The search menu also offers choices for case sensitive and complete matches.

Many things can be found in the outliner - from objects and meshes to materials, textures, modifiers, vertex groups, constraints, bones and actions.

While image names used by blender internal textures can be searched, currently images used in nodes (internal or cycles) can't.


Dropping objects and groups with varying sizes and rotation to a floor with Python I'm working on a Python script for Blender to generate 3D objects based on SVG files.

One thing I'm trying to automate is dropping various objects to a floor.

Each object can have varying dimensions, and rotation based on the contents of the SVG file. Most are bezier curves extruded to different heights, that are put onto groups and referenced. I need to makes sure some of these lay on a flat floor plane.

I also have a few text objects that copy the rotation of the camera to always be aligned with the viewing X axis - I need to make sure these touch the floor, but not intersect with it.

I'm usually doing this manually, but I'd like to automate as much as I can to save myself time spent on repetitive tasks.

If I could just setup some rigid body collision, lock rotation and drop it with Bullet physics - that'd be cool. I don't think I can do that with Blender groups.

Could I maybe replace the groups with some Animation Nodes sheningans? And use that to drop the stuff to floor, while obeying the object geometry?

What would you try?

I don't know much about Python scripting so I can't help with that part but this may help you with the workflow and concepts, then you maybe able to extrapolate hot to automate this.

Group Instances are generally created from Empty type of objects, but it doesn't have to be so, Dupligroups are the underlying feature that makes group instancing possible, and can in fact be used on any object type.

You can for example use a mesh as duplicator for a random group consisting of many other objects. It will override the "renderable geometry" of the object and replace it whatever group is being duplicated.

It also has the added benefite of allowing using physics on object types that would not support them otherwise like Bezier Curves, by assigning them to the duplicating mesh instead.

Just create any mesh object shaped as desired. If you care about detailed collision physics for complex geometries, make it so the mesh is shaped roughly as a simplified bounding volume of the group it will contain.

Add the desired curves to a new group (don't forget to set up group center, sanely placed relative to the object positions), then pick that group as Dupligroup for the previously created mesh.

You can now assign any physics desired to the mesh, virtualy looking like they are applied to the group instead.

Have in mind that in this case I made a randomly shaped mesh that has nothing to do with the underlying group shape, ideally they would roughly match.


Weight colors not affecting strength of bones! I have made a model and I am now rigging it but when I change the weights of different faces it always acts like it is at 100% strength anyway. This is really annoying!

Weight painting (or assigning) makes comparison between at least two assignement, with an automatic normalization of values:
take two vertices (let we call them A and B) and two bones (boneC and boneD):

if you assign to the boneC vertex group a weight for A 1.0 and for B 0.5, and to the boneD vertex group no weights, then you move the boneC in pose mode, A and B will move exactly with it.

In the same situation let's now assign a weight of 1.0 for both A and B to the boneD vertex group: now move the bone C, 4 BlenderUnits toward left: A will move 2 BU left, while B will move 1.33333 BU only.

Consider that, in case of single wieght assignement, even a value of 0.0001 is infinitely greater than 0.0, so it will be treated in the same way as a 1.0 assignement.


How to Import a transparent .SVG file to blender, and convert it to a 3D object? Hi friendly and helpfull people in here!
I have a problem I am trying to solve for my company I am working at. The project is to make this pattern done in illustrator: https://we.tl/sr516OF9mD , to a 3D object I can wrap around the top of a 3D tin-basket. But when I import the .SVG file into illustrator, it keeps messing up with weird faces so I can't use the curve modifier, to wrap it around in a circle curve.

I have tried to go through the illustrator file, and fix the points, so the path is closed, and there is no gabs in the structure of the 2D shape, but it still seem to come out wrong when I import it to blender.
I hope someone can help me with this issue, because it is something we will do more often in the future at my job.

Thank you in advance and Kind Regards
-Anders

I've made two things in Illustrator and it was imported correctly:

Select your shape and, in the Pathfinder window, click the Unite tool.
Scale it very big (like 1000%)

then save and, in Blender, Import > SVG.

To make it a mesh: Select the object and alt C > Mesh From Curve

You can simplify the mesh a lot in Edit mode with X > Limited Dissolve, and W > Remove Doubles

It will display black even if you apply a white material but you can change it in the Properties > Material > Settings > Viewport Colors


How to model medical cloth wrapping? I am modeling a gun and from a concept that I found on the web. The gun has little strips of cloth around its handle. I'm not sure what the best way to model them is. As you can see, the straps are overlapping each other, bending, curving, and folding.

How can I model this? I would rather not use a cloth simulation.

It's suppose to be high poly model

Here is a way to do it:

step 1: get a plane parallel to what you want to wrap.

step 2: extrude the plane around the object

step 3: Add a solidify modifier

step 4: Add a loop that runs across all the faces and pull it inwards using Alt+s

step 5: Add extra support loops

step 6: Set every face to smooth shading and add a subdivision surface modifier


Selecting only the bottle's INSIDE bottom face, to form upward creating a 'hill' of glass in the bottom Looking at the picture I added to model by, you can see the bottle has a "hill" of glass in the bottom. My question is how do I 'get inside' the bottle to select only the inside bottom's top face to form upward, thereby creating a hill? Currently I have a solidify modifier added (but not applied).

Blender allows you to hide vertices for convenience in Edit Mode

Apply the Solidify modifier.

In edit mode select the vertices you do not want to edit.
Hide those vertices.  Edit the visible vertices.

Alternative.
Change to wireframe mode.  Edit mode. Select the top of the hill vertex which you can see with difficulty.  Press Control [Numeric Keypad + ] to grow your selection.  Then hide the unselected.

[Control I] can invert your selection.


About driver rotation Degree and Radian I tried to add driver to Sphere's RotateX and link it with Cube's LocationX.

However, as shown in the image below, the driver value is 4.651, but the Sphere RotateY is 266.

The value of the driver will be regarded as radians without permission.

I created and tried the following Expression and it worked correctly, is this method recommended by Blender?

var * (3.1415/180)

It's correct that the value is in radians. Blender uses radians for angles internally, since this is common practice for the calculation of trigonometric functions. The conversion to degree is only for display purposes in the user interface.

The same situation can be seen in the Python API. Assuming that you have an object named 'Cube' in your scene which is rotated 180° around the x-axis. When accessing the Euler rotation

bpy.data.objects["Cube"].rotation_euler.x

you will see that it returns 3.1415927410125732 which is a rough approximation of $\pi$.

This was previously asked on the bug tracker in T29797.


2.80 Make the data single user. Like pressing U key in blender 2.79 In 2.79 I could press U to make data single user.  How can I do this in 2.80, what is the hotkey?

From menu Object - Relations - Make single user


How can I get a model I made to look I want it to in Unity 3D? After I made a model of a cup

,

I did some work with materials, which when rendered looked this

.

When I saved my model and opened it in Unity3d, it was nothing like this . What should I do for such result in unity3d?

The last images show perspective distortion when you toggle the camera from 3d to 2d your model looks like:

You cup is almost 2m in reality this is how such a big cup appears with the given camera settings.

You receive poor topology from adding a subsurf modifier followd by a decimate modifier.


Blender Game Logic Actuator I managed to be able to control my player hand with mouse using mouse actuator.However, the hand move at the opposite direction i want. For example ,  when i move mouse down , the hand go up .And when i move my mouse around , the hand kind of turn around .

What is wrong with my actuator settings?
Here is the sample file:   http://www.mediafire.com/download/1sz9taf3bd8j28u/samp.blend

to reverse the hand direction set the sensitivity to -1.0 :

also pay attention to the local/global axis you are using ,the camera was turning in the right direction because you used the local axis while the hand local axis are not in the right orientation


How do NodeSockets determine if a link between them is possible? I have two NodeSockets class SockA(NodeSocket) and class SockA(NodeSocket).
Now when I define a Node class in a custom NodeTree with both A and B inputs and outputs, I can create links between A and B sockets.

Example code:
https://gist.github.com/IARI/fd9957b18689c2e1937233e4fcc284e0

I had instead expected, that it would only be possible, to connect sockets of the same type (or different socket types that define their compatibility somehow).

How can a restriction like this on the linkability of sockets be achieved?

Note:
I have looked through the source of animation_nodes for some time.
it seems to define this restriction with variables on the sockets like this:

dataType = "Color"
allowedInputTypes = ["Color"]

AN source: https://github.com/JacquesLucke/animation_nodes/blob/master/animation_nodes/sockets/color.py#L9

However, by checking the source for these variable names, I could not find any place where this would be enforced by the AN code, so I am left puzzled.

Here's a rough proof-of-concept: https://gist.github.com/Theverat/f6c30469e22e03202dd429fe19b24c83
See my revision for the changes I did: https://gist.github.com/Theverat/f6c30469e22e03202dd429fe19b24c83/revisions

Basically, the node tree offers an update method which does not tell you what exactly happened, only that something happened.

But each node offers an insert_link method, which tells you about a link before it is inserted. So in this method you can not delete the link, or prevent it being inserted, you can only log it in your nodetree as new (or flag it for deletion).

So when the user creates a new link, this is what happens behind the scenes:

insert_link is called on the node the connection is coming from
insert_link is called on the node the connection is going into (Note: the link is the same, so you should prevent a duplicate insertion into the list of new links in the node tree)
update is called on the parent node tree of these nodes


slicer apprixmation for 3d print I have a problem when I design models for 3d printing: I always add features that are too small for my printer settings.  Is there a way for me to visualize the resolution of my printer.  I imagine splitting the scene into voxels of size .1 mm cubed, and then viewing only the voxels with intersect with any of the objects in the scene.   Is there anything out there that is even close to this?

It may not be 100% accurate but the Remesh modifier could give you a idea of what the 3D printed object would look like.

To get the voxeled style, choose Blocks from the Mode menu.

To get the right size I would add a voxel-sized cube (whose dimension can easily controlled in the Properties panel) as reference, then tweak the modifier's parameters (start from the the Octree depth and than refine with the Scale) till the subdivision are about the same size of the reference cube.

Warning: if you alter the object's bounding box size, you must re-eyeball the subdivision rate.


Automate random shape generator and export viewport render with python I originally thought I could just keyframe and export the animation of the 'random seed' property of the addon but blender just gives me an error:

"random_seed" property cannot be animated

Now I'm trying to write a python script that uses the random shape generator addon and exports and saves the viewport rendered image of each shape. I want to be able to export an arbitrary number of random shapes into a series of pngs.

These are the steps I'm trying to automate:

Add random generated shape object

Add +1 to the random seed

Render from the viewport

Save it

Add +1 to the name of the image

Save it

Delete the object so a new one can be created

This is my script that's not working:

import bpy

for x in range(0,1):
    bpy.ops.mesh.shape_generator(random_seed=1001, update_draw_only=True, show_seed_panel=True)
    bpy.ops.render.opengl()
    bpy.ops.render.render(use_viewport=True)
    bpy.ops.file.filenum(increment=1)
    bpy.ops.file.execute()
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)

Is there a better way of doing this?

range(0,1) just generates a list containing only '0', so that's only looping once. I presume you had it set like that just for testing.

When I ran your script it crashed on the bpy.ops.file.filenum(increment=1) line. Changing context can be complicated, so I'd suggest instead controlling the filepath directly by assigning bpy.data.scenes['Scene'].render.filepath, and numerically increasing it yourself using the x variable.

Also, you don't need to call both bpy.ops.render.opengl() and bpy.ops.render.render(). The former is the one you want - you just need to pass it either animation=True or write_still=True to specify what it should save, while the latter render function is the full-on F12 'render', which requires a camera.

To give a different seed to the shape_generator call each time, you can use the x loop variable added on to whatever base seed you want. For example, if you loop for x in range(6) that will repeat with x == 0 the first time, up to x == 5 the last time.

Here's a version showing these suggestions.

import bpy
from os.path import join

folder = "C:\\Users\\acro\\random_shapes\\"
scn = bpy.data.scenes['Scene']

for x in range(42):
    bpy.ops.mesh.shape_generator(random_seed=1000+x, update_draw_only=True, show_seed_panel=True)
    # set the save destination:
    fname = "randomShape_%02d.png" % x
    scn.render.filepath = join(folder, fname)
    bpy.ops.render.opengl(write_still=True)

    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)


Changing viewport shading with python I am trying to change the viewport shading to "RENDERED" with python, but I can't seem to figure out how.

It seems like bpy.types.SpaceView3D.viewport_shade = "RENDERED" should do it, but this doesn't work and doesn't even give a context error.

You have to specify which 3D view you want to access.

For example, this will iterate through all the areas in the current screen and set any 3D views to rendered shading:

import bpy

for area in bpy.context.screen.areas: # iterate through areas in current screen
    if area.type == 'VIEW_3D':
        for space in area.spaces: # iterate through spaces in current VIEW_3D area
            if space.type == 'VIEW_3D': # check if space is a 3D view
                space.viewport_shade = 'RENDERED' # set the viewport shading to rendered

Update

Alternatively, you could also do the following:

import bpy

area = next(area for area in bpy.context.screen.areas if area.type == 'VIEW_3D')
space = next(space for space in area.spaces if space.type == 'VIEW_3D')
space.viewport_shade = 'RENDERED'  # set the viewport shading

Instead of looping through the whole bpy.context.screen.areas, etc, the next() method returns area as soon as it finds area.type == 'VIEW_3D'. This doesn't really affect performance for this example but it's a better way of achieving the same result. Plus, it looks neater!


Viewport position and direction How to get Viewport Position, Direction, UpVector?
For Perspective and Ortho views.

Here is explanation Screenshot:

You can get information about the view from RegionView3D which can be accessed via space_data.region_3d.

There are utility functions available in the bpy_extras.view3d_utils module.

You may get the view direction like this

r3d.view_rotation * Vector((0.0, 0.0, -1.0))

the up direction should be

r3d.view_rotation * Vector((0.0, 1.0, 0.0))

and the view location:

r3d.view_matrix.inverted().translation

Or another way

region = context.region
rv3d = context.region_data
view3d_utils.region_2d_to_origin_3d(region, rv3d, (region.width/2.0, region.height/2.0))

Despite its name, RegionView3D.view_location specifies the view target.


How to get rid of this artifact when sculpting by using multires I tried to sculpt this foot with multires, there was no problem until I save the project, then these artifacts appear. I smoothed with smooth brush and they have gone. But when I save or return to object mode, they always reappear. How to fix this?

Use Apply Base in Multires modifier's options to avoid possible artifacts for the base geometry of the mesh.

What it does is it tries to make base (unsubdivided) mesh to match sculpted mesh as much as its geometry allows. The artifact on the screenshot probably was caused by relatively big shift of the sculpted mesh regarding the base one (although generally it shouldn't happen but if it does try to make base and sculpted match as much as possible).


How is adaptive subdivision different from dynamic topology? I love adaptive subdivision. For those that don't know, its a really cool feature that lowers subdivisions to meaningless values as an object increases its distance from the camera and increases it as the object gets closer. This saves up to 90% RAM usage and can slash rendering time in half!

While this feature is cool and all, I use dynamic topology a lot while sculpting, and I was wondering if anyone could explain to me the difference on both a mesh/code/render level?

For reference (i.e. the research I've done):

Adaptive subdivision

Micropolygon displacement

Dyntopo

The difference between Adaptive subdivision and Dynamic topology is the way the surface gets subdivided. Both triangulate the mesh but use different algorithms.

Adaptive subdivision:

each polygon is divided into a number of micro-polygons based on camera distance and screen pixel size
these micro-polygons are displaced at render-time with texture
the subdivision algorithm makes it easy to increase/decrease the density
resulting triangles are nice (a quad results in smaller quads that form 2 triangles each)

Dynamic topology:

the division algorithm divides the mesh based on brush size while sculpting the mesh
the created vertices are created at their final destination
decreasing/increasing resolution is done by collapsing/subdividing edges locally with brushes and globally in tool panel under Dyntopo settings
local subdivision and collapsing of edges usually create nasty geometry with long thin triangles and triangle fans.


Why is the texture paint doing this? Something has happened, this is texture paint mode. I already tried removing doubles, fixing normals...frustration supreme.

The part, which is purple, has different material applied then the rest of the dress.It's DiffuseMap.001 instead of DiffuseMap, they have different diffuse textures, so you can't paint both of them at the same time.


Curve merged but weird twist happens? So I'm making a track for my car to ride over and I've been working with curve tilt. This weird twist shows up at the point where I merge the ends of the curve together. I already tried to remove the segment and remerge (if that's a word) it. Doesn't work.
Any ideas?

I already made it cyclic and I started tilting it but of some reason It does this even when redoing the merge. There is a full twist somewhere else on the track so that is probably a reason.

Make sure that in the Global Transforms the segments have the same tilt:

When two segments have different tilt (90 and -90) you'll get a loop when you connect:

Wehn the segments have the same tilt, the segment will be straight:

If one of your segments is flipped try this:

Deselect all (A)

Select one control point and then select linked (L)

Rotate the whole segment 180 degrees by adding +180 on the Mean Tilt section.

Link it then with the other section.


not able to add a curve, the popup menu only lets me add meshes I am brand new to blender and trying to make something and I want to add a circle curve so I pressed shift+a to add it but the popup menu only lets me add meshes. If anyone could help me I would be so happy :)

Most likely you are trying to add a curve while editing a mesh in edit mode. Meshes and curves are different kind of objects and cannot be combined.
Curves can't be added to a mesh object, and meshes can't be added to a curve object.
Exit edit mode and you will be able to add a curve as a different object.
Blender has different kinds of objects, all of them have different and unique characteristics and cannot be combined into objects of a different kind:
Meshes
Curves
Surfaces
Metaballs
Text objects
Lattice
Since you are starting with blender you should take a few minutes and read through the very basics of the manual:
https://docs.blender.org/manual/en/latest/modeling/index.html
it will save you a lot of time down the line.


While trying to make a walk/run animation CTRL+SHIFT+V doesn't work correctly So, I'm following a tutorial to create a character + his walk and run animations.
The tutorial says to create half an animation and then we copy and mirror the 2nd half.
In the video - everything mirrors correctly for the guy, but for me mirrors the upper half of the body correctly (same position, angles etc. of the arms), but legs get deformed a bit.
As seen in these pictures (frame 1 and frame 9 which needs to be opposite to frame 1)

The symmetry of the IK controllers is bad, here is what we have currently:

If I delete the right leg and symmetrize the left leg, here is what I have:

Now it works correctly, except I'm not sure about your feet Copy Rotation constraint but it's another problem... (I would rather parent the feet to the controllers and give them a Copy Location with the lower legs as targets and the Head/Tail value at 1).


Gradient texture not showing up in render in Eevee So I am making this simple low poly landscape.

The large plane to the left is meant to be colored used a gradient texture, using this node setup:

However, this texture does not show up in the final render giving me just a uniform shade of purple like this:

The texture also does not show in the 3D Viewport on render mode. However it does show up in the viewport if I select the plane and switch to local editing with numpad '/'. It also shows up if I do a 'Viewport Render Image' from the 'view' menu.

So I'm guessing this is an issue with rendering settings - I have not changed any from the default for this other than changing the image dimensions to produce a square image. I am using Eevee and Blender 2.82.7. The texture does render correctly with Cycles but I would like to know why this isn't working in Eevee. Thank you in advance
James

None of this really explains the difference between Viewport and Render, but here are a couple of things to try?
Hard to tell from your render, but you may be getting your gradient OK, just along the wrong axis? Given a full 3D vector, Linear Gradient seems to select X, for mapping. If your mountains are up in Z, you might want to isolate that value:

..if you wanted your gradient bottom to top.
You're using Generated coordinates, which measure 0->1 along the each side of your object's bounding box. The origin is at min(X,Y,Z) of that box. (If you rotate the texture without moving it first, that will be the center of rotation.) So there's another possibility...
Check that box by checking 'Bounds' in the object's Object Properties tab > Viewport Display panel. If you have some extraneous geometry, and the box is much bigger than the bit of the object you're interested in, you may be at  one end of your gradient?


Is there a render DEPTH limit? I have a tall object, casting a (sun lamp) shadow onto a plane scaled at 10,000 (dimensions 20K x 20K). But the shadow is being cut off not far behind my object (I can also see this visible limit in OGL). No matter how large I scale the ground object, the shadow is always cut off at the same place. If I view from top, the entire shadow is there!  Changing Camera > View > Clipping Start and End has NO effect. So why is the depth being cut off in my OGL and renders?

Yes there is!
Select your camera and in camera tab, you can see clipping section.
Set the End to whatever you need, but not more (more number makes it harder for you computer to render)


How can I squash/deform a cube AND keep it positioned on the ground plane? My goal is to:

Flatten out a cube
Keep the cube's base on the same position of z-axis (i.e. flat on the ground plane)
Ideally, the volume of the cube should remain constant

Think of it like a block of clay slowly flowing out to the sides:

(High quality 2d sketch:)

So here is my scene: I have a "cube" (black object) and a lattice (orange object) that encapsulates the cube:

Then I:

Selected the lattice with B
CtrlP -> Lattice Deform
Added Shape Keys under menu Data: Object Data

Then I tried to transform the cube with the lattice. Here is the result:

The way the cube is deformed is perfect, EXCEPT the base of the cube does NOT stay on the ground plane -- it gets pushed down below it.

So, my question is: how can I deform the cube like this, yet keep the base on the ground plane?

You don't need a lattice you can achieve this by only using Shape Keys:

Create two Shape Keys
Move the top face down
Scale the bottom outside edges outward


How to select all faces between selected edges Is it possible to select all faces between selected edges in Blender ?

2.7x Spacebar > Select loop inner-region.

2.8 F3 > Select loop inner-region.


Are the focal length, aperture, and sensor width attributes tied together? My question is, basically, if I were to use an aps-c camera (23.6mm width) with a 35mm camera (53.55mm equivalent) at f/4 (f/6.12 equivalent) do the settings go:

Sensor width: 23.6mm
Aperture: f/4
Focal Length:35mm

Or:

Sensor width: 23.6mm
Aperture: f/6.12
Focal Length:53.55mm

or some other combination I haven't thought of?

I presume you mean a 35mm lens on the first paragraph. Yes?

The lens would be the same lens as with the aps-c camera with the same aperture. if you use a sensor width 23.6mm:  aperture at f4, length 35mm. That would give you the same field of view and the same depth of field.


Is it possible to transition from one material to another in bge? I want to have different skydomes for different areas of my game world, but I'd prefer not to have them abruptly cut from one to the next. Is there a method to slowly introduce a new material, while the old one fades away? Thanks in advance! Any help is very much appreciated!

Create a new material and apply it to the dome, then enable Use Shader Nodes on this material.

Then open Node editor and add your 2 material nodes you want to interchange and  pass them through Mix RGB node.

To switch between the materials animate the Mix Factor.


Weird Tears in terrain mesh in Render View only I used a LIDAR point cloud, imported it in meshlab, sampled (from 9 million points to about 1) and reconstructed a mesh for it, set normals, exported as OBJ, then imported it into Blender 2.76.
I have Cycles Rendering on, made a simple material in the node editor with just a Diffuse BDSF shader with a flat color and no roughness (0.1 roughness looks the same).
I get this wierd result:

This is in Render View

Material view looks fine.

What am I doing wrong?

Here is my .blend

The problem is caused by the fact that although the terrain origin is at (0,0,0), the real mesh is still very far from it.

So it seems you have to use a very large clipping range (1000000 in your case), which allows you to see objects, but reduces the depth precision. This is a known limitation of all softwares using OpenGL.

To fix it, you can:

Increase the start clipping.
Decrease the end clipping.

However, you may also have to scale the objects to see it again. (And, in your case, I would suggest you select the terrain then ShiftCtrlAltC > Origin to Geometry, to relocate the origin from afar. Then move them back to the world center.)


Why would adding a parent with Python make the child unmovable? update:

As it turns out, it was because I scaled the child object to z = 0 - c.scale(1,1,0) - scaling to non-zero works just fine

I have a child called c and a parent called p.

I use Python to create a parent-child relation.

Either:

p.select = True
c.select = True
bpy.context.scene.objects.active = p
bpy.ops.object.parent_set(type="OBJECT")
p.select = False
c.select = False
bpy.ops.object.select_all(action='DESELECT')

or simply:

c.parent = p

The parent-child relationship is established, which I can confirm in the Outliner.

If I move p in the 3D View the child c will also move, however I cannot move c - it seems locked to it's position, however when I check the locks in the Properties Editor no locks are active. I can alter the location using the transform properties in the Properties Editor, but I can't move it using the mouse. I can scale and rotate as normal though.

Both p (an empty) and c (a text) is created in Python.

If I do the same manually - create the objects and set their parent relationship, I can move the child in the UI. This is the type of relationship I dream of (one where I can move :P ).

How can I add a parent relationship from Python that lets me move both the parent (with the child following) and the child (on its own) from the UI?

Further observations: The problem seems to be in the object creation process. No matter how I parent objects that are Python-created, I end up with not being able to move the child on it's own. I even tried to use the exact same code line that the UI uses to generate the object.

This works fine:

import bpy

C = bpy.context
bpy.ops.object.text_add(location=(0, 0, 0))
a = C.object
bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0, 0, 1))
b = C.object
a.parent = b
a.matrix_parent_inverse = b.matrix_world.inverted()

As you can see:

There must be something wrong with the code you use for creating the objects.
You should try removing the parenting part of your code and see if the code around it works fine.


Reacting to changes to a Python defined RNA Property Hey I have a questions

I have a prop_search which is filled with names. Is there some kind of callback when I change the selection of the prop_search?
like I have this:

def draw(self, context):
    col = layout.column()
    col.prop_search(context.scene, "hdri", context.scene, "coll", icon='OBJECT_DATA')

can I somehow define a function that is triggered whenever I change the prop_search?

I'm pretty new to Python for Blender.

Yes, for any property, you can define a set and update callbacks.

These are functions you define, passed as an argument and called by Blender whenever the property changes.

get - you can return the value and store it wherever you like.
set - you're responsible for making sure the new value is stored/modified.
update - is called after setting, often used to ensure related data is updated.

See: http://www.blender.org/api/blender_python_api_2_75_release/bpy.props.html#bpy.props.EnumProperty

In the example above, you would have to set the callback on the hdri property definition.


Normal baking problem I've had plenty of experience and usually can troubleshoot baking problems, but this one i haven't seen before.
I'm using the 2.79 cycles renderer to bake the normals of a hi-res sculpt into a lower res mesh for use as a wrinkle map on a face, and some of it renders as usual and some of it renders negatively because i haven't perfected the ray distance, but no matter what ray distance i use most of the relevant part of the map are much smoother/blurrier than the original sculpt.
the area of the sculpt is in the top left corner, the rest is identical to the low poly.
my low poly mesh has an armature modifier and then a subsurface modifier, which i don't want to apply because of the armature and thus want to be used in the calculations. this occurs with and without the armature modifier active.

I fixed this by duplicating the mesh i wanted to create the map for, deleting the armature modifier altogether, and applying the subsurface modifier, and then the map baked perfectly. I... don't know why this worked. If anyone knows the reason this happens it would be much appreciated.


Blender Cycles: uniform position-based colors? I am trying to create an effect where I have several objects (say, cubes) which draw their color from an underlying texture.

Imagine, for example, if I had a rectangular region consisting of side-by-side cubes (or alternatively one large object with many joined cubes). I also have a texture of, say, a rainbow in front of a blue sky.

The effect I desire is that each object draws its color from the texture (i.e., a cube in the top-right corner gets the color of the top-right corner of the texture). Ideally, I would like that each object/cube is colored uniformly, say by extracting the color of the pixel closest to its position. The result would be a very grainy representation of the texture (depending on the resolution of my cubes).

Do you know if such an effect is possible in Blender Cycles?

This is just a response to mark this question as answered. The user Gorgious linked a video which showed the solution: youtu.be/05HFa3jNBH0?t=24

The trick seems to be to switch to top-down, orthographic view, then project a UV map from view, shift the UV map over the desired part of the texture, then select 'individual origins' and scale the UV map projections of each object waaaaay down. Done =)

Thanks, Gorgious!


Masking footage over 3d objects in Blender 2.8+? I don't get how to make a mask and use it properly. What I'd like know exactly is how to make a mask of a certain area of the footage, keep it tracked to the footage and make the mask layered in front of any 3d mesh.

Q: How do I create a proper mask to place any 3d object behind an element of my footage?

Load the background image in the image editor or the movie clip editor.

Set the editor in mask mode

On the image, click while pressing the Ctrl key and draw a mask for the area you want to use as foreground.

Then in the compositor use that mask to combine the foreground and background elements.


Is there any way possible to tail a falling star or comet-like particle? I am trying to set up a simple space like gravity particle system for animation, but I have no idea how to make a tail on a particle to make it look like the way I want (Including the gradient) I basically have the particle system ready, but I just don't know how to make the tail. Any help would be appreciated, Thanks!

For the particles:

Start with a sphere
move one vertex far away using proportional editing  so that neighbor vertices are also stretched proportionally

to create the cloud of particles, use 2 array modifiers to create a matrix, apply the modifiers and separate by loose parts

use proportional editing with Random and smooth fall off in order to arrange the particles. Alternatively, use Randomize Tranform.

create a gradient based shader, use Color Ramps to control color, emission and transparency fall offs (don't forget to turn Alpha Blend mode for transparency to work)

For the background:
Create a world shader based on spherical or linear gradient. Use the Vector Mapping scale, position and rotations to control gradient position in the sky.

For animation: Here is the same object used in a particle system (added plane emitter and moved camera around):


Why are there no shadows on the ground? I am new to Blender and am having some trouble with shadows. I am making an image and I have positioned my camera and models, but when I render, there are no shadows on the ground

Please help me as shadows will give my project a more professional look.
Thanks.

The reason you have no shadows on the ground is:

Because there is no ground!

You don't have any objects that will receive the shadow. Add a plane under your character.


Saving image in uv editor with seams showing When saving the png from the uv editor, how do you make sure the seams show too with the exported image?

You can't. You have to export it separately:

The UV layout isn't supposed to be contained in a texture usually. It's supposed to be a tool to help you to create the texture, not something displayed as the object's texture itself. Unless you're really going for something special.


How to get thick hairs With the hair particles. I tried to tweak the setting to have thick hairs. Im making brush. Rendering in cycles. In the rendering i have set to thick. I want to have the V shape. Growing from below and making a V shape. I do not want to use object such as cylinder etc. With the hair settings i want to get the result.

Not thick

Im looking for this type of hair setting

in render properties -> hair -> change strand to strip


Is there a kerf or shave-off modifier? Is there a modifier which "shaves" off 0.1m of every face equally? As if it were to go over every face and move it 0.1m in the negative normal direction, and clipping it properly. Displacement seems almost it, but it warps the shape unequally.
Resizing doesn't do the trick either.
Edit: I'm trying to make this keyboard 'Enter' key work. All of the other keys have the same displacement modifier. As you can see the enter key gets a weird dent from the displacement modifier.

The displacement modifier works like I want it to when I make sure that the co-planar faces are not divided, i.e. by doing a limited dissolve first, to turn the quads of the enter key into ngons.


Transforming multiple objects How can I rotate several objects around their own center point?

If I select all using A then rotate, it rotates them based off of the center point of all the selected objects, instead of all the objects rotating around their own center point.

Add an empty to your scene, then add a copy rotation constraint to all of the objects using the empty as target.


Rotate a cube around Y axis m*360 degrees in 200 frames? I have a cube that I would like to rotate m*360 degrees around the Y axis in 200 frames where m is an integer. So I go to frame 1 with the default cube, press I for insert keyframe and press rotation. Then I go to frame 200 and rotate the cube around the Y axis m*360 degrees. I know two ways to do this:

press R, Y and manually rotate it m*360 times with the mouse, click leftbutton and press I for insert keyframe and press rotation
press R, Y and type 'm*360', enter, press I for insert keyframe and press rotation.

However, only the former option works; the latter option will result in a rotation of 0 and result in no rotation. For small m the former manual option is okay, but for larg m the latter option would be more handy.

You can type m*360 directly in Transform>Rotation window. This would be the easiest and most transparent way to do that.


How to set a custom 4x4 projection matrix in Blender I have seen some questions to this topic but all of them are not satisfactory for my problem.
Is it possible to set a custom 4x4 projection matrix in Python to use for rendering in Blender? I'm not interested to manipulate single parameters (lens, shift, clipping...), I rather would like to set the whole matrix at once. Is it possible in Python or do I have to go deeper?

I would be so thankful for any informations or hints.

greetings

A camera object, bpy.types.Camera, does not expose a matrix property or anything similar. You can only change the available properties, which should be equal to what you can do via the user interface in the Object data tab.


Can't rotate objects in edit mode in Blender 2.8 So I had this problem before but in Blender 2.79. The problem was that I couldn't rotate objects in edit mode. This happened due to a shortcut i didn't know about. However there is a button in 2.79 with enables you to rotate again.

But in blender 2.8 there is no such button. There are no forums about it. Please help me with a shortcut or where I can locate the button to enable rotation again.

https://imgur.com/gallery/PyPr4K0

Please tell me how to disable this!

Thank you

Apparently I was in face select mode and my circle doesn't have any polygons...

When I changed to edge select the object rotated.

Thank you for trying to help me. I'm dumb.


Particle Info Node with several Particle systems Let's say I have three particle systems in my scene.
Is there a way of accessing the properties of each individual particle system using the Particle Info Node?
Or can the Particle Info Node only be used when one single particle system exists in the project?

Kind Regards
Ryosei

I found the answer myself:
In my case The Particle Info Node attaches to a material setup for the instanced mesh object used in one of the Particle systems. Therefore the Particle Info Node can only be relevant for that particular particle system.


How to use procedural light cookies (Blender Internal) I am trying to implement some of the tips in this lookdev article, and the first thing I tried is "noising up" my spotlights with a cookie.

I have figured out that all you really have to do is add a texture to a light.  But what I don't understand is how to noise it up without altering the light color.  What is the normal setting for light cookies that add slight intensity variation to a light?  Am I supposed to just set the color to grey?  Or is color supposed to be off and RGB-to-intensity chosen?  That only seems to work with colored noise.  Lastly, I assume it is like Ambient Occlusion where you want to darken with the multiply mode but I can't find tutorials either way.  Any help is appreciated!

The easiest way would be to put a sub-divided mesh in front of your light, with a multi-slot material bank associated to that mesh. Then all you would have to do in each material slot is give each their own alpha value, then do a random face selection for each slot and assign it to the selection.

Just make sure that your material is equally RGB (R=G=B) for each slot, and you won't modify the color, only the tint/intensity.


Creating a driver on a constraint with python? I have the following code and want to add a driver to the rest length of the stretch to constraint (bone constraint), but the console says that the property path is invalid. What am I doing wrong?

armature = Name of my armature
str(GrpName)+"_bone" = Name of the armatures bone

BaseLenghtDrv = bpy.data.objects[armature].pose.bones[str(GrpName)+"_bone"].driver_add('pose.bones["'+str(GrpName)+'_bone"].constraints["Stretch To"].rest_length').driver

The code before the driver_add parentheses is definitely correct, I tested it with the rotation quaternion of the bone and it worked. But it doesn't work with the bone constraint.

Add the driver to the object, the data path is relative to that:

# We want Object.pose.bones[...].constraints[...].rest_length
# So use an object and the data_path 'pose.bones[...].constraints[...].rest_length'

BaseLenghtDrv = bpy.data.objects[armature].driver_add('pose.bones["'+str(GrpName)+'_bone"].constraints["Stretch To"].rest_length').driver


Set origin to 3d cursor(3d cursor became the origin) I was want to change the origin to where the cursor is, I did from Object>Set origin>Origin to 3D[enter image description cursor.
But after that, The 3D became the origin and I can't change from Object>Set origin.
Here images if You didn't understand.

Oh, I got the answer It's really easy you just should change it to active element or individual origins.


Blender Cycles render-> Different result between screen image and saved jpg file Render screen image is different than saved file.

Any way to correct it ?

I have changed my Preferences/Screen to sRGB color profile. So, Blender and OS X use same color profile


Appending an object brings duplicated objects I have a scene with three sets of three bricks, nine in total. I created eight of them by duplicating the first one and modifying them. In another scene I append one of the bricks. I get the brick I want plus the brick(s) that were used to create it.

How can I correct this?

In the bricks file I have tried Make duplicates real and also Make single user.

To summarize the answers in the comments, it looks like you can solve the problem by simply deleting the erroneously copied brick(s).

To avoid this problem entirely in the future, you can used an Array modifier on the bricks, then separate them into individually manipulatable meshes using the techniques outlined at How can I use an array modifier to create individually manipulatable objects?.

A third option, depending on the kind of manipulation you are doing to the brick meshes, would be to automate the randomness of the bricks using a Displace modifier (applied after applying an Array modifier). In order to make each one of the bricks have a different deformation, set the Displace modifier setting 'Texture Coordinates' to object and select any object in your scene (though preferably an empty).