When should I use Quaternion (WXYZ) and how should I handle the W Quaternion Rotation?

The use of Quaternion rotation is to avoid the gimbal lock problem with the Euler method. Usually if your object only needs to rotate around one axis or two Euler would do the job. Like a wheel or a wobbling top. But when you have to animate a fighter jet that rotate all around your scene you may encounter the gimbal lock. To understand gimbal lock there is a great youtube video here.

https://www.youtube.com/watch?v=zc8b2Jo7mno&ebc=ANyPxKotx5yqp4L-5ns71ub2mroVOiQurhhNglI3Clsz0Ejev6D5cQa628-MDJhSkEYeGL-nj35Kec7Ka1upJrS9ZpoMMMaq_w

There are also gotchas in quaternions, it tends to solve towards the shorter path. Meaning if you were trying to rotate say 270 degree clockwise, quaternions would solve by rotating 90 degree counter clockwise. So to solve this correctly you need to add a in between keyframe to use quaternions properly. As described in this video here.

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

DEMYSTIFYING W
WXYZ are interdependent. Therefore we should never modify them in their values entry box individually. To modify the object rotation simply use R and specify the axis you would like to rotate the object in. With that Blender will translate the rotation on screen into quaternions value if quaternions is the selected solving method.

ARMATURE & BONES
When you are working with armature or bones. In edit mode you will firstly be positioning those bones with Euler. When you switch to pose mode and actually animating, Quaternions are used for solving the transformation of your character's limbs. Often in a rig we use IK bones (Inverse Kinematics), and the IK will drive the armature and in turn quarternion will solve the positions of the bone. We will have no need to edit any of the WXYZ values manually.

EXTRA NOTE
Quaternions values are not in degree. Euler uses degree as it's unit. The math behind quaternions are much more complex the 4th dimension (W) allow quaternions method to avoid the gimbal lock of the 3 dimensions that Euler is limited to.


How do I remove UV images in Blender, and what do they do?

You can remove images(they are just simple images, not "UV images", you usually create a "UV Map" and it's not an image, but a set of coordinates in a 2 dimensional UV space for your model's vertices that are in 3 dimensional XYZ space so you can use a 2D image to color or texture a 3D model) in the Outliner set to Blender File mode by right-clicking and choosing Delete:

Or by shift + left-clicking on the x in the Image Editor after you have opened the image. This will not completely delete it straight away, but will clear it's users meaning the image will not be saved with the file and will be gone the next time you open the file. The 0 before the name of the image indicates that it has no users and will not be saved. If you use the image somewhere else, like for example as a texture in some material, this action will also break things there as you will have a missing picture there.

What are the purposes of these images[?]

You are responsible for coming up with the purpose of the two image you have created, because you chose to create them. They can be used as textures, masks, you can paint on them or bake some material properties to them or do whatever you want with them.
The Render Result is meant to store current render when you want to render your scene. You should not worry about its existence too much and it will get created when you render something even if you delete it.


UV stretching when subdividing - how to avoid

A simpler example to see what is happening here:

Now we add a loop cut on the conic part:

And if the loop cuts were on the cylinder part:

In both cases, the proportions are respected in the mesh point of view. But the vertices which are displaced by the subsurface modifier are not at the same position in the UV map. So, they are not kept in place (relatively) the same way.

... a bit hard to explain... but I hope this example is enough to get the point.

In your model, cuts are mainly on the equivalent of the cylinder part here, plus, some are in the cylinder part and others in the conic part (the seam is mixed). So you have distortions.


This is called pinching. This happens because you have single vertex with a lot of edges.

You can improve it by deleting the vertex and adding a n-gon in the middle.

This is not ideal solution in every case because there is the n-gon in the middle but for rendering it works quite well.


How can I get all materials which are using an ambient occlusion node?

Not all materials have an associated node_tree. This is only present where the 'use_nodes' checkbox has been used as this creates the node tree.
Your problem is that one or more material does not have a node_tree. The solution is to include a test before the ntree.nodes.get() to first check that there is actually an attribute 'nodes' - and to simply skip that material if none is found:
import bpy

# Run through all materials of the current blend file
for mat in bpy.data.materials:
    # If the material has a node tree
    if mat.node_tree:
        # Run through all nodes
        for node in mat.node_tree.nodes:
            # If the node type is Ambient Occlusion
            if node.type == 'AMBIENT_OCCLUSION':
                # Print the name of the material
                print("Ambient Occlusion Node found in:", mat.name)


How to connect to select/deselect event?

I'm not going to claim this is the correct way; but it will work
import bpy

@bpy.app.handlers.persistent
def _depsgraph_update(scene):
    print(bpy.context.selected_objects)

bpy.app.handlers.depsgraph_update_post.append(_depsgraph_update)
# bpy.app.handlers.depsgraph_update_post.remove(_depsgraph_update)

The other thing you can try; is listening for the active object changing - on the basis that you can't select without changing the active object.  Note you won't get a change notification on undo
bpy.msgbus.subscribe_rna(
     key=(bpy.types.LayerObjects, "active"),
     owner=object(),
     args=tuple(),
     notify=callback,
)


Trouble controlling where to add Faces on my model

The problem is that you're creating one big ngon with that mesh. Blender doesn't work well with ngons and wants tris (three-sided faces) or more preferably, quads (four-sided faces).

Break your mesh down into smaller segments that accommodate Blender's needs. If I were you, I'd just make one big plane and then subdivide it enough that you can form the same mesh by angling rows and columns of vertices to get your desired pattern, and then delete the faces that you don't want. Your mesh pattern is repetitive, so you only really need to create one section of it and then duplicate it as much as you need and merge them all together into a larger mesh.

Here's an example I threw together for you. You can bevel the angled edges to make them more rounded before you duplicate and merge the meshes together into a larger mesh.

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


How to reference a particular Panel used in the ui?

You can get the panel in a single operation but not by label, since panels labels aren't necessarily unique, you should use the panel name.

eg:

cls = getattr(bpy.types, "VIEW3D_PT_view3d_display")

Note that bpy_types.TypeMap is part of Blenders internal logic which you're not meant to touch! :)


Cycles: How can I make a plane both emmissive and transparent?

Go in the Properties panel > Object > Cycles Settings, and disable Camera and Shadow. And if you don't want to see it in Solid mode either, go in the Properties panel > Object > Display > Maximum Draw Type > Wire.


Make sure you select the UV map you want to use with your painted texture.


Render a "long" video (> 2 mins) in one step, without running out of memory

The short answer is: I was using an old version of Blender with a memory leak (thanks @3pointedit for pointing me in the right direction!).

I just installed 2.78c, and this version does not have the problem any more.

Just a note that as of March 2017, 2.76b was the latest version in the Linux Mint repository (and probably also in the Ubuntu repository).


The Import BrushSet addon is not an official addon that is included with blender releases. While it may be added to future versions, you will need to download and install it manually until then.

The BrushSet addon can be found in the Blender Add-ons Contrib repo and as it is a single file, you can easily download the one file and install it. Save the file from this link, click the Install Add-On button and select the downloaded file.


So apparently I had bsurfases added twice. I just had to delete one of the installations. Now everything works fine


Your mix shader mix input should be feeded by alpha output of the texture, not from the color output (which gives you 0.0 for black and 0.0 for transparency).

Enable node wrangler addon and Ctrl click on nodes to see their output and check the nodes workflow.


How could i make a cartoon flower type of shape

