Can you access the distance values from the numeric input? in my Blender 2.92 scene file, you can find the numeric input in the top left corner of the viewport (important, the numeric input only shows when transforming an object). what i'm inquiring about, is the local information displayed by the numeric input. using the cube with a random orientation, i can transform the object a distance of 1 unit along the local y axis ...regardless of the objects orientation, the numeric input will then display a distance value of 1 (or -1 depending on the direction we moved the object) as well as the normalized distance value of 1. although the transform channels themselves update to reflect the objects new world position, i'm actually trying to save that distance value from the numeric input.
does anyone know if this information is stored somewhere? i'm specifically looking to create a custom property that stores the distance values, and it needs to update based on user input in real-time. i'm understanding this as something that could become quite complex to develop from scratch, but the numeric input already shares all of this information in real-time. any insight into this inquiry is much appreciated!

From the window manager's operators collection.
A very simplistic answer to how to get the values used in the transform translate operator. Other things to consider would be looking for edit mode switches. How to keep track of what objects have context at the time etc
Looking in info area after translating will see the python name of the operator, from which we can get the idname
>>> bpy.ops.transform.translate.idname()
'TRANSFORM_OT_translate'

Make some moves.
Translate 4 locally in $Y$ GYY 4 ,then -5 locally in $X$ GXX -5  and finally 3 in $Z$ GZZ 3
Get the details from python console.
Off to the python console, and get the details of the translations made using operator via UI above.
>>> wm = C.window_manager

>>> for op in wm.operators:
...     if op.bl_idname.startswith('TRANSFORM'):
...         props = op.properties
...         props.orient_type, props.value
...
('LOCAL', Vector((0.0, 4.9, 0.0)))
('LOCAL', Vector((-5.0, -0.0, -0.0)))
('LOCAL', Vector((0.0, 0.0, 3.0)))

Another option is
>>> wm.operator_properties_last("transform.translate")
<bpy_struct, TRANSFORM_OT_translate at 0x7f0df251cb48>

>>> props = wm.operator_properties_last("transform.translate")
>>> props.value
Vector((0.0, 0.0, 3.0))


When should custom-properties be used instead of 'bpy.props'? Python has two ways to define your own properties.

Via bpy.propsAccessible from data-editor, or via buttons defined in scripts:

# define the property
bpy.types.Scene.my_prop = bpy.props.BoolProperty()
# set the property
bpy.context.scene.my_prop = True

Via Python's __getitem__/__setitem__Accessible from custom-properties panel:

# no need to declare it.

# set the property
bpy.context.scene["my_prop"] = True

What should be considered when choosing which one to use?

Definition

bpy.props need to be defined.  eg scene.myprop is not available to scripts until it is defined via bpy.types.Scene.myprop = bpy.props.BoolProperty()
It is however saved, once set in a file, and the set value can be retrieved once defined again.

Type Casting

Properties defined using bpy.props are type cast, and expect a value of that type, or are converted

>>> C.scene.my_prop = 1
>>> C.scene.my_prop
True
>>> C.scene.my_prop = "XXXX"
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct: item.attr = val: Scene.my_prop expected True/False or 0/1, not str

Custom props

scene["my_prop"] = 1
scene["my_prop"] = "XXXX"

Scope

bpy.props are defined for all objects of that blender type, for your example scene.my_prop will be available to all scenes, whereas scene["myprop"] only for the scene instance it is defined on.  I choose custom props for more "one off" usage.

Update Method

An update callback method is available to bpy.props properties.  This is a very useful tool, that is not available to custom properties.  Similar to using an "on_change" event handler.

def jangle(self, context):
    print("update called on scene ", self.name)
    # do something based on the value of "my_prop"
    if self.my_prop:
        print("It's on")
    else:
        print("It's off")
    return None # always return None from an update.

bpy.types.Scene.my_prop = bpy.props.BoolProperty(update=jangle)

UI

both can be decorated in the UI, to some extent.  To add a name and description to each.

bpy.types.Scene.my_prop = bpy.props.BoolProperty(name="My Property",
                       description="This is my bpy.props boolean prop")

and for custom props

    rna = {"name": "My Property"
           "description": "This is my custom boolean prop",
           # can also store other data that can be set by script
           # and used as a driver var
           "anyolthing": 13
          }

    scene["my_prop"] = False
    if "_RNA_UI" not in scene.keys(): #  keys() returns a list of id props
        self["_RNA_UI"] = {}

    # define the UI propeties of "my_prop"
    self["_RNA_UI"]["my_prop"] = rna

note the rna_ui dictionary can have self defined property names, as long as the data type is int, float, bool, string.  They will not effect the UI, but are a handy way to store "hidden" data.  The rna dictionary is a handy way to update the min and max and description on a per property basis, to make descriptive and effective visual sliders for instance.

rna Access

Once a custom property is set, the property name will be a member of the, in this case, scene.keys() list, or as name/value pairs in scene.items()

All bpy.props properties  will be available via scene.bl_rna.properties.keys() but only in the scene.keys() list once initialized, ie given a value other than the default.


Rectangular/Portrait orientation. Is there any way to change the size of the camera? I'm trying to make a rectangular/portrait orientation style image for the camera in Blender 2.8. I've tried adjusting the aspect ratio, but all it does is the stretch the image. Is there any way you can adjust the size of the camera?

How it is now.

How I want it to be.

Flip/Invert the Resolution X & Y properties in the Dimensions Panel (Properties > Output > Resolution).


Baked normal map partially inside out (Blender/Unity) I'm baking a normal map using a high-poly mesh and a low-poly mesh. Things seem to work out, except some UV-islands are... inside out?

In unity it looks like this:

The left image has normal map strength set to 2.0 (exaggerated for clarity) while the right image has normal map strength -2.0

As you can see, in the left image the left wing is inside-out while the right wing is correct. In the right image it's vice versa.

I have tried normal recalculating, flipping etc.

Thank you!

So apparently a thing that can happen is that the unwrap algorithm puts down some islands mirrored. A way to see this is to view the model with the grid texture and look for flipped letters/numbers.

Hope that helps someone out there!


Rotate object on local axis using a slider I have an object already rotated on X,Y axis and I'm trying to find a solution to use the value of a slider to rotate this object on it's 'Z' local axis.

I've made an little script to explain my problem. You will have the create a new scene, rotate the default cube using RR on all axis, then use the script :

import bpy
from bpy.props import FloatProperty
from mathutils import Vector, Matrix, Quaternion, Euler
from math import degrees, radians

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        obj = context.object

        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        row = layout.row()
        row.prop(obj, "name")

        row = layout.row()
        row.prop(context.window_manager, "rotate")

def get_rotation(self):
    try:
        rotate = self["rotate"]
        #-- Here, the cube is always spinning...
        #obj = bpy.context.object
        #obj.matrix_world *= Matrix.Rotation(radians(self["rotate"]), 4, 'Z')
    except KeyError:
        self["rotate"] = 0
    return self["rotate"]

def set_rotation(self, value):
    self["rotate"] = value
    #-- Here, it's working at the beginning, but fail when going toward 0.
    obj = bpy.context.object
    obj.matrix_world *= Matrix.Rotation(radians(self["rotate"]), 4, 'Z')

def update_rotation(self, context):
    pass
    #-- Here, it's working at the beginning, but fail when going toward 0.
    #obj = bpy.context.object
    #obj.matrix_world *= Matrix.Rotation(radians(self["rotate"]), 4, 'Z')

def register():
    bpy.types.WindowManager.rotate = FloatProperty(name="Rotation", description="Rotate object.",
                                                    get=get_rotation, set=set_rotation,
                                                    update=update_rotation)
    bpy.utils.register_class(HelloWorldPanel)

def unregister():
    del bpy.types.WindowManager.rotate
    bpy.utils.unregister_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

As you can see, when using the script, the value of the slider will be add to the rotation, instead I would like the rotation to match the value of the slider. I've tried with an update and the getter/setter, but i failed to find a solution. I don't know if it's possible without an operator. thanks a lot for your help.

By using obj.matrix_world *= Matrix(...) you apply the rotation on top of the existing matrix, which explains the behaviour you're seeing.

Rather than changing the matrix, why not go to the source of the rotation itself, the rotation_euler property? You can just do obj.rotation_euler.z = radians(self["rotate"]) and let Blender to do the matrix math for you.

Alternatively you could use a driver that reads that particular window manager property.


Is there a way to scale up a collection of objects individually in random intervals A bit of a complicated circumstance Ill try to explain as best as I can.  I've got a collection of 300 objects that are different shapes and sizes each in a particular location.  I want to keyframe to have their scale start at zero and become one over 40 frames.  For each of these objects I want to randomly have this animation occur on the timeline eg: object 134 starts scaling at frame 34 and object 222 at frame 53, etc.  Is there any way to achieve this?

