How to create cell fracture in python Firstly, I am new to Blender. I am actually working on to create a hemispherical model with cell fractured property.
1. I have done this work manually using cell Fracture add-on and now I want to automate using python.
2. I have written the code till particle implementation on the hemisphere. Now I want to create a cell fracture with those 100 particles.
I have attached the hemisphere picture and the final output needed. I have also attached the code. Please provide me an insight on how to do this using python.
Code till Particles in Hemisphere:
import bpy

# Draw hemisphere of 1 m radius
bpy.ops.mesh.primitive_circle_add(
    radius=1,
    enter_editmode=True,
    align='WORLD',
    location=(0, 0, 0),
    fill_type='TRIFAN',  # NOTHING  or NGON
    )

bpy.ops.mesh.bisect(
    plane_co=(0, 0, 0),
    plane_no=(0, -1, 0),
    clear_inner=True,
    )

# Particles
bpy.ops.object.editmode_toggle()

bpy.ops.object.particle_system_add()

bpy.data.particles["ParticleSettings"].count = 100

bpy.context.object.particle_systems["ParticleSettings"].seed = 1

bpy.data.particles["ParticleSettings"].frame_end = 1

Image: Hemisphere with particle feature

Image: Final output required with cell fracture

Thanks and Regards,
Sunag R A.

Add particle system as suggested here Python and particle system
Make sure the cell fracture addon is enabled, and call the operator
bpy.ops.object.add_cell_fracture_objects()

Which uses defaults as mapped out in doc string
>>> bpy.ops.object.add_fracture_cell_objects(
bpy.ops.object.add_fracture_cell_objects(source={'PARTICLE_OWN'},
        source_limit=100,
        source_noise=0,
        cell_scale=(1, 1, 1),
        recursion=0,
        recursion_source_limit=8,
        recursion_clamp=250,
        recursion_chance=0.25,
        recursion_chance_select='SIZE_MIN',
        use_smooth_faces=False,
        use_sharp_edges=True,
        use_sharp_edges_apply=True,
        use_data_match=True,
        use_island_split=True,
        margin=0.001,
        material_index=0,
        use_interior_vgroup=False,
        mass_mode='VOLUME',
        mass=1,
        use_recenter=True,
        use_remove_original=True,
        collection_name="",
        use_debug_points=False,
        use_debug_redraw=True,
        use_debug_bool=False)
(undocumented operator)

Test code, produces result as in image above.
import bpy
from addon_utils import enable

# make sure cell fracture is enabled
enable("object_fracture_cell")

context = bpy.context

# Draw hemisphere of 1 m radius
bpy.ops.mesh.primitive_circle_add(
    radius=1,
    enter_editmode=True,
    align='WORLD',
    location=(0, 0, 0),
    fill_type='NGON',  # NOTHING  or NGON
    )

bpy.ops.mesh.bisect(
    plane_co=(0, 0, 0),
    plane_no=(0, -1, 0),
    clear_inner=True,
    )

bpy.ops.object.editmode_toggle()

# Particles

ob = context.object
ps = ob.modifiers.new("Part", 'PARTICLE_SYSTEM').particle_system
ps.seed = 1
ps.settings.count = 100
ps.settings.frame_end = 1

# cell fracture

bpy.ops.object.add_fracture_cell_objects()


Blender 2.8 Leaf Transparency Issue, with Eevee Somehow i'm not being able to pull this off.    I've tried searching on google for solutions but couldn't find it.   I thought the setup was quite simple, but it don't seem to work properly.

If you take a look at the image below you'll see what i mean.

I've tried changing the Blend Mode on the Settings TAB, i've enabled screen space refraction...

It seems that i'm missing out on something.     Any thoughts ?   Thank you

There are (at least) 2 reasons why they are not transparent:

your leaf texture is a .jpg file: this format can't carry transparency informations. Only .png images can have a transparent background in the image itself.
You are connecting the Color output of the Image Texture node into the Fac of the Mix Shader, but the latter needs a black and white image, where black means transparent and white means opaque. You should use the Alpha output instead, which takes the transparency of your .png texture and transforms it into a BW map for the Mix Shader


Blender object randomly invisible to camera so I spent several hours setting up a scene with exploding glass and for whatever reason the bullet is now invisible to the camera... I've done everything and before you say it no it is not turned off in the outline window.  I am at the end of my whits right now with Blender please someone be my hero.

Try appending all your objects to a new file. If it's a glitch it's a glitch and this is what usually saves my day in such situations :-) I've experienced weird behavior with visibility/renderability before...


Missing default hdri in shading option Am new to blender currently am learning from certain youtube tutorials. The problem is in all the youtube videos a shiny ball is seen the viewport of the shading option which is seen in most of the youtube tutorials, Mine is just all dark in loodevmode like that shiny ball is not showing up in the viewport, Whenever add an external hdri it is working But not getting that same result from the yt videos with default hdri. I don't know if the new 2.92 update removed it or not. I tried uninstalling and reinstalling blender but didn't work help me.

Maybe you have enabled Scene World in the Shading options for the Viewport. In this case there is only an HDRI Preview when you actually use an HDRI in your world settings. If you disable Scene World, the Viewport shows a default HDRI. If this option is always there by default when opening a new scene, you have saved it to your startup file. To change it, when you're opening a new default scene, change the viewport option, then go to File > Defaults > Save Startup File.


Problem with two displace (bottom of the sea and continents) I need mountains on land, but how? I already have one displace (bottom of the sea). Some advice, please?

Sorry for maybe stupid question. I am beginner and Czech, this is deadly combination.

If I get your question right, since displacement can have many levels...(positive and negative, it depend on the "midlevel" you choose), you could displace with an image that could displace both sea depth and land height (mountains): in the image below, with midlevel 0.5, white is above Z=0, black is below Z=0, gray is in the middle (to get Z=0 you need a perfect middle grey, so RGB(0.5,0.5,0.5))

Can this concept work in your setup?

Since you unaccepted this answer, I guess it doesn't help you really. It's ok.

To the benefit of other readers, too, looking for similar results, I'll add a more "realistic" example with a plane (I know a globe is not as simple, but a plane is simpler to understand), though, to better visualize how it can be done: it is just matter to have at least a very good gradient.

Let's build an "Island"...

I took a height map from http://www.reallusion.com/iclone/Help/EarthSculptor/Image/Utilizing_Height_Map_05.jpg

this:

and then

used it as is to create displacement on a plane
made a colored copy to texture the displacement

UV map of the texture:

then you could also paint over the UV texture to "adapt" it to your land/seascape


Determining the object detected in sensor Is there a way to determine which object has been detected with the sensor?
For example, if the owner's collisions sensor turns positive, is it possible to get the object collided with?

Something like this:

if own.collisionSensor.positive:
   obj1 = owner of detected collision object
   (print obj1)

Nvm, found the answer:

it would be:

if collision.positive:
        obj1 = collision.hitObjectList[0]


Set vertex location to always be between two other vertices Is it possible to set a vertex's location to be relative to another?

For example, A-B-C; I want B to always be exactly halfway between A and C, so that if I move A or C, B moves to stay halfway.

Ideally, I could then move B, and the delta between old/new is preserved, so that if I move A/C, then B moves to halfway + delta changes.

There is a way to achieve this using three empties and two contraints. However it is only possible to manipulate the vertex positions in Object Mode, in Edit Mode it won't be possible for reasons I'll try to explain at the end of this answer.

The basic setup can be tested in this Blend File here:

As you can see, there are three Emties and a subdivided plane in there. First I created the Empties and snapped them to the vertex locations. Then, I added two Copy Location Object Constraints on the Center Empty. One copies the location of Empty A, the other one empty B. To make the Center Empty really centered between the two, set the Influence Parameter of the second constraint to 0.5

Next, Hook the three vertices to the corresponding Empties. You can do this in Edit Mode using Hook to Selected. Now, if you change the value of the influence slider, the Empty Center slides towards Empty B or A, depending on the value:

If you move A or B, this happens, while the sliding value still works:

Making it dependant on Edit Mode position fails because of the way the Dependency Graph is evaluated. The current DepsGraph still works on an Object level, meaning if you move a vertex in Edit Mode, Blender is informed about a change of the Mesh object. Blender then would trigger an update cycle on it. Now, if that results in something, say an Empty, to be moved, and this Empty again had some kind of relationship via Drivers, Constraints, Vertex Parenting, whatnot, back to the Mesh object, this would mean that the Mesh object has to be updated AGAIN. This is not allowed, as that would trigger another evaluation cycle, and the game would go on forever. It's therefore called a 'Dependency Cycle' and has to be avoided at all cost.


Using overlap() to check if two meshes are intersecting? This is a follow up to How to check if two meshes intersect in python with BVH Tree?

It appears that just calling overlap() on the BVH tree of two objects is not enough. Some sort of bmesh transform is required (this part confuses the hell out of me). I tried this in the code below, however I am still getting intersection on every object even if they are all not touching..

#delete objects that are intersecting
def delInter():
    #check every object for intersection with every other object
    for obj_now in obj_list:
        for obj_next in obj_list:
            print()
            if obj_now == obj_next:
                continue

            #create bmesh objects
            bm1 = bmesh.new()
            bm2 = bmesh.new()

            #fill bmesh data from objects
            bm1.from_mesh(scene.objects[obj_now].data)
            bm2.from_mesh(scene.objects[obj_next].data)

            #fixed it here:
            bm1.transform(scene.objects[obj_now].matrix_world)
            bm2.transform(scene.objects[obj_next].matrix_world)

            #make BVH tree from BMesh of objects
            obj_now_BVHtree = BVHTree.FromBMesh(bm1)
            obj_next_BVHtree = BVHTree.FromBMesh(bm2)

            #get intersecting pairs
            inter = obj_now_BVHtree.overlap(obj_next_BVHtree)

            #if list is empty, no objects are touching
            if inter != []:
                print(obj_now + " and " + obj_next + " are touching!")
            else:
                print(obj_now + " and " + obj_next + " NOT touching!")

Turns out I had to apply location to the BMesh I generated, I have edited code above to work:

        bm1.transform(scene.objects[obj_now].matrix_world)
        bm2.transform(scene.objects[obj_next].matrix_world)

This is the reason I was getting intersection for every face and object, since they were all in the same location as far as BVHTree was concerned.


Why doesn't my Custom Pie Menu work after restarting Blender? So I would like to create custom pie menus. I have followed the tutorial by Sebastian Kónig that seems quite popular... but it's as if he leaves out the portion that tells you how to save it and have it work when you restart Blender.
Being an artist and total non-coder I'm not even sure where to start figuring out why it's not working after a restart.
Could someone please explain to me what I need to do to make this work? or perhaps point me to the section of the manual that covers this?
here is the tutorial I followed...   https://vimeo.com/103321600
do I need to check Register? this seems to be greyed out sometimes.. but not others.
Do I need to save the script in a specific location?
Any help would be greatly appreciated :)
cheers

import bpy
from bpy.types import Menu

# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)

class VIEW3D_PIE_template(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "Beddalls Pie Menu"
    bl_idname = "mesh.beddallpie"

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

        pie = layout.menu_pie()
        # operator_enum will just spread all available options
        # for the type enum of the operator on the pie
        pie.operator_enum("mesh.select_mode", "type")
        pie.operator("mesh.noise")
        pie.operator("mesh.vertices_smooth")
        pie.operator("transform.vertex_random")

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

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name="Mesh")
    kmi = km.keymap_items.new("wm.call_menu_pie", "E", "PRESS", shift=True, ctrl=True).properties.name="mesh.beddallpie"

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")

I originally didn't include the code as the code works... what doesn't work is having it available once i restart Blender. Everything works fine until i restart... then it's like the script never existed. I'm missing the knowledge that will make the script still work when I restart Blender, and for a non-coder this info seems rather elusive.

You haven't told Blender yet how to load this code on Startup. Two methods are available:

using the register checkbox you mentioned
turning your code into an Add-on

While the second method might seem more daunting in the beginning, it is the way more flexible way. The first method requires you to rename the Text data block (the tooltip of the register checkbox tells you this) to have a .py extension:

Only when the extension is .py as in the screenshot, registering is available. It then doesn't matter if the Text datablock is a part of the Blend file, or if it is an external text. You can use register and it should load and register when you open a file that contains it. However, that means every time to add that Text datablock to your file, check register, save and reload. It's not exactly nice to work like this.

The Add-on workflow is much more flexible: All you need to do with your code itself is to add an information dictionary that tells Blender hey, I'm an Add-on, offer to load me. It looks like this:

import bpy
from bpy.types import Menu

#    add relevant code to tell Blender that this is an addon
bl_info = {
    "name": "Name of your Addon",
    "author": "Your Name here",
    "version": (1, 0, 0),
    "blender": (2, 75, 0),
    "description": "a more descriptive text of what your addon does",
    "category": "User Interface"
}

This tells Blender what name the Add-on has, who wrote it, where to show it in the Add-on manager, the version of the Add-on and most important the minimum Blender version needed to run it. The rest of your code is identical to what you already had:

#    spawn an edit mode selection pie (run while object is in edit mode to get a valid output)
class VIEW3D_PIE_template(Menu):
    #    label is displayed at the center of the pie menu.
    bl_label = "Beddalls Pie Menu"
    bl_idname = "mesh.beddallpie"

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

        pie = layout.menu_pie()
        #    operator_enum will just spread all available options
        #    for the type enum of the operator on the pie
        pie.operator_enum("mesh.select_mode", "type")
        pie.operator("mesh.noise")
        pie.operator("mesh.vertices_smooth")
        pie.operator("transform.vertex_random")

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

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name = "Mesh")
    kmi = km.keymap_items.new("wm.call_menu_pie", "E", "PRESS", shift = True, ctrl = True).properties.name = "mesh.beddallpie"

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name = "VIEW3D_PIE_template")

When you save this file (again using a .py extension) into your Add-on folder (see the file path locations here: https://docs.blender.org/manual/en/dev/getting_started/installing/configuration/directories.html), you can - after restarting Blender - enable it in the Add-on manager:

after enabling the checkbox, make sure to also click Save User Settings to always have it enabled on startup. Now, when you continue to work on the Add-on, you can edit this .py file directly. After saving, you can hit F8 to ask Blender to reload all Add-ons, or restart Blender.


What are the Measurement Units i was doing a project of making drone parts which i want to 3D print but i don't know how the measurements in blender are going to be the same as the ones in real life so can anyone help me

Blender uses blender units. You can switch to using metrics as shown below:

For 2.8X

For 2.7X

You can then make sure of your model dimensions as shown below:


Cycles Node Editor: Double Diffuse problem Basically there is 1 area and it is all 1 material.
It consists of 3 parts/UV maps: Mountain, Soil, and Beach. The UV maps "overlap" each other which means that the faces of transition between the parts are in both/all three of the UV maps.

The layers of the textures have an order: First there is the mountain, then there is the soil which covers a bit of the mountain, then there is the beach which covers some of the mountain and the soil. The soil and beach textures have slightly transparent parts at the transition.

I use the general Color/Normal/Occlusion/Specularity setup for each of the textures. In the end the different parts shall all have their own diffuse and glossy shaders, the mountain f.e. gets a slightly red gloss to it.

Now there is the problem that the faces of the transition seem to be "diffused twice" you can see that they are way brighter:

(note that it really is just the faces of the transition not the whole mountain even if it might look a little like this in the screenshot.)

Here is an image of the node setup, sadly it is too small to read it:

Last but not least the .blend-file(too large for blend exchange):

Choose one:
http://www.file-upload.net/download-10862405/area.blend.html
http://www.megafileupload.com/5157/area.blend

To sum it up: Is there a way to diffuse it all with the same brightness whilst remaining separate color and normal maps plus separate specularity maps and glossy shaders. Aka "how to set it up correctly".

EDIT: Here are the textures packed in a .zip:

http://www.file-upload.net/download-10862545/textures.zip.html

http://www.megafileupload.com/5176/textures.zip

EDIT: The answer of PGmath might work but in my case it doesn't because the textures are "hand painted" and they already have transparent parts at the borders and stuff. Isn't there another way to achieve this? I cannot use the mask method, I'd have to do the whole thing again.

I think you are going about what you are trying to accomplish the wrong way.  The way multiple different materials are usually combined is by using a mask.  A mask is basically a black and white map where black areas correspond to one material and white areas correspond to another material.

To set this up in the node editor just use a mix shader and plug the mask into the fac input.  This will make lighter areas of the mask give the output shader more of the second input and darker areas give more of the first input.

Note: make sure you set the image texture node for the mask to non-color data.

Here is a rendered visualization of just the mask plugged into a diffuse shader across a piece of randomly generated terrain:

And here is a render with the same mask only in the above node setup:

So for your case you will have to now go and create a mask which defines where each material should be.  To combine more than 2 materials just create multiple masks and use multiple mix shaders in succession.


Blender eats space on C drive Yesterday I've had 2GB of free space on C and only after using Blender it has all gone. Can anyone help me?

Your problem is not neccesarily related to Blender. Just because it's the only thing you used doesn't mean it's the only thing that happened on your PC. Yestarday I had 30GB of free space on C and after only using Blender it went down to 7GB. Well actually turns out Windows downloaded update files in the background.

The first thing I would do in your place (and did today to my PC) is run disk clean up:

It will scan your PC for any temporary old files that could be taking up space and let you choose to remove them.
If that doesn't solve your issue than your best bet is to just go over your C Drive manually and cleanit up your self, remove any unwanted files etc.

Remember that your Desktop and any files in the recycling bin are also a part of your C drive, so if you're saving a lot of things on your desktop it could be taking up a good amount of space.

I reccomend WinDirStat for browsing your drives and doing manual clean up, it will make it a lot easier to identify areas with large files or folders that take up a lot of space.


Gaps between liquid and obstacles in liquid simulation I am trying to make a simple liquid simulation of a liquid going down a carved path on the ground.

I can't seem to make the liquid flow along the obstacle, all or part of it always seem to hover above the obstacle or have a gap / margin between the obstacle and the fluid. It produces shadows and artifacts that are neither realistic nor aesthetic, which I would like to iron out.

This is what I tried:

Obstacle Material: the obstacle had a rather complex material with bump maps, which I thought could be the cause for these gaps, so I changed the material. Still nothing.

Subsurface on the obstacle: the obstacle also had a subsurface (not really sure whether or not this should be taken into account when creating fluid simulations), so I applied the Subsurf to the obstacle and re-baked. Problem is still here.

Increasing resolution: This is where I get a bit confused. I can get good results with low resolution (50) and quick playback: the liquid adheres to the obstacle rather well. When I increase the resolution to create a final export, the result is very different and the gaps are back.

I have also:

-applied scale to all the objects in the scene,
-fitted the domain to the elements as best as I could,
-made the obstacle a shell,
-tried alternatively Honey / Oil / Water settings,
-tried to change Slip settings to Free Slip / No Slip / Partial Slip for obstacle or domain,
-solidified the obstacle,

but nothing really fixed this problem. I want the liquid to fill the shape I designed like a normal, real liquid.

.blend:

The obvious answer is to increase the resolution, but while this will make the problem less noticeable, there will still be some of this "mushrooming effect". Furthermore, with increased resolution the behaviour of the fluid changes. It becomes more "splashy" if you know what I mean. I baked your sim at a resolution of 300, and the fluid splashed all over the place.

What you will then have to do is that once you have baked the sim, you move your domain downwards (or the obstacle upwards) and maybe do some slight stretching of the domain until these artifacts disappear.

Anything else won't matter. However, about some of your comments:

You say that it looked good with a resolution of 50, but I baked it and it looked horrible. Most likely your observation was due to some other factor, such as not having applied the subsurf modifier.

Yes, about the subsurf modifier. The fluid will ignore the modifier unless it is applied. It will just react to the obstacle mesh as it is. In your case, this might have covered up the problem, as the subsurf decreases the volume of the "canal". A lot of fluid will thus be hidden inside the obstacle, so to speak.

Good luck!


How do I create mist easily? I want to make mist easily. Can someone teach me? I use a MAC and I use Blender 2.79b, making a MineCraft scene. Oh, I'm also a noob.

Zackarus, there are at least 3 methods to create mist: 1 - Cube with Volume Scatter material, 2 - Mist in Compositing, 3 - Fake 3D mist with a plane.

The first method, Volume Scatter, is the most basic, but it's a little bit heavy if you have a slow computer :

Create a cube that contains your scene + camera.
In the Properties panel > Data > Display > Maximum Draw Type > choose Wire so that your cube is transparent in Solid display.
Give your cube a material with a Volume Scatter node plugged into the Volume socket of the Material Output node. Keep the Density value low so that the mist is not too heavy (here: 0.04).

Second method, with the Compositing, tuto here: https://www.youtube.com/watch?v=CxNeMMZs_sM

Third method, fake 3D mist with a plane, answer here: How to get mist only at horizon line?


What does the use_local_location mean for bones To test this, I run a test to show the difference of use local location or not.

      C.object.data.bones['upperArm.R'].use_local_location = False
      C.object.data.bones['upperArm.R'].head
      Vector((-0.1459999978542328, -0.014370977878570557, -0.0010000000474974513))

      C.object.data.bones['upperArm.R'].head_local
      Vector((-0.1459999978542328, 0.0010000000474974513, 0.43700000643730164))

      C.object.data.bones['upperArm.R'].use_local_location = True
      C.object.data.bones['upperArm.R'].head_local
      Vector((-0.1459999978542328, 0.0010000000474974513, 0.43700000643730164))

      C.object.data.bones['upperArm.R'].head
      Vector((-0.1459999978542328, -0.014370977878570557, -0.0010000000474974513))

It comes out help nothing in the coordinates. Everything stays the same after and before setting the local location. At least, the coordinate will be different after changing the coordinate system.

Can someone provide some insight into this?

Apparently this setting only affects the way the location coordinates are displayed on the Transform properties on the UI.

When True, coordinates are shown using the bone local space.

When False, coordinates are shown using the parent space. (Global for the root bone)

Also note this only appears to affect POSED bones and has no effect when editing bones.

Also this can only be set on unconnected bones.


Texture amount limit per one material? Does Blender Cycles have this limitation? Because I have 63 unique textures inside one emission material and up to 62 textures render fine, plug 1 more - and it all turns into pitch black, both in viewport and final. No crash or slow performance, just blackness.

Textures are assigned to particles on per index base. Same setup in BI doesn't suffer from this thing.

PC specs are: Ryzen7 1700, GTX 1050Ti, 16 GB RAM, Win10

Dirty workaround is to enable Open Shading Language in render tab (works only with CPU), somehow it solved my problem, even though I don't have a clue what does it mean.
Another trick is to use spritesheet technique. In a nutshell, you have to combine all your images into 1 big image (without overlaying of course) and translate UV map along these "small" images. In this setup you are duplicating Vector Mapping as many times as there are images on the spritesheet.


Is there a way to Move a VSE Strip without moving its Keyframes? In the VSE, is there a way to slide a Strip (audio file in this case) left-or-right on the time axis without moving the Keyframes I've made for it?

In the NLA Editor you can do one of the following:

Created a NLA-Strip by clicking the  next to your action.
Temporarily unlink the the datablock in the Animation Data panel while you preforming the transformation.


HairNet Add-on is screwy Hi I'm still trying to work on a braid, but it keeps acting all screwy.
The first image is the result and the second is what it looked like before. Then when I figure out that error it says that the mesh guides are not the same length.
.blend file: https://drive.google.com/drive/u/1/folders/1QqSpjGz4KgfaY2YlozwF1AScxMrXXtI-

Tutorial Link: Creating Braid in Blender

Make sure your braid curves all have the same number of points. Go into edit mode, and in the viewport under display overlays, turn on statistics. It should show you how many point you have per curve. Delete a bunch so that your point count per curve matches and you should be good to go.


How to deform armature and keep its volume? Is there a way to deform the mesh below, along the red guides? I want to preserve the full volume and shape of the original. At the moment it always is tapered, even if "Preserve Volume" is turned on.
Thanks!

If I understand correctly, you try to move your arm with an armature but the bone deforms the arm too much and you want to correct the proportions.
To do so I think you need to use Shapekeys and Drivers, Shapekeys will allow you to correct the shape and Drivers will allow your bone to control the shapekey value:

Create your mesh and armature, parent the mesh to the armature With Automatic Weight, in the Armature modifier enable the Display Edit Mode and the On Cage options, bend the arm the way you want, in Object mode create 2 shapekeys for your mesh, select the second shapekey, go in Edit mode and modify the mesh so that it gets the shape you want:

Back to Object mode, right click on the Shapekey Value and click on Add Driver, it opens a panel, in this panel > Object > choose the armature and the arm bone, Type >  choose the type of transformation the bone will affect (here Z Rotation), and Space > Local Space:

Click on the Shapekey Value again and this time choose Open Drivers Editor, you should see the driver curve, select all and type V to make the curve straight, rotate the curve until you're satisfied of its effect on the mesh. Now when you'll rotate the arm the mesh will bend and also apply the shapekey you've created.


How to get rotational difference to work correctly? I am following this book on animation, and I cannot understand this particular part. You are supposed to create a corrective shape key, to make the character's belt look good when the leg is posed forward in an extreme way. You can see the part of the book I'm talking about in the link (it's a legal free Google preview).

I don't understand how to create the target bone he talks about. I go into edit mode and extrude one out of where the thigh bone comes out, but it doesn't look green like the others. In his picture they are all green, mine are too, except for the new one I create. I went ahead and created the driver anyway, and used that bone as the target bone, and the right DEF.thigh bone as the other bone for the rotational difference, but it isn't working correctly. It's like the shape key activated in the rest position too. Here's what it looks like.

Bones look green when they have bone constraints.

The video showing the problem with the driver no longer exists.
The book shows what the driver function should look like in Figure 5.59. Does the driver configuration look the same?


Error when activating add-on I made the following add-on by the test and tried it with Blender2.8.

import bpy

bl_info = {
    "name": "modalTest",
    "author": "taichi",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "3DView > Add > Mesh",
    "description": "modalTestOperator",
    "warning": "",
    "support": "COMMUNITY",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Object"
}

class modalTest_OT_Operator(bpy.types.Operator):
    bl_idname = "wm.modal_test_operator"
    bl_label = "Modal Test Operator"
    _timer = None
    def __init__(self):
        self.s = None
    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            self.cancel(context)
            return{'CANCELLED'}
        if event.type=='TIMER':
            print('test')
        return{'PASS_THROUGH'}
    def execute(self, context):
        self.socketFunction()
        wm = context.window_manager
        self._timer = wm.event_timer_add(1.00/200.00, window=context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}
    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)

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

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

if __name__ == "__main__":
    register()

bpy.ops.wm.modal_test_operator()

I checked the following buttons and tried to activate the add-on.
I got the following error:

Traceback (most recent call last):
  File "C:\Users\taichi\Documents\Blender\2.80\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\taichi\Documents\Blender\2.80\scripts\addons\modalTest.py", line 49, in <module>
    bpy.ops.wm.modal_test_operator()
  File "C:\Users\taichi\Documents\Blender\2.80\scripts\modules\bpy\ops.py", line 194, in __call__
    BPyOpsSubModOp._view_layer_update(context)
  File "C:\Users\taichi\Documents\Blender\2.80\scripts\modules\bpy\ops.py", line 157, in _view_layer_update
    view_layer = context.view_layer
AttributeError: '_RestrictContext' object has no attribute 'view_layer'

How can I fix the error?

You need to indent your call to bpy.ops.wm.modal_test_operator() so it will only be executed when the code as run as a script, which is the case when __name__ == "__main__". Otherwise you're trying to access blend data when the add-on isn't registered, which results in the exception you're seeing. For more information about this topic take a look at this answer by ideasman42. The corrected code is:

if __name__ == "__main__":
    register()
    bpy.ops.wm.modal_test_operator()

The current script won't work though because there is no socketFunction() in modalTest_OT_Operator.


Changing a plane's material alpha from BGE python I want my scene to "fade in" from black when it starts up in the BGE.
For that reason I have created a plane (with shadeless, diffuse black material) in front of the camera that I want to make transparent by decreasing the alpha value.

(I connected a Python script to an Always sensor so I have a function that is called every frame; from there I set the alpha.)

However, setting the alpha does not have any effect.

plane = bge.logic.getCurrentScene().objects["blackScreen"]
plane.meshes[0].materials[0].alpha = 0.0 # just an example

The plane will always be rendered in the color (including alpha!) that was set in Blender.

Why does it not work?

you don't need Python to do that. You can animate the transparency and just play the animation. You can download the example blend belowor rebuild the setup from the screenshot below. In my case there is a fade in of 100 frames and a little bonus - the plane is destroyed when the fading is done.

.

Enjoy!


How can I make "true normals" geometry node output relative to object local space? That is whole question. Now it is relative to World orientation, but I want it to be relative to object orientation.
Thank you for your attention.

Use a vector transform node:

I need to write 30 characters to post though.


How to join 2 or more sculpts into one? I want to join these sculpts (and many others), into one single mesh.
Everytime i try to sculpt these 2 joined with Ctrl+J, i got an horrible middle empty space, also it looks cutted.

So, how i can join these two sculpts and then sculpt them like it was only one and not 2 apart?

Use the Boolean Modifier. Or if you want to have a better workflow use the BoolTool addon. Tutorials on how to use them are enough out there and its quite simple but I will explain it nevertheless.

Add the Boolean Modifier to the first object you want to merge.
Click that little eyedropper in the object box of that modifier.
hover over the object to merge with and press LMB
Apply the modifier and delete the mesh that you selected with the eyedropper

All of that can be done with the BoolTool addon with one click on the Direct Union button


Can't texture paint in 3D or Image Editor with existing material nodes I have a tree branch object with a noise texture for color and displacement. I want to add texture painting into that so I can paint the knots onto the branch along with any other discoloration I might want. I'm using an add shader for 2 Principled BSDF's: the noise texture and the texture painting attempt:

For some reason, I cannot figure out how to paint on my texture layer, neither in the 3D Viewport nor the Image Editor. I have a paintbrush and a texture layer, have it UV unwrapped, have it in the Texture Slots as the texture image ("Texture Attempt").... But it won't let me paint.

I made a test Blend file where I reproduced a simpler version of what I'm making - a plane with a noise texture and an image texture going into an add shader, and I can paint on the image texture. At some point, I had to start switching from Rendered view to Lookdev and back to get the paint stroke to update, but at least I can paint! If anyone could also speak to that issue, that would also be nice!

I've watched a ton of tutorials, read a ton of threads, googled a bunch of stuff - I can't find the broken part of my file.

Can you find what's wrong?

I think that after looking at this, you can simplify your approach to a Color Mix node in front of the Principled Shader node to combine the texture paint and noise texture in ways you can't here with your set up. In the Color Mix node, you can actually choose from a drop down of multiple mix modes similar to a Photoshop layer blending mode like Add, Subtract, Mix(Normal), Multiply, etc.

If you have to use the two shader method because they are different materials, I woudl expect you would be mixing them with a stencil to make them show up in different parts - adding them together only cause them to wash out and is a waste of processing in the node tree using two Principled BSDF nodes like that.


Script is selecting all the objects (unwanted) Although my script works as it should I'm experiencing a odd behaviour when I run it, all the objects get selected and I have no idea why this is happening.
import bpy
import os
import subprocess
import math
from bpy.props import (
    FloatProperty,
    StringProperty,
)
from bpy_extras.io_utils import ImportHelper
from mathutils import Matrix, Vector
from bpy.types import (
    Header,
    Menu,
    Panel,
)
from math import isclose

class SelectByNameOperator(bpy.types.Operator):
    """Description"""
    bl_idname = "object.selected_by_name_operator"
    bl_label = "Select objects by name"
    bl_options = {'REGISTER', 'UNDO'}

    name = StringProperty(
            name="Object name",
            )

    def execute(self, context):
        for obj in bpy.context.scene.objects:
            if obj.name.startswith(self.name):
                obj.select_set(True)
                bpy.context.view_layer.objects.active = obj
            else:
                obj.select_set(False)

        return {'FINISHED'}

class MyPanel(Panel):
    """Creates a Panel in the Object properties window"""
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Test"
    bl_label = "Test"
    bl_idname = "MyPanel"

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

        box = layout.box()
        row = box.column()
        row.operator("object.selected_by_name_operator")

def register():
    bpy.utils.register_class(MyPanel)
    bpy.utils.register_class(SelectByNameOperator)

def unregister():
    bpy.utils.unregister_class(MyPanel)
    bpy.utils.unregister_class(SelectByNameOperator)

if __name__ == "__main__":
    register()

All strings "start with nothing".
Simple test in python console
>>> x = "xxx"
>>> x.startswith("")
True

Similarly with your operator since the default value when not set of a string property is "".
Either test for this, or give it some default.
Note, there is already a similar op, to select all objects that start with "Cube"
>>> bpy.ops.object.select_pattern(pattern="Cube*")
{'FINISHED'}


Importing a SVG file creates too many faces I am trying to import a simple SVG shape into Blender to extrude and bevel it, but the result looks very complex / has too many faces.

I've found other tutorials for SVG import that had the same problems, but no precise answer or explanation as to how to avoid this.

I am trying to import the outside path to bevel it as seen on this illustration:

The SVG importer likely generates a 2D curve initially, so in future you might be better off to avoid converting to a Mesh first. Some steps below can be skipped if you do that.

Like this:

There's a few ways to do this, the simplest might be to simply ignore the fact that you have a lot of faces, and convert straight into 2D Curve

Convert the Mesh in Object mode to Curve using alt+C.
Set to 2D Curve type.

Use the Geometry panel to adjust offset / extrude and bevel depth. The Curve object has a lot of the same features as the Font Object type.


Output .obj or other format once per line I'm exporting a .obj file, but when I open it, it is all jumbled up. I need to have it like this:

  v 1 1 1
  v 1 1 1

not like

  v 1 1 1v1 1 1

Is this possible?

My default cube exports to obj just as you wish...

it has just a LF, though not CR+LF (being on linux) maybe your text editor expects CR+LF to recognize new lines: try to see if it supports unix line endings (just LF), or replace LF with CR+LF somehow...


MKV file has too many frames I'm trying to do some video editing with blender (sequence editor). I have imported a .mkv file of 91 minutes and it shows in blender as 4.4 million frames (which is obviously not accurate). It was recorded at 30 frames per second.
I can not set the end frame to the end of the video, the highest blender will apparently go is 1048574. As such I can't even cut out a half hour video because there doesn't seem to be a way to cut past the end frame.
Is there a setting that allows me to set the end frame higher than 1 Million ?

edit: ffprobe output:

Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 1k fps, 30 tbr, 1k tbn, 60 tbc (default)

edit2: output from ffmpeg command from dr Sybren's answer
input:

Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 1k fps, 30 tbr, 1k tbn, 60 tbc (default)

output:

Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080, q=2-31, 1k fps, 30 tbr, 1k tbn, 30 tbc (default)

Your source file has inconsistent frame rates in the container and the video stream (see this explanation of tbc, tbn, and tbr), so that may throw Blender off. Try running your video file through ffmpeg without re-encoding the streams, and set the frame rate explicitly:

ffmpeg -i yourfile.mkv -c:v copy -c:a copy -r 30 newfile.mkv


How to simplify or resample a Bezier curve in Blender 2.9? I searched in the forum and saw the other post of the same question posted 4 years ago, tried to follow it but found I couldn't do it in 2.9.
So I created a path and converted it to mesh. Exit the Edit Mode, with the curve selected, I hit F3 to search for Simplify Curves. By applying it to the curve, it gives me an error message:Failed to find '3D Viewport: Add (Shift A) ▶ Curve ▶ Curve Simplify'
Is there a different way to do it in 2.9?

Consider the following gif:

Here I have simply added a curve object, and then used Shift+A>simplify curve and then repeated the process with anew curve and an intermediate step of converting the curve to mesh.
As you can see, the option for simplify curve is unavailable with the new mesh object, as the operator is only usable for curve objects. So, in your situation, either convert back to curve, or add a new object if it is not too tedious of a task.
Here is the documentation for the Simplify Curves add-on.


Can't select vertices by right clicking in UV editor (2.7) I was working on a project, trying to texture a castle.  Everything was working as intended, but then suddenly, the UV editor started acting up. My cursor became a circle, the only way I can select vertices is by using Select -> Border select, and the hotkeys aren't working at all.

When I open another blender file, it works normally. Did I save the file with a wrong parameter or something?

You probably have activated 'UV Sculpt'.Disable it and you should be able to work normally again.


Why does Blender crash when trying to place objects with 'threading.Timer()'? I'm trying to make a simple program where 15 spheres are randomly placed into a 20x20x20 volume, then after two seconds it clears all the spheres and places another 15 randomly.

It will place the first 15 spheres fine after two seconds, then after another two seconds blender closes.

Any help with this is much appreciated.

import bpy
import random
import threading

def place():

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

    for i in range(0,15):
        x = random.randint(-10,10)
        y = random.randint(-10,10)
        z = random.randint(-10,10)
        bpy.ops.mesh.primitive_uv_sphere_add(location=(x,y,z))

        bpy.ops.object.modifier_add(type='SUBSURF')
        bpy.context.object.modifiers['Subdivision'].render_levels=0
        bpy.context.object.modifiers['Subdivision'].levels=0

        timer = threading.Timer(2.0, place)
        timer.start()

    return None

place()

If I understand the code correctly, each place() method then recursively calls 15 more place() after 2 seconds, which each of these instances themselves call place() 15 more times after 2 seconds. etc. I think this will crash any program in python pretty quickly.

Blender has specialized methods for recurrent calling of methods. See the documentation :
https://docs.blender.org/api/current/bpy.app.timers.html

Exemple :

import bpy

def every_2_seconds():
    print("Hello World")
    return 2.0

bpy.app.timers.register(every_2_seconds)


How to import a movie file in Blender 2.8 and 2.79 with Python? I tried to add a movie file using this script in the scripting window.

import bpy, os

os.system("chcp 65001")

dir_movie=r"O:\GK\Sozai\testdev\out.mp4"
bpy.ops.sequencer.movie_strip_add(dir_movie, channel=1, frame_start=1)

But this error message  appeared on the console.

Traceback (most recent call last):
  File "O:\GK\dev\blender\test00.blend\Text", line 6, in <module>
  File "O:\files\blender-2.80.0-git.99d4321feff6-windows64\2.80\scripts\modules\bpy\ops.py", line 198, in __call__
    ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
TypeError: Calling operator "bpy.ops.sequencer.movie_strip_add" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')

sorry, I cannot understand this error message and how to fix this error.
What I should do?

For your reference, my pc details are...

OS: Windows 10 Education(build: 17134.648)
Language: Japanese
CPU: Ryzen 1700X
GPU: GTX 1070
RAM: 16 GB
Blender: 2.8 or 2.79

Thanks.

sorry, I forgot to add a script and mistakenly specified this filepath.
I can run the below script.
Thanks.

import bpy, os
os.system("chcp 65001")

# I need this script.
bpy.context.area.type = 'SEQUENCE_EDITOR'

# and I need "filepath=".
bpy.ops.sequencer.movie_strip_add(filepath=r"O:\GK\Sozai\Sozaibitmap.mp4")
```


How do I access a property in the Preferences in 2.80 with Python? I want to place a shortcut in the panel I'm creating for changing the F-curves Default Interpolation Type found in Preferences> Animation> F-Curves.

I have the Python Tooltips enabled and it says:

PreferencesEdit.keyframe_new_interpolation_type

How do I write a script to access this operator with its functionality?

You can access that Preferences property with the following code:

bpy.context.preferences.edit.keyframe_new_interpolation_type

To use this in a panel:

    row.prop(context.preferences.edit, "keyframe_new_interpolation_type")

The full code (using the UI Panel Simple template found in the Text Editor> Templates menu):

import bpy

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
        row = layout.row()
        row.prop(context.preferences.edit, "keyframe_new_interpolation_type")

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

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

if __name__ == "__main__":
    register()

Which displays like this, in the Object tab of the Properties Editor:

If you need to set this value manually you can see the list of strings this property expects to be set to in the Blender 2.80 Python API.


Is it possible to unwrap genus-0 mesh so each vert has one and only unique uv? To unwrap a genus-0 mesh such as a sphere, I can make a full sphere from an unwrapped half sphere applied with mirror modifier. the amount of uvs equal the amount of vertices.  But the two verts selected in image below have two different uvs with the same value.(by checking in the exported .obj)

Or I can make a seam then 'Unwrap'. This way the number of uvs is larger than the amount of vertices. Each uv coord is unique, no repeated values.

I wonder how to unwrap a genus-0 mesh so each vert has one and only unique uv? Unique means there're no repeated uv coord values, it's not unique if the ith vt and jth vt have the same coord values.

No.

Unwrap. Meaning peeling the surface off of a solid and laying it out flat on the ground.

If your requirement is that there are no duplicated texture coordinates at all, it would mean that you are trying to peel an orange without cutting its skin. Even if you manage to "beam off" the skin in one piece you end up with a hollow shell that you cannot lay out flat on the ground without the front and back sharing the same area.

And the moment you cut it you get seams and therefore more uvs than vertices. if you merge them again later you once more end up in the situation described above.

This is true for all solids, not just genus-0 ones like a sphere.


How to reduce the thickness of letters I want to reduce the thickness of a letter but don't know how.
The dimensions of my letter are 7 cm x 7cm and the letter is roughly 5mm thick.
I want to reduce the thickness to 4mm but I want the letter to keep the dimensions 7cm x 7cm
Is it possible ?

The Shrink/Fatten tool seems like a good fit.
Just select the faces you want to move, and shrink them.


Making the Blender Grid round I am trying to make the grid on blender round, like half a circle or similar. I'm trying to see how the magnetic fields will interact on a curve versus a flat surface. I wasn't sure how to do so, or if I was able to after already putting materials onto the existing grid. Help!

As mentioned in the comments, there is no way to change the grid pattern in Blender. A workaround to this would be to add a circle curve to guide you.

This process will convert the circle curve to a mesh, meaning it will have vertices like a normal mesh would, as seen in the screenshot below:

From there you can enable vert snapping to align your object to the circle:

As you notice, not all the spheres will align with the center on the vertices, to change this, you have to change the "nearest" option to "center" like so:

Edit
Asker requested this as a half-circle. This is easily achieved by simply cutting the circle in half.

Hope this helps.


Issue running Blender Command Line Arguments using Python Subprocess I have the following code in a file named call.py, which I've reduced down for debugging.

Note: I've tried various paths, either using os.path (join) or absolutes, as seen below:

import subprocess

args = [
        '/usr/bin/blender',
        '--background',
        '--factory-startup',
        '/home/username/Sites/project/blends/3d-text.blend',
        '--render-output /home/username/Sites/project/output/hello.png',
        '--render-frame 1'
        ]

subprocess.run(args)

If I run the args directly from the terminal it works:

/usr/bin/blender --background --factory-startup /home/username/Sites/project/blends/3d-text.blend --render-output /home/username/Sites/project/output/hello.png --render-frame 1

If I call the call.py script itself, either from terminal or within VS Code, in this case, using subprocess, it doesn't work and I get the following error:

➜  project /usr/bin/python3 /home/username/Sites/project/python/call.py
Blender 2.82 (sub 7) (hash 5b416ffb848e built 2020-02-28 18:18:05)
Read blend: /home/username/Sites/project/blends/3d-text.blend
Dependency cycle detected:
MAMaterial/Shading Component/MATERIAL_UPDATE() depends on
NTShader Nodetree/Shading Component/MATERIAL_UPDATE() via 'Material's NTree'
MAMaterial/Shading Component/MATERIAL_UPDATE() via 'Material -> Node'
Dependency cycle detected:
NTShader Nodetree/Shading Component/MATERIAL_UPDATE() depends on
MABlue/Shading Component/MATERIAL_UPDATE() via 'Material -> Node'
NTShader Nodetree/Shading Component/MATERIAL_UPDATE() via 'Material's NTree'
Detected 2 dependency cycles
unknown argument, loading as file: --render-output /home/username/Sites/project/output/hello.png
Error: Cannot read file '/home/username/Sites/project/--render-output /home/username/Sites/project/output/hello.png': No such file or directory

Blender quit

Any thoughts on why it's not working?

Blender 2.82
Python 3.8.1
VS Code
Manjaro KDE 19.0.2

Blender 2.82 Manual: Command Line Arguments

These need to be separate elements in the array:

        '--render-output', '/home/username/Sites/project/output/hello.png',
        '--render-frame', '1'


Veikk 1560 (Wacom Cintiq alternative) compatibility issues Hello dear Blender users!

I'm an avid Blender user myself, and I've been looking for an option to sculpt faster than with my mouse (LOL, to be fair, I'm pretty decent at it anyway but it's veeeeryyyy slooooow). I hate regular tablets so I've saved up for a tactile-monitor-based tablet such as the Wacom Cintiqs, although a cheaper one as I believe Wacoms are overpriced AF.

I settled with the Veikk 1560 ( https://www.amazon.com/VEIKK-Drawing-Graphics-Shortcut-ScrollDial/dp/B07DJ9NGNV ) which at the moment seems to be a brilliant alternative for such a "cheap" price of 350$-ish (although there is no screen touching unless you're using the Pen, so... not a capacitive screen if that's what you're looking for).

I've been using it the whole afternoon and tried it up in both Blender and Photoshop (plus Google Chrome, to check for compatibility issues since Blender is NOT recognizing the hotkeys I'm assigning through the Veikk drivers, more on this later).

Pressure sensitivity seems to be ok, it's working perfectly. Even certain hotkey associations (done through the Veikk drivers) are being recognized directly in Blender: as an example, if I associate right or left click to the pen buttons everything seems to work as expected.

I do however want both buttons on the pen to work as ALT and SHIFT keys or as a Middle Mouse so that I can sculpt and move the camera around with ease (I use Maya navigation). For some reason, NONE of these seem to work at all.

As a curious fact, the first button I ever configured on the pen was ALT, and it worked fine for a few minutes until I did some more changes on the driver and suddenly it stopped recognizing any of these.

Any ideas as to what might be wrong or how to fix it? I am 100% sure it should be doable; as I said before, not only certain hotkeys are being detected, but I was actually able to use the 2nd button on the pen as ALT key for a few minutes before it all broke for some weird reason.

As a side note, this is why I've checked the monitor with Chrome too (to make sure the hotkeys actually were being detected by the PC), and as a matter of fact they are being recognized (SHIFT on Pen acts as a shift when writing stuff down and so on).

It really seems as if Blender was somehow overriding the hotkey configurations that I am assigning through the Veikk driver, both on the Pen and Tablet buttons (which are 100% unsynced from the functions I am assigning to them through the driver).

Any info would be greatly appreciated as it would turn this tablet into a very cheap alternative for a Cintiq monitor and I am sure many will find this VERY appealing.

Thank you and I'm glad I joined this forum! It's about time I start asking questions instead of spending wasted countless hours figuring stuff out by myself LOL.

--------------------------------------------------------------------------------

UPDATE 1: Ok... so I'm a leftie so I turned my monitor upside down and vertically flipped it through the screen options on Windows (from the beginning). I hadn't thought about it, but naturally my tablet-monitor commands were flipped too so that's why they were not reacting as desired. Once accounting for this I realized that the Tablet button hotkeys that I associate through the Veikk drivers DO in fact work (to a 90% extent, for some reason Blender takes my CTRL+z command and CTRL+SHIFT+z command as the same, so basically I can only undo (with both buttons)).

As for the Penn, the commands are (MOSTLY, again) ALSO working! However there just seems to be NO WAY for me to simply associate alt and shift to these buttons and use them as desired (to pan and rotate the view).

Perhaps this will cue you in as to what the problem is, since at this point I am almost 90% sure whatever is left to be configured should be configured on the Blender side (I seriously doubt this is an issue with the Veikk 1560, as everything seems to be working fine on that side).

you can contact their tech support , this may the issue of veikk 1560 driver . so you can't use the two buttons of the stylus .

I've had a XP-Pen G430 OSU tablet for many years that has proved to be handy. And I've seen a top-of-the-line XP-Pen pen display monitor that cost about 450 dollars. This 16-inch Artist 15.6 Pro drawing tablet with screen intended for people who want a pen monitor product but find the high-end prices too high for them. That is, people like me.

For people like me, this is impressive. Being able to use the pen right on the screen makes a big difference. And make no mistake, the pen draws right where it contacts the screen. There are no problems with parallax (at least that I could see -- I didn't perform any tests). That makes sketching and drawing almost like using a pen on paper. Better in some ways. it works well with Blender and Photoshop art programs .


Cannot light portions of object with point light I am setting up a simple scene with only a single object, a truck, and a point light. It seems that regardless of where I put the light, the hood (among other portions) of the truck won't be lit. Here's an example:

My first thought was that it was a problem with the materials on the truck. But the material on the hood is the same as that on the top and sides, so I don't think that it is the issue.

I also replaced all of the materials with the default one (diffuse intensity 0.8 and specular intensity 0.5) to see just the contribution from lighting more clearly:

Is there some other reason that might be making it impossible to light certain portions of the object?

Other possibly relevant information: In the images above, the light is a bit above the driver's seat of the truck, but the problem remains even if it is directly on top of the hood. I have had better luck with Hemi lights, but would prefer to use point lights if possible. I am using Blender Internal rendering. I am also happy to post more images (the car rendered with shadeless textures, the actual blend file, etc) in the follow-up.

While im not a Pro. I Think, I THINK. You should try increasing the strength of the Light. Or try using multiple lights. I Could also say Try to Transparent the background and Raise the color of the background to a bright color Preferrably a Bright White This will make the Background transparent, And the objects in the rendered image will be Nice and bright.
If you want to have the background grey i won't reccomend the latter.

One of my renders of a character for one of my games. With one default pointlight just above the head, Not bright, I Would like it more bright.
Now i have changed the Strength of the Pointlight to 900.
As you may notice the ribs are more bright And so are alot of the other parts.


HDRI Reflection not showing in render this most likely has a very simple answer but i can't find the answer anywhere online. I'm trying to get the reflection from the standard blender hdri on an object. It shows it perfectly in Look Dev mode, but in Rendered it just doesn't show up. I tried shifting the lighting, increasing light strength, etc etc. basically everything i could find but it's just not changing. What am I doing wrong?

to add an hdri go to the world tab and add an environment node to the surface output, you can copy my basic setup it gives you some flexibility.


Number of edges per vertex in remesh Blender's remesh tool produces a mesh of quad faces, but the vertices range from 3 to 5 connected edges. For example:

I'd like to be able to remesh so that every vertex has 4 connected edges, so that the mesh is a simple grid. This would be an easier topology for me to work with.

Is there a way to do that? If so, why doesn't remesh do that by default? If it isn't possible, what's the difficulty?

The Remesh modifier only generates quads.
If you need proof, select your object and with the remesh modifier applied, run this script.

import bpy

for polygon in bpy.context.object.data.polygons:
    print(len(polygon.vertices))

It will print out the number of vertices for each face in the selected object.

Even for areas that look like triangles, they really are quads just with vertices doubled up. In this gif, I move two vertices that are doubled up in a mesh with the remesh modifier applied.


Camera setting does not give the expected fisheye result I am modeling a real camera with a wide angle (fisheye). My room is 4*4*2.5 meters and the camera is attached in the ceiling with {0,0,0} degrees rotations. For camera setting, I added a camera named prosilica having a sensor type 2/3" (8.8mm*6.6mm). as mentioned in the image 1 and 2.
When I render the scene, i remark:
1) It does not a distortion effect! Normally, we get a distortion caused by the wide lens of camera (large filed of view)?

How can I simulate a fisheye on blender using the same sensor size mentioned above? Any suggestions?

The blender internal renderer doesn't seem to support fisheye lenses. The Cycles rendering engine does, however. You can change to Cycles rendering in the header of the 3D view:

With Cycles selected you can change your camera type to 'Panoramic' to reveal several fish eye options:


Issue With Rotation On Character Rig I am having issues when trying to rotate the root bone of my character rig around the z axis.

When pressing r, then z, I am able to rotate the rig perfectly normal, but when I play the animation back, the root rotates along the y axis.

When I look in the transform tab, it also displays a change in the y axis even though I am rotating the z axis.

Help would be appreciated!

Using Global rotation where you want local rotation

Global and local rotation of default bone about z axis.

RZ is rotate around global z axis. eg Default bone of default single bone armature points up. The y axis of a bone is its head to tail. Rotating this bone around global z axis rolls the bone around Y.

Instead to rotate bones around their local axes use

RZZ


How to Read Timeline Seconds? I feel pretty silly for asking, but I need to know. On the timeline sheet where it normally shows the keyframe numbers, when you go into to 'view' and you click 'show seconds' it gives you the seconds instead of keyframes.

It normally looks on the timeline like "0+00 0+03 0+06" and so on. My question is, how do you read that? Like for "0+03" is the first "0" minutes and the "03" the seconds? I just need a bit more clarification on the meaning. My frame rate is 30 FPS (in case you need to know).
I appreciate the help!

It's a combination of seconds and frames.

Format = [second] + [frame number]

It starts the count of frames again for every second.
A.K.A. the frame number is relative to the seconds.

You can see it changing when you change the frame-rate of the clip in the render tab.


Is there a Simplify Curves addon for Blender 2.80? I'm using the latest Blender 2.80, and I notice a Simplify Curves addon at preferences> addons> search:simplify I see Add Curves:Simplify Curves, but then it says upgrade to 2.8x required.
What is currently the way to simplify a complex animation F-curve?
Sometimes I like to record a complex object movement, but I used to love to then Simplify the curves to various degrees with Simplify Curves addon.
Thanks for any ideas.

Select your keyframes on graph editor.
Press "o" Select SMOOTH KEYS. That should "simplify" a little bit better your curves.
I remember the function "simplify curve" is available for grease pencil, but I don´t remember seeing it elsewhere. Please paste a screen capture.

I hope this works for you. If it does, please vote me up and mark me on the checkbox to the left side of this answer.
Thank you.


how to get a list of all FCurves in a scene for the addon I'm working on, I need a list of all fcurves (a list of all selected/visible fcurves would be enouph)
Do I really have to loop through all animation_data objects to get this list?

Thanks in advance,
Jacques Lucke

F-Curves via Actions

You can use bpy.data.actions to get a list of all F-Curves in the scene, but actions are not associated with objects, scenes or nodes:

for i in bpy.data.actions:
    print (i.name)
    for fcu in i.fcurves:
        print (fcu)
        for keyframe in fcu.keyframe_points:
            x, y = keyframe.co
            print (x,y)

It's only possible to check if the actual object is associated with an action via animation_data in a reverse operation with Object.animation_data.action to get something like: bpy.data.actions['Action']. Another option is to check animation_data.action.name.

If you need to know which F-Curve is applied to objects or nodes in your scene, the only way is to use animation_data and iterate through all components like:

Object.animation_data - F-Curves of an Object
Scene.animation_data - F-Curves of the Scene
Material.animation_data - F-Curves of a Material
...

F-Curves of an Object

import bpy
import math

obj = bpy.context.active_object
keyframes = []

anim = obj.animation_data
if anim is not None and anim.action is not None:
    for fcu in anim.action.fcurves:
        print (fcu)
        for keyframe in fcu.keyframe_points:
            x, y = keyframe.co
            print (x,y)
            if x not in keyframes:
                keyframes.append((math.ceil(x)))

To get the F-Curves of all objects in the scene you can use bpy.data.objects and iterate through the objects in the scene like:

object_list = bpy.data.objects

for i in object_list:
    anim = i.animation_data
    if anim is not None and anim.action is not None:
        for fcu in anim.action.fcurves:
            print (fcu)

F-Curves of a Node Shader

obj = bpy.context.object

shader = obj.data.materials[0].node_tree
anim_data = shader.animation_data

for fcu in anim_data.action.fcurves:
    print (fcu)
    for keyframe in fcu.keyframe_points:
        x, y = keyframe.co
        print (x,y)


Select Random Objects with Name I have many objects with the same name. I can search for these in the Collection window. I would like to select a random subset of these.

I can see that Blender 2.8 has a Select -> Select Random option, but this includes all visible objects.

One option would be to use select random and then run a script that deselects anything that doesn't match the name that you specify.

import bpy

for o in bpy.context.visible_objects:
    if 'gizmo' not in o.name.lower():
        o.select_set(False)

Another way could be to make a list of objects matching the name criteria and then getting a random choice from that list and selecting them.

import bpy
from random import choices

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

objlist = [o for o in bpy.context.visible_objects
            if 'gizmo' in o.name.lower()]

rand_list = choices(objlist, k=int(len(objlist) * .75))

for o in rand_list:
    o.select_set(True)

In this example, I set the k parameter to be 75% of the object list. You could also specify an exact number of objects that you want selected.


Changing color of objects not working I am having trouble changing colors. Check this out and let me know what I am doing wrong, please.

Here is the link .....  https://youtu.be/LacRm-EUQk4ith

You are now in Solid view, where materials don't appear.
Switch to Material Preview or Rendered preview, and your colors will be there.

You can also set a color for Solid view only, in Material > Viewport display options.


Stretching in Object When Subdividing Working on a project where it warps bottles using a lattice and curve.
The original one I'm referencing (1st Image) is what I'm trying to recreate. As you can see when a subdivision is applied it smooths out very well.

However with the one that i'm working on (2nd Image) when I add the subdivision modifier it does not smooth out, instead it looks stretched and creates vertical lines.

It looks to me in that tiny picture that your object is triangulated, and if so then you will definitely get artifacts when bending and stretching. If you can test your lattice and curve setup on a similar form made of entirely quadrilaterals, see if that doesn't fix the issue with the stretching.


rotation via python does not the way i would it have expected I created a cylinder via python.
I rotated it it 2 times (y and z axis). Then moved it up.
Then i changed the origin to be in world center and rotated in on z - axis.
So the result is like this (which is ok)

then i added these line to my code
# expected: rotation "in place" - so same as before, but vertical
setOriginToGeometry(bpy.context.active_object)
bpy.ops.transform.rotate(value = math.pi / 2, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

and as i wrote in the comments i expected the green bar to rotate "just in place", instead i got this:

so obviously i am doing and understanding something wrong, but what? Any help appreciated!
my code:
import bpy
import math

def setOriginToCursor(object):
    bpy.context.view_layer.objects.active = object
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR')

def setOriginToGeometry(object):
    bpy.context.view_layer.objects.active = object
    bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN')

i = 0
name = "object"
halfPi = math.pi / 2
radius = 3
number_of_objects = 1

angle = 2 * math.pi / number_of_objects

bpy.ops.mesh.primitive_cylinder_add(radius=1, depth=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(0.1,  0.1, 1))

new_Name = name + '_' + str(i)
bpy.context.active_object.name = new_Name

# rotation 90 y-Axis, so i can see it from top view (result : horizontal)
bpy.ops.transform.rotate(value = halfPi, orient_axis='Y', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)
# rotation 90 on z axis, so it is vertical
bpy.ops.transform.rotate(value = math.pi * 2 - angle * i + math.pi / 2, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)
# move it up on y-axis
bpy.context.active_object.location[0] = math.sin(angle*i)*radius
bpy.context.active_object.location[1] = math.cos(angle*i)*radius
bpy.context.active_object.location[2] = 0

#i = 2

# works as expected

setOriginToCursor(bpy.context.active_object)
# moved and rotated to the left from origin - horizontal
bpy.ops.transform.rotate(value = math.pi / 2, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

# expected: rotation "in place" - so same as before, but vertical
# but it is: in world origin :(
setOriginToGeometry(bpy.context.active_object)
bpy.ops.transform.rotate(value = math.pi / 2, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

Use variable names.
import bpy
context = bpy.context
scene = context.scene
ob = context.object

The  context variable step is for when your test code works, and you wish to make an operator, can very easily copy an paste blocks of code. To where  context is a usual suspect in operator and panel method arguments.
Reducing a line like
bpy.context.scene.cursor.location = bpy.context.active_object.location

to
scene.cursor.location = ob.location

Remove default settings from operators.
Sure can copy the complete operator call from the info window, but what of these settings do  you need to set? Consult the docs, if it's default it's not required, reducing
bpy.ops.transform.rotate(
    value = math.pi * 2 - angle * i + math.pi / 2,
    orient_axis='Z',
    orient_type='GLOBAL',
    orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)),
    orient_matrix_type='GLOBAL',
    constraint_axis=(False, False, True),
    mirror=True,
    use_proportional_edit=False,
    proportional_edit_falloff='SMOOTH',
    proportional_size=1,
    use_proportional_connected=False,
    use_proportional_projected=False
    )

to.
bpy.ops.transform.rotate(
    value = math.pi * 2 - angle * i + math.pi / 2,
    orient_axis='Z'
    )

to rotate globally (the default) about 'Z'.
What I think the issue is.
If using set origin to cursor, pays to know where that cursor is, and unless it is a script where this is used and set by the user first, make sure its location is a known entity.
scene.cursor.location = (0, 0, 0) # so we know where it is
setOriginToGeometry(ob)
bpy.ops.transform.rotate(value = math.pi / 2, orient_axis='Z')

IMO better still, make it an argument and  pass it to your origin set method, and set it (and reset it) there
Or better still, just don't do it with operators, most of time they are not required & IMO it will drive you nuts, so instead I'm....
Revisiting this answer.

Thank you very much for your answer batFinger. Unfortunately i do not
understand it. But that is my fault because i have just a few days
experience with Blender python and i am pretty proud i made it that
far (from my - i have no idea what i am doing - point of view ;).
Hopefully i do understand your answer in a few weeks when i am diving
deeper into that very amazing topic

This begs the question.. hows it going with operators?, am aware how we can become  attached to getting a script to work...(guilty myself on many an occasion) IMO once we "See the light" will never return to using code designed basically as a UI interface to do simple tasks like transforms (translate, rotate, scale).

In this example add the scaled cylinder at (0, 0, 0)
Emulate the edit mode rotation of 90 about X axis, and translation of 1 (radius) units in Y direction with a translation and rotation matrix.  The objects origin will remain at (0, 0, 0) and the mesh will be at 12 o'clock (top view) and can be simply rotated around the clock with its Z rotation property.
The Mesh.transform(matrix) uses the matrix supplied to transform all the vertices of the mesh in one fell swoop. A 4x4 (rowsxcolumns) transform matrix, like the matrix world is made up of its translation, rotation, scale parts
M = T @ R @ S

Here we have use T and R
import bpy
from mathutils import Matrix
from math import pi

context = bpy.context
scene = context.scene
radius = 1
# create our object to array
bpy.ops.mesh.primitive_cylinder_add(
        location=(0, 0, 0),
        scale=(0.1, 0.1, 1),
        )

ob = context.active_object

T = Matrix.Translation((0, radius, 0))
R = Matrix.Rotation(pi / 2, 4, 'X')
ob.data.transform(T @ R)

Effectively this has made our object lie in the XY plane, point up (+Y) and shifted its origin 1 down from its orginal location.


Problem with Fresnel Artifacts in PBR Shader I'm creating a PBR all-in-one Shader. it is suposed to function as a streamlined connection between substance/marmorset and blender, where u only have to connect the textures into the material inputs and get a PBR metallic/non metallic fresnel shader.

the core structure of the shader is ready and works mostly fine. But the normal maps are not completely working well (maybe there is sth wrong with the normal orientation. maybe somewhere the normal inputs do not get handled as a normal map anymore. but i cant find where). also if you do not have a normal map assigned and you dont put the "normal power" (intensity) to zero, you get strange artifacts. (solved)

(solved)

Also there are strange lines on the mesh surface that should be really not there. i think it has to do something with the fresnel effect.

I dont know what i did wrong but maybe you can help me. Here i created a little introduction into the main functions of the shader.

The problem should lay in the left shader group "demonic inputs". I am not hundred percent sure but i believe this group causes the problem. but i cant find a solution. thx for your help! :)

Here you can download the blend file: Download Blend File

For the glitchy normals when not using a bump/normal map: When you have a loose shader node with no connection to the normal inputs, Cycles defaults to the mesh normal to avoid shading artifacts. However, when the shader normal is connected to a group input, this doesn't happen. So the shader evaluation normal instead gets initialized to whatever the group input socket default was. You can fix this by connecting the Geometry node's "normal" output to where your normal map would go (if you had one). This just explicitly tells Cycles to use the mesh normal.


100% pixel perfect Displacement map I'm not a highly skilled Blender user, so maybe it's a dumb question:
So shortly: how can I put my displacement map (a  square image) onto my plane (square too) matched perfectly?
With detailes: I'm in a middle of a project, what is 100% planned, and described mathematically, and it's going well, but now I need a displacement map, and I'm disappointed when I'm tryin to find out, how to put my perfect square map into the displacement modifier of my perfect square plane, if I want it to match perfectly. I have several ideas with displacement maps, but without this I can't really make them real.
Thank you

Did you make a UV map for your plain (plane?)?
If I understand correctly, your plane is square in the projection along the z-axis.
You could switch to top view, switch to edit mode, UV-unwrap with the option "project from view (bounds)". This should line up everything neatly.
Maybe you'll have to rotate the UV map in the UV editor by some multiple of 90 degrees afterwards, but the size and relative position should match then.
This is how you set the texture coordinates to use the UVMap:

Or maybe upload your blendfile, so we can have a better look?


How do I make a magnifying glass plane? I'm trying to make a glass plane that zooms in whatever you see behind it, I tried this material from another question but it didn't work

I think what this is supposed to do is to scale all the light that comes through the Z Normals?

Model a magnifying glass lens (biconvex)
Set its color to white
Use raytrace transparency


Transparent alpha channel not working on imported .tif files I'm trying to import a series of .tif images as planes but I can't get the alpha channel to work. During the import process the Alpha channel box is checked and set to "straight". Under the materials tab the Blend mode is set to "Alpha Blend". However the result (see picture) does not use the transparent alpha channel and instead displays it as white. I have spent hours and hours trying to figure out what seems like a very simple problem, it is driving me crazy. It doesn't work for eevee or cycles. When I open any of the images in photoshop the alpha channel is transparent and clearly exists.

I opened an example material that has working transparency, it seems to only work in cycles.


Game Engine: Cube is rolling instead of moving forward In the Blender Game engine, I used servo control to try to get a cube to move. Instead, it rolled. Below are the settings for the servo control actuator:

And here is a picture of it rolling:

Also, the yellow cube (Character being controlled) has rigid body physics, and the ground (white) is static.

How can I stop this?

Make the cube dynamic.I think it rolls cause it has rigid attributes.


Why does blender allow me to rotate an HDRI? I can take a plane, cover it in grass and drop it into an HDRI meadow for background lighting. Parts of the meadow are dark others not. Awesome... Except, my plane is tiny and my HDRI meadow is huge. Blender allows me to rotate the HDRI so that I can put the dark bits on the left, or the right. But what I really want is to stretch the plane, or shrink the HDRI, so that the plane really looks like it is at the same scale dropped into the background HDRI. If I type in two scale values then the HDRI stretches unpleasantly, but as soon as I type in three identical scale values it takes me right back to the start again.
Why is rotation of the HDRI allowed but not scale or translate. Or maybe it is allowed and I'm just messing up?

Lighting provided by the World environment is always considered to be infinitely far away from the scene. In other words, when you use HDRI lighting via an Environment Texture node connected to a Background node, you are essentially projecting the HDRI onto an infinitely large sphere wrapped around your scene. Correspondingly, the actual information recorded in a HDRI is generally a spherical capture of an environment mapped onto two flat dimensions using an equirectangular projection.
Since the World is an infinitely large sphere, the notion of “proportionally scaling” it doesn’t make very much sense. If you start with an infinitely large sphere and halve its size, it’s still infinitely large. Since this does not in any way affect how the HDRI is projected onto the sphere, such an operation has no effect whatsoever.

Rather than thinking about scaling or otherwise transforming the World sphere itself, it’s more useful to think about altering the way the HDRI is projected onto the sphere. For example, suppose we use this HDRI for our world lighting, which looks like this using the standard projection:

We can smoothly distort the projection along the Z axis using a Vector Curves node, effectively adjusting the position of the equator:

This produces an image like this:

Note that any smooth reprojection fundamentally distorts different parts of the image differently. In the above example, our remapping of the Z axis stretches the sky and pinches the ground, leading to a curved horizon line. This probably isn’t what you want.

In practice, it is likely to be difficult to get exactly the transformation you want. This might seem frustrating, since all you want to do shrink the ground plane without distorting other parts of the image. Unfortunately, an HDRI just doesn’t contain enough information to do that.
If you wanted to perform such a transformation without any distortion, you’d need to know the depth of the various points in the HDRI so you could perform perspective correction as part of your reprojection. Of course, HDRIs have no such information: they’re just a spherical capture of the light that reaches a given point in space, which effectively bakes the projection of that point into the image data.
In other words, you can no more adjust the size of individual objects in an HDRI than you can rescale or reorient individual objects in an ordinary photograph. The information just isn’t there.


Exporting character with multiple equipable armor parts and animations from blender to unity (Blender 2.78) I have a problem with a character i created in blender: he has multiple equipable armor parts and multiple animations as well as additional bones for hands (for weapons). When i try to import it to Unity, however, it imports numerous empty animations for armor parts, that are not even in my animation list in blender as well as skipping the primary animations from it. The only option that worked differently, was when i exported as fbx with the option "all actions" disabled, but then it only imported 3 animations "Run" "Walk" and "Grip right" for some reason.

Also, in NLA editor, it shows me only 1 animation.
PS: I also have 3 instances of empty walk animations below with no users, that i can't get rid of even with shift+x and reloading.

There's also a problem with character just hovering frozen even with applied animations in Unity, but i think that's just Unity linking problem somewhere and unrelated to this issue.

PS: The warning message in unity is about activating translation DOF for improved animation retargeting which doesn't fix the issue either.

Finally got it fixed (the animations importing part, at least). In FBX export options, had to change the version from FBX 7.4 binary to FBX 6.1 ASCII.

ARGGHH.


Changing Multiple Colours at Once Ok so I was wondering if it was possible to add a red tinge to all of these colours, but I don't won't to go into the node editor and change each one individually to have a red tinge. Is there a way that I can add a red tinge to all of the materials in one go? Essentially have some sort of master control over these 3 colours, so that if I add a colour to one of the materials it will also effect the others.

This is best done with node groups. Add a "main color" group that outputs a color to tint with. Incorporate that into the material nodes. Then, whenever you change the group, all of the nodes get the new color update.

As far as automatically adding the groups, it would be much harder (although not impossible), and it would require a good bit of python programming.


Rendering Translucent Materals through Glass in Cycles I am trying to make a realistic orange juice in a glass scene, but the glass seems to mess things up, as can be demonstrated by enabling "no caustics"

Without glass with caustics, with the glass without caustics, and with the glass with caustics

As you can see, the glass is making the orange juice darker and noisier. (all were rendered with 100 samples)

My question is, what is the best (fastest, nicest looking) way to render with the glass? (and still have the effects of refraction etc.)

Thanks

Excuse my technically incorrect explanation. I'm stating this from an artists perspective and don't know all the math behind all of it. :P

Glass uses a lot of processing power, and there's really not a way to render faster. I can however suggest a few things that will make the glass look better.

More Light!

This is probably the biggest issue I see when glass looks dark and yucky. Glass refracts/reflects light all over the place. Glass doesn't really hold much color itself. It's mainly just a light-bender. That's what gives it a realistic look.

Use an Environment Map

As stated before, glass just bends light. The more types of light it has to work with the better. Environment maps are one of the easiest ways to make glass look realistic. And it's not too much work to put one in the scene.

Set the color to White

Setting the color of the material will tint the glass with that color, so if you leave it with the default "almost white" grey, your glass will be darker. Set it to full white to have the maximum transparency.

You do need caustics

I don't know exactly what they do, but I know it has something to do with light bounces. You need caustics if you want the light to go through the glass.

From Wikipedia:

  In optics, a caustic or caustic network is the envelope of light rays reflected or refracted by a curved surface or object, or the projection of that envelope of rays on another surface.


Object hierarchy - scale does not change location I am importing a DAE file which has objects in a hierarchy.
When I change the first object in the hierarchy's scale (reducing by a scale factor of 1000), the object becomes smaller to the size I would like.
However, when I view the XYZ location of an object lower in the hierarchy, the dimension scale change, but the location does not. Why is this?
Example:
Before doing anything. Note the Location XYZ

Original scale factor of top level object:

I have now changed the scale for the top level object to a scale of .001:

I'm selecting the object a few down the hierarchy again. As you can see the dimensions of the object changed, but the location XYZ does not change.

It's due to the parenting and an expected result.
When a child appears scaled due to its parent scale, the child own coordinates, scale or rotation won't change.
That's allow, when unparenting AltP, to have the choice between "clear parent" and "clear and keep transform".
Internally, Blender keeps the object own coordinates in matrix_basis and the resulting coordinates of its dependencies in matrix_world.
Also, moving the parented object by x unit will result in a move of its own coordinates of x unit times the inverse of the scale given by its parent. So, all is coherent.
If you want to keep parenting with scales and locations being applied, select all the parts and use CtrlA to apply, then "scale".


Exporting / Rendering in a Print-Ready Format - I'm Stuck! Please, somebody save my aching brain!!! I have been scouring the web for quite a while now and cannot really find what i'm looking for - maybe you guys can help??

I love creating Flyers/Posters and Logos in Blender but i'm hitting issues when it comes to having a finished render/file that is printable or usable in a design context once i have chosen my desired angle/camera/lighting environment... I know how to render a basic image or animation, that's fine but i apparently need these to be in a format that is scalable and lossless in quality. I hit a similar issue with doing a logo for a website for a buddy, i managed to get the image without a background and keep all the colours/lighting etc, but i felt that i may have missed a vital part to this process as it definitely had its limits if i were to go for a large scale...

I keep coming across the terms vector / raster / SVG / TIFF and some others - i managed to have Blender create an SVG, but was literally the lines/vectors/wireframe of the 3d body and it had no colour /textures/lighting with it when i opened it...

I understand that if i were to send a file to a print shop to get, let's say a large banner printed then i would need a print-friendly file type rather than just a picture file...

is Blender able to do this or should i totally change my approach and go with a standard 2d program instead? I LOVE Blender, i don't want to use a different program, I'm invested in the awesomeness of this amazing program!

Please if somebody could point me in the right direction i would be so grateful, i'm starting to lose my motivation!

EDIT:

added a couple of images - if the poster was going to the printers rather than online then i would have needed to try and have a vector i belive

People at print shops expect most illustration, desktop publishing and page layout graphics design work to be handed in a vector format like say PDF, commonly also EPS, Adobe Illustrator, Coreldraw, Indesing, and to a lesser extent even SVG.

The advantage of these vector graphics formats is that they don't pixelate when zoomed in on, so they provide a theoretically infinite quality and definition. They can also be much smaller in file size for higher image quality levels.

And for much of your work it does look like it could be made in a vector graphics editors, like say Inkscape, CorelDraw, Adobe Illustrator, Indesign, etc.
Logo designs usually benefit from vector formats, so does page layout like fliers, posters, advertising.

That being said not all stuff can be done in vector graphics, images, photos, renderings, and elements with many color variations benefit from raster graphics file formats like JPG, TIFF, PNG, TGA, HDR, etc..

Renderings from 3D models are among those that are generally represented by raster images. These can and should be combined with the remaining vector elements in a mixed document whenever possible.
While it is possible to extract vector drawings from 3D models directly, it is quite more limited in terms of representation, and not trivial to achieve.

Under Blender you have a few options, which is using Freestyle which is implemented as a rendering engine that allows extracting non-photorealistic images. There is one plugin shipped with Blender by default that allows exporting SVG from freestyle.

One other option under Blender is using the third party addon SVG Output Script, which while more basic at times, allows viewport exports that may produce closer to expected output for certain situations.

You can also look into NURBS modelling applications like Rhino or Moi that have math based geometries and allow more accurate vector output in PDF format.

You can then import those into any vector graphics editor and tweak it further.

Have in mind that non of these options aim to export a fully realistic raytraced image of your model, like traditional rendering, quality may also vary. Most of the time though, a high enough quality rendering, with dense enough resolution images should suffice even for printing, if correctly combined with vector info for all non 3D elements.

For purely bidimensional graphics like most of the logos, they are likely right, you should probably change your workflow and use proper drafting tools like say free and open source Inkscape, or Scribus.

I see no good reason (other than enjoying your current workflow) for doing basic 2D graphic design in a fully 3D workflow. It is more complex and doesn't really provide any benefit.


How to make object A a parent(keep_transform) of object B via Blender's Python API? parent keep transform??

  objects = bpy.data.objects

  a = objects['Cube']

  b = objects['Cube.001']

  b.parent.keep_transform = a

CODE:

import bpy # sin esta libreria no funcionan los comandos en blender
techos = bpy.context.selected_objects

for i in techos:
    #bpy.ops.object.empty_add(type='PLAIN_AXES',radius=100,location = i.location) = o

    empty = bpy.data.objects.new( "empty", None )#crea un empty y lo guarda en una variable
    bpy.context.scene.collection.objects.link(empty)#agrega el empty a la escena
    empty.empty_display_size = 3 #da un tamaño al empty
    empty.empty_display_type = 'PLAIN_AXES'#determina la forma del empty
    empty.location = i.location #la locacion del empty es la misma que la del objeto seleccionado

    i.parent = empty#el objeto seleccionado es hijo del empty
    i.matrix_parent_inverse = empty.matrix_world.inverted()

    #i.parent_set(i,keep_transform = True)
    #i.parent_set()
    print(empty)

I found a solution, putting the object "I" on both sides, however I can't understand it well

If you want to retain the transformation of the child you can do this:

 b.parent = a
 b.matrix_parent_inverse = a.matrix_world.inverted()

You need to update depsgraph after creating the empty (matrix_world of the newly created object is updated after updating depsgraph):

import bpy # sin esta libreria no funcionan los comandos en blender
techos = bpy.context.selected_objects

for i in techos:
    #bpy.ops.object.empty_add(type='PLAIN_AXES',radius=100,location = i.location) = o

    empty = bpy.data.objects.new( "empty", None )#crea un empty y lo guarda en una variable
    bpy.context.scene.collection.objects.link(empty)#agrega el empty a la escena
    empty.empty_display_size = 3 #da un tamaño al empty
    empty.empty_display_type = 'PLAIN_AXES'#determina la forma del empty
    empty.location = i.location #la locacion del empty es la misma que la del objeto seleccionado

    # Add this line
    bpy.context.evaluated_depsgraph_get().update()

    i.parent = empty#el objeto seleccionado es hijo del empty
    i.matrix_parent_inverse = empty.matrix_world.inverted()

    #i.parent_set(i,keep_transform = True)
    #i.parent_set()
    print(empty)


Particle system doesn't render but shows in 3D view Not sure where I am going wrong. The render setting is turned on for the particle system, but it still doesn't work when I render the animation. I'm sure it's something straight forward, but I can't find out which setting isn't correct. Where would be the next place to look? It's just a simple piece of text with a particle system. Thanks!

https://www.dropbox.com/s/yx4hiqssrlcrj9j/myFanArt.blend?dl=0

Create an object with a material and shape you want for the particles and assign that to the particle's Dupli Object section.

I added a green sphere on a different layer and selected it as the particle's shape.