Getting 90 degrees out of a bezier path So trying to create this wire and I can't seem to find the solution for how to keep the end from collapsing, or pinching, on itself when making a turn like this. Tried adding more points but that doesn't work. Neither does rotating or trying to scale.  Tried modifying the title and the 'W' control point and got to the second image, but still basically the same issue.
I could probably find a way around it (add more "cable" or something to bypass the tight corner) but I feel like it's one of those things I'll run into again and again so here I am. Help, please :-)

A possible solution I found myself was to use the 'Spin" tool on the end where I wanted it to turn. Since it's not going to be seen close up, and for the asset I'm building this should suffice. Wish there was a better way to do this.


Inventor imported object has different reflective properties than blender made one I've been using Inventor 2020 for some mesh design for different things and decided to test an imported object and how well I could create materials for it in Blender.

For some reason however, the way the Inventor glass (Right) reacts with light is drastically different than the way a quickly made Blender glass (Left) reacts with it (Same material).

The meshes of the glasses are of course different, but similar enough in the bezels, and thickness of the mesh that I don't think I should be seeing such different results in appearance (but maybe I'm wrong).

How would I either change the imported mesh to behave the same as the smaller glass, or change my material nodes to accomplish a similar affect?

Thanks in advance!

Okay so I'm dumb, the Inventor glass broke on a thickness function and only the rounded lip was defined, with a correct thickness the glass reflects and refracts as expected! Blender treats a glass plane differently than a glass mesh in terms of reflective properties, hence the issue of differing appearances!


How set Hex in RGB Node? (Python) Currently looking at the blender API I haven't seen anything of all about the Hex input.
This is frustrating me enough as it seems strange to me that there is no such input function (when Blender natively has it, where it is enough to simply copy and paste).

Now, the point of the situation is that all the scripts I tried, incorrectly convert Hex to RGB (Including some answers those present in other questions about blender.stackexchange).

Basically the conversion from Hex to RGB produces a Hex value different from the Input value, and this is not good, I need absolute precision on these Hex values

I see that it is gamma corrected, now, I don't know much about Hex, so I don't want to comment too much, but I just wish that what I get is the same thing I get by copying an Hex in the RGB node

The most beautiful thing would be to be able to directly input the Hex input value in the RGB node, that gives me exactly the result I want.

Hex values are interpreted in the sRGB color space, while Blender uses a linear RGB color space internally.  The conversion functions can be found on the sRGB Wikipedia page.  The hex channel values themselves (0-255) should be divided by 255 before application of the formulas.  A pure Python implementation looks like this:

def srgb_to_linearrgb(c):
    if   c < 0:       return 0
    elif c < 0.04045: return c/12.92
    else:             return ((c+0.055)/1.055)**2.4

def hex_to_rgb(h,alpha=1):
    r = (h & 0xff0000) >> 16
    g = (h & 0x00ff00) >> 8
    b = (h & 0x0000ff)
    return tuple([srgb_to_linearrgb(c/0xff) for c in (r,g,b)] + [alpha])

and using it like so:

bpy.data.materials["Material"].node_tree.nodes["RGB"].outputs[0].default_value = \
    hex_to_rgb(0x123456)

seems to work correctly.


Weird texture issues when importing Collada from SketchUp I'm relatively new to Blender and trying to import an architectural render from SketchUp 2017.

I export from SketchUp with Collada, then import, and end up with something like this:

The meshes with problems do have two materials:

Putting the correct material on top helps some. Deleting the secondary material helps some of the time, but not all of the time.

Any ideas what this is? I've heard that importing from Collada can require hours of cleanup, but in this case am not sure where to start.

Thanks!

Thanks for the comments! Yes, it was just normal Z-fighting (no pun intended).

Once I removed duplicate vertices, I could apply the textures and everything worked fine.


How to create a mirror shader? I would like to know how to create a physically correct mirror material in cycles. How can that be achieved as realistic as possible?

From Wikipedia:

  Mirrors are manufactured by applying a reflective coating to a
  suitable substrate ...

  In modern times, the mirror substrate is shaped, polished and cleaned, and is then coated. Glass mirrors are most often coated with silver[20] or aluminium ...

  In some applications, generally those that are cost-sensitive or that
  require great durability, mirrors are made from a single, bulk
  material such as polished metal ...

1. Mirror shader as material with mirror reflection (roughness = 0):

To setup a physically correct material we need to base it on real measured values and setup the nodes so it follows the equations how materials behave (PBR setups). The best source for measured values is refractiveindex.info - we get 2 IOR values: N and K.

IOR is a complex number, most people are familiar with the real part (N), but it has also a complex part (K). For non-conductive materials (dielectrics) the complex part is 0 (or very close to it), so this involves metals mostly.

IOR is also dependent on the wavelength of light, so red, green and blue will reflect differently off of the material. This gives metals their characteristic colors and tinting. To use N and K values in a shader, we'll need the Conductive Fresnel node group, here is a GPU  friendly implementation.

So in refractiveindex.info we input 650nm for red, 550nm for green and 450nm for blue and for example we get physically correct gold mirror shader:

It is worth noting that color management also plays significant role how your materials will look. If we enable Filmic and Very High Contrast look we get this, the correct way would be to also setup the lighting for the Filmic color-management (increase light intensities, keep Base Contrast).

Dielectric materials have a diffuse component (unlike metals) and the important part to keep them physically correct is to mix in the reflection through Fresnel. We can also get measured values for IOR, for ceramics it's around 1.8, so here is how a generic setup of mirror reflection on a bathroom tile would look like:

More about this is here: How do I create a reflective white material?

For other materials like wood floor etc. there is just different IOR, the setup is same, unless there is some roughness to the reflection.

For mirror sunglasses shader the effect is made with thin film coating. Measured values for sunglasses are hard to come by, so the artistic approach of mixing shaders through multiple Layer Weight nodes is all there is to it:

There is however an OSL shader available (now also with GPU support) to do the thin-film interference on materials. Use the Thin Film Interference node, don't link the materials, as some of them are not PBR compliant.

2. Mirror shader as a "shader" of mirror object:

Mirror is made from 2 materials: Glass and Silver coated aluminium behind it, so to make physically correct mirror, you will need to model it as such.

It's worth noting that Refractive Caustics option should be turned on to not produce shadow onto the silver plate behind the glass:

For the silver you sample values from refractiveindex.info and you get:

If the mirror is bigger and it's in animation, I suggest putting some slight bump or displacement on it, as nothing is perfectly flat.

For ordinary mirrors made from flute glass and that are not the object of focus this is fine, but fancier mirrors use heavier glass and sides cut in angles so the diffraction of light is clearly visible.

First thing to mention is that Cycles should not be the weapon of choice to render physically correct glass. Bi-directional renderers do much better job at rendering glass with the perfect tool being spectral renderers that can do diffraction and thin-film correctly. With Cycles be ready to set 50k samples and render whole night even on good HW.

Here are some popular glass types and their respective IOR curves. The exact values are again at refractiveindex.info, for the LASF9 it looks like this:

You can notice the glass came to life with color, there is blue tint on edges and warm tint in middle, with diffraction streaks present.

For even more realism we could add a volume absorption shader as that is also not present in Principled or Glass nodes, but on thin glass plane this is only visible on the edges, so I'd say it depends on what type of frame the mirror is in.

This is all correct for roughness = 0, because otherwise we need to account for it. You can find a Fresnel node that takes roughness into account here and use it in place of the standart Fresnel in the right setup, the Glass node in Cycles is equivalent to it:

You can also use the complex IOR node if you need glass that happens to have some small K value.

The test scene is by Robin Marin


Blender 2.81 - Sculpt level disappeared from Multires modifier I'm using the latest version of Blender: 2.81.
I find it fantastic, but the "Sculpt" level seems to have disappeared from multires modifier.

Currently it is impossible to jump back to a previous subdivision level to do easy smoothing on lower topology levels.

Is it a known bug?
Is there a new way to use this modifier?
Is there a way to get the sculpt level back?

Thanks!

The removal is intentional and temporary to avoid the occurrence of a bug that corrupts mesh data when the multi-resolution modifier is used while sculpting. Once T58473 has been fixed it will likely be available again or an alternative approach will be provided.


Why is my Cycles Smoke is disappearing in render? I've made a smoke+explosion simulation and everything works just fine in viewport. But I have two issues that you can check in the blendfile below:

The first one is that some of my smoke is not rendering at all. The next images have the same scale.

As you can see, there is a smoke plume missing in render. It's weird because they came from the same emitter object.

The second issue is that the smoke disappear when the simulation goes further as if the flow object was emitting no more. Again the images have the same scale and placement.

It looks that the problem is not in the material but in the density of the smoke. This is an image of the Density Factor output and the problem is there yet:

This is because the max steps + step size is limiting the maximum distance volume rays are allowed to travel to a distance smaller than the total width of your domain.

Your domain is over 350 meters wide in the shortest axis. With the current settings in Render settings > Volume Sampling, the ray can only travel 1024 steps at .1 meters (BU) per step. In other words, the ray can only travel 1024*.1 = 102.4 meters before it must give up.

There are a couple ways to fix this.

Increase the max number of steps

This will keep everything as it is, but allow the rays to travel farther. It will likely increase rendertime however.

Increase the step size

This will make rays jump farther between steps and significantly speed up rendering, but may make the volume appear less detailed.

1024*.5 = 512 meters/BU, which is quite sufficient to traverse the whole of your domain. Note that details smaller than the step size may be "jumped over" by volume rays as they step along, essentially rendering the volume like those details were never there.

Use Equiangular sampling

Depending on your exact situation, you might find it's faster/less noisy to use Equiangular sampling for your volume. You'll have to experiment and see what works best in your scene.


How do I flip a video in the VSE? I'm having many difficulties with the video editor.
One issue is that I can't figure out how to right a video that is sideways or upside down.
How can this be done in Blender?

In the properties panel N, of the Video Sequence Editor there are some setting for the active strip. Scroll down to the Filter heading and there are two check boxes to flip the strip on the X and the Y axes.