your collection should have the name "Automatic_frames" (or you just change the name in this script to your collection's name).
It does not check, whether you already have keyframes...so if you ran it twice, each object will scale two times and might overlap. Of course you can change the frame_from range to your needs.
you can do it like this:
import bpy
import random

for eachObject in bpy.data.collections['Automatic_frames'].objects:

    frame_from = random.randint(100, 400)
    frame_to = frame_from + 40

    eachObject.scale = (0,0,0)
    eachObject.keyframe_insert(data_path = 'scale', frame = frame_from)

    eachObject.scale = (1,1,1)
    eachObject.keyframe_insert(data_path = 'scale', frame = frame_to)

possible result:


How do I smooth out two objects (with low poly) that have been unioned in blender 2.8? I'm creating a character for a new game I'm developing and the character is supposed to be very round with plump arms and legs. When i tried to boolean union the round head with the round body it became jagged. I think it's because of the vertices and their connections but I even if I'm right I don't know what to do about it. Any suggestions and is it something that can be solved by sculpting, modeling, or both?

The goal is to have the character rigged and animated so just having a temporary visual modifier isn't what I'm going for. I just want the head to rest on the body but still be able to move it around when I rig it.

I also need to add arms and legs to the main body mesh too.

I put the blender file here in case anyone wants to take a look.

You can join two spheres this way and adjust for your character as the process should be the same.

Create a sphere with 16 segments and 8 rings

Create a second sphere half the size

With the smaller sphere selected go into edit mode and line up the edge loop with the larger sphere. You can do this by eye

Add a boolean union to the large sphere and select the small sphere to join

Apply the boolean and shade smooth with a subdivision surface x2

To transform the body I would add a lattice with a vertex group on the base mesh to limit the lattice influence and this way you keep the head round

you can then transform the body shape as required


How do you render a stereoscopic image? I want to create a 3D animation, but by 3D I mean if you had a 3D tv/screen you could watch it in 3d. From my research in 3d video files they are just regular formats like .avi but they have 2 frames for every one frame of movement. To do this in blender I could put 2 cameras slightly spaced out from each other but how could I get them to both render a image for each frame? Can this be done in regular blender or do I need a plugg-in?

You could use two scenes two render two cameras (see Different camera settings for different render layers?)

However, this is a feature that is currently being developed, so you could try one of the development versions.


How to show more digits in blender when working at a small scale How can I get more digits in the user interface for modeling.

Of course we can scale up the scene always, but that is just annoying, I like to work in millimeters for example which is possible with the Metric settings in blender, but the UI only shows floating point up to 3 digits?

Is there any way of improving this? Especially the scale in the transform property tab only shows 3 digits, that's annoying :-)

In the Units section, select not only metric, but change the scale to .001 to work in milimiters instead of meters.

You should be able to work numerically in a very small scale then.

Doing operations using keyboard shortcuts works now at the scale you've set, meaning that if you want to move something 2mm in the X axis, for example, you'd press GX2

To make navigating and manipulation easier, remember to set the scale of the 3D viewport as well.


How do I switch low with highpoly models? I've heard this trick at the conference, but I can't remember it nor find the video.

I have 300 instances of the same linked group in a scene and I want to use a low poly version for the camera work. Then I want to switch to highpoly for the rendering.

I could do it with layers, but I want to switch between the groups. This is possible by changing one name somewhere. Does anybody else remember?

I don't know how it was done in the Conference video, but this can be achieved using Blenders handler functions. Handler functions are Python functions which you can hook up to events happening in Blender. You can find a list of them when calling Auto Complete from the Blender Python console using this:

bpy.app.handlers.

and then press Ctrl+Spacebar. In this case I will use render_pre and render_post. A simple script showing what you want in action would be this (paste the Code into a text Editor and run it):

import bpy

def switchGroups(_LowDetailName, _highDetailName):
    for _o in bpy.data.objects:
        if _o.type == 'EMPTY':
            if _o.dupli_group.name == _LowDetailName:
                _o.dupli_group = bpy.data.groups[_highDetailName]

bpy.app.handlers.render_pre.clear()
bpy.app.handlers.render_post.clear()

bpy.app.handlers.render_pre.append(lambda x: switchGroups('Cube', 'Dragon'))
bpy.app.handlers.render_post.append(lambda x: switchGroups('Dragon', 'Cube'))

In this example I replace a group which is visible in the ViewPort named 'Cube' with a group called 'Dragon' at the time Blender initializes a final rendering using F12. To adapt it to your situation, replace the names of the last two lines with whatever group you want to replace. To make this work more efficiently, coding an Addon with replacement lists would definitely be a solution, but it is out of scope for this answer  :)


Center array of objects in relation to another object I started to play around with Blender's Array Modifier and created an array of four cylinders which worked quite well.

However, I want to center that array on the top face of the object below the array in both x- and y-direction.

Since I have a 3D-CAD and some Inkscape background I am looking for a function like "center object" or "align object" which I can provide the boundary faces or edges to but was not able to find such a function.

How could I achieve the desired result? Is there a function I missed or if not, what is a preferable workflow for doing such alignment tasks?

As I said, coming from a 3D-CAD background, my first impression to Blender is that it seems to "think" somehow different...

Press Space and write align objects into the search box that appears, then Enter

Then on the undo panel on the bottom left click on X and then Shift-click on Y

Finally to place exactly on top, enable snapping to vertex and move along the Z axis only (either by dragging the arrow or with G Z

The place where the mouse is when you hit G usually denotes the vertex you want to snap to the point the mouse is when you click to release. I say usually because depending on the camera angle blender might misunderstand your intentions.


Objects not rotating or scaling in viewport My issue is that I have a blender file in which cameras and lamps do not move when I attempt to rotate them using the mouse. If I select the objects (in object mode), press R, and move the mouse in the viewport, the lamps and cameras don't respond; they remain in the same orientation as when I started, no matter how vigorously I try to move the mouse. The values in the information bar show that the mouse is communicating. If, however, I manually enter a new value for the amount of rotation in the properties shelf of the viewport, the camera moves to the new orientation.

On a new default Blender scene, the cameras and lamps do respond to commands to rotate and scale using the mouse. I've compared all of the settings I can think of, and don't see anything obvious that corrects the problem.

~.blend file is available.

Untick Maniplulate center points in the header. This transforms center points only and allows you to manipulate object locations while having the objects themselves stay in their existing orientation.


Why are my model's eyes deforming so badly? Hi this is my first time here. Here's a link to my blender file: https://drive.google.com/file/d/15_xVOwmepXe2CiXFKlFMJegP9Y9e_Ay0/view?usp=sharing
So my problem. I have been trying to weight paint the eyes of my rigify-ed character for way too long and it feels like nothing works the way I'm expecting it to. I'm not sure how to explain it, but when I move the controls to test "blinking" the mesh deforms way way too much, as if it's being affected by somewhere else that I can't find? I'm also finding it impossible to get the upper eyelid to deform evenly between the three vertex groups. I feel like I've checked a million tutorials and can't figure out where I'm going wrong.

If anyone could help me out I would be eternally grateful because this is really driving me insane. Thank you!!

Yes, the weight paint is messed around the eyes and brows. The top eyelids have too little influence and the bottom brow bones have too much. That's normal, more or less. Furthermore, the mirroring is messed up. But it can be fixed with some manual weight painting.

Topology fix
Before you start weight painting you should have a look at the mesh first. Because there is still some asymmetry going on, a little weird shading, and the horizontal edge loop of the top eyelids goes zigzag. The reason could be the extra edge you have there. (I had only noticed it afterwards when I had finished the weight painting.)
Your mesh has an extra edge "loop" (marked pink). Actually, it's not a loop just a few edges. Because of this, the top eyelids have 6 and the bottom lids have 5 edge loops. And the top lids have an N-gon (yellow).
For a clean topology, the top and bottom eyelids should have the same number of vertical edge loops. You can make that extra "edge loop" a full loop. This should improve the deformation.
Last but not least, check the size of your model. She is tiny, 2 cm tall. I am not sure if this is intended and she is a pixie?

Preparation
I would start over, drop all vertex groups of the mesh. These groups contain the messed-up weight painting. Then re-parent the mesh to the armature with With Automatic Weights. It will be still messed up but it will symmetrically messed-up ;-)
To fix the mess make a little animation and pull down the main eyelid controller (in the middle) to close the eyes (in Pose mode). It might be necessary to pull down the tweak controllers (left and right) as well a little bit. This depends on the model. Pull up the bottom lids a little. Finally, all 6 controllers (on layer 3, 3 tops + 3 bottoms of one eye) should be approximately on top of each other. The mesh of the lids will be messed up.
Weight paint
Switch to Weight Paint mode. In the Object Data Properties tab, expand the Vetex Group section. If you hover the mouse over the list you can scroll through it with the arrow up and arrow down keys. Find the eyes and brows.
Note: There are 3 top brow bones for each eye and 4 bottom brow bones. 4 bones for the top eyelid and 4 for the bottom eyelid around the eye. The top brow bones are ok, but the rest need some corrections.
Settings
Before you fix the weight paint, make sure you have Mirror X turned off, Vertex Group X turned on, Topology Mirror turned off, and Auto Normalize turned on. Note: These settings are for Blender 2.92 and look & behave differently in older versions.
Settings for Blender 2.92.
If the brush doesn't work make sure that Vertex Selection is turned off:

Painting
Start with the top eyelid of one eye. Give the bones more influence and the brows bones less. Mirroring should work for most of the time but the opposite brows might still be messed up. The reason could be the n-gons (see below). Finish one eye then you can correct the weights by painting the opposite eyelids/brows.
With help of the timeline, you can open and close the lids as needed.

Blend file:
https://pasteall.org/blend/ca3bd262bc5c472da7f214bc069fdf66


The blender won't start up I'm completly new with all of this.
I've downloaded blender from official website, but it doesn't work.

When I try to opend blender.exe it shows console for quarter of a second and closes with no notification from windows.

I menaged to catch console on screenshot, here it is.

I tried to reinstall it three times, but, sadly, nothing works

It's windows 7 64

I hope I can get some help, that would be great :)

(I'm not too good witch computer nor English, so don't get too complicated with wording please?...)

My instance of Blender mysteriously stopped working on Win 10 64-bit.  The Visual Studio debugger said, "unhandled exception 0xc0000904."

I uninstalled Blender 2.75, re-installed the MS Visual Studio redistributable (msvcr120.dll), installed Blender 2.77, went through the usual windows service troubleshooting steps starting from a clean boot.  All no help.

I finally ran the Program Compatibility troubleshooter, the diagnostics log in %appdata%/temp said "python incompatible".

So I deleted the PYTHONPATH environment variable.  Voila! Now Blender starts fine.


Appended material on object doesn't render I'm a beginner in Blender and currently I'm working on an underwater project with a short submarine animation. The underwater scene and the submarine were made seperately, I later appended the submarine to the underwater scene. Now I'm having problems with the material of the submarine not showing when rendering although in material preview it looks just fine.

I don't know what I'm doing wrong here and would really appreciate your help!

By default, render preview uses bilt-in HDR:

If you click on use Scene World, Blender will show result similar to render one:

So, if you have not proper environment for your model, and there is nothing is reflected in it, it looks flat.

