UVs looking weird when using the solidify modifier I'm working on an animation of paper sheets.
I want to keep things very simple since I'll have to animate a lot of them and don't want to complexify things if I don't need to.
So my mesh is just a subdivised rectangle :

But when I use a solidify modifier (to give the sheet some thickness), the edges of my paper are getting weird :

which is not the case without the modifier:

Does anyone knows what causes this and how could I avoid it ?

Thanks a lot

Your flat mesh likely has smooth shading enabled, which only becomes visible once you give it thickness. In object mode you can select your object and applied flat shading by using Object > Shade Flat.


Rendering depth of field through transparent objects in blender render i’m New to blender and I’ve had a dabble with rendering bokeh. I have made this image with transparent orange blobs in blender render using refocus node.

In the image the orange blob is in the foreground and the background is nicely blurred from the defocus node. Unfortunately where the background passes through the orange blobs the defocus is not rendered. The orange blob has transparency frezel applied. Anybody know how to get it to render bokeh through objects? Thanks!!

This is the downside of post processed depth of field.
You see, the depth map is a 2D image. To create it, rays get shot into the scene and depending on how far away from the camera they hit an object, the corresponding pixel gets a grey value. (white if in front of the camera, black if far away)

Because of that there is no information in the depth map how far away the objects in the background are. The same problem occurs if you render through a glass window. The depth map would be totally flat in that case.

So I would recommend rendering the scene with camera dof turned on, rather than adding it in post. Also, adding dof in post is a cheat and will never look as well.


3D Manipulator Axis Constraints not working I am a Blender newbie, working through the manual trying to learn modeling. I have found that when I create a new document (reload Startup file), the block object appears with the 3D manipulator showing, and when I click and drag on any of the three arrows, the movement of the block is constrained to the appropriate axis, as I would expect.

But, when I load my working document with some objects I've been playing with, the manipulators do NOT constrain the motion when I drag any of the arrows. The behavior is exactly like I'm clicking inside the white circle, but I'm definitely clicking well outside of it.

I can't seem to find any setting or mode difference that I can change to get the manipulators to work properly. Any ideas as to what obscure mode or setting I could change to restore the axis constraining behavior?

Nothing I have read in the manual suggests that there's any mode or option setting that would disable the automatic axis constraints when you drag on a manipulator arrow.

One possible clue is that I am modeling small objects just a few cm across, whereas the new document's default block is 2m across. Could my issue be caused by zooming in too far?

I have found other ways to accomplish the same axis-constrained moves, but I'd really like to use the 3d manipulator handles, and I'd like to understand why they're not working in my file.

Thanks in advance for any suggestions.

I found the problem. I'm not sure I have all the exact details, but in essence, the problem had to do with the scaling and dimensions within my model file. I mentioned that the behavior I saw was as though I was clicking inside the white circle. My model was imported from an STL file where the size of the largest object was about 6cm across. In order to get the sizes to look right, I made the following settings, which led to the problem:
1) In the properties panel (the "N" window), I set the Scale to 0.001 for each object in the model
2) In the Properties Editor (not the N window), on the Scene tab, I set Unit Scale to 1.0.

The solution I found was to reset the individual object scale values to 1.0, and then under Properties>Scene, I set the Unit Scale to 0.001. After making this change, the net size of things on the screen is the same, but Blender seems happier dealing with objects at 1.0 scale rather than .001 scale, and the 3D manipulator now works as expected. This is probably the more correct way to do things, and I learn best by example, so I'll remember this. I just wonder if maybe there's a bug in Blender because it seems that the effective size of the little white circle in the middle of the 3D manipulator is larger than the size on screen, like it's not following the object scale properly. Anyway, I hope my answer helps others at some point. :-)


How to save still renders straight to disk like animations? Animation frames get saved to disk automatically.

Still images do not.

Is there a setting that can be changed so that single-frame renders also get saved to disk automatically upon completion?

To clarify, I mean changing the behavior of the render function, not simply changing the frame range to Start:1 End:1 (for example) and rendering as an animation.

Yes, this is supported.

"Write Image" - it's an optional parameter of the operator, and can be set in the key-map editor.

(Preferences > Input > search "render")

In my case I have the shortcut for Render set to CmdR so it looks like this:

Just make sure to specify a file name:


Cycles rendering looks strange and simplified Here is my ViewPort rendering (which is good):

But my Cycles Rendering looks like this:

Any idea why this is happening? I'm new to blender so any help would be greatly appreciated.

This looks like an accidental Layer Material override. Check if your active render layer has a material set in the data field indicated in red in this screenshot:

Such an override replaces every single material on the RenderLayer with the one selected. It's useful for adding custom AO passes, Clay Renders, or diagnostic renders.

Click the small X icon next to the material to remove the override, and you should be back to normal.

By the way: By default the viewport renderer does not take Render Layer modifications into account. That's why you get a different result between the two. You need to explicitly tell Blender to do this using this Toggle Button while a viewport render is running:


Why are some Blender UI elements blue? In some tutorials I see that sliders, textboxes etc. in the Blender look blue like this one:

In my version of program these elements of UI are grey. Why is that?

These are called themes and they can alter the look and visual appearance of Blender UI.

You can change them from Blender User Preferences > Themes and choose from the pulldown menu on the top left.

You can also create your own, modify or customize existing ones or simply download third party created from the internet from places like BlendSwap or search in forums like Blender Artists


Animation Nodes slow performance I've just started playing with the add-on and created some simple tree to generate tiles but the it works very slow. Currently I have weak machine and the procedure may not be super optima but even very little amount of geometry (700 verts) take ~1.5 s to generate. I don't know if I did something wrong or the add-on it not optimized yet.

The slow performance is most likely due to your unorganized and unoptimized node tree. In order to identify the source of the regression, we can measure the execution time of each of the individual nodes and identify the node(s) that takes the most time and try to refactor them. This measuring can be activates by pressing the details button here:

In your node tree, my best guess is, your Plane subprogram always generates the same mesh, yet you compute the mesh at every iteration! So simply move the node generating the plane outside of the loop and pass it as a parameter. Moreover, don't reinvent the wheel, use the Grid Mesh node instead. Also, remove all those viewer nodes, they have some impact on performance.


I want to apply a difference boolean using a collection and not an object So basically I am pretty new to blender and so far I have finished only 3 projects using some tutorials. Currently I am trying to build a cabinet for pc. I created a cube and also created a collection of objects to be differentiated from the mesh so that I can have holes on the back side of the cabinet(For the air ventilation).
The problem is that I want to differentiate the entire collection. I tried doing it with the Bool Tool but when I click on differentiate it also applies my solidify modifier. The brush boolean thing seems to work but then I have to apply it for every modifier of the brush. Is there any way around this.Also I cant add the solidify modifier after the boolean because it is messing up the mesh
Any help is appreciated
Thank you

Starting with Version 2.91 you can use a collection as input in a Boolean modifier.
Warning : The Exact solver can be quite slow when used with multiple meshes. I suggest setting it to Fast first.


Making factory conveyer belt Here is a picture of what I am trying to make :

