What is a good workflow between blender and 3d coat? I bought 3d coat pro. I upgraded from an old edu license I bought three years ago and now I'm trying to find a good workflow between blender and 3d coat. I mostly make game models like characters, weapons, props and modular level assets. I also do a bunch of animation. My old workflow consisted of building a hp mesh and baking it to a low poly mesh with cage mesh via xnormal. Sometimes I cheat and do a lp mesh and beef up the poly count for baking then paint heightmaps (saves a ton of time for simple stuff). From there I generate my own textures in blender and gimp then use substance painter indie to put together my textures for pbr usage. But now that I have 3d coat I have some new options for my asset creation process. Not sure which route to take. Lots of possibly. What do you guys recommend?

I also use 3D Coat, the built in AddOn helps a lot. You have to go into preferences and enable it.
My workflow is: Sculpt Highpoly in 3DCoat, retopo and lowpoly in 3DCoat, Exporting Highpoly and transfering the lowpoly to Blender for unwraping, after that just baking in xNormal.


How to do large-scale texture painting? I am making a large open-world video game and the terrain I am using is made from a mesh generated with the A.N.T. landscape generator plugin. The mesh itself is scaled to about 20 sq. km in area. (I already unwrapped the mesh for anyone asking.) I want to apply textures to it with texture painting to get a decent appearance, but the mesh is so large I'd have to use a couple hundred-thousand-pixel base texture to get a crisp texturing job (any lower and the textures will get very disproportionally large and blurry). I think there is a way to do this by dividing the mesh up into several chunks so I could use several smaller textures instead of a much larger and unweildly one to get a crisp job done, but that would take me way too much time as I'd have to divide it into 64+ chunks for this to be viable. So I'd like to see if I can get a good texturing result without doing this or (if I have to split up the mesh) a tool that could automate that action. Thanks to anyone in advance.

I am not sure if this works in your project but if I would create a landscape I would use seamless textures for every material that you want to use, then paint a mask where witch material should be.

You can paint the mask in a very low resolution but the actual environment uses sharp textures.


Does something like a Join Modifier exist? Lately I've been experimenting with procedural shapes, based on a very limited mesh. I found myself looking for a way to join two meshes using a modifier. The Boolean modifier doesn't do the trick. It just messes up the mesh in horrible ways.

Some way out (or hack) is to use the Start Cap and End Cap parameters on an Array modifier to join various meshes together. Given their joints are close to identical, this works great. When I set the Count to 1, uncheck both offsets and check Merge, it does what I want:

I can even build the end caps with modifiers (array, mirror, ...). That way, I can create meshes with very little source data, while having super complex end results that are editable and animateable with very little effort.

Now I am wondering if there is a better way to do this. Remember that I want to keep the original meshes editable and separate at all time. Is there a way to join/merge meshes using a modifier, other than my Array modifier hack?

UPDATE:

Using a Boolean modifier does not work because it's not really "aware" of the matching vertices. It just tries to merge two meshes together at whatever cost. Using the exact same meshes, the result is the following:

The Array modifier is much smarter in that respect. It tries to join the meshes at points where vertices are overlapping or in very close proximity to each other (Distance tolerance). It actually merges the vertices (removes doubles) so the end result is more or less the same as merging vertices of two separate meshes in edit mode. And that's what I am looking for.

This answer comes from a post by the asker on a different forum.
By using the Array modifier with the count set to $1$ (and, optionally, each Offset option disabled), you can use the Caps field to join up to two additional objects.
You may need to fiddle with their positions in order to achieve the ideal effect. If you want to merge overlapping vertices, make sure that Merge is also checked.


How do I group all my groups into one 'master' group? I am currently making a medieval cannon, and I have been naming all the parts of the cannon, also I grouped all parts into different groups for easier recognition. For example I grouped all components of the wheel together as one group (e.g. Rim, Disc etc.) But how can I 'group all groups' together as the final product in order to publish my model. Any help is appreciated.

Objects can belong to more than one Group. You can simply select all objects you need and group them into a MASTER_Cannon group that can be used for appending/linking.


Installing a Python module in Blender's Python API (This is related to this post)

I would like to add a module to Blender's Python (Blender v2.76). I want to follow the solution outlined in the link above, but my Blender directory does not have a 2.7x subdirectory. Could this be because I am using 2.76, and the answer uses version 2.72?

The output of running ls in my blender directory is the following:

GPL-license.txt                 blender.app
GPL3-license.txt                blenderplayer.app
LICENSE-bfont.ttf.txt           copyright.txt
LICENSE-bmonofont-i18n.ttf.txt  game
LICENSE-droidsans.ttf.txt       jemalloc-license.txt
LICENSE-libiomp5.txt            readme.html
Python-license.txt              startScript.txt
blen files

Where blen files and game are my own subdirectories.  From my understanding of the related answer, I would simply need to the Python module I need in the /blender/2.72/python/lib/python3.4/ directory?

What should I do if this directory is missing? This is strange, because I can script in Python, from within Blender, even though this directory is missing...

Python loads any module from the directories in sys.path. Try this in the interactive Python console in Blender:

import sys
print('\n'.join(sorted(sys.path)))

That'll give you a choice of paths. Alternatively, you can place your scripts next to your blend file, and in the blend file text editor itself have a script like this:

import bpy
import sys

p = bpy.path.abspath('//scripts')
if p not in sys.path:
    sys.path.append(p)

Make sure the script name ends in .py and the 'Register' checkbox is checked. After this runs you can import Python modules from the scripts subdirectory of whichever directory holds your blend file.

Also make sure that the directory names are actually valid Python names, so without spaces.


How to isolate a single part. Blender to SolidWorks my apologies in advance, im a total n00b to blender, i have NEVER used it before but a certain model i purchased has most likely been made with it, not 100% sure tho... I have the blender-file and atleast it opens up nicely.

I've been using SolidWorks for a while and im trying to convert the model into working in SolidWorks. Problem is, it has waaaay too much "facets" for SW to handle so it dies.

Plan B, i'l just do it piece by piece. The model seems to have several different parts in it and ive managed as much as move em around. A single part looks small enough for SW to handle so lets try that...

So, what i need a step-by-step quide in how to isolate a SINGLE part in the whole model into ONE file. Delete all others. I tried just smashing delete on all other parts, didnt work... Or i did something wrong.

I can then export that part as an STL file into SolidWorks and try to read all the parameters/features/etc. One part at a time.

So i have the entire model open in front of me, i click on a single part i want to isolate, delete ALL others, how do i do that?

Open a new Blender and press Shift F1

find your file

then go into the object folder

and choose one.

You might also want to try and turn off the "subsurf" modifier if it has one

It would be in the Properties editor->modifiers


How to add imperfections to the Principled BSDF Shader (Cycles)? I am looking to create scratches, swipes, brushes, similar to the reference image provided, that will only appear where I wish them to (as shown below).

What is the best Node Group/Layout/Structure/Workflow to implement such scratches/brushes (purely) on top of a material?

For clarity, I have provided the reference image below, as well as the blend file, with the texture in the node setup.
http://pasteall.org/blend/index.php?id=47820

I also dispose of materials from Poliigon, if that is of assistance.

Just add mix rgb (screen) node to your roughnes map and connect surface imperfection map to the second socket


Why isn't 'bpy.context.object.name' printing out the name of my newly created object? I have a simple operator which creates an empty object and immediately prints out the object's name:

import bpy

class createEmpty(bpy.types.Operator):
    """Create an empty object"""
    bl_idname = 'make.empty'
    bl_label = 'Create an empty object'

    def execute(self, context):
        bpy.ops.object.empty_add(type='PLAIN_AXES')
        print(bpy.context.object.name)
        return {'FINISHED'}

class createEmptyPanel(bpy.types.Panel):
    bl_idname = 'create_empty_panel'
    bl_label = 'create empty object'
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = 'object'

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.operator('make.empty')

bpy.utils.register_class(createEmpty)
bpy.utils.register_class(createEmptyPanel)

When I run this from the console, it creates an empty object and prints its name, 'Empty'. However, when I click the button in the UI, it creates an empty object, but prints the name of the object that was selected, in my case 'Cube'.

Why is this? Is there a better way to select the object I just created, other than bpy.context.object?

The simplest solution is to use active_object instead:

def execute(self, context):
    bpy.ops.object.empty_add(type='PLAIN_AXES')
    print(bpy.context.active_object.name)
    return {'FINISHED'}

Blender doesn't switch the bpy.context.object until after the createEmpty operator has completed, hence the Cube's name was being printed. Your operator is invoked from the createEmptyPanel which has bl_context = 'object', I suspect this has built in blocking of bpy.context.object changes.

Avoid this behaviour by using the lower level bpy.data.objects.new to make the empty. Change the execute function to avoid using bpy.ops.object.empty_add(), like:

import bpy

class createEmpty(bpy.types.Operator):
    """Create an empty object"""
    bl_idname = 'make.empty'
    bl_label = 'Create an empty object'

    def execute(self, context):
        # bpy.ops.object.empty_add(type='PLAIN_AXES')
        scene = context.scene
        objects = bpy.data.objects
        mt = objects.new("empty_name", None)
        mt.location = (0, 2, 1)
        mt.empty_draw_size = 2
        mt.empty_draw_type = 'PLAIN_AXES'
        scene.objects.link(mt)
        scene.update()
        print(mt.name)
        return {'FINISHED'}

class createEmptyPanel(bpy.types.Panel):
    bl_idname = 'create_empty_panel'
    bl_label = 'create empty object'
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = 'object'

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.operator('make.empty')

bpy.utils.register_class(createEmpty)
bpy.utils.register_class(createEmptyPanel)

It's a bit more verbose, but it does immediately give you a reference to the new empty.


How can I connect the top loop to the down loop with faces Hey I want to connect the bottom loop with the top loop so that it forms a solid.

I have tried selecting multiple vertices and pressing F but that just creates a large face which I do not want.
I have tried using grid fill bu that doesn't work either.
The solution that seems to work is by selecting four vertices and pressing F and then selecting the next 4 and pressing F and on and on. That just takes too long.