Your other option is to add a transform strip, then use that to rotate your clip.

With the clip you want to rotate selected add a new transform strip by either going to the Video Sequence Editor header Add > Effect Strip > Transform, or by pressing ShiftA.

Then in the same properties panel as in the first part, you will find the settings for the transform strip.


How to color a perfect reflective material in cycles? This is maybe a funny question, but when I color a reflective material, I just change the color of the "glossy" shader, but when it comes to darker colors, I'm lost, because the gradient from dark to light changes the reflection amount too. In the real world full reflections have no colors, but is it possible to color a perfect reflective material in blender regardless of the color surroundings (non realistic soloring)?

If I understand correctly, you want something like this:

This way the camera will see the object with the dark color, but other objects will "see" the object with a bright color, reflecting more light:


Simulating Time dependent on input with python I'm trying to create a program that allows you to input an amount of time (e.g. 50 years, 100 years, 10 years) and the script runs for that scalable amount of time but shortened (so scale 50 years to 5 seconds, 100 years to 10 seconds, 10 years to 1 second).

Currently my main program looks like so

clear_screen()
clear_heirarchy()
scene = bpy.context.scene
# change this to see 3 or 2 tuple demo
tuples = 3
cultures = 4
lamp, cam, kernel, culture_list = graphics_factory.create(tuples,cultures)

positions = []

# random points for modeling purposes, this will change to data later
for i in range(200):
    if(tuples==2):
        y = uniform(-2.0,2.0)
        positions.append((0,y,0))
    elif(tuples==4):
        x = uniform(-2.0,2.0)
        y = uniform(-2.0,2.0)
        positions.append((x,y,0))
    else:
        positions.append(get_triangle_constraints(
            [(0,0,0),(5,0,0),(2.5,5,0)]))

number_of_frame = 0
t_end = time.time()+10
# makes cultures move around
while time.time() < t_end:

    scene.frame_set(number_of_frame)

    for culture in culture_list:
        culture.location = positions[randint(0,100)]
        culture.keyframe_insert(data_path="location")

    # move next 10 frames forward - Blender will figure out what to do between this time
    number_of_frame += 25

as of right now I am not simulating time. I have found the "my_handler" method of working with frames in a scene but this doesn't seem to allow me to change the a.) number of frames or b.) amount of time it takes to run through the program. I'd like to move away from running through the loop for 10 seconds like I do but i'm not sure of any other way to simulate movement. Does anyone know of a good way that allows me to simulate movement and time?

I've found there's no built in way in blender (other than physics simulation engines) to do this. Instead I mapped 'time' to frames linearly and customized the number of frames in the animation with scene.frame_end with the while conditional being

   while number_of_frame < scene.frame_end:


Material won't apply to mesh with UV map I'm tryning to apply a Texture Image to an object, but it don't work. I unwrapped the object and created the image in the UV/Image Editor. If i try to assign any other simple materials with just color, it won't work either. In the material preview it's showing nicely. As you can see

Thanks!

You don't see the texture is because you are in solid view in the viewport shading.

Switch to material or rendered view.

Bounding Box.

Only shows rectangular boxes that outline an object’s size and shape.

Wireframe

Objects appear as a mesh of lines representing the edges of faces and surfaces.

Solid

The default drawing mode using solid colored surfaces and simple lighting.

Textured

Shows meshes with an image applied using the mesh’s active UV Map. For Cycles materials, the image is the last one selected in the Node Editor. For other render engines, the UV Map’s applied face texture will be shown.

Material

A fast approximation of the applied material.

Rendered

An accurate representation using the selected Render Engine and lit with the visible scene lights.

For more info please refer to the blender manual:

https://docs.blender.org/manual/en/dev/editors/3dview/properties/shading.html


How to loop values on Custom properties I added a custom property to an object with an integer value and a max of 3. Is there any way to loop the value? I want it to return to the value of 0 after 3. Is it possible?

Setter / Getter and modulus.

Zoomed in test. Can see 4 pop up when holding mouse down and sliding, but the setter turns 4 to 0
Internal "get/set" function of property?
How can I change IntProperty default value stored within PropertyGroup?
Is There a Way to Change a Prop with an Update Def without Calling the Update Def?
If we set up an int property with a getter and setter can assure it remains in a certain range.  For this case have set the min to 0 and max to 4, but if the property is set to 4 it reverts to zero, using the modulus operator
value = value % 4

ie the integer remainder when divided by four.  This is stored in the file as a custom property emulating how properties work.
Set the default value in the getter, I've used 0
Test Code.
import bpy

from bpy.props import IntProperty

def get_int(self):
    return self.get("test", 0)

def set_int(self, value):
    self["test"] = value % 4

bpy.types.Object.test = IntProperty(
    min=0,
    max=4,
    get=get_int,
    set=set_int,
    )

def draw(self, context):
    layout = self.layout
    ob = context.object
    layout.prop(ob, "test")

# tacked onto object props transform panel to test.
bpy.types.OBJECT_PT_transform.prepend(draw)


Cable bump. How would you do it? I'm starting to get familiar with photorealistic rendering and node-based textures. Currently I'm working on a cable and would like to know how your approach would be concerning this little bumps and uneven parts. sure, I could sculpt it but is there maybe an easier way of doing it with a noise? What sort of would it be than?

Thanks :)

First let's establish our cable geometry. I will use a curve object so I can easily edit the shape. Make a tube from the curve by changing these settings and also add a subdivision modifier:

For the surface detail we can take multiple approaches:

Deform the surface physically with Displace modifier using a noise texture. The surface should be subdivided enough with Subdiv already. Note that Blender v2.78 does not have this modifier, the next option replaced it instead.
Deform the surface at render-time with material using True displacement. This has an advantage over (1) of adaptive surface subdivision based on screen space real-estate.
Alter the shading with Normal or Bump mapping. This won't change the silhouette but for non-closeups is fine.

All the options require some sort of texture to drive the effect (procedural or image). The most important point of this answer is how to map such texture onto curve's surface, so it is not stretched and actually mapped correctly. The curve can use UV space for seamless textures, but you cannot display it inside UV/Image editor. Instead you have to preview a material with for example a checker texture and scale the UV coordinates with Mapping node to eliminate stretching and any seams. Also enable the Use UV for mapping property under Curve > Texture Space options:

For procedural textures (as they are not seamless and will cause seams in UV space) the best option is object or generated mapping, also scaled accordingly with Mapping node.

Once decent mapping is established you can use whatever displacement/normal/bump map. I will demonstrate option (2) and use Noise procedural texture for the small and big bumps with different scales:

With UV mapped seamless textures you can have displacement and materials like this easily:


How to emit real random particles I'm working on a sort of idea that you can make an unique 'drawing' by downloading this blendfile, run the animation and get a truely unique drawing. Key of the concept is that designing needs no skill or knowledge.

Problem: I created a 'drawing machine' that emits random particles (size and life) and paints the canvas by using dynamic paint. But everytime I play the animation the exact same drawing comes out.

Of course I could use seed, but it will contradict the concept.

You can use Drivers to get "random" Seed in Particles settings.

  As @Crantisz pointed you can just paste #int( 99 * noise.random() )
  as a Seed value and Driver will be automatically added.

Long way:

Right click on Seed and Add Driver > Manually Create Later (Single).
Go to Graph Editor and switch to Drivers mode.
In Drivers tab paste this expression: int( 99 * noise.random() )
Update Dependencies.

Now every time you open Blender Seed value will be different.


object glitches when moving vertex I'm currently trying to follow this tutorial to create a donut. When I try to move a vertex, the vertices around it glitch and go far away from where they should be. A group of vertices in one area seem  to be grabbed out and put in another location. I'm using proportional editing. When I make the proportional editing circle smaller, the issue goes away.
edit: I fixed the issue by turning off snapping

I was able to fix the issue by turning of snapping.


Create one curve object per spline in Animation Nodes? I am trying to create a scene where a list of spheres are positioned onto the verts of a hidden icosphere, and as I move an empty through the icosphere, the visibility of the balls is toggled, and then as each sphere is revealed, splines will grow out to join them (probably using the Bevel End value), following the edges of the icosphere.

I've solved the problem of revealing the spheres as I move the empty, but I'm stuck on the splines part.

I've already created a version of the scene where all the splines are used to create a single curve object and the Bevel End value was used to grow all the splines at once.

Please see this video for what I have so far: https://www.dropbox.com/s/7n3nfqkm1czca2q/Blender_%20%5BD__Data_Dropbox_3D_T3DF__Personal_David%20G_AnimationNodes_bally-ball-plexus.blend%5D%2020_02_2018%2013_21_21.mp4?dl=0

What I want to have is each of the splines grow as their respective spheres are revealed. I know I could instance a bunch of curve objects, equal to the number of edges. In this case, though, all their origin points would be at the same place (0,0,0), and so an effector object wouldn't help, nor would I have the curve objects in any sort of spatial order with which I could use a falloff profile on their individual bevel ends.

I've seen that I can individually effect the splines of a single curve object, as shown below, but I haven't been able to figure out how to do that based on proximity to something else, or even in any particular order.

Have I made sense here?

Any ideas?

Thanks

Animation Nodes have a node called Trim Spline Node which can be used to dynamically trim splines. There are certain complications, however, if one decided to use this node:

Edges are not directed, so you may observe some splines growing outward from a vertex and other splines inward toward a vertex.
There no easy way to determine which edges belong to which vertex, in other words, there is no way to determine the locations of the points of the spline to derive the trim node by.

Thus we are forced to to use a more advanced approach, but no worries, it is just as easy.

First, we loop over edges, get the vertices locations at the indices of the edge indices, sort the vertices in the direction of the animation, I can see that your animation is from the left to right, so we check if the $x$ location of the first vertex is larger than that of the second, if it is, we reverse the list such that the first vertex becomes the one that is closest to the initial location of the animated effector, then we create a spline from those vertices.