I am trying to make that pink factory belt but I cannot find any references :(
How can I make those repetitions of rectangular shapes (pink) and make them smoothly wrap around the round roller sticks (grey) below them?
Thanks a lot

Start by adding a Bezier Curve. Enter edit mode and select the whole thing with A. Press V + V and then V + L to straighten it and align the handle vectors.

Now duplicate the curve with Shift + D, and translate it up a bit on the Z axis.

Now duplicate the pair and move it an equal distance away on both the X and the Y axis. Rotate 90 degrees to make the L shape.

Now, select the points you want the path to follow and join them by either right-clicking and selecting "Make Segment" or by pressing F (For example, the top and bottom end points, and the "elbows").

Now add a plane to make your "planks" (you can make a block if you want, I just did a plane for ease.)

Give the plane an Array Modifier, and a Curve Modifier. Select the Bezier Curve as your curve object, and adjust the repeat amount and the offset of the array to your liking.

For the rollers, go back into edit mode (on the curve) and select only the top points. Duplicate them and translate down on the Z to halfway between the top and bottom "edges" of your main curve. Press P and select "Separate". Keep in mind that you may need to extend the ends slightly to make it fully take up the space beneath the conveyor belt (The "conveyor belt" is hidden in this image)

Now, go back to object mode and create a cylinder to your liking:

Now do the same thing as before, add an Array Modifier and a Curve Modifier to the Cylinder, but this time choose the new (separated) curve as your curve object:

Final result all together looks like this (be mindful as the "corner" cylinder stretches a little - try and scale it or hide it to compensate. If anyone else knows of a way to not have this happen, I would really love to know what it is.)


Why does Denoising take up so much memory? I tried to render my scene with the new 2.79 Denoiser.

During the Rendering Process everything was fine, my memory peak was about 1000M but as soon as the Denoising started it suddenly shot up to ~2000M and gave me the "Out of memory in CuMemAlloc[...]" error.

Is Denoising usually taking up so much memory and why?

Like Cegaton said, it uses the other tiles in the memory. Using that logic, I ran a test, and found that if you reduce the tile size (in the performance pulldown) the image renders using much less. My file was usually around 1.3GB when rendering, but as soon as the denoise kicked in, it shot to 9GB, but I reduced tile size from 512 to 256, and now, the entire image rendered with denoising maxing at only 1.7GB.

So if it crashes, just remember that you can reduce the tilesize, and you should be fine.


What is a shadow ray? I have read the Blender documentation wikis on both the light path node and on light paths.  But neither of them seems to clearly explain what a shadow ray is.

For instance, the light paths wiki says:

  Shadow: the ray is used for (transparent) shadows

It then shows a diagram with the ray labeled “shadow” going (backwards) from a surface to a light source.

This doesn't make much sense to me.  The text doesn't make sense because in cycles (as far as I know) a shadow is just an area with less light than the areas around it, which is not a technical value.

From the diagram, it looks like a shadow ray is a ray that is about to hit a light source (speaking from the actual backwards ray-tracing point of view).  But I don't understand how that works either, how can cycles know what a ray is about to hit?  Especially if that information could be used to change the direction of the ray.

So what is a shadow ray?

Shadow ray is the last segment on the light path traveling through the scene (from camera to light source). It is just a technical term, only a label. In nutshell it marks anything that goes to light.

When the light path begins, it starts as a camera ray, when its reflected it becomes reflection ray, when it goes through glass it becomes transmission ray and from the last point to lamp it is shadow ray. These are the base 4 types of rays in cycles (they divide more into diffuse, glossy etc. also).

With Light Path node and Shadow rays, you can for example color shadows to some tint of your liking. Here the object will be transparent and blue for the shadow part of path but opaque and green for the rest of it:

Note: In 2.75 rendering colored shadows from transparent objects is buggy - when adding Transparent BSDF in rendered viewport the shadow won't be colored - you need to restart the render-viewport (on CPU and GPU).


Match shape key index and a driver index This started with this question.
I have a list of shape keys where some have and some don't have a driver. How do I get an index of a selected shape key driver? I thought of inputing just the index of the shape key but that of course doesn't work because they don't matchup.

My end game is to input the index of the selected shape key and get the name of the target bone which drives the selected shape key
Here is the code that I have currently (I currently get the name of the bone on the driver index 0 because I set it to that but of course I want that to be dynamic):
import bpy

#Defines the Basis name.
selected = bpy.context.object.active_shape_key_index
bpy.context.object.active_shape_key_index = 0
basis_name = bpy.context.object.active_shape_key.name
bpy.context.object.active_shape_key_index = selected

#Defines the selected shape key index.
selected_shape_key_index = bpy.context.object.active_shape_key_index

#Defines the selected shape key name.
selected_shape_key_name = bpy.context.object.active_shape_key.name

#Defines the selected shape key collection.
selected_shape_key_collection = bpy.context.object.active_shape_key.id_data.name

#x is the index of shape key with a driver. In my scene since I have 2 shape keys with drivers the index goes from 0 to 1.
x = 0

print(bpy.data.shape_keys["ShapeKeyCollection"].id_data.animation_data.drivers[x].driver.variables[0].targets[0].bone_target)

This is the little test/example file (Blender 2.9 alpha):

I figured out a way of how to get a name of the bone that is driving a shape key. Although it is a bit hacky and it does work for only the first target in the driver. Also I abandoned the idea of trying to match the shape key index and the driver index. Now I use the shape key name to get the index of the driver if that makes sense.
import bpy

selected_shape_key_collection = bpy.context.object.active_shape_key.id_data.name
selected_shape_key_index = bpy.context.object.active_shape_key_index
selected_shape_key_name = bpy.context.object.active_shape_key.name

name_list = []
for x in bpy.context.object.active_shape_key.id_data.animation_data.drivers:
    #Hacky because I don't know how to get just the raw names so I used .replace
    name = x.data_path.replace('key_blocks["',"").replace('"].value',"")
    name_list.append(name)

if selected_shape_key_name not in name_list:
    print("No")
else:
    driver_index = name_list.index(selected_shape_key_name)
    print(bpy.data.shape_keys[selected_shape_key_collection].id_data.animation_data.drivers[driver_index].driver.variables[0].targets[0].bone_target)


My viewport rotation is inconsistent. Is this a bug or an option I misclicked? I've recently started using Blender 2.9.0. I just realized that the viewport rotation around an object is inconsistent. Most of the times it is clockwise if i hold down my MMB and move my mouse to the right but it has a ~10% chance in rotating counter-clockwise.
Video of the issue

The viewport is behaving as it should.
The behavior of viewport rotating is dependent on which axes are active (see the axis gizmos on the top right hand side of the viewport). The active Y axis is changing here and there (between -Y and +Y) because each time you rotate, you're not returning to the same spot and sometimes you cross over the XZ plane and the view angle is interpreted as upside-down. I assume that it rotates the opposite direction when the viewport camera is upside-down as a visual indicator of that fact.


How can I make a shader or change the scene lighting to make glass less reflective? How can I adjust the lighting and create a glass shader to make an object less reflective like these:

I tried this:

But it doesn't reflect at all:

I think the basic node organization for glass is a mix between Glass and Transparency. The more your mix will tend to Transparency (Mix Shader value) the less it will be reflective. The Glass Roughness will make the glass more polished.

You can mix that with a Glossy Shader with a Layer Weight as factor if you want to add reflectivity on the normals for more realism, and same thing, play with the Layer Weight value.


Cycles Rendering Problems on the RX 5700 XT on Windows and Linux I have a system with an Intel 8700k and an AMD RX 5700 XT.

The first image is the rendered with the CPU without issues:

The second via GPU on Arch Linux with the newest updates:

The third via GPU on Windows 10 also with the newest updates:

As you can see there are problems rendering the image mainly in the face and grass. I tried the release directly from the blender website and from the repositories without a difference and sometimes my PC completely locks up.

Is this an error that I can fix or is this a driver problem where I have to wait until my graphic card drivers get updated?

I also got the problem. It only works with  the Enterprise Driver from AMD. https://www.amd.com/de/technologies/radeon-pro-software
With every other driver than that, I dont get any render on GPU running with my 5700xt GPU.


Mesh auto unhide when select another object Please tell me how to "permanently" hide part of a mesh.
In edit mode, I  select mesh of object "A" then hide, but when I select another object, that part of object "A" is automatically unhidden.
Any help would be really appreciated

One way is with the Mask modifier:

In edit mode, select the part of the object you want to hide (or the inverse; the part you want to remain visible)
Create and assign a vertex group in Properties > Object Data
Add a mask modifier and specify the vertex group. Click the invert button if needed.


Render quality suddenly changed? last week I tried rendering with low resolution quality. Then I switched to 'HDTV 1080p' preset and it rendered well for some time (rendering took cca 4 minutes per image).

Today I tried to render again. I've checked preview and it looks OK (preview takes up to 2 minutes to render), but when I click actual render button, it gives me a poor image with rendering time 0.25 seconds.

I don't remember changing any settings, but obviously something has changed? I cannot seem to find the reason.

Here is the preview:

Here is the final render:

Settings: (cycles render):

Help :(

Thanks in advance, Gregor

I found the problem. I have previously made a animation out of images in sequence editor. When I clicked render, the computer did not do any rendering, it simply loaded already rendered image.

I fixed this simply deleting all the time strips @ Video Sequence Editor. Now it does surely take up to 5 minutes for one frame to render. :)

Cheers for all the help!


send instructions to blender from external application I need to send instructions to blender trough an external application.

for example: import model to current scene

Is this possible? Can someone point me in the right direction based on previous experience.

Thanks in advance

Ghus

You could poll a file with instructions or use sockets (for remote networks) or something else from pythons interprocess communication.

Using a file could be quite simple, the basic idea is to execute the statements in a loop:

Process A                           Process B(lender)
------------------------------------------------------
                                    File exists No -> sleep
Create file with instructions
                                    File exists Yes -> read and execute statements
Does file still exist Yes ->sleep
                                    After execution delete file

While Process-A just needs to print some lines in a text file like:

import,file1.obj
import,file2.obj
import,file3.obj
cancel,none

The Blender side could be timer operator (based on the build in template) it actually reads the commands from the file (the last command 'cancel' deletes the file and stops the timer):

import bpy
import os.path

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None
    filename='C:\\dev\\command.txt'

    def modal(self, context, event):
        if event.type == 'TIMER':
            if os.path.isfile(self.filename):
                for line in open(self.filename):
                    line=line.rstrip("\n")
                    cmd,arg = line.split(",")
                    if cmd == 'import':
                        print('import requested file=%s' % arg )
                    elif cmd == 'cancel':
                        self.cancel( context )
                    else:
                        print('unknown request=%s arg=%s' % (cmd,arg))
                os.remove( self.filename )
                print('command file removed')
            else:
                print('waiting for command file=%s' % self.filename )

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        self._timer = wm.event_timer_add(5, context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)
        print('timer removed')

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.modal_timer_operator()


How to apply a uv map texture to a mesh when looking from the side, rather than for the whole mesh I want to apply a UV - texture just to the side of a mesh, without it covering the whole model. When using the Image texture nodes, the texture distorts on the actual model. Example of the texture:

I think what you're looking for is "Project From View". First, pick the angle you want to capture it from - in your case, the sides. I find the best way is to use an orthographic side view using Numpad 1 or 3 keys.
Then, in edit mode, select all the faces on the side of the "airplane" (you can use circle select to get them all quickly since you are in side orthographic - However, if there are un-viewable sides/crevices, make sure to manually inspect to make sure they're all selected - as you can see in my second image, I was lazy and only circle selected so there are some pieces missing.). Once you have the angle, and the faces selected, press U and select "Project from view". Do the same thing for the other side if desired (to quickly switch view to the other side, press Numpad 9).

On your UV map, you will have both sides selected (there will be other pieces too, but the sides will be captured "intact"). Move the other pieces as necessary (or give them a different material). You will then be free to align your "sides" with your image.

Note that if there is significant curvature in the selection you unwrap together, some areas could come out warped. If this is the case, you can select the whole section, while keeping a rectangle (or square) shape as the "active" selection, then pressing U to unwrap again, but this time select "Follow Active Quads". this will straighten out the section according to the shape of the quad you had active. Do this in the 3D viewport, not the UV viewport. The closer to a rectangle shape that is aligned both vertically and horizontally (ie ideally a perfect rectangle with 0 rotation - this is not always a realistic expectation), the better the results of this operation.


Is there a way to add hair texture to 2d? Same as the title. I want to know a good way to get some hyper-realistic hair for 2d. Is this possible, or do I have to make a completely new 3d scene and add hair to that; if so, how?

Yes, you can add a texture of hair exactly the same way you add any other textures for shaders for the rendering engine you use.

Will it look hyper-realistic or realistic or even good? Most likely no. Hair is visible outside the surface and because of that in most situations making hair in CG requires some sort of structure. There are many ways to create hair in Blender: hair particles could be used in multiple different ways or you could also use geometry with transparent textures, in some specific situations displacement or sculpting combined with texturing may work.


How to create a seamles UV map for an hexagonal grid texture? I have very little experience unwrapping UVs. I'm not able to wrap my head around how to seamlessly create the texture for a beveled rectangle.

Here was my attempt when UV unwrapping it. I ended up with large, ugly seams.

In Rocket League they not have seams, but their texture was not a simply repeating hexagonal pattern like mine was. Theirs was filled with irregular sized hexagons, as well as pentagons in some places where the pattern needed to transition and curve.

I'd love any direction as to how you think the developers might have accomplished this seamless, custom UV texture.

I haven't played RL in a while, but are the ceilings the same beveled rectangle shape?

It looks like your images are being stretched as they get closer to the beveled edge.  It also looks like your screenshot isn't from Blender, so I don't know how to do it in whatever software that is, but if you're working in Blender I'd suggest going to UV mode and adjusting the vertices until it looks better.  Also, check your texture and see how the edges line up at the top/bottom and left/right.  It might take some photo editing and/or scaling to get it to work.

Good luck!


How to grab individual vertex in UV editor? I want to align a line of vertices in a UV map of an object I am modeling, but whenever I try it moves all other vertices connected to them. How do I just select a single vertex while UV modeling?
Selecting a vertex (in this case, two vertices overlapping, but the same applies when I select one)

It selects a vertex (or vertices) that are connected even though I didn't select them

You can disable “Sticky Selection” mode in the dropdown menu to the right of the vertex/edge/face select boxes


My texture is deformed! When I apply a texture to my surface this is what happens.

Can someone help?

It may be because your UV map is deformed. Check in the UV editor and if your map seems deformed: in the viewport select the top of your counter in edit mode, go in top view by pressing 7 then press U and click Project from view. (Scale your UV map afterwards to get a decent result)

It should work after that ;)


Fake Motion Blur on Video Footage using Compositor I have a stop-motion video I am working on, and I want to add motion blur to the character of the video. The character is the only thing that moves, yet if I use the Vector Blur node in the compositor, it applies a blur to every object. If I set min-blur up too high, it doesn't allow the character to have motion-blur, but it I have it too low, it makes everything blurry. Is there a way to fix this or do I need to use another node to add motion blur? I am trying to simulate what After Effects does when you add the Motion Blur effect to footage. Here's an image of my trouble. I have used a split-viewer so you can see the difference between original and current motion blur settings. (You'll have to view the image larger, you can barely see it in the small preview)

I am afraid that there is no optical flow available in Blender at this time. Optical flow technology uses motion vectors to estimate motion vectors across an image.

To simulate something similar try animating a pseudo mask object that follows the moving 2D image. You can animate it manually or you could use the tracker to follow elements of the animation then hook an object to it in 3D view. Take these actual object movements to use as vectors for the compositor.

For a better result, you can separate the character from the background if you have a clean plate of the background using a Difference Key node.


Make changes in python scripts of addons effective I am using blender with an addon called blensor. I have some trouble with this addon and would like to alter its code at some place to see the effect my changes made.
Here is a working procedure:

Edit the appropriate python file of the addon in a text editor and save.
Restart blender
Change is visible when running addon

This however is quite tidious for debugging. It would be nice to be able to reload the addon without having to restart blender. I did some research and tried to following, with no success:

Pressing F8 within blender. Looking at the console I can see that blensor seems to be reloaded but the changes I made are not visible when running it. Maybe the output "addon_utils.disable: cycles not disabled" in the system console means something?
Opening the python script in blender's text editor, changing and saving it and clicking Text -> Reload. Does not seem to have any effect.

Any other ways or idea what I am missing?

I am the author of the blensor addon.

I used the tip from CoDEmanX and just implemented the reload functionality in the blensor module.

If you have an older blensor version and don't want to compile it from source you can manually add it by changing the file __init__.py

Everything above __version__ has to be changed to

import sys
import traceback
from mathutils import Matrix
from math import pi
import types
import bpy

import blensor.blendodyne
import blensor.depthmap
import blensor.tof
import blensor.evd
import blensor.ibeo
import blensor.generic_lidar
import blensor.kinect
import blensor.exportmotion
import blensor.mesh_utils
import blensor.noise

"""If the blensor module is reloaded, reload all submodules as well
   This will reload all modules at the initial import as well but
   that should not be a problem
"""
import imp
locals_copy = dict(locals())
for var in locals_copy:
    tmp = locals_copy[var]
    if isinstance(tmp, types.ModuleType) and tmp.__package__ == "blensor":
      print ("Reloading: %s"%(var))
      imp.reload(tmp)

After that hitting F8 should reload the submodules as well.


Cintiq pen pressure not working in texture paint I can't get the pen pressure option to work, best way to describe it is permanently stuck at full pressure. The worst part is I was able to use it normally maybe a month ago.

I'm pretty sure it's blender and not my drivers or the cintiq itself as the pen pressure works fine in other programs. I've already tried restarting/stop and starting the tablet driver, restarting my computer, opening blender with my cintiq pen, turning off strength and only having pen pressure selected, switching to blender render instead of cycles, and I've unplugged and re-plugged in my tablet.

The best I can figure is based on the only other case I could find that was similar, where blender was registering the tablet as a mouse behind the scenes. Problem is, that case was for yiynova tablet on a linux computer, and I have windows.

Any ideas on what process might be off would be off and how to fix it would be appreciated

I reinstalled the tablet program from the cintiq disk, restarted, and that was enough. I presume it was from windows updating as that's the only thing that changed.


Cycles/ CUDA out of memory (sometimes) like many other posts, I am getting CUDA error: out of memory when I am rendering out many images for an animation.

But- when I close Blender, and restart the rendering process from the stopped image, then the rendering works fine again for a while.  This really confuses me- because if the scene requires larger memory than GPU's memory, shouldn't it have an error message all the time?

I am curious- is there a function in Blender rendering, where the GPU memory starts to save and accumulate for a faster rendering?  In the attached image- I noticed that another memory number does get larger as I render out more and more images in one rendering session.

Can someone explain what this number is? And how I can avoid this out of memory problem when rendering out large number of images (say more than 3000 pictures)?

Thanks!

Memory on the left is your VRAM and on the right it's your RAM.

441Mb of VRAM is not much though, what's your GPU? You probably want to upgrade if you are going to use it to render.

You can also try to optimize your scene, easiest way to do this is to bake as much things as you can, lower texture resolution and your number of polygons, create instances instead of duplicating object data. Also you can probably reduce lights bounces but I'm not certain this would help.

That or just render with your CPU (it will take longer but will store data in RAM instead of VRAM). How much RAM do you have?

Google 'Cycles Optimization VRAM' for more info on the subject.

Here you'll find a way to launch Blender in debug mode to troubleshoot memory usage: How do I see what is using Memory?


What is this artifact from baking? This is following a recent bake,the bake when well except for the artifact over the ears.  Not sure why it happened, I did have separate items selected to one active mesh.

This looks like the effect you get when you have 2 UVs in the exact same location.
If you're using the exact same UV on the other side, the bake gets info from both sides, giving these kinds of issues.
To fix this and still use the same UV, temporarily move 1 of the UVs of to the side of the UV-grid, bake your mesh, and move it back.


nodes missing from node editor The default defuse node missing from node editor - i have tried repairing / did a reinstall -- changed the cycles render // chose use node editor from the material tab. Blender 2.78c. I cannot insert or create a new node.

here is the screen shoot.

ahh... my bad.. the use node check box was not ticked.


Blender Game Engine, Falling Through Ground I'm making a first person view game, and I have a big low-poly hilly terrain.  Occasionally while testing, my character falls through the ground.  What is the best way to fix this?  I've heard that increasing the physics steps can help but I don't believe it has.

Set the physics type on your ground to triangle mesh. That should fix it, But if it doesn't not, you can also turn up the margin or extrude the ground down in edit mode.

It is possible that your ground is not calculating the collisions correctly, and changing the collision bounds on the ground should fix it.

If your problem still happens, you can also try changing the collision bounds on your character. If you are still unsure what the problem is, you can activate "Physics Visualization" to show exactly what is or is not working.

Notice the difference between these pictures. The first is using triangle mesh collisions on the ground. The second one is using box collision type.

Although there is normally no problem with box Or triangle mesh, sometimes there is still an error and the collision bounds will not detect properly. In this case it is normally a good idea to try a different type, or increase the margin.


Same material different result within object Prologue:
Minor issue that I do not seem to figure out, I've modeled room with some basic things that i've created from the scratch but now there is weird issue with wallpaper material.

Description:
All of the 3 walls are part of the same box object, they have same material and they have been uv mapped the same way on same scale yet the wall on the right displays on grey color instead of the white like the 2 others.

Steps taken:
I've deleted the wall with the issue, recreated it, uv mapped the whole thing again and ended up with the same results. Also went through recreating the material with same result. Checked the direction of normals.

Plea for help:
Any ideas what might cause this, still new to the cycles so would appreciate the insight to the problem so I can learn from it.

Thank you in advance.

Solution:
After fiddling around for while with the issue, recreating and mapping the room also redoing the material and lights ending up with the same problem. The solution to the problem was adding a normal map node in between the Image texture and Diffuse BSDF

Result:

Thank you everyone for input, hope this helps out someone in the future.


Sniper bolt warping when rotated in pose mode I'm trying to rig a bolt action sniper. I made sure the bone root was in the dead center of the bolt's selected vertices. However when I go to rotate the bolt's bone in pose mode, the bolt warps and basically looks like its being scaled down. How do you properly set up a bone on a sniper bolt? So it can be realistically rotated bolt-action style?

Blender file just int case

If a vertex is assigned to two or more bones, its movements will be conditioned by the position of all the bones involved, while if it's assigned to one bone only (even with a small amount of weight) it will follow the movements of that bone exactly.

The "correct" way to rig, in your case, could be to have a bone controlling all the gun except the bolt vertices, and a second bone - child of the "main" bone - controlling only the bolt vertices.

In this way you can avoid any deformation of the objects.

Don't use automatic weighting, use "with empty gorups" option instead, then select all the bolt, select the bolt bone's vertex group and click "Assign" button underneath the vertex group list.

Do the same for the main bone (which has to be the parent of the bolt bone), selecting all vertices except the bolt.


Selecting armature via Blender's Python API If I use the outliner, I can select a skeleton and include it in an FBX export by hand.
How would I do this programmatically?

The goal is to be able to export multiple meshes with the same armature to separate FBX files.
Right now my script looks like the below, but it doesn't export the armature correctly.

import bpy

def export_clothing_items_to_assets_directory(assets_directory):
    objects = bpy.data.objects
    for object in objects:
        if ("_shoes" in object.name or "_top" in object.name or "_bottom" in object.name):
            bpy.ops.object.select_all(action='DESELECT')
            object.select = True
            for bone in bpy.data.objects[0].find_armature().data.bones:
                print("Selecting", bone.name)
                bone.select = True
            export_path = assets_directory + object.name + '.fbx'
            bpy.ops.export_scene.fbx(filepath=export_path, check_existing=True, axis_up='Y', axis_forward='-Z', filter_glob="*.fbx", version='BIN7400', use_selection=True, global_scale=1.0, bake_space_transform=False, object_types={'MESH', 'ARMATURE'}, use_mesh_modifiers=False, mesh_smooth_type='OFF', use_mesh_edges=False, use_tspace=False, use_custom_props=False, add_leaf_bones=False, primary_bone_axis='Y', secondary_bone_axis='X', use_armature_deform_only=False, bake_anim=True, bake_anim_use_all_bones=True, bake_anim_use_nla_strips=True, bake_anim_use_all_actions=True, bake_anim_step=1.0, bake_anim_simplify_factor=1.0, use_anim=True, use_anim_action_all=True, use_default_take=True, use_anim_optimize=True, anim_optimize_precision=6.0, path_mode='AUTO', embed_textures=False, batch_mode='OFF', use_batch_own_dir=True, use_metadata=True)

export_clothing_items_to_assets_directory("D:/tmp/")

I would like to select the highlighted object in this image:

When I try to select from the armature object, an error is thrown that Armature type cannot select.

>>> bpy.data.armatures[3].select = True
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'Armature' object has no attribute 'select'

Selecting the MBlab_sk3213u120r3289hyf38u9ghqf object will grab the data.


How to move bone to the object position? I made a simple sphere and a bone. I want to place a bone in the center of the sphere.

I want to just place it, not bind or constraint.

I don't want to change the rotation and scale of the bone

What should I do?

You should be able to:

Switch to object mode
Select the sphere
Object -> Snap -> Cursor to Selected
Select the bone/armature
Object -> Snap -> Selection to Cursor

This will move the entire armature so its origin is at the center of the sphere.

If you want to move the bone without affecting the armature origin (or if you have a multi-bone armature and only want to move one bone), then:

As above, set the cursor to the sphere's origin.
After selecting the armature, switch to edit mode and select the target bone.
If there are multiple bones in armature, make sure the target bone is disconnected (AltP -> Disconnect Bone)
Armature -> Snap -> Selection to Cursor


Duplication with rotation only on the Z axis I'd like to know if it's possible to duplicate an object along a curve so that it follows the curve but only rotate on one axis (Z axis), and not on the X or Y axes. First picture is the result I want, second picture is the result I get with an Array + Curve Modifier. Dupliframes doesn't give any good result either. Thanks in advance!

file is here: http://pasteall.org/blend/index.php?id=48706

EDIT : solution found with a Dupliframes, then a Constraint > Limit Rotation for my object... Thanks everyone

Until 2.79: I use Dupliframes, then I use a Constraint > Limit Rotation for my object, and I click on Limit X and Limit Y.
Since 2.8: See Gorgious solution here.


Cycles having trouble calculating light from multiple emission objects I'm working on a lamp scene following a tutorial (kind of like the Pixar intro). However, I've noticed a problem with the lighting. I have a large weak light (plane) that lights the scene, but when I have it active the light from the lamp object doesn't show up on the background plane hardly at all, unless I really crank up the samples (I've gone up to 4000 and it still looks not great).

Pictures for reference (rendered with 100 samples):

Here the lamp is the only light source.

Here the secondary light source is also rendered. As you can see, this makes the light from the lamp really grainy... hardly even visible.

I understand that it's harder to compute for multiple light sources, but in the past I haven't had these problems with Cycles. Then again I've never had to use such a harsh light. Is there any way I can fix this?

Thanks!

Try disabling multiple importance sampling in the material settings of the large emission plane.

I'm not sure exactly how multiple importance sampling decides what to do, but I suspect its deeming the giant emission plane much more likely to contribute to those samples than the tiny mesh light inside the lamp mesh.
As a result, it concentrates its efforts on the big mesh lamp, at the expense of the little mesh lamp. Disabling MIS on the big lamp takes it out of the importance sampling equation entirely, so special treatment is concentrated on the small lamp again.

You can also use a spot lamp in place of the tiny mesh lamp. In general, the lamp primitives are faster and less noisy than mesh lights.


Operator's, How to detect `MOUSEMOVE` inside of `LEFTMOUSE` event I'd like to track mouse movement with the MOUSEMOVE event only while LMB is held down, but can't seem to get the two to play nicely together.

What I tried was:

if event.type == 'LEFTMOUSE':
    if event.value == 'PRESS':
        *some initialization code*
        if event.type == 'MOUSEMOVE':
            *the rest of the code that relies on mouse movement data*

Is there a way to do this?

If event.type is LEFTMOUSE, how could it be MOUSEMOVE at the same time?
(exclude quantum mechanics)

The modal() method is called for every event, so you need to "remember" the left mouse state for the subsequent calls on MOUSEMOVE events:

import bpy
from bpy.props import IntProperty, FloatProperty

class ModalOperator(bpy.types.Operator):
    """Move an object with the mouse, example"""
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    first_mouse_x = IntProperty()
    first_value = FloatProperty()

    def modal(self, context, event):
        if event.type == 'MOUSEMOVE':
            if self.lmb:
                delta = self.first_mouse_x - event.mouse_x
                context.object.location.x = self.first_value + delta * 0.01

        elif event.type == 'LEFTMOUSE':
            # we could handle PRESS and RELEASE individually if necessary
            self.lmb = event.value == 'PRESS'

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            context.object.location.x = self.first_value
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        # variable to remember left mouse button state
        self.lmb = False

        if context.object:
            self.first_mouse_x = event.mouse_x
            self.first_value = context.object.location.x

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.modal_operator('INVOKE_DEFAULT')


Animation is rendered in Eevee instead of cycles I did an animation which i rendered to PNG using EEVEE for preview/testing purposes and after deciding i was happy with it, i tried rendering with cycles and it rendered in EEVEE.

I thought maybe i needed to close and restart Blender, and even deleting the original EEVEE renderings from the folder but i ended with the same result, I know it's probably only a schoolboy error but i'm lost. Thanks in advance

This happened to me, here is how I fixed it.

I rendered an animation in EEVEE to see what it was like and then created a video using the video sequencer.

Next day, I decided to do a Cycles render, but regardless of settings it always seemed to render an EEVEE render for both single image and animation.

Then I realised, I still had the EEVEE png files referenced in the Video Sequencer.

I deleted the strip, and then Hey Presto, I got Cycles rendering back!


Change the position of a face in real time I'm using BGE and I want to change the position of a face of a rigid body while the game is running. I don't know how to do it in Python. Thanks for your help!

This example moves the top face of the default cube in the default scene:
Note the print( dir ( some_obj )) statements, this helps to examine the data structures:

import bge
import bpy
cont = bge.logic.getCurrentController( )
own = cont.owner
scn = bge.logic.getCurrentScene( )
obj = scn.objects["Cube"]
mesh = obj.meshes[0]
print( dir ( mesh ))
for i in range( 0, mesh.numPolygons ):
    poly = mesh.getPolygon(i)
    if i==1:
        print("v1=%d v2=%d v3=%d v4=%d" % (poly.v1,poly.v2,poly.v3,poly.v4))
        vert = mesh.getVertex(0, poly.v1)
        print( dir (vert))
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v2)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v3)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v4)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]