After some quick experimenting, I actually figured out how to get this outcome. If you put an rgb curves node after the ping-pong node (I also got rid of the add and divide nodes because i realised that they weren't necessary) and give the rgb curve a u shape, you can get this outcome. The less than node controls the size and changing the height of the u shape changes the height of the bumps


A solution is:

Select the edge you want your vertex to slide and press Shift+NumPad7 to snap view to selected;
Then press Ctrl+Alt+Spacebar to create new transform orientation;
Choose it from available transform orientations in the 3d Viewport header (or press Alt+Space) Optionally give it a meaningful name chck USE VIEW;
Move the vertex with G using the new transform orientation instead of Local or Global etc. Snap will work as usual.


To get rid of the background color, you can set up your nodes like this:

This will work if you have an alpha channel in your png. Otherwise, you can do something like this to remove the black from the image:

This will make everything with a value of less than 0.001 (in other words black) transparent. If you are using eevee, you will have to change the blend mode to alpha blend and uncheck "Show Backface" in the material settings to make things actually transparent:

Hope this helps!


UV unwrapping the exterior of a hollow cylinder

Apply your Solidify modifier so that the inner side will is different, now you are able to give it another texture.


Blender Smoke Domain Cube casts a shadow

Enable Shadow > Receive Transparent in the ground plane's material:


How to round this edge? Model is intended as a game asset

For a game asset unfortunately yes, it sounds like you have a bad topology, it's very NGon heavy, and should ideally be mostly quad based.

You don't necessarily have to start over from scratch, although cleaning up bad topology from a model is often more work than just doing it well from the start.

I'd go with a topology roughly like this, which should bevel well without unexpected results


How to add different materials to different parts of a texture?

You could try it this way:

Prepare 3 pictures: the original B, a B&W B to use as a cache to make the glossy appear, and normal map picture.
Mix a Diffuse (with the original picture) with a Glossy shader, use the B&W picture as a factor in the Mix Shader.
As the Glossy shader may seem a bit dark, mix it with an Emission shader, but I guess the glossiness will depend on your environment, so you might not need that.
Load your normal map in an Image Texture node (Non-Color Data mode), plug it into a Normal Map node, plug this node into the normal sockets of the Diffuse and Glossy nodes.


Well since nothing works im posting something that may work. sellect the object you have this problem apply a smooth shader in it and then add a subdivision modifier change it to simple from catmull-clark.Then change subdivisions to something big like 4-5.
And check again to see if it works.If this still doesnt work add one more subdivision modifier but not simple this time.And check again.
This wont work for sure*


How to make curve have evenly distributed segments?

Subdivide your cylinder like 7 or more times and apply the Curve modifier. The more subdivisions, the more rounded the shape.


How to assign different material for instance objects

You can assign materials to objects, rather than their data...

... it's the little dropdown on the far right, just above 'Deselect'.


Match shape key for mesh to size of text bounding box

Animation Nodes have a node to compute the bounding box called Object Bounding Box Node. You can use it to get a rectangle (plane) that bounds each of the text objects, to get round edges, you can use the bevel modifier with the Vertex Only option, no need to use shape keys. To get the mesh of each bubble, get every 2nth vertex of the output bounding box vertices (Only every 2nth because the rest is the upper part of the box), then create a mesh out of it:

Which when joined, output and beveled will produces:

Which is exactly what you want, but you might want to scale the rectangles a bit to give the text some space inside, this is easily done by translating the upper-right, upper-left, lower-left and lower-right vertices a bit in the directions $(1, 1), (1, -1), (-1, -1), (-1, 1)$ respectively (They might not be in the same order as I mentioned, so check first !):

By changing the scale, we get different padding widths:

And by changing the bevel width, we can control the radius of the corners:


Cycles render get overexposed last second

Check out if you have the same setup or you have some extra nodes in there! i think those nodes are being processed after the render is done and changing your render


UV unwrap proportions aren't consistent with model

What ended up fixing the issue for me was to go to the Unwrap operation panel and switch it to Conformal instead of Angle.


Why is this hair particle system not properly into account the 'density' vertex group?

You should use the Weight Paint mode to create your vertex group.
Make sure you Apply Transforms on your mesh aswell.

Regarding "separating part", creating 'scalps', I think it is a better way to go especially when using animated characters.

Post a blend file if you still struggle.

EDIT: The Particle tool has a known bug when used with subdivision surfaces, and Multires. So it's "normal" and is being solved.
(SOURCE: https://soundcloud.com/blender-institute/podcast-ep-006-flexirig @ 12:50mn)


Just use a Dilate/Erode node set to 'Feather' instead of a Blur. Setting a negative Distance will erode the edges based on the set Falloff - so it will always be within the region of the mask. For more control of the falloff, set the Falloff of the Dilate/Erode to Linear and add a Color Ramp node or similar so you can control the falloff profile manually.

Note the Split Viewer showing the comparison in the Image Viewer window between original (right-hand side) and 'feathered' (left-hand side).


I believe you have accidentally apply either of these to the edges

Edge Creasing
Mark Sharp

You can try these steps

Go into Edit Mode.
Select Edge Selection mode
Press A to select all edges.
Hit ShiftE,and set Edge Crease to Zero value.
Hit CltrE, look for "Clear Sharp"

Hope that helps.


Crisp images when rendering on GPU in Cycles

I just found the solution on this post: It appears to be AA and should be solved when setting the Sampling settings to Branched Path Tracing.


Principled BSDF (and other shaders) do not render textures with the Eevee engine

OK I eventually fixed it.
I ran debug mode and got the exact same error as on this thread posted this morning:
https://developer.blender.org/T83272
This is what they said:

Next time, please follow the submission template and attach the debug
log and system info as file.
Please try to install a previous version of the graphics driver prior
to Adrenalin 2020 Edition 20.11.2 Optional, 27.20.14501.18003 and
report back if this resolves the issue.

I downgraded my graphics to 20.11.1 and it worked fine.


The angle returned by box_fit_3d is the angle by which the given points have to be rotated to best fit them into a rectangle aligned with the axes.

The example script linked in your question – currently there is only one script with a call to box_fit_3d – does indeed use the angle to calculate the coordinates of the rotated points:

angle = mathutils.geometry.box_fit_2d(cos_2d)

mat = mathutils.Matrix.Rotation(angle, 2)
cos_2d = [(mat * co) for co in cos_2d]
xs = [co.x for co in cos_2d]
ys = [co.y for co in cos_2d]

But if you instead want to fit the original points into a rotated rectangle then you would have to rotate the rectangle by the negative of that angle.
The image below shows the face from your question together with a plane rotated by −50.005 degrees instead.

If you're also interested in the optimal size of the rectangle I guess it's still best to calculate the rotated points and then determine the smallest and largest coordinates like it's been done in the example script.

width = max(xs) - min(xs)
height = max(ys) - min(ys)


You can use a Follow Track constraint to 'project' a single track onto an object.

track your point, you dont need to solve the camera.
make a plane, and position it perpendicular to the camera... how you want to set this up is up to you, but it will effect the numbers you get out at the end.
add the constraint to an object, i just used the default Cube, and refer to the image bellow on how i set it up.
in the viewport image, I have calculated the motion paths, and you can see the path of the track is on the plane.
click the Constraint to Fcurve button, and it will bake the constraint to XYZ values.
Edit: Some times this button doesn't work. An alternative is: Search->Bake Action
you can then write some python to convert your animation to CSV format.


Why are there black frames in my project?

I've tried to delete all things from the scene, then add new cube, camera and lamp. Even this doesn't help, hmm... curious setup.

But you can try create new scene via Link object and data.

1. Switch top tab to Info

2. Hit Plus to add new scene and choose Link Object Data

3. Go to Compositor and make sure you are working in a new scene

4. Now your image should render fine. (I switched plugs for Alpha Over node to show final render)


Can control particle emission from material’s texture?

Ok so wrong answer, but I keep it for those who may be interested:

If you want, for a particle, to get the right color from an object that has an image texture on, you need to:

Create your emitter material.

Duplicate this material, assign it to your particle, enable the Texture Coordinate's From Instancer option.

It should work:


Is there any kind of 'point' of 'target' in order to center things shown in the camera view?

You can enable the center guide in the Properties > camera settings > Composition Guides:

You might also want to look at safe areas:


Animated mesh doesn't move with armature

Your object is a bit messy (for example why is your armature scaled on the Z axis?), but to quickly fix your problem, what you need to do is assigning the meshes of rim and rotator.001 to the right vertex group which is Bone.001, because it's the bone that is supposed to control them.


Cycles displacement: banding despite full float .exr texture

I'm pretty sure that all you did was save the noise with more precision.  I think if you blurred it enough to get rid of the noise then you will have nothing but a wavy cloud of a displacement.

Try to make your depth map using blender modeling/render tools, and then use that result for Displace.

Here's a set-up that I found on a BlenderArtists.org thread that should help you along.  If you have any questions please ask.  I'll update my answer tomorrow with a bit more detail on how this works.  I just thought I could get you started with this little bit for now.

Once you have the setup right, you can just do a camera render and save it as an .exr, that will be your high-precision displacement map.


From the pictures given, it can bee seen that the door is a separate object, the reason the there is no smooth transition between the door and the rest of the car is because there is no shared geometry. I would join the two objects together and use loop tools to bridge the geometry together

To enable loop tools go to file ->user preferences -> add on -> loop tools


Python: Change the texture resolution limit individually ? Per Material?

you mean independently from the simplify ? just by changing image size ? If you are looking in to this I have a small experience since I did something similar before few years in order to bake textures and export them for webgl (DAE) with the minimum res I could afford for online apps.

there is a scale property in bpy.data.image object, according to this thread it must be relatively easy to implement it, although from a quick search I found out that this is only for new made images created in blender.

Thus for you will need an external module to accomplish it, so take a closer look on the second response which is mentioned also as the solution.

How to change image dimensions of a generated image from Python?


CollectionProperty to store Node or NodeGroup

Define, populate, draw

Here I've extended answer from link posted in question with example on how to define, register and populate a collection xxxx on the scene object, containing all nodes from all materials in blend file.

Prepends the draw method to the text editor footer.

Note code is also updated for version 2.8x.

import bpy

class MyPropertyGroup(bpy.types.PropertyGroup):
    material : bpy.props.PointerProperty(
        name="Material",
        type=bpy.types.Material,
    )

    @property
    def node(self):
        mat = self.material
        if mat:
            return mat.node_tree.nodes.get(self.name)

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

    # NOTE: item is an instance of MyPropertyGroup
    for item in scene.xxxx:
        layout.prop(item, "material")
        node_selection_active = item.material is not None and item.material.use_nodes
        row = layout.row()
        row.enabled = node_selection_active
        if node_selection_active:
            row.prop_search(item, "name", item.material.node_tree, "nodes")
        else:
            row.prop(item, "name")

#register the class
bpy.utils.register_class(MyPropertyGroup)

# make it a collection on the scene for example
bpy.types.Scene.xxxx = bpy.props.CollectionProperty(type=MyPropertyGroup)

# test it, get the scene
scene = bpy.context.scene
# clear it
scene.xxxx.clear()
# populate it with all nodes of all materials.
for m in bpy.data.materials:
    if m.use_nodes:
        for n in m.node_tree.nodes:
            item = scene.xxxx.add()
            item.name = n.name
            item.material = m
# draw in footer
bpy.types.TEXT_HT_footer.prepend(draw)


Problem with reference image - Changes to alpha does not change transparency

Change opacity in the data properties panel transparency subpanel

Change from object properties to data properties, set opacity

The other answer popped up while making gif.  Thought I'd post as it is from a build of 2.83 and has a slightly different location for opacity setting.


How to create a graph(ANN) with blender 2.9+

Blockquote

I used Animation nodes to do something like this
my result:

first of all this is not a fast way to do this so I unchecked Always and set it to change if AN graph changed

so I made a grid to have some points and used noise and offset matrix nodes like this

then using those matrix transforms instance and placed spheres

so now its time for splines between them
there is a node(find close point) which gets a list of points and makes some edges based on distance or amount of edges you like to make for each point
but the problem is in your picture there is no intersected lines so we have to remove them by masking that edge list I learned this here
so for finding those intersected lines we need some values like starting and end points of each line I also got length just in case(later I use it for deleting the longer edge for each two intersecting edges not the little one)

properties we need to do this:

maybe there is a better solution (rather than two nested for loops) but I looped through lines and using this method found intersected lines and then changed corresponding index in result array to False so it wont be in edge list connected to spline making nodes
here is the code:
def orientation(p1, p2, p3):

    # to find the orientation of
    # an ordered triplet (p1,p2,p3)
    # function returns the following values:
    # 0 : Colinear points
    # 1 : Clockwise points
    # 2 : Counterclockwise
    val = (float(p2.y - p1.y) * (p3.x - p2.x)) - (float(p2.x - p1.x) * (p3.y - p2.y))
    if (val > 0):

        # Clockwise orientation
        return 1
    elif (val < 0):

        # Counterclockwise orientation
        return 2
    else:

        # Colinear orientation
        return 0

def doIntersect(p1,q1,p2,q2):

    # Find the 4 orientations required for
    # the general and special cases
    o1 = orientation(p1, q1, p2)
    o2 = orientation(p1, q1, q2)
    o3 = orientation(p2, q2, p1)
    o4 = orientation(p2, q2, q1)

    if (o1*o2*o3*o4 == 0 ):
        return False

    if ((o1 != o2) and (o3 != o4)):
        return True

    return False

results=[True]*edge_size

for i in range (edge_size):
    for j in range (edge_size):
        if  i == j :
           break

        if (results[i]==False):
            break

        if(doIntersect(starts[i],ends[i],starts[j],ends[j])):
            if (lenghts[i]>lenghts[j]):
                results[i] = False
            else:
                results[j] = False


Change emission without affecting material color though glass

You can use a math node to add Is Camera Ray to Is Transmission Ray.

In this example the cube emits red rays for the camera and trough transparent materials, but emits green for all other rays.

Note also that for the light to go through the glass shader you might need the following node setup:

as described in this link:How to illuminate the darkness inside glass objects in Cycles?


Blender textures will not display in GE?

I figured the problem out.

Go to Materials for any of your objects in blender game engine
Select an image or any kind of texture you like
In game engine scroll down until you see bake drop down menu. Click the Bake drop down menu and leave everything as is unless you know what you are doing. I left my bake mode as full render and then I click bake button. You may or may not get an error but the error for some reason is wrong and your textures do end up getting baked so this must be a bake problem.
Then click Standalone player drop down menu and click star and boom you now see your textures!

Image of my game and texture below:

I haven't finished my texture for my game yet but this how I got my textures to appear finally. I wonder why when you press p you don't see any of your textures but as a standalone game you can, just odd :/.


The issue occurs when the object in scaled in object mode differently on several axis.

Here on left, an object that has (1, 1, 1) as scale (in object mode) and on right a scale of (1, 2, 1):

To avoid the non even scaling: go to object mode and apply the scale: CtrlA then choose 'scale'.

This kind of effects is true for several operations in Blender (scaling, beveling, extruding, etc.)

Why is it so:

in edit mode the operation is effectively performed evenly, but after that the object scales are calculated, so the result is uneven.


I don't know what exactly you were going for with the class method, but using a function in this case should be equivalent. There is no need for a "master" operator.

from bpy.types import Operator

def printz(index=0):  # "cls" wasn't being used anyway
    text = ["A", "B", "C"][index]
    print(text)

class Print1(Operator):
    bl_idname = "object.print1"
    bl_label = "Print 1"

    def execute(self, context):
        printz()  # index defaults to 0

        return {"FINISHED"}

class Print2(Operator):
    bl_idname = "object.print2"
    bl_label = "Print 2"

    def execute(self, context):
        printz(1)

        return {"FINISHED"}


Images Look Blurry in Blender No matter how high the render samples are or that the settings in sampling is final

There can be at least three causes of blurriness like you are experiencing.

Image interpolation method
DOF (depth of field)
anti-aliasing

Looking at your render I'm pretty sure you have the camera set so you are focused on the background, and the foreground is blurred. Thus your issue is DOF.
DOF
To remove all DOF simply select the active camera, now in the properties window head to the Camera tab, scroll down to the Depth of Field section and set the Size of the aperture to 0.

Image interpolation
If the DOF did not fix it, then I'd move on to changing the image interpolation on your textures.
You are going to have to go through each material and every texture node, and set the interpolation to Closest.

Anti-aliasing
Don't think this is your issue but might as well add it here for completeness.
To turn off anti-aliasing in cycles go to the Film section of the Render tab in the Properties panel, and set the Width of the Pixel Filter all the way down (0.01).


Animation nodes - Replicate splines - random bevel size

Here is a solution for your third question. It takes four AN-nodes if want a number as a result. If a text will do you can skip the last node.


modal function of a modal operator is never called

This is a bit late, but, at present, the modal operator will be invoked at every(!) blender event. This is perhaps not what you want, and could be the source of your problems. A better idea for such operators is to be restricted to particular events. For example, you could start a timer that triggers every 1 second:

bpy.context.window_manager.event_timer_add(1, bpy.context.window)

And, in your modal function, have:

def modal(self, context, event):
    if event.type == 'TIMER':
        # do something
    return {'RUNNING_MODAL'}


I found the answer by myself. The issue was caused by linked data on copy-pasted text. I didn't know that copying an object linked the original and it's copy propierties. When I animated the copies that I then modified as new text, I was animating the originals too. By deleting copies keyframes, I was deleting the ones which animated the originals. And by changing copies colour, I was changing original's colour.

I also learnt that duplicating (shif+d or alt+d) is better than copy-pasting


Weird rendered lighting, probably bad topology

It looks like to me you applied smooth shading to the object, but haven't turned on auto-smooth.
Try going into the Properties window -> Object data properties -> Normals -> and check Auto Smooth.
Then fiddle around with the degree slider until all your curved surfaces are smooth, but the flat areas don't have this lighting error. I think the default 30° should work fine in this case.


Have you tried enabling auto smooth option with custom angle? By default smooth shading smoothes every edge, but in hard surface models you often need hard edges. AFAIK this angle value sets threshold between hard and soft edges.


Cycles Nodes - object location in another object's space?

I was being dim.. to return the location of object A in the space of object B, in all A's shading points:

Here, 'A' is the shaded object, 'B' is an Empty.


If the .mdd option for importing isn't available, load the add-on in User Preferences:

File >> User Preferences >> Add-ons >> Import-Export: NewTek MDD format (Enable the add-on)


As we know, the scrolling zoom speed increases with the distance from the center point of the viewport camera. I think the problem occurs because the center point is far away from view.

I suggest:

1)Select the object and press NUM . to move center point to the selection.

2)Use Ctrl + Middle Click to perform precise zooming.

