Blender won't load UI text when opened from the console on a Mac To open multiple instances of Blender on a Mac, I'm opening blender.app (2.75a and 2.75) through the console. That makes Blender's interface load with most of the text gone:

Vs. the normal way of opening Blender with Finder:

I tried:

open -n .../blender.app
open -n .../blender.app/contents/MacOS/blender

I also tried only ./ and tried to open the app manually inside the package contents, all with the same result. I also tried with 2.74, and the same happens. Oddly enough I am looking at a tutorial in which the guy has 2 instances opened on a Mac without much problem.

So, what's going on? If I have to make 2 instances of blender.app, it's ok, but how can I get the console window method to work?

I had two versions of python installed; I solved this by uninstalling the 2.7 version by typing:

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7

and then:

sudo rm -rf "/Applications/Python 2.7"

That leaves me with 3.4, and everything works fine.


Pass PIL image to texture.ImageBuff() Is there a way to pass a PIL/(Pillow) Image to blender game engine
video texture / texture.ImageBuff() or and https://www.blender.org/api/blender_python_api_2_76_0/bge.texture.html function?

I am making something like photoshop in the bge.

You can it like this:

def set_image(obj, image):
    '''Sets the image used as a background. Expects an instance of PIL.Image
    CAUTION: THIS OPERATION IS SLOW'''
    if image is None:
        # Sets the image to all black
        buff = bgl.Buffer(bgl.GL_BYTE, 3)  # Blank, really small image
        width, height = [1, 1]
    else:
        width, height = image.size
        imdata = numpy.asarray(image.convert('RGB')).ravel()  # SLOW
        buff = bgl.Buffer(bgl.GL_BYTE, width*height*3, imdata)

    image_buffer = bge.texture.ImageBuff(1, 1)  # Very small image
    image_buffer.load(buff, width, height)  # Overwritten with PIL one

    if 'TEX' not in obj:
        obj['TEX'] = bge.texture.Texture(obj, 0) # 0 is the texture ID
    tex = obj['TEX']
    tex.source = image_buffer
    tex.refresh(False)


Object seems split into two my object is split into two. Last time I got rid of this problem by making normals consistent, but this time it doesnt work. I have a Mirror Modifier on the objecgt, but not applied yet.
Thanks for your help!

Your mesh is a nightmare to edit, because you applied the SubSurf modifier. You shouldn't do that unless you've got a good reason !
So first, we will Un-subdivide it. You can add a Decimate modifier, select the Un-Subdivide mode, and choose a Iteration of 10. Feel free to play with that value, 10 looks like a good compromise :

You can now Apply this modifier ; this way, you'll get a mesh that is largely easier to Edit.

The next step is to add a Subdivision modifier again, so the mesh will look smoother. A Level of 2 or 3 is more than enough.
For the mesh to look even smoother, but without adding more faces, you can go in the Object menu and select Shade Smooth.

There is still some pinches, but now you can move vertices in Edit Mode to mitigate them. Anyway due to the bad topology on the highlighted zone, you won't have a perfect result :

I would suggest to read this Topology Guide (the whole site is quite interesting) if you want to improve this useful skill.


How can I reduce polycount without using decimate? So, I have a mesh that I'm done with, however there are too many polygons for what its use is. How can I reduce this? I've used decimate but it's way too destructive. Are there any other options?

There are some but they'll all require some tweaking.  Investigate Decimate further, because there's some angle-limited options in there that are pretty good, and don't destroy the mesh as much, and if you can get it to do it for you then it'll be far less work.

However if you're set on not using Decimate then you may instead have to do it by hand.

Start selecting edge loops you don't need and dissolving them, as well as collapsing verts and edges wherever you think you can get away with it.

If you'd rather start from scratch as it were, you can make a new mesh and shrinkwrap it to your current one using the Shrinkwrap modifier.  Extrude sides, add new vertices, etc.  This way you can put topology exactly where you need it, and exactly how much of it is necessary and no extra.  This process is called Retopology and there's a lot of more detailed information out there available with a bit of searching.


How to get a seed and perlin noise /randomnumber in Python in BGE I am generating a basic terrain using 3 for loops.  It currently results in a large block of cubes composed of columns of cubes all of the same height, height meaning how many cubes high each column is.  I want to change the top of every column to make an overall terrain look.  I hope to use perlin noise to take the columns XY (horizontal) location and use it as a seed to get the height of that column of cubes.

I also hope to use an initial seed that changes the effect of each horizontal seed value as well and the ability to reproduce the final results by being able to enter the seed at start up, but it is not top priority right now, but I would appreciate if you would include that, if you know how.

I want to be using the horizontal position to be the seed to generate the height position with the perlin noise to determine how many cubes high each column should be.  Please include full code or at least a good functioning chunk of code.  Thank you for reading and your time.

Blender comes with the mathutils module, which has a whole host of functions for just this kind of thing:

Here's the script for the above demo. It's a little boilerplate-y, really the gist of it is just the section in the middle (iterate over each vertex, get value from 2D location of vertex, set Z location of vertex)

from bge import logic
from mathutils import noise

# a list of various noise functions with some default values
noise_functions = [
    lambda p: noise.cell(p),
    lambda p: noise.fractal(p, 1.0, 2.0, 8),
    lambda p: noise.hetero_terrain(p, 1.0, 2.0, 8, 0),
    lambda p: noise.hybrid_multi_fractal(p, 1.0, 2.0, 8, 0, 1),
    lambda p: noise.multi_fractal(p, .5, 2.0, 8),
    lambda p: noise.noise(p),
    lambda p: noise.ridged_multi_fractal(p, .5, 2.0, 8, 1, 0),
    lambda p: noise.turbulence(p, 8, True),
    lambda p: noise.variable_lacunarity(p, 1),

    #lambda p: noise.voronoi(p),
]

verts_per_tic = 100 # number of verts to move every logic tic
zoffset = 1 # sort of useable as a "seed" when distorting a 2D plane on the Z axis like this
scale = .5

def move_verts(cont):
    own = cont.owner

    for m_index in range(len(own.meshes[0].materials)):
        v_range = own.meshes[0].getVertexArrayLength(m_index)

        cvert = own.get("current_vert", v_range)
        noise_scale = own.get("noise_scale", 1)

        if cvert < v_range:
            # iterate over verts in the current material of the current object
            for v in range(cvert, min(cvert + verts_per_tic, v_range)):
                vertex = own.meshes[0].getVertex(m_index, cvert)

                # get the XY position of the current vertex and scale it
                sample_pos = vertex.XYZ.copy().xy * scale

                # turn the 2D XY vector into a 3D vector
                sample_pos.resize(3)

                # set the Z component to a pre-defined constant
                sample_pos.z = zoffset

                # feed it to the current noise function
                height = own["noise_generator"](sample_pos)

                # set the vertex position
                vertex.z = height

                cvert += 1

            own["current_vert"] = cvert
        else:
            # if we've moved all the verts according to the current function, then pick a new one
            iter = own.get("iterations", 0)
            if iter >= len(noise_functions):
                iter = 0

            own["noise_generator"] = noise_functions[iter]

            # cycle through each noise function
            iter += 1
            own["iterations"] = iter

            own["current_vert"] = 0