Gun shooting repeatedly in cycles? I've been trying to find a tutorial for how to animate bullets firing successively (including shells ejecting) but all the tutorials seem to be in the game engine.  Is there a way to do this in cycles?

Thanks

Short answer: yes.

Your best bet is to start by creating an animation for firing once.

Then for things like the muzzle flash you can loop that animation (either using multiple strips in the NLA, or a cycles modifier on the fcurves of its animation).

For the bullets, you probably want multiple objects in case multiple bullets are in-camera.  They can share an animation that is shifted in time using NLA strips.

The casings will be similar to the bullet: having multiple objects that share an animation using NLA strips displaced in time.

(edit:)

Keyframing the hide_render property (the camera icon in the outliner) is a popular technique for making something appear/disappear (bullets, shell casings, although you could also conceal them inside the gun's polygons where the camera can't see them)


Why is my Array Modifier not curving my mesh like a square mesh? I have done the procedure on YouTube about curving meshes with the axis,when I want to create an 8 pedal type of flower guard rotating on the y axis like the refrence photo my sword would create 3 extra meshes than when i try to rotate the mesh It creates a car tire like view turned at a certain angle

Arrayed Mesh

Angled Car tire like Mesh

Try selecting the object that you are modifying with an array, and choosing Object | Apply | Rotation & Scale.  Whenever I have weird effects using an array modifier, it's usually (99% of the time) because I haven't applied the rotation and scale.