You should use Bridge edge loops command:

Select both loops:

2.Then click space and type bridge edge loops:

Click on it and its done:


remove weight by part of the mesh in weightpaint mode I have got a mesh made of multiple part (the mesh is a dog, each limb is a separate part) I am trying to paint the weight of the back leg but I have trouble doing so because that leg intersect the body. Is there a way to remove the weight painted on the body while keeping it on the leg (something similar to select a mesh island with "L" in edit mode)

here is my object:

as you can see the leg intersect the body

as you can see the upper bone of the leg has a bit of weight on the body

You can hide the part you want in edit mode: select and use H.

Then go in vertex paint mode and click on the 'vertex selection' button. The unwanted part will be hidden.

Then select all the remaining vertices using A to paint on them.


uv subdivision between blender and maya [![enter image description here][1]][1]
I textured the model in maya and it looks good but when i imported the same  model into blender and add subsurf modifier level 2 then the texture looks distorted. Turning on the simple subdivision algorithm  instead of catmull-clark algorithm seems to fix the distortion but the mesh look very bad. Is there any solution for it[![enter image description here][2]][2]
Changing the uv boundary smoothing option from maya catmull-clark to preserve edges and corners  creates the same problem in Maya as in blender. Is there any similar option in blender to change the uv subdivision algorithm

You can try changing the Subdivide UVs setting on the subdivision modifier in blender.

This setting effectively determines whether vertexes are shifted when applying the subdivision to the Uvs or not. In particular, if simple is getting the projection you want, changing this setting will probably help

https://docs.blender.org/manual/en/dev/modeling/modifiers/generate/subsurf.html