3)Use fly mode (Shift + F) to navigate.


Are you subdividing? If so, this sort of topology works...


why does my models disapper when im in edit mode?

there are at least a couple of ways

select the item in the Outliner and then in the View option, under the Align View tab select View selected
in the same menu select Center Cursor and View all or press Shift + C (it will fit all of your object on the screen)


Select the camera, press AltG, AltR (Reset camera position and rotation), then press GZ (move up along Z axis) until you reach the desired height. You can consider to set the camera to Orthographic (in the properties window, with the camera selected, the little camera icon) to have your logo with no prospective distortions; in this case change the "ortographic scale" to set the "distance" of the camera, as moving it will have no influence.

Another method is, in the 3D window, press N to open the properties tab, select the camera, modify the values in the transform tab to position the camera exactly where you want.


Quick Explode Modifier in Blender Internal Does Not Affect All Objects

With quick explode, under the modifier settings ensure that dead is not ticked on.

Otherwise, the particles will not disappear after their lifetime. Under default settings, this is the only reason that I know of that the particles should remain. If your animation is shorter than 50 frames however, which is the default, then go to the particle tab and change the lifetime of the objects particle system as needed.


Proportional Editing - Vertices moving for no reason

You have turned on 'X Mirror' for edit mode. This is a a tool which will mirror changes in edit mode across the object's local X axis.

In edit mode you can turn this off by going to the 'Options' tab in the 3D view toolbar (T) and turning off 'X Mirror'.


AttributeError while changing the display units using python script

Error messages are pretty helpful in this case.

  "AttributeError: 'Scene' object has no attribute 'system'"

Means that you can not access the scene's system property because there is none. In other words: the actual 'Object' (Scene in this case) has no attribute called .system so you can not access Scene.system.

Suggest using the auto complete feature (Ctrlspacebar) of the command line when searching for attributes:

>>> bpy.context.scene.u
                       nit_settings
                       pdate(
                       sers
                       ...
>>> bpy.context.scene.unit_settings.system
'METRIC'
>>> bpy.context.scene.unit_settings.scale_length
1.0

Note: Lines from the Info Area not always yield the 'correct path' to the attribute/property.


How can I move vertex to a virtual line?


Should I be concerned about this pivot point?

The short answer is good news: This doesn't matter, because all of this kind of stuff won't really affect UV unwrapping or texturing, and you can go back and change it later if you need to. You might start to run into problems if you have a non-uniform scale, so it's best to apply a scale before UV-unwrapping. Blender will give you a warning if this is the case.

When you apply location, that means you are setting the origin of that object to the origin of the x-y-z volume, so that is exactly expected behavior.

Where you want that pivot point mostly depends on how you intend to animate your mesh. If you're using an armature, and mapping parts of your mesh to bones, then it doesn't really matter where the object origins are. If you want to be able to animate that hat as its own object, it probably makes more sense to keep the origin in the center of the geometry, because that's the point about which you'll animate rotations.

You can change your origin in the Object menu under Set Origin. Typically you'll either Set Origin to Geometry, or Set Origin to 3D cursor if you need the origin to be somewhere specific, like at the hinge of a door as opposed to its center.

So for example, if you wanted to keep the hat where it is, with the hat's origin at its center of geometry, here is how you would go about it.

Select the hat. Object > Set Origin > To Geometry
SHIFT+click the character to select it as well and hit CTRL+P > Set Parent.


How to make backfaces transparent

For the Viewport

Enable the "Backface Culling" option. This is found in the Properties Panel under Shading > Backface Culling. The backfaces will then show as transparent in the viewport.

For Cycles Materials

Connect the Geometry node's "Backfacing" output to the "Fac" input of a Mix Shader. Then plug a Transparency Shader to the bottom input of the Mix Shader and your visible shader(s) into the top one. In this way you can factor between your visible material and transparency, or any other type of material for that matter.


How can I quickly manage visibility of channels across multiple objects in the graph editor

You can edit curves only for selected objects, or filter unneded curves by various types.

Hide channels for other objects
Enable Only Include channels relating to selected objects and data in the Graph Editor header. With this enabled you can edit channels of only selected objects which decreases amount of data to handle with.

Filtering channels

Filtering by type
Enable Filters in the window header. From there select which type of animation data is desired to be shown, from 8 categories of animation data: scene, world, nodes, objects transforms, meshes, datablocks related to modifiers, lamps and cameras. Click LMB to select / deselect multiple:

Only transfroms animation data is shown above because it is what location / rotation keyframes of objects are.

Filter by keyword
Enable filtering by keyword; the filter will be applied while you type it in.

"X" is typed as keyword; shown all keyframes which have letter X in their property.

Visibility of channels

Also it's possible to hide all but selected channel, see shortcut to show a single channel (solo mode) in the graph editor ?, or disable visibility for multiple channels.
You could do that quickly by clicking Eye icon of one channel and hover it over Eye icons of other channels up / down without releasing the mouse. The channels will be hidden.


How would I create new edges around an opening

You can select the edges around the doorway, duplicate them, seperate the edges, increase the seperation's size, and Knife Project that separation onto the mesh in question.


How to convert a text/curve to mesh with given maximum face size?

Try a remesh modifier with an octree depth of about 7. Uncheck "remove disconnected peices".

Make sure you have converted to mesh first.  This only works if the mesh has some substance to it (solidify modifier, or edit mode, select all, extrude).
Apply modifier to see results in edit mode, or check "display modifier in edit mode".


Can you Cut Copy and Paste like this in Blender?

Yes you can.

Select an object while in object mode
Switch to edit mode Tab
Switch to face select (3 in 2.80)
Select faces that you want to duplicate. Use left click to select in Blender 2.80, right click in Blender 2.79b and earlier (hold SHIFT to select more than one face)
Duplicate selection SHIFT+D
(Optional) Separate the selection into a new object using P > Selection

In object mode you can also duplicate entire objects using SHIFT+D or copy and paste using CTRL+C and CTRL+V.


Can I wrap a video as material on a blender object?

In Cycles, in your Material Image Texture Node, make sure you enter the Number of Frames and the Start Frame of the video you want Blender to extract.  Movie should be selected automatically.  Check the Cyclic and Auto Refresh  checkboxes (Note: You must be in Rendered Mode to see the frame advance with Cycles.).

Auto Refresh:  Automatically refresh images on frame changes.
Cyclic: Start over and repeats after the last frame to create a continuous loop.

In BI, it's the same process but it's under Textures (the gif above was rendered using Blender Render). Note: Texture and Material Mode seem to work fine with frame advance in BI as well as Rendered:


uv_textures.active.data[0].uv equivalent in Blender 2.7?

Ok, I've found a solution, maybe not the optimum one, but it works:

for iFace, BFace in enumerate( BMesh.data.polygons ):
    FaceUVs = []

    for i in BFace.loop_indices: # <-- python Range object with the proper indices already set.
        l = BMesh.data.loops[i] # The loop entry this polygon point refers to.
        for j,ul in enumerate(BMesh.data.uv_layers):
            FaceUVs.append( [ul.data[l.index].uv[0], ul.data[l.index].uv[1]] )


is it possible to get this texture in cycles?

So I spent a good amount of time studying the original image by Alec Tear. From what I've gathered from his website and behance projects he uses Illustrator to "handshade" his lettering to get this metallic grainy texture effect. He really knows how to draw light flowing on curved surfaces and I think this is key to get this effect : understanding light.
I tried multiple approaches to attempt to recreate the effect with shaders but in the end this is what worked best for me : a semi-rough semi-metallic shader with grain and lots of lights and good positioning. There is probably a better way, but I'm no blender pro. I also added some bloom.

This is what the final render looks like (Eevee).

In my render the darks aren't as dark, the lights not as light because I don't really master lighting and shaders yet. I wasn't able to recreate the light flowing along the edges because I'm pretty sure the shading in the original image is handmade and not generated.
In Alec Tear's work the lighting isn't as real as you would expect, and I think that's what gives it its charm, attractiveness and retro feel.
Hope this helps. I've learned a lot doing this.


What do I do if my render is just black?

There is not a single light source in the file you have downloaded. Just
some animation and a few meshes. All you have to do is to add some
light source and it should render fine.

Hope that helps.


Is there a shortcut to change snapping type?

There is. Ctrl + Shift + Tab. In addition, you can also toggle snapping altogether from there.

You could literally have hovered over it :P


How to create realistic splinters from wood in blender?

I have made this simple (but probably not perfect) wood splinter bending simulation with the blender fracture modifier.I used more and shorter splinters in the middle so the rubbery constraints let them atleast roughly look like bent longer splinters.
The advantage of this being a modifier is you can just apply the mesh in the "bent" state and edit further if necessary. I also tried with a simple deform after fracture, but this did not look good at all...

The fracture modifier is a separate branch. Links to builds are here

https://blenderartists.org/forum/showthread.php?343637-Custom-Build-Blender-Fracture-Modifier

or here (latest windows build): http://graphicall.org/1148

Will upload a blend if I can find the "BlendExchange" button again somewhere... so for now just a pasteall link...

http://pasteall.org/blend/index.php?id=44841


Background image doesn't show up in rendered view

A Background Image is an Empty which displays in the viewport.  Because an empty has no volume and surface, it cannot be rendered.

If you need to render an image in the scene use the Images as Planes addon.


Try a skybox, or skydome https://en.wikipedia.org/wiki/Skybox_%28video_games%29
or even a simple Import Image as Plane and warp it a bit, if you don't need a full 360.


As said above, in a comment, you should at least
- in edit mode
- check doubles W and choose "remove doubles"
- recalculate normals CTRLN

and in general check that you don't have duplicated geometry.

about the weird shading in the bottom faces, this is what happens, and how to solve (using a simple cylinder):

what happens is the effect of the bottom face being distorted by the subdivision surface modifier, without having some more supporting geometry to calculate a better shape for that 90° angle between the bottom and the sides.

here is this problem shown as flat shading

and here with smooth shading: less ugly but still visible.

To fix this weird bottom shades, we need to add some supporting geometry.
In edit mode, add a loop CTRLR

and slide it down almost to the bottom, confirm.

Now we need to do something similar for the bottom (n-gon) face.

Select it and delete (only faces)

now select this edge circle and extrude E, then press esc to stop the extrusion,

and instead scale it towards the center, using S

now extrude the inner circle (selected) again towards the center

and lastly close the inner small circle left open with F: it will create a small n-gon, but it won't create issues here. It could be converted to triangles or just quads, if needed.

Now, back into object mode, the subsurf is no more creating those artifact, since ther is now enough geometry on that corner to allow for a nice, uifomr smoothing.


Why blender throws an exception when saving a copy of image?

You can use save_render() to save to whatever format you want, no need to duplicate an image datablock first.

In my experience, save_render() is the only reliable way to export from one format to another. I tried the .filepath_raw / .file_format way as well, but it turned out to not actually write the data in the expected format (it used the source format with target format's extension).

Note that save_render() does not render anything, it is called ..._render because it uses the render settings of the current scene.

import bpy

img = bpy.data.images[0] # pick an image datablock
filepath = r"C:\tmp\_exported_image.tif" # specify outout filepath here

# Store current render settings
settings = bpy.context.scene.render.image_settings
format = settings.file_format
mode = settings.color_mode
depth = settings.color_depth

# Change render settings to our target format
settings.file_format = 'TIFF'
settings.color_mode = 'RGBA'
settings.color_depth = '8'

# Save image to TIF, this does NOT render anything!
# It only means that the save command will use the current scene's render settings.
img.save_render(filepath)

# Restore previous render settings
settings.file_format = format
settings.color_mode = mode
settings.color_depth = depth


You can increase viewport speed in multiple ways.

1) Make sure you have GPU Compute on (in preferences and in render tab)
2) Adjust viewport resolution in Render Tab -> Performance -> Viewport -> Pixel size
3) Decrease Render samples in Render Tab -> Sampling -> Viewport
4) Remember that Cycles will always be considerably slower than Evee.

Settings on my old machine:

Hope this helps.


Blender 2.8, Simple Rigging - What am I doing wrong?

If the parent armature with automatic weights doesn't give you a result, it just means that blender isn't picking up that the bone is near the vertices that you expect it to move.

This just means you need to assign the vertices yourself. You can use weight painting, or manually assign a weight to the vertices.


Sometimes Blender is not the tool. As stated in the comments there are external tools dedicated to processing the described (detailed) input into the desired output. When these tools produce a file format that Blender can read, that's how you get the data into Blender.

This is not an endorsement of 3rd party software

Software like Agisoft Photoscan offers a python interface to let you sidestep the ui for automation purposes - but it's out of the realm of Blender support to discuss that unless there is a concrete question about interactivity between the two programs or APIs.


You can mark edge creases to control the subdivision's interpolation: select an edge, press SHIFT + E, then drag your mouse and left-click to confirm.


How to bend a specific part of an object or differently achieve a bend/round surface

As your base shape is a cylinder you could begin with a cylinder and use the Boolean modifier to cut off the parts you're talking about, then continue to model, create some edge loops, use the knife, and at the end add some bevels to sharp the edges:


Using Transparent Background with Volume Scatter

I figured out how to get a transparent background while using Volume Scatter. Easy to say that it was purplexing as Edward Nigma's riddles,it finally came to me. The answer to this giant enigma which has puzzled me for months.

The first thing you do is create a plane and enlarge it to surround your camera. The next step is to extrude the plane above your camera. I personally did this step by extruding to Z: 8.00000. Finally,you enable the Shadow Catcher in the object settings and press Shift+LMB to view the object and Shadow Catcher scene at the same time.

Render the scene with Volume Scatter with the Shadow Catcher scene,then the Shadow Catcher background will be transparent. I hope my answer will help those later in the future.


Incorrect Context error when calling bpy.ops.view3d.object_as_camera()

So it turns out -

I had to add area.spaces.active.region_3d.view_perspective = 'CAMERA'
this in the loop.

Got my answer on http://blenderartists.org/. Just sharing for the community.


Can I create pbr textures from blender and export it to Unreal or Unity?