Whats the cheapest particles to use? Both in Blender Render and Cycles So, if I want to use an insane amount of particles, what is the cheapest render setup? In PCU usage?
In Unreal Engine the sprite particles (billboard) are very cheap to use, but can be set to use GPU instead of CPU.
In Blender, will they be much cheaper to use on a CPU than low poly mesh objects?
Would a plane with texture and alpha work just as well, for use in cycles for example?
Can I use the GPU for the billboard particles in Blender?

Would love to get some more information on this. Could not find the answer anywhere.

I think the best thing to do is to benchmark. My five cents are that (personal best guess based on seven years of Blender usage, but not backed by actual tests):

If you are only rendering the particles (black or photographic background), you can get away by using only one (or 2 for antialias) sample in Cycles. It should be fast.
If you have something else Cycles-powered in the scene, you would have to crank up the samples, thus rendering bounces from  the particles. That could be a real pain. You may want to do a mixed composite.
If you are doing it in the internal in the first place, stick with it.

Using the "Halo" setting (in the internal) could give more pleasant results than "Billboard" if you are doing sparks or somesuch.

Cycleswise you could give a shot at the new point density input for a volume. It has the good side of not requiring you to make physical planes orient themselves to the camera. I am pretty sure it is far slower than anything else though.


How can I stop the mesh from stretching when posing? I'm trying to rig a model starting from a rigify metarig and it's been going pretty well. It looks like, though, the mesh is morphed and stretched everytime i pose it, which is a problem mainly for the head and hands. Is there a way to make these parts rotate while keeping their shape and size? Am I doing something wrong? (probably but still)