How to get the base dimensions of an object (ignoring all of it's modifiers)? I'm trying to code a function that gets the base dimensions of an object that has multiple modifiers applied.
Sure, I can turn all the modifiers off, get the dimensions and then re-enable everything, but I'm wondering if anyone knows a different solution.
I tried with the bounding box but that is also affected by the modifiers. I also tried using the mesh data object.data.dimensions but meshes don't seem to have the "dimensions" attribute.
Any ideas, elegant or otherwise?

Look at the mesh coordinates.
The unmodified dimensions of the mesh can be obtained from the mesh.
import bpy
import numpy as np

ob = bpy.context.object
me = ob.data

coords = np.empty(3 * len(me.vertices))
me.vertices.foreach_get("co", coords)
x, y, z = coords.reshape((-1, 3)).T

mesh_dim = (
        x.max() - x.min(),
        y.max() - y.min(),
        z.max() - z.min()
        )

print(mesh_dim)

Could use this to give a mesh a dimensions property
import bpy
import numpy as np
from bpy.props import FloatVectorProperty

def get_mesh_dims(self):
    coords = np.empty(3 * len(me.vertices))
    me.vertices.foreach_get("co", coords)

    x, y, z = coords.reshape((-1, 3)).T

    return (
            x.max() - x.min(),
            y.max() - y.min(),
            z.max() - z.min()
            )

bpy.types.Mesh.dimensions = FloatVectorProperty(
        name="Mesh Dimensions",
        get=get_mesh_dims,
        subtype='XYZ',
        unit='LENGTH',
        )

python console code, default cube, arrayed subsurfed spun and hung.
>>> C.object.data.dimensions
Vector((2.0, 2.0, 2.0))


Render camera is different from the viewport camera I've been trying to make my render camera match the viewport global camera, but I can't find the proper settings. It seems that the viewport camera is different from the standard render camera though they have the same Focal Length (50mm). Moreover, there's no viewport camera's size option.
Viewport camera:

Render camera:

Viewport camera shows more extreme angle and does not distort the image.
Render camera looks more like orthographic.
How can I configure my render camera to match the viewport camera (to get the same render result)?
Thank you for reading my post!

Your camera settings might be off, make sure to in the sidebar under view that you are using the same camera in the view properties and the scene properties. Images to help you find where they are.

Make sure that the local camera (One you want to use for preview in viewport) has the same name as the one in the scene properties.


How can I bend a surface into a cylinder? Ive got the mesh that is made up of hexagons and I want to curve it into a cylinder following the curve (circle) that is in the middle. Any tips?

There is a very simple way to replicate this effect with modifiers, and to do it, you only need 1 hexagon.  Just follow my steps below to see how something like this can be accomplished.
Step1:
With 1 hexagon object in your scene, add a circle bezier curve, scale it up, and rotate it 90 degrees on the x or y axis.  when this is complete your scene should look something like this:

Step 2:
select your hexagon object, and add an array modifier, and a curve modifier, then in the curve modifier settings, click on "curve object", and then select your circle bezier curve.  (see image below)

Step 3:
In the array modifier settings, change the amount until the hexagons almost fit all the way around the circle, then scale your circle curve as needed until the 2 edges of the first and last hexagon are touching.  when this is complete, your mesh should look something like the images below:

Step 4:
once you've completed all the steps from step 3, add another array modifier to your hexagon object, but this time, set the X factor in the Relative offset settings, to 0, and change the Y factor to one.  then, all that's left to do is increase the amount until it is in the shape of a cylinder.  (see image below)

Now you're done. It's that easy!
If you encounter further problems, you can let me know and I'll be happy to help : )


Error rigging with Pitchipoy skeleton As a rigging noob, I am drawn to use the Pitchipoy skeleton from the Rigify addon, but I am struggling to make sense of the following error code that keeps the metarig from generating anything at all.

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\rigify\ui.py", line 286, in execute
generate.generate_rig(context, context.object)
  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\rigify\generate.py", line 293, in generate_rig
raise e
  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\rigify\generate.py", line 281, in generate_rig
scripts = rig.generate()
  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\rigify\rigs\pitchipoy\limbs\super_limb.py", line 499, in generate
bones['fk']     = self.create_fk(  bones['parent']        )
  File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons\rigify\rigs\pitchipoy\limbs\super_limb.py", line 399, in create_fk
eb[ ctrls[2] ].parent      = eb[ mch      ]
IndexError: list index out of range

location: <unknown location>:-1

To me, the error message suggests that the problem mostly has to do with the Pitchipoy files, but to be on the safe side, these are the screenshots before and after my attempts to generate.

http://www.pasteall.org/blend/43095

Pitchipoy is very sensitive - meaning you can't change anything except the position of the bones. You cannot change names and you certainly can't change bones. If you add a new Pitchipoy rig and enter edit mode you will see it has 159 bones. Your rig has 157 meaning you delete 2 bones and hence broke the rig.

Updated: Not completely true that you can't add bones - that is possible in Edit mode > Rigify Buttons > Add Samples. Helpful information is also in this answer on changing the finger controls.


Loop cut is skipping one face in particular The loop cut is skipping one face in particular (the circled one) and then continuing to the other side. I tried removing doubles and that didn't work. I tried selecting the n-gons and that didn't work. I also tried dissolving the edges and sliding them around but those didn't solve it either. Any suggestions? It looks like there's something blocking it or there's a kink in the mesh but I don't know how it got there. I've been working on the top of the anvil for some time and then I go to the bottom to find this. (And yes, I've checked similar questions but the answers did not help me. All of the solutions were things I've already tried).

Here's the file:

The problem is being caused by the parallel set of vertices (circled in red). This is causing a break in the set of faces on which you wish to create loop cut.

When zoomed in, it looks like this

So the solution is to dissolve one set of parallel edges, that is not connected to the edge marked in green.(hot Key 'X')

Once they are dissolved, you will be able to loop cut through those faces.
Checkout the attached blend file in which I dissolved those edges.


Designing suit by cutting cloth from a model I am new to blender and I'm trying to make my traditional clothing but I am facing a trouble here.

I cut the cloth from makehuman model that I created and I am trying to make this "triangle open" on the chest which I can't. I tried deleting faces and filling them with the "fill face" function but it didn't go well.

Here is my attempt:

You can try the Knife tool: in edit mode, press K, then clic ond the start point, end point, enter to confirm.
Start and end need to be on a pre-existing vertex or edge.


Can I model with in a mode where quads are all planar? I have started modelling with triangles and quads.

As many novice blender user before me, it took me a while to understand that my quads were in most case not planar.

For my project, I need my quads to be planar. I understand that I can use the Mesh->Clean_up->Make_Planar_Faces to flatten quads.

However, I find this a bit messy as soon as you have a lot of quads.

I would like to know if it is possible, when you make a face or move a vertice, to impose a "quad needs to be planar" constraint.

I mean, that if I select 3 vertices, Blender should be theorically able to put  the 4th vertice in the same plane as the 3 others.

I hope I am clear... is there a way to model quads with this constraint ?

Or if not, is there a way to make a quad planar, by specifying that 3 vertices should not move, and only the fourth should ?

Thanks in advance for your help

I never needed that, but I think this workflow could do the job for you:

Creating new planar quads:

Make sure you have F2 addon enabled (it is enabled by default in Blender) by pressing CtrlAltU and navigating to Addons. Search for "F2" and enable it if it isn't already.
Extrude one vertex from existing polygon's edge so you get 2 edges prepared for the new quad
Select the middle vertex and move your mouse to the position you want to create a quad's opposite corner vertex
Press F - now the F2 addon creates a planar quad based on these 3 vertices

To move a vertex while keeping a polygon planar (when creating new polygons)

Make sure you have Transform Orientation set to Normal

Select a vertex and press G for move and then ShiftZ 2x to move on a plane perpendicular to Z normal of the face
This of course work only for corner vertices that are not part of other faces this is going to work when you are creating new polygons.
Alternatively, you can use Vertex Slide ShiftV that move's a vertex along edges so it also keeps a face planar. You can press Ctrl while sliding to be able to extend the sliding outside.

And as you have already noted, you can always press Spacebar > Make Planar Faces to convert the existing faces to planar ones.


Reducing fireflies from a cycles render So I'm trying to use maps while applying textures to produce a more realistic scene. The issue is my scene is producing too many fireflies. I've tried adjusting clamp settings but the fireflies are still there. I've also tried adjusting values in the node editor but it's till not working.
This is how I have setup my lighting:

Here's my node editor screen:

The final image render:

I've tried adjusting the roughness values of the glossy shader and the diffuse shader but the fireflies are still there.

Cegaton advices are good to folow to help people to help you.

I've tried with my own textures and have the same fireflies.

In your specific case:

you've plug the normal in the Height slot, height is for bump map (grayscale images), with this I haven't got any fireflies at 32 samples.
it's better to have a mesh correctlly unwrap, apply the scale before unwraping and redo the unwrap.
too strong normal map or bump map can lead to fireflies
not really fireflies related but when trying to recreate realistic materials, never mix a diffuse and a glossy without a fresnel effect.
Node Input--> Fresnel and plug it in the mix factor

General advice regarding fireflies:

Personnally the most important feature when using HDRi is to set the map resolution to at least 2048, but I prefer 4096 for a good base, personnally I never go under but I'm not so limited by graphic card memory.
Go to properties tab--> world--> settings pannel--> map resolution.
An other fireflies killer and lighting killer if you don't set up corrctly, is the clamp direct in the properties tab--> sampling pannel.
To set up correctly you need to determine what is th most powerfull ray that land in your scene and adjust the value to clamp only what necessary. A bit tricky. In most case without too much risk a value between 100 to 80 make the job without altering the lighting (if you don't see light sources).

Perhapse I'll edit my answer to give my tech if someone is interest.


Creating a Black Hole in Blender I recently saw the film Interstellar and it was fantastic! The effects blew me away and it got me in the mood to try and re create the black hole, however I haven't been able to find any information on how you can make a spherical object warp the world around it.

Is there anyway in which you can do this? I've tried adding another sphere, making it transparent and giving it a gravitational lighting effect but it just doesn't cut it. The sphere needs to somehow warp everything around it and not itself.

I'd love to hear any tips or suggestions to try out and experiment with them!

Note that I am not great at using nodes so if that's the key, could you explain in great detail?

--

I've tried that method but the outcome is with a black sphere. I've checked all the nodes and modifiers multiple times and all is the same so I'm slightly confused as to why it's not working the same. I have a hunch that it could be the shadow being emitted by the half sphere however I've disabled it in the 'Ray Visibility' section. I've tried adding transparency nodes with ray depth, shadow ray, camera ray etc but nothing seems to be working.

Weird shockwave effect:

Here's my .blend file:
Black Hole

I have the black hole working nicely now. Have made some slight changes to accommodate for jagged edges and the warp moving away from the black hole.

I've changed the bounce values to decrease the amount of dark patches.

Here's what it now looks like. All I need to do now is figure out a way to create an inner distortion around the very edge of the black hole. Any advice on that would be great! Then I can work on an accretion disc.

I've upped the To Max value to 0.040.

I should also note that I have chopped the black hole sphere in half. This is so the refraction sphere doesn't hide behind it when up close. It also keeps a nice warped edge when close which looks really good.

The trouble with this is that you need light to "bend" in a continuous arc around the black hole.
The reason why this bending is problematic is that cycles assumes light always travels in straight lines. Light does travel only in straight lines, but it can be bent by gravity.
Gravity is a distortion of spacetime around objects. The more massive the object, the more distortion.
So light is always going straight (from it's point of view), but to us it appears to bend as it follows the "straight lines" of distorted space.
Normally these distortions are very small, even with such big and massive objects like the sun. However with such a ridiculously massive object as a black hole, this effect can be quite extreme.
I don't know of any render engines which take into account such corner-case complications like the bending of spacetime near gravitational bodies :P
This is why a special render engine had to be written to render the effects in Interstellar.

TL;DR:  Light is bent around black holes the same way the paths of planets around the sun are bent. Cycles doesn't have any support for simulating this kind of phenomenon.
So, how can we render it with cycles anyway?
In cycles the only way we can "bend" light is via refraction, which occurs when light exits one medium and/or enters another. It should be noted that refraction a completely different phenomenon from gravitational lensing.
This is really the same problem as Is it possible to change the IOR inside a volume?.
can only bend light at a surface, via the refraction shader.
We need to make light bend continuously, sort of as if it's in a medium with a changing IOR. However we can only change it's direction at a surface.
To visualize the difference, take this example image.

The inner circle represents the event horizon, from which no light can escape (i.e. the black part).

The outer circle represents the approximate distance at which the bending of light becomes noticeable. In the version on the left this circle represents a refracting sphere as described by Nightshade.

The lines represent the paths of light rays as they travel near the black hole.

Note: While thinking of how to set up some kind of material or effect, it's often useful to think of the scene in the same way that the render engine does. Cycles is a backwards path tracer, meaning it traces rays from the camera out into the scene. So try thinking of these rays in the same way.
See How is Cycles different from Blender Internal? for more info on the workings of cycles.

Example is only a rough hand made visualization, not accurate.
As you can see, rays which hit the refracting sphere are bent all at once at a single point, then continue going straight. It's more like a "direction change" than a curve.
One way to get around this problem is to use a lot of refracting surfaces (black lines) which change the direction the ray (yellow line) a little bit at a time, resulting in an approximation of a smooth curve:

To procedurally create such an object:

Create a single edge.

Add a plane (⇧ ShiftA > Mesh > Plane), then switch to edit mode (↹ Tab), rotate it 90° around the X axis (RX90), and scale it to 0 on the Z (SZ0). Remove doubles by pressing W> Remove Doubles(R).

In object mode (↹ Tab), add an empty (⇧ ShiftA> Empty) and rotate it a small amount around the Z (I rotated mine by -2°).

Add an Array modifier to the line object:

The number for the array modifier Count can be determined like this:
360 / absolute_value(empty_rotation) / 4 + 1
Which gives 46 when empty_rotation = 3.
To add more surfaces and increase the accuracy (and rendertimes!) of the approximation, rotate the empty less and adjust the array count accordingly.

Add a Screw modifier:

It should look like a strange sort of half-sphere.

Add the hole itself by adding a sphere at the center of the front most surface of the half-sphere (⇧ ShiftA> Sphere):

For the material, give it a diffuse shader set to black. This will totally absorb any light which hits it, so zero light will be reflected off of it, making it completely black.

Add a material to the half-sphere.

I've used a spherical gradient texture to control the IOR in order to make light bend more when closer to the center, and less when farther from the center.
This is a very approximate and artistic approach, not very accurate by any means.
If the scale of your object is (1,1,1), the Scale of the mapping node should be set to the diameter of the half-sphere object in BU. This way the gradient texture just fades to black before the edge of the half-sphere object:

To quickly preview nodes in a material, enable the Node Wrangler addon in User preferences > Add-ons, then ⎈ Ctrl⇧ Shift LMB on any node to quickly connect it to a "preview" emission shader.
In my case the diameter is 5 BU, as can be seen with Length enabled in 3D view > Properties region (N) > Mesh display while in edit mode:

The Map Range node is a node-group which I created based on the implementation in the compositor:

The To Max and To Min values can be adjusted to control the maximum and minimum amounts of refraction. Setting To Max to a higher value will result in more distortion.
Remember to set the color of the refraction node to pure white, so light doesn't get absorbed while bending through the refraction object.

As each ray will have to go through many surfaces, make sure the maximum bounces is set high enough in Render settings > Light paths.

You may want to disable the effects of the refraction object on other objects, as they won't be correct. Light is only bent the way we want it when it enters through the front (thinking in terms of backwards tracing). If a ray bounces off another object and then hits the refraction object from the side, it won't bend anywhere near how it should.

Of course, it's not any more correct to just disable it, but this should help with rendertimes a bit if there are lots of other objects in your scene.

See the manual for more detail on ray types.

Make the black hole always face the camera.

Now our light bending setup is almost complete, but for it to work properly it must rotate so only the front is visible to the camera.
To do this, add another empty (⇧ ShiftA> Empty > Sphere) and parent the refraction object, array empty, and diffuse sphere to it with ⎈ CtrlP:

Add a Copy Rotation constraint to the empty, with your camera object as the target. You may need to enable Offset and rotate the empty in order to get the flat side of the half-sphere face the camera:

If you're wondering why we're not using a Track To constraint, see Planes rotating to face the camera, but only along one axis
Result:

Note that this only covers the lensing part of the black hole. I'll leave the high-energy matter and the accretion disk to you, as I wouldn't want to take all the fun away ;)


How to animate paper tissue pulled out from a box? how to make the animation of pulling out a piece of paper tissue out of this container? I am a freshmen of animation, not sure which would be the right direction to dig into. Seems like it could be a combination of curve and rigid body? Thanks a lot!
In the picture, it is just a still model.

Aug.9th
Alittle update on this issue. I made a premature anime of pulling the paper tissue out.
Inspired by a toothpaste tutorial on youtube. Links: https://youtu.be/46DgMdxEhRQ
There is my paper tissue anime.
Graph editing is confusing, comments are welcome.

There is the final animation of the paper tissue flying out of the container.
Paper tissue flying out the container
There is the set up.


How do I make a molecular "cloth" which I can drop some objects onto? Basically what I want to try to create is similar to this:

https://www.youtube.com/watch?v=UhuOsg06oOs&list=LLl-SOEftSFSK6xy1vylYL8g&index=8&t=0s

I've downloaded molecular and cube surfer.

I don't care about the reflections, colors etc. I just want to try to recreate the physics.

I think I need to create an emitter which produces all the balls into a grid. But then I also need to attach this to something, so it won't drop - plus I need to make so other objects can drop onto it and make it move.

I'm lost. Spend the last two full days trying to wrap my head around this.

Emitter sounds a little like over complicating things. Here was my process.

Create a plane with ~20 subdivisions. Add vertices that will be pinned to a vertex group.
Enable cloth physics for plane and enable pinning with the vertex group that was created as option.
Animate an object moving or add a rigid body that will collide with the cloth and enable collision in the physics tab.
Create the molecular object (Smoothed sphere in our case) and parent it to the cloth plane object.
In the Object tab of the properties find duplication. Choose verts or faces. Make sure both objects are in the same layer as it will only display if they are.


The camera is scaled like this and the render image is also stretched' This is what it looks like in the veiwport

There is no such thing as "for some reason" the only reason is because you changed settings, without knowing what they are for.
Do you know what the aspect X and aspect Y controls do?
If you don't, then don't touch them. Set them back to 1.
Also, moving the scale for the camera in the 3d vieport will only affect how big it looks on the viewport, but will have no effect on the render whatsoever.
I suspect you wanted to change the field of view of the camera, as in the zoom lens of a camera, if so, then change (and animate) the lens size (focal length).

To understand what the aspect controls are for read:
Rendered aspect ratio different from the viewport's camera view


How to change the game control? I have a game which is a car moving forward on pressing the up arrow and stops on pressing the down arrow. I need to change the game control. I want to use a matlab file as input.
This file contains a function, when the function = 1 car moves when it's 0 the car stops.

import bge
cont = bge.logic.getCurrentController()
own = cont.owner
move = cont.actuators["move"]
pressup = cont.sensors["up"]
pressdown = cont.sensors["down"]
speed = move.dLoc[1]

if pressup.positive:
  speed = speed + 0.05
  move.dLoc = [0.0, speed, 0.0]
  cont.activate(move)

elif pressdown.positive:
  speed = 0
  cont.deactivate(move)
  move.dLoc = [0.0, 0.0, 0.0]

Indirect Control

I suggest to first exchange the keyboard sensors by message sensors. You do not even need to change your car controlling code.

to

To make it working, you now need a "user input provider" (other object) to send the new messages.

Note: the True Level Triggering. This is necessary to continuous send the messages as long as the key is held.

Now your game should act as it did before

File input

Now you can add a request provider that does not listen to the keyboard, but reads a file and sends according messages with the right timing. Be aware this is a continuous process. You should send a message (of on subject) just once per frame.

You need to process file operations via Python. How to do that is a different topic.


Where did the modifiers tab go when you click n in graph editor? At first, there was the modifiers, but after I did some more stuff (I duplicated the object a couple of times), all it shows are view properties. Help!

You must select the actual channel name in the Graph Editor before the tabs inside the Properties Shelf will be revealed. Same goes for the Driver Editor. This threw me off for some time as well.


Object won't drop after keyframing animate physics I have an animation with many objects falling to the ground and then bouncing and rolling around normally as dictated by physics. For the objects that fall starting at frame 1, everything works perfectly. However, when I try to keyframe an object to fall starting at frame 150, it either hangs in the air or falls within a single frame. When I remove the keyframes, the object jumps from its place above the surface (frame 1-2) to another location (frame 3), then falls at a more realistic rate until it goes through the surface and bounces there. In all scenarios, the rigid body type is Active. The object is a grouped object. More details about the object here.

Scenario 1 - Hanging in the Air

Based on this thread.
Rigid body is active. I have set location and dynamic keyframes at 149 (dynamic off) and 150 (dynamic on). Object hangs in air after frame 150 and does not fall.

Scenario 2 - Drops Through Floor in One Frame

Based on Blender Manual Rigid Body Tips. At frame 149 (animate enabled) the object hangs in the air, until frame 155 when it switches to animate disabled and abruptly goes through the floor in a single frame.

Scenario 3 - Rigidbody with No Keyframes

There might be keyframes, but I have tried to find them and can't. From frame 1-2, the object is hanging in the air.

Frame 3, the object instantly rotates 90 degrees and is translated to a different location.

The object then falls at a normal rate, going through the ground surface at frame 60 where it bounces a little.

This seems like a relatively simple thing to do. What am I missing here?

Emulating bounce physics -

.--.

Producing the basic bounce -

Set the timeline cursor to frame 1.
Set the 3D window to Ortho view mode.

Add a ground plane and keyframe it's Z axis location.  Padlock it's location strip in the Dopesheet so it can't be moved.  Give it rigid body properties (physics) and untick the "Dynamic" box, give it's "Bounce" a value of 1.0 .

Set up a ball (sphere) at some height above the ground plane.  This will be using Blender's physics engine to give us a sequence of bounces with which to emulate with a 2nd ball.  Give it physics and tick it's "Dynamic" box so it will fall and hit the plane. Set it's bounce slider to around 0.6 or whatever suits.

Run the animation to check the physics ball falls and bounces off the ground plane.

Set the maximum animation frame to some time after the last bounce.

Take the timeline cursor back to frame 1 and add another ball, take it to the same starting height as the 1st.
Keyframe it's location slots at right.  This will be our keyframed version.

What is required now is at the frame where the physics ball hits the ground, drag the 2nd ball down to the ground also and keyframe it's location.

Do the same at the frame where the physics ball rises to it's maximum bounce height.  Take the 2nd ball up to that height and keyframe it again.

Repeat the process throughout the bounces.  When played, the 2nd ball won't be falling and rising anything like the physics model, but it should arrive at the ground and maximum bounce heights at the same frame as the 1st ball.

Select the 2nd ball and go to the Graph editor, padlock out all strips that are not the 2nd ball's Z axis location graph.

Make a 3D viewing window, say at top right so you can see what you're doing when you start shaping the curves.

At extreme left select the Z axis strip so it's highlited, then move the arrow back into the editing window.

The z axis' blue curve should be quite prominent.  Press the Home key to center it all.

The bouncing characteristics are determined by the shape of the curves and can if required, be varied to suit any particular scenario.

As we are going for a natural bounce here, emulating the physics ball's bounce is simply a matter of using each keyframe's handles to reshape the curves so the 2nd ball more or less echoes the 1st ball's movements.

At the ground collision frame, a sharp Vee shaped curve is required and one that places the 2nd ball at the ground level, not above or below.  It has to descend and not slow down as it approaches the ground, rather be ripped back upwards rapidly on contact.

At the top of the bounce, it's the opposite situation.  Our ball must slow down and pause slightly before falling again.  This is more easily achieved by stretching the top keyframe's handles out to about a third the distance to the previous and next keyframes at each side, give or take.  Keep the handles reasonably horizontal.

The falling side probably needs a little more handle length than the rising side.

Curves that look like steep hills seem to work best.

Once you get it looking right,  you'll have a set of reliable bounce curves that can be used as 'Masters' for other projects.

-=================-

Importing 'Master Bounce Keyframes -

Simply append the keyframed Blendfile, go to the appended scene,  (top scene menu) and select the 2nd ball, press CTL-C to copy it, animation and all, into the copy buffer.

Go back to the parent scene, get into the layer that's to take the bouncing ball and press CTL-V to copy it.

The ball will retain it's animation keyframes, along with it's other attributes.  It will also appear in the Dope sheet.

Assuming the object that's to take these keyframes has no animation at all, select it's layer, then the object itself.  Take the timeline cursor back to frame 0 (zero) and keyframe te object's location & rotation.
This will give it an appearance in the Dopesheet.

Go to the Dope sheet and padlock out all keyframe strips that don't belong to the new (unbounced) object.
We don't want to mess up anything that's not to be changed.

Press A in the title strips at left so no strips are highlited.

Select only your project's object, (not yet bounced) so it's header at left is all that's highlited.  Select it's Z axis only and padlock out it's X/Y axis' and all rotation strips..

Place the mouse cursor in the Dope sheet's main window and press A until no keyframes are highlited.

Box select the imported (bouncing) ball's Z axis keyframes.  Press CTL-C.

Set the timeline cursor to frame 1 and the mouse cursor into the new object's strip. (This shouldn't be necessary but you can do it anyway - a bit like blowing on the dice before they're rolled)

Press CTL-V and the copied keyframes should appear along the new object's Z axis strip and importantly - beginning at frame 1.

Run the animation and the new object should take on an identical bounce as the imported ball's.

The new object's curves can be varied to suit and once happy, the imported one can be deleted.
So too  the appended scene.

-===================-

In the new project's Dopesheet, keyframes can be offset and varied to avoid 'mirrored' animation.
Curve handles in the Graph Editor can also be adjusted, again to avoid mirroring other objects that may be using the same imported keyframes.


How to export lava texture to png? I made a lava texture and I'm trying to export it to a .png file, but when I do its all black. In the UV editor, it also shows the texture as black. Here is a picture edit: i did it but another glitch in adding other pic, explanation, when I bake it, it just gives me that random weird purple texture which looks nothing like the lava texture. A kind person fixed the problem but another has occurred. ![
]3

You are baking the Normals instead of diffuse/color. Try this instead to get the diffuse Color only:

... but since it is a Lava material and if you have some emission, you may have to bake the emission pass as well. It all depends on how you want to use the baked texture for. May be something like this with Emission:


How to enable subframes? A comment in this thread ( https://developer.blender.org/T73756 ) mentioned "enabling subframes".
How can I enable and work with subframes?

https://docs.blender.org/manual/en/latest/editors/timeline.html
Here is the Blender Documentation where is explained the concept of Sub-Frames, and an image of what to do to activate it, when you check it, you will see how your actual frame field changes from a "1" to a "1.0"
You can activate it from Timeline or Graph Editor

Hope this solve your animation problems ;)


child objects don't move as expected My scene has a number of child cylinders that have a plane parent object.  When I rotate the parent (plane), all the child cylinders move as expected - as if they are attached and resting on the plane.  When I try to move one of the child cylinders, it instantly moves off to a seemingly random position.  Not sure what I'm doing wrong.

My .blend file can be found here:

Looking into your file, this is caused because there is an existing animation starting from frame 1.


How can I get the fill and mask options? I have seen other people having more options in the Image paint tool menu,
just like the picture below.

I only have the options draw, soften, smear and clone while he also has fill and mask options.

I found out what was wrong after some experiments. It turned out that when i turned on 3D view: Screencast key it made me unable to use the paint tools.

Make sure, that you have the same Blender Version used in the tutorial. Most of them announce which version they use.
The Fill Tool is not available in the 2.71 Version. This is a development of the Google Summer of code 2013 and it's planned to merge this tools in the 2.72 Version.

Currently you can download a build from http://graphicall.org/. (seach for "Paint")

For examle http://graphicall.org/1107 (tested, works)

If you want to draw a Line you can change the Stroke Stettings:


Blender 2.8 - Texture not showing up on material preview, neither exporting to .fbx file (Ok, so i've looked it up, and none of the answers to other simillar questions helped. I'm getting desesperate)

I created this model on Blender 2.8. I configured the material settings, unwraped the texture in uv map, assigned materials and everything. The textures are properly shown on shading mode, but on material preview it doesn't show up, neither when i try to export to a .fbx file. But the texture of the shirt is working. Nodes are enabled. All settings look the same, i can't find out what's wrong.

Project File Link Please, i need help!

//Edit: the texture was showing up on material preview before.

Thank you very much guys! I didn't know i couldn't export more than one uv map on an .fbx file. Now that i delleted all the other uv maps, the face texture is finally showing up when i export the file. I really appreciated your help. Thank you!


imported .obj shows too small Yesterday it was working fine and today it is not

I imported my obj file and it is not showing up or it is too small I guess but I can see it on outliner.

It could also be way to big, try hitting the . key on the number pad and see where it takes you, if it's to big, scale it down. It also helps to set the origin to "centre of mass" or "geometry" and resetting its location with alt+g.


Simple deform modifier to sphere shape I read upon a previous post regarding the simple deform modifier.  But in this case I have made from honeycomb shapes a mesh, and have used 2 Simple deforms modifiers.
And I'd like to get it looking like a sphere. But the top and bottom doesnt look spherical, rather than squashed towards the poles. (South, north). I tried using the cast modifier, but made the sphere look awful. Any other way I can get this mesh looking round like a sphere?

Thank you.

You can't actually tessellate a sphere purely with hexagons, the geometry doesn't work out.

However, a few (12) intrusions of pentagons make it possible. That makes a sort of expanded Buckyball, or soccer ball. If that's acceptable, the only route I can find to it at the moment is to enable the shipped 'Tissue' add-on, create an Icosphere with enough subdivisions, and ask Tissue to 'Convert to Dual Mesh' it.

I could have sworn you could get to this directly, at one time, using the 'Add Mesh: Extra Objects' add-on, but I can't find it in 2.81.. maybe someone knows?


How can I setup a controller in the BGE? Is it possible to get a DS4 controller to work in the BGE?

I've tried this project from Blend Swap, but only the buttons seem to work, not the axes. Is there any way to fix this?

If it's relevant, I'm using Xubuntu, with the builtin kernel driver, but I've also tried it with the old Ds4drv but it won't work at all.

In fairness, that file from blendswap did not work for me either. However making a controller's axes work is pretty easy.

There are two ways to access a controller in the BGE, that is with the joystick sensor or the joystick class through python. They are both very much the same.

The notable difference is in the way it reports the input from the axes. Using the logic brick you will get a rather arbitrary range between -32767 and 32767 (if this is the horizontal axis,-32767 is left, 0 is no moment, and 32767 is full right.)
Now getting the input through the python class normalizes the values: between -1.0 and 1.0, again 0 is no movement.

For the remainder of the answer I will be using the just the python class, but everything is easily adaptable to the logic brick.

Trouble is there are no event handlers for controllers (buttons, hats, or axes), so we have to make our own.

The buttons

For the button, using the python class, all you get is a list of the active buttons. They are listed by id 0-12. As an example button 0 is the Square Button on a DS4, and the blue X button on the xbox layout.

To turn the list in to something useful for input you will need a few lines like these:

joystick = bge.logic.joysticks[0]
btns = joystick.activeButtons
if 0 in btns and len(btns) == 1:
    doSomething()

The top line gets the controller, the second line gets the button list. Then it is just checking if the button we are targeting (button 0) is in the list. I have the len(btns) == 1 part in there so that it is only triggered by an exclusive button press (there are no other buttons held down).

The hats

Similarly the active hat is expressed in a list. However there will only ever be one active "direction" in this hat list. There are eight directions on the hat:

  0:None
  1:Up
  2:Right
  4:Down
  8:Left
  3:Up - Right
  6:Down - Right
  12:Down - Left
  9:Up - Left

from the api

Now if there is no active direction (the hat is not being pressed) then the list will be 0, not an empty list.

This is one way you can use the input from the hats:

up = 1
down = 4
left = 8
right = 2
upLeft =9
upRight = 3
downLeft = 12
downRight = 6

hats = joystick.hatValues
if up in hats:
    player.applyMovement([0.01, 0, 0], True)
elif left in hats:
    player.applyMovement([0, 0.01, 0], True)

The axes

As mentioned above the axis values are in a list axisValues, which is different for the logic brick and the python class.  Also, I do not have a DS controller, I have a "Logitech Dual Action" controller, so the axes may be (probably are) different.

At least for a xbox style controller the axes are in this order: left analog stick X, left analog stick Y, then right analog stick X and right analog stick Y.

So some (overly simplified) code to use this would be:

av = joystick.axisValues
left_analog_x = av[0]
left_analog_y = av[1]
right_analog_x = av[2]
right_analog_y = av[3]
dead_zone = .05
if abs(left_analog_y) > dead_zone:
    player.applyMovement([0, .2*left_analog_y, 0], True)

Note the dead zone there, if that is not done the player will always drift, even when there is not input.) Now I have done this on two different computers, and both have had wildly different amounts of initial drift. So what I do is just print(joystick.axisValues) and then add or subtract those values to each value in the axisValues list. It is not an ideal solution, but if the values are small it works.