"PBR" is a buzzword that refers to some shader design conventions, such as respecting energy conservation, using fresnel reflections, and such. "PBR Textures" are merely textures intended for some shader that follows these conventions. As Cycles is a render engine itself and not a texture authoring tool, it won't be helpful in authoring textures. You can certainly paint textures using Blender's texture painting function that target a PBR shader, but as Blender doesn't have a PBR viewport shader you will won't have the instant viewport feedback of how your textures are looking. You have to export them out to your game engine, doing some "guess and check" with the values.


Regions in my scene seem to render with less illumination

Since you have stated you are new to Blender, sometimes deleting objects, lights and other items removes subtle mistakes. Archive your file under a new name, so this operation is very little risk.  The second time you model these objects will be faster than the first.
Delete all the lights and add them back. Logic stated in bullet 1.
Delete the whole scene and start from scratch.  Logic stated in bullet 1.
I assume you want brightness everywhere.
Add more lights or raise your lights higher along the z axis.  Increase the strength.
Add a more distant larger plane. Orient its face towards your scene. Select the emission shader. See image below.

If desired select Cycles Ray Visiblity Camera to FALSE unchecked. This will prevent the render from showing a bright rectangle.  See image below.

Verify you are satisfied with the render results.


The Hook modifier can make another object (an Empty, here) grab a targeted vertex-group, and give the group its own transform, by weight.

A 0 'Falloff' radius is infinite.


Alpha material not see through when overlapped

Ok, the answer was in fact possible in Evee, so ignore the "use Cycles" answers.

Use an emission material with varying strength.
Here I have 0.0, 0.33, 0.66, 0.00 and 1.0 strengths from left to right as you view the planes.

Then use the Compositing in nodes to overlay the rendered image over the background image in the screen mode. This makes has the desired effect of making the 0.00 material transparent to the background but NOT show the objects behind it through the material.

The edges are drawn using the Freestyle tool sets.


import bpy

obj = bpy.context.active_object
driver = obj.data.shape_keys.key_blocks['Key 1'].driver_add("value")


How can I render in blender via GPU on my 64 bit PC that has Intel HD graphics 620 as well as radeon 27 m445 display adapters?

First, the radeon is an AMD graphics card, not an NVidia, so you won't find drivers for it on NVidia's site.

Second, while blender can use openCL, it demands a reasonably modern GPU. Yours seems to be a bit older, so not sure blender will be able to use it, even with the proper drivers. (see the blender documentation for more details)


Those are the sizes of the textures

1K=1024x1024px

2K=2048x2048px

4k=4096x4096px

8K=8192x8192px


This code snippet assumes some existing variables which were pre-calculated

'''
bme     : blender BMesh
ed_map  : all the edges to be bisected into 2 edges
new_cos : desired positions of bisection, in same order as ed_map
'''

geom =  bmesh.ops.bisect_edges(self.bme,
                               edges = ed_map,
                               cuts = 1,
                               edge_percents = {})

new_bmverts = [ele for ele in geom['geom_split'] if isinstance(ele, bmesh.types.BMVert)]

#assign the locations to the new vertices, which were automatically
#placed at edge midpoints
for v, co in zip(new_bmverts, new_cos):
        v.co = co

#connect the new vertices, to cut across the individual faces
ed_geom = bmesh.ops.connect_verts(bme,
                                  verts = new_bmverts,
                                  faces_exclude = [],
                                  check_degenerate = False)
new_edges = ed_geom['edges']

#optionally, split the new edges, to make 2 separate mesh pieces
bme.verts.ensure_lookup_table()
bme.edges.ensure_lookup_table()
bmesh.ops.split_edges(bme, edges = new_edges, verts = [], use_verts = False)


The active object needs to be on a visible layer in order for View Selected (.) to work.

Look in the 3D view header at the layers.

As shown in that picture, I suspect you will have the active object on a non visible layer. The darker squares are the visible layers. The orange dot is the active object.