Apply the scale on your armature.

Select the armature and go to Object Mode.
Press ⎈ CtrlA > Apply Scale.


How can I recreate an Icosphere made of separate triangles with AN? The idea is to recreate the icosphere with triangle objects for further animation.

This here is maybe not the fastest method but it is quite easy to implement:

You see it already takes more than 8ms, maybe it would be good to "bake" the triangle objects before you continue to work on your animation. To do that you can eg copy all the objects and remove the node tree afterwards. Alternatively you can also go into the advanced settings of the Object Instancer node and click on "Unlink Instances from Node" and remove the node tree then.


How can I connect multiple bones to one? As seen in the image below, I'd like to connect the tails of bones 1-5 to the head of the target bone, in a way that allows the connected bones to rotate accordingly when moving the target bone.
Is that even possible or does Blender require its usual black magic to make something as simple as that work?

Bones 1,2,3,4,5,suspens, are all child of bone "control", which can move up and down and rotate left/right.

Suspens has a "stretch to" constraint pointing to "car" bone. Bones A,B and C have a "stretch to" constraint pointing at 2,1 and 5.

Car and Car2 are parented also.


Why is my sculpture growing sharp and edgy when I try to (for example) grow an arm from the main sphere? Or trying to extend something? I'm completely new to Blender. I wanted to use it for sculpting, but I came across a big problem that is completely messing me up.

Like I'd be trying to make an arm or some horns, but when it gets just a little off the main sphere, it gets all sharp and edgy and looks stretched? If that makes sense.

But this is a really big problem for me, and there is sometimes where it gets too sharp, that the symmetry breaks and I can't even erase it?

Does anyone know how to fix this? Again, I'm a beginner, I literally don't know much about Blender yet, so sorry if I don't understand your answers I'm also using a PC, no mouse, so not all key shortcuts work.

It seems you are sculpting a 3d mesh without any knowledge of 3d in general. I think you did not subdivide properly the mesh or activating Dyntopo in your paint brush tool panel. That cause a weird mesh deformation due to low face polygons number, a topology problem.Spenting some time in watch some ytube tutorials could be a good star point.


Where has the Object Index from Layers has been moved to in 2.80? I need to use the Object Index for a couple of objects. But as seen in the image below, it is no longer found in the Layers/Passes window.

Thanks guys!

You need to change from EEVEE to Cycles render in order to have that option

Good Luck


Workspace - Filter Add-ons Question (2.80 and 2.81) If I enable the new workspace filter add-ons feature, some add-ons that I have enabled in Blender preferences window do not show up in the filter panel. For example, I have the import AutoCAD DXF add-on enabled in the Blender preferences window but it doesn't show up in the workspace filter add-ons panel.

The result is that it isn't available in the file import formats list. Does this feature have to be supported in each add-on or am I missing something? Are there any workarounds other than creating another workspace just for importing various file types? Thanks.

As a quick workaround, you could change the "category" in the bl_info section to one of the supported ones. Though "Import-Export" is listed as supported for filtering, it currently is not.

You should be able to filter them after changing, good for maintain addons via workspace.


Why does this single model look like 2 different models? They are the same model yet they look different

left side view is in perspective and right side view is orthographic (without perspective).


How to generate fake Normal map from an image texture inside Blender Cycles? Back in a day when I worked with Blender Internal render exclusievely there was a slider called Normals, I simply cranked it up and the texture started to look voluminous. Struggled to find the same thing in Cycles.Any help? Thanks!

I think the bump node is what you want?

Plug the BW output of the image into the hight input of the bump node. Then, feed the bump node's normal output into the normal input(s) of your shader. You can also plug raw BW images into the displacement input of the Material Output. For more reading on the bump node, check this out: How to create normal texture with node setup?


Selecting all faces on a plane on imported mesh I am working with an STL file that was generated outside of Blender and then imported. The mesh has a flat plane (the selected face in the photo is along that plane), but it is composed of many faces. My desire is to combine all the faces with the eventual goal of extruding it. In my screenshot I have started by selecting some of the faces manually and combining them.

I'm looking for a way to select all of the faces on the plane as it is quite tedious if I have to select each one manually.

Thanks.

Option 1: press shift+g and select normal. This will select all faces with the same orientation.

Option 2: Press some number on the numpad to snap your view to a specific axis. Snap you view so that all of the faces are seemingly 2 dimensional, and you are looking at the from the side. Then you can press z to change to wire frame mode. Next, press b (box select) and drag a box across all the vertices you want.


Can I create a CollectionProperty of brushes? I want to create a collection property with certain sculpt brushes. Can this be done? I tried:

WindowManager.coll = CollectionProperty(type=bpy.types.Brush)

But I'm getting errors:

TypeError: CollectionProperty(...) expected an RNA type derived from ID
Exception in module register(): '/home/antoni4040/Documents/blender-2.79-linux-glibc219-i686/2.79/scripts/addons/Advanced_Brushes/__init__.py'
Traceback (most recent call last):
  File "/home/antoni4040/Documents/blender-2.79-linux-glibc219-i686/2.79/scripts/modules/addon_utils.py", line 350, in enable
    mod.register()
  File "/home/antoni4040/Documents/blender-2.79-linux-glibc219-i686/2.79/scripts/addons/Advanced_Brushes/__init__.py", line 23, in register
    registerBrushSelectionPanel()
  File "/home/antoni4040/Documents/blender-2.79-linux-glibc219-i686/2.79/scripts/addons/Advanced_Brushes/Brush_Menu/Brush_Menu.py", line 120, in registerBrushSelectionPanel
    WindowManager.coll = CollectionProperty(type=bpy.types.Brush)
ValueError: bpy_struct "WindowManager" registration error: coll could not register

Any ideas? Thanks

Make a PropertyGroup with a brush type member.

Can use a pointer property to point to an ID type, in this case a brush. brush = bpy.props.PointerProperty(type=bpy.types.Brush)

import bpy

# Assign a collection
class SceneSettingItem(bpy.types.PropertyGroup):
    name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
    brush = bpy.props.PointerProperty(type=bpy.types.Brush)

bpy.utils.register_class(SceneSettingItem)

bpy.types.Scene.brushes = \
    bpy.props.CollectionProperty(type=SceneSettingItem)

print("Adding All Brushes")

for brush in bpy.data.brushes:
    my_item = bpy.context.scene.brushes.add()
    my_item.name = brush.name
    my_item.brush = brush

Python console check after running script above.

>>> C.scene.brushes['Twist'].brush
bpy.data.brushes['Twist']


Quality loss of animation when exporting to After effects I need to export animation from blender with transparent background to then use it in After Effects.
The problem is when I import rendered animation in AE, lightsaber looks way worse than it should. How can I fix this?
This is how it should look.

This is how it actually looks in After Effects

My export settings in blender

How can I fix this?
[UPD-13 May 21] I've tried to render animation as image sequence and it still looks the same, saber doesn't have red bloom around the edges.

FIXED

Enable bloom in passes. Go to view layer properties -> Passes -> Effects -> Bloom
In compositor tab, add "Mix" node and change it to "Add" and connect nodes accordingly as shown on screenshot above.

Hope this helps


Lost orange object selection outlines 2.8 - suddenly lost my 3d view orange object selection outlines in one file... can still select, but no indication of selected object. Is there some setting I can check?

Could be you have disabled Display Overlays..........

Or in the Overlays menu you have unchecked the Outline Selected option.


Switch between turntable and trackball rotation New to Blender.  Working exclusively in User Persp window on 3D viewport (which is how I always like to work in 3D Studio).

Looked everywhere, no info:  Where is the menu setting or key combo to lock the Z-axis so I can turntable my view orbits?

Go to User preferences, then change the tab to Input then toggle the orbit style to your liking.


Cycles masking object (blocking partial rendering of object) I am slowly starting to get to grips with Blender basics, but i am currently stuck.

I made a very basic scene using a hdri backround. I would like to create a plane that would "block" the rendering of an object so that it will look like the object is moving around the corner of the building.

The image shows the effect I am trying to create. The sphere on the right needs to be partially hidden by a plane and the background rendered as if there was nothing in front of it.

I looked at this example :
Create invisibility cloak (alpha mask material)
When I enable the Film->Transparent option the plain in front of the sphere does partially block the rendering of the sphere, but then I have no background.

hdri background :

Your link is broken so I can't see the method you're using.

You can continue like you are and render two images: one of the spheres with transparency on, one of just the background, and then composite them with the Compositor.  I don't believe you can use Render Layers here because the Tranparent option is not render-layer specific.

Or you can do what I did and use a cube to act as the building corner with the Boolean Modifier enabled:

Just make the corner cube invisible and set the following options:


Blender 2.8 Python Addon: How to register a Button? I want to achieve a simple button (including the possibility to map a shortcut to it) to toggle the automerge option on and off.
Obviously this is wrong:

bpy.types.VIEW3D_MT_mesh.append(toggle_automerge_button)

But, how to find the right register_class?

I am sure one could define a shortcut in the preferences, but for several reasons I'm interested in this add-on solution:

I'm trying to learn Python.
This is supposed to work as an example to include other things later.
an extra button provides the possibiltity to put it in the Q-menu

bl_info = {
    "name": "Toggle Automerge",
    "blender": (2, 80, 0),
    "location": "View3D > Mesh",
    "description": "Toggles Automerge on and off",
    "category": "Mesh",
}

import bpy

def toggle_automerge(self, context):

    if bpy.context.scene.tool_settings.use_mesh_automerge is False:
        bpy.context.scene.tool_settings.use_mesh_automerge = True
    else:
        bpy.context.scene.tool_settings.use_mesh_automerge = False

class ToggleAutomergeOperator(bpy.types.Operator):
#class ToggleAutomergeOperator(bpy.types.ToolSettings):
#class bpy.types.ToolSettings(bpy_struct):
#class HelloWorldOperator(bpy.types.Operator):
#class OBJECT_OT_add_object(Operator, AddObjectHelper):
    """Toggle Automerge"""
    bl_idname = "mesh.toggle_automerge"
    bl_label = "Toggle Automerge"
    bl_options = {'REGISTER'}

    def execute(self, context):

        toggle_automerge(self, context)

        return {'FINISHED'}

# Registration

def toggle_automerge_button(self, context):
    self.layout.operator(
        ToggleAutomergeOperator.bl_idname,
        text="Toggle Automerge",
        icon='PLUGIN')

def register():
    bpy.utils.register_class(ToggleAutomergeOperator)
    #bpy.utils.register_manual_map(add_object_manual_map)
    #bpy.types.VIEW3D_MT_mesh.append(toggle_automerge_button)

def unregister():
    bpy.utils.unregister_class(ToggleAutomergeOperator)
    #bpy.utils.unregister_manual_map(add_object_manual_map)
    #bpy.types.VIEW3D_MT_mesh.remove(toggle_automerge_button)

if __name__ == "__main__":
    register()

wm.context_toggle

For a simple toggle of a boolean property with a context path can use the bpy.ops.wm.context_toggle(data_path="") operator.  For the example in question

data_path = "scene.tool_settings.use_mesh_automerge"

To add as a layout element

op = layout.operator("wm.context_toggle")
op.data_path = "scene.tool_settings.use_mesh_automerge"

Removes the need to write an operator simply to toggle a property.

import bpy

def toggle_automerge_button(self, context):
    op = self.layout.operator(
        "wm.context_toggle",
        text="Toggle Automerge",
        icon='PLUGIN')
    op.data_path = "scene.tool_settings.use_mesh_automerge"

def register():
    bpy.types.VIEW3D_MT_edit_mesh.append(toggle_automerge_button)

def unregister():
    bpy.types.VIEW3D_MT_edit_mesh.remove(toggle_automerge_button)

if __name__ == "__main__":
    register()

Note could also simply set the property

def toggle_automerge_button(self, context):
    ts = context.scene.tool_settings
    layout = self.layout
    layout.prop(ts, "use_mesh_automerge", toggle=True)


Imported fbx with armature behaves weird in blender I tried to import a posed model from dazstudio into blender but somehow the armatures are pretty messed up. Any help is appreciated! >.<

This is in dazstudio:

This one is in blender:

I tried to adjust some of the import settings in blender but none of them seems to work.
These are my current settings:

Have you tried Makehuman (http://makehumancommunity.org) or Manuel Bastioni Lab (http://www.manuelbastioni.com) these plugins are both free and Manuel Bastioni is fully integrated inside Blender, is really worth to check it out.

I had a similar issue importing FBX poses from Mixamo, the bones came all wrong, so what I did was:

1- import the pose without skin from mixamo into blender.

2- export that same pose as a BVH file from blender. (Can you export BVH from DAZ Studio?)

3- import a character from Makehuman into blender then apply the BVH to this character.

Hope it helps.


How can i set a line to be an exact measurement I want to make a floorplan with exact measurements but cant figure out how to do this
All I want to do is be able to type in say 10 feet and have the selected edge change to 10 feet

Scenario 01
In Object mode just change Dimension. Than Apply Scale  Ctrl+A to bring scale factor to 1, then you can see edge length in edit mode as dimension. Think about Object as an universal container that can contains any data set. (If you go to Data Properties of selected object you can assign any data set to this object container.) By changing dimension you actually change just a scale factor for this container not data itself.

Scenario 02
In Edit mode you can select edge, press G move X along axis and type number like a math.
Let say if you have side 2 m and you want 1 m, type -+1.

Scenario 03
You can delete all vertices. Click with Ctrl (create vertex), press E Extrude along X axis and type number of specific distance. Than same for edge to extrude second dimension.


Can't texture paint a specific texture; it appears as a mask over all other textures (2.79) This is a very weird question, I'm aware :)
I have several meshes, each with its own material, each material with its own texture. This is for a game mod, so they're all simple diffuse textures. I used texture painting to mark the different parts of my texture on some objects. At some point, texture painting stopped working* on a particular object (let's call it object X).
*stopped working = I can paint the texture in the UV editor (Paint mode), but I can't paint the model in the 3D view.
After a bit of frustrated trial and error, I tried texture painting a different object, and... it turns out that on any other object the image of object X's texture appears as a "mask"! What I mean is that, if object Y has a green texture and I paint it with a large red "draw" brush, object Y's texture becomes red where object X's texture is not white, but remains untouched where X's texture is white.
I'm pretty new to texture painting, so I probably did something wrong without noticing. It looks like somehow X's texture has become a sort of "global" mask, but I can't find anything like that anywhere.
I also thought that it may be caused by X's texture having a non-completely-white alpha channel, but after filling it nothing changed. The mask effect seems to be based on the white pixels in that texture. Also, the issue was there also before I edited the image with GIMP, and back then it had no alpha channel.
How can I fix this issue?
EDIT
Here is a minimal file that shows the bug:

There are two objects, one of which cannot be painted (but its texture can be edited with the "mask" tool), the other one can be painted but the texture of the first object is applied as a mask.
I also noticed that, if I paint on the second object with the "mask" tool, then the first object's texture is modified.

In the N panel > Tool > Masking, you've enabled Stencil Mask option, disable it.


Wondering if there is a hotkey/group mechanism to quickly select a subset of bones from an armature I've been learning rigging and animating etc and often find myself repeatedly selecting the same collection of bones, eg the 4 feet control bones and spine root bone for keyframing a walking animation. At the moment I am manually selecting the bones every keyframe,I was wondering if there was a quick way selecting them all with one/two clicks.
I have tried to use Bone Groups as described in the manual but right click -> selecting them in the outliner does not select anything. I added them by selecting bones in pose mode CTRL+G for bone group menu -> Assign to New Group, and a bone group dutifully appeared in the outliner.
Let me know if a .blend or screenshots would help illustrate the problem, and thanks for any assistance! (Perhaps it is of note I am running 2.8 under Ubuntu 22.04)

If you select one of the bones and then ShiftG > Group, you'll select the whole bone group.


What is UV unwraping and what do the different unwrap options mean? In what ways can we cheat unwrapping? As a beginner, I wanted to know, what UV unwrapping is and how it works.

What is it used for? Is UV unwrapping necessary or can we cheat it?

What do the different unwrap options mean and in what situations do we need to use them in?

When you want to use a texture on a object than you may need to unwrap faces, yes you can live without it in the beginning.

How it works: Blender has a dedicated layout for upwraping, follow the menu below:

If you want to skip the UV mapping, you can apply the materials (a solid color) on object.


Import external py script into blender script? I wrote a py script for a custom export. I'd like to append that script to my blend file and call it using some parameters. The following script is one folder above my blend file:
from sys import path
path.append('//../fbx_collection_export.py')
from fbx_collection_export import export

When running it, I get the this error:

ModuleNotFoundError: No module named 'fbx_collection_export'

Q: What am I doing wrong and how can I fix it?

from sys import path
path.append(bpy.path.abspath("//")+'/../Scripts')
from fbx_collection_export import export


How to get sharp red to blue in weight paint from vertex group I am following How to make towels tutorial by BlenderGuru.

I can't seem to get that sharp red to blue that he does. My selection includes the full weight gradient (greens and yellows. view images). Is there a setting that I am missing? BTW - The vertex group is the whole mesh with weight set to 1, and the selections are set to a weight of 0.

Selection:

Weight Paint:

UPDATE: adding blend file in case anyone wants to take a look at it. Note - the particle system was removed to reduce the file size

The values are correct - the sub-division represents it with gradient.


Can you add geometry to a mesh over time (frames) with Python? I'd like to create an effect similar to a plant growing over time. Imagine, as the plant grows, it sprouts new leafs and shoots.

I know I can generate a mesh using Python, but can I add geometry to the mesh over time and if so how?

One way is to use the Sapling addon to create a tree. The addon needs to be enabled first in the User Preferences

After the settings were adjusted.

Convert it from curve to mesh Alt-C

Add a Build Modifier to the stem and another one to the leaves, you might want to add a few more loop cuts Ctrl-R to the stem so that the segments are displayed one by one.

To let the plant grow scale it down say 10% on frame 1, 50% on frame 10, 100% on frame 20
Set the Build modifiers start frame to 20 and 30.

Result:

.blend