Problem, when I redraw on a grease pencil layer new strokes doesn't appear above old stroke I'm trying to remake a grease pencil file and I forgot one little shading detail on the body part. I then went back to add the shading on said layer but it appears under it instead of over it. How can I fix this? See the images below. I'm 100% positive it is on the same layer.

Enter Edit Strokes mode, and in tool panel you will find this menu:

It orders selected strokes inside layer.


No material in the UV editor I am trying to make skins for CSGO.
I have made a skin I like but I need to export it as a PNG file to then be converted to a file type that csgo understands. (VTF)
I am not able to see the models material in the UV editor, to then export it as a PNG.
My question, how do I see the material assigned to the object in the UV editor?
Please can someone help with this?
Thank you!

You need to select the right texture from the menu in order to see it in UV editor


Non-Random Particle Emission from all vertices Is there a way to control the emission of particles from a mesh vertices so that they are emitted sequentially from each vertex in turn?
If I set the emission to Random then the particles are emitted evenly from each vertex, but the sequence is indeterminate. If I set the emission to non-random then one vertex emits all of its particles first, followed by all of them from the next vertex, followed by all from the next one, and so on.
Is it possible to have the emission for individual particles in sequence. ie, given a cube with 8 vertexes to emit from 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, etc.
At the moment I'm just getting 1,1,1,1,1,1,1,......, 2,2,2,2,2,2,2,.....3,3,3,3,3,3,3,3.... etc.