So you should set up environment texture:

You can use bilt-in HDRI images from Blender folder, or download any (for example from https://hdrihaven.com)


Object location before and after parenting I've noticed this rather annoying behaviour with parenting and de-parenting of objects. For example:

Object A is located at coordinates 0, 0, 0.
Object B is located at coordinates 0, 0, 1.

If object A becomes the parent to object B, nothing happens as far as location is concerned. However, if A is moved to, say, 5, 0, 0, then B will obviously move with A. Now, if I decide that A should no longer be a parent to B and separate the two, B will return to the original location before parenting, which would be 0, 0, 1 in my example.

I assume there is a reason for this function. However, it becomes extremely annoying if I have linked and made proxies to parented objects, because as far as I'm aware, I need to make each individually linked object a proxy, and therefore the parenting data is broken and must be made again. At that point however, the new coordinates of unparented objects are made, and therefore the objects cannot return to their intended locations, which wastes time in relocating everything once more. I assume this issue also happens for other transformations such as rotations and scales.

Is there a way to work around this, without requiring the foresight to perform parenting only once all relative locations have been finalised?

Use AltP > Clear and Keep Transformation.

This will unparent the child and apply the transformation of parent.


I only see a fraction of the scene I just started to do cubes on blender... And I pressed a key(don't know which one) and I only see a part from all the scene.

I don't know how to make reference to this for searching what did I press...

Can someone explain me what did I do and how to reverse that?

Thank you so much.

Did you accidentally enable the clipping border?

AltB to clear it


Use Python to Teleport Mouse in Blender Window (like when scaling) I am making improvements to the VSE_Transform_Tools addon and I'd like to know if there is a way for me to use python to make the mouse jump to the other side of the screen when scaling or grabbing as seen in the 3d view:

Currently my addon does not have this behavior, as you can see:

Your operator should include the following in the bl_options:

GRAB_CURSOR to allow it to grab the mouse focus and
BLOCKING to prevent anything else from using the cursor

Like this:

bl_options = {'GRAB_CURSOR', 'BLOCKING'}

More info in the API documents.

As an example, you may see this in action in blender/2.79/scripts/addons/mesh_extra_tools.py


How do I get the VR Scene Inspection add-on working with the Oculus Quest 2? I am obviously missing something and need some help. When I run the blender_oculus.cmd (located in the Blender 2.90 folder) then the Oculus software launches (installed properly) and Blender launches (VR Scene Inspection add-on previously enabled). I open my Blender scene and then, in the VR tab, I make sure the camera is properly set and click Start VR Session.
After doing all this, I put on the Quest 2, which is properly linked to my PC (everything setup correctly to the best of my knowledge) and nothing happens. My Blender scene does not appear through the headset.
Did I perform all the steps? At this point should I be seeing my scene or is there something else in the workflow that I have failed to do?
Thanks in advance for the help,
Bryson

i had the same problem but i could solve it.

Switch on your HMD
You have to plug in your HMD with USB to you PC
Start Oculus Link on your HMD
Usually it should start after starting Oculus link the oculus app on windows by itselfe
Now you can start your blender scene
Start VR-Session in Blender
Put on your HMD
Enjoy

Greetings


How to Make Pose Position same as Rest Position I'm having trouble resetting the pose position (Top Picture). I want the bones to have the same position/rotation as my rest position (Bottom Picture). I've looked at all the tips and I've tried selecting all my bones in pose position by doing Alt-G, Alt-R, and Alt-S but to no avail, they didn't change at all.

Any help would be appreciated!

It looks like the only thing causing you issues is the IK constraints on the limbs. Go to each constraint and adjust the pole angle until it looks like the rest position. If you enable the display axes options you will have an easier time seeing which way you should adjust the angle as well.


Particle hair material with random streaks for Cycles I'm trying to create a black hair material with random streaks of gray. I came up with the following setup:

At first, this appeared to work well. I was using a basic MakeHuman model, separated a skull cap and another part of the head mesh for facial hair. The first test renders looked like I wanted them: most of the hair was using the black shader with a bit of the gray shader thrown in. This seemed to work the same for both the scalp hair and the facial hair (see left image below - it's kind of hard to tell with the close-cropped beard but you can definitely see the streaks by looking at at the hairline - especially in comparison to the later render on the right).

As far as I can tell the problems started when I duplicated (Shift-D) the model to create a second character with slightly different characteristics. I did make sure to create new Particle Systems and Settings for the duplicated character and gave unique names to each. However, all of a sudden, when I rendered the original model all the scalp hair uses only the black shader while all of the facial hair uses only the gray shader (see right image below). It seems the random node is no longer evaluated per particle but only per object...

If I change the position of the slider on the top color ramp (the "selector" if you will) to something like 0.1 or 0.9 then Blender will render all hair with either one or the other shader.

Any idea what might have caused this or more importantly, how I can reverse the effect? Is there maybe a better approach for the "streaks"-effect I'm looking for?

Using Blender 2.71. The model was exported from MakeHuman Alpha 7.
The scalp hair object uses only one particle system while the facial hair object has three (moustache, cheeks and soul patch).

Try using a noise texture and plug it in the factor of your mix shader.
Play with the settings of the noise texture and maybe add a color ramp in between for even more control!


Blender 2.8 which rendering + engine will give me what I want In Blender 2.8, I am trying to create a .png file of my scene.  I have been using Render > Render Image but I don't get any reasonable result (either all dark, or colors wrong, etc).  I have tried various combinations of engines and settings using the 'Z' hotkey, as follows, but I keep getting results that are obviously bad both in Viewport and in the final rendered image.

My question:  what settings/engine/whatever do I need to use to both (a) get the light/lamp working and (b) get an image that looks right and (c) having something that works as a final image?

This is what I am starting with, set to "Render" (from the 'Z' hotkey) with the Workbench engine.  Problem = the light/lamp isn't doing anything:

In the next image, I changed the engine to Eevee.  Now the light/lamp works, but the text and green color are gone.

In the final image, I changed the engine to Cycles.  Basically the same problem as picture #2.

Thanks in advance for your help!

The Workbench engine isn't meant for lighting so this isn't suitable. For Cycles and Eevee you have to create a material. You can do that in the Shading workspace.


How do you make an object local using the API I'd like to make an object (currently linked to a library) local.

I know there is bpy.ops.object.make_local function, but is there a faster solution ?

The code below works, but needs to select the object in the scene:

bpy.context.scene.objects.active = bpy.data.objects['my object']
bpy.ops.object.make_local(type='SELECT_OBJECT')

Just call make_local() on the object.

ob = bpy.data.objects['my object']
ob.make_local()


Strange lights appearing I just recently rendered this scene:

My problems is the bright spot on the bottom-right corner. The same kind of light can be seen along the cave-wall to the right.

Here's the .blend file if you wanna take a look

Thanks for any answers!

The blend file that you have provided doesn't render to the image above.  It is always a good idea to pack external files into the Blend file.  However, my guess would be the sun lamp you have in there is managing to reach that part of the scene and provide some highlights on the surfaces you are getting the bright spots on.  A quick test would be to turn off the sun and see if the bright spots remain.  If they go away then you can be sure that the sun is the source.  If you still want the bright area at the rear of the scene then you may need to rotate the sun a little or change it to a point source and add a Color/Light Falloff node into the strength.


Animate a lattice with Python Fellowing instructions found in a youtube tutorial, I managed to draw a slinky.

See my .blend (note that I did not add the curve modifier as I want my slinky to be along an axis, see below).

Now, I'd like to animate it so I could illustrate how a longitudinal wave propagates (as show in this video). For simplicity, let's consider a sinusoidal wave: the displacement field is xi(x, t) = xi0 cos(2 pi f t - 2 pi x / lambda) where f is the frequency of the wave and lambda is the wavelength (lambda f = v where v is the velocity of the wave).

My question is: how can I use Python to add keyframes so that the vertices of the lattice (and the slinky) are moved according to the displacement field?

Well, that was not easy for a beginner like me but I think I found a way. Explanations about lattice_index_from_uvw can be found in this question of mine. Just run the script once and then the handler bpy.app.handlers.frame_change_pre does the job.

import bpy
from math import cos

pi = 3.1415

lat = bpy.data.lattices['Lattice']
obj = bpy.data.objects['Lattice']

# Space

def lattice_index_from_uvw(lat, u, v, w):
    totu = lat.points_u
    totv = lat.points_v
    return w * (totu * totv) + (v * totu) + u

points = obj.data.points

Delta_x = points[lattice_index_from_uvw(lat, 1, 0, 0)].co_deform.x - points[lattice_index_from_uvw(lat, 0, 0, 0)].co_deform.x

x0 = [points[lattice_index_from_uvw(lat, u, 0, 0)].co_deform.x for u in range(lat.points_u)]

A = Delta_x / 3
Lambda = 10 * Delta_x

# Time

scn = bpy.context.scene

frame_start = scn.frame_start
frame_end = scn.frame_end

Delta_t = 1
T = frame_end - frame_start

def sine_wave(x, t, A, T, Lambda):
    return A * cos(2 * pi * ( (t / T) - (x / Lambda)))

def update_wave(t):
    for u in range(lat.points_u):
        for v in range(lat.points_v):
            for w in range(lat.points_w):
                points[lattice_index_from_uvw(lat, u, v, w)].co_deform.x = x0[u] + sine_wave(x0[u], t, A, T, Lambda)

def my_handler(scene):
    print(scene.frame_current)
    update_wave(scene.frame_current * Delta_t)

bpy.app.handlers.frame_change_pre.append(my_handler)


How to draw shapes in the node editor with python bgl I want to draw a diagram using shapes such as triangles and squares in the node editor. How can I do this?

Here is a basic bgl, blf (and gpu) example based on this answer:

import bpy
import bgl, blf, gpu
from gpu_extras.batch import batch_for_shader
from mathutils import Vector
import math

def draw_poly(coords, color, width):
    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    batch = batch_for_shader(shader,'LINE_STRIP', {"pos": coords})
    bgl.glLineWidth(width)
    shader.bind()
    shader.uniform_float("color", color)
    batch.draw(shader)

# based on http://slabode.exofire.net/circle_draw.shtml
def draw_circle_2d(color, cx, cy, r, num_segments):
    theta = 2 * math.pi / num_segments
    c = math.cos(theta)
    s = math.sin(theta)
    x = r # we start at angle = 0
    y = 0

    vector_list = []
    for i in range (num_segments+1):
        vector_list.append(Vector((x + cx, y + cy)))
        t = x
        x = c * x - s * y
        y = s * t + c * y
    draw_poly(vector_list, color, 1)

def draw_line_2d(color, start, end):
    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    batch = batch_for_shader(shader, 'LINES', {"pos": [start,end]})
    shader.bind()
    shader.uniform_float("color", color)
    batch.draw(shader)

def draw_typo_2d(color, text):
    font_id = 0
    blf.position(font_id, 20, 70, 0)
    blf.color(font_id, color[0], color[1], color[2], color[3])
    blf.size(font_id, 20, 72)
    blf.draw(font_id, text)

def draw_callback_px(self, context):

    # ...api_current/bpy.types.Area.html?highlight=bpy.types.area
    width = context.area.width
    height = context.area.height - context.area.regions[0].height

    # 80% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glEnable(bgl.GL_LINE_SMOOTH)
    bgl.glEnable(bgl.GL_DEPTH_TEST)

    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    batch = batch_for_shader(shader, 'LINE_STRIP', {"pos": self.mouse_path})
    shader.bind()
    shader.uniform_float("color", (1.0, 0.0, 1.0, 0.5))
    batch.draw(shader)

    draw_line_2d((0.0, 1.0, 0.0, 0.8), (0,0), (width, height))

    # yellow line
    draw_line_2d((1.0, 1.0, 0.0, 0.8), (width, 0), (0, height))

    # white circle
    draw_circle_2d((1.0, 1.0, 1.0, 0.8), width*.5, height*.5, 70, 360)

    # red circle
    draw_circle_2d((1.0, 0.0, 0.0, 0.4), width*.5, height*.5, 230, 5)

    # draw text
    draw_typo_2d((1.0, 0.0, 0.0, 1), "Hello Word " + str(len(self.mouse_path)))

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glDisable(bgl.GL_LINE_SMOOTH)
    bgl.glEnable(bgl.GL_DEPTH_TEST)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "node.modal_operator"
    bl_label = "Simple Modal Node Editor Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'MOUSEMOVE':
            self.mouse_path.append((event.mouse_region_x, event.mouse_region_y))

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceNodeEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceNodeEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'NODE_EDITOR':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceNodeEditor.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            self.mouse_path = []

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "NODE_EDITOR not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Documentation: https://docs.blender.org/api/current/gpu.html

Blender 2.7x

import bpy
import bgl
import blf
import math

# based on http://slabode.exofire.net/circle_draw.shtml
def draw_circle_2d(color, cx, cy, r, num_segments):
    theta = 2 * 3.1415926 / num_segments
    c = math.cos(theta) #precalculate the sine and cosine
    s = math.sin(theta)
    x = r # we start at angle = 0
    y = 0
    bgl.glColor4f(*color)
    bgl.glBegin(bgl.GL_LINE_LOOP)
    for i in range (num_segments):
        bgl.glVertex2f(x + cx, y + cy) # output vertex
        # apply the rotation matrix
        t = x
        x = c * x - s * y
        y = s * t + c * y
    bgl.glEnd()

def draw_line_2d(color, start, end):
    bgl.glColor4f(*color)
    bgl.glBegin(bgl.GL_LINES)
    bgl.glVertex2f(*start)
    bgl.glVertex2f(*end)
    bgl.glEnd()

def draw_typo_2d(color, text):
    font_id = 0  # XXX, need to find out how best to get this.
    # draw some text
    bgl.glColor4f(*color)
    blf.position(font_id, 20, 70, 0)
    blf.size(font_id, 20, 72)
    blf.draw(font_id, text)

def draw_callback_px(self, context):

    bgl.glPushAttrib(bgl.GL_ENABLE_BIT)
    # glPushAttrib is done to return everything to normal after drawing

    bgl.glLineStipple(10, 0x9999)
    bgl.glEnable(bgl.GL_LINE_STIPPLE)

    # 50% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(1.0, 1.0, 1.0, 0.8)
    bgl.glLineWidth(5)

    bgl.glBegin(bgl.GL_LINE_STRIP)
    for x, y in self.mouse_path:
        bgl.glVertex2i(x, y)

    bgl.glEnd()
    bgl.glPopAttrib()

    bgl.glEnable(bgl.GL_BLEND)

    # ...api_current/bpy.types.Area.html?highlight=bpy.types.area
    header_height = context.area.regions[0].height # 26px
    width = context.area.width
    height = context.area.height - header_height

    p1_2d = (0,0)
    p2_2d = (width, height)
    p3_2d = (width, 0)
    p4_2d = (0, height)

    # green line
    bgl.glLineWidth(3)

    draw_line_2d((0.0, 1.0, 0.0, 0.8), p1_2d, p2_2d)

    # yellow line
    bgl.glLineWidth(5)
    draw_line_2d((1.0, 1.0, 0.0, 0.8), p3_2d, p4_2d)

    # white circle
    bgl.glLineWidth(4)
    draw_circle_2d((1.0, 1.0, 1.0, 0.8), width/2, height/2, 70, 360)

    # red circle
    bgl.glLineWidth(5)
    draw_circle_2d((1.0, 0.0, 0.0, 0.4), width/2, height/2, 230, 5)

    # draw text
    draw_typo_2d((1.0, 1.0, 1.0, 1), "Hello Word " + str(len(self.mouse_path)))

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "node.modal_operator"
    bl_label = "Simple Modal Node Editor Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'MOUSEMOVE':
            self.mouse_path.append((event.mouse_region_x, event.mouse_region_y))

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceNodeEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceNodeEditor.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'NODE_EDITOR':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceNodeEditor.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            self.mouse_path = []

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "NODE_EDITOR not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Documentation: https://docs.blender.org/api/current/bgl.html#module-bgl


AO map is pixelated. Any way to fix it? (pictures below) My low poly map is fairly big and that is probably the reason. I created an image of 4096*4096 and here is the result:

Is there any good way to create a high-quality ambient occlusion map for models like this, or is upping the image resolution the only way?

Would like to make it look it like this:

Ambient occlusion has been turned on with strength of 5 in the picture above

Any suggestions?

Properties panel > World tab > Gather options : enable Falloff then play with the Distance and Strength values.

Do your test AO bakes at 5 Samples and when you are happy with the result then up the Samples to 20 or so for the final bake.

Note, enabling or not the Ambient Occlussion option in the World tab will make no difference to the bake. The Gather options will be greyed out but they can still be changed.

Normally AO bakes are greyscale, if that is what you want then put a check against Normalised in the Bake panel.


Game Engine: Can I load objects and scenes into memory? Is there an option to load objects/scenes I want to memory to prevent lags? I don't want to let all objects spawn to buffer them or other tricks. How can I do this? And is it possible to remove them from memory?
Thanks for every answer!

You want to prevent lag when changing scenes? Add them all in the first frame (so you get a massive lag spike), and have each scene pause itself. Then you can resume them as needed.

To remove it from memory, end the scene.

I don't feel that I actually understand what problem you are having.


Text turns into squares in BGE, text not visible A sample file with dynamic text was created, and works fine. The same information was added to this working file, but when "P" is pressed, the text turns into a colored square. Here's a before and after pressing "P":

The next pic shows debug information confirming the text is being changed:

In fact, this is the same with ALL the text in this file, static or dynamic. Obviously, I'm missing a setting somewhere. Any ideas would be appreciated.

I found this information on Recording number of checkpoints passed:

We first need to change the font, because the default font will not display in the game engine. (an answer by X-27)
I'm doing research on that now.

Here's a screenshot of the AlarmBox with logic bricks.

It looks like the background object is covering the text.

You need some distance between the text and it's background.


Rendering a plane plane of grass, proper particle settings, and scaling I have built out this plane of grass from this tutorial:

Create Realistic Grass in Blender 2.8 in 15 minutes
CG Geek - YouTube

https://www.youtube.com/watch?v=-GAm-7_3N6g

Here is a screen shot of my grass plane:

I suspect that my grass plane has some settings that are off...
Here is a screen shot of my particle settings:

My goal is to create a grass plane that I can then put warehouse type buildings on in order to create a layout of a production facility.

Did I set up this plane correctly?

Is the Emission>Number:Value to high?

Can I set this up so that I can just tile these planes as necessary to accommodate the size I need as I build?

This is my first posting here so please forgive any ignorance on my part.

Please let me know if there is any information I left out that is needed to analyze this.

Thanks.

As always,

Bice

The plane looks fine.

You can make the amount of grass particles lower by going to Children> and switching from None to Interpolated, and then lowering your particle number till you see fit.

You could duplicate it multiple times, and just not render your grass till the final render.


What is a color ramp? Can someone explain to me what this is, how it works, and some practical uses for it? I have looked everywhere online and haven't found anything useful. Just wanna know if it's useful or not.

A Color Ramp is used for many different things. You will use it all the time.

Here are a few examples.

It can be used to mix many different colors.

It can be used to control how much of a texture you see ie Roughness (and other inputs by clamping the white and blacks).

It can also be used as a mask to mix two materials together. By clamping down how much falloff or fade you want your texture/mask to have.

There are more use cases but here are some to get you started.


Is there a way to export the color palette (paint mode)? I often use the painting tool of Blender,while painting, based on the color I use, blender creates a palette of the color I mostly used.

Now, I would like to export this palette to  be sure to use the same color scheme for another 3D model I'm doing.

In others words, I want to export this one and then import this palette for my new project.

Here is the palette I'm talking about.
Do you know how to do that? I haven't found a way to accomplish this at the moment.

Import palette from another blend

When you'd like to save a palette using standard features press New button in the palettes dropdown list. New palette will be saved and used instead of default one:

When some changes are made so it to contain desired hues, save the file and open new one. Select option to link or append from file, navigate to that saved file and search for Palettes folder:

You will see there as many palettes as you created in original file.

Paint Palette addon

It's possible to use Paint Palette addon for that, which is bundled with Blender. Addon will save your palette in .gpl format, so you should be able to share saved palette in GIMP (or import that in Blender using this addon):

Press "+" button located leftwards to add a color to palette.
Press "Browse" button to select folder where you'd like to save and click  "Accept" there.
Press "+" button in the top right to save preset using selected path.


Need help aligning model in pose mode I'm trying to animate a model with an armature and get it to bend its knees. When I try to do this along the Y-axis, it'll have the model be skewed way to the side when I switch the camera facing the X-axis. I probably have my alignment wrong somewhere, but i'm not sure how to fix it? Here's some pictures of the problem.

I want my model to be perfectly aligned along the X-axis stead of skewed like that. Any help would be much appreciated, thanks!

I figured it out! Make sure all your bones in your armature are set to this transform.

A few of my bones had -0.00 and for some reason that was throwing my alignment off.


How to make a plane responsive to light? I need the plane color to be white and the lambs to only expose the plane beneath it. However the plane just lights up on it's own even when using really dark colors. How do I fix this? I've checked the world lighting. Emissions, and none of these are even on. I'm on cycles engine.

I'm not 100% sure what you're going for, but I made this scene with just text, a plane, and a single spotlight (Material added to the text - everything else default). This is in cycles engine, and I left my world properties panel open so you can see the settings. If you cannot reproduce, you may be suffering from some kind of bug, but I think more likely you have too strong a world background (cycles picks up even faint World Lighting), or hidden lights. Look at the example and let me know what I'm missing:


Why doesnt the color not show on my character model? Im new to blender and I first want to clarify that, because I wont be able to describe somethings properly, anyways heres the problem, I was trying to add one basic color to my character model using uv mapping just to start things off, I press "ALT Z" but the color wont show.

I confirm there is no material defined for your model.

Here is the way to create it and assign the texture:

Go to the material tab
Create a new material
Change the color, indicating you want an image texture
Choose the image
Then you can use ShiftZ to toggle the 3D view to rendering mode (you can also use material or texture modes).

The created material can also be defined using the Cycles nodes system (both UI does the same, but nodes is more clear if your material becomes complex):

Create the material
Open a node view
Choose material nodes: by default a simple diffuse setting is created
Add ShiftA an image texture node
Connect it to the diffuse color
Select the wanted image


Using image sequence of medical scans as volume data in cycles I know it's possible to do this in BI, but I need your help to do this in cycles.
For now, I have a setup to use an image sequence as volume but it only shows 1 slice/frame. I'm using generated texture coordinates for easy mapping (0-1 on each axis). The images are mapped on XY and I would like to use normalized frame# as Z coordinate to map the sequence as a volume.

Images sequence can be found here (I'm using 16-bit TIF files of MRBrain in this exemple).

Any solution is welcome but try to keep it simple and user friendly :).

Final Edit:
I had a hard time choosing between Lemon's and PGmath's answers.
Lemon's is more user friendly and flexible, and uses the image sequence without any change inside blender.
PGmath's uses a 3rd party converter to make the sequence 1 single image, but allows GPU rendering.
Well, ImageMagick's command line is : "convert +append *.tif anim.tif" from the folder where the sequence is unzipped. Not so hard. That's why I accepted PGmath's answer.

Now, i played with it, and here's the result.

The "volume" object contains the volume shader (playing with the color ramp gives funny things) and the boolean modifiers (turn them off to see the complete volume, but reduce the final density multiplier for better view).
The "Slice Control" arrow empty controls the slice position/rotation.
The "Texture Mapping" object controls...the mapping, if it need some tunning (position, rotation, scale, and then tiling if necessary?).

You can use an osl shader to do that.

The code in the capture above creates an osl node. Here are its inputs and outputs :

The input slots

Vector : the mapping position (in this config, this must be from object texture coordinates)
Directory : the folder where the image files can be found
Prefix : the image prefix (image are supposed to be in the format "prefix+counter+extension)
Extension : file extension including the dot
framePositions : the amount of position to form the file (ie to have 3 position like in "004", set it to 3)
zMax : the object elevation (I don't know if there is a way to find the object dimension and center in osl..). So for a default cube, set it to 2.
fromFrame : the first image number
toFrame : the last image number

The output slots

colorData : image data as a color output
nonColorData : image data as a non color output (here the image is encoded as non color in the tif files)

The code (see comments)

The principle is to use the Z (or here pos2) value to find the good image making the file name with it.

#include "stdosl.h"

shader volumeTexture(
    point Vector = P,
    string directory="//",
    string prefix="",
    int framePositions=3,
    string extension=".tif",
    float zMax = 2.0,
    int fromFrame = 1,
    int toFrame = 100,
    output color colorData = 1,
    output float nonColorData = 1,
)
{
    // Recenter the position around the object center to -1, 1 to 0, 1
    vector pos = 0.5 * (Vector + vector(1.0,1.0,1.0));

    // Calculate the image number
    int imageNum = (int)((1.0 + toFrame - fromFrame) * (pos[2] / (zMax * 0.5)));

    // Make a format string from the given length (ie "%03d")
    string frameFormat = concat( "%0", format( "%d", framePositions ), "d" );
    // Format the current frame/image number (ie "003")
    string imageFrame = format( frameFormat, toFrame - imageNum );
    // Make the full file name
    string fileName = concat( directory, prefix, imageFrame, extension );

    // Get the color from the texture
    colorData = texture( fileName, pos[0], pos[1] );
    nonColorData = texture( fileName, pos[0], pos[1] );
}

Here is the blend :

Don't forget to set your rendering to CPU and to check 'open shading language'.


Rendering Cycles and Internal in the same scene without compositing I have a scene that's 90% Blender Internal (for speed) with 1 object in Cycles (because that one object looks way better in Cycles). My question is is it possible for me to:
Set the single blend file rendering
Have it output the BI scene and Cycles scene into a single openEXR multilayer file

I was hoping to render everything as quickly as possible and then do a final composite after everything's rendered so I don't waste time compositing frames that might be wrong or broken. So far I've got a 3rd scene that I've been using to composite both scenes at render time so I know how to get that setup going, I'm just hoping someone can tell me how to render both scenes at the same time without having to composite them.

Ideally I'm looking for:
Scene 1 = Internal -> Outputs to sequence BI_render_.exr
Scene 2 = Cycles -> Outputs to sequence Cycles_render_.exr

If it comes down to it I might be able to do the Cycles render separately because the single object should be quite quick to do on its own but I was thinking this would be practice for a more complex setups for the future.

I have to admit I have a horrible feeling this can't be done but I just have to ask.

Thanks

If you mean without using the compositor at all, then I don't think it can be done in one go, but it should be easy to render one scene and then the other.

If you mean just without combining the Cycles BI renders, then it is possible:

File output node:

This can be done with the File output node.

Setup your 3rd scene's composite nodes like this:

Select the File output node and set the output format to Multilayer EXR. You can add inputs (layers) with the Add input button in the Properties region (N):

So if you wanted you could even put both the BI and cycles renders in one EXR sequence:

When you want to composite you can open the multilayer EXR in an Image node and get all your layers:


BGE: Change physics attributes of an object in real time. (AKA while playing) I'm trying to make a boost power up for my video game but I'm terrible at Python and couldn't do it even if my life depended on it. :| Anyway, here's my setup:

I need it so that:

The default velocity_max for my object is 50.
When the space bar is pressed AND a game property named Boost is greater than 0, change velocity_max to 70.
(The property Boost will count down)
Once Boost reaches 0 or less, the velocity_max will change back to 50, and can only change back to 70 when (as in #2) spacebar is pressed AND Boost becomes greater than 0 again.

Thanks again.

import bge

controller = bge.logic.getCurrentController()
owner = controller.owner
boost = owner["boost"]

if controller.sensors["boost"].positive and controller.sensors["is boostable"].positive:
    owner.linVelocityMax = 7
else:
    owner.linVelocityMax = 2

requires two sensors:

"boost" -> requests to boost
"is boostable" -> checks if boosting is available

this does not include counting.

Counting needs a frequent trigger otherwise you count how many times boost was requested, not how long it took. I suggest to add an always sensor with [True Level Triggering]. This way it constantly triggers the controller. The controller is simply an AND controller. There is not need to execute Python all the time.

For better reading this this is placed at a different state. Make sure both states are enabled when starting the game.

Remarks:

I suggest to call the property something like "boost energy" as I guess it should represent some sort of consumed element.

The above system (as you described) is a very easy and simple system assuming t the amount of consumed "boost" is constant. If that is not the case you can indeed create a system that takes away a part of the boost value (immediately reducing the property value) and results in a velocity change. This requires the code to run at each single frame.

I'm not sure if changing the max-velocity can be considered as "boost". The max-velocity applies to all physics calculations inclusive falling.


Hard surface modeling issue While trying to model the Mi8 HIP (Russian helicopter) I came into a few problems as the top view of the blueprint didn't seem to match inside sort of view as shown in the screenshot below, I'm not sure if its me that's making the mistake or the blueprint is incorrect. if anyone could tell me what I was doing wrong that would help a lot as this has had me confused for ages now. This question may not be entirely related to blender it is still related to modelling.
Thanks for the help :D

I see cross section number 8 like this :

The "turret" is seen in one side view and not in the other views but is there in cross-section 8.
I would use Google to find out what it is then you can decide if you need to have it in your modelor not.


What is the fastest way to do a cut extrude / inward extrude? Let's say after a knife project I have a nice region that I want to extrude. Extruding outwards along the normal works fine. Extruding inwards along -Z however does not work the way I want it to.
Starting geometry with selection to be extruded inward:

Dragging this down generates correct faces in the interior but also zero volume regions at the exterior:

Instead, I am looking for a final mesh without these exterior slivers. Similar to ZBrush's QMesh or Solidworks Extrude Cut:

This is obviously a simplified example where I can delete offending faces one at a time. What is the best workflow to either avoid these faces or quickly select them all?

Extrude the face you don't want to move then RMB to leave the duplicated edges in place.  Now select the face you want to move and you get the behaviour you want, except there is an edge loop that has been left behind.  Use Alt click to convert the selection to vertices, then Shift + Alt + RMB click the edge loop.  Translate the selection and you're done.


Glass rendering very dark/black I'm trying to achieve a basic clear glass material, but it always renders as "black" glass. I'm new to Blender, so I'm probably making a fairly simple mistake here.

Thanks for looking...

Render settings light bounces, you need to increase their count. You can increase the maximum and transmission only for glass other bounces are used in different cases.

Basically light paths or bounces indicate how many times the emitted ray will change direction (hit a surface and bounce of).

Minimum are least number of bounces / light paths emitted. This value should be pretty low for performance but shouldn't be 0.  1-2 works fine for most scenes.

Max bounces indicate maximum number of bounces. If diffuse bounces are set to 10 and Max is set to 5 the maximum will still be 5.

Transmission is for glass objects using ... Well transmission. That's exactly what you're looking for. Keep it high for such a scene.

Glossy light bounces are for reflections, you could also increase that one a bit as well.

Generally only the first 5 bounces change the image quite a lot, the further you go the less visual impact it'll have.
Performance wise it scales weirdly, the first few bounces are the most complex for the program and the rest still slow it down just a lot less.

Just don't set your bounces all the way down to just 1 - 2, it usually looks bad.  :)


How can i add specularity, shadows and decals on top of a Blender Cycles bake I want to improve my Blender cycles baking by adding specularity and shadows to make it "partially real time" and decals while keeping the lighting informations.

Switch to Blender Render or Blender Game, import your baked texture and set the emit to 1.0 to get the full lighting information. Optionally you can then import a roughness texture and set it as specular color to create some effects on the surfaces.

Add point light where light are coming from, inside a room add them on each window. Change the color to match the color of the exterior (sky, green garden, other room). Uncheck Diffuse so it will not emit light and leave the Specular checker.

Now adjust the specular intensity of your material and the hardness.

For the shadow add a sun, keep the same sun orientation that you had used for the Cycles baking and enable shadow, check Only Shadow but keep the Diffuse and Specular checked. Adjust the light intensity to contrast the shadows, set the Buffer Type to variance (to get smooth shadow borders) and adjust the settings. Use the Shadow Box to only include your level to maximize the performances or parent it to the camera and reduce the shadow box so you get shadows on close objects only.

For decays add a new texture completely transparent, you can use an high resolution, then paint or project images on your 3D model using the stencil mode. Blend the image in Multiply mode to keep the lighting informations.

You can then add post-processing filter like Bloom in the logic editor.


FreeStyle won't appear in Blender Render, pictures below? It worked before but I can't seem to get it to work again, this is the model I was using this anime tutorial  I'm not using Makehuman like him though I'm using Fuse Mixamo. I've done this before and it worked fine I've tired this with 3 models and it won't appear for some reason.

These are my settings, I've gone through the video to make sure they were correct
I'm using blender 2.72, Blender Render not Cycles.

Another issue is the render buffering. Try deactivating Performance/Save Buffers to force Blender to redraw the Freestyle overlay.

Make sure to turn this function off.


Can't make this glass bottom realistic I'm trying to get this pint glass to have the same bulbous and curvy look as the tutorial I am following but it just won't work.

This is how it is supposed to look:

And this is how mine looks:

As you can see there is a lot different between the meshes.  I got the tutorial from blender guru: Blender Guru

I've attached the .blend

I'm putting my comment here to add images to better explain what I found.

I tried briefly the same tutorial, now.

I'm rendering the result of my short test, I'll post it here soon.
edit: here it is

left is with basic diffuse ground plane, right is identical but with glossy ground plane: look at the difference... note: I didn't even add a world hdr, and not even the "fluid" inside... all could add to the result.

Although render settings in the tut seem to be not disclosed, I think your glass shows a somewhat dim lighting, almost no reflections... why didn't you set the emissions planes off camera?

but mostly the mesh seems to have a weird bottom, and seems to have almost no depth... did you follow closely the modeling workflow?

Look at this image, which I got after bisecting (it is an edit mode tool) your mesh to make more visible the inside...

I'm sure you've never seen a glass like this...

here is my attempt in comparison:


Best video format to use for multiple resavings Okay, I'm making a video heavy on special effects and each clip will probably be run through Blender at least four times.  Once for de-interlacing and setting the frame rate to 30 (I might use HandBrake for that part) once for editing, once for special effects, and once for color correction and other compositing tricks.  If I converted each of these clips to an PNG image sequence, the project would probably be a couple hundred Gigabytes.  What video format retains the most quality for this sort of thing?

Don't.

Control the rendering of your codec to a lossless stills format to load into your pipeline. Do so only after having locked your picture edit.
Save to EXR when you must save to a file format, and stay in EXR until your final grade. Even half float EXRs would be satisfactory.
Conform to a display referred format such as JPEG or TIFF at the very end. DPX is the standard here, but is likely a more complex path for reasons that are too vast to list here.
Encode from there.

If you ask a follow up question, I could give you a very standardized production pipe that might illuminate why this is advised.


How to create this wavy animation in Blender? The following animation was created in Cinema 4D. How to do this in Blender?

Plane -> Subsurf modifier + wave modifier (Y-constrained) + wave modifier (X-constrained)

Tweak values to your liking.


What mode to work on when texture painting - Solid / Lookdev / Rendered mode in EEVEE? Im creating a game asset, and i want to export it to Unity later on. So i have started texture painting this object, but as you can see it looks different when rendered compared to solid or look dev mode. I dont know which mode i should stick to when texture painting to get the most accurate colors. I guess rendered more is the best one because it will be the final render with all the lighting and etc but even though i have 3 sun lights it still looks dark compared to look dev mode (which  i prefer over rendered mode) but if its going to look really dark in a game engine as well then Im not sure which mode to stick to to see the real color/lights when texture painting. Please help!

You should paint in lookdev mode, making sure texture paint opacity is set to 0 to be able to see your full material when painting.


Blender crashes when rendering at full resolution I created a scene and after some test renders at 50% resolution, I want to render the full resolution (which is 1920x800). However, blender always crashes after a few minutes, often even before it starts sampling.
My system specs are:
CPU: Intel i7-6500U
GPU: Nvidia GeForce GTX 950M (2GB VRAM)
16GB RAM
which is a pretty low-end setup considering the complexity of my scene (about 700 million vertices), but why does blender crash? The test renders worked fine; they took around half an hour to render. What is different when rendering at higher resolutions? Shouldn't blender just take 4 times as long to render it?
I would attatch my .blend file, but it's too large (600MB)

This answer probybly depends on the scene, but I found that reducing the tasks Blender has to do helps: For me, this was turning off motion blur (which I will later add in a video editing software). Other approaches could be reducing light bounces or samples.


Subsurface creates holes in mesh so I'm quite new to blender and am now using the subsurface modifier. However, it seems like it kind of creates holes, which weren't there before. Here are some screenshots:

There are no double vertex and I have no clue how to fix that...

First problem

The order of the modifiers is important.

In your example, the quarter is first smoothed by the Subsurf, then duplicated by the Mirror.

If you put the mirror first (with the arrows right to his name), the quarter will be duplicated, then the whole table will be smoothed.

Second problem

You have an edge inside the model, it connects the vertex at the center of the hole, with a vertex above (the center of the table, i think). Removing it should fix the hole.


How do i join two texts together I have 2 texts, and I want to move them both so it looks like its just one text. How do I combine both of the texts so that I can keyframe just to one?
Do I just have to copy the numbers from one over to the other or can I combine them like I want? I have tried shift clicking then CtrlJ and it doesn't work.

The simplest way is to simply parent one to the other - transforming the parent will then similarly affect the child.

Select the second text object and then hold the shift key and select the one you want to use as the controlling object. Press Control-P to set the parent and make parent. Moving, scaling or rotating the parent should now affect the child as if they were one. If you want to link more than just two Text objects then simply select more by clocking them while still while holdig the shift key - just make sure the last one yu select if the one you want as the 'parent'.

To prevent accidentally grabbing and manipulating the wrong one, select the child and set each of the Transform Locks in the object properties panel to a padlock and you'll no longer be able to manipulate that object in the 3d view.


Find inside faces of room using Python I am currently writing a python script to automate creation of flats from polygons.
Currently I am trying to correctly identify the insides of the generated rooms.
An example for a room looks like this:

Each wall is a generated mesh with six faces. Generally each wall has one to three faces that are pointed outwards or inwards at a time. I want to correctly identify the faces that are inside, to add different materials to them, or even add baseboards to the insides of the flat.
So my question now is: Is there a way to select all faces of each wall, that is a face that points inwards automatically, using Blender Python? (Like the example below)

So with the tip from @batFINGER I was able to build a solution using scene raycast.
for obj in bpy.data.objects:

            if 'wall_' in obj.name:
                bpy.context.view_layer.objects.active = obj

                mesh = obj.data
                bm = bmesh.new()
                bm.from_mesh(mesh)
                bm.faces.ensure_lookup_table()

                for i in range(len(bm.faces)):
                    mesh.polygons[i].select = False
                    face_location = bm.faces[i].calc_center_median()

                    # side face
                    if face_location[2] != self.wall_height and face_location[2] != 0:
                        hit, loc, norm, idx, ob, M = bpy.context.scene.ray_cast(
                            bpy.context.view_layer,
                            face_location + mesh.polygons[i].normal,
                            mesh.polygons[i].normal
                        )

                        if hit:
                            mesh.polygons[i].select = True

                # toggle to edit mode
                bpy.ops.object.mode_set(mode='EDIT')

                # make sure face select mode is enabled
                bpy.context.tool_settings.mesh_select_mode = [False, False, True]

                # use second material slot
                obj.active_material_index = 2

                # assign the material
                bpy.ops.object.material_slot_assign()

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


Blender 2.8 rig not fully working on 2.79 Hey this may be a silly question but when I made a rig in blender 2.79 (I didn't use rigify) I saved it and opened it on blender 2.8 and by a habit I saved it and now I tried to open it using blender 2.79 and it didn't work when I try to open blender 2.79 it crashes but it still works on 2.8 and I tried the append trick but only parent bones worked
But the child bones worked when I selected it from the outliner tab
How can I fix this?

Blender files created with newer versions of Blender should not be opened in older versions of Blender, especially with Blender 2.8 as a lot has changed. What I recommend is having more than one version of Blender installed and/or exporting models and using them in your scenes with newer or older versions of Blender (use DAE format, etc.).


How to unattach an object and reattach it somewhere else in an animation? I made this simple example u can see below to understand the problem.

The little cube is attached to the bigger one with a child of constraint. I want the little cube to be able to move with the bigger cube, like in the gif below, and unnattach it when it reaches the top, and make it move to the cilinder from that point (I also would like to rotate, move, etc.. the little cube while it's going to the cilinder) and then attach it there to follow the cilinder.

I have no idea how to do this and would be amazing if someone could help!

Go to the last frame where you want small-cube acting as the child of big-cube.  Keyframe loc/rot/scale and the influence of your child-of constraint (at 1.0).

Advance a single frame.  With small-cube selected, use "apply visual transform" operation.  (From ctrl-a menu in object mode for me.)  Small-cube will jump; don't worry about it.

Set the influence of your child-of constraint to 0 and you'll see small-cube jump back to where it "should" be.  Keyframe loc/rot/scale and constraint influence (at 0.0).

Optionally, turn off snapping in your graph editor and move this frame's keyframes -0.99 in the graph editor's X axis.  This is to preserve smoothness of motion.

Go to the frame when you want small-cube to begin acting as the child of cylinder.  Transform small-cube to how you want it to look at this frame.  Create an additional child-of constraint, targeting cylinder, and set the inverse.  Keyframe loc/rot/scale and constraint influence of this second child-of constraint (at 1.0).

Go back one frame.  Apply visual transform, then set constraint influence (of cylinder child-of) to 0.0, then keyframe loc/rot/scale and constraint influence.

Optionally, move this frame's keyframes +0.99 in graph editor's X axis.

Make and edit whatever breakdowns you want in the period between the small-cube acting as the child of big-cube and the child of cylinder.

Optionally, after completing the animation of small-cube and big-cube and cylinder and anything they depend upon, select small-cube and use a "bake action" operation with "visual keying" and "clear constraints" to write the constraints to raw transforms.  This will prevent any issues arising from motion blur and will allow you to retime the animation to your heart's content.


How do I change the End Frame in an animation without changing the max frames in other animations within a character? In the dope sheet I selected Action Editor in the dropdown menu to animate my character with multiple different animations and they all take up different amount of frames. But when I change the End Frame of one animation, it changes all the other animations' End Frame to the one I inserted to that one animation.

Is there a way to change only one animation's End Frame?

No.

The start frame and end frame are properties of the scene. That's is why they're located in the scene section of the properties area. Each scene has its own (but exactly one) start and end frame.

Actions have no start and end frame. They are automatically starting on their first keyframe and ending on their last keyframe. If you add an action to the NLA editor these are the frames which are used for the length of the action. (You can still trim the actions used frame range in the NLA editor.)


Why are my video renders pixelated? I hope you can see how pixelated the face is. But the video file that is being used pre-render is very clear, and I can't figure out why blender is outputting such low quality.

Here's the information on the input files... (i haven't checked all of them but I don't mess with them so hopefully they're all the same info)

Quicktime
Dimensions: 1280 x 800
Codecs: AAC, H.264
Encoding software: Mac OS X 10.14.2 (18C54)

I've messed with blenders settings as much as I could, and can't seem to make it work.

Here's all my settings:

I've tried setting the output dimensions to 1280 x 800  because that's what Quicktime gives me the raw video files as... but that didn't help at all.

Any suggestions?

I'm putting these videos on YouTube if that makes a difference.

Switching the Codec to H.264 fixed the quality.


Delete images that can't be found I'm writing an add on, and in it I attempt to pack all the textures for a given model. However, sometimes my script fails because it can't find the source.

I'm wondering if there is a way in python to delete all the images that "bpy.ops.file.report_missing_files()" returns?

It isn't hard to make a list of missing images, removing them from bpy.data.images isn't always easy. The image knows how many times it is used but not where it is used, you will need to look through textures and nodes to find where it is used to clear the users before you will be allowed to delete the image.

I would suggest testing the existence of the image before packing rather than trying to cleanup the blend file. Use bpy.path.abspath() to get the true filepath for the image (this turns '//' into a real filepath) and then use os.path.exists() to check if there is a file you can pack.

import bpy, os

for i in bpy.data.images:
    if i.filepath:
        ipath = bpy.path.abspath(i.filepath)
        if os.path.exists(ipath):
            i.pack()

As you come across a missing image you could add it to a list and report the missing files when you are done. Maybe create the list in the text editor for the user to look through.


How are bones & armatures connected to the rest of a model? Let's say I'm really new to Blender, and have just barely figured out what keyframes are for. Explain a Blender skeleton to me like I'm five. Do I need to use it, and how exactly does it connect to the rest of the model?

OOOkay.This is

Armature in a Nutshell

Armatures and bones are for posing stuff, just like you would wiggle your arms and nod your head. All of your bones move whenever you move.
Same thing for blender bones, they help stuff move and get into different poses, like statues. (okay I'm gonna stop the five-year-old thing now)

All you have to do is make an armature that looks kinda like the shape of a skeleton.
See the stuff highlighted in orange? That's his skeleton. each one of those tetrahedron shapes is a bone.

you can make an armature like this by going into Edit Mode and extruding the bones by pressing E. When you do this you want to make it the shape of your model. See how it all is the shape of the robot-guy-thing? It's actually inside him, i just turned on an option called X-Ray so I could see it.

Build your armature until you think it looks good enough to be the moving skeleton of your model.Once this is completed, parent the object to the selected bones using Ctrl+P > With automatic weights.

This'll make the armature move the model when it moves. To try this, switch to Pose Mode and right click on a bone you wan to move. Press R to move a bone around, watch your model follow.

This was a very basic explanation and i'm kinda gritting my teeth right now not to write a novel on it but you'll find a lot more stuff as you get better with Blender.
If you want to see some of it, and it's pretty complicated, just search IK on this site. Your brain will go boom.

Sorry if I went to long.


Problems with Windows Aero Theme So I have this strange bug where the Windows' Aero Desktop Theme gets switched on and off everytime I open and close Blender. It's not that much of a deal, except that some animations I'm used to get somehow laggy and the overall color is much brighter (I pick dark colors/transparency on Aero for eye health).

I never really had this kind of problem before, but this has been happening since I formatted my pc and reinstalled Windows 7 and Blender again.

All drivers and software versions are up to date. I'm using a GTX 750 ti with Windows 7 Ultimate 64bit and Blender 2.77a.

Turns out it was a Nvidia Driver issue (I was using v.372.54) even though their online support denied so.

Downgraded to v.368.81 and everything is back to normal :D


How to extrude equally in all directions? I am new to blender and I'm struggling with one feature; a strip of metal going near the top of the camera body (Fujifilm s4400). My problem is that the metal strip will not extrude to a continuous length because of the curve around the camera body. To add to that when I smooth out the model I get a gap where the strip is and it curves at the end leading to a hole in the model.

Could someone guide me with what to do or edit my .blend file so that I can observe the way you do things.

Here is the blend file if you would like to have a look:

https://onedrive.live.com/redir?resid=D1676DBCF8E08414!402&authkey=!ANRCxzBWbz75GiI&ithint=file%2cblend

kind regards,

Shane.

The extrude tool can be pretty confusing when you want to do something simple like this, but if you use the 'Extrude Region (vertex normals)' function in the Tools > Mesh Tools menu, you can do it. However, there is another tool that can handle your problem - 'Shrink/Fatten'.

What I do is extrude (e), but without actually moving the extruded faces (to cancel the move hit esc), then use shrink/fatten (alt+s) to move the faces along their normals.

If you use Shrink/Fatten on its own, it won't actually create an extrusion, but can be used to move any existing face, edge or vertex along its vertex normals. I find it much less fiddly than invoking extrude along normals from the menu.


Project multiple textures during a DynoTopo sculpt? I've been messing with the UV Project modifier. This appears to require a UV map to be present for a mesh.  Unfortunately, sculpting with dynamic topology activated removes vertex data such as UV maps.

Is there some way to project (perhaps in world or generated space) one or more images onto a mesh during DynoTopo sculpting?  Optimally, I'd like to be able to project multiple images a la UV Project but I'll take what I can get.

If you will be using those images as guides to where to sculpt ,use multiple cameras and set up multiple 3d views.
with this setup you could sculpt-draw on a 3d view with the background image and see the changes on another 3d view.

use multiple cameras , each camera should load an image ,use a low opacity value and set it to display in front of everything.

you can also keyframe cameras to quickly switch between multiple angles, so that frame 1 is camera 1 and uses an image, frame 2 is another angle from another camera etc..

I don't think you can use more than one image at a time with this though.


How to Render Composite layers for timeline video creation Hi and thanks in advance!

I followed the tut to make a planet using Blender 2.8.1.16, https://www.youtube.com/watch?v=oUNfPavsViY which resulted in an image containing 2 layers, Planet and Atmosphere.  I can render each separately using cycles and see them in the compositor.  I can create a simple timeline to spin the planet 360 degrees on Z and play it in timeline.  But when I attempt to render a series of images from the timeline, it ONLY renders the frame playhead images.

How can I instruct blender to create all of the images needed for the timeline rotation?

In Output I have, Frame Start=1, End=250, Step=1, In Post Processing  I have tried with Compositing on and off and I have Sequencer Checked.

Easy Peasy - I was trying to use Render Image to render my animation sequence, not render animation.  After doing another project I realized I need to render animation either as a series of images (preferred) or as a single video output.  I was thinking that Render Animation was not for the image sequence but for the movie output.  Now I see that is part of the output format for Render Animation. ;-)


How to get glare on "Quick Smoke" (Fire & Smoke explosion) I have this question that relates to Blenders Quick Smoke tool. Recently I have been rendering CGI explosions and smoke assets to be keyed in later on a short film, but I have this small problem that I think would make the explosion look a ton better, but I just cant quite figure out how to do it. Now as we may also know using composting, you can have a glare node on specific light sources to make the scene a lot more realistic, but Im trying to figure out how to do it with explosions. As seen below I rendered out this fairly simple explosion but I would really like it to have a glare to the flame parts of it.

Thanks if anyone has any ideas, also a quick side question as well, is there a way to hide the emitter (The sphere in the middle) [Cycles]. Thanks

You can check this video, as well as increasing the emission strength of the fire material

https://youtu.be/ctd_09qHacA?t=35m3s


Are Blender 2.79 and Python 3.7.X Compatible? Blender 2.79 Reports its Python version as 3.5.3

Is the mix of Python 3.7.X and Blender 2.79 compatible? What steps should be taken? What is the estimated time for these steps?

I am not seeking to compile Blender.

I have seen this

Python system version vs python Blender internal version

If someone can confirm the above link is valid and accurate as of Date 2019-03 that would be an answer as well.

As the answers to the linked question stated, Blender comes with its own Python version. This is correct for Blender 2.7x and 2.8x.

You can have more than one Python version installed on your computer anyway, but the specific reason for why this works in Blender is a quite old concept, that dates back to the time, when shared libraries were invented.

If you start any software that uses shared libraries (or any other form of additions), it first starts to look for them in its own installation directory. If it doesn't find there, what it's looking for, it tries the directories that are stored in the user variables and then the system variables. If it still doesn't find what it's looking for, it throws an exception error.1)

In short - ideally you don't have to do anything, since Blender has its own Python version and 3.7.X makes entries to the system variables during install. However, if you want to use even more Python versions, you either need to add another system variable for each version or make use of pyenv.

1) A variant to this behavior called DLL Injection enables good things like ENB or ReShade, but also bad things like viruses.


Decrease thickness of object The following object, in obj format, is 1.6 mm thick and I want it to be 0.8 mm thick.  How do I decrease its thickness (from the inside, so that the outward appearance is still the same)?  When I go to Add Modifier->Solidify, it only allows me to increase the thickness, but not decrease it.
Note:  The suggested previous question does not help me much because I have thousands of faces along the edge to delete when in Edit mode (the original file was obj).

Decrease thickness of object

I have made a half sphere and added some solidify modifier and applied to it. To decrease thickness or shrink down the thickness. In edit mode -> select all and press Alt+S or Mesh -> Transform -> Shrink Fatten

As soon as u click on or better press Alt+S like we scale we get a arrow to increase or decrease the thickness. After click u can press F6 for operator panel or adjustments. Click Ctrl+N to flip normal.


How do I change the linear stiffness of an object programmatically? I want to programmatically change the linear stiffness of some soft body objects I'm working with. How do I do this?

Thanks!

If you simply want to batch-modify physics values on objects, you could do something like this:

import bpy

for obj in bpy.context.selected_objects:
    if obj.game.physics_type == 'SOFT_BODY':
        obj.game.soft_body.linear_stiffness += 0.1 #or whatever other operation

I'm not really familiar with the BGE, though.


How can I move the position of a cue for the second shot in a pool game I am trying to build a pool game but having difficulty with the position of the cue after the break shot. I can get the cue to move in a number of ways but none of them face the cue in the right direction. Please can anyone suggest a simple way to do this.

Maybe something like this:

A very simple rig: The bone that controls the cue is parented to another bone that represents the cue's target. You can move and rotate the parent bone to match the position of the target, and rotate it to the angle you want to strike from; the cue will revolve around the target accordingly. Then you can control the movement of the cue toward the target by moving its bone along the local Y axis.


Scale a vertex group in edit mode For the sake of increasing work speed, I am looking for a way to setup quick scaling of solidify thickness in edit mode. The context is that I'm making mesh hair consisting of lots of different strands, and editing them manually. To make this as convenient as possible, I am using very low poly flat strands with a lot of subsurf, and then solidify to turn them into flattened cylinders.

I need to be able to make the strands different sizes and thicknesses. If the solidify were applied, this could be done with Shrink/Fatten. I can scale the strands based on normals to make them wider, but their fatness is defined by their weight in the solidify vertex group (and capped by the thickness set in the solidify modifier.)

To get the full functionality that I want, I need to be able to set a hotkey that lets me adjust the value of a vertex group on my selected object. Ideally, it would multiply based on mouse movement, like most modelling tools do. But I'd settle for being able to type a number to multiply it's current weight by.

So overall, what I would need is a way to multiply the value of the selected verts within the active vertex group, and have the Factor be based off mouse or keyboard input. Is there any way to set this up? Or an addon that could do it? And if not, would such an addon be possible?

Update: It looks like Gain from the Levels tool can multiply the weights. I can hotkey Levels, and it will repeat the last Gain setting whenever I use it, so that helps. But i can't have the Gain change based on a typed value or mouse movement without clicking around a bunch.

There is a way that you can setup your screen to make it faster:

Try adding the vertex group to the Solidify modifier and set the max thickness.
Then you can either select some vertices and set the number directly or go into weight paint mode and paint in thickness.


Cleaning unwanted overlapping duplicate meshes I have a model with hundreds of mesh objects. Unfortunately I clicked shift+D to duplicate many and did not notice. Later after working a while, I was rendering, and noticed there are double meshes overlapping each other.

How can I find all duplicate meshes and delete them. I could do it manually,  just clicking,  but it would take a long time and if I miss something i will not notice.

Is there any option,  or can anybody suggest to me,  how can I find all duplicate mesh and delete them.

Model with all double (duplicate) mesh

Final Result

Following a BIG CLUE given by @rob I've slapped together a script.

Give each mesh object in selection a key faces_edges_verts, for instance the default cube would have a key "6_12_8", 6 faces, 12 edges, 8 verts.  Then check whether the coordinates of global bounding box, of any other objects that have same counts, match.

If they do select those objects to mark them as possible dupes.

To run suggest: Select all in scene, run script from text editor, and see if those objects that remain selected are dupes.... or close enough to... and then if all good hit x

import bpy
from mathutils import Vector
context = bpy.context

scene = context.scene
TOL = 1.0e-4 # reduced tolerance.

# routine to text matches on bound box.
def test(ob1, ob2):
    # test if ob1 and ob2 which have same face/edge/vert count are same
    bbox1 = [ob1.matrix_world * Vector(b) for b in ob1.bound_box]
    bbox2 = [ob2.matrix_world * Vector(b) for b in ob2.bound_box]

    diffs = [v2 - v1 for  v1, v2 in zip(bbox1, bbox2)]
    return all(d.length < TOL for d in diffs)
    #return sum(diffs, Vector()).length < TOL

obs = {}
keys = []
for ob in context.selected_objects:
    ob.select = False
    if ob.type != 'MESH':
        continue
    # make a key from faces, edges, verts
    mesh = ob.data
    key = "%d_%d_%d" % (len(mesh.polygons), len(mesh.edges), len(mesh.vertices))
    obs[ob.name] = key
    keys.append(key)

possible_dupes = set([x for x in keys if keys.count(x) > 1])
print("-" * 40)
while possible_dupes:
    p = possible_dupes.pop()
    dupes = sorted(name for name, value in obs.items() if value == p)
    while dupes:
        original = dupes.pop(0)
        original_ob = scene.objects.get(original)

        for dupe in dupes:

            dupe_ob = scene.objects.get(dupe)
            if dupe_ob.select:
                continue

            if test(original_ob, dupe_ob):
                dupe_ob.select = True
                scene.objects.active = dupe_ob
                print("possible dupe: ", dupe, " of original: ", original)

Result on your file.  Dupe objects moved to layer 3 on left.  Reduced file size from 91 to 47 meg on removal of dupes.

Updated for version 2.8

Some minor changes for the new API, notably ob.select_set() and ob.select_get() for setting and getting selection, and `@' for matrix / vector multiplication

import bpy
from mathutils import Vector
context = bpy.context

scene = context.scene
view_layer = context.view_layer
TOL = 1.0e-3 # reduced tolerance.

# routine to text matches on bound box.
def test(ob1, ob2):
    # test if ob1 and ob2 which have same face/edge/vert count are same
    bbox1 = [ob1.matrix_world @ Vector(b) for b in ob1.bound_box]
    bbox2 = [ob2.matrix_world @ Vector(b) for b in ob2.bound_box]

    diffs = [v1 - v2 for  v1, v2 in zip(bbox1, bbox2)]
    return all(d.length < TOL for d in diffs)
    #return sum(diffs, Vector()).length < TOL

obs = {}
keys = []
for ob in context.selected_objects:
    ob.select_set(False)
    if ob.type != 'MESH':
        continue
    # make a key from faces, edges, verts
    mesh = ob.data
    key = "%d_%d_%d" % (len(mesh.polygons), len(mesh.edges), len(mesh.vertices))
    obs[ob.name] = key
    keys.append(key)

possible_dupes = set([x for x in keys if keys.count(x) > 1])
print("-" * 50)
while possible_dupes:
    p = possible_dupes.pop()
    dupes = sorted(name for name, value in obs.items() if value == p)
    while dupes:
        original_ob = scene.objects.get(dupes.pop(0))
        for dupe in dupes:

            dupe_ob = scene.objects.get(dupe)
            if dupe_ob.select_get():
                continue

            if test(original_ob, dupe_ob):
                dupe_ob.select_set(True)
                view_layer.objects.active = dupe_ob
                print("possible dupe: ", dupe, " of original: ", original_ob.name)