link nested collections I'm trying to get blender working with my coworker so we can both work at the same time. I've got a model that will have Lots of parts. The data is from Rhino an is very high mesh. So I want to keep one file with the object data. We can bring that data in as an linked file so our working blend file isn't huge. The only way we'll change the data is fly around it, maybe open and close a door. Really basic stuff. Although, I need to animate a material on one or two pieces as well.
I've only found one reasonably good resource on how to effectively use links. The problem is they assume I'm already working with a bunch of other people, but we're Both trying to be jack of all trades here and we just split things up as we go.
So in testing things, I Immediately hit a giant roadblock, and I don't quite understand what's going on.
I created 3 cubes, and put each one in a collection that is parent of the next.
I thought there was a way to do some parenting, and have that come through. I tried doing it with some bones, but just can't seem to figure it out. I've found you have to go to Object>Relations>make proxy in order to access the data Some. But I can't figure out a way to access it in a way that would keep parents.
Am I on a wild goose chase? Once I import the data, I want to just save that off how it is. It actually comes in already in nested collections, which seems to be part of the issue. So I have a door with 20 parts or so. The screws are in one collection. The frame in another, the handle in another. And they are nested based on groups essentially, so that each above it is the parent for moving. That's how assemblies work.
I'm not sure how to go about this in Blender, in terms of splitting up the files.
Ideally, I'll have a file for that cad data. I'd like to just link the collections. This way, anything I put in them gets updated. However, since they don't have pivot points or anything, I'm not sure how animating works.
Does anyone have decent resources for this? I'm just plain lost as to where to start figuring out an intended workflow.

(Not a full answer but comments have limited characters and i though what i had to say might still be useful)
I (also) don't understand the problem exactly, but it seems to me part of it is that you see collections as the equivalent of sub assemblies in engineering software like for instance Solidworks or NX.
I have no experience with Rhino but i often import stuff from .step files or big projects (thousands of parts) made in programs like Solidworks. But i build assembly hierarchy without collections. I do use collections, for they are handy in various ways, but I use an Empty (or often a faceless circle mesh) as the root of my sub assemblies and parent the parts or objects to that. I'm not sure you can use collections in that way.
I don't like linking objects, because then you can't edit them in the main scene. But I understand linking would be beneficial because then you could have various team-members work on different parts, objects, or sub assemblies in separate files on a network. Instead of needing team-members to open the same main file that holds the entire project on a network, which usually is impossible.
I advice to figure out a workflow where (if you use them at all) collections are only in the main file/scene, and use normal hierarchy for everything else. But of course it depends on how you want to work exactly and your personal preferences.
If I'm in the right ballpark and you want to elaborate on what you want to achieve (or perhaps provide a link to the "reasonably good resource on how to effectively use links") I'd be happy to comment on it.
Alternatively you could look into how the BlenderKit Asset Library add-on works (ships with Blender). I believe it also uses collections to link geometry to a main scene. though I'm not sure how it works exactly or if something like that would fit your needs.
Edit:
The BlenderKit Asset Library works with Instancing of collections with Empties. But ofcourese you can do that yourself also. Maybe that might be helpful.
Press Shift + A, and choose Empty > Plain Axis. Then in the Properties window click the Object Properties tab and under Instancing click Collection. Here you can assign a collection to the empty. If you parent an empty with a collection you can have a hierarchy with collections, and since the root objects are empties, you can also animate them.


How to rig this simple machine? So i was trying to make this “unique fan”. I provided the video sample below, it’s bit low res but i think the mechanism on that machine is still readable :
Video reference

For anyone there still unclear or cant see much detail in that video,
i just made a simulated rig by manually keyframing it to visualize
better idea what im asking. Here :
Simulated Rig mechanism

Remember, this is a manual keyframe, and i didn't want to keyframe it manually because its so inaccurate, and i wanted that ARM 2 is staying on that FAN ARM hole. So i think rigging it is good idea.

So i tried to recreate it, but I’m confused about how to rig it. I just did make the bones, parent the model to it. There are 2 armatures, 1 on arm, and 1 is the mechanical arm.
but i honestly no idea how to put constraints on it. Can anyone help me? this is my first rig i tried, for learning purposes.

here is the blend file :
https://blenderartists.org/uploads/short-url/mt2kRaMVeA2ibumusd1lPG9egEx.blend

here is the simulated rig blend file if you want to see it more
clearly the mechanism :
https://blenderartists.org/uploads/short-url/zNbCDaWdyi2vwlGtAtVOqfxI3y1.blend

any help much appreciated!

As @MohammadHossein has said, it's important to have the length of the link longer than the driving arm.
I think of this as  a 2-bone IK rig, just like a character arm, if you want to look up tutorials on how to do those.

I've labelled the bones by analogy to an arm.

The Fore Arm bone has an IK bone constraint, target: IK Target, Pole:
IK Pole. The chain length is 2, to include the Upper arm.
The bones, target, and pole all lie in the same plane, parallel to the floor, normal to the axes of rotation
The IK target is parented to the rotating arm, and is the only connection between the rotating arm and the IK chain.
The meshes do not need to be in the same plane as the bones.

The differences from a character arm are:

It's mechanical, no need for deformation, weight-painting. Instead, the mesh-objects are directly Bone Parented to their bones

There are no poses, no disadvantage in having Empties as your IK target and IK Pole.

The rotation of the driving arm will then result in the reciprocal motion of the fan.


Sculpting brush tool only makes fancy triangles, no depth So I want to sculpt on that object I have made, and when I do so, practicaly nothing happens. And then I try with a new project, with the original cube, and the factory settings but still nothing happens. I have dynamic topology enabled, and so when I get into wireframe mode, I can see the fancy triangle, but no depth to them, the brush tool only ads triangle... so if you have any idea of what's going on feel free

sculpt tool http://imageshack.com/a/img600/3905/by1v.jpg

It sounds like the Strength is set very low.

Try setting it to a higher value:


UV unwrapping doesn't use full UV Space, but roughly a quarter of it This problem occurs rather often the last weeks to me. I'm using Blender 2.83.0 (can't move to a newer version because of a few add-ons I need to use frequently). But nevertheless importing the project for testing purposes into 2.90, the problem stays the same.
If I unwrap my model, Blender barely uses the full size of the UV space. I didn't find any solution for this problem.

Even if I use the UV Packmaster 2 Add-On, the UV Space doesn't look any better:

Blender generally scales the UV relative to the longest (fully self-connected) piece. To make it take the full space, add seams to the longest piece(s), to make it roughly the same "size" as the rest of the islands:
(Note - the places I have marked for seams are only general suggestions of where to put them - you will have to find and mark the edges that make the most sense for your object - just try to keep the islands roughly the same size as your other group of islands)


How to change a force field's strength by triggers when animating? How I can automatically change force field strength by triggers?

I working on animation where a car (rigid body) moves on the track. I need increase speed on few places (like speed zones in games). Force fields work fine, but the problem is I can't animate force field strength, because I need  to change mass, friction and other car values. So the car doesn't arrive to force fields in the same frames.
I need the force field to turn on (change strength from 0 to XX) when the car hits the trigger IN, and switch off (or change from XX to 0) when car hit the trigger OUT. How can I do this?

How about moving the object that represents the force field?

When you cant't animate the force field strength, you could move the complete force field.


How can i activate the wireframe on preview while in solid mode? Is there any option to show the wireframe while i preview the geometry on solid mode?

Yes, you can enable Wire in Properties > Object > Display:


defining angle of reflection for glossy texture nodes to make "holographic" metal I'm trying to make chromatic abberation metal, commonly know as "holographic" metal which looks like the attached image. With glass this is achieved by changing the IOR values for a red, green, and blue glass node and mixing them. I figure this can be similarly achieved with Glossy texture nodes reflecting each color at slightly different angles, but I'm not good at playing with normals yet so i dont know how to define a slightly different normal angle for each color.

It's up to you to play with the values and other options to get something you like, but here is one way to play with the normals of red, green, and blue glossy shaders:

Mapping nodes are used to adjust the "Rotation" values of the "Normal" output from the "Geometry" node.  I added some displacement to the cube to highlight the effect.  It's not all that close to your example, but maybe it's a good starting point for you to experiment.


Render looks way different from viewport render mode. How can I fix this? I'm trying to make a test render of my model. But everytime I render it the render looks completely different from the viewport. The viewport is in render mode so it should look something like that, but this doesn't come even close.

I'm using cycles renderer. And my world note is just the standard one so nothing installed there.  There are 2 sun's in the scene both set to 0.5.  I've tried different hdris but they all have the exact same outcome. I've pressed alt+h to see if there was anything hiddden in my scene that blocked the background and nothing shows up so I don't think that's the problem. I've also copied it to a new Blend file to see if there was anything wrong with the file itself but it also happens there so it must be something in my settings I guess. But I just can't find out which one

this is how it looks in the viewport render.

And this is how it looks when I render it.

I really don't know how to fix this so I hope someone can help me here

It looks different in the preview because in Material Preview Shading there is an HDRI already set up for convenience, but that HDRI is not used for Render Shading.

How to use an HDR image as environment.
In the world section, set the surface to Background, assign an Environment Texture to the color slot and then select any HDRI image you want to use:

Enable Scene Lights and Scene World to override the viewport settings:

Gif from: How can I render an object with an hdr background?

Related

How to use 2.8's default HDRI's in renders?
Which mode should i trust for lighting?


Why is the subdivision surface modifier showing a point on my model? Really hoping someone can help me out, I'm trying to build a model of a car, and I think I've maintained pretty good topology but I am quite new to to 3D-modeling.

As soon as I apply the subdivision, it the majority of my car is smooth but there is a point that appears in the rear quarter panel. Not sure how I can get rid of this! I've spend 30 minutes already moving vertices in an out and I just can't get rid of it! Is there something in particular I am doing wrong? I've attached a few screenshots of what it looks like.

Any help would be greatly appreciated.

Thanks!
Tudor

The points in my model:

With vertices visible:

What it looks like from the top looking down to the vertex where the point is, without subdivisions it aligns nicely with the rest of the door.

Since you said you activated the "Face Orientation", i believe my suggestion was most likely not explanatory enough, sorry.

Here what i found:

So regarding the "Face Orientation", switched on here:

Blue is the outside side of a face, while red is the inside side of the face. That said, when we look at objects with the "Face Orientation" option on, normally all faces should be blue, except those parts where there is a hole and you can look into the object, where it should be all red.

Now your problem most likely came to be when you worked on the model and pressed some key-combinations while trying to use others. Blender has many key-mappings that are similar and it can therefor accidentally happen, while not in this mode you would not see a change instantly either.

So now to the solution:

Select the object, then go in edit mode pressing Tab
Press A to select all elements, it does not matter which mode you are in, be it vertices, edges or faces
Either press Alt+N to open the "Normals" menu and select "Recalculate Outside" or use the direct shortcut Shift+N

The result should look like this now:

Now we can deactivate the "Face Orientation" mode to see this:

You may need to iron out those vertices if you moved them to find the problem.

Should you have some faces that just don't want to turn the right way with this method, you can always select the corresponding face(s) and then press Alt+N to select "Flip".

From here on out i wish you a good time Blending.


I got this problem with animating, when I switch frames, the pose of reverts So I have the problem where I'm making an animation of a character walking after making one of them in idle pose. The first animation was easy, but now that I am trying to make the walking onwe I have run into a problem I can't figure out how to solve. Basically I made the beginning pose on frame zero and make a key frame of it. Then I moved to frame 20 and made a new pose and key framed it. However if I moved to a different frame and then back to twenty the pose has reverted back to the one from frame zero. Though the key frames I made still register on frame twenty on the dope sheet they have reverted.

Here is my blend file, since every time I ask a question is ends in my having to upload it anyway.
blend-exchange.giantcowfilms.com/embedImage.png?bid=6006

Okay this is weird, I inadvertently solved the problem, it was apparently a glitch after all. What I did was changed the timeline to the idle animation to make sure it wasn't messed up too. And when I changed back to the timeline of the messed up animation it was working properly all of a sudden. To think I wasted a weak not getting my project done because of this problem and that was all I had to do.


How can I emit smoke from just the outline of a model? I know my way around Blender a bit, but I'm in no way an expert. What I am trying to do is have a humanoid mesh that is invisible, but have smoke emit from it's silhouette only, not it's volume. Is there a way to generate a mesh on just the outline of a model similar to backface culling with solidify modifier so that the smoke only generates at those locations?

I tried to keep the question short, but let me know if anything is unclear.
Thanks!

Use the mesh as emitter. Use vertex painting to paint the “silhouette” as a vertex group. Set vertex group in smoke. Set volume to 0.


Rotate Pose Bone by world coordinates I have the following information from an object: Rotation in degrees (absolute world coordinates) and position in absolute world coordinates.

My goal: to set the position and orientation of a pose bone via python.

My problem: How to rotate the bone by the X, Y, Z axis around it's head along the world X, Y, Z axis?

Here is my current approach:
I take my bone's rest matrix (armatureObject.pose.bones["Arm1"].matrix), convert this to euler angles in degrees.

Here is my first assumption that may actually be wrong:

This is not the rest matrix.
The X Y Z angles I get out of this: are these angles relative to the world, or relative to something else?

Now in this process I add my rotation (as I want this bone to be rotated by X = 20°, Y = 30° and Z = 40°) and finally I apply these again to the pose bone.

However, this does not yield a correct result.

What I have in values:

Pose Bone Rest Matrix 4x4 converted to Euler (XYZ): -56.332200° , 27.38295°, 48.9299°
My input Offset Rotation: : 20°, 30°, 40°

By manually using the cursor and rotating the bone via this pivot in 3D View, I was able to get the correct position for the bone and read the values I need to get through calculation:
- Should be (Euler XYZ): 3.082°, -29.799°, 38.67°

Simple enough I believe rotating my matrix by 20, 30 and 40 rotation matrices should have solved it, but it doesn't. :(

armatureBones = armatureObject.pose.bones
boneWP = armatureObject.matrix_world * armatureBones["Arm1"].matrix

rX = mathutils.Matrix.Rotation(radians(20), 4, 'X')
rY = mathutils.Matrix.Rotation(radians(30), 4, 'Y')
rZ = mathutils.Matrix.Rotation(radians(40), 4, 'Z')
newRotMat = rZ * rY * rX * boneWP
newRotMatDirs = newRotMat.to_euler()

# readout to compare
print ("is angle:", degrees(newRotMatDirs[0]),degrees(newRotMatDirs[1]),degrees(newRotMatDirs[2]))
print ("should be", 3.082, -29.799, 38.67)

For this I get: 8.900, 1.558, 144.03145

Where am I going wrong?

See this answer

def rotate_around_center(mat_rot, center):
    return ( mathutils.Matrix.Translation( center) *
             mat_rot *
             mathutils.Matrix.Translation(-center))

eu = mathutils.Euler(map(radians, (20.0, 30.0, 40.0), 'XYZ').to_matrix().to_4x4()
newRotMat = rotate_around_center(eu, boneWP.location) * boneWP


How to voxelize and extract blender data? I am trying to use Blender as a CAD tool for electromagnetic simulations. I have modeled the geometry, but now would like to export it to a format that I can read for the simulation (external Python program). To do this, I compiled bpy as a python module, and am creating and loading .blend files from Python directly. The constructed objects/files are viewable when loaded in Blender.

My goal is to be able to query the space (any x,y,z point) and return which material the point belongs to. This sort of information would be used in a 3D FDTD simulation. Is there an easy way to do this? -- I could not find any, so I decided the next best thing would be to grid/mesh my simulation domain into voxels.

Looking around, the closest thing I could find is the Add-Cells plugin, but it is written for Blender 2.48, and I don't think it works with the current version 2.74.
(http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Add/Cells_v1.2)

I was hoping to voxelize all the objects in the scene, and then export to a 3D NumPy matrix. I imagine this will consume a lot of memory, but I am happy as long as it works. (Ideal case would be to just query points in space and have it return the material).

Thanks in advance!

I just read your question statements and comments.
Generally your approach is fine in my opinion. I try to supply some details here. Hope them help.

External or internal?

Luis B suggested in his comment:

  Have you tried using the Blender Python API to create an internal Python Script(as opposed to an external Python program)?

I think an external script may be more suitable in this case.
The conversion from a geometric representation(which is created by Blender) to computation representation(i.e. something like Eulerian grid) should be coupled with your simulation, not Blender.

For example, the computation grid may be staggered, or you want to use adaptive grid(such as an octree rather than a uniform grid), etc.
All of these requirements depend on your simulation's setting.

How to do the voxelization?

I assume you are using mesh geometry to represent elements and boundaries in your simulation.
Then in this case you need to traverse all meshes and decide which mesh the point belong to.
For convex mesh you can shoot one ray and check the intersections with the mesh. Two intersections means a point is outside this mesh. Also you need to handle the special case which a point is just right on the surface of mesh.

This process will be slow. But I think it is ok since you only run it once for each simulation configuration.

If you do want to optimize its performance you can consider using some data structures like BVH(bounding volume hierarchy), kd tree or spatial hash.

Things get much simpler if you can use procedural objects. For example you model a sphere using distance field function like $x^2+y^2+z^2-1=0$ rather than polygons. Then it is easier to decide whether a point is in a geometry(evaluate the distance field function and a negative value indicates the point is inside).


Rendered image is not as detailed as in rendered view Does anyone know why the top is so low quality compared to the actually rendered image. The plane has True displacement enabled. Does anyone know the problem, if you need further more details I can give them.

It is from your subserf modifier. If your using the experimental or adaptive, make sure both values from the view and render are the same, i.e. the Dicing Rate must be 1 and the levels must be proportional to it.

And also the view angel will affect your render in adaptive subserf. Objects at the far will have less subdivision than those from the front, i.e, if your camera is pointing at the front and you are looking at the back, there will be a noticeable difference.


RGB to Intensity in Nodes This time, I wish to replicate another Blender Internal process involving the RGB tab.

Here is a few examples of what I am trying to achieve in the node editor.

In this image, the UV map is using alpha transparency, but as indicated by the arrow and circle the RGB to Intensity tab is unchecked.

In this image, the tab is checked, and allows the color outline above to appear the selected color, which is pink, while leaving the black portions to disappear.

Is there a way to replicate this process using nodes in EEVEE rendering? I've tried and could not figure out the same results. If this question is already answered or is similar to another one, please direct me to it.

This setup should replicate alpha transparency in eevee.


Model as multiple unique thin sheets I am looking for the best way to make a model comprising of many thin layers.. each with their own unique shape and editability...such as this:

Would it be best to model the object first then divide down into layers? Or to avoid having thousands of seperate objects and risk crashing.. could something be achieved with modifiers such as the array tool? Thanks

Start with a landscape (this one was created with the A.N.T. landscape generator).

(Click on the images to enlarge)

In a different layer I added a plane and used an array modifier to stack up vertical iterations of the plane. This will be used to cut slices across the landscape.

Then a Boolean modifier in intersect mode, with the landscape as target object :

Now hide the layer with the original landscape and add a solidify modifier. Make the thickness the same as the offset for the array modifier:

Editability:

Since this is done with modifiers, the landscape remains fully editable and the contour slices will accommodate to the modified landscape.

Thickness is fully customizable with the solidify modifier, and the array modifier can be set to have more or less detail in the z axis.

For a smoother result, the original landscape could use a subsurf modifier:

obviously the more detail, the more computing power will be needed for this project.


Cover the Curve Bezier with a Plane. It's impossible to duplicate it and R it I did a Curve Bezier and I wrap with a Plane to make a ribbon.
When I try to copy it and rotate the ribbon(plane) is undone.

After the Curve Bezier. I did: Modifier / curve / object. Curve Bezier

In this tutorial https://www.youtube.com/watch?v=VTVgyjh4Yro  7:25
it's possible to copy the ribbon.

Thanks a lot.

To Duplicate it you should have both objects selected the Plane and the  Curve, but in order to make it successfully the active object when you dublicate should be the Curve.

Your problem is that you selected only the plane when duplicating