Second, we trim the output splines based on the distance between the effector and the initial vertex of the spline, since your animation is along the $x$ axis, the distance is simply the difference between the $x$ locations of the effector and the vertex:

Which results in:

Notice that the trim node shouldn't be used here, because the spline is just a line so a linear combination between both vertices of the line would yield the same effect, but I just wanted to show you how trim node can be used.


Render button missing in Blender 2.8 So either Google doesn't have the answer, or I didn't know what to search for. But I don't see the render button on the right side of the screen. Every tutorial I see says that I'll find it there, but I don't see it.

This is what I'm seeing

In Blender 2.80 the render buttons are in the main window header, next to File and Edit.


adding support edges I am trying to model a headphone in blender. While we create support edges at the sharp areas by adding edge loops, it creates sharp edges in some other areas of the model where i don't want sharp edges. How can i avoid such thing while modelling.Also there are some edges that need to be sharper, but i am a little confused about creating edge loops without making any triangles in mesh. I know we can use edge split and other things like bevel edges, but not sure what to use in which situations. Screenshots attached for your reference.

thanx

This is a place where it's probably okay to use a triangle to cut off some of those edge loops. You don't want them to continue going down, and adding a triangle probably won't add much distortion. You can read about some of their uses here.. You need to be wary when using them, but it's usually okay if you're careful.

In that images, I would merge the circled red edges over to the highlighted red edge, then I would merge the right green edge over to the left green edge.

Another method is to slide edges that are causing problems in one place but are needed in another down so that they aren't creasing that part of the mesh.

There are other options available like edge creasing, but I think it's better to stay away from those because they can take away control and cause distortions if used incorrectly. But like all tools, they have their uses in some instances.


Creating a subdivided plane using projected threads How can I create a subdivided plane using projected threads.
(Part 02 of Converting bottle threads from diagram to 3D model)
I'm trying to model the threads of a polar springs 500ml bottle in Blender 2.8x so I can 3D print an adapter for it.

I've been able to find some good dimensions for the threads to start with. Link to full diagram below. https://www.bevtech.org/assets/Threadspecs/2072573_tmp.pdf

This can be done using a subdivided plane and the Knife Project function.

Make a plane of required length and subdivide it
Create your threads (I used another plane) and move it in front
Select Threads + Plane and go Edit Mode > Mesh > Knife Project

Making thread pattern ,Shift+D to duplicate the vertices

Projecting threads onto the subdivided plane.


When trying to render an animation, it doesn't work So I recently downloaded an intro that I found that I liked, and decided to render it to see if it worked. Well, evidently it doesn't. When I click "render animation" it says "Can not open or start AVI movie file". I will be linking a screenshot just so you can see. If there are any questions that anyone has to learn more please do ask. The first picture is before I render it, and the second picture is after I render it. I try to render it as animation, and the error message appears at the top near the middle.

It's likely to be one of two things:

Either the output path you are trying to use is invalid or trying to write the file to a protected non-writable path on your machine,
OR you are trying to use a video codec that your OS does not support.

Try switching up your output path and/or your video codec and see if the error goes away.

Bonus Tip: It's best to render your animation to a sequence of still images (PNG, JPG, etc), and then render the video from the images. Lots of reasons why this is better (some reasons include: in case animation render fails in the middle, it's easier to render video from images instead of raw render, etc).


Rendering of objects visible in viewport only! how do I render the objects visible in the viewport only ie. only the objects with the open eye  in the object outliner.
Thank you

By default only the eye icon to hide the object in the viewport is shown in the outliner, but you can add other icons including one to prevent the object being rendered.  Click on the Filter icon above the outliner then on the camera icon in the menu that appears. Hover over each icon for a description of what it does.

You'll then find another column of camera icons in the outliner which you can use to prevent the object being rendered as shown below.


Saving multiple animations in the same action My problem is very basic, that's why I can't find a solution on the internet.
I'm making a 2D animation in Blender. My character consists of various sprites like a thigh, calf,head, body etc. So when I animate I have to change the rotation of each sprite separately. I wanted it all to be saved under the same Action (like on YT tutorials, but they always animated only one sprite) but apparently an Action can store only one value of a transform, meaning that if I rotate the thigh at 20 degrees, the rest of the sprites would have to be rotating at 20 degrees as well to be saved under the same Action. Is there a way to save a whole animation under a specific name to be easily discerned among others in future? Thanks in advance!

You can have multiple properties animated in one action. An action will animate the same property on any object it is assigned to, this means you will need one action for each object unless you want them to move exactly the same.

The easiest solution would be to use an armature. You can parent each existing object to a single bone or you can join the objects into one, the mesh pieces don't have to be connected, and have the armature bones move different parts of the mesh. This will bring all of the animation into the one action.


Moving vertex to the X/Y intersection of two others I am trying to find the fastest and easiest way to move the selected vertex in the screenshot below to the exact X/Y intersection of the two vertices closest to it.

I drew the blue and green lines in to indicate what I'm trying to do.

The only way I know of is to:

Select the top vertex, copy its X position and paste it into the X position for the target vertex.
Repeat above with the bottom vertex, except with Y position.

This works, but it's slow (even with Blender's great feature where you can copy and paste without the text fields having focus).

Is there a better way? I tried to mess around with snapping but couldn't make it work.

Snapping does work, but it has to be in 2 constrained moves, I think.

Snap set to 'Vertex' and 'Active'
G X, and then G Y to the relevant vertices, with the snap active.

The first move could be G G, a slide, no snap, as far as it will go.


Sequence of Bones rotate One by One - Controlled by One Bone I want to create an armature that has several bones that are all controlled by one bone.  When that one bone is rotated, it will rotate all of the bones, but one at a time.  So when one bone has rotated, say, 90 degrees (or however you decide), the next one will start rotating.  When the second bone has finished, the third will start rotating, and so on.
How can I create such an armature?  The bones do not change position, only rotation.

Use self in drivers.

Similarly to @joshsanfelici have set the bones to XYZ Euler and driven the rotation z property of each bone via the target bone.
The ability to use self in drivers let's us get away with having one common driver and feed into it object properties.
In this case if one of our pose bones is self and the target bone is named "Bone" and is in the same armature then
self.id_data.pose.bones["Bone"]

is the target bone, and
self.id_data.pose.bones["Bone"].rotation_euler.z

is its $Z$ axis Euler rotation.
If we add a custom property to each bone, eg "prop" it can be used as the start rotation, eg
self["prop"] = 0.0

Rotations are in Eulers, as explained in other answer. So for example sake, if "prop2" is $\pi / 2$ can drive the bone using the target bone using a pretty long an inelegant expression that is the maximum of the minimum between 0 and the target rotation subtract the start range, and the range between our props...
Instead I have written a little script to add some props, make a simple UI, and a driver expression.  The UI is appended to the Pose Mode options panel in the 3D view N Tools Panel.
import bpy
from bpy.props import FloatVectorProperty, StringProperty
from math import radians

## properties

bpy.types.PoseBone.copy_range = FloatVectorProperty(
        size=2,
        unit='ROTATION',
        default=(0.0,radians(90)),
        )

bpy.types.PoseBone.target = StringProperty(
        )

# UI

def draw(self, context):
    ob = context.object
    pb = context.active_pose_bone
    self.layout.label(text="Bone Switch Test")
    self.layout.prop(pb, "rotation_euler", index=2)
    self.layout.prop(pb, "copy_range")
    self.layout.prop_search(pb, "target", ob.pose, "bones")

bpy.types.VIEW3D_PT_tools_posemode_options.append(draw)

## driver expression

def rotate_switch(self):
    target = self.id_data.pose.bones.get(self.target)
    if target:
        rz = self.copy_range
        range = rz[1] - rz[0]
        # map to 0 : range
        trz = target.rotation_euler.z
        return min(max(0, trz - rz[0]), range)

    return 0.0

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

See the driver expression is
min(max(0, trz - rz[0]), range)

where trz is the target $Z$ rotation, rz[0] is at which rotation of target our bone starts, and range is the end minus the start of our bones rotation.
Easily extendable.
The idea here is to make it as easy to extend as possible. Can copy any of the driven bones and change their rotation range and the name of the driving bone on the fly.
Can edit the driver function and re-run the script, for example this simple change, (dividing the target rot by 4)
    trz = target.rotation_euler.z / 4

to make the "hammers" fall 90 degrees for each revolution of target bone.

Also here is a little helper script to convert all selected pose bones to XYZ euler rotation, and add a driver to all selected bar the active. (assumed the active is the driving bone)
import bpy

context = bpy.context

for pb in context.selected_pose_bones:
    pb.rotation_mode = 'XYZ'
    if pb is context.active_pose_bone:
        continue
    fcurve = pb.driver_add("rotation_euler", 2)
    driver = fcurve.driver
    driver.use_self = True
    driver.expression = "rotate_switch(self)"


How can I rig telescopic parts to move one at a time? I'm trying to rig a telescopic model. I'd like the segments to deploy "one at a time" (like at 38s here), such the the first segment is almost completely out before the second segment starts moving, and so on.

So far, I've tried assigning a bone per segment, then setting their parent to a big bone which has a "Stretch To" constraint; the constraints target is a a bone that I can use for posing:

With this rig, the segments of the telescope deploy linearly as a group:

Is there and alternate rigging method I could use which gives me control over how the the individual segments relate to each other?

It's actually rather simple to achieve this with Transformation constraints. The key is that your reference of where to get the target transformations from is not a helper bone, but the end bone (the last element) of your telescope. You can check out this blend file here:

Move the bone Segment.1 along the Y axis (I've locked the other axes anyways) to see the effect. It should be exactly what you can see in this little animation here:

Please note that I've made the size of each segment slightly different, so you can see what you're doing when the rig is fully compressed. The transformations I'm referring to however are in this example always constant distances of 0.3. You'll see soon that you're absolutely free as of what distances each segment has though.

Start with creating the armature, and then the segment bones in Edit Mode. Make sure that all segment bones are within the same location, that means you're 'modelling' the compressed state of your rig now. Then parent each segment to a main bone to be able to move the rig around later. Do not create parent/child relationships between the segments themselves.

The rig at this point looks something like this (without constraints yet, we add them in the next step):

Now, select the 'tip' bone (the one which you will transform when animating the rig), in my case that's Segment.1, and then Shift select the first bone that should follow with a delay, that's Segment.2, and press Ctrl + Shift + C to bring up the Constrains menu. Choose Transformation from there. On the child bone, You should see something like this now in the bone constraints tab:

You have a Source section, a Destination section, and a Transform Space section. Transform Space needs to be local in this example, so we want to read and set the bone channels in their own local space. Important are now the Source and Destination fields. On the source and the destination, we tell Blender to check for a Location. Then, we fill in the field for the Y-axis. Min and Max that is. We do the same for the destination. The values in the screenshot now tell Blender the following:

  If the user moves the tip bone, and the local Y value of the tip bone is inbetween 0.3 and 1.2, move the destination bone inbetween 0.0 and 0.9.

That means, you need to translate the source bone to local 0.3 in Y first, before the Transformation constraint does anything at all. Then, while inbetween 0.3 and 1.2, it translates the child bone from 0.0 to 0.9. Why these values? Each segment has a length of 0.3. So that's the lower travel boundary for the first bone. The target value for the second segment therefore has to be TranslationMaxOfTip - LengthOfBone. For the next segment, the constraint is the same (we stil reference the tip bone), but we have to move the bone only if the tip is inbetween 0.6 and 1.2, and from 0.0 to 0.6. Do this for all succeeding bones, same constraint, just altering the limits.

Your values will be different, but the concept is the same.


Creating a geometry from a Python array I would like to 3D print this image, which I computed in numpy as an array.

My hope is to put this into Blender and export as an STL file to give to my friend at MakerBot.

This is a 2D image but my plan is to thicken the image slightly to have a 3rd dimension.

How do I draw this array in Blender ?

Here are some solutions:

1:

  1) export your drawing in Python (numpy) as SVG file (say using MatPlotLib)
  2) import SVG file into Blender
  3) apply bevel to that

2:
In the following however we did it in a different way.

  1) We traced your image in Inkscape
  2) and exported as SVG file.
  3) In blender we just made it mesh and applied extrude.


How to auto-run a simple script? I'm trying to auto-load a script when the user opens the .blend file (I want the user to have a specific panel available when he opens the .blend file). In this case a simple panel to modify the text. I have already activated the "Auto Run Python Scripts" and the "Register" checkbox, but it is not working.

Why is this not working?

import bpy

def addText (context):
    bpy.ops.object.editmode_toggle()
    bpy.ops.font.delete(type='ALL')
    bpy.ops.font.text_insert(text = context.scene.my_string_prop)
    bpy.ops.object.editmode_toggle()

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

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        addText(context)
        return {'FINISHED'}

class Title (bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "TEXT CONTENT"
    bl_idname = "OBJECT_PT_title"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "data"

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

        obj = context.scene

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

        row = layout.row()
        row.operator("object.simple_operator" , text = "Insert Text")

def register():
    bpy.utils.register_class(SimpleOperator)
    bpy.utils.register_class(Title)
    bpy.types.Scene.my_string_prop = bpy.props.StringProperty \
      (
        name = "3D Text",
        description = "Insert your text here",
        default = "TEXT HERE"
      )

def unregister():
    bpy.utils.unregister_class(SimpleOperator)
    bpy.utils.unregister_class(Title)
    del bpy.types.Scene.my_string_prop

register()

If the file is being run as a registered text block then

The text block's name must have a .py extension.

if __name__ == "__main__"

won't be true, it takes the module name, eg for test.py

print(__name__)

will print test, whereas when run from the text editor will print

__main__

which is handy for testing addon scripts.

For a registered text block, perhaps just having

register()

without the if would suffice.


How do I use Grease pencil fill tool so that it doesn't bleed out of an area? I am using grease pencil on version 2.8 from 12-16-2018.
I try to use the fill tool but the fill does not stay inside the lines or does not do anything it bleeds out to the whole area, is there too many lines of my drawing for it to handle?

I have tried increasing the leak size, adding the fill on the same layer that the line layer, making a simple closed shape to fill but nothing works. am I missing something? thanks for your help!

Firstly, make sure you have a material setup that has the "Fill" option enabled (ticked) and that its Alpha is set to any value above "0". Then, if it keeps bleeding off, while still in Draw mode, hold down ALT and draw 'invisible' lines to cap any gaps in your line work. Then just click to fill.

If the problem persists, I've found that you'd need to be on the same layer and select the strokes via Object mode. However, I did run into an issue where the fill will not line up with the stroke in the same 3D space.

Alternatively, if you don't need the fill as a separate object, you can adjust your material and just enable the "Fill" option. You can select individual strokes with edit mode and assign a specific material to whichever stroke you've selected.


Why does my character model revert to a torso when I go into Pose mode to animate it? I rigged a model following some tutorials, and now I'm trying to make some basic animations.  I already know that my model is rigged properly, because I can get it to work using the motion captured animations pack in the Unity store.  However, following an example like this one, I go to put my model in pose mode, and I get this:

Instead of my full model to animate:

I'm sure this is something absolutely stupid that I'm missing, but I'd appreciate it if anyone can tell me why this is happening so that I can get back to work on this.  Learning things from tutorials is a great way to learn for free until something goes wrong that the tutorial doesn't expect.  My project is here.

The rigify addon creates an armature that uses drivers to control some parts of the rig. The leg bones have their scale calculated based on the value of the stretch_length, which is a custom property of the bone.

Blender has a security option that controls whether scripts are run automatically when opening a blend file, this includes drivers that use python expressions to define their calculations.

When you open a file with auto run scripts disabled these drivers aren't run so you end up with strange results like this.

The solution is to open the file with Trusted Source enabled or ensure it is in a path that is not listed as untrusted.


How do I join edges in blender? So I was wondering how do I join these edges, look at the pictures.
I have been searching for a while and can not find anything that works, pressing F messes it up. Whenever I move an edge it doesn't move the face below/above it. Removing doubles also doesn't work.

This is it before I move something

This is it when I move an edge

You are close to the solution, you merge the vertices at each end of an edge to remove the duplicate edges.

If you look closely at your first screenshot, the two edges don't line up exactly. when you use Remove Doubles, it has an option defining how much distance between two vertices is considered a duplicate vertex. The default is 0.0001 - which means really close together. You can press F6 to adjust the value, but too big a value will start merging vertices you don't want merged. Only the current selection is considered when removing doubles, so check that you have edges using the duplicate vertices selected.

When vertices are further apart it is better to manually either move them together, or merge them.

Blender has transform snapping settings that lets you easily snap vertices/etc to other items. Set the snap element to vertex and either enable snapping or hold ⎈ Ctrl when you want to use it, and as you move the cursor close to a vertex it will snap and draw a circle around the vertex it is snapping to. After moving with snapping enabled you should find the remove doubles working without adjustment. There is also an auto merge option that will merge vertices as you snap them together.

You can also manually merge specific vertices by selecting both and pressing ⎇ AltM->At Centre - Note that in edge select mode, using merge at centre will collapse the selected edges to a vertex in the centre of the edge, not just merge the vertices at each end.


How to DROP an object when releasing Child Of constraint? I noticed due to the parenting system of Blender Child Of constraint does not modify the object's location/rotation in such a way we can copy or interact with it.

So when you drop influence of Child Of constraint, the object snaps back to it's original location as seen before instead of simply being suspended in the location it was guided to by the constraint.

The problem is this: How do I get an object to release it's child into mid-air, so to speak, so that physics can take over cause the object to drop?

I assume you are creating an animation ? In that case, a trick you can use is just to set the position of your object at the exact position it was before, on the frame you drop the influence option to zero. Then, if you run a physics simulation, I think it should work.

Let me know if you have any question !


How to iterate through nodes and display them as a template Like suppose i have 10 shader nodes , so code will check first how many nodes does selected object has then it creates operator for each one of them

Like 10 nnodes so we will have 10 buttons in the tools panel ,

So when we press anyof those button it will display nodes template

So basicall can any body point me in the right direction , like how do i iterate through nodes , anything that might come handy in learning

Here's the quickest way possible

for node in bpy.context.object.active_material.node_tree.nodes:
    print (node)


Loop cuts can no longer be moved? I wanted to apply some loop cuts and I noticed that the loop cuts can no longer be slided on the surface of the object like it was possible some versions ago. Can this feature be reenabled? I am using 2.83.1

There's now a yellow handle for this :).
Or you can press GG and it will slide like before.


Installing Flamenco software I am interested to give the Flamenco software a try. The software and documentation can be downloaded here. After reading the Readme I really don't understand how to install this software on my Mac and Windows machines. As this software facilitates a blender render farm I thought I can ask here if anyone can help me to install that software.

From the development team:

  Flamenco is undergoing some changes right now, so I would recommend
  you wait with testing it out. Please check out the website again in a
  couple of months, or follow what we are doing on cloud.blender.org to
  spot any news in Flamenco development.


How can I export UV Baked Image Filmic Log Encoding Layer (Save as Image) I recently installed Filmic color and its awesome.

My issue is that I use Blender to create and bake textures for an external program.

When you bake an image with Filmic installed it actually creates two images on the UV (This is under the Color Space option)

Here are both UVs

sRBG EOTF

And Filmic Log

My main issue is whenever I do "Save as Image" it only exports the sRBG layer and I can not figure out how to export just the Filmic Log layer as an image. I have tried saving JPG, TGA, PNG and so on and it always exports only the sRPG layer.

Either this is a bug or it something I am missing in the settings.

Can someone help me or have any ideas?

Thank you!

By changing color space you don't actually change the image itself but rather the view of it, same image seen differently.
If you want to bake the view in the texture you need to check save as render when you save your image.

But what is it for? Will your texture will be lighted in the other program?
If it's the case it's isn't a good aproach, better bake it as an Albedo.
The transfer fonction of the filmic from scene referred data to display referred data must be the last operation on the image. It means that if your texture will be light after Blender you would need filmic in the other software.

EDIT1

You're not in the right place to manage color, here it's just the color space of the texture when you look at it.
To save your image with the right look you must :

-Go in the scene tab
-Under color management set display device to sRGB, view to Filmic Log, and look choose the one you want.
-After that you can save your image.

EDIT2

I think I have the point now, you are confused by what happens in the image editor. When you rendered your texture and saved it, you already baked the filmic look in the texture, then you load the texture in the image editor and change the color space to filmic.
What is happening in image editor when you change the color spaces to Filmic is that it bring back the transformation to linear (only if you baked your image with filmic).

The steps you made:

Linear scene referred datas (raw render) to BT.709/Filmic Log color space (saved image)
BT.709/Filmic Log back to linear scene referred data.
Consider the image color space in the image editor a invertor of thansformation curves.

Like this you can encode a linear scene referred data (that you can normally only export in EXR 32bit) in a 8/16bit image (with the possibility to decode back to linear scene referred data) exept for the desaturation part of the Filmic. I think to decode back without loss you'll need 16bit image.

So for your need, bake your image with the Filmic (like I said in the Edit1 part), then put it in your other software (emission shader or so, strength to 1) you're done.

And if you want to see a texture in image editor let it by default unless you know why you change it. In your case you must set it to sRGB EOTF.


Character Walk Cycle is not working properly i'm new to blender and just finished modelling and rigging my first character, then I started animating the walk cycle, I was going fine until I finished the first step, I further followed the tutorial I was watching and he duplicated the first step to make the second, so I did so and it just didn't work out for me:(
Here's the video:
https://youtu.be/gFf5eGCjUUg
and here's my .blend file:
https://drive.google.com/file/d/0B_1jio7A29__dkI2Ti1aa2hSbms/view?usp=sharing

It's a names problem: as you can see the paste function is working for all "central bones", while the lateral ones need to find their side counterparts, and they can recognize them only with the right kind of suffix used for L/R.

For example if you rename your LeftFoot as Foot.L and your RightFoot to Foot.R, everything works properly for these two bones also.

Examples of valid separators:

(nothing): handLeft –> handRight
_ (underscore): hand_L –> hand_R
. (dot): hand.l –> hand.r
- (dash): hand-l –> hand-r
 (space): hand LEFT –> hand RIGHT

The Blender Manual states that also your way, with the complete Left or Right word before the name, should work, but it doesn't: you have to rename all your bones with an end L/R suffix.


OpenCL device only visible as root I'm trying to enable gpu rendering on my Vega 64 card in linux, but I can only do so as root. When I run blender as root user, this is what I see in preferences:

The first one will cause my whole computer to freeze if I try rendering with it, but the second one works fine, albeit slow.

All I see as a normal user is the option that freezes my system:

Is there some trick to show both devices as normal user?

Some of my system specs. I'm running Gentoo with kernel 4.19.0 using the open source AMDGPU driver. I've install ROCm from their github repos for OpenCL.

Found the solution was to change the ownership of /dev/kfd from root:root to root:video. Then add it to a udev rule to make it persistant:

Add this to /etc/udev/rules.d/60-kfd-opencl.rules

KERNEL=="kfd", MODE="0660", GROUP="video"


Blender Python select an object with the sequence of letters in a name How can I select the object using a sequence of letters in the name . I know there are operators endswith and starswith, they allocate objects to spell the end or the beginning . But how can I select an object if at the beginning and at the end of the characters are the same, but differ only in the middle of the name.
For example, the operator selects the object name in the end:

for ob in bpy.context.visible_objects:
      if ob.type == 'MESH' and ob.name.endswith("_P678GHNV"):
          obs.add(ob)
          ob.select = True

for example, my naming:

_Н480_2_ТХ_VALVE1_Linde_Clea
_Н480_3_ТХ_VALVE2_Linde_Clea

And I need to select the objects that include the VALVE in the name

You could also use regular expressions which allow you flexible pattern matching:

import re
import bpy

pattern = re.compile("PREFIX.*POSTFIX") # edit this string

for ob in bpy.context.visible_objects:
    if ob.type != 'MESH':
        continue

    match = pattern.match(ob.name)
    if match == None:
        print("no match for %s"  % ob.name)
    else:
        print("matched %s" % match.group())
        ob.select = True


Unable to run simulation I keep on getting this error message when trying to run a simulation and I have no idea why.

@Tyler, Welcome!

Btw, your picture is showing your 2.76 Blender version (in the error log), but you are not saying much about which simulation, if you built it, or if you get it from friends, websites... it could be a buggy file, a buggy simulation, or not compatible, somehow, with your blender version (eg: it could be a very old file)... it could  be pretty much anything... help others help you giving some more info about how and where this is happening...

Anyway (again from the error log) it seems to use a "cellblender" addon, though. Did you have that addon installed? It's not in Blender by default... but if it's there it could be a different version from what your simulation expects (maybe an oldaddon version), or it has some bug...

I guess it is this:https://github.com/mcellteam/cellblender (related to http://mcell.org/): "CellBlender is an addon for Blender (2.6x-2.7x) to create computational cell biology models for use in MCell and potentially other cell simulation biophysics engines"

It could be needed to update the addon, or your Blender version, too. Version 2.78 is the latest in the 2.7x series.

edit:
I just installed mcell and cellblender, using latest blender 2.78 on my Windows 7 desktop pc, and then followed the "first time running" steps

http://www.mcell.psc.edu/tutorials/first_time.html

after which I ran this very basic tutorial, http://www.mcell.psc.edu/tutorials/single_molecule_diffusion.html

and it seems to work:

Maybe you can download and install a fresh new Blender .zip file (so you can keep the one you have installed), and double check to follow all required steps...

If this can help, here is the .blend file that I used to get those torus above:


What are alternative methods to Fluid for making a glass appear to be full of liquid? What are alternative methods to Fluid for making a glass appear to be full of liquid?

I just require a quick simple method. I was going to use particles but wondered if anyone had other methods or ideas.
Doesn't need to be too realistic as it's only for a small static image project.

One way is by simply creating a face for the surface of the liquid, and then use separate materials on each interface as in this post.


Can't remove unnecessary Geometry in Object I want to make a 3D printed Marshall logo for my guitar amp, so i downloaded a Marshall font, extruded etc. and turned into a mesh.

When I had it in the shape I needed and edited the pins, I wanted to slice it, but the problem is that the overlapping lettes produce internal geometry that confuses the slicer.

Im new to blender, but I tried many ways to remove the geometry (booleans, intersect etc) but no tool works like it should.

I need something to create an edge at the intersecting faces to remove them. I even installed an addon for this, but nothing works.

I also think the whole geometry is mucked up, because the faces are ignoring the edges and go over them at some parts. I just dont know why its so mucked up. Is it because of the conversion from Text to Mesh?

Here's an example of the Overlapping

If it's too messed up, it would also be great to get a way to redo it properly. I started my first try with a vector graphic of the logo, but i couldnt get the conic shape of the text. With the font i just change the depth in the font settings and cut of the rest of the extruded material...

ah and here is what my slicer does with my Model:

I find this a rather unsatisfying answer, as it does not involve "proper" modeling, but a functional way to get an acceptable mesh for 3d printing (I think/hope) would be to bake a height map of your object, then use that height map to displace a subdivided plane.  This bypasses the problem of self-intersecting geometry because the height map is an undifferentiated mass of height data.

The crispness of your edges and the smoothness of your surfaces will depend heavily on how much you subdivide your plane.  It will also depend on the resolution and bit depth of your height map image, I'd suggest using a 16-bit file format.  You'd have to relate all that to your 3D printing methodology to determine whether you'll get an acceptable result.

Please let me know if you'd like a description of how to bake a height map or what I did in this particular case, my previous answer here has some info.

But as a general matter, I'd love to learn a more . . . elegant solution to the problem of self-intersecting meshes.  Something that doesn't involve a lot of manual retopologizing.


Objects follow each other on a curve path Similar question but answer does not work. - Animating a series of objects along a path independently

I am trying to make the human objects (which are seperate objects) all follow each other on a path kind of like the stars in the "Paramount Pictures Intro" like below

So this is my setup right now

So I have about 28 people that I need to follow a path.  They will not have moving arms or legs all I need is for all of them to make a nice curvy path around a globe and then end up around the earth in a circle.

When I made one person follow path then tried to offset follow location and follow rotation of object in front of it, did not work.  Also tried both methods in the question above.

Does anyone know how this path can be follow to imitate a similar animation as Paramount Pictures.

Create your object.

Cerate a curve and shape it to the path you want the other objects to follow.

Make sure they have their origins on the same place.

Select the object and add a Follow Path constraint. Set the curve as target. Your object will move to the beginning of the curve. Then animate the offset value to make the object travel along the curve.

For several object you can use an array modifier and set the number of clones you need on the array.

Then add a curve modifier after the array modifier, selecting the curve as object. Then move the object on the X axis.


Performance Mode for Animation Nodes Addon What is this Performance mode used for? And how it can help with performance?

It's true what Kristof Meirlaen said for the most part. Animation Nodes will not copy all incoming sockets for a given node (that would be extremely ineffecient). The input data will only be copied when it is used by multiple nodes AND at least one of the nodes that uses the data modifies it. So when a single output is only connected to one input, the data will never be copied (an exception is the Loop Input node when you turn on "Copy" in the advanced settings).

Wether a node modifies the incoming data is stored in the input sockets of each node. The nodes specify this themselves. Each socket has a property that is currently called "dataIsModified". This is the property you can edit when you switch to "Performance" (it is only available for data types that can be copied).

In fact I did not want to make this "feature" that prominent (and it will likely change) because you really almost never need it. I mainly implemented this for me for testing. I never really used it in practice.. Performance problems are somewhere else most of the time.

If you have a big node tree and want to see where data is copied automatically you can switch the "Color Mode" in the Developer panel of AN to "Needed Copies". That is also a feature I mainly implemented for me, but it might help you in some cases..)

In summary (although it might not satisfy you): You really don't need this. AN should be able to optimize itself in that regard. When you try to optimize performance, you should look somewhere else. I will remove/hide that "feature". Thanks for opening my eyes on it :)


Blender doesnt start up Installed linux mint on my macbook pro (13 inch 2010 model)

When I run blender from my terminal this is what it outputs

~$ blender
blender: ../src/gallium/state_trackers/dri/dri2.c:698: dri2_allocate_textures: Assertion `*zsbuf' failed.
Aborted (core dumped)

The tech specs for your macbook state:

NVIDIA GeForce 320M graphics processor with 256MB of DDR3 SDRAM shared with main memory

So this doesn't meet the minimum memory requirements.  Look slike you need to stick to 2.79 or start saving for a new machine.

Just for completeness, and if you're curious, here are the instructions to check your OpenGL version.  Run the following command from the terminal:

glxinfo | grep "OpenGL version"

If you don't have glxinfo command you can install with

sudo apt-get install mesa-utils

Make sure that the version is at least OpenGL 3.3.  Even then, the memory constraint is likely to be the problem.  You can always try running blender with the following command:

./blender --debug

It might offer more information


Can I use Blender to create an open loop race car track level? I've just used Blender to design my 3d model of a vehicle.  Now I would like to create the race track.  It will be an open loop track where the start and finish are not connected.  Is this something for which I should be using Blender?  Or is this done in another program?  Google research has been unclear.

As J.Doe yes you definitely can! There's even tutorials on that exact task,

https://www.youtube.com/watch?v=SDLLbKvEeBY

Although this specific video is on a loop track making an open one wouldn't be much different I don't think. Of course depending on what you're actually trying to do you may need to look for more specific tutorials, like if you're making it for animation inside blender or if it's intended for a game or perhaps you want terrain around your track, there's tutorials out there for a lot of tasks in blender if you need them. Best of luck! :)


Vector Object to location array I want to do this:

myLocation = (-0.9056, -0.0628, -3.000)
SplinePoint.co = myLocation

Where myLocation is a blender Vector.

i.e. I want to assign a vector to a spline point's co attribute ...

in other words I want to convert a vector object into an array that matches the co attribute per:

https://docs.blender.org/api/blender_python_api_current/bpy.types.SplinePoint.html?highlight=splinepoint

Note: SplinePoint.co requires 4 values in its array (not sure why???)
This is the error I'm getting.

Traceback (most recent call last):
File "/home/iainm/Desktop/objects/dev_space.blend/Text", line 209, in <module>
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3
Error: Python script fail, look in the console for now...

You don't need to convert a vector to an array, you can just assign it to the location. A vector is created from one value which is a set of three (or four) numbers, so you need the extra pair of parenthesis around the three values.

Any location, rotation and scale value can all take a vector or array as input values. All of the following work.

obj = bpy.data.objects['Cube']
obj.location = Vector((-0.9056, -0.0628, -3.000))
obj.location = [-0.9056, -0.0628, -3.000]
obj.location = (-0.9056, -0.0628, -3.000)
obj.rotation_euler = Vector((-0.9056, -0.0628, -3.000))

For bezier curves the same applies to it's curve points

# for bezier curve points
bezcurve = bpy.data.objects['BezierCurve']
SplinePoint = bezcurve.data.splines[0].bezier_points[0]
myLocation = Vector((-0.9056, -0.0628, -3.000))

SplinePoint.co = myLocation
SplinePoint.co = Vector((-0.9056, -0.0628, -3.000))
SplinePoint.co = [-0.9056, -0.0628, -3.000]
SplinePoint.co = (-0.9056, -0.0628, -3.000)

For nurbs paths each point is four values instead of three. The first three values are the x,y,z for the location as above while the fourth value (shown as w in the UI) controls the influence the point has on the curve, where a bezier point has handles that define the angle and strength of the curve leaving the point, a nurbs path only has an influence that pulls the path closer to the point the larger the value.

# for nurbs paths points
nurbpath = bpy.data.objects['NurbsPath']
SplinePoint = nurbpath.data.splines[0].points[0]
myLocation = Vector((-0.9056, -0.0628, -3.000, 1.0))

SplinePoint.co = myLocation
SplinePoint.co = Vector((-0.9056, -0.0628, -3.000, 1.0))
SplinePoint.co = [-0.9056, -0.0628, -3.000, 1.0]
SplinePoint.co = (-0.9056, -0.0628, -3.000, 1.0)

If you are getting a location as a vector from somewhere else you can use resize_4d() or the to_4d() to use the location in the nurbs point. You can then alter the influence with either SplinePoint.co[3] = 1.0 or SplinePoint.co.w = 1.0.


How to Import Blender 2.79 built-in matcaps to Blender 2.80? I'm missing my favorite matcap from Blender 2.79 in 2.80, this one on the left, indicated with a blue border:

Is there a way to extract matcaps from 2.79 and import them into 2.80? Or maybe there is a repository of old matcaps as images, somewhere in the Blender git?

OP's comment here reminded me that you could probably check the v2.79 tag (i.e. release) to find these files.
Here they are on the official repository:
https://git.blender.org/gitweb/gitweb.cgi/blender.git/tree/v2.79:/release/datafiles/matcaps
Here they are on the GitHub mirror:
https://github.com/blender/blender/tree/v2.79/release/datafiles/matcaps
The one you're looking for looks like Matcap 9:


Execute operators from Python at start up I want to add a lamp the current scene using python on startup. I do not want to change the default scene.

Here is the code that I am using:

import bpy

bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))

It adds a point lamp at origin. Like this answer suggests: I have saved this file in scripts/startup as a add_lamp.py

How ever when I start blender nothing has changed. I see no lamps added.

Background Info...

Blender intentionally prevents you from manipulating the scene at startup, this is because it is rarely useful and you end up running into issues - like loading a blend file immediately overwrite any changes you have made.

Other data such as the user preferences can be manipulated since this persists across different blend files.

1. Explicit Execution

So, if you want to do this, you can use a command line argument to run a text block in your startup.blend:

blender --python-text lamp.py

Or you can reference a path directly:

blender --python /path/to/lamp.py

This way you can control if the script runs before or after loading a blend file.

# add the lamp to any blend you open
blender example.blend --python-text lamp.py

# add the lamp, then overwrite it (not useful in this case)
blender --python-text lamp.py example.blend

The main drawback for this is it needs to be added to some startup script or launcher, or manually entered into the commandline each time you start blender.

2. Using Callbacks

Heres an example of a script you can place in startup/ which adds a handler that can manipulate the scene how you like.

import bpy

def load_handler(dummy):
    bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))

bpy.app.handlers.load_post.append(load_handler)

This is another example which keeps the handler active but only executes on new files.

import bpy
from bpy.app.handlers import persistent

@persistent
def load_handler(dummy):

    # only apply to startup
    if not bpy.data.filepath:
        return

    bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))

bpy.app.handlers.load_post.append(load_handler)

This may seem overkill for such a simple task, but when you consider it gives you the ability to execute code on any newly loaded file, its quite flexible.


Make light paths only pass through non-emitted areas? I'm trying to make it so that the plane is transparent except for the light from the aqua emission. Or in other words, how can I make it so that the plane's white areas are transparent and the plane's aqua areas are not?
I want to achieve this without using the compositor, only with material nodes.

As far as I know this is fundamentally impossible to achieve in Cycles.

Cycles being a physically based renderer has to find a solution to the rendering equation, this includes calculating all lighting interactions influenced by surface properties. Materials can't possibly depend on the render results; so surfaces properties can't be influenced by the render solution.

As such transparency, emission strength or any other material properties can never be the result of light intensity hitting that material, because it would cause a dependency loop in rendering process. You can't determine surface lighting before you know its transparency, and you can't set its transparency without knowing the light intensity.

So either fake it in the compositor, bake the light into a texture, render in separate layers and separate steps, use a Shadow Catcher material (only available in 2.79+ versions), or change render engines and use something non physically based, or non photo-realistic.

EEVEE being non physically based biased render can use a Shader to RGB converter node that can use light incidence as output to influence material properties.

If you have a single light source in your scene, or if lighting comes mainly from a
single direction, you can use other tricks like using a lamp object position as directional material input.


Beveling - Why won't old edges go away? I'm brand new to blender and have been trying to teach myself for the past few days, but I keep getting thrown by the simplest things. In this case:

I've beveled this edge, but the old 90 degree edge is still there. I can manually delete all 5 pieces of it, but it's super annoying to try to grab those tiny pieces.

I'm using version 2.78 on a mac, but the same thing happens in 2.79:

Would really appreciate some guidance. Thanks!

Not sure what is happening, but I do know that you do not have to select EVERY edge.  If you just grab each corner edge, you can hit delete and select vertices from the drop-down.  This will result with the other edges being deleted as well.


Why can't I drag files from File Explorer in VSE? I am trying to drag files from a view with the File Explorer into the Sequencer view of the Video Sequence Editor.
However, my mouse drag only selects multiple files instead of dragging. I've tried left click, middle click, right click, double click, shift click, ctrl click, alt click, <~Goddamn-I-really-need-this-feature~> click... To no avail :(.
I'm using the latest Blender as of today, on Linux Mint 17.2 (Ubuntu 14.04 Trusty equivalent).

Moreover, I believe there should be a button, at least, for "import selection into VSE" or "add the selected object as a strip". I don't have anything like that on the 'menu' bar of file browser view.

Lastly, I can drag and drop files from Nemo, the default file manager on my system.

Sorry for not asking something more interesting :(. I'm getting there...

You must left-click and drag the ICON in the File Browser. Clicking anywhere else only selects the asset. You should then be able to drag it into the timeline. Bear in mind that you can only add one file at a time this way.


Please wait/ loader in the while is loading another scenario I need to put a loader, a please wait or something similar when I send the command to change the scenario in BGE. I really don't know how to implement this. Can anyone help me? Thank you

I need to put a loader, a please wait or something similar when I send
  the command to change the scenario in BGE. I really don't know how to
  implement this. Can anyone help me?

1) Show a scene that tells the audience that a scenario gets loaded.

It can be a simple text.

which is shown this way

2) after rendering one frame switch the scene

The last frame from 1) will be shown until the scene from 2) is loaded completely. The duration depends on the size and complexity of the next scene (and the speed of the hardware).

Ensure the first scene rendered at least one frame (therefore the delay sensor).

Be aware this method does not work with animations. The game will be suspended until the next scene is fully loaded. This also applies when the next scene is loaded as overlay or background scene.


How To Import .rdc File Into Blender I've downloaded the mesh model importer addon version 0.3.3
installed it on various versions of blender
but when I try and import model as .rdc file I get this error
See photo
Any ideas what to do?

I had this same problem and was able to fix it by changing the versions of each program. Below is the cocktail of versions I used:

Blender: 2.91.0
Renderdoc: 1.10
MapsModelsImporter: 0.3.5


Rigging objects to Second Life Armature Issue In the first picture, I used the Second Life Avatar with skeleton and rigged a pair of test "feet" to the avatar. I was able to also transfer weights from the avatar to the "feet". When in pose mode, everything moves like it should.

In the second picture, I again have the Second Life Avatar with skeleton and am trying to rig the foot we wish to use. I am able to parent it to the skeleton by selecting the object (foot) and the armature, press Ctrl P and choose Armature Deform with Empty groups. When I then click the object and the legs of the Avatar, I go into Weight Paint Mode and try to transfer weights like I did with my test "feet" and I get an error stating the source mesh does not have any vertex groups. I'm at a loss as to how to give it vertex groups while not messing with the preset weights and skeleton as these must remain the same.

How do I give my foot vertex groups so that I may transfer weights from the Avatar to the foot?

I have somehow fixed my issue.

I re-opened Blender and started completely over.
Staying in scene one, I uploaded the Second Life Avatar. Then I opened the foot file I wanted to attach and rig. I realigned the foot to match exactly vertex for vertex again.

Once perfectly aligned, I pressed shift + D to duplicate it in case I somehow mangled it. I moved this to a new scene.

In the new scene, I placed a box inside my foot so that I could apply a mirror modifier to create the opposite foot. I then went into edit mode and chose faces and deleted the cube faces inside the foot so that it won't be seen in Second Life. I took a copy of the mirrored foot into scene one and aligned it to the SL Avatar.

I then chose both feet, rigged them to the armature by pressing Control + P and chose Deform with empty vertex groups.

Lastly, I chose the legs of the avatar (which included the original feet) and then chose the feet, changed to weight paint mode and chose transfer weights.

I checked the rig by going into pose mode and rotated the feet to make sure it was all working correctly. It was!


Preventing text or object from reflecting in scene (blend file included) I have an object / text that reflects in a scene is there a way to have the text / object be excluded from creating reflections onto other objects?

I would like the text to look "normal" and not have it create reflections in the scene.

See attach image and blend file below.

I guess, you are doing animation, otherwise I would suggest inserting the text in GIMP or something after rendering.

With cycles and using Blender 2.82a, you can select the text and in the "Object Properties" panel under Visibility and under Ray Visibility un-check everything except Camera. This excludes your text from any reflection calculations.

Or you could put the text and a copy of the camera into a different scene and overlay it in the compositor (using an "alpha over"-node for example).


Render region and render with 1 keystroke? I was looking into this:
https://github.com/CenekStrichel/CendaTools/wiki/Render-Tools
And there´s 1 key assignment to do the render region.

Basically you have:
step 1: If user presses "(key)", invoke view3d.render_border command
step 2: view3d.toggle_renderer
step 3: Render area gets represented.
step 4: IF a render area exist, and user presses "(key)" THEN view3d.clear_render_border

How could an .addon be created bindig all those commands and IF statement to a single keystroke?

Please help.
Thanks.

Could this code get us started?

import bpy

class QuickRenderRegion(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "view3d.toggle_render"
    bl_label = "QuickRenderRegion"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def execute(self, context):
        bpy.ops.view3d.render_border()
        bpy.ops.view3d.toggle_render
        #return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

I took p2or link and modified a little. After running the script, shortcut key is Shift + Q.
def register() part has type = "Q" and shift = True alt = False and ctrl = False.

bl_info = {
    "name": "Toggle Simplify",
    "description": "Toggle Simplify",
    "author": "poor",
    "version": (0, 0, 2),
    "blender": (2, 79, 6),
    "location": "3D View",
    "category": "3D View"
}

import bpy

# operator
class ToggleSimplify(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "view3d.toggle_simplify"
    bl_label = "Toggle Simplify"
    bl_options = {'REGISTER'}

    border = bpy.props.BoolProperty(default=False)

    def execute(self, context):

        if bpy.context.area.spaces.active.use_render_border:
            bpy.context.area.spaces.active.use_render_border = False
            self.border = False
            bpy.ops.view3d.toggle_render()
        else:
            bpy.ops.view3d.render_border("INVOKE_DEFAULT")

        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):

        if not self.border and context.area.spaces.active.use_render_border:
            bpy.ops.view3d.toggle_render()
            self.border = True
            return {'FINISHED'}
        return {'PASS_THROUGH'}

addon_keymaps = []

# register
def register():
    bpy.utils.register_class(ToggleSimplify)

    # handle the keymap
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon
    if kc:
        km = wm.keyconfigs.addon.keymaps.new(name='3D View', space_type='VIEW_3D')
        kmi = km.keymap_items.new(ToggleSimplify.bl_idname, type='Q', value='PRESS', shift=True, alt=False, ctrl=False)
        addon_keymaps.append((km, kmi))

# unregister
def unregister():
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_class(ToggleSimplify)

if __name__ == "__main__":
    register()


Missing addon in V2.78 I want to build a stair, according to a video of Youtube (https://www.youtube.com/watch?v=i5UrVrmErwQ), using "add mesh : building objects" addon.

I've noticed that the addon "add mesh : building objects" is missing from Blender 2.78.

Is there an option to download it from somewhere?

Since 2.8 is changing every day there is no point for add-on creators to make their add-ons compatible with it, because the next update could make it incompatible again, which means many of them most likely won't be available until after 2.8 is officially released. For now though you could follow the tutorial in 2.79 and append it over to your 2.8 file.


how to make designs on the wall which is already coloured I am new to blender, have been learning it through online tutorials.

I'm able to make a wall, color it but I'm not able to make designs on the same wall.

Is it that we can apply only the colors to the wall and cant make designs on them? If not how to make designs on the models?

you need to learn about texturing and/or modeling (depends on what you're trying to achieve)

Texturing:  If you want a design similar to the kind of a wallpaper, you need to either download an image of the design from the internet or make one yourself using painting apps like Krita, Photoshop or GIMP (you can even use MS Paint for a starter). Once you have an image of the design you want on the wall or object, you need to add it to the material of the object. Also to make it look in better proportions, you need to UV map your wall object:
Go to edit mode
Select every vertex of the object (press A)
Press U and Unwrap the mesh
done
Modeling:  If I'm not mistaken, you already are learning modeling. So all you have to do is go to the edit mode and change the mesh to your liking. You can use the sculpting mode as well but i suggest you to use it only to add finishing details or to make organic entities (animal, plants and stuff)

Hope this simple explanation helps you get started.
If not, try going through this tutorial: https://youtu.be/9PJL0eAuZ_E

Welcome to the Blender family and i guarantee you, you're gonna love using Blender :)


Volume emitter that is more intense towards the outside of the object How do I create a volume emitter shader that is more intense towards the outside of the object? I would basically like to create tubes that look like the blue (not purple) tubes in this image:

(source: colorado.edu)
(Figure is by Steve Burrows and the Kapteyn–Murnane Group, JILA. From this article.)

But, I cannot figure out how to get the "depth" coordinate of the image in order to feed this to the intensity of the emitter.

Any ideas on how to do this in cycles?

You might be able to do something with the Ray length output of the lightpath node, however based on your example image I think you might be looking for the layer weight (or fresnel) node:

The above node setup mixes an emission shader with a transparent shader based on the angle of the surface to the camera. In this case sharper angles emit light, while more direct angles are transparent.


Weight Painting - Can't smooth this deformation I have a rigged and weight-painted letter A. I'm content with all the weights except for the letter's left shoulder (Shoulder.L) bone. See image. The deformation is crooked, not smooth. I tried the Smooth, Levels, Normalize, Weight gradient, Blur etc. tools and I can't get it right. I tried reapplying automatic weights also with no success. Is the problem with weight painting or is it the underlying geometry (however the geometry here is very simple).

How to properly smooth this "left shoulder"?

Note that the other deformations on this letter are smooth, when I rotate the bones.

(I'm using Blender 2.79b)

I'm attaching a stripped down .blend file.

Oh, lame me! I understand now. I had to smooth the other bones' influence. The problem lay not with the Shoulder.L bone, but with the Neck bone and the Shoulder.R bone. They are influencing each other.

I would only like to add, that switching between bones and smoothing out the imperfections with the Blur tool does wonders.


Blender 2.91 Mesh Object to 3D Print STL I am a Blender newbie. I started on 2.7. Recently upgraded to 2.91.
I used blender to create models for 3D printing and I use a Cura as my Slicer.
My issue is has to do with creating a “sliceable” STL file from joined mesh objects.
Here is an example.

Add ==> Mesh ==> Cube
a.  Set dimensions X: 8cm  Y: 8cm  Z: 1 cm
Add ==> Mesh ==> Cylinder => Named Cyl
a.  Set dimensions X: 12.4 cm Y: 12.4 cm Z: 4 cm
Add ==> Mesh ==> Cylinder => Named Cyl1
a.  Set dimensions X: 11.8 cm Y: 11.8 cm Z: 10 cm
Select Cyl ==> Add Modifier ==> Boolean ==> Object = Cyl1 ==> Difference ==> Apply
Select Cyl1 ==> Delete
Select Cube ==> GZ move a few centimeters above top of Cyl
Select Cube and Cyl ==> Ctrl-J to join objects ==> Tab to enter edit mode
Click in Edge and Using MRB – Subdivide, I subdivided the equal distant edges of the Cube multiple times so that there are as many vertexes on the edge as there are on the curve it faces
Click on Vertex mode and select two facing vertexes (bottom of cube edge to inner cylinder wall top) I create and edge by clicking F. I go all the way around doing that, then go around selecting two edges and using F to create a face.
I do some clean up like the top face of the cylinder and the 1 cm edge of the cube, I remove the faces.
In object mode, it look perfect. I Merged by DIstance and Recalculated Normals.
I export to STL. Import into CURA, resize (x10), Cura can’t slice this. The error message it gives is:

Unable to Slice:
Please review settings and check if you models:

Fit within the build volume (yes I can see the gray outline of bottom and it does)
Are assigned to the enabled extruder (not sure what this is)
Are not set as modifier meshes (again not sure about this)

Bottom line, cant slice. Now If I export the cube or the cylinder as STL, then Cura can slice those, So I think I am missing a step for complex joined objects. I assume I need to fill this object but how do you do that in 2.91. Solidify modifier seems to distort the image.
Does anyone have a faster way of doing the above and any insights of export STL’s for 3D Slicing?

Just a hunch, as I don't know anything about your slicer program. But I know people often get tripped up in other cases by joining objects without realizing the limitations of doing so. So step 7 is likely your culprit, though it may not be the only issue. I'm just betting it's one of them. When joining objects in Blender, they are almost more "grouped" than "fused"; they can be separated later. My gut tells me that your slicer program is complaining about them being joined. You will likely need to separate the joined objects and combine them properly afterwards with a boolean union operation.


How to delete a material from a duplicated object? Sanity Check I must be misunderstanding something. I really need a sanity check.

I'm trying to duplicate the active object, then delete all the material slots from it without affecting the original.

==== EDIT======
Thanks for the answers, it looks like I only have this problem when the code is part of an operator:

def invoke(self, context, event) :
    def deleteMatsFromDuplicate():

        scene = context.scene

        # Duplicate the model
        obj = context.active_object
        obj.select = False
        obj_copy = obj.copy()
        obj_copy.location += Vector((1, 1, 1))
        mesh_copy = obj.data.copy()
        obj_copy.data = mesh_copy
        scene.objects.link(obj_copy)
        scene.objects.active = obj_copy
        obj_copy.select = True
        obj_copy.name = "copy"

        #loop thru and remove all
        for ms in obj_copy.material_slots:
            bpy.ops.object.material_slot_remove()
    # end deleteMatsFromDuplicate

    deleteMatsFromDuplicate()

    return {"FINISHED"}
#end invoke

I'm assuming by the behaviour of question code (pre edit) that the material_slot link is 'OBJECT' rather than 'DATA'.  Code below should work on either. Used copy() method of object and mesh to create a copy, added (1,1,1) to the location, linked to scene, made active, and removed all material slots.

import bpy
from mathutils import Vector
context = bpy.context
scene = context.scene

obj = context.active_object
obj.select = False
obj_copy = obj.copy()
obj_copy.location += Vector((1, 1, 1))
mesh_copy = obj.data.copy()
obj_copy.data = mesh_copy
scene.objects.link(obj_copy)
scene.objects.active = obj_copy
obj_copy.select = True
#loop thru and remove all
for ms in obj_copy.material_slots:
    bpy.ops.object.material_slot_remove()


Subsurf modifier rounding sharp edges I tried to apply a Subdivision Surface on a part of my object. I can't keep the angles sharp, they all turn into rounded angles.

The angle before applying the Subdivision surface...

...And after

In order to keep hard your edges, use the Crease. You find it on the right

The crease makes your edges purple, in order to show you wich one will remain hard or not.

Usually is set on 0.00 . . . Max it from 0.00 to 1.00 and your edges will keep their shape after a subdivision surface.

For example:
Before subdivision

After


How to make "Himalayan" rock salt chunks in Blender Dear experienced Blender users,

please help me finding a solution for the following task:

The material I am looking for respectively that I would love to know about how to create it in Blender is:

Rock salt.

Nice, pink-ish to orange colored chunks of "Himalayan" rock salt.
You may know pictures like these:

If someone of you could enable me to get hold of a Blender material like this - it would help me so much to design items with or out of this material!
As you can see, it is somehow transparent and allows light to go through, it is rough and some areas are "white" where the chunks collided with each other. Some chunks also do have darker "inclusions" as you might recon on the tealight. So, it's quite a challenge and would for sure cost me the next two years to find out alone...
Your kind help and support would be highly appreciated and I want to thank whomever very, very much in advance already.
Thank you and please have a nice day!

Spotty110

Edit01: Btw, (and Thanks to Duarte Farrajota Ramos' comment!), I am still struggeling to learn how to model some decent chunks - I'm worlds away from even opening the node editor for a material... Forgive me!)

Ok here is something I made awhile back. It is really involved and maybe overkill. But it is a great learning experience.

I dont have time now but I will try to update my answer to fill in more details.

Its too shiny but this should get you started.

I got a lot of tips from this user.

https://www.blendernation.com/2017/03/23/gemstone-sculpting/

He also did a tutorial on how to do the shader.

https://www.blendernation.com/2017/03/25/gemstone-shader-breakdown/

Here is the blend file to mess around with

Here is another more simple set up that looks pretty good.

and this is the Gradient node you will need to build.


How to animate the opacity of a texture painting I painted a red circular spot using texture painting over a UV Sphere with an image texture. Is it possible to animate the opacity of the red spot?

You need to find a way to mix the basic material and your spot image texture, for example use a MixRGB and plug the Alpha of the Image Texture in the factor socket, then find a way to vary the alpha value, here with a Converter > Math (Multiply):


Custom cycles node outputting shader I've looked through documentation and many questions here, but couldn't find an answer. Is it possible to create a custom node for cycles with python, which will include inside itself already existing nodes, like Diffuse BSDF and which will return shader as well?
It is possible to make a node which handles and returns values or colours, but shader...
So the simplest thing I want is to replicate some exciting shader, like Diffuse, so that I have a custom node, which takes some values from inputs, do some math, puts new values into Diffuse (like roughness and colour) and outputs it as a usual green socket

As far as I understand your question, node groups should work just fine. You can define exactly what parameters you want as input, and if a node has a 0 weight in a mix shader, then it will not be evaluated.
EDIT The manual says clearly that you don't need to worry about Mix Shader nodes performance.

When executing shaders, a special optimization is applied to Mix Shader nodes. If Factor evaluates to 0 or 1, any nodes that are only reachable via the unused branch of the mix are not evaluated.
This can substantially reduce the performance cost of combining multiple materials in one shader with vertex color, texture, or other input used as a switch.

Also Python code can control the material properties inside the node tree, and for this Python code you can create your own Python panel: Control Cycles material nodes and material properties in Python


Removing corrupt object I have a corrupt object in my master scene. It can't be seen anywhere else than in the outliner. I can select it (in the outliner) but I can't delete it.

It happen to be so that this corrupt/lost object is in all my blender files because they where based on the same blender file.

I know I can Append/Link all objects into a new blender file, but the problem is that I have quite some node setups in the compositor. The only way to append them is to append the scene itself but that will also include my corrupted object.

I tried to copy/paste the nodes into the new blend file, but all my node groups complained about an empty datablock, so that didn't work either.

Any ideas?

I'm using Blender 2.68a with Cycles.

I found a solution to it :)

In the Outliner, change from "All Scenes" to "Blender File" right click on the corrupted object and select "Delete". Now it is deleted...


Subsurf Modifier artifacts So I was messing with Subsurf modifier to create a certain sword and then some weird artifacts began to appear (cape-like). I've tried adjusting the Crease, but couldn't achive what I wanted. Basicly, what I whant is the as on the screens, but wo any artifacts :)

Also, here's the .blend file, cause I assume I didn't make myselt 100% clear.
https://drive.google.com/file/d/0B0hdCv37NrtVMXU4eFB2MFFlMGM/edit?usp=sharing

You have some non-manifold geometry in your mesh.

There is a large ngon overlapping the other polygons.

Here is how to fix it:

Select the large ngons

you can either do this manually which is faster in this case since there are only 2 ngons or you could use a selection tool.
Select -> Select Faces by sides: greater than 4

Delete them: x -> Faces (3)
Select all geometry in the mesh: A
now to fix the holes: Mesh -> Clean Up -> Fill Holes

This fixes part of your problem. The other problem is the creasing. To fix this I would either use edge loops instead of creases or crease all continuous parts of the mesh rather than just single edges.


How to set up min/max/default value for node group socket via Python? Could you tell me how to set min/max/default value for node group socket via Python?
Something like this:

You can access it through the NodeGroup object's inputs:

glossinessFactorInput = bpy.data.node_groups["NodeGroup"].inputs['Glossiness Factor']

glossinessFactorInput.min_value     = -5.0
glossinessFactorInput.max_value     = 5.0
glossinessFactorInput.default_value = 1.5


How to partition a box I would like to partition a box into 3 divisions
Then make it 3d printable
I have tried the Solidify Modifier and the Loop cut
The box would be used a tray for small parts

Thanks for your reply
This is what I have in mind

A simple approach can be the use of knife project (but depending on the shapes you want for the compartments) :

Here I started from a cube and planes giving the shape of the compartments.

Select the planes RMB
Add the cube to the selection Shift+RMB so that both are selected and the cube is the active object.
Go top view Numpad7
Wireframe mode to have a better visibility Z
Enter edit mode (that will edit the cube but keeping the planes selected) Tab
Use 'knife project' (don't check cut through as we want to keep the base intact)
Then extrude down the compartments E along Z axis

Edit : following the comment, I add here the blend file with step by step explanations :