Understanding BMLoops: Does every loop enclose a face? I'm using bmesh to alter my geometry via python. Now I don't seem to understand loops correctly. I thought that a BMLoop always covers the edges of a face as in it loops around it once. I can manouver back and forth between the next and previous loops via link_loop_previous/next and switch to adjacent face loops via link_loop_next_previous/next (order determined by the edge disks cycle around the loop vertex: https://wiki.blender.org/wiki/Source/Modeling/BMesh/Design)
But recently I stumbled upon a problem when i logged the loops that pass through a vertex which was the corner of a cube. The vertex had 4 loops. I don't understand what face the fourth loop should belongs to? I'm maybe understanding it incorrectly.

I believe the problem was that I was adding geometry while I was running the function and it right away included the additional loops that were being created in the background.


How do I snap a vertex along a local axis? If I'm trying to move a vertex along any axis other than global X Y or Z, it doesn't snap to another line or face (at least not in a useful way). For example, this is what I want:

But trying to snap to a vertex results in this:

And snapping to an edge results in this:

The problem is that when I'm moving a vertex along a local axis, the snapping also uses the local axis. I'd like to move it along a local axis but use a global axis for the snapping.

EDIT: To explain my use case a bit; I do a lot of modeling for mechanical parts, and this situation comes up frequently. I have found 2 ways to accomplish this, but they are both fairly cumbersome.

One is to use a shrinkwrap modifier, but that requires creating a vertex group, setting up the modifier, and in some cases creating a new object to use for the target since the the object I'm wanting to snap to doesn't necessarily lie on the path I'm moving the vertex.

The other is to extrude the vertex beyond the point I want to snap it to and then use a boolean operation to clip the mesh. This one is a fairly bad solution though since a boolean operation requires the mesh to be manifold, and it often does unpredictable things.

The shrinkwrap method is the least painful method I've found, but I'd really like a way to do this simply and quickly, just like snapping a vertex in any other scenario.

Look at TinyCAD, aside the for me only downside that the edges need to be in the same mesh, it should be the perfect solution for you. It comes with Blender and can be activated in the preferences.

In your case i then would:

Create a duplicate of the edge from the lower object with Shift+D
Leave it in place by pressing RMB
Separate by selection with P press Enter to accept the first choice.
Go in Object Mode and select the new object and the upper object
Join those objects with Ctrl+J
Now you select the joined object, go in Edit Mode and use the "V2X - Vertex at intersection" function of TinyCAD in the RMB menu.
You get a new vertex at the intersection, which you can then use to merge the corner of the upper object on.

As i mentioned, the add-on has the drawback that it needs you to join meshes, so i forked the add-on and adjusted the V2X function, if you have more of those situations it might be interesting for you to check it out.
My forked version got merged, so here the link to the original repository.
TinyCAD/b28branch

Here a little explanatory visual:

This version is for Blender 2.8+
You can replace the files in the "scripts\addons\mesh_tiny_cad" folder of your Blender installation. I recommend to make a backup of the files first.


Subsurface black edge I have a surface with a Subdivision Surface modifier, and when I render it in Cycles, there is a black edge at the edge of the surface:

If I render it without Subdivision Surface it looks like this:

What could be the reason and how can I stop this?

EDIT:

After adding the Edge Split modifier as suggested by Shady Puck, the result looks as expected:

That's because you have smooth normals.  Either set those faces to flat shading or enable Auto Smooth under Mesh Data.


How to plug specular map into Principled Shader? I have an old collection of materials that are represented by diffuse, bump and specular maps. Like this. With Principled shader, where should I plug in the specular map? In the previous version, I used to use it as a mix factor between diffuse and glossy shaders, and it was fine.

In Principled shader, I tried to use it in roughness or specular. Inverted or not. Anyway, it does not look right.

What should I do with materials that provide separate maps for "reflectivity", "specularity" and "glossiness" and recommend to use them all?

There isn't an exact answer to this. In older-style shaders it was typical to independently control specular intensity and specular size(also called hardness or glossiness and other names). This isn't how real-world surfaces actually work though. The reflectivity of a real surface is determined by the refractive index of the surface, and the roughness of microscopic imperfections in the surface.

The principled BSDF mimics this with a "specular" control that adjusts index of refraction (IOR) within a narrow range (specular=0 is IOR=1, specular=1 is IOR=1.8). Then there is a roughness control which controls the imperfections of the surface. The result of this is that "specular" controls intensity of reflections and how quickly they fade when viewed straight-on, and "roughness" controls the intensity of reflections and the blurryness of reflections. (worth mentioning here that "specular highlights" are nothing more than reflections of light sources).

So, what do we do with specular, gloss, and reflection maps?

Gloss/specular-size is easy. Plug it into roughness. You may need to invert it. But otherwise, it should pretty much work.

Reflection and Specular: You may not even need them. Both of these map types were just used to deal with reflections not being dependent on roughness, or handling lamp speculars being calculated separately from reflections.* Since this stuff is all handled in the "physically correct" way based on roughness, these maps are essentially unnecessary. They were to compensate for a missing feature which is no longer missing (fading reflections based on roughness).

With that said, you might find putting one of them (try each one!) on the "specular" input gives better results. It's all trial and error. There isn't really any convention for traditional specular materials the way PBR materials have, so those textures really only have a "correct" setup in the software+shader they were originally authored for. So just poke and prod with different inputs to see what looks good. Hopefully the info in this answer is enough to get you started.

*Fun fact: in realtime PBR shaders reflections and spec are still calculated as separate elements. They're just controlled together by roughness and merged under the hood!


"Search for unknown operator" On Start-Up After Removing Module and Shortcuts For lack of a less drastic alternative, I created a whole module just for setting bpy.context.window.screen to a specific screen, since bpy.ops.screen.screen_set is relative.

I originally named the module's operator class SCREEN_OT_set_screen and operator screen.set_screen, played with setting the shortcuts both in the user preferences menu and in code, then changed the name to SCREEN_OT_set and the operator screen.set.

Despite wiping any references to it in User Preferences->Input and double-checking by looping through all items of all keymaps of all keyconfigs, I still get this twice on Blender startup:

  search for unknown operator 'SCREEN_OT_set_screen',
  'SCREEN_OT_set_screen'search for unknown operator
  'SCREEN_OT_set_screen', 'SCREEN_OT_set_screen'

I make sure to set the shortcut key after registering the operator class, and it persists when I rename the module class back to the SCREEN_OT_set_screen that it's looking for, or even remove the file from scripts/addons entirely.

Where in Blender's start-up process is it likely still looking for this and failing?

Search for "SCREEN_OT_set_screen" (literally, a text search) in your startup files. On Windows they're located in C:\Users\[USERNAME]\AppData\Roaming\Blender Foundation\Blender\2.79\config\.
The files are "userpref.blend" and "startup.blend", you can open them with a text editor.

First, backup these files to somewhere safe.

Delete all the text starting from and including the first "DATA" word right before the first occurrence of your operator name, until the next "DATA" word after the last occurrence, but don't delete this last "DATA" word as it's the start of a neighbor entry.
Then save and try opening Blender. Save your user preferences and startup file from within Blender, just to make sure.


Compositor options greyed out I press Shift-A and scroll to add image and it isn't highlighted, in fact all the options are greyed out. Can anyone please help me understand why?

I have reloaded with factory settings.

Enable Use Nodes:

and make sure you are not on the Material Node Editor, but on the Compositor:


Making a hole in a Dynatopo sculpt without Boolean I was just wondering if there are other ways of creating holes in meshes that aren't 100% symmetrical (thanks dyntopo) or too intricate using something other then the Boolean modifier.

I'm currently working on a skull for starters but I need a hole in the cheeks and it got me wondering about whether there are possibilities beyond the obvious.

Thanks in advance!

You can try to use a more advanced boolean solver. there's a plugin somewhere that uses the CarveMT solver to make more complex cuts

The biggest villain in boolean operations is that it comes to a point blender doesn't know how to deal with all the vertices and all the new geometry it has to create to accomodate the change, be it a union or a cut. If possible, decimating or reducing the mesh density in the area of the cut will increase the chances of success


Blender Render rendering dark, spotty and weird image I made a whisky bottle and two glasses. My goal was to make a dark, moody scene with violet and some yellow light, but whatever I'm doing, it's wrong. The glass looks distorted and not correct, not at all realistic, not even near it (I'm using cycles) - I think you will know what I mean, when you see it.

Also, somehow I can't get it to be brighter, I have always these dark points, even though I added a sun and two area lights...

Looks like it's a problem with your world background.  Not sure if you had an HDR image in there but it wasn't packed in the blend file but I found what I believe to be the correct one from HDRHaven.

So you need to pay particular attention to the enviroment texture node.  This should be set to Mirror Ball projection with Raw color space.

Also you need to plug this into the background node, then the background into the World Output Nodes surface input.

I also suspect that your area lights have too much power, so dialling these back to results in the following rendered at 720P with a mild fog glow composite node:

Here's the updated blend file (be careful, I ramped up the Cycles resolution to a higher value, don't fry your CPU trying to render this)

Update

There was a problem with the mesh of the glasses (I'm sure I mentioned this last time). I've fixed it, shows a noticable difference.  I've also upped the lighting, but I think this is too saturated. I've updated the render and blend file.


How to make both maps render I have a model in blender that has two uv maps on it. The thing is only one will show up in viewport/render. It only allows me to render one, the other one wont show up anywhere. How do i make it so i can render and see both maps?

Here is UV Map Node which can be used to access to uv maps

Also Attribute node with Vector output and vu map name can be used


Why does my final render image have white particles all over the lighting area? How can I get rid of those little white dots? I am using Blender 2.70a.

This is noise, which will happen in complex scenes without enough samples.
Aside from increasing the number of samples, here are some other things you can try:

Enable Multiple Importance Sample for the lamp in Properties > Object Data > Lamp:

Adjust the Clamp in Properties > Render > Sampling. Note that as of 2.70 indirect samples can be clamped separately from direct samples.

Increase the filter glossy option (also in Render > Light Paths) if you have rough glossy materials.

There are also some tricks you might be able to do with your materials, but it's hard to say what without looking at your file.

Also see these related questions:

How to avoid noisy renders in Cycles?

What is the Reason Cycles Creates Incorrectly Colored/Firefly Artifact Pixels?

What is multiple importance sample option

And the wiki page on reducing noise.


How to find the right keymap to change on addon registration? I tried to redefine a shortcut in my addon registration step, but I can't find which one to change. In the user one (bpy.context.window_manager.keyconfigs.user.keymaps['3D View'].keymap_items) there are 3 transform.translate keymaps.

How can my registration code recognise the one in transform modal map and rebind it to a custom key ? How to restore it in the unregister function ?

Are you after one of these, e.g. rotate?

>>> C.window_manager.keyconfigs.user.keymaps['Transform Modal Map'].keymap_items[5].propvalue
'ROTATE'

I'm pretty sure there's only one modal map for all transform operators (and not changable with python).

import bpy
wm = bpy.context.window_manager
keymap = [k for k in wm.keyconfigs.user.keymaps['Transform Modal Map'].keymap_items if k.type == 'G'] #k.propvalue=="TRANSLATE"]
modal_translate = keymap[0] if len(keymap) > 0 else None
print("\n", modal_translate)
for attr in dir(modal_translate):
    if not attr.startswith("_"):
        val = getattr(modal_translate, attr)
        if type(val) in {int, float, str, bool}:
            print("\t", attr, "=", val)

"""
 <bpy_struct, KeyMapItem("")>
         active = True
         alt = False
         any = False
         ctrl = False
         id = 5
         idname =
         is_user_defined = False
         is_user_modified = False
         key_modifier = NONE
         map_type = KEYBOARD
         name =
         oskey = False
         propvalue = TRANSLATE
         shift = False
         show_expanded = False
         type = G
         value = PRESS
"""

But note that you can't provide an operator name in modal maps. Only the predefined modal operations can be set (propvalue).


Why is Blender 2.8 slower than older versions? I've been designing a car in blender, and getting a good image or animation takes hours. Then I heard 2.8 was out and that it cuts render times down significantly. So I installed it and I found that it was really slow, wireframe mode was buggy and the new engine, Eevee, was better but rendering was worse, nearly impossible.
Is the problem with 2.8 or maybe my computer.
I've got a Mac mini, 2.3GHz Intel Core i5 with 8GB 1333MHz DDR3 RAM
My mate who has a Apple laptop has worse specs but can smoothly run it.

Eevee is used as a "quick preview" of sorts for your render. That way you don't have to wait for Cycles to sample before you can actually see your render in full detail; Eevee is real-time.

As for your main question, have you tried un-installing Blender altogether, and re-installing the latest version of 2.8?

If you have, it might be that you have 8GB of RAM and an i5 CPU. These are not the best performance-wise.


Does anyone know how to make a procedural random tile texture? I'm trying to make a tile texture using nodes only, but figure out a method of doing so. I want to make something like this:
I don't need to make the marble, just looking for the outlines of the tiles. If someone could please point me in the right direction that would be great! Thanks!

to achieve such a goal you have to split the question to smaller sub steps, for example:

Split a UV (or XY) coordinate to a grid by using the Fraction or Modulo Operator.
Modify each grid cell local UV with a random translation

To gain randomness there are some mathematical combinations that generate pseudo random behavior, but each input will always generate the same output. Therefore i convert a common shader function to a node group:

float N21(in vec2 p) {
    vec3 p3 = fract(vec3(p.xyx) * .1031);
    p3 += dot(p3, p3.yzx + 33.33);
    return fract((p3.x + p3.y) * p3.z);
}

Calculate the distance to the border of the modified cell to create a "mortar-mask"
Combine each cell by calculating "which cell is at this pixel" by using Greater or Less than, Multiply or Adding Values. It often helps by keeping all values in a 0 to 1 range.

In the end you get different masks and UV coordinates which can be colorized with normal image textures to get the marble look.
It may help to use a tool like Shadertoy (Example of my wall texture algorithm) to test a algorithm and convert it to node groups after you are satisfied with the result.
You could use my blend file as a library to link or attach the node groups. Try to modify some values to see the result.
Getting good looking procedural textures is heavy math!
Have fun and greetings from Germany!


How was Regency logo effect done? I'm trying to create a similar effect to this. And I found a nice tutorial with something similar. However, I wasn't able to add a text there. So it looks like the material setup is not using any volumetrics at all? Can you help to decipher this shader?

I get something pretty close:

I've created this mesh from the logo:

Then I've given it a pure white Emission shader for the bottom, and this node setup for the walls, which is basically a mix between an Emission of a multicolor ColorRamp and a Transparent, with a gradient along the Z axis, and before the Output, a Layer Weight to give it a pink emission on the edges:

If you want to animate, use an empty in the Texure Coordinate to mix the materials with a Transparent node:


Cannot apply scale to a multiuser Why can't I apply scale to an object that has been instanced?
I mean: just apply it as the same to all the instances, no?
I forget to apply scale, then instanced the object 20 times, position it well and rotate it, and then I discover that it needs a small retouch that needs to be done in scale 1,1,1.

Clear the scale of all the objects and scale in edit mode
Object's transformations are a powerful tool that allow animators to give variance to their meshes without affecting the basemesh itself and take advantage of instancings greater performance.
Usually intanced objects have different rotation, position and scale, so applying one of these would only mess up your scene. If you don't trust me , you can try duplicating the object, apllying the scale and use the resulting mesh data as input for the instanced object.
If, as in your case, you didn't change the scale of your instanced objects, you can simply Clear the scale of all the instances with ALT+S and then scale one of the object in edit mode back to the previous value.


is it possible to distort a voronoi texture like the wave textures distortion slider? I want to distort a voronoi texture in a similar way to how the wave texture's distortion feature does, but there isn't any kind of built in slider for this like there is with the wave texture.

Is it possible to distort voronoi in a similar fashion?

Use another texture to distort a texture. Depending on the value you affect you'll get different results:

Endless Fun!


BGE: Path follower wait in a specific point How can I modify the following .blend file in order for the cube to wait 10 seconds in "point.004". I don't want to use the sleep function.
Here is the file

You can simply switch to a different state, in which you do nothing but wait to switch back to the original state.

That could look like this:

def wait(self, seconds):
    self["clock"] = 0
    sen_prop = self.sensors["Property"]
    sen_prop.min = str(seconds)
    sen_prop.max = str(seconds + 1)
    self.state = 2

And then to use it:

wait(cont.owner, 10)

The function assumes the presence of a Timer property called "clock", and a property sensor (called "Property") in state 2, connected to a state actuator that switches back to the original state.

Here's a modified version of your demo, that shows this in action: track_to_point.blend


How do I restore the pivot point to the original pivot location? I am trying to animate a character pivoting on his leg to turn around. I've found that I can click at the center of his foot, use Ctrl+Alt+Shift+C and select Origin to 3D cursor, but after doing that and rotating the character, I want to restore the pivot point to where it originally was. The creator of the rig made it so the pivot point it as a local Y=0, but selecting Origin to Center of Mass surface/volume just moves the pivot up to his face.

Is there a way to move the pivot point, work with the new pivot point, and "undo" the pivot translation without actually undoing the work?

A characters origin in most cases should always be 0,0, rotate the character from different locations using the 3D cursor as the pivot point instead.


Transparent BSDF not working Why is this not transparent? The translucent BSDF works but not the transparent BSDF.

I'm using Cycles as a render engine. I've had this work in the past but for some reason it doesn't want to work anymore.

It looks like you're viewing this in "Look Dev" (also called "Material Preview") mode:

That uses the realtime Eevee shader, even if you've selected Cycles as your main rendering engine.  Click on the little sphere to the right of the selected one for "Rendered" view, and that will probably fix the problem.

You can use transparency in Eevee, too, but it requires an extra setting.  You'll need the following steps:

Temporarily switch your rendering engine to Eevee.
With the transparent object selected, click on its material tab and scroll down to "Settings".  You should see a "Blend mode" setting.  (This will only appear if you've switched your rendering engine to Eevee first.)
Change the "Blend mode" to "Alpha blend" (or "Alpha hash" or "Alpha clip" -- see the manual for details).
Now you can change your rendering engine back to Cycles.

The transparency should now work both in Look Dev ("Eevee") and Rendered ("Cycles").


Artifacts in Objects and meshes in viewport V2.81 Can anyone please tell me how to remove these artifacts in meshes and objects in the viewport. It happens with any mesh or object I place whether it's a low poly or high. This has never happened to me in other versions. I've tried all the render Engines but nothing changes. I'm sure is some setting some where but I don't know where it could possibly be. I have dual graphics card and a pretty high end computer. GeForce GTX 980 TI and Intel Core i7 6700K CPU 4.00GHZ if that matters

Thanks you!

Press N to open up the properties panel. Probably  you are near value 0.0001m, try to change it to 0.1m. Also try changing the end clip to 1000m.


How can I animate a linked armature? I am currently setting up a workflow in Blender where I want to use reference / linking instead of importing assets, so everybody working on the project will always have the latest assets and so on instead of having to constantly re-import.
Just as you would do in Maya.
My problem is that I have for example a character with rig as a fbx file that I save as a Blender file so I can link to the collection file. The problem is that it is not possible to animate the rig of the character. You can't go in to pose mode or import animation or mocap in to the rig.
Anyone have a solution to this?

Yes, Surely You can do that. After linking you have to make proxy of that linked object because linked object do not move and etc.
Go to Object->Relations->make proxy..
You can now do your work on the proxy of that object.


Increase object size/dimension across two axies, while keeping proportions I am wondering if there is some easy way of quickly scaling an object across two axies (X, Y) while keeping the proportions of the object intact. It's hard to describe so I'll try using some pictures.

This is the object I want to scale:

When I scale it along the X and Y axies, this is the result:

Now, what I want to achieve is the walls of the object being spread out more, giving it a larger center area, but retaining the proportions of the walls, like this:

I created the final picture by tediously having to scale all the individual edge loops to get it looking somewhat right. So I was wondering if there is a better way of achieving this, a good workflow? I hope the question is clear. Cheers.

Close, but only in this case

Select these vertices/edges (you can select one group of the 8, then do Shift+G --> select similar length:

Scale along the two axes that you want in bounding box pivot mode. Then switch to individual origins and scale in the opposite direction with only these vertices selected.

Python Script

It looks like you are only wanting to move each vertex a constant distance from the center. With normal scaling from a point p, a vertex 2 meters from p will move twice as much distance as a vertex 1 meter from p. This small snippet of Python code will not do this, but rather move each vertex a constant addend, not factor, of the radius.

Note: This script scales from the object's origin. Also, you should be in object mode to run it.

import bpy
import bmesh
from math import sqrt

scale = 2  # scale variable

# prepare bmesh
mesh = bpy.context.object.data
bm = bmesh.new()
bm.from_mesh(mesh)

for v in bm.verts:
    pos = v.co.xyz

    # r = sqrt(x^2 + y^2 + z^2)
    radius = sqrt(
        pow(pos.x, 2) +
        pow(pos.y, 2) +
        pow(pos.z, 2))

    a = (radius + scale) / radius

    # modify the two axes you want
    pos.x *= a
    pos.y *= a

    # apply new position
    v.co.xyz = pos

# make the bmesh the object's mesh
bm.to_mesh(mesh)
bm.free()


Only my sky texture is rendering Only my sky texture seems to be rendering everything else is not coming up. Below is an image of my composting page

I am not sure how to upload a blender file on here.(http://www.pasteall.org/blend/30729 please tell me if the link to the blend file works)

I'm not sure what you want, but it looks like you are using an alpha over node on two image without any transparency. This means only the image in the bottom input is used:

To do what I think you want to do, you need to render the sky as transparency. To do this, enable Transparent in render settings > Film:

You also seem to have deselected the layer with the model in the renderlayer. Ensure the layer you want is selected:

Once that's done, you should get a result like this (ignore the scale node, I needed that to scale my sky image to the render size)


Rendering image causes zoom in and texture turns the scene black I'm trying to apply texture to an object but when I render the image it does this:

When I switch to texture display it does this:

Can anyone explain what's happening and how to fix it?

Thanks!

Based off of these images, this is a simple matter of your outdoor scene being unlit.  In Blender 2.79, press spacebar type "add lamp", and choose "Sun" in the resulting menu.  Feel free to add other lights as appropriate.


How to blur video background? I was wondering how to blur a video background (a person is talking and you wish to remove the background)? Should the compositor be used?

Example video that you can use for testing: http://www.youtube.com/watch?v=zncqb-n3zMo

Example of blurred background image:

Yes, the compositor should be used. The most straightforward approach would probably be to animate a mask which you use to selectively blur (or remove) parts of the video.


Bumpmap from grayscale in 2.8 I purchased a model with source Blender files from TurboSquid and am attempting to make some changes to the textures. The .blend file uses the Cycles renderer, and the mesh has a "Principled BSDF" material with Base Color texture and Normal Map texture.

The normal map uses a color normal map file. I am trying to replace this with a grayscale bump map which I find easier to edit. Using the internal renderer in Blender 2.79 and earlier, I would add an Image texture slot, select the grayscale image, check the "Normal" influence box, and check the "RGB to intensity" checkbox to make the grayscale image suitable as a bump map.

In Blender 2.8 using Cycles and Principled BSDF, there doesn't seem to be an equivalent to the "RGB to intensity" checkbox. I can't figure out any way to achieve this. Additionally, the Principled BSDF seems to only be editable in the Properties editor, and I can't figure out any way to convert it to nodes (the "Use Nodes" button isn't showing).

How can I use a grayscale bump map instead of a color bump map in 2.8?

Whoops! Turns out the material was already using nodes, I was just looking in the wrong place. I'd been looking for the material nodes in the "Texture Node Editor" view, but where they were actually located was in the "Shader Editor" view. From there, I was able to follow the instructions from the first answer to this question: Bump Map applique in Blender 2.8?


how to make a realistic sugar cube material? I have been struggling with this for a while, and can't figure out help. I would like to make a realistic sugar cube material procedural, but so far I couldn't manage to get a satisfactory result, can you please help me improve it?
My render i know it looks like solid object not translucency or sss but I do applied both with an add noder can be seen in the file

I m seeking a solution to make shiny sprinkle looking small parts and translucency of main shader. I can't figure out how though.

thanks

EDIT- second render after @PGmath suggested note set up which helped a lot to get a much more better result, however I wish there was some way to reduce the noise , even with 300 samples there are plenty noise, is it normal?

Here's what i have come up with after a few minutes of playing around.

The entire shader is based on cell voronoi textures.  Voronoi works well for this kind of thing because it gives nice pixel-like results.  The actual geometry is just a massively subdivided cube with a displace modifier using a small voronoi texture.

Here are the shader nodes:

Click to enlarge

It's basically a huge mix of diffuse, gloss, SSS, glass, and translucency; with a small amount of volume scattering (to simulate the light bouncing around on the sugar grains inside the cube).  Everything uses a single voronoi texture as a normal map, each shader uses a different level of bump though.  It could definitely use some tweaking, but it's a pretty good start.

A note on speed/noise:

First of all you have to realize that things like rough gloss, SSS and translucency will all generate a good deal of noise, meaning you need more samples.  I would suggest at least 500 samples for rendering many of these.  That said, there are a couple things that you can do to cut render times, and less render time means you can afford more samples.

First of all you can probably get away with nixing the volumetrics.  Though accurate it isn't essential to use the volume scatter, this alone cut my render time almost in half.

Second you can add these nodes at the end:

What this is doing is only making it compute all those complicated shaders for glossy and camera rays (the add node works like a logical OR), for all other rays it just computes diffuse.  I use this trick all the time in indoor scenes especially.


use python script as animation node, and give it inputs I try to use a script with animation nodes, so i use the node "Script", this node has a button "New Input", but clicking it don't seem to do anything.

Is it any way i could use a script as an animation node, with some inputs like floating points, integers, strings, or even blender object?

Script node works the same way the other subprograms work in Animation Nodes:

Define a subprogram
Then invoke it from another part of the node tree

Let say we have:

a simple text block with some code in it. Here it calculates a string from a list of objects
a group of objects composed here by a cube, a plane, a circle (objects are grouped using CtrlG)

And we want to use the text value of the script to be the text displayed by the text object on the right:

Here in this script 'text' (a string or a text type in AN) will be the result and 'objects' (a list of objects) will be the input.

You can do the following:

Add an object group node. Set it to the objects group's name
Add a text object output node. Set it to the text object.

Add a subprogram as script.
Set its input and choose "object list" as type. Eventually rename the input variable value (here we need to rename it to 'objects').
Set its output and choose "text". Rename it if needed (here we want it to be named 'text').

Add the invoke subprogram node which corresponds to our subprogram's name ("my script" here but you can rename it) and connect input and output of this node.


I opened blender and when I went to scale my cube the module doesn't show up I opened up blender and went to scale my object and the module thing (completely forgot what it is called) doesn't show so I can't scale my object the way i want


Displacement for cube It sounded so simple to use displacement for a cube, but I found there were a lot of question about that.
I would like to model a cube with imperfect edges. So I made a base model like this:

It had beveled edges:

I sculpted a hires cube and created imperfections along the edges and the faces:

I generated a displacement based on the simple cube. Of course it had to have UVs. I used the default UV layout:

The beveled corners looks like this in the UV editor:

I generated displacement map with the default Blender Render engine (v2.79). And it seemed OK.

But the rendered image had some problem with the edges:

I tried to subdivide the base geometry but it did not solve the issue.

How can I fix that problem?

What would be the ideal workflow for this (stressed cube) task?

I would suggest baking the high poly mesh to a normal map in Cycles and plugging the generated image into the material for the low poly box using the node editor. There are many great tutorials on this workflow, including: https://youtu.be/BOYRCI-dtjU. It produces consistent results.

You may want to triangulate the low poly mesh first if you are going to export it to a game engine such as Unity, as they may calculate triangles differently.


How to combine row + columm in a pie box? I assumed with defining each layout type I could stack a line of row above a set of columns but it seems not to work. You can see that the column is at position 8 and not below the rows at position 2.

    box = pie.split().box().column()
    row = box.row()
    row.prop(mesh, "use_auto_smooth")
    row.prop(mesh, "auto_smooth_angle", text="Angle")
    box = pie.box()
    col = box.column()
    col.operator("mesh.faces_shade_smooth", text="Mesh Smooth")
    col.operator("mesh.faces_shade_flat", text="Mesh Flat")
    col.separator()
    col.operator("mesh.normals_make_consistent", text="Normals Outside").inside=False
    col.operator("mesh.flip_normals", text="Flip Normals")
    col.prop(mesh, "show_normal_face", text="Show Face Normal")
    col.prop(scene.tool_settings, "normal_size", text="Size")
    col.prop(view, "use_occlude_geometry", text="Hide Back Geometry")

The .split() is meaningless for pie menus, it has no effect. When you assign another item to the pie it will be at another position (so top).

To fix it you need to group everything inside a column and create the gap with .separator():

    # ...
    group = pie.column()

    box = group.box()
    row = box.row()
    row.prop(mesh, "use_auto_smooth")
    row.prop(mesh, "auto_smooth_angle", text="Angle")

    group.separator()

    box = group.box()
    box.operator("mesh.faces_shade_smooth", text="Mesh Smooth")
    box.operator("mesh.faces_shade_flat", text="Mesh Flat")
    box.separator()
    box.operator("mesh.normals_make_consistent", text="Normals Outside").inside=False
    # ...


How can I remove these "steps" between faces from the mesh? I'm having some troubles with this mesh in a project I've been assigned to. What can I do to make it smoother between these faces?

Object mode view:

Edit mode view:

Thanks!

Go into edit mode. Hold your cursor over one of the long edges and hit 'Ctrl-R' to add an edge loop.  See where that loop is added. If it stops at the edge of the triangle, that is OK.  Keep adding edge loops between the top and bottom 'curves.' If the edge loops stopped at the triangles, do the same to the right and left 'legs,' with the same number of edge loops added.  Go into 'point/vertex' mode, select two points to bridge, and press 'F' to bridge them with an edge. You will have to subdivide edges in the middle of the triangles in order to get movable geometry in those areas. Continue doing this for a while and massaging the position of those points in XYZ space until you are happy with the surface flow.  That massaging can be done in edit mode, or you can jump over to sculpt mode.


Rendering through python code import bpy
def makeMaterial(name, diffuse, specular, alpha):
  mat=bpy.data.materials.new(name)
  mat.diffuse_color = diffuse
  mat.diffuse_shader = 'LAMBERT'
  mat.diffuse_intensity = 1.0
  mat.specular_color = specular
  mat.specular_shader = 'COOKTORR'
  mat.specular_intensity = 0.5
  mat.alpha = alpha
  mat.ambient = 1
return mat

def setMaterial(ob, mat):
  me = ob.data
  me.materials.append(mat)

def run(origin):
  red = makeMaterial('Red', (1,0,0), (1,1,1), 1)
  blue = makeMaterial( 'Blue', (0,0,1), (0.5,0.5,0), 0.5)
  bpy.ops.mesh.primitive_plane_add(location = origin)
  setMaterial(bpy.context.object,red)
  bpy.ops.mesh.primitive_uv_sphere_add(location = origin)
  bpy.ops.transform.translate(value = (1,0,0))
  setMaterial(bpy.context.object,blue);
  ****bpy.ops.render.render()**// This code doesn't seem to execute**

if __name__=="__main__":
  run((0,0,0))

The above code when executed doesn't give me the render output. I have no idea why. I'm running the latest blender version. Any help would be welcome.

The makeMaterial function's return statement isn't indented correctly. The semicolon is syntactically allowed, but it's used to place multiple statements on a single line. 2 space indentation makes it less obvious where your indentation is incorrect, standard Python practice is 4 spaces.

This works:

import bpy
def makeMaterial(name, diffuse, specular, alpha):
  mat=bpy.data.materials.new(name)
  mat.diffuse_color = diffuse
  mat.diffuse_shader = 'LAMBERT'
  mat.diffuse_intensity = 1.0
  mat.specular_color = specular
  mat.specular_shader = 'COOKTORR'
  mat.specular_intensity = 0.5
  mat.alpha = alpha
  mat.ambient = 1
  return mat

def setMaterial(ob, mat):
  me = ob.data
  me.materials.append(mat)

def run(origin):
  red = makeMaterial('Red', (1,0,0), (1,1,1), 1)
  blue = makeMaterial( 'Blue', (0,0,1), (0.5,0.5,0), 0.5)
  bpy.ops.mesh.primitive_plane_add(location = origin)
  setMaterial(bpy.context.object, red)
  bpy.ops.mesh.primitive_uv_sphere_add(location = origin)
  bpy.ops.transform.translate(value = (1,0,0))
  setMaterial(bpy.context.object, blue);
  bpy.ops.render.render()

if __name__=="__main__":
  run((0,0,0))

Setting a material is a little bit easier too:

obj.active_material = bpy.data.materials['Blue']

this also works, reusing the makeMaterial function:

def run(origin):
    red = makeMaterial('Red', (1,0,0), (1,1,1), 1)
    blue = makeMaterial( 'Blue', (0,0,1), (0.5,0.5,0), 0.5)
    bpy.ops.mesh.primitive_plane_add(location = origin)
    bpy.context.object.active_material = red
    bpy.ops.mesh.primitive_uv_sphere_add(location = origin)
    bpy.ops.transform.translate(value = (1,0,0))
    bpy.context.object.active_material = blue
    bpy.ops.render.render()

if __name__=="__main__":
    run((0,0,0))

You won't see the objects or material changes until the render has completed.

Changing the render call to bpy.ops.render.render('INVOKE_DEFAULT'), will switch the current TextEditor window to a UV editor, and show the render progress. When we press the UI button for render.render() it does a few more things behind the scene, like pick where to display the render based on the setting in render.display_mode.

Which amounts to something like this:

def find_largest_3dview_and_switch():
    collected_areas = []
    for window in bpy.context.window_manager.windows:
        for area in window.screen.areas:
            if area.type == 'VIEW_3D':
                size = area.height * area.width
                collected_areas.append([size, area])

    # no 3dview found? use texeditor.
    if len(collected_areas) == 0:
        bpy.ops.render.render('INVOKE_DEFAULT')
        return

    # else use largest 3dview.
    for area in sorted(collected_areas, reverse=True):
        area[1].type = 'IMAGE_EDITOR'
        bpy.ops.render.render('INVOKE_AREA')
        return

Instead of calling the naked bpy.ops.render.render() you could call something like find_largest_3dview_and_switch() and let that decide how to call the render function. It would switch any available 3dview (or largest) to an 'IMAGE_EDITOR' and show the render progress.


How to get Mirrored Vector by Plane on Python How can I get mirrored vector(point) by Plane by using blender python modules?

Plane will be defined as

plane_normal : Vector
plane_position : Vector

I need to know function like

def get_mirrored_vector(point, plane_position, plane_normal):
    Do Something
    return mirrored_point

actually, It sounds more of mathematical problem but I thought there might be existing function on mathutils or other blender modules

You can use mathutils.geometry.intersect_line_plane to project the point onto the plane. This can be done by intersecting the line defined by the point and the point offset by the plane's normal vector with the plane:

proj = intersect_line_plane(point, point + plane_normal, plane_position, plane_normal)

Once you have the projected point you can use the vector from the original point to the projection to get the mirrored point.

from mathutils.geometry import intersect_line_plane

def get_mirrored_vector(point, plane_position, plane_normal):
    proj = intersect_line_plane(point, point + plane_normal, plane_position, plane_normal)
    mirrored_point = 2 * proj - point
    return mirrored_point


How do I select a square area on a cube and extrude it into the plane to add depth? How do I select a square area on a cube and extrude it into the plane to add depth? I need to make a hole in a cube but I can't affect the cube edges.

select the face click i and move to resize the face

then press e and move inside the cube


Override final pixel color in a Cycles/OSL shader? In the Renderman Shading Language, the whole purpose of a shader is to determine the final pixel color for each fragment. You have complete control over what the shader does and what the final color is. If you have a scene with a mountain covered in snow, with trees in the foreground and a lake, if you want the whole image to be completely red--like (255, 0, 0) red in every single pixel--you can do that by setting the final color at the end of each shader. It can completely disregard the lights, image textures and geometry.

Is this possible in Cycles or OSL? I realize that the REYES algorithm is a very different beast than OSL closures in a unidirectional path tracer. But, can I override the physically-based-ness of Cycles in a shader?

I do believe that RSL scripts might have more control over the final colour than OSL scripts do. From the OSL specification --

  A closure is an expression or function call that will be stored, along with necessary contextual information, to be evaluated at a later time.

What this means is the green node sockets that connect to the Material Output provide the render engine with a way to calculate the final colour not the specific colour to use in the final image. The steps of mixing reflections and lighting is performed by the renderer not by the OSL script.

For interest the first example that gandalf3 pointed you to can be achieved in OSL with --

shader flatcolour(color Colour = 0.8,
    float Strength = 1.0,
    output closure color BSDF = 0 )
{
    if(raytype("camera"))
        BSDF = (Strength * Colour) * emission();
    else
        BSDF = transparent();
}


Using the False Color look in combination with the CDL Node to work on Wide Dynamic Range scenes The color management for working in cycles can be enhanced to work with wide dynamic range scenes. The idea is to enable working with scenes containing values that exceed the conventional 0-1 range.

Instead of using the default sRGB display transform, the OCIO color management configuration and LUTS are replaced with those of the OCIO configuraition pack created by @troy_s

As part of the Looks available on the mentioned pack there is a False Color Basic look. It is designed to help visualize the intensity of scene referred values and how they will be converted for the final picture.

on the documentation is described as

  A false colour "heat map" of exposure.

To control the levels of those values, the use of the CDL node is proposed.

What is the workflow to use that tool, in combination with the ASC-CDL node?

The false color look presumes the use of the Wide Dynamic Range View.
Using the False Color with other views in colour management will result in incorrect transform values.

This Wide Dynamic View transform can use approximately six and a half stops above middle grey and map them into the display referred values of 0 to 1.
Here's the histogram of an example scene. It shows 10 gray patches that are darker than middle gray (0.18) and 7 brighter ones. Each patch from left to right is twice the intensity than the previous one, except for the one at the very right that is just one half stop brighter. Note at the bottom left of the image the red arrow, it indicates the area between 0-1 (values used for display referred images).

(click on the image to enlarge)
Once the Wide Dynamic Range View transform is enabled, that wide range of values gets remapped to fit into the display referred range of 0 to 1. Middle gray gets mapped to a 0.60 and scene referred 16.29 becomes 1 (white)

(click on the image to enlarge)
Enabling the False Colour Basic look will allow us to visualize the Scene Referred values within the range defined by the Wide Dynamic Range View.
The mid gray is represented by grey. Brightes values will be represented as red and white, Darkest ones will be black and purple.

The colour scheme is as follows:

Low Clipping = Black Scene Referred Linear value below 0.0001762728758
Ten Stops Down = Purple Scene Referred Linear value 0.0001762728758
Seven Stops Down = Blue Scene Referred Linear value 0.001404109349
Four Stops Down = Cyan Scene Referred Linear value 0.01124714399
Two Stops Down = Green Scene Referred Linear value 0.04456791864
Middle Grey = Gray Scene Referred Linear value 0.18009142
Two Stops Over = Green Scene Referred Linear value 0.7196344767
Four Stops Over = Yellow Scene Referred Linear value 2.883658483
Five and a half Stops Over = Red Scene Referred Linear value 8.150007644
High Clipping = White Scene Referred Linear value above 16.29174024

A possible workflow:
To do a grade on an image that uses a wide dynamic range, start by assessing your scene and think of what parts of the image should be the mid tones.
By moving the Power values on the CDL node try to make those areas fall close to gray or slightly into the green.
Using a power greater than 1 will make the midtones darker. Setting power values smaller than 1 will make the midtones brighter.
Then try to bring your Highlights within the range of the Wide Dynamic Range View
Use the slope for that. If you have areas in your scene that are white, you know that you have reached the clipping point (1) on the highlights, and you'll loose any detail on larger values. To bring those values down use smaller for the slope, and try to get your brightest highlights display as red with only a few white spots for the areas you want to preserve detail.
Quoting @troy_s When using False Colour, the goal is not to necessarily always bring all values into the display referred transform, but rather bring the reasonable values you expect into the view.
If you see black on the false color, you have reached the clipping point on the shadows. To preserve information on the shadows you want more purple and blue.
One thing to look for is that using small power values, might also affect your highlights and push them past the clipping point. If that is the case reduce the slope value to bring those values back.
NOTE: To expose the values and do precise numeric editing of any of the CDL controls click on the color box at the bottom of the big color circle to expose the RGB values used for the node's transform operations:

One more note The CDL node expects values in RGB. Even though there are some buttons for HSV and HEX, do not use them, the operations will not work as within the CDL specification.


Using 2 materials with different UVs on the same mesh I am attempting to use two materials on one connected mesh, each with a separate set of UVs. The reason is that I want a high res head, using 4K textures for the head alone and another set of 4K textures for the body.  I have made two UV sets, Head_UV and Body_UV, each has either the head or the body minimized.
I thought I would be able to apply one material to the head polys and one to the body polys and then make each Material use a different UV set by using the UV node in the editor.  I made two materials successfully and the UV nodes seem to feed the right Coordinates to the textures in each.
The problem is that so far I've only been able to get the mesh to either be all one material or the other.  I tried going into edit mode, selecting the polys of either the head or the body and then clicking Apply in the Material panel, but no matter what I do, the mesh is either all head material, or all body material. I'm trying to avoid splitting the mesh, so I don't have to worry about keeping the edge verts together during rigging.
Is it possible to do what I am trying to do? Sorry if I am missing something simple here. I'm pretty well versed in 3D, but relatively new to Blender and I am still figuring out how everything works in it.
Thanks for any advice that might help me.

Figured out what I was doing wrong. Rookie Mistake. I was just switching between the two materials in the materials panel using the popup at the bottom, but always leaving only a single material in the list.
I finally realized I needed to add both of the materials in the list and then assign to the specific polys.  Duh.
Thanks to everyone that looked, and to PGmath for responding.


How to texture crowded building I have made a crowd of buildings with the addon. Now I have to texture those buildings. The problem I have is to select each building, unwrap it and align the texture - huh, if it was a few 5-10 it would be ok. But it's more then 75 buildings! Is there any quick tip or addon available to wrap the texture on those buildings?

It depends on how detailed you want your textures.
Here are a few non accurate and fast methods:

Copy the material

You can try to determine 4-8 types of buildings (skyscrapers, living houses, hospitals, schools etc), make textures for them and just copy-pasted a resulting material to the other buildings, depending on their types.

Select all meshes, the last one set up with a random texture of a skyscraper.
Then go to materials tab in properties, then copy the texture to other selected meshes.
After that, for each mesh: tab to enter edit mode, then U -> Smart UV Project.

One big mesh

You can connect all meshes into one (A to select, Ctrl+J to join them), tab, then U -> Smart UV Project and make one big texture for them. After that, you can tune them after unwrapping to get better result (e.g. scale properly; set up roofs if you have them in your texture, etc). After that, you can separate meshes. In edit mode P -> by loose parts. And you will get several buildings with the same texture.

Can't provide a gif here.
The gif is too big, you can find it here.


Unwrap with Margins - Space out Islands I'm unwrapping a deformed cube, so I've set all edges to be seams. When I unwrap, I get 6 polygons as expected, but I'd like there to be a gap between them on the UV map. Currently, they are all touching each other.

The blender manual mentions a margin setting, but I cannot for the life of me find it, even after googling it, and the manual glossed over it.

Using 2.71

Once you've unwrapped your model, you can adjust the margin at the bottom of the Tool Shelf (T):


How can I view and edit modifier properties in the viewport in Blender 2.8? I've just recently started playing around with Blender 2.8 after years of modelling in different software packages. I've memorized the most used keyboard shortcuts and customized most of the stuff, so that I could work in a fullscreen mode in Blender all the time, but when I apply a modifier I always have to exit the full-screen mode and divert my attention to the properties panel on the right side of the screen which is really irritating and kinda takes me out of the super fast modelling flow.

So the question is, is it possible to view and edit your modifier properties in the viewport? I know that to apply modifiers you use  object.modifier_add command and I've hotkeyed it, but I really want to have the ability to edit applied modifiers without switching from the full-screen mode. Is it possible to make the modifier properties appear in the viewport without heavy coding? Maybe there's just a code line like object.modifier_add that will allow me to do it?

Hard ops modifier has this feature, called hops helper ctrl + ~:

The Speed Flow addon also has this feature:

https://www.youtube.com/watch?v=GoOZ-dn-si8

Unfortunately, it isn't updated for 2.8x yet. It takes some time to update addons for new version.


Moving a vertex makes only half of the connected faces move in the right way Sorry if the title doesn't accurately describe my problem, I am new to Stack Exchange. I need to make all the faces move up equally, but the ones circled in yellow only move up half way, while the ones in red are how I want them to move. This has happened to me multiple times with different models and I am trying to find a solution

Your problem comes down to changing the internal triangulation done by Blender, as described by Robin Betts here: flipping internal triangulation
In your particular case: select problematic faces, Ctrl + T to triangulate, change Quad Method to Fixed Alternate, select the new edges and dissolve them:

If you want to make a script automatically fixing such quads, this could be a starting point: Select concave quads


Is there a quick way to set a specific length for multiple edges? Blocks 1 and 2 have same distance but block 3 is bigger than 1 and 2:

Is there a quick way to set a specific distance between the verts\edges of those blocks?

I can't use Loop Tools because its 'Space' command makes edges the average distance between the selected edges. I need to SET an accurate distance between 3 blocks. For example, if block 1 has 0.50m and block 2 0.56m, after Loop Tools 'Space' command they will 0.53m and 0.53m. How can I set a specific distance, for example, 0.50m and 0.50m?

Scale Pivot Center to 3D Cursor, Snap Cursor to selection for your convenience

The scale pivot is set to cursor. Please see tooltip in the image above.  An axis is decided such as [X]
We are using the yellow mesh in edit mode for this example.
Two vertices are selected on axis extreme .. left in this example ... Snap Cursor to Selected Shift S Cursor to Selected.  Now we can scale to the leftmost and increment from the leftmost in this example. See the cursor in the image above. It can act as the [X] zero of our imaginary ruler.
Select the vertex loop 1 in question.  Scale vertices on X axis to 0.

sx0

Grab on axis. Specify exact dimension.

gx.75.  I used [.75] for this example.

Select the vertex loop 2 in question.  Scale vertices on X axis to 0.

sx0

Grab on axis. Specify exact dimension.

gx1.5.  [.75] increment in relation to previous vertex
loop for this example.  If I had again set the cursor to the previous vertex loop I could have used a [.75] value as in gx.75

In the image above the Mesh Display shows edge length confirming our actions.

Of course you can snap the cursor to a single vertex or collection of vertices when the need suits you.  The cursor is to serve at your pleasure.
The info window on top shows some actions.  Selection is not shown.
You may also investigate vertex slide.  Vertex Slide is not shown here.
Assuming rectilinear alignment on the global XYZ coordinate system.  When this is not the case Blender allows you to create an [orientation] so the displacement vector can point in any direction. Please inspect, verify and improve these suggestions.


Why I am seeing patches of diffirent transparency in this model with GLSL I am in GLSL mode and I have a material with transparency, my problem is that transparency is not displayed as it is in the final render of BI. Instead of a smooth result in transparency I get patches that are more transparent than other areas and I dont know why. This problem happens in texture and material mode.

and this is the blend file

Answering here as well for completeness sake.

The issue with occlusion is fixed in blender, but the issue with sections having more or less transparency is not

The cause is that faces of transparent objects in blender are drawn randomly. Due to depth culling, if a front face is rendered first, then all faces behind it will get culled. So randomly, some parts of the mesh will get the face closer to the view rendered first and have the most transparency, while other parts will get more than one face rendered and be more opaque.

To solve this we would need to render faces sorted from back to front, but to keep viewport performance fast in blender, we skip this currently.


where is the play button gone? I must have pressed a keyboard shortcut by mistake, but it's gone for a few days and I can't find any menu to put it back.
What should I do?
Thanks

The play animation button is not part of the Dope Sheet, it is in the Timeline. You've likely merged the Timeline area with the Dope Sheet by accident.
In order to add the timeline back:

Position your mouse courser between the Dope Sheet and the Properties. Right-click and select Horizontal Split.

Change the editor type to Timeline.


Objects with "solid" surfaces As with most 3D programs, one can intermix or overlap two 3D objects within the same space. I believe that SolidWorks allows one to treat objects as "solid" objects in that another object can not intersect or pass through the surface of the first object.
Is it possible, perhaps via "physics" to define the surface of a 3D object as "solid" or impenetrable by other objects? I perceive that would make things much easier in my projects.

Yes, but probably not the way you are thinking. You might try a “Floor” constraint, or some of the other constraints for that matter. Another option might be the snapping setting for transform tools. Setting it to Vertex -> closest may or may not yield desirable operation.
Physics, on the other hand, can definitely work with non uniform surfaces, but do not operate unless time is moving forward: they will likely be unhelpful while posing a stationary scene as you can transform two rigid bodies to intersect eachother if animation is not playing. Once it starts playing, of course, they will jump apart. But with blender time stopped, blender physics is stopped too.


Join subdivide and un-subdivide objects I have a problem about joining 2 objects. One of them is subdivided, the other is not... I have to join them together, so I'm able to 3D-print them both in one object, but when I join them together, the ''un-subdivide'' objects turns subdivided, and it's impossible to get the object back in the right shape, so I wanna know if it's possible to join two objects whitout changing their separate ''subdivide-value''?

It is possible by applying subdivision surface modifier on subdivided object. Then the one you're joining to it, won't be subdivided.


Use only audio when mixing compositing and sequencer in post processing I created a nice movie layout using only the Node editor. I added an mp3 audio file via the video sequence editor. Selected Both compositing and sequence in post processing under render properties and clicked the animation button and got a nice mp4 movie.

When I replace my mp3 file with a movie clip (containing both audio and video) in the video sequence editor and hide the movie by clicking the eye and set opacity to zero + moving the clip outside the start and end frame interval, I get an undesired result. The generated output movie does not contain any video, only audio.

Instead of hiding the movie clip in such an laborious way, just select it and delete it. Make sure you have only the movie clip selected, and nothing else.


How do I change velocity in the Fracture Modifier? How can I reduce the velocity and change the direction of the of particles in fracture modifier? I need to make it more realistic and remove a mess after collision. Could someone tell me where is the settings of object's physics motion?

We, the Fracture Modifier Team, are looking into creative ways to do in future features it but we don't have a workflow for that yet.

It also depends on what look you want to achieve exactly.
For example, the total mass of the fractured objects could be higher (so the shards have higher masses too).

Also you could play with gravity, friction, or some force fields to decelerate the shards.

Furthermore you could also try to adjust the time scale of the rigidbody simulation.


Moving bones in a specific manner with two fixed points I want to move 3 arms up and down with 2 arms anchored to the wall like in the drawing. I'm not able to get both arms fixed to the wall with use of bones,
one bone-end is no problem, all video's I have seen works with one end fixed, please help, thank you.

I used Georges his way to make it work, but I still have a little problem if the upperarm is shorter then the lowerarm, both the arm-empties move out of place and the triangle does not tilt. Am I doing it wrong?

You can use empties and constraints to solve this, here are the steps:

I'm using different visuals of empties for visual distinction, however you can choose any shape you prefer.

1- Create an empty in the center of the fixed arm (the selected sphere in the image below), this empty will control the movement.

2- Create an empty in the center of the left arm (the selected circle in the image below), parent it to the first empty by selecting it then the first empty (the sphere) in this order (the last selected object is the active object) and hit Ctrl + P, select Object.

3- Select the left arm, add a Copy Location constraint to the left arm, from the Constraint menu, set the Circle empty as a target, this will make the left arm move with the circle empty positioned at it's origin, we need the circle empty's location, but not it's rotation.

4- Move the origins of the upper and lower arms to the edges positioned at the fixed arm, to do this, select the upper arm, press Tab to enter Edit mode, select the edges at that end near the fixed arm, then press Shift + S, choose Cursor to Selected. This will position the 3D Cursor where we'll move the origin, next Tab to go back to Object mode, press Ctrl + Alt + Shift + C, choose Origin to 3D Cursor. Follow the same steps for the lower arm.

5- Create two empties, position them at the other ends of the upper and lower arms (the ends at the left arm, see the image below), these empties will be the axis of rotation of the upper and lower arms at the left arm, parent both empties to the left arm, to do that, see step 2.

6- Select the upper arm, add a Track To constraint, set the top empty as a target (see the image below), repeat the same step for the lower arm, use the bottom empty as a target.
This way, each arm will rotate on it's origin (which we set to the fixed arm end in step 4) in order to keep pointing at the empty it's tracking.

And that will be it, in order to do the movement, you only need to rotate the sphere empty on the X axis (in my case it is the X axis, which is the axis the arms will rotate on) , check the image below to see the results, you can assign a limit rotation constraint to the sphere empty, so it won't rotate past a certain limit on the X axis.

Summary: When you rotate the sphere empty, the circle empty will follow it's rotation since it's parented to it. The left arm will copy the circle empty's location due to the Copy Location constraint, but it will not rotate with it, this is why we used a constraint rather than just parenting it to the circle empty. The top and bottom empties will move with the left arm, since they are parented to it. The upper and lower arms will rotate on their origins, and they will keep pointing at the empties they are tracked to, which are the top and bottom empties.
P.S.: Naming the empties and objects will make it much easier to keep track of what you're doing. Giving distinctive shapes to empties will make it easier to control than using the same shape for all empties.
You can use the following link to download the file. Happy blending!

Edit: I managed to refine the process to make it shorter and using less steps, you can skip creating the top and bottom empties, instead add a Copy Rotation constraints to the upper and lower arms, and use the sphere empty as a target (the controller at the center of the fixed arm), this way you only need two empties, one in the center of the fixed arm (the controller), another at the center of the left arm (the circle empty), parent the circle empty to the controller, then add a Copy Location constraint to the left arm with the circle empty as a target, and the Copy Rotation constraint to both upper and lower arms with the sphere empty as a target. This method is shorter and better, because Track To constraint (and even Damped Track constraint) have their limitations when rotating to an angle more than 180 degrees, even when using Quaternion instead of Euler. Here's the edited file:


Blender 2.80 hair dynamics. As soon as I advance a few frames hair goes haywire When I turn on hair dynamics for my fur particles, they go haywire as soon as I advance a few frames. Sorry if I'm missing something obvious, I'm not very experienced in blender. I wasn't able to find any answers online, so if anyone has any insight it would be much appreciated. I am using cycles if that matters.
Frame 2 of the model

Frame 4 of the model

Apply scale and transform
Set origin to geometry
Before tweaking any settings run hair simulation, then go back to frame 1 and assign vertex group and other values according to your character
Also try reducing segments in 'Emission'


Invert vertex selection with Python I have a few vertices selected, obviously in edit mode.

Running bpy.ops.info.select_all(action='INVERT')  in the Python console gives me a RuntimeError: Operator bpy.ops.info.select_all.poll() failed, context is incorrect though ?
That's exactly the command the GUI shows me when hovering Select > Invert, and doing it though the GUI works of course.

Found the solution: The labeling in Blender is apparently wrong. The right command is bpy.ops.mesh.select_all(action='INVERT')


When using a baked normal map it is inverted on half my model I am having a problem when baking and then using a normal map.

I have a high res and low res model and am using the "Bake selected to active" feature.

I am using BI to bake the image as I cannot seem to get cycles bake to work. I am then applying the normal map in Cycles through a Normal Map node plugged into a Diffuse.

As you can see, the baked image itself looks OK and symmetrical. When I use it, however, half my model seems to have the normals inverted. I previously had a mirror modifier while modelling and I suspect that is involved, but it was applied before I started the bake. I also checked all my normals on the model and they face the right way.

I can't figure it out and its driving me mad! Help!

_
_

EDIT: On further investigation I can see that the problem lies with my baked normal map. If you look closely at it you can see that it is not baking correctly as it is uneven. So my bake is wrong, I just don't know why.

If you made the UV's while the mirror modifier was active then the UV's for both sides should be overlapped, the bake is only correct for one half of the model.

If you hover over the UVImage Editor and press Ctrl+P (Unpack), you should end up with distinct islands for all the geometry.

Now you should re-bake.


Can blender create a topology of a face from real camera? (photogrammetry) If you record your face on film, then use blender to create a geometry from it with its aligning topology. Is that possible? Using camera tracking? How?

Blender can't do this (easily), but it is possible to do this with OpenSource Photogrammetry software  (PPT and MeshLab) outside of Blender, then import the resulting model, see:

Example, blog posts.

http://arc-team-open-research.blogspot.com.au/2012/09/converting-pictures-into-3d-mesh-with.html
http://arc-team-open-research.blogspot.com.au/2013/04/scanning-skulls-to-forensics-with-ppt.html

Tools:

http://opensourcephotogrammetry.blogspot.com.au
http://meshlab.sourceforge.net

Blender-Artists Thread (~2012):

http://blenderartists.org/forum/showthread.php?280309-opensource-3D-scaning-with-one-camera-blender-ppt-meshlab


How do i make the camera in a scene look "low quality"? I was wonder how I could make the camera in my scene look "low quality". Think like potato cameras from ghost videos. I'm currently using the noise from cycles, but someone said it would look better with something done in the composition. I used 10 samples so it would all render faster, so the noise hid all of that. Is there a way I could make everything look "low quality" with denoising and keeping the samples as low as possible for render times?
If you need anymore info or anything added let me know.
I want to add fuzz and some grain I guess.

There's many ways to achieve a low quality camera look, and as already covered in the comments, the most convenient ways to do so are low quality settings of the render: low resolution, low FPS if it's an animation, low sample amount, high compression of the image, resigning from filmic color space, and choosing many other sub-optimal or outright incorrect settings.
The actual challenge is to simulate a low quality camera realistically.
Motion blur
The easiest aspect to explain is exposure time: when you render an image in Blender, even in an animation, for each frame, all objects stay perfectly still and are rendered as such. Therefore even a flying helicopter's propeller will look still on a single image. Meanwhile, no camera is stopping the time while taking the picture, and most cameras will produce a visible motion blur:

You can enable Motion Blur in Render Properties tab, but contrary to the advises in the first paragraph, it will increase the render time.
Aliasing
Somewhat similarly, a digital camera has a sensor, which doesn't react to every single photon hitting it, but rather has a well for each subpixel, which collects photons, generating electrons inside, and then an electronic circuit calculates the subpixel value based on the charge density. This produces an averaged value of brightness for a given region. Meanwhile Cycles renderer works in an opposite way: not only it shoots a light ray outwards from the camera, but, more importantly, it's a single ray. A real camera recording a checkerboard moving away, will eventually perceive it as gray, as light coming from both black and white squares will hit the same well on the sensor.

I was able to render it with Cycles, because the default number of samples was enough to average the colors. However, watch what happens if I render with just 1 sample for each pixel:

The takeaway here is that the noise in Cycles is not the same as noise in a cheap camera - you won't get some artifacts like fireflies in a real camera. If you want to get a realistic grain effect, you have to use a high sample count and wastefully add the grain in post-processing. As far as I understand, the grain is a result of dithering data into a limited color space and then increasing the contrast, which moves these colors apart.


Finger getting twisted with rotation All the fingers in the hand works perfectly, but the middle finger twist in the middle when rotate the bone on Y, the weight paint is correct, but still twists.

You should align the orientation of your bones in Edit mode with some CtrlR + angle value (I don't know why, technically, it makes it bug when non-aligned though):


Low poly to high poly, or high poly to low poly? Which is easiest to do—make a high poly model and then turn it into a low poly one? Or the other way around?

I'ts going to very much depend upon the model. In some cases, adding geometry will be easier, in other cases, removing geometry will be easier. There's not really a "one size fits all" answer to the question. If you're asking about a specific model, edit your question, and provide links to images or blend files.


Apply transforms to all other keyframes I have the following problem: I have modeled a simple robot consisting of an armature with some bones and some CAD parts parented to the bones. During modelling, I applied several transforms to obtain the desired shapes. Now I just realized that all these transforms have only been applied to one specific keyframe somewhere in the timeline. For all other keyframes, all transforms are lost.

Is it possible to delete the timeline except that one frame or to copy the keyframe to all other keyframes?

Any help is much appreciated!

In the screenshot you have multiple object selected.
You can select all keys in a frame when you select only the armature (Armature.001), then there will be a yellow dot in the Dope Sheet Summary line.

Right click ( RMB) to select this keyframe
⎈ CtrlC
Select the destination frame ( LMB)
⎈ CtrlV (paste)

Or in one step:

Select keyframe ( RMB)
Duplicate and move with ⇧ ShiftD


Making a ring without extra squares So I'm very new to blender and I'm trying to work on learning more complex shapes, and I want to make a ring (like the letter O not like a wedding ring) and I just learned how to make semi circles, and I want to make a full ring. The way I'm doing this now is by making a plane the length of my radius, and slicing off the portion I want to use to make the ring, and using spin to make it circular, so I have it circular but I'm not sure how to do this without the squares I used to get the radius. So either how do I remove these squares, or what is a better way to do this?

Here is a picture showing the leftover squares I'm talking about, thanks for any help

Add a circle (make sure fill is set to nothing)

Enter edit mode.

Press E to extrude. Do not move the mouse and press enter.

Press S to scale and move the mouse inwards to set the inner radius.


Shader-based fog without using volumetrics I need to create a scene with fog, i.e. distant elements faded out towards gray. I can't afford volumetric fog, because the renders would be way too slow. I'd like to just use a simple camera-to-object distance shader to interp the color toward mid-gray. I know that's not physically accurate but I think it'll be good enough for my needs.
I've seen how to do it with a depth pass and use that in the compositor, but I'm wondering if it can be done with a "global shader" right in the renderer?
I'm using Cycles in Blender 2.93, recent nightly.

You can use Ray Length (as suggested by @PGmath) to mix in a 'Fog Shader'.

Use Light Path > Ray Length and Math > Divide to control the spread
Use the result to mix your object's material with a 'Fog Shader'
Add a background plane with the same 'Fog Shader' (so they nicely blend together)

For the 'Fog Shader' set Specular = 0 (to have zero reflectivity)


Simulate Individual Face Extrusion Via User Input In Python When you do an alt+e and select individual faces for extrusion in the Blender GUI, you can then either move your mouse around to move the extrusion up or down a path defined by the orientation of the normal of the source face.

Alternatively, I can hit alt+e, select individual faces and then on the number pad proceed to type in the exact value by which I would like the face to be extruded down this path, pressing RETURN to apply the transformation. I can then tap "s" and type a value by which I would like to scale the extruded face by a value I can type in, then again press RETURN to apply the transformation.

Now being a total blender python API/python noob, I'm wondering how I can accomplish this same result purely in python. I've already got a script that will iterate over all objects in my scene, select the face I would like extruded.... but now I need to know how I can extrude that individual face along the path of the normal (just like it would in the GUI) and of course scale it after, just as described above. Any help pointing me in the right direction would be greatly appreciated.

The referenced question and answer(s) didn't actually apply because I didn't want or need bmesh and a massive script just to do this. I found a 1 liner that does exactly what I wanted.

bpy.ops.mesh.extrude_faces_move(
    MESH_OT_extrude_faces_indiv={"mirror":True},
    TRANSFORM_OT_shrink_fatten={"value":-0.9,
    "mirror":False,
    "proportional":'DISABLED',
    "proportional_edit_falloff":'SMOOTH',
    "proportional_size":1,
    "snap":False,
    "snap_target":'CLOSEST',
    "snap_point":(0, 0, 0),
    "snap_align":False,
    "snap_normal":(0, 0, 0),
    "release_confirm":False})

bpy.ops.mesh.extrude_faces_move(MESH_OT_extrude_faces_indiv={"mirror":True}, TRANSFORM_OT_shrink_fatten={"value":-0.9, "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "release_confirm":False})

TRANSFORM_OT_shrink_fatten={"value":-0.9... is where you would set the value of the extrusion (-0.9 in this case).


Python script not working beyond a certain line in the code I am pretty new to coding in blender, just two days since I started.

I am trying to create a code that will align the local axis of an object to the local axis of another without changing its mesh alignment. So to do this I align the object in Object Mode and then go to edit mode to invert the changes.

I created a basic code but it seems to not work after a certain line.

import bpy
from mathutils import Matrix
from math import pi

class OrientLocalAxis(bpy.types.Panel):
    """Orients Local Axis to another Object without changing current
Structual view"""
    bl_label = "Orient Local Axis to object"
    bl_idname = "OBJECT_PT_OLAxis"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        layout.prop_search(scene, "Epty", scene, "objects")

        row = layout.row()
        row.operator("object.align_local_axis")

def main(context):

    #-------------Obj = Object we want to change----------------------------
    #------------TObj = Target Object we want to Align to-------------------

    scene = bpy.context.scene
    TObj = scene.objects[scene.Epty]

    TObjIRE = TObj.rotation_euler
    TObjIRM = TObjIRE.to_matrix()

    ObjIRE = bpy.context.active_object.rotation_euler
    ObjPos = bpy.context.active_object.location
    # We will need this later for rotating the mesh
    ObjIRM = ObjIRE.to_matrix()

    #We Find out the Rotation Matrix to transform TObj to Obj---------------
    # We will use this transform the mesh back to its original orientation--

    ITM = ObjIRM  #ITM is for Inverse Transformation Matrix

    # We set the orientation of the Object to the target

    bpy.context.active_object.rotation_euler = TObjIRE

    #Now we go to Edit Mode and select all Vertices

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

Doesn't seem to do anything after this point

    mesh = bmesh.from_edit_mesh(bpy.context.active_object.data)

    for v in mesh.verts: # Not sure if selection is needed Check Later
        v.select = True

    bpy.context.scene.objects.active = bpy.context.scene.objects.active

    bmesh.ops.rotate(mesh, cent=(0,1,0), matrix=TOBjIRM, verts=mesh.verts)

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

# Operator Definition

class AlignLocalAxis(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_local_axis"
    bl_label = "Align Local Axis"

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

 #--------------------------------------------------------------------------
def register():
    bpy.utils.register_class(AlignLocalAxis)
    bpy.utils.register_module(__name__)
    bpy.types.Scene.Epty = bpy.props.StringProperty()

def unregister():
    bpy.utils.unregister_class(AlignLocalAxis)
    bpy.utils.unregister_module(__name__)
    del bpy.types.Object.Epty

if __name__ == "__main__":
    register()

So the code doesn't run after it goes to edit mode, essentially from the for loop on wards. It doesn't select all the vertices or rotate them.
I copied the code from the 'for loop' on wards till  'Object mode' and ran it as a separate code and it works just fine.

ps: I am not concerned about whether the code will serve my purpose or not, I would prefer fixing it myself. Thank you.

I have copy-pasted the code in blender and with few changes, same variable wrong names like TObjIRM and TOBjIRM for the same var, include import bmesh at beginning,... the code works now without errors.
This is what you want? ;)

import bpy, bmesh
from mathutils import Matrix
from math import pi

class OrientLocalAxis(bpy.types.Panel):
    """Orients Local Axis to another Object without changing current
Structual view"""
    bl_label = "Orient Local Axis to object"
    bl_idname = "OBJECT_PT_OLAxis"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        row = layout.row()
        row.label(text="Active object is: " + obj.name)
        layout.prop_search(scene, "Epty", scene, "objects")

        row = layout.row()
        row.operator("object.align_local_axis")

def main(context):

    #-------------Obj = Object we want to change----------------------------
    #------------TObj = Target Object we want to Align to-------------------

    scene = bpy.context.scene
    TObj = scene.objects[scene.Epty]

    TObjIRE = TObj.rotation_euler
    TObjIRM = TObjIRE.to_matrix()

    ObjIRE = bpy.context.active_object.rotation_euler
    ObjPos = bpy.context.active_object.location
    # We will need this later for rotating the mesh
    ObjIRM = ObjIRE.to_matrix()

    #We Find out the Rotation Matrix to transform TObj to Obj---------------
    # We will use this transform the mesh back to its original orientation--

    ITM = ObjIRM  #ITM is for Inverse Transformation Matrix

    # We set the orientation of the Object to the target

    bpy.context.active_object.rotation_euler = TObjIRE

    #Now we go to Edit Mode and select all Vertices

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

    mesh = bmesh.from_edit_mesh(bpy.context.active_object.data)

    for v in mesh.verts: # Not sure if selection is needed Check Later
        v.select = True

    bpy.context.scene.objects.active = bpy.context.scene.objects.active

    bmesh.ops.rotate(mesh, cent=(0,1,0), matrix=TObjIRM, verts=mesh.verts)

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

# Operator Definition

class AlignLocalAxis(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_local_axis"
    bl_label = "Align Local Axis"

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

 #--------------------------------------------------------------------------
def register():
    bpy.utils.register_class(AlignLocalAxis)
    bpy.utils.register_module(__name__)
    bpy.types.Scene.Epty = bpy.props.StringProperty()

if __name__ == "__main__":
    register()


Cycles replacement node for the BI "Lamp Data" node I need to convert a node system made in blender internal render to cycles but I can't find a node that would replace the "Lamp Data" node.

Blender internal node setup.

It is not currently possible to get the incoming light vectors for materials in Cycles with nodes. This would be a lot more complex than in BI, because of all the light bouncing around in the scene - I suspect(just a guess) this is the reason this data is not exposed via nodes. In Cycles it should only be possible to achieve these kinds of results with OSL that is not supported by GPU rendering so I don't know much about it. I suppose it would require a separate question as well if you were interested to pursue this further.


Enable displaying of key strokes without casting As far as I know you can enable displaying key strokes while you screencast for tutorials.

Is there a way to archive this without casting? I would like to have visual feedback which combos I pressed to make remembering easier.

Cheers!

You want to download and install the   screen cast key status tool plugin. It has been removed from the Blender download package.

It displays the keys when enabled independently from recording a screencast or normal interaction.


different colors for connected edges in UV editor Is it possible to to see what edges/verts are connected on the 3d model inside the uv editor by render them in different colors? This would be so great.

In the UV/Image Editor Header, select Shared Vertex in the Sticky Selection Mode.

Set the Edge selection mode.

Select an edge to highlight the shared edge (and vertices)


How to make Cubic Stripes uv mapping How can I make this striped pattern with wave texture in Blender?

I'm don't think the wave texture is the best fit.

You could however use math nodes to recreate the effect by transforming the x and y coordinates.


Two materials overlapping each other in a weird way Situation:

I have two meshes with transparent materials.
Meshes share oneborder, however, they both have their own vertices, as they were
created from a script.
All faces and all vertices on both meshes have the same positions.

Problem:

Faces of both meshes overlap each other in a weird, uneven way.
I understand that there might be a problem with vertex precision.
I cannot join both meshes as I need to animate them separately at
some point.

Question:
Is there anyone out there who has a clue on how to get rid of this wierd overlapping of both materials?   Is there anything that can be done with it node-wise or material-wise? I have dozens of those meshes. Moving each face a nanometer away from each other would take weeks.

You say that moving each face individually would take too long, but you can avoid that problem by moving them all at once:

Select all your objects in Object Mode.

Press Tab to enter Edit Mode and A to select all faces.

Press AltS to perform shrink/fatten, which moves faces along their normals.

Type a small, negative value like -0.01 and press Enter to confirm. (Depending on the details of your geometry, you may also want to try the Offset Even option in the operator panel, which could produce slightly nicer results.)

Now all your objects will be very slightly smaller, avoiding the overlapping faces.


set a property via its data path stored in a string I have a property called A

I have another property called ADP that stores the data path of A as a string

How can I use the string data path to set property A?

I could add "= myvar" to the end of the string and use exec on the new string but that's overkill I think.

To set a property you only have as a string, you can use Python's setattr()

import bpy
obj = bpy.context.object

# regular method
obj.location = 1, 2, 3

# using setattr
setattr(obj, "location", (1, 2, 3))

Notice setattr takes a string, so this can come from anywhere you like.

For simple properties, this works fine, however, if you want to set a path with multiple elements this becomes more complicated.

eg: modifiers["Subsurf"].levels

In this case there isn't such a clean solution.

There is a blender specific function called bpy_struct.path_resolve. Internally this uses the same method which is used to resolve FCurve and driver paths.

You could define a function for setting the attribute that combines path_resolve and setattr:

def value_set(obj, path, value):

    if "." in path:
        # gives us: ('modifiers["Subsurf"]', 'levels')
        path_prop, path_attr = path.rsplit(".", 1)

        # same as: prop = obj.modifiers["Subsurf"]
        prop = obj.path_resolve(path_prop)
    else:
        prop = obj
        # single attribute such as name, location... etc
        path_attr = path

    # same as: prop.levels = value
    setattr(prop, path_attr, value)

# example usage (requires path_resolve)
value_set(bpy.context.object, 'modifiers["Subsurf"].levels', 2)

# example usage (uses simple setattr)
value_set(bpy.context.object, 'location', (1, 2, 3))

However this is a bit involved, you could just do...

exec("obj" + path + " = value")

Though using exec is not ideal, especially if you don't know where the inputs come from. (security considerations)

Note: even though the example uses bpy.context.object you could use a Scene, Group, Mesh, Modifier... any Blender data really.


Camera Problem and Moving Mesh I am in the process of building this High Rise, and have come across this problem. This first screenshot is just after finishing making the exterior of the building, and before I click 0 to jump into Camera View. The selected object is my camera. No problems yet!

This next screenshot is after pressing 0 and panning out of somehow being zoomed into the interior (clearly the camera is outside and is not even facing the interior...) and now one of the sides of my building is missing?! I also tried messing with the camera's Focal Length which didn't work, and the outsides of the camera view aren't blacked out like they're supposed to be.

And third, the missing wall mesh somehow ended up floating in space all the way over there...

Any idea what the problem here is? Thanks so much!

Your primary camera wasn't your selected. And somehow, when you press 0, your wall become the camera, then you enter Camera Flying mode, it move the wall, not the camera. So, to fix it when you select your camera.
- Press CTRL + Numpad 0 instead press Numpad 0.