Press ` to show all layers, or Shift LMB  on the layer button in the 3D view header for the layer the active object in on.


Glass shader looks dark depending on exposure setting, even though there is enough light in the scene to compensate

I can replicate this - both by changing the Color Management 'Exposure' setting or by changing the Film 'Exposure' setting - although the two seem to be scaled differently, with the -10 -> +10 Color Management setting changing by a factor of 2 for each unit change (so '0' is 1, '1' is 2, '2' is 4, '3' is 8, etc. - with similar for negative values, so '-9' in your example seems to actually relate to a 'Film' exposure of 1/2^9 = 1/512 - so negative values are actually valid in this case.

After varying various other factors, I managed to get around the 'darkening' by disabling the 'Indirect Light' setting in the Light Paths panel (at 2.8 - at 2.79 this was in the Sampling panel). This seems to indicate that the issue is that the Indirect Light is being lost due to being below the Indirect Light clamping setting. Setting Indirect Light clamping to zero (to disable clamping) fixes the issue in my case.


Blender 2.79: How do I save multiple animations?

You need to follow some tutorials about the Dope Sheet and the NLA windows.
The Dope Sheet window (in Action Editor mode) allows you to save, duplicate and create new actions: Click on the X button to close the action (it will still be selectable in the dropdown menu), once closed you'll have a New button to create new action, click on the sheet button to duplicate, click on the shield button to make sure that the action won't be removed even if it has no user.

The NLA window allows you to manage the different actions you've created in the Dope Sheet, just click on the Dope Sheet Push Down button and the action will appear in the NLA in the form of a strip, then you can move the strips wherever you want, the top strip being the one that will play prioritary by default. Click on the blue arrow button if you want to only show the strips of the selected object. You can access to all the strip options in the right panel (click N to display).


Is there a way to view edges in weight paint mode?

You can enable the Wireframe Option (under Geometry) in the Viewport Overlays while in weight paint mode.


Rigify (2.8) - automatic weight incorrect and issues with weight painting

You're not supposed to use the metarig as a rig. It's a tool for you to tell Rigify where your character's body parts are so he can generate a rig that fits him.

̈Please see a tutorial to learn how to set this up, like this one. It was for v2.7x so the UI is a little different, but Rigify hasn't changed since.

Also, I wouldn't consider your mesh ready for animation.
The topology simply will not give good deformations. And the mesh density is extremely uneven, it seems you've made a patchwork of parts from very different assets; which is fine on its own but require a unification work that is lacking here.
I'd suggest you do a big retopology session first. And I'd advise you to keep the polycount way down. For a simple character like yours, you don't need as much polygons as right now, really. You can keep that really low, and have some level 1 subdivision modifiers on top to do the detail. And you WANT to keep things simple : less vertices = less headache when working on the weights.

Now more about your issue :
There are a lot of things you should always check before rigging. Including :

Translations & origin :

Those two go together, most meshes usually should have their origin to the world center, and such their translations are set to zero.
Some make exceptions, like the eyes that can have their origin to their center of mass, so their translations would be whatever the eyes are. But other than that, usually make sure origin is in center, period. Even the eyes if you have a doubt.

A quick fix for that :
Select you mesh and press ⎈ CtrlA → Apply location
This will set the origin of your selection to the world center and their translations to zero.

Rotations : are they all to zero?

Unless you make some special rig, your rotations should all be set to zero.

How to fix :
Select your meshes, hit ⎈ CtrlA → Apply Rotations.

Scales

You can have scales different than 1, but you really need to know what you are doing because, if scales are not the same between some objects, or between the deformed objects and the armature, or if the scales are uneven between the three axes, there will be issues. So really, an easy way to not have issues is to have all scales at 1.

How to fix :
Hit Ctrl A → Apply Scales.

You can also fix the rotation, location and scale in one go using ⎈ CtrlA → Apply Alll Transforms.

Normals

Among other things, they are used to tell which side of a face is upside and which one is downside. Quite a big deal in Rigging.
You can quickly see your face orientations using the "Face Orientation" overlay :

Red is downside, Blue is upside. You can see your mesh has a lot of backwards faces. It also has some inside mesh pocking through your eyebrows, you should edit that:

How to fix :
1. In edit mode, select the reversed mesh and hit ⇧ ShiftN to recalculate the normals
2. If it's still backwards, open the Redo Panel on the bottom left corner of the viewport (it appears right after an operation is done), and check the "Inside" option to flip the recalculated normals:

Apply unnecessary modifiers

Basically, except subdivisions and particles, any other modifier should probably be applied.

In your case, your pant object should have its displace applied.

In addition, make sure there are no useless subdivisions that give unnecessary mesh. Like on your teeth, they are dense enough, there's no need to add more mesh. You need to keep things simple as much as possible so you can work fast and so your viewport keeps a nice performance.

Go through that, and you should be fine most of the time.


Material shading options in 3d viewport limited for Curve objects?

EDIT

This appears to be fixed in recent builds,

original

I use Nodes for materials exclusively, and wasn't aware there was an independent Settings panel for the Viewport shading color.

1 and 2 are independent, and unlike Objects which are Meshes, the colour isn't automatic.

Here the spheres are Mesh based Objects.

here the blend


Extruding an arc shape with a plane as the extrusion path

there could be many ways,  this is one :

add a biziere curve align it to front view
convert it to mesh with Alt+ C
add a screw modifier
set the steps to 4 (in the modifier)


Why after transforming an object with the matrix_world of another object the reference and target object have different transformation matrices?

Here the updated code after following batFINGER suggestions
import bpy
import os
from mathutils import Matrix,Euler

WORKING_DIR = "G:\Progetto QA\RR PSD Gephryn\Export\Obj"
file_name = "RRGEF1_An_LV-pi_1226.obj"
file_loc = os.path.join(WORKING_DIR, file_name)

#import object
imported_object = bpy.ops.import_scene.obj(filepath=file_loc,axis_forward='Z', axis_up='-Y')
obj_object = bpy.context.selected_objects[0]
bpy.context.scene.objects.active = obj_object

obj_object.scale=(0.001,0.001,0.001)

#Translate the imported object
bpy.ops.transform.translate(value=(2.45409, 1.31843, 2.94766), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)

#get the transformation matrix of the transformed object
M=bpy.context.object.matrix_world

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

#re-import object
imported_object = bpy.ops.import_scene.obj(filepath=file_loc,axis_forward='Z', axis_up='-Y')

#Transform with matrix multiplication
obj_object2 = bpy.context.selected_objects[0]
obj_object2.matrix_world = M * obj_object2.matrix_world

# Adjust the transformation
obj_object2.rotation_euler=Euler((-1.5708,0,0),'XYZ')

M2=bpy.context.object.matrix_world

print ("reference:",M)
print ("target:",M2)


In this example you have 2 options. One is to poke face, which will divide it without distorting UV map and second is to pin vertices of the UV map, do what you need to do with the face and unwrap everything again without moving UV map.
Here is how it's done:


What you are seeing is the seams of your uv's. When a colour is chosen from the image along the edge of the uv seam, small calculation variations lead to the surrounding black being chosen instead of the orange. You can test this by changing the black background to another colour, which will show in the seams instead of black.

To fix it on the image, expand the areas of colour a few pixels so that the correct colour can be retrieved.

When texture painting there is a bleed setting, which is misleadingly placed under project paint, which allows the painting to fall a few pixels outside of the edges to prevent this issue. Be aware that larger values can spill over into neighbouring faces, especially if they are packed close together.


How to mix glass, glossy and diffuse (sticker on glass jar)

Ok, sure. Before posting this question a play a lot with my file, and was very close to solution - but every time something was not perfect :) In some cases i receive good combination, but some part of sticker was transparent and as inside glass. Anyway i was not quite sure - of what is wrong. After you reply - i found issue with my sticker - it was not exported as i expecting. I attach the difference. For the below right version - i add white non transparent background. So i can control this transparency :)

Then i adjust materials and nodes as read it in links - i catch idea in right way.


RuntimeError: internal error setting the array

Vertices need an x, y and z coordinate.  z was  set to zero and not used. Then there was faces in mesh.from_pydata(...) instead of edges, of which only  a couple were added as you were iterating through iterations.  On top of that you were using i as an iterator in both your inner and outer loop.

To convert between degrees and radians you can use math.degress(rad) or math.radians(deg)

Here is some code I put together a while back to arrange objects into spirals, edited with yours to create a spiral mesh.

Also look into the addon add_curve_extra_objects and in particular add_curve_spirals.py

import bpy
from math import sin, cos, pi
def spiral(segs=30):
    verts = []
    edges = []
    z=0
    n = 3
    position = bpy.context.scene.cursor_location
    print(bpy.context.scene.cursor_location)
    a = 0.5
    for i in range(segs):
        t = n * 2 * pi * (i)/ segs
        # parametric eqn of a helix
        x, y, z = (a * sin(t), a  * cos(t),  a * t / n)

        verts.append((x,y,z))

    for i in range(len(verts) - 1):
        edges.append((i, i+1))
    mesh = bpy.data.meshes.new("Spiral")
    object = bpy.data.objects.new("Spiral", mesh)
    print(verts, edges)
    object.location = bpy.context.scene.cursor_location
    bpy.context.scene.objects.link(object)
    mesh.from_pydata(verts,edges, [])
    mesh.update(calc_edges=True)

spiral()


Display connected vertices in UV editor?

Press the letter L with your mouse over some vertex.

L

Sometimes with a current selection

CTRL-L


The best way to do it is to give your object a Subdivision Surface modifier. As it will round the angles that you want to keep sharp, you'll have to add some edge loops close to these angles.
To make things easier you must try to keep a good edge flow. This site (topologyguides) gives some good tricks but in my opinion the more you'll try the more you'll succeed.
Here is a quick example of what you could do:
Before:

After:


Continuing division of cylinder to top faces

If there is a face, select it in Edit mode, then type Alt-P (Poke).  Another method which works with or without a face: select the face or edge loop, extrude it in place (E then Escape), then type Alt-M (Merge).  For your purposes you probably want to merge "at center" or "collapse" but there are other options that might be useful.


All the other answers are work-arounds when you want a single button solution like in Adobe Illustrator and others.

The solution you want is in the addon called Oscurart Tools. The link to the addon is here: http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Oscurart_Tools

It comes with many features but the one you want is the second button from the bottom in the Object section.

Addon Download tip: The wiki page links to a list of separate file links that you have to download separately. Once you download them all, put them in a folder labelled "oscurart_tools" and then make a zip file from that. You can then import the addon from file this way for ease of use.


Switch on Proportional Editing. Use sphere falloff.

Select the two middle verts and scale them on the Z axis only. Adjust the radius with the mouse wheel.

Switch off proportional edit, select one row of verts and adjust the thickness.

Did I mention there's another way of doing this? No?

Well, there's another way of doing this:

Create a circle with lots of verts.

Go to side view and rotate the circle a bit with R

Duplicate the circle with  SHIFTD and mirror it with  SZ-1 RETURN.

Move the circle up a bit with G

Deselect with A, use Box Select B to select the right verts and delete them.

Select the two edgelines with  A and bridge them using  SPACE B R I

Did I mention there's yet another way of doing this? No?

Well, there's yet another way of doing this.

Put a Cylinder around your bent faceline. Use an excessive amount of verts, 512 or more. Scale or model it into the desired shape.

Give it a Shrinkwrap Modifier with the settings shown in the picture.

Apply the modifier. Delete the circle.

Just in case you get bored...

There's another way of doing this!

Add a UV Sphere, few segments, lots of rings.

In Top View and Edit Mode, select as shown. Delete.

Select the left half and move to the right. Or select the right half and move to the left. Throw a coin if necessary.

Share and enjoy.


Python export addon: assign faces to vertex groups

Well I spent days with this, and suddenly I got it, thanks anyway.

This cuts a ist in parts, for example, my vertices list, without repeating items in every part.
I had to use a while, for loops are not working exactly how I thought in python.

split = 0
r0 = []
r1 = []
r2 = []
#and so on...

a = [0,1,0,1,2,1,0,1,3,0,2,2,4,2,2,6,2,1,6,3,2]
i = 0

while i < len(a):
if split == 0:
    if a[i] not in r0:
        r0.append(a[i])
    if len(r0) == 3:
        split = 1
        i = i + 1

if split == 1:
    if a[i] not in r1:
        r1.append(a[i])
    if len(r1) == 3:
        split = 2
        i = i + 1

if split == 2:
    if a[i] not in r2:
        r2.append(a[i])
    if len(r2) == 3:
        split = 3
        i = i + 1

i = i + 1

#the results are:
r0 = [0,1,2]
r1 = [1,0,3]
r2 = [0,2,4]


Can I change the default increment amount for an object's Transform properties?

1) I haven't found any way to change the increment factor when clicking the arrows in the transform panel. I use metric units and at every click it snaps 1 cm (for Location), it is 0.01 if you don't use any unit type.

Personally if I want to move , rotate or scale an object with smaller values, for example if I want to move it 0.5 mm on the X axis I type in the values: "G"(for grab) -> "X" (on X axis) -> ".0005"(for 0.5 mm) -> RETURN

2) Snapping.

By default snapping is set to "INCREMENT" and it means exactly an unit seen  in the 3D viewport. It doesn't have to be 1 Unit (Meter).
These snapping values are set by the grid seen when you are in ortographic view (NUMPAD 5 to toggle):

If you zoom in , you'll see the grid changing from 1 unit to 0.1 units and then to 0.01 units and so on as you zoom in and also the Indication in the upper Left corner will change from Meters to Centimeters, Millimeters. Now if you move an object holding CTRL the snap will be relative to those units.

To fine even more your snap you can hold CTRL + SHIFT while transforming and this will make the snap be 10x shorter.

P.S. You can change the type of element to snap to from increment to vertex, edge, face volume using the shortcut CTRL + SHIFT + TAB


@cegaton select the affected objects and be sure the icon camera in the outliner window is active.

Or be sure the object properties "Cycle Settings" has the Camera selected in the Ray visibility settings.


Can I use a vertex shader and Cycles at the same time?

Cycles uses a very different rendering system and is independent of openGL, so features are going to be different and you won't be able to combine these shaders. There is an experimental real displacement feature that might help, but I think you would be better trying python if you have some idea what the code should look like.

You could use an application handler on the frame_change_pre event to create this effect.
(https://www.blender.org/api/blender_python_api_2_77_1/bpy.app.handlers.html?highlight=handler)

If the changes are fairly simple, a bunch of shapekeys for various parts of the mesh may be easier, and just key/animate them manually.


how to resize an image so it shows in its entirety within an object?

UV Unwrapping

The best thing to do would be to start with a blank cube, then select only the face that you want to have the car. Key Numpad 5 to enter Orthographic View, and then key either Numpad 1, Numpad 3, Numpad 7, Ctrl + Numpad 1, Ctrl + Numpad 3, or Ctrl + Numpad 7 (whichever makes you face the selected face). Key U and select Project from View (Bounds).

Node-based Mapping

The .blend file for the second result:


Create a fake user.
(From the blender manual:)

Since zero user data-blocks are not saved, there are times when you want to force the data to be kept irrespective of its users.
If you are building a blend-file to serve as a library of things that you intend to link to and from other files, you will need to make sure that they do not accidentally get deleted from the library file.
Do this by giving the data-blocks a Fake User. This prevents the user count from ever becoming zero: therefore, the data-block will not be deleted (since Blender does not keep track of how many other files link to this one).

Go into the image editor and click on the shield-looking icon:

Fake User (shield icon)
Keeps the data-block saved in the blend-file, even if it has no Real User. When activated an “F” will be shown before the name in the list.
Once a fake user has been created, the image can be packed into the .blend file.
An alternative use the outiner, enable the blend file browser, select the image and create a fake user for the image.


What does the "unused" output on the Vector Math node do?

The answer can be found in the source which isn't hard to follow.

For add and subtract the Value output is the average of the absolute vector values. That is:
$$
\text{value} = \frac{\left\vert v_x\right\vert + \left\vert v_y\right\vert + \left\vert v_z\right\vert}{3}
$$

For average, cross product and normalize it is the length of the vector output.

For dot product the vector output is set to zero.


How to get a list of Drivers used in certain bone

I haven't found a super elegant way to access a driver directly from the bone, if someone knows that please let me know in the comments. But what you are trying to do can be achieved by building your own Python Dictionary over the armature in question. I assume that you have an armature with drivers on it, and it is the current active object. I further assume you have a console open (on Windows you can open it from the 3D View Main Menu, on Linux and Mac you need to start Blender from the console). Now run this from the Text Editor:

import bpy

# create an empty dictionary to store all found bones and drivers in
boneDict = {}

# iterate over all bones of the active object
for bone in bpy.context.object.pose.bones:

    # iterate over all drivers now
    # this should give better performance than the other way around
    # as most armatures have more bones than drivers
    foundDrivers = []
    for d in bpy.context.object.animation_data.drivers:

        # a data path looks like this: 'pose.bones["Bone.002"].scale'
        # search for the full bone name including the quotation marks!
        if ('"%s"' % bone.name) in d.data_path:

            # we now have identified that there is a driver
            # which refers to a bone channel
            foundDrivers.append(d)

    # if there are drivers, add an item to the dictionary
    if foundDrivers:
        print ('adding drivers of bone %s to Dictionary' % bone.name)

        # the dictionary uses the bone name as the key, and the
        # found FCurves in a list as the values
        boneDict[bone.name] = foundDrivers

# now you have a dictionary in hand, which you can use to
# retrieve all driver info from
print ('bonedict: %s' % boneDict)

# usage examples

# get all drivers of the active bone, if it has some
boneName = bpy.context.active_bone.name

# first check if it has drivers at all
if boneName in boneDict.keys():
    # if so, access the drivers list by using the bone name as the key
    activeBoneDrivers = boneDict[boneName]

    # get number of drivers:
    print('Number of drivers for bone %s: %i' % (boneName, len(activeBoneDrivers)))

    # iterate over those drivers only:
    for d in activeBoneDrivers:
        # print the expression
        print('expression: %s' % d.driver.expression)

        # print if driver actually works:
        print('driver is valid: %s' % d.driver.is_valid)

        # get the type
        print('driver type: %s' % d.driver.type)

        # print the variables
        for var in d.driver.variables:
            print('variables: name %s, type %s' % (var.name, var.type))

            for target in var.targets:
                # you can also iterate over the targets
                # if you use Pythons dir() function, you will see what methods and properties you
                # can access:
                print ('targets methods: %s' % dir(target))

I tried to comment the code as completely as possible, so all explanation how this works is in there. Also, I chose to add the FCurve to the dictionary instead of the Driver directly. FCurves can sometimes be used to further tweak the driver, so you might want to access the curve and its Modifiers too. If you have further questions, feel free to ask  :)


Bottle is not showing up clear in render mode

Try something like this:

Where the label is opaque and the rest of the bottle is transparent.


Blender 2.78 VSE : How to display keyframes presence?

You can find the keyframes in Dope Sheet, Graph Editor and NLA Editor.


how to properly export my character from blender to mixamo to apply animation

solved it ! it turns out I had too many vertices in my model by decimating the mesh it got uploaded and perfectly rigged
Go to edit mode
Mesh->cleanUp->Decimate Geometry
decrease the ratio to reduce mesh size


Shape Keys and Modifiers occur in a strict order and this appears to be the cause of your problem.

The Shape Key acts on the base mesh. This means that it will always apply first. When you're in Edit mode certain modifiers are automatically disabled - otherwise you wouldn't be able to see the true state of the mesh. This includes disabling the Hook modifiers. This is why you are able to apply the shape keys and see the result when in Edit mode.

When you're in Object mode the shape key is actually being correctly applied. However, immediately after the shape key has been applied the Hook modifiers take effect - and move the vertices back to the place of the hook - thereby effectively undoing the shape key. The slight motion you're seeing is due to differences in the 'smooth' falloff affecting the surrounding vertices.

When Hook modifiers are first added, they are created with a Strength of 1.0. This Strength is effectively an 'Influence' value. Setting it to 0.0 will result in the hook having no effect on moving the vertex from its 'current' position to the 'hook' location while setting it to 1.0 will move it fully to the 'hook' location - values between 0.0 and 1.0 vary the strength of the hook.

Therefore, the solution to allow the Shape Key to still have an influence (and not be completely overridden by the Hook) is to reduce the strength of the hooks. This will mean that your empties will need to be moved further to have the same effect on the vertices but will mean that the contribution of the shape key is still taken into account. For example, changing your Hook strengths to 0.5 will result in the hook only having half the effect it would previously - the other half of the vertex location will be a result of the base mesh vertex location (including the shape key).


The color of my video is wrong when I input it into "Composition"

Don't use Raw as the color space for video.
The issue is that by default blender is set to use Filmic as the color space. It is meant to render images using a wide dynamic range, not for dealing with video.
Your video is in a Rec709 or sRGB color space, so it should be displayed in sRGB color space.
Images viewed or processed in the wrong color space will always look wrong.
In the color management section, set the display to sRGB and the view transform  to standard (which is the dumbed down name the developers set for sRGB).

And set your footage to use sRGB.


Is there a way to uniformly add texture to a complex mesh without using UV mapping?

What render engine will you be using? Cycles? Blender Internal? OpenGL Viewport/Game Engine?

Yes, for the most part you can, except for real time rendering; for which you probably have little options but to unwrap.

For the other two you could use either one of two methods:

Generated Texture Coordinates - Will fit a 1x1x1 cube of the image to the object using a 3 axis box like projection. You can later adjust repetition by controlling the scale of the image or with a vector mapping node.
Object Texture coordinates Will evenly tile the texture over your object regardless of size. The texture will stretch if the object itself is not evenly scaled. You can also adjust repetition by controlling the size of the image or with a vector mapping node.

For both no unwrapping is necessary, face angles will be used to mask from where the texture will be projected. Be sure to select Box projection mode in your image texture node.


How to add a mesh to each vertex (30k vertices) so can import into UE4

Use a Skin Modifier

I created some vertices to test:

Then I added a skin modifier from the modifiers tab:

I then got this result, which I think is what you want:

When you are happy with the result, you should be sure to apply the modifier using the apply button in the modifiers tab to actually create the mesh data.

If the squares are the wrong size, go into edit mode, select all the vertices, and press Ctrl + A to resize the cubes.

I hope that helps!


How to add header and space choice combobox to a custom made space?

I am not sure how much of this is necessary but I did some intuitive edits on the code and it works, if anyone can explain exactly why I would be most grateful.

Go to the /home/user/blender-git/build_linux/bin/2.79/scripts/startup/bl_ui(respective to your system) folder where all the other editor *.py startup files are copy space_info.py, rename it to space_yourspace.py.

In the same folder find the __init__.py open it and add space_yourspace to the constant _modules, this will make blender run said module on startup, so be sure to edit the file before starting it up.

Now open up space_yourspace.py and delete everything from         INFO_MT_editor_menus.draw_collapsible(context, layout) down to, but not including classes = (.

Now in the classes tuple delete everything except INFO_HT_header, be sure to leave one comma after INFO_HT_header so it remains a tuple and not just a pair of parenthesis. Rename INFO_HT_header to YOURSPACE_OT_header in the tuple.

Go back to the remaining class and rename it also to YOURSPACE_OT_header.Inside the class change the value of static variable bl_space_type to 'YOURSPACE_EDITOR'.
After this, you can start Blender and in the header of yourspace you will have the said combo box.


How to export an animation to my sprite engine

There is a blender plugin that can export *.ani animations to Urho 3d.
View the Github repository of reattiva.


To add a new object, you can

Press ShiftA in the 3D view and then select the object you want to add.

Press Add at the bottom of the 3D view and then select the object you want to add.


Build a simple GUI that runs full Blender in the background?

Sounds like you're trying to re-invent the wheel.

I'd imagine you might use Python for your GUI
to remain consistent with Blender scripting.

I'd look into PySide.
It's an open-source Python wrapper for the Qt lib.

PySide can access OpenGL via PySide.QtOpenGL calls,
so you'd have a way to view your model that way.

Then you'd most likely use a subprocess call to Blender
on the commandline for your final render.

If you need to access bpy and all those features,
you could compile Blender as it's own Python module:
https://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule

You might look into the Blender 101 Project first.
https://code.blender.org/2016/12/the-blender-101-project-and-you

It might do what you're trying to accomplish.

Contributing to that might be an easier way
for everyone to enjoy using Blender, even beginners.


You wont get any shadows if you are using an Emission shader in your material for the backdrop.


Performance Mode for Animation Nodes Addon

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

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

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

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

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


If you try to delete it in edit mode it won't let you. Make sure you're in Object mode.


How to import python module from within the project in blender?

For blender below 2.8

The script to be imported must have the '.py' suffix (e.g. loggingConfig.py), it can be imported as follows:

import loggingConfig

If loggingConfig suffered any changes, you must reloaded, like this:

import loggingConfig

# The following lines reload the module in each run
import imp
imp.reload(loggingConfig)

This can be ran each time to ensure to have always the most up to date version of loggingConfig.py.

For blender >= 2.8

The script to be imported does not need to have the '.py' suffix (e.g. loggingConfig), it can be imported the following:

import bpy

loggingConfig = bpy.data.texts["loggingConfig"].as_module()

In this case it isn't necessary to reload the script in each run.


Subdividing has warped my mesh. Is there a way to clean up this mesh after adding other modifiers?

No sure it's adequate in your case, but I'd go in Sclupt mode, select any brush (the standard inflate/deflate will do), set its strength to 0 so that the shape isn't changed, but turn Autosmooth to 0.1 or something like that.

You will then be able to smooth the geometry with the brush just where needed, without touching anything else.


Unable to change specific faces color of a cube

First add an empty material slot to your mesh as shown below:

Add another slot
Add new material to the second slot and set it's diffuse color as shown below:

Switch to edit mode and select the face you want then select the material you created and click assign as shown below and that's it.


Is it possible to drive the length of hair particles via texture using Cycles?

It works the same way for cycles. Also if you have an animated texture (image sequence or procedural) the animation will effect the length as well.

In the Textures section of the Particle settings for your Particle system, add a new texture.

Now in the Texture tab, change the Influence to Length.

This animation was made by animating the Size on the Distorted Noise texture that is controlling the length of the particles.


Created concrete material by following a 2.79 tutorial in 2.8 and messed up true displacement

Due to adding vector displacement not so long ago to Blender you have to use dedicated displacement node to convert scalar to vector displacement.

I would say that your shader structure is outdated. It is better to mix RGBs instead of shaders, and use Principled BSDF instead of mixing Diffuse and Glossy. Take a look at the blend file. Although this is not the best example to demonstrate the superiority of the approach, I changed it so it would reflect the idea without altering the artistic component. The shader became heavier but more realistic and PBR.


Blender EEVEE pixelated render. No denoise options?

Indeed there are no denoise options in Blender Eevee for now.

What you can do instead is playing with the filter size, which can be found here:

Little demo of how it works:

Just do some tests and see what works better on your case. Each render is different.

Alternatively, you can use the D-noise addon which will allow you to use denoising on anything using Blender's Compositor.

Download page.
Demo video


As I was about to click the button to post this question, I realized maybe the CollectionProperty class extends/has the same methods as a dictionary or list. Anyway, with a little trial and error I found that it does (sort of).

To remove a single element:

context.world.my_collection_prop.remove(2)

To clear the whole collection:

context.world.my_collection_prop.clear()

I really don't understand how details like this get left out of the Blender API documentation.


The texture is behaving like a reflection because you chose a reflection mapping preview. To choose the direct UV mapping preview, ...

go to the Image Editor
open the properties panel N
go to the Game Properties section
activate UV Coordinates unter the mapping header


Object in the wrong position when rendered

You likely have a modifier on the head object, most likely an armature modifier that has the Render setting off. Enabling the render button on the modifier will solve the issue.


How to make a circular array using offset object as center?

Add an empty at the origin of the object that you want to duplicate.
(Remember to hit CtrlA and select rotate and scale, to apply transormations on the original object).
Then, add an array modifier with object offset linked to this empty.

Set the 3D cursor to the desired centre of the circle. Add another empty here. Make it the parent of the other empty. Now select only the centre empty. Rotate.
The amount of rotation is of course dependent on the number of objects, e.g. 12 objects = 30°.

If you want the single elements to "touch" as in your picture you need to either adjust the object width or the radius. The circumference of the circle is 2 * PI * radius, so the width has to be the nth (e.g. 12) part of it. (Or, if it is not about absolute exactness, it can be done visually.)

You probably want to parent the object to the centre empty.

This circle is "controllable" as you can simply change the angle by rotating the centre empty.


Animation on blender 2.72 does not work on blender 2.71

I have resolved this problem by checking this option


Weight painting vertex groups not entire object

AFAIK, and maybe someone will correct me on this, weight painting and assigning verts to a group are the same thing, assignment just sets weight to 1 for all assigned verts.  You may be able to assign this group to your particle system straight away.
A vertex group is basically just an extra variable attached to each vert that you can reference.  So by creating a new vertex group you essentially create a new weight paint mask where all verts have weight 0 (Blue).
I have had issues with rogue particles, not sure if I ever had a surefire solution other than what you've suggested or looking through seeds to find the least problematic one.


You can make each wall as a separate object.
Then just disable/enable them in the Viewport and Render

Use the toggles for Viewport/Render visibility

I know this is such a basic answer... but I've already built the walls...


There is no simple way for doing this because blender doesn't have proper ligth linking settings. You can try uncheck glossy from the ray visibility of your world,
but that's not ideal.

What you can do is put your HDR on two sphere objects, instead of world.
One of them with glossy uncheck from visibility rays.

Have two render layer one for the table the other one for the glass and exclude the reflective world for the first one.


Smooth Mesh Preview in Maya is the same as surface subdivision as far as I know. Subdivision modifier in Blender should give you very similar results. You can use Ctrl + 0/1/2/3/4/5 shortcuts to create a new Subdivision modifier and/or set the number of subdivisions of it.


Is blender actually useable for engineering?

TL:DR Blender is a weak app for actual engineering work, it's not a CAD software. - Instead try free CAD apps like FreeCAD, NaroCAD, SolveSpace, DesignSpark Mechanical, OpenFoam for CFD and I am sure many others.
I can recommend Blender for modeling objects to which you already know their design and parameters and you are sure the shape is mostly final (like modeling your living room or a part that broke and you need to 3D print it). Good for organic modeling through sculpting too. Blender is an app designed for animation studios and entertainment industry. Engineering workflow in Blender is slow and full of workarounds. You'll be fine with simple shapes, but not with engineering anything slightly more complex.
The bad:

There are no work planes
The modeling workflow is generally destructive
The procedural stuff (modifier stack, object nodes,..) has big limitations
You cannot easily constrain geometry elements together (parallel, tangent, etc. relationships)
NURBS or parametric surface tools are practically non-existent, so everything will be made from polygons. This can bring whole lot of problems you don't want to deal with.
No easy export into technical drawings

The good:

There is modifier stack providing functionality like Mirror, Array, Revolve, Boolean, etc. The stack itself is like modeling history tree. But some of these modifiers do fail if they encounter non-manifold mesh or flipped polygon normals. It's not exactly fool-proof.
You can tag measurements with MeasureIt addon
Blender is quite capable with 3D printing your stuff with the help of 3D Print Toolbox addon
With Sverchok addon (or Object nodes that are coming into Blender) you can create geometry procedurally - it is similar to Rhino's grasshopper
Visualization of your models is top notch, you can go photoreal


You need to go into Advanced options and select NEW:


what is the meaning of 4x4 projection matrix?

Camera matrix.
Answer here relates wiki link in title to produce the matrix based on camera data.
How can I get the camera's projection matrix?
What is blender's camera projection matrix model?
3x4 camera matrix from blender camera
Blender by default uses mostly 4x4 matrices to transform 3d vectors. https://en.wikipedia.org/wiki/Homogeneous_coordinates#Use_in_computer_graphics_and_computer_vision enabling the use of a singular matrix for rotation, translation and scale.
It slackly lets us multiply a 4x4 matrix by a 3d column vector to produce a 3d result.
Similarly the 3x4 camera projection matrix is used producing a 2D result,
Further from Camera matrix wiki.
Finally, also the 3D coordinates are expressed in a homogeneous representation ${x}$ and this is how the camera matrix appears:
$$ \begin{pmatrix} y_1 \\ y_2 \\ 1 \end{pmatrix} \sim \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \frac{1}{f} & 0 \end{pmatrix} \, \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix}  $$   or   $$ \mathbf{y} \sim \mathbf{C} \, \mathbf{x} $$
However we are also interested in projection giving the depth from image plane.
To the other bit, to convert to 3 rows 4 columns.  Blender matrices are defined in row order.
import bpy
from mathutils import Matrix

context = bpy.context
scene = context.scene
camera = scene.camera  # bpy.types.Camera
render = scene.render

# compute projection matrix -> Returns: 4x4 projection matrix
projection_mat = camera.calc_matrix_camera(
        context.evaluated_depsgraph_get(),
        x=render.resolution_x,
        y=render.resolution_y,
        scale_x=render.pixel_aspect_x,
        scale_y=render.pixel_aspect_y
        )

print(projection_mat)

M = Matrix(projection_mat[:-1])
print(M)

Result on default scene
<Matrix 4x4 (2.7778, 0.0000,  0.0000,  0.0000)
            (0.0000, 4.9383,  0.0000,  0.0000)
            (0.0000, 0.0000, -1.0020, -0.2002)
            (0.0000, 0.0000, -1.0000,  0.0000)>

<Matrix 3x4 (2.7778, 0.0000,  0.0000,  0.0000)
            (0.0000, 4.9383,  0.0000,  0.0000)
            (0.0000, 0.0000, -1.0020, -0.2002)>

Somewhat related in projecting scene objects onto camera plane. https://blender.stackexchange.com/a/160388/15543


Weird node setup when importing .obj file

That's just how the importer interprets materials that come with obj format. If there was some description of a material in the .mtl file it would construct this shader according to it.

You can replace them easily if you delete the material and make a new one. If for some reason that was not acceptable you could use Python to replace the nodes. Let's say it would be convenient for you to have standard Material Output node and a Diffuse BSDF and Glossy BSDF mix by Fresnel connected to it and you wanted to replace the nodes only for the materials that are applied to the currently selected objects. Python script would go like that:

import bpy

done_materials=[]

for every_object in bpy.context.selected_objects:
    try:
        for every_slot in every_object.material_slots:
            if every_slot.material not in done_materials:
                #print(every_slot.material.name)
                nodes = every_slot.material.node_tree.nodes
                links = every_slot.material.node_tree.links
                for every_node in nodes:
                    nodes.remove(every_node)
                diff = nodes.new('ShaderNodeBsdfDiffuse')
                diff.location = (-190,100)
                gloss = nodes.new('ShaderNodeBsdfGlossy')
                gloss.location = (-190,-20)
                mix = nodes.new('ShaderNodeMixShader')
                mix.location = (10,95)
                Fres = nodes.new('ShaderNodeFresnel')
                Fres.location = (-190,200)
                Fres.inputs[0].default_value=1.3
                out = nodes.new('ShaderNodeOutputMaterial')
                out.location = (200,95)
                links.new(mix.outputs[0], out.inputs[0])
                links.new(Fres.outputs[0], mix.inputs[0])
                links.new(diff.outputs[0], mix.inputs[1])
                links.new(gloss.outputs[0], mix.inputs[2])
                done_materials.append(every_slot.material)
    except:
        pass

And of course you would just need to have that pasted into a new text block in the Text Editor, select all the objects that you want processed and hit Run Script.


Create an object in the BGE via python without using an inactive layer

Yes, but only via LibLoad (which likely isn't what your after).

You can use LibLoad/LibNew to dynamically load data, then instance that.

You can load data from another blend file or, you can load an existing mesh (but NOT an object).

See these functions:

http://www.blender.org/documentation/blender_python_api_2_69_release/bge.logic.html#bge.logic.LibNew
http://www.blender.org/documentation/blender_python_api_2_69_release/bge.logic.html#bge.logic.LibLoad


I installed blender on linux, and by default OpenImageDenoise is not enabled, how to enable it?

In my case, I was getting this error on Ubuntu. I went to the Ubuntu Software app and realized there were two Blender packages, and the one I had installed was from the ubuntu-groovy-universe source, which was on an old version. Use the one from the snapcraft.io source. Switching made this work for me.