Note : The cube started at the origin and travelled along the path shown by the particles (which are not affected by gravity). You can clearly see that they're all emitted from one vertex first, then the next (where there's a break in the line of particles), then the next. I want to be able to emit in strict sequence, one at a time.
Incidentally, I don't actually care what sequence they are emitted from, just as long as each set of (8) vertices emit in the same sequence for each set of (8) particles.

EDIT: I haven't been able to come up with a way around this and it seems the latest Blender versions don't address it. Possibly 'Everything Nodes' might eventually solve it but that's an unknown time in the future. I've raised it on the developer website as an issue : Particle Emission from Vertices non-random emission sequence. Hopefully a nice Blender developer can work some magic.

This isn’t possible at present. The node system is being radically redesigned with Everything Nodes at which point we should be able to do this and so much more.


Cycles settings missing This particular blend file is messed up. I'm not sure what I did or pressed. If I open a new blend file everything works fine but in this one the materials tab is missing and the render properties is also missing some things. I don't want to start over my project. I have tried a day and a half to figure this out.

Found it! For anyone else having this same issue, press N for the right side toolbar and click on the "tools" tab, then under the "workspace" drop down arrow, toggle "filter addons" off.


Image Texture Darkens Entire Glass When I add an image with a transparency layer on the bottle, it darkens the entire bottle and I have no idea what's going on. I followed this guide to the word but can't seem to figure out what I'm missing.

This is what it looks like with the text image.

This is what it looks like without the text image.

Here's a screenshot so y'all can see real quick what the setup's like.

There's still residual color information in the alpha area of your png. The better way to fix this is to get rid of the color mix node. Create a seperate shader for your screen-print ink material and wire that and your glass shader node into the mix shader node. Now drive the shader mix with your alpha channel.

This also allows you to modify the material properties of the ink without the need for a much more complex setup.

You could also achieve a result with minimal effort using the following node setup:

But this might not be physically correct, depending on the exact production method for the label, of course.


How to define a Loopcut into a specific area? I want to make a Loopcut only in the Torso area, not in the chin, How do I do it?

If you have the model with mirror modifier, select all the faces that you want the loopcut to go through, then hit I shortcut to inset the faces and B shortcut after that to disable boundary of the inset.

If you have the mirror modifier already applied, use the same method while selecting the faces from both sides from the center.


Prevent light from lighting inside a closed room? I've got a problem with lighting. I don't want lights that gets through edges :/ I have closed room with floor, ceiling and walls. Point light object is created upper ceiling. And light gets inside the room but it should not. How to fix this? Room should be dark but is bright because of light object :/

You have to go to the lamps properties > "lamp icon" > "Shadow" > enable "Ray Shadow" to get this fixed:

Cheers


How do I make a section of hair a different color? I have a character who I have groomed hair for but the original has specific spots where the hair is not black, but is grey.

So how can I make only those spots grey?

Blend File: https://www.dropbox.com/s/s3rew9i83jy2l6a/Hanzo%20Rig.blend?dl=0

I will also clean up the groom later. I just wanna get the materials right first...

Image above shows eye brow color different from the rest of face.  Single Mesh Shown.  Please excuse the grainy quick render and other shortcuts I took.

Image above shows [material.063] assigned to the [Brow] Particle System using material nodes for Cycles.  Note the multiple Particle Systems of type Hair. For a human there may be reason to consider eyelash hair and eyebrow hair and other locations of hair to be different types of hair.

In a given particle system of type hair in Cycles you assign a material.
First create a UV map for your mesh.
The material can use a texture to control the color directly.
You can paint your personal texture or use one of the standard built in textures.

The hair patches I used in the face image are separate islands.  Your example may be a little different.

In my example I used a texture just to introduce variation to use as input to the color ramp.  This is a common technique for Cycles.

That texture  can be viewed as a gray scale and input to a color ramp.

If a clump of hair has varying but closely related colors this will work fine.

If you want a highly secluded piece of hair you can also created a second or more particle hair systems with another material.  Vertex Groups and Texture can isolate hair systems locations.

You can also create one or more additional well fitting meshes, rather clip on style,  with  different materials.  Particle Edit Mode can place hair precisely.


'_RestrictData' or '_RestrictContext' in addon 2.8 actually I want to show a EnumProperty with all the current collections.
all works fine if I run the addon from text editor

but if I try to install it I have  '_RestrictData' or  '_RestrictContext' atributeErrors.

I test some solutions like  "persistent"
AttributeError: '_RestrictData' object has no attribute 'filepath'
or "prepend"
AttributeError: '_RestrictContext' object has no attribute 'space_data'
and others, but nothing works
What could I do to achieve my goal?
bl_info = {
    "name" : "test",
    "author" : "Diego Quevedo",
    "description" : "",
    "blender" : (2, 80, 0),
    "version" : (0, 1, 0),
    "location" : "",
    "warning" : "",
    "category" : "Generic"
}

import bpy
from bpy.props import *
from bpy.types import (
    AddonPreferences,
    Operator,
    Panel,
    PropertyGroup
)
from bpy.app.handlers import persistent

@persistent
def returnCollections():

    if len(bpy.context.scene.collection.children) <= 0:
        bpy.data.collections.new("TEST")

    collections = [c.name for c in bpy.context.scene.collection.children]

    items =[]

    for c in collections:
        items.append((c,c,c))

    r= (items,collections[len(collections)-1])

    return r

bpy.app.handlers.save_post.append(returnCollections)

class Test_OT_Test(bpy.types.Operator):
    bl_idname = "view3d.test"
    bl_label = "Test"
    bl_category = "Test"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {'REGISTER', 'UNDO'}

    CollectionName:  EnumProperty(
        default= returnCollections()[1],
        items =returnCollections()[0],
        name="Collections"
    )

    def Test(self, context, CollectionName):

        print("test")

    @classmethod
    def poll(self, context):
       return context

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)
    def execute(self, context):
        D = bpy.data
        C = bpy.context

        self.Test(C, self.CollectionName)

        return {'FINISHED'}

####################
class Test_PT_Test(bpy.types.Panel):
    bl_idname = "panel test"
    bl_label = "Test"
    bl_category = "Test"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

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

        row = layout.row()

        row.operator("view3d.test", text="test", icon = "DOT")

def register():
    bpy.types.VIEW3D_HT_header.prepend(returnCollections)

    bpy.utils.register_class(Test_OT_Test)
    bpy.utils.register_class(Test_PT_Test)

def unregister():
    bpy.utils.unregister_class(Test_OT_Test)
    bpy.utils.unregister_class(Test_PT_Test)

if __name__ == "__main__":
    register()

Use a dynamic enum or a string property.
When an addon is enabled, it is imported and the register method called. At this stage both the data and context are restricted. The window manager is one of the few objects outside the restriction.
See no reason to have the persistent handler, have taken it out. Using it as an items loader from context when the addon is registered is no good either.
Cleaned up some other stuff, to prevent warnings in the console, eg the panel class name in form UPPERCASE_PT_TitleCase.
Try and avoid import *.
Test script: Have made the enum property dynamic and populated it with the immediate children of the context scene.  For example sake have added a string property and used a prop search to give options from same.
Have shown and example of an operator enum menu in panel layout.
bl_info = {
    "name" : "test",
    "author" : "Diego Quevedo",
    "description" : "",
    "blender" : (2, 80, 0),
    "version" : (0, 1, 0),
    "location" : "",
    "warning" : "",
    "category" : "Generic"
}

import bpy
from bpy.props import EnumProperty, StringProperty
from bpy.types import (
    AddonPreferences,
    Operator,
    Panel,
    PropertyGroup
)

class TEST_OT_Test(bpy.types.Operator):
    bl_idname = "view3d.test"
    bl_label = "Test"
    bl_category = "Test"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {'REGISTER', 'UNDO'}

    def enum_items(self, context):
        scene = context.scene
        return [(c.name,) * 3 for c in scene.collection.children]

    coll_enum:  EnumProperty(
        items=enum_items,
        name="Collections"
    )

    coll_name: StringProperty()

    def test(self, context, collection):
        print("test", collection)

    @classmethod
    def poll(self, context):
       return context.scene.collection.children

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

    def execute(self, context):
        self.test(context, self.coll_enum)
        return {'FINISHED'}

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

        col = layout.column()
        col.prop(self, "coll_enum")
        col.prop_search(self, "coll_name", scene.collection, "children")

####################
class TEST_PT_Test(bpy.types.Panel):
    bl_idname = "TEST_PT_Test"
    bl_label = "Test"
    bl_category = "Test"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

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

        col = layout.column()

        col.operator("view3d.test", text="test", icon = "DOT")
        col.operator_menu_enum("view3d.test", "coll_enum")

def register():
    bpy.utils.register_class(TEST_OT_Test)
    bpy.utils.register_class(TEST_PT_Test)

def unregister():
    bpy.utils.unregister_class(TEST_OT_Test)
    bpy.utils.unregister_class(TEST_PT_Test)

if __name__ == "__main__":
    register()

Edit:
For the case of adding a collection to a scene with no child collections can:
    def enum_items(self, context):
        scene = context.scene
        if not scene.collection.children:
            foo = bpy.data.collections.new("Foo")
            scene.collection.children.link(foo)
        return [(c.name,) * 3 for c in scene.collection.children]

which IMO works best in conjunction  with the operator menu enum layout.


Can Blender "un-smooth" a mesh? When a mesh is smoothed, every selected vertex is moved towards the average position of its neighbors. Is there a way to do the opposite, given a mesh with bumps, curves and corners, to move selected vertices by small amounts opposite of what mesh smoothing would do?

Yes. Use the smooth modifier with a negative factor.


Scaling in object and edit mode My question is: why do Object mode scaling and Edit mode scaling seem to be incompatible?
I'm quite new to blender, so I may not know sth important about these modes.
The actual case is:
I create a cube, which is 2×2×2 metres in metric units by default
(it's also shown under 'dimensions')

Then, with the cube selected, I switch to Edit mode, and enable 'Edge info: Length' under 'Mesh display'

And it shows the cube's measurements, which are 2m on each edge.
Now I use the scale tool in Edit mode, making the edges 2.244m

That's good so far. Changing back to Object mode, the changes can be seen under 'dimension'

However, when I use the scale tool in Object mode, the scale and dimensions also change, but changing back to Edit mode, the measurements shown remain the same

So the question is, why does the scale tool work differently and have different effects in Ojbect mode and Edit mode?
Also, how can I enter the desired size of my cube manually to get an accurate result, without using the scale tool in Edit mode, and without changing the scale ratio in object mode?

The object-mode scale is a property of the object; it doesn't actually do anything to the mesh, but rather affects how the mesh is going to fit in the scene.

Scaling in edit mode actually moves the mesh around; it's equivalent to selecting and carefully moving vertices around to make the mesh bigger or smaller.

There are many situation where you don't want to touch the object scale (e.g. physics simulations tend to get mucked up).

If you have changed the object scale, but really meant to scale the mesh, you can "apply the scale" (i.e. apply the object's scale to the mesh, and set the object scale to 1) by ctrla and select "scale" in the popup menu.


Add outline to object When you select an object in blender a yellowish ring appears around it. And no matter how much your rotate your view or the object, the outline will only appear on the visible outline of the object. It does not appear on every edge.

How can I get this effect on any object like an object modifier(but it doesn't have to be of course)? I also want to be able to change the width and set the material. I will be rendering this with openGL as an animation. Some objects rotate in my animation and I want them to be able maintain an outline.

You would have to render a Freestyle pass with the Line Set Silhouette selected on the left and Crease selected on the right, and change to Logical AND on the right.

This would trace a border stroke around the visible perimeter of the object, like tracing the alpha edge.

You'd have to composite this over your OpenGL render, as you can't generate Freestyle render passes when doing OpenGL renders.

In order to make it easier to composite over your OpenGL renders, it would be helpful to make the background and cube the same colour (let's pick pure white), and then make the stroke a black colour. To do this uncheck Transparent in the Film panel of the Render settings section. Make the world a solid white colour and the cube an emission shader with 100% white. Then make the stroke colour in Freestyle a 100% black.


Changing node that effects to all material I'm trying to make something like colour palette in every material, for my animation
I dont have idea, so I just use color ramp to make it, like picture below,
and name it as "COLOR PALETTE"

I do copy these "COLOR PALETTE" to all material,
so, If need the color in every material I just use eyedropper to get the color
but, sometimes I need to change the arrangement of my "COLOR PALETTE"

Is there a simple way to make "COLOR PALETTE" in blender?
How to make the "COLOR PALETTE" that I made linked, so if I change those "COLOR PALETTE", it would change too in other material

I can do duplicate object linked (ALT + D), so if I change the object, it would affects to other object,
so, how to use is in a node mode?

Rather than using a Color Ramp, you can create a Node Group to hold your colours as separate RGB input nodes. Your materials can then use the same Node Group to make use of those colours and changing the contents of the Node Group will affect everything that uses it.
To create your Node Group, first create all of your RGB nodes and highlight them all (by dragging a box around them). In the Add menu there's an option for 'New Group' (within the Group sub-menu). This will create your node group.

You can rename the output sockets of the group using the properties panel (N).
You can then add your group (Add/Group/NodeGroup) to your materials :

Note that you can rename the node group by clicking in the Name field (it defaults to 'NodeGroup' but you can give it any name you like - such as 'Color Palette').
Making changes to the internal nodes of the group will affect anywhere that uses that group.


Why is my rigid body object floating as if there is no gravity? I have two issues on my current file that I cant seem to solve (see link below)?

1) why is the hat being thrown appearing like it is floating and not affected by gravity towards the end of the animation, even though I have applied rigid body active to it?

2) How can I make the hat spin around with the robot body at the start of the animation, even though it is already parented to robot hand with "Cild Of".

Any help here is appreciated.

Here is the Blend file link: https://www.dropbox.com/s/vaxriy8lfo1palg/robotHat2-animated_ridgid%20body-copy%20float%20hat.blend?dl=0

Finally solved this problem. Here is the link to the successful project file output:  https://www.youtube.com/watch?v=wmTCE0c4SrI

The solution:
1st problem:  the point of origin in the post was too low and needed to be moved up. This required to rework all the animations from scratch.

2nd problem: the gravity settings needed to be adjusted and animated along the time line to get a more realistic result. And the friction and damping settings needed tweaking, as well as animating them with key frames. And voila.


How to make riped cloth? I'm new to blender and 3D in general. Im making this armor for an academic project.

The part betwen the legs is supposed to be a cloth like object, and i would like to make it look like old and a little ripped apart in the edges.. I dont realy know a way to do this, any advices on how to make this?
Thanks in advance.

Here's one way. Assuming you are using a texture file like this with transparency (alpha) for the ripped texture.

Select the banner vertices on your model. In UV Editing: open your texture file with the ripped banner, U Unwrap, position your faces atop the image, Set this vertex group as a UV Map.

With our banner selected, in the shader editor set up a texture for our banner like this, add a new texture, Shit+A to add nodes. Calling the image file with an Image Texture and specifying your UV Map in the UV Map or Texture Coordinate node. Don't forget to connect the alpha to make the ripped and tattered area transparent.

You'll probably want to add more geometry to the banner so it hangs more naturally. Note the banner in this method has no thickness only flat geometry.
Hope that helps.


Focal lenght too high in FSpy I'm trying to create an interior based on an anime. Problem is that no matter how I set up FSpy it gives me a focal length of several hundred millimeters. If I wanted to match the image my models would have to strech to around twice their size in the y direction and if I lower the focal length things don't line up. Since this is not a photo is it likely that this is an impossible angle/shot?

I've got the same problem, and This is how to solve it:
- Once you set all axes correctly, you fill find a red point
- Change that red point position, make it closer as much as possible to the vanishing point (intersection of the 2 axes)
- Then save it and it will work correclty


Dividing a model by intersecting geometry parts I want to "cut" my building model. This means creating edges everywhere where plane (or multiple planes) intersects with faces of my model. This is similar to 'Edge loop and slide' tool.

But 'Edge loop and slide' works only for primitive models unfortunately. My model is more complicated. Does blender have described tool? Or maybe someone knowns good addon for this?
Thanks in advance.

The new Intersect Tool added in 2.72 will cut up intersecting faces - this is for meshes that are part of the same object, not multiple intersecting objects and can be found in Mesh->Face->Intersect.

Campbell explains it in this video

There are a couple of addons that can help with boolean operations.

One is Blender sculpt tools - the name is a bit misleading as it also works outside of sculpt mode.

Another is BoolTool


Blender 2.8: units of scale, grid, and default size of objects I have installed the 2.80 of blender and trying to make sense with the changes in the GUI and the mindset. Most of the changes I like; some of the changes I still need to get accustomed with. I am modeling with blender for 3D printing and am still in the beginning phase to learn things.

My unit system is in meters, and the unit of scale is in centimeters. My "universe" is driven by the bed size of the 3D printer (which is about 200mm). So I adjusted the units in blender so:

I also adjusted the grid:

If I place an object (say a cube or a plane), the default size is still in meters, which means 2000mm (which is huge):

Questions:
* Is it possible to make the default size to 2cm?
* How can get zoomed in to area of 10cm by default (when I open blender, as well as when I press shift-C

Scene > Units > Units Scale $0.001$, Length > Millimeters

Viewport Overlays > Grid Scale $0.001$

File > Defaults > Save Startup File

Restart Blender, then
Add > Mesh > Cube, Torus, open the sidebar to check


SS & Transparency blue tint fix (eevee) When a transparent material hits a surface with ss enabled, the edges appear blueish. The only way I could fix it is by enabling Screen Space Refractions on the hair, but that disables all the shadows it casts on the skin. Any known fix?

Eevee treats transparent objects differently than Cycles. They are sorted from front-to-back per object and do not receive any screen space effects.

This is fast and works fine for many cases, but it is only approximate and gives incorrect results for some object shapes. For more accurate results, enable Alpha Hashed transparency in the material. With a sufficient number of samples to resolve the noise, this gives accurate transparency.


3d cursor on position of vertex of subdivision modifier mesh with 'adjust cage' on I have a mesh with a subdivision modifier and 'adjust edit cage' on. Now I want to move the 3D cursor to one of the points on the mesh so that I can insert a new object at the location of that vertex. However when I select the point, the center of the gizmo is a bit away from it (it's at the location where it would be if 'adjust cage' were off, see left image) and consequently when I move the 3D cursor to the selection, it's put not on the vertex but a bit away. The right image below is when I turn the 'adjust edit cage' off.
So is there a way to put the cursor at the location I'm after? Thanks.

One way would be to duplicate the object in Object Mode and then, for the duplicate only, apply the Subdivision Surface modifier. Then, snap the 3D Cursor to the desired vertex on this new version of the mesh. Afterwards, either hide the new version of this mesh, or, put it in a new collection so that it can be referenced at will in the future for this same purpose. You could also delete it if you know you don't need it anymore. But you now have your desired 3D Cursor position, and you still have your original mesh with a Subdivision Surface modifier that remains unapplied.


How to Save Sverchok nodes I'm new to Sverchok and I don't quite understand how to work with it.
I watched lot's of videos but none of them showed how to include Sverchok in the Blender workflow.
I created some nodes and successfully generated objects with it.
I saved my Blender file and quit. The next time I opened the file, the generated objects were there but I can't find the Sverchok node structure anymore and so I'm not able to further tweak the generated objects.

(1) How do I save a Sverchok Node Structure?

(2) Is it not saved inside the Blender File?

(3) Does it stays connected to the generated objects after reopening the file?

Sorry for the newbie questions and thanks for any suggestion.

BR Steve

Something similar happens with Materials/node trees that are not used by any objects (ie - don't have "users". Objects produced by Sverchok don't automatically make those objects a user of a Sverchok node tree. You might need to press the "F" icon in the nodetree header toolbar (or Shield icon in 2.8+), to add a fake user to the node tree, then save.

The issue is Old. We discuss this on the Sverchok issue tracker back in 2014 - https://github.com/nortikin/sverchok/issues/356 )


Glossy paper on cycles I would like create realistic glossy paper, as in magazine. Couldn't you give me approximately bunch of node or suggest any ideas?

my version

to need

To get these directional reflections its best to use a Anisotropic Shader, it yields those as a result and you can change certain properties of it:

This is the node tree that i've used:

Depending on the look and feel you want to produce you can play around with the settings of the anisotropic shader. To turn the effect down, simple change the factor of the mix node.

To get the small surface effects printed paper sometimes has, i've implemented a simple voroni noice as a normal in the anisotropic node. It adds a small level of detail that could be needed on close shots. It's not perfect and more meant as an example as to what is possible.

Note: It's also possible to use the built in anisotropic settings in the principled bsdf - i just like to use it seperated.


How to reset view node shortcut I'm simply trying to use the "view node" on the node editor. I watched a video where I learned the shortcut is ctrl - shift, but it will not work.

Here I'm trying to view a wave texture:

Am I doing this right? or do I need to reset the shortcut?

Thanks for any answers!

While DaurteFarrajotaRamos's answer is correct that there is no viewer node by default, Greg Zaal's Node Wrangler addon (which comes bundled with Blender) does implement a veiwer node of sorts in the node editor.

With Node Wrangler on, when you Shift+click a node it will connect it to the Material Output node, making it visible on the object and in the preview rollout pane.  It will connect surface shaders directly to the Surface output, volume shaders directly to the Volume output, and all other datatypes (colors, vectors, and values) will be sent through an emission shader plugged inot the Surface output.


Script to intersect two objects gets rapidly slower What I want

I have two sets of objects and want to intersect every object of one set with every object of the other set by means of the boolean modifier. The output can be reduced to the vertices of intersection for every object pair which I write into an ascii file.

The problem

When executing the script, the execution time for the first iterations is low, however, it takes forever with further iterations. The problem seems to be well known (see here and here; and related to bad programming/use of blender api) when using many bpy.ops. which causes updating the whole scene every time.

But in my understanding this updating should not make things worse when the number of objects is low for every update. That's why I delete every object and mesh except for the two objects to intersect with each other.

I guess the problem is that not everything of the object is deleted even though I delete all objects and meshes after each iteration and the remaining part will then be updated with an increasing number of "something". This may be confirmed by the continously increasing memory Blender needs.

The question

What kind of items does remain to cause the increase of computation time (and memory) although I delete all objects and meshes (len(list(bpy.data.meshes)) and len(list(bpy.data.objects)) is zero) after every iteration?

Theoretically it should be working if restarting blender after each iteration, but this will cause a large overhead for startup. Maybe there is something like reset scene?

For the purpose of deletion I use the following code:

def deleteObj(obj):
    bpy.ops.object.select_all(action='DESELECT')
    obj.select = True
    bpy.ops.object.delete(use_global = True)

and

meshes = list(bpy.data.meshes)
for me in meshes:
    me.user_clear()
    bpy.data.meshes.remove(me)

For the intersection I use:

def getIntersection (obj1, obj2):
    bpy.ops.object.select_all(action='DESELECT')
    obj1.select = True
    bpy.context.scene.objects.active = obj1
    mod = obj1.modifiers.new('Boolean', type='BOOLEAN')
    mod.object = obj2
    mod.operation = 'INTERSECT'
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier = mod.name)

Edit
Added minimised code:

# read-in functions
# set parameters for objects creation
# open file for output
for i in R1:
    obj1 = createObj(Parameters1, i)
    for j in R2:
        obj2 = createObj(Parameters2, j)
        mesh = getIntersection(obj1, obj2)
        deleteObj(obj2)
        Verts = list(mesh.vertices)
        if len(Verts) > 0:
            writeVerticesToFiles(file, mesh)
        bpy.data.meshes.remove(mesh)
    deleteObj(obj1)
    meshes = list(bpy.data.meshes)
    for me in meshes:
        me.user_clear()
        bpy.data.meshes.remove(me)

As you note rightly, do not use bpy.ops if you can avoid it because it forces a scene update every single time.

So I recommend doing this:

me = obj.to_mesh(bpy.context.scene, True, "PREVIEW", calc_tessface=True, calc_undeformed=False)

No operator is used here and it will give you a copy of the the mesh data with all modifiers applied.

Deletion of objects from blender or with ops still keeps their data around until you close and reopen the file. Then data blocks that are not used (users = 0) will be discarded.
IIRC, you can force-delete objects completely via API, but this is not recommended as it tends to cause crashes.

You can, however, achieve the same result as with the operator using:

bpy.data.objects.remove(obj, True)


Working with larger .stl wireframe files I'm trying to use an .stl file that imports as a tightly bound wire mesh that it difficult to work with.

My computer lags or the file seems too big for color/texture/etc. Is there a way to reduce the file or to change a setting to be able to work with larger files like this or am I doomed?

Trying to use a 3d scan of a mouth/teeth for numerous videos. Having something realistic and proportional will serve me well.

So, that is why I am trying to work with these larger files scans.

You can reduce the mesh density in Blender by using a Decimate or Remesh modifier: create the modifier, change the settings until the mesh is as detailed as you need it, and then apply it. Don't forget to apply it or your mesh will still be very dense in edit mode.

If your mesh is too large for Blender to load at all, you could try using Meshlab, which is also free and open source and works nicely with .stl files. This video shows how to decimate a mesh using Meshlab.


How do I create this texture I'm new to this website so please forgive me if this is in the wrong place,

this is my last resort, I cannot find this picture texture and I would really want to use it, does anybody know where I can find it?
This is the texture, I cropped it from another Blender render:

Here is the reference to the image,
http://www.blendswap.com/blends/view/76894

Thanks in advance :)

As cegaton pointed out, the texture you are looking for is bundled in the blend on blendswap. The file is listed as CC0, so I can freely post it here.

It is a simple image that you could easily create in blender with a grid rendered with freestyle, and a text object in the corner. Below is the blend file fully ready to render a grid like the picture above. (wait for the render to fully finish before the freestyle line show up.)

Blend File click the "View Raw" button to download.


Stretching model with ik makes model bigger How can I get rid of this when I move my bone? Because I would like it to only stretch, but not get bigger. I have stretch enabled in the ik panel. It's the thigh that has the stretch enabled on it and also the one that gets bigger.

Normally, scale will use global coordinates.
You want to use local coordinates.

Tap N to bring up the properties panel.
Scale along the appropriate axis, such as Y.

In the example, I scaled (from her view) left arm the standard way.
You can see it inflates, like you mentioned.

Scaled her right arm using local properties instead,
along the Y-axis, so it stretches, but doesn't balloon out.

edit:  OK, in response to the BlendSwap link you posted:
I've never used that rig before.

The website look nice, but loading in Blender gives me this:

I assume it's a version mismatch.  It's for Blender 2.74
You might need to ask the developer (nocemperor) about that.

I would try this instead:  http://www.manuelbastioni.com/manuellab.php
because it uses a standard Blender bones rig.

Again, try to scale along one of the local axis
How to scale along the local axis of an object?

edit:  Oh, I just realized it wasn't loading fully.

It's better, but only loads Orange model, not Black or Blue.
Perhaps, because it's for an earlier ver of Blender.

If you'd still like to use that .blend file,
the other trick you can do is add a Scale Constraint to the bone.

Select rig > Pose Mode > click a limb.
Set it to the limits you need.  To scale along Y axis:


Striped Shadows on EEVEE When my camera is looking at a surface at an angle, the shadows begin to look stripped. I have tried changing shadow settings but that has not helped. The stripped shadows have also appeared when I render in EEVEE too. Is there any way I can minimize or remove these?

After I updated to Blender 2.81.1, It fixed the problem. Earlier I was using 2.80.


Glass BSDF shows weird black lines after sculpting I decided to make an ice cube. It looked good on the default cube, but i knew that if i sculpt it, it would look a lot better. So i made another cube and i went into sculpting mode (It was my first time doing any sculpting, thought that its going to be easy). So after looking at what the different brushed do, i decided that to make what i need i will use the smooth brush on the edges of the cube. So after some work i made something i liked. But then on the next day, i saw these black things after i removed my bump map (it used a noise texture to give the ice some good look) - they were really weird.

I thought its something from the new roughness map i used, but after removing it from the roughness it was still there. Then in solid mode i saw the shading issues.

Here is the wireframe of the object:
But after one subdivision modifier it was ok in solid, but still weird in rendered mode. I am using cpu rendering, cause my gpu gives Split render kernel errors. Here is my current node setup, just the glass.

Simply add a Solidify Modifier and add thickness to the cube. Do bear in mind, this does essentially double the geometry calculated at render, so this might increase render time some.

This is the result from your file:


Earthquake visualization in blender? I have csv catalogue(s) of earthquakes occurring in time and xyz space that can be individually represented as cubes or spheres of differing sizes depending on the earthquake magnitude. I have little experience on Blender/Python and am wondering whether I can learn enough of these subjects in a few days to create a nice 3D visualization of my various date,x,y,z,m, and maybe some other attributes. The appearance of the earthquakes might be additionally accompanied by some sound. No physics required. The earthquakes are in local areas so no spherical surfaces required. I have been attempting to do these displays using two different programs as shown following, but Blender would be vastly better. I am stalled here: existing script I have been able to find for csv import appears to be limited to  3 variables

The good thing about comma separated values files is that they are pretty easy to read if they don't contain errors. The amount of Python you need to learn isn't too much.

I made this example file and saved it next to my blendfile:

number,long,lat,mag
1,37.9230,18.1445,3.5
2,47.1948,23.1326,0.1
3,40.9674,16.6782,1.5
4,45.1434,23.3850,4.2
5,39.4629,21.7380,1.4
6,34.7125,16.9653,5.3
7,34.3573,17.9092,3.3
8,40.9570,24.7064,4.4
9,34.9255,17.1371,3.4
10,45.9753,20.9662,0.7
11,31.0126,20.1624,3.4
12,47.6929,20.7224,5.6

My script is not elegant at all. I focused on it being readable. It can be done much shorter and prettier but not everybody is an experienced coder.

The script imports the csv file, separates it into lines and puts the values into a list.

From there it's not hard to let Blender generate circles or spheres with the right diameter and the right location.

Under Linux it's better to start Blender from a terminal. Otherwise you won't see what the script is printing. Under Windows, the System console can be toggled in the Window menu at the top.

import bpy

blendPath = bpy.path.abspath("//") # path to the blendfile because my .csv is in the same directory
fileName = "example.csv" # name of the csv

txt = open(blendPath + fileName, "r") # open the file to read
quakeTxt = txt.read() # read the entire file into a string
txt.close() # close the file
print(quakeTxt)

quakeLines = quakeTxt.split("\n") # split into a list divided by linebreaks
print(quakeLines)
quakeData = [] # this will hold the actual data

flag = 1 # that flag helps omit the first line
for a in quakeLines:
    if flag: # if it's the first time
        flag = 0
        continue # continue with the next iteration of the loop
    if len(a) > 0: # ignore empty lines
        # this is a good place to turn the strings into numbers
        quakeData.append(a.split(",")) # append the data as a list

for a in quakeData: # go through the data
    number = a[0]
    locX   = a[1]
    locY   = a[2]
    mag    = a[3]
    print("Nr " + number + ": Location: " + locX + " " + locY + " Magnitude: " + mag)
    # the print statement only works because all the numbers are still strings. That has to change if you want to use them for blender objects


How to render from multiple cameras in one go? I have a scaffolding setup with multiple cameras locked on to a target. I plan to use this to render a model from various positions. This loop has worked for everything else such as changing name and adding constraints but I can not get the logic to work for renders.

The filename changes just fine, running context.view_layer.objects.active will report the camera is changed correctly, as does the UI, however, the render output is simply multiple renders of the same camera...it never changes. Is there a different way to force each camera to actively render other than what I have tried here?

obj_in_scene = bpy.context.scene.collection.all_objects

for cam in obj_in_scene:
    if cam.type == 'CAMERA'
        bpy.context.view_layer.objects.active = cam
        file = os.path.join("/home/jruch/", cam.name)
        bpy.context.scene.render.filepath = file
        bpy.ops.render.render(write_still = True)

I have also tried building a dedicated list object to iterate through, but it would not cycle the camera's active status as well the filtered "all object" context I used about. What am I missing here?

Assign the camera object to Scene.camera to make it the active cam of the scene:

import bpy

scn = bpy.context.scene

for obj in scn.objects:
    if obj.type == 'CAMERA':
        scn.camera = obj
        scn.render.filepath = obj.name
        bpy.ops.render.render(write_still=True)