text:
Object looks fine in material view but black in rendered
I have referenced StackExchange post as well as a post from the Blender Forum. However, unlike their case, my output node seems fine and I only have one UVMap and thus, I cannot have chosen the wrong UV Mapping as well. Moving the position of the lamp did not help. In addition, I could not find out where the override all materials option is, so, I could not test out that option. As such, I really appreciate your help and thanks in advance for your help.
My .blend file can be found here.

Please add images to your question instead of only adding a file. The relevant information should be included in the body of the question. When adding files, in the future please use Blend-Exchange. Thanks.

@Timaroberts Total Newbie who just started experimenting with Blender yesterday. Thanks so much for the input. I will certainly use this platform in my subsequent questions.

The material of the text is maden by a texture (missing in the .blend file) going into a background node wich feeds the material input (and into the displacement input also).
Background node is intended to be used in the world tab, not the material tab.
I used a diffuse node instead, turned the world to pure black, reduced the lamps intensity to 1000 and assigned a simple wood seamless texture:
this is the result.

The animation worked soon after changing material to diffuse BSDF and setting image background. I wanted to ask what is the difference then between image background and Diffuse BSDF image background. You mentioned the image for text material missing in .blend file. I wanted to ask how to add the image into .blend file for future reference as well as how to add nodes since I have fewer nodes (Image texture, Diffuse BSDF and Material Output).

Starting form the last question to the first: in the header of the node window (lower part of the window) there is the"add" menu which you can use to add as many nodes as you want; enable the "node wrangler" addon in the preference window, so you'll be able to Ctrl Shift click on a node to see his action. To pack a texture into a .blend file open it in a UV/Image window, go to the header (lower part) and click "Image" and choose "pack".

The common use of the background node is this: in the header of the node window, after the text menus (view, select, add, node) there are 3 + 3 little icon buttons: press the 5th (world tab). Select the world icon in the properties window (world icon) and press "use node" on the "surface" tab (if it's empty). In this way the background node will act as source of light with color and intensity set by the node himself, wrapping all the scene and at an infinite distance.

Add an "Environment texture" and plug it in the "color" input and you'll have the basis of IBL (Image based lighting): you can choose an HDRI Image for best results. If you have any other question, please ask them in a new Blender Stack Exchange Question.


text:
Set Origin to geometry not available
I am reading a book called: Blender Game Engine Beginner Guide by Victor Kuller Bacone, from Packt publishing, in which there is an exercise which directs to download from the 3D Warehouse a boat in sketchup format. The next instruction is to export the boat to Collada format, and import it into Blender. In blender, the user is instructed to use Tools > Edit > Set Origin and choose Center of Mass. When I follow those instructions, the boat object is centered. But when I try the next series of steps, downloading a killer whale (orca whale) from the same website into  Sketchup, exporting it to Collada, and import it into Blender, I don't see the menu option Tools > Edit > Set Origin. The keyboard shortcut CtrlShiftAltC doesn't seem to work either. Why can't the option for setting the origin to the center of mass work after importing the Orca?
I am using Sketchup version Make 2014 14.0.4900. Whether I choose from sketchup the "fix it" or "fix it later" options on exporting, I get the same error.

most likely you don't have the whale selected, but an Empty or something, can you show a screenshot of the outliner (the panel on the top right of this screen... it will show all objects, and which object is currently selected

The screenshot shows an object origin at the center of the mesh, with a dotted line to the Orca. If I add an empty to the default scene, and define that empty as a parent of the default cube, I get a dotted line from the empty to the cube much like the line shown in the screenshot. If I select the empty object, the "Set origin" button disappears from the tool shelf. This suggests to me that you don't have the Orca selected, but instead have selected the empty.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
How do you animate more than one Rigify rig in a single scene?
I'm trying to create a set of animations for two human characters which will then be exported into Unity. Ideally this import will be as a single fbx that includes the two character models and all animations, which I can then use to trigger an animation by name (e.g. "shake_hands") which will then trigger the hand shake animation on both characters.
These animations need the characters to interact directly (e.g. shaking hands etc), so I assumed that the best way to ensure the interactions worked well would be to animate both characters in a single scene in Blender. I'm new to rigging, and Rigify looked like a powerful but simple tool, so I decided to use that. I heard about problems with generating two rigs in the same file, so I created the two models (for the two characters) in different files. I created a new file and appended my two models to it (by specifically going in to the Object folder and grabbing the meshes and rigs rather than going by the scene route). I had experimented with animating a single character first of all, so one of the armatures came with some animations already. By that I mean one armature had some actions set up for it, with keyframes for bones in that armature.
I assumed that when I thought about "an animation for two characters" what that really meant was "an action that has keyframes for both armatures". This means that I assumed that animating the second character would be as easy as adding keyframes for the second armature to the existing action. However, when I started trying to do so by putting the second armature in Pose mode, opening the action editor, going to the existing action and adding keyframes for bones, the bones of the first armature took on the poses that I set for the second armature, overwriting the animation. I assumed this was because the animation (the dope sheet specifically) refers to bones by names, and thus because Rigify generates the same bone names each time you generate a rig, the keyframes ended up being assigned to both copies of the bones with the same names.
This seemed weird, but I set about renaming the important bones of the second armature, so I could keyframe them separately, but now the Rigify UI started to fail, as tools like "Snap IK to FK" etc relied on bone names that were no longer there. I considered merging the two rigs into a single armature out of pure frustration, but that would have been even worse to work with.
Am I misunderstanding some part of the process? Is there a reason why noone on the internet seems to be talking about having this problem? The whole time I was working on this I couldn't shake the feeling that there has to be an easier way: so is there?

As Rigify is based on Blender's internal drivers, constraints, and scripts, it's not directly exportable to Unity, so you should think of it as a Blender instrument.
The common workflow is to program the animation into Blender, using two different Rigify rigs (use the advanced options, near to the generate rig button, to give an unique name to every rig).
When the animation is finished you can turn on the Deforming bones layer only, select all deforming bones (bone layer 29, counting from 00 to 31, all bones have the "DEF-" suffix), and in pose mode go to the menu pose > animation > bake action (turn on all the preferences), so that a copy of the rig, maden of deforming bones only, with baked action, can be directly exported to Unity.
Usually we use two rigs for two characters, but if you really want a single action, at this stage you can join (Ctrl J) the two only deforming bones rigs: all bones names and animation channels will update adding the .001 suffix to the joined copy.

This solution is looking good, thank you! I've managed to re-rig and get an animation working in sync, so it solved that problem. I want to try exporting it first before accepting, but rest assured I'm on it!

Ok, after a bit of fiddling, and some help from answers to this question I was able to sync up animations on both rigs with a single Trigger. Thanks again!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How do you view Face Sets in Edit Mode?
In sculpt mode, I can see the Face Sets being highlighted

but when I switch over to Edit Mode I lose all highlights

is possible to view the Face Set highlighting in any mode other than Sculpt mode? If so how do I turn that feature?

I think face sets is only for Sculpt mode

@Emir I have sinking feeling that your right, I'm a novice in blender so, get disorientated when I lose the highlighting from the facesets


text:
Ambient Oclusion Diffuse bake errors
I made a low poly version of this object and the bake was perfect, but now I'm doing the higher poly version and the bake has this imperfection.
Rendered:

Baked texture:

It has that imperfection on top, as you can see. Why this happens?

First things I would check:

is the normal map is in non-color Color Space, (especially sometimes you can change it only after you save the image)
your baked map is connected to a node from Vector->Normal Map, and then this node to normal slot in the shader node. On top of that, if Vector->Normal Map node is set to use Tangent Space
your models faces shading (flat/smooth) is the same as at the moment of baking

This is happening to a baked color (diffuse) map, not a normal map. The issue is in the color. The baked map is simply connected via image texture nod to BSDF.


text:
Blender failing to bake
I've had this problem for a long time, but now is getting worse.
When Blender is baking, I see that it consumes alot of memory, so I went and bought more RAM to a total of 32GB, thinking it would fix this, but it started happening again.
So, what happens is that, when Blender is baking, it starts consuming memory, getting ready to bake, but alot of times it won't actually bake and just display a black image, but the message at the bottom still displays, saying the bake was a success. This is not because of metallic, it just doesn't even bake. I try to fix this by closing Blender and opening again and creating a image file to bake with a different name, and works most of the time, but it's getting worse.
I'm baking 8K textures, btw.

hello, maybe share a file so that we can try?

It's resolved. I had too many objects being rendered. Even though they were invisible, that made no difference, so I disabled them in the camera icon. Now the bakes are super fast and without issues.


text:
Seam still visible when close to object
I used texture paint to create a seamless texture for my object with the clone brush, but the seams are still visible when the camera is really close to them. I'm wondering if this is inevitable or fixable.
Also, I created the displacement map for it with Photoshop's 3D feature. When using it in Blender, when I increase the strength too much in the bump node, it makes the seams become very visible, even from a distance (that's not the case in the image). Am I creating and applying the displacement map correctly or is there a more efficient way?

maybe try to remove the seam with the Clone brush? Also increase the brush Bleed option a bit?

I did it and it's still visible when close.

if L0Lock's answer is not good, please share your file: https://pasteall.org/blend/

https://pasteall.org/blend/052a8c2ce6ae4451936b95bc5679f7e5

I had to create a new blender file, because the original has alot of objects.

you need to pack your image before saving: File > External Data > Pack All Into .blend, please share again

I had to reduce the textures from 8K to 1K. The seams are even more visible now: https://pasteall.org/blend/9d4586c241ab42e6b374a7a640f87437

So it looks like it's due to bad normal map but it's hard to guess how it happened, if you baked this normal map it must have happened at this moment, but we can't do anything as we don't have the original object.
Anyway what you can do from now is enable the Node Wrangler addon, press CtrlShift left click on the Grip 05 Normal 01 8K Image Texture node in order to view the normal map only. In the 3D view switch to Texture Paint mode, select the Clone brush in the Tool panel on the left, press Ctrl left click to point on an area that you want to duplicate, and begin to paint on the limit line, it will remove the bad connection.
Before:

After:

Looking at your nodetree, it looks like you set your image texture nodes' Extension to Repeat.
I might be wrong on this but if I remember well, Image Texture nodes use UV mapping when nothing feeds their vercor input, and changing the Extend option will change the texture mapping. If yes, then that might be the source of the issue:
While the image texture may be seamless when repeated, the UVs will always display a break at their seams. That's why when using UVs, you either paint a texture adapted to the UVs and project it as is, or you use a seamless texture but map it using generated mapping.
Also, any texture that isn't plugged into Base Color or Subsurface Color (which are conveniently socketed in yellow) should have their Color Space set to non-color.


text:
Black shadows appearing from invisible objects only in Cycles

I was going to leave blender rendering an animation overnight and noticed shadows (or black geometry) from invisible objects being visible when they aren't supposed to. How disappointing. Only happens in Cycles. Solution?

What are the material properties of these objects? Why are they invisible?

They have the same properties as the one in this video: https://www.youtube.com/watch?v=uIthYMgWM0Q&list=PLetCCBn3bjLwlymgf5hqoqfE3UBaXPUMw&index=60

Go to the Properties Editor  > Render Tab > Light Paths > Max Bounces subpanel and increase the Transparent max bounces until the shadows disappear.


text:
Efficient empty volume rendering in Cycles
Suppose I am rendering a smoking torus from above in Cycles:
(at laughably bad resolution, of course, but that's not the point)

Cycles spends a lot of time rendering the empty space, even though the density is 0 (and therefore, the volume should have no effect on light). I don't quite know why Cycles has to think so much.
In fact, the render times can be almost halved (from 11 min to 6 min) by using an old BI trick and masking empty parts of the volume with a shadeless object (which can be made here).

This is fine for simple test renders, but now I'd like to make actual scenes with smoke and fire in them, and obviously my little masking trick won't work because there are objects behind the smoke that can't be masked. (Also, shrinking the domain is not an option)
How can I optimize scenes with large empty volumetric sections?

Could you not group the smoke and mask on a separate render layer?

@ToddMcIntosh I can't. :( I'm rendering fire, and I need the fire to actually light the scene.

Could you fake the bounce lighting with lamps with animated emission?

@ToddMcIntosh sorry, nope. I probably could if the scene weren't so specific, but the fire is right up against a plane, and you can clearly see its shape... I'd rather not approximate if I can help it.

It's actually quite similar in Cycles and seems to speed up renderings as well (which indicates there is still room for optimization in Cycles volume rendering).
So with a basic setup:

You get result (~16 seconds):

Now add a Shader Mix Node and use Density as a Mix factor:

With current Cycles algorithms you can leave the second slot unconnected - it just tells Cycles to compute volume rays for areas that are masked by density with a value greater than 0.5 (screen shows the reverse of that, but it's the same if you connect Volume shader in second slot and use converter math node 'Greather than', which would be more intuitive, I guess).
Now the result of this little tweak:

Time almost halves! But there are very crisp edges - you can tweak that with changing the converter math node value to a very low number (which would tell cycles to leave out only area with density values close to zero:

And the result:

Still reasonable improvement over the original render time and nearly the same visual effect.

I don't know who you are, or what your credentials you have. I don't know whether you're a good person or bad. But I do know that you are a GOD DAM HERO Kilbee. This little trick has just knocked 8 minutes off each frame on a 200 frame explosion. I seriously Effing love you !!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How do I run a function from a custom script from the Python Console?
I found a script with an instruction to run it, but it doesn't work for me. Script is working for other people but if I run it the way it's described I only get errors.
It says:

Just copy the code into a new file on blender's text editor, call the
text file apply_with_shape_keys.py, and then, select the object with
the modifiers and shape keys, (make a backup, just in case). Now from
the console execute it like this:
import apply_with_shape_keys
apply_with_shape_keys.super_apply_modifiers()

My results:
>>> import apply_with_shape_keys
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ModuleNotFoundError: No module named 'apply_with_shape_keys'

The script text is named apply_with_shape_keys.py
The script:
import bpy

def reset_shape_keys ():
    for name, shape_key in get_active_block().items():
        shape_key.value = 0

def get_active_block ():
    block_id = bpy.context.object.active_shape_key.id_data.name
    return bpy.data.shape_keys[block_id].key_blocks

def select (selection):
    bpy.ops.object.select_all(action='DESELECT')
    selection.select = True
    bpy.context.scene.objects.active = selection

def select_last_shape_key ():
    shape_key_count = len(get_active_block().items())
    bpy.context.object.active_shape_key_index = shape_key_count - 1

def remove_shape_keys (object):
    selection = bpy.context.object
    select(object)
    shape_key_count = len(get_active_block().items())
    select_last_shape_key()
    for i in range(0, shape_key_count):
        bpy.ops.object.shape_key_remove(all=False)
    select(selection)

def apply_modifiers (object):
    selection = bpy.context.object
    select(object)

    for key, modifier in object.modifiers.items():
        if key != 'Armature':
            bpy.ops.object.modifier_apply(apply_as='DATA', modifier=key)

    select(selection)

def super_apply_modifiers ():
    original = bpy.context.object
    bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(0, 0, 0), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False, "use_accurate":False})
    backup = bpy.context.object
    backup.name = 'backup'
    remove_shape_keys(original)
    apply_modifiers(original)

    for key, shape_key in get_active_block().items():
        select(backup)
        bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(0, 0, 0), "constraint_axis":(False, False, False), "constraint_orientation":'GLOBAL', "mirror":False, "proportional":'DISABLED', "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False, "use_accurate":False})

        meshed_shape_key = bpy.context.object
        select(meshed_shape_key)
        reset_shape_keys()
        get_active_block()[key].value = 1
        bpy.ops.object.convert(target='MESH')

        select(original)
        meshed_shape_key.select = True
        bpy.ops.object.join_shapes()
        select_last_shape_key()
        bpy.context.object.active_shape_key.name = key

        select(meshed_shape_key)
        bpy.ops.object.delete(use_global=False)

How do I get it working?

This has changed
Being able to import py suffixed text editor scripts by name is no longer available in blender 2.8+
Instead of importing, use  the Text.as_module() method to return script as  a module like object.
For example, copying script from question, pasting into text editor, naming it "Foo"
Python console test:
>>> foo = D.texts['Foo'].as_module()
>>> foo.
        apply_modifiers(
        bpy
        get_active_block(
        remove_shape_keys(
        reset_shape_keys(
        select(
        select_last_shape_key(
        super_apply_modifiers(

The second command is confusing. Do you mean I need to call
"foo.super_apply_modifiers()"?

The beauty of the python console is .. give it a try to confirm   When you type foo.<TAB> Iwhere tab is the tab key) into blenders interactive python console it autocompletes.  Result of autocomplete is shown. showing the members of the text editor module foo

Can't find the autocompletion but the functions do seem to run, thanks. However there are errors probably unrelated to the topic that I now need to get sorted
TypeError: Converting py args to operator properties: : keyword "constraint_orientation" unrecognized

On prior version  is autocomplete. Simply look at the console menu. IIRC constraint_orientation is a version issue too. https://blender.stackexchange.com/questions/166397/for-blender-2-80-api-what-replaces-the-constraint-orientation-parameter-in-bpy

@user3024701  also any value passed to an operator that is default need not be passed to the operator.  Most operators in question code could be replaced with API methods, eg bpy.data.objects.remove(meshed_shape_key) removes the object

With the new foo.as_module() function, is there an import all option? So there is no need to prefix every function in foo with foo. in the script? @batFINGER


text:
Adding mix shaders and glossy shaders
I'm new to materials in blender. I've seen in many tutorials making Glossy materials like car paint shader. Most of them uses many mix shaders and glossy shaders combined. I just want to know how it is helping to make shader surface? How does it work? Is it adding additional reflections on the shader? I don't understand actually.
Please see the reference pic for example. Can anyone explain it? It will be really helpful if there are some good references for getting a good understanding of materials in blender.

I think your question is: what is the advantage of layering a glossy material on a matte material if you can just make one semi-glossy material?
The idea is that the actual car paint also has multiple layers. Some light reflects off the top shiny layer, and some off the rougher bottom layer.
That's why in real life you never see half-sharp reflections on cars, but also you can see some general diffuse shading (i.e. not all cars look like they were made of chrome). You never see a slightly blurred reflection on a car, like you would let's say on a ceramic mug. Instead, you always see a sharp reflection overlayed on a more matte object.
Check this example: http://pinehurstmobiledetailing.com/wp-content/uploads/2014/06/iStock_000003958257Large.jpg - look at the hood of the car. You can see a sharp reflection of the people standing there, but also there is a red streak of highlight.
Very similar approach is used in digital painting, where you first paint a matte object and then overlay reflections. There is a great tutorial here https://www.youtube.com/watch?v=w4uJpHaHZTc
And, as the other anwers says, using the "Mix" node assures that everything stays physically correct, i.e. you don't have an object giving off more energy than it gets. I also agree that people tend to overcomplicate shaders, but I guess this is because you just experiment and finish when the solution looks good, not necessarily when it is pretty in the node editor :)

Yes, the point is to add additional reflection components without combining their reflected energy, which would make the surface appear to glow. Is it helping? Maybe, maybe not. Carpaint shading is usually less complicated than a lot of people make it out to be. People have a habit of getting carried away with a lot of crazy effects with drag down rendering time and only even look good under one specific lighting setup.
I honestly have no idea what the artist was trying to do in that first screenshot, and I'm not sure they did either. Fresnel node with IOR=1 outputs solid black, so a bunch of the nodes on the bottom of the image aren't even doing anything.
The second one is decent enough carpaint, just inefficient in some ways. The two mix diffuse shaders could be subsituted by mixing colors with the mixRGB node and passing it to a single shader. The voronoi texture is there to make the sparkly flakes seen in some car paints. (note: most modern metallic paints have very small and dense flakes that are better approximated with a rough glossy shader than trying to represent them directly with a texture).


text:
Why does a vertex not become part of the edge it was snapped to?
I have tried for tinyCAD, Dynamic Space Bar, Intersect Tool and EdgeTools, Automerge and other stock options, but if I create a new vertex (Shift+D) and constrain it to an axis and I snap it on another edge, it does not merge together and become a lovely piece with that edge.
Besides, I have a small space to snap the Vertex near to Edge, but not on the edge. And I still couldn't figure out how I to merge the Vertex with the Edge afterwards.

But besides that I really like Blender so far and a lot of things are really well thought out and so I think it is me who is wrong.

did you try ALT + M in edit mode with the selected vertices?

yes, but ALT + M of vertices with certain edges makes the the mesh collapse sometimes and acts weird

Why do you duplicate vertice? It's much easier to extrude it, because in that case it will be a part of the mesh, while if duplicated - only as a standalone one, not involved in anything. More than that, if merging duplicated, you should take into account what do you merge with

hm, I don't really understand why duplicating shall be worse, but,yeah, seems like extrude is much easier xDD

Duplicating isn't worse; it provides you (in this case) with an additional step which is worth doing only if it's needed. And I don't see any reasons why it's really needed

To be able to merge this vertex with the edge you have to have another vertex as a part of the edge, to do so, select the edge and by pressing the W key subdivide it once then you can slide the vertex where you want by pressing ShiftV, and now you can merge this vertex with the other vertices.

hm, well that works. does it make a difference using subdivide over loopcut and slide?  strange though, why isn't snapping made similar to CAD programs, maybe I should look for a proper CAD addon..

No it doesn't really make any difference as long as you have a vertex which is part of the mesh

still it does not make absolutely now in any way any sense to me... that if I can MOVE a snapped vertex along an edge, why don't I have the option to MERGE it when I press LMB???? WHYYYY?

It suppose to work, when you press Alt+M what option do you choose

yeah, sometimes it works. I am trying tinyMCE again, this seems to work sometimes too... but it is still not as convenient as a CAD program where you can connect edges as projections, having 90 degree angles and stuff... :/   http://glender.hybird.org/ this geometric tool looks awesome, but apparently it's just for an ancient blender


text:
Difference between Octane render and Eevee render?
I am blender beginner. I found Blender has 2 renders, eevee and cycle. But I also find an Octane render in website. What are the differences among eevee, cycle and octane? Is octane an addon? Is yes, how much?

There is also Redshift, Thea, LuxCoreRender etc. Related: What's the purpose of the EEVEE rendering engine?

Well, yes and no. Octane is not for blender only, it's more of an engine in many 3d software. https://render.otoy.com/forum/viewtopic.php?f=7&t=72241#p366488, Octane uses the computer GPU to render, and it is like Cycles but a real-time raytracing, which means its acts like evee but produces renders like cycles. Evee is just a real time render engine
which doesn't care about light that much.

So if I focus on npr stylised shading, eevee or octane render? And is octane render free addon? Thank you

If you focus on PBR then go for cycles, eevee is an shady character at that, octane is not that much of a build for blender, but it is available for 2.8 version.in windows only, you can check it here https://www.blendernation.com/2019/09/26/blender-2-8-beginner-tutorial-free-octane-render-and-first-impressions-addons/


text:
Is there a Python Event for swapping between object mode and edit mode?
I have a script that is manipulating the text of a text object. I want this script to work when the user swaps between "edit mode" of the text to "object mode".
Is there some event for that?
For now the script works with a button, but I want to avoid that.


text:
Hiding a part of an object in the Object Mode
How can I hide parts of an object in the Object Mode? I need to model different parts (each part has to be a single object) in a big box surrounding them (external object). My task is to model a room and the things contained in it; therefore I need the positions of the different objects in reference to the room's walls and ceiling...
To clarify: this is the room from outside (a simple box)
whereas this is the same room from inside
I want to add some features to the room in the inner part but do not know how to hide just some parts (walls and ceiling) of the first object modeled.
E.g. If I want to add the stairs going from the ground floor to the first floor (visible in the 2nd picture) I need to hide walls and ceiling to be able to use right/left/top view. Though being these modeled as part of a single object, making invisible the whole object would hide also the ground and first floor which I definitely need...

you can  use the mask modifier for this task :

create a vertex group of the vertices that you want to hide
add a mask modifier  and assign the vertex group
you can click beside the vertex group to switch the effect
the mask will also has effect in the render you have to uncheck 'show in render'

Changing the box to wireframe will work for you best:

You can also quickly toggle the whole scene to wireframe and back with Z
You can also make your objects semi-transparent:

But note that blender doesn't do alpha depth sorting for the viewport like maya does so you might get unusable result.

In your case, just flip faces inside and toggle backface culling. This scene eventually needs walls facing inside not outside.


text:
bone local_matrix all at location 0,0,0?
I'm trying to update a script from blender 2.55 to 2.7 which was supposed to work, but here I have an issue, to get the bone matrices I take the armature world_matrix and multiply by the bone local_matrix but all my bone seems to be at 0,0,0. I need to obtain the world matrix of each bone in object mode.
my test code:
import bpy
from bpy.props import *

ob=bpy.context.selected_objects[0]

for bone in ob.modifiers[0].object.pose.bones:
    print("matrix channel",bone.matrix_channel)
for bone in ob.modifiers[0].object.data.bones:
    print("matrix_local",bone.matrix_local)

For both I have 0,0,0 for location (last line 0 0 0 1)
Thanks

can you post how you are getting 0,0,0 , and did you try  armature.pose.bones[0].matrix_channel

A pose bones location is relative to it's rest position, it will be 0,0,0 unless you have moved it in pose mode.

@Chebhou I added the code to my post, I have the same with matrix_channel

@sambler I don't find where to get the rest matrix..

OK I finally found the error, it seems that rows and columns have been switched from blender 2.5 to 2.7 or my script was already buggy... Then matrix_local is the one to use.

this is not official but after inspection :

the last line is not for location in 4*4 matrix

matrix_local is the rest matrix in the armature space
matrix_channel is the pose matrix according to the rest state
i think the last line is there to make a square matrix

FYI the last line is used for non-uniform transformation (IE used in perspective matrix) and is known as the "w" component of the matrix. Should always be (0,0,0,1) unless you want strange things to happen :)

@beiller thanks for the info, feel free to edit and add more


text:
Problem with bone animation with 3D cursor as pivot
EDIT: I solved it by simply making smaller rotation increments with more keyframes. Would still be interesting to know the cause and if there's a better solution though.
So I'm trying to simply animate the rotation of a bone using the 3D cursor as a pivot. When I rotate it myself it works fine this way:

However when I animate it, the rotation ends up looking like this instead:

What's the cause of this and how can I fix it?

This is the way animation work when you add a keyframe you store the variables values (loc, Rot, Scale) at that time, and when you play the animation blender try to interpolate ( guess ) the values of the variable (between keyframes ) depending on the last and next value and the type of interpolation used (this can be seen in the F-curve )

so whatever happens between keyframes is lost and new value will be calculated

in this case of the bone

the location of the bone is the location of its head
the bone will rotate around its head

in this example i keyframed the first and last states only :

the result motion :
the bone will follow straight path from the first pose to the last (blender can't  regenerate the original motion from those two states only) while rotating around its head

To prevent this you can :

add more intermediate keyframes.
or use an empty as a parent at the center of rotation.
or use curve as guide for the motion


text:
Problem after joining meshes
After I've joined 3 meshes into a single mesh with ctrl+j, part of it becomes transparent after I import it to Unity (see left side of the image). What could cause this and how can I fix it?

Looks like back-face culling to me, which would make sense if the normals of the bottom object were inverted. Try selecting everything in edit mode and pressing Ctrl N to recalculate the normals before exporting.

Did you have any modifiers on the meshed before you joined them?

@gandalf3 It's strange, I had tried doing that earlier and it didn't work. Now after some more modifications to the model I rejoined the objects and found different parts to be transparent than before, and recalculating the normals fixed it this time. Thanks.

@Denis Nope, no modifiers!

It looks like the normals of the bottom part are inverted, resulting in a transparent look due to back-face culling.
Try recalculating the normals with ⎈ CtrlN in edit mode (↹ Tab) with everything selected (A). Note that it's possible to create topology which cannot have consistent normals, which could be why this didn't work for you before.

I've an object showing transparent faces (and black triangles), which I tried to fix after a Join. The object is not detected as non-manifold, normals are consistent and the problems are still present.

@mins this is a wild guess, but is it possible you have a copy of your mesh overlapping in the same spot?

Not the case. I found a bypass: Exporting the object (x3d) and reimporting it to create a clean mesh.

@mins glad you got it working, happy new year :)


text:
Why is deselecting vertices with bmesh not working?
I want to make use of the bmesh module to update mesh selection.
To select vertices works as expected, but to unselect vertices does not work for me...
Am I missing something or is this a bug?
bm = bmesh.new()
bm.from_mesh(obj.data)

bm.verts.ensure_lookup_table()

#this works

for v in bm.verts:
    v.select = True

#this does not work

for v in bm.verts:
    v.select = False

bm.to_mesh(obj.data)
bm.free()

This is probably due to the selection states of faces and edges.

thanks @lemon! using faces solved the problem! :)


text:
RTX Support for Blender 2.79b
I've recently purchased an NVIDIA RTX 2070 Super GPU as an upgrade to my AMD Radeon GPU(Yes, pity me.). But I was slightly heartbroken when I realized you can't use an RTX card with Blender 2.79b. Yes, I know you can use it in Blender 2.83, but that version ruined the UI, and my character rigs won't work. Anyone have an addon, fix, patch, or even a link to a sketchy website that'll give me the version of Blender I want if I give my credit card number into return? I mainly use the cycles render engine. I know it would be easy to update Blender and just get a new character rig, but I'd really like to stay with Blender 2.79.

To be able to use RTX cards with 2.79 you can use one of the 'nightly' builds of 2.79 that came between the latest release of 2.79 and 2.8.
From the 'Previous Versions' page (found by clicking the 'Blender 2.7' link from here):

You can also download the experimental nightly build from July 2019
which basically looks like 2.7 plus additional bug fixes and some new
features that later became part of 2.80.

Following that link takes you to here which is where the downloads reside. This allows you to download 2.79.7, which is compatible with RTX cards.
Note: These versions of Blender are the portable versions which run from the folder they are extracted to instead of coming with an installer.


text:
Sverchok The grease pencil is moving but not the polyline visual
I'm very new to sverchok addon, and I want to use it in a really easy way.
But now I have a big problem:
I've parented my grease pencil layer to an moving empty, but the polyline visual effect of sverchok doesn't move with the empty. Is there a solution to this ?

Since this is very add-on specific, have you tried asking the add-on author(s)?

Yes i've tried but their forum is more for bugs than for basics help so I guess my question won't be answered there

Please, how to reproduce this result?

If you use parant, than use matrix from parant object to apply it to GP inside sverchok. It is matrix deal.

https://gist.github.com/nortikin/c8716923f5d87773b25d417f1610d6dc
this is applying of matrix (4-th node from the left side)
It is simple one node


text:
How do I know which faces correspond to which area of a UV image?
The below image shows the edge of two faces. I'm wondering how you know which face the lines belong to. It seems pretty random.
Basically what I'm trying to figure out is if I go into photoshop and try to only select one face to paint onto, which lines do I also select so that I don't have black edges on the mesh?
I hope that's clear enough. If not I'll try to reword it.

I try to answer in generic terms. Where texture mapping is concerned: there are no pixels!
The U and V coordinates are relative. They do not point to a pixel, they point to a position between 0 and 1. So if your texture has a resolution of 1024x1024 the coordinates 0.5, 0.5 would not point to a pixel, but to the interpolated color at the center. And this would be in that example right between the 4 pixels in the center of the texture resulting in a color value where all 4 pixels of the texture get mixed together in one.
If you UV map a 3D model, it is not guaranteed, that a texture coordinate lands right in the middle of exactly one pixel of your texture, it could land two thirds on one pixel, and one third on another, etc, etc.
When you export a uv map from blender so you can photoshop your texture over it, it is important to know that it does not matter where the edge is drawn. Just think of the edge as infinitly thin. There is no belonging to one specific face, if both share the edge.
However if you really want a "sharp" edge, one that is really separate from its neighbouring face, you can insert a seam in edit mode, unwrap the UVs again. Now there are two edges in the UV map. If you keep an eye on your vertex count you will see, that by making that seam, your vertex count goes up, since all vertices along the seam gets duplicated. They still occupy the same space and blender treats them as one, but the underlying renderer sees them separate.
I hope this answers you question.

That was a perfect explaination. Thank you very much for that. It makes total sense.


text:
how to produce a Silk/Satin material
I have two lamps, a plane with an emission shader and even world lighting turned on, why does my scene appear so grainy? I have turned up render samples, clamp indirect is now at 3.
What can I do to make a silky looking pillow that doesn't look so grainy? Plenty of screen shots below.

You appear to be using glass shaders with high roughness to produce a satin-like effect. Glass shaders can cause a lot of noise and would not seem an ideal fit for cloth (which is essentially opaque). You might be able to get a suitable effect using the Velvet shader or something like the following :

The satin is effectively a diffuse material with an element of glossiness - but glossiness that behaves subtly different to a smooth flat surface. In addition, the reflection off the glossy surface has quite a high roughness with a hint of the 'base' color (since the 'shine' is a mix of diffuse from some fibres of the cloth and glossy from others - so the usual dielectric rule of uncolored reflction doesn't apply here) - hence the Mix node to allow the reflection color to be adjusted. The Fresnel with a high value allows the amount of 'shine' to be adjusted and the Power node adjusts how the glossiness varies based on angle.

Thank you so much! I ended up using a texture but this could have worked just fine too. Thank you!!


text:
How Could I add a Single Vert in Blender 3.0?
I'm learning to use Blender. And I need to add a Single Vert using Blender 3.0. But I'm not finding the option in the Floating menu ( Shift + A ). How do I add Single Vert in Blender 3.0?
Grateful

you can simply enable the built-in add-on : extra objects


text:
retopologizing large irregular ngons
This Toyota logo is a topological mess. Initially it was just a large circle plane, extruded, with no cutouts. Then, it got messed up after using a boolean difference modifier. It actually looks better than before because I ended up deleting a lot of extra faces and filling in new ones. The main problem with this is the faces of the object which are large asymmetrical ngons.
I now assume a much better way to have done this would be with curves and knife project but am retpologizing this as a learning exercise.
I am pretty new to blender. I used to use it several years ago but have memory issues and am now relearning everything. This is my third model.
I know the first step would probably be to connect the vertices of the cutout edges and dissolve non-matching vertices and edges. But I cant always do that for edges What I am trying to do with this model is chamfer the edges of the cutout areas. Is this possible even with tedious work or is it a lost cause? Also, would it have been better to keep the main two faces of the disc as a circular ngon or should I have used fill grid before applying the difference modifier?
The file is at http://www.pasteall.org/blend/33200

For popular and common items it might be a good idea to search for wireframes other people have made in order to learn from them. For example sites that offer 3D models for sale.
Here's one I found.
I post it here for educational purposes:

I modeled a low poly logo by just extruding a plane (using the Mirror Modifier) the mesh looks like this:

You might want to add a few additional loop cuts e.g. at the red line. When the 2D model is finished it can be extruded.
I didn't refine it after adding a Subsurf Modifier because it looked OK in the scene:

thanks but I was looking for answers to my topological issues. How to fix those problems not how to design the mesh.

@user1894167 My intention was to say: restart from scratch don't use boolean and you will have no issues with ngons.


text:
how would one go about creating an epic animated landscape?
I would like to create a large natural landscape with animations(waterfall, river, ocean, wind moving objects). I am a just wondering if the polygon count of a epic landscape is feasible in blender. I dont know how a plane or ANT terrain object subdivided many times for detail would behave in the scene window or even if the entire object would need high subdivision but I do know I would need high subdivision at many points on the objects since I would be sculpting detailed cliffs and mountains(not simple smooth falloffs created with proportional editing) and I also know a cube I created with 100,000 verts rotated ok in the Scene window(Wireframe) but the next subdiv(400,000 verts) barely moved.

ok let me simplify the question. Can blender really work with a high polycount on lowend machines? On Zbrush I can go upto 2million polys. On blender it seems I cant go past 100,000. Or rather 100,00 works but 400,000 doesnt.

It's not the best comparison. ZBrush is not 3D application, it's 2,5D meaning that it edits like 3D mesh only current one while it's in Edit mode. Once you exit from there the object will become uneditable 2D representation of itself. Hence ZBrush can operate really high polycounts by lowering amount of resources on other things. Blender is 3D app which allows editing of all objects in the scene and does have ways to reduce resources usage although they aren't endless.

To operate with high polycounts you should make sure that your scene preview subsurface levels are as low as possible when you aren't working on them(so split up your scene into smaller sections). Also, you can put sections you aren't working on in wireframe view(this does help). Splitting stuff up into different scenes also helps.
When I do high polycount scenes I work on them section by section on different layers then put them all together but only leave the center in solid mode.
So yes, Blender can work with high polycounts on a lower machine but you'll probably have to jump through some hoops to do it.

authors: Кирилл Катушонок


text:
Static grass animation - grass looks differently in different frames (it's not animated though)
I made some grass using Particle System and grouped grass objects (each object is a clump with lots of blades).
I didn't do anything to the grass, the only thing that has any keyframes during my animation is a ball rolling through the grass.
The "emitting" plane has a collision component and so does the ball.
The problem is, in over half of the frames the whole grass field looks the same, but in some frames it looks like a clump or two disappear and different ones are suddenly visible. It's very annoying and I don't understand how this can happen.
I attach two frames, the first one is the "normal one" and the second is the odd one.
Thanks for any suggestions! Cheers.
PS Look at the middle - far right or at the middle part of the attached pictures. This is where the discrepancies are.

Did you set the start emit and end emit values to be the same in the particle systems settings? Nice rendering by the way :)

Hey, thanks! I'm sorry but I really can't find the settings you're talking about. Where precisely are they?

When you click the tab for the particle systems settings (where you created the particle system for the grass), then there is a section called 'Emission' and there are the 'start' and 'end' values

I don't have those settings, I added a screenshot of this section.

I thought you used the 'emitter' type and not the 'hair' type xD What are ParticleSystemGreen and ParticleSystemYellow?

I have two kinds of grass and wanted to control how much green grass I have and how much yellow there is. The settings of those two systems are almost identical.

Does this still happen in 2.75a? I seem to remember seeing a bug fix regarding something like this recently..

I'll have to check, I'm using 2.74. Thanks for that info :)


text:
Unable to select parented mesh
I've parented my mesh to my armature and want to edit the weights with weight painting, but I can't select the mesh to get into weight painting mode.
I'm trying to select it from here. Help?

Press the plus icon next to ["armature"]to open up the hierarchy.  Like files and folders
There you will see your mesh which can then be selected.


text:
Weight Paint differently on Linked Duplicates
I am rigging a bird and all my  wing feathers are linked duplicates with the same mesh data. I would like to keep the objects linked in case I want to change the shape of the feathers later.

My problem is that if I weight paint one feather to the rig, all feathers are connected to the same bone, since they share their mesh data and vertex groups. Is it possible to unlink the vertex groups, or somehow weight paint them individually, while still keeping the shape of the mesh linked?

You can't have linked vertex position without also having all of your mesh data (weights, but also shapekeys, UV, vertex color) linked.
Some things you can do instead:

Unlinked objects that are surface deformed from a master prototype to track non-topological changes in the prototype
Linked objects that are individually bone parented
Use modifiers, like vertex weight edit or geometry nodes, to create your weights on linked meshes
Create your object by applied modifiers that act like links, modifiers like an array or geometry nodes instancing
Use a modifier, like a data transfer, to copy weights to all your linked meshes from some other weighted (and non-rendering) mesh.

Thank you for your answer.
Your list of alternatives is really helful. :)


text:
How can I seperate and fill mesh islands in geometry nodes?
I want to animate complex curves with shape keys.
When I have overlapping curves within one curve object, Blender doesn't fill the overlapping parts.

My desired output would be this, but as one object (so I need to animate only one object instead of many).

So I'm trying to build something with geometry nodes that lets me fill the entire surface area. (Ideally without overlapping faces, but I don't care much about z-fighting, since it will be a black silhouette in the end.)
Is there a way to split the islands in geo nodes, use the "fill curve" node on every island seperately and then output them as one geometry? So far my node setup is this, but I'd need a loop that lets me select each island.

I am developing a solution for Blender 3.6.8, but if you are using Blender 4.1, do you try and connect the Island Index socket to the Group ID socket of the Fill Curve node ? Perhaps you have to capture it before the Curve to Mesh node...

(Using Blender 3.6.8)
Results

This figure illustrates on the left three closed overlapping splines joined as a single curve, and on the right the achieved filled curve using a GeometryNodes modifier.
GeometryNodes Graph

Overview: The followed approach is to use the Curve Index to shift splines to remove overlaps and to extrude the filled curves, then to use the Island Index to shift back the parts. Eventually, Boolean Mesh operators are used to cut out an edge loop to make the outlining curve.
1. The diagonal vector of the Bounding Box enclosing the joined splines is used as unitary shifting vector. This guaranties that shifted parts are not overlapping.
2. Using a Set Position node, control points are shifted by a distance proportional to their Curve Index. This property is recovered using a Curve of Point node. This operation removes any overlap between splines.
3. A Fill Curve node is then safely used to make a flat mesh island from each spline.
4. These meshes are extruded to make a closed volume from each spline, combining Extrude Mesh, Flip Faces, Join Geometry and Merge by Distance nodes.
5. Using a Set Position node, these volumes are brought back where the original splines are. Their individual shifting distance is proportional to their Island Index. This property is recovered using a Mesh Island node.
6. All mesh islands are merged using a Mesh Boolean node with a Union operation.
7. The bounding box of the resulting mesh is slightly enlarged in X and Y directions by a factor of 1.1, and it is shrink in Z direction by a factor of 0.2.
8. A Mesh Boolean node with an Intersect operation is used to compute the intersection of the top face of the bounding box with the vertical boundary faces of the merged mesh islands. Edges of interest are tagged as Intersecting Edges.
9. Only those edges are not deleted by the following Delete Geometry node.(NB: this node can be removed by connecting the "Intersecting Edges" socket to the "Selection" socket of the "Mesh to Curve" node).
10. Eventually, the resulting connected edges are converted to a curve, using a Mesh to Curve node. If a mesh instead of a curve is required, a Fill Curve node can be used to make a flat triangularized mesh.
Resources:

You could move the splines apart, use the built-in fill curve node and then move the points to their original locations.

Resample the curves to work with a fixed number of points.
Shift each spline by the maximum bounding box length.
Fill curve.
Restore the original position by sampling the previous splines.

(blender 4.3) another method, not sure how reliable, but seems to be working so far. Based on the fill curve behaviour, extrude and raycast "is inside" face checking.

create (or you have already) your curve
make a bounding box and use its dimensions and position for the new quadrilateral
join both together
fill curve
extrude and create a solid volume from the original curve
use raycast node and the normal dot product, target is your solid
resulting boolean to delete what is inside (faces)
separate border edges to curve, sort elements by lowest X/Y and delete the quadrilateral (index 0)
fill curve

To keep the reliability is good to use bounding box 1/2max XY offset between original curve and the quadrilateral.


text:
Blender Randomly Reboots My Computer When Processing or Rendering
So I've recently started picking up blender as a new skill, but early in the gate I've run into a pretty major issue. Despite having a pretty beefy computer (will post specs below), Blender will restart my computer when doing nearly any realtime rendering or still/animation rendering. I work in the adobe suite every day and have never had this problem even while pushing out beefy comps or psds. I can pretty much run the entire suite at once with no problem but Blender for some reason just shuts off the machine.
What I've Tried

Updating the GPU driver
Using Previous Versions of Blender
Command Line Rendering (this works, but isn't a great solution given it still reboots the computer if its looking at nearly anything in the viewport)
Exporting on Another Machine (the file works fine, it rendered out without issue on my partner's laptop)
Checking Task Manager while rendering (nothing is shooting up to intense, no columns go past the 35%ish range)
Checking Event Viewer (I can trace back to a Critical Error, Kernel Power, Event ID 41)
Benchmarking the System (everything is in the good category, explains why my other software works fine)
"Checking" Crash Logs (There aren't any. I can't find any in the temp folder, I read somewhere that blender wipes them after a reboot?)

I wanna guess this is a GUI issue? I don't know why it'd be doing this with a computer I got like 4 months ago. I really wanna pick up this software but it becomes a non starter if I cant even model a rock in Eevee without it randomly rebooting my system. Can anyone offer any insight as to how to fix this?
Computer Specs:
AMD Ryzen 5 3600 3.6 GHz 6-Core Processor

Gigabyte B550M AORUS PRO-P Micro ATX AM4 Motherboard

Corsair Vengeance RGB Pro 32 GB (2 x 16 GB) DDR4-3200 CL16 Memory

Samsung 980 Pro 250 GB M.2-2280 NVME Solid State Drive

MSI GeForce RTX 3060 Ti 8 GB VENTUS 2X OC Video Card

Corsair RM (2019) 650 W 80+ Gold Certified Fully Modular ATX Power Supply

What are you used for rendering?  GPU or CPU or both

When you say you card is OC x 2, is it sold as an OC model, or did you overclock manually? Blender doesn't like manual overclocks, unfortunately (especially memory overclocking), so make sure you're running base speeds. Another (albeit less likely) cause may have to do with your Timeout Detection and Recovery (TDR) settings. Info about it here - https://docs.microsoft.com/en-us/windows-hardware/drivers/display/timeout-detection-and-recovery

One thing to look into is this new issue of 'transient power spikes' in the 3000 series GPUs.  A 650w power supply may be vulnerable.

Maybe there is an error in the hard disk, that happened to me last year too, I used the CrystalDiskInfo program to see the status of my disks and indeed the disk where I was rendering was failing.

I encountered an issue with my PC constantly restarting during rendering, even though the scene wasn't particularly heavy. I observed that the CPU usage was consistently hitting 100%, and I'm using the latest version of the i9 processor. To troubleshoot, I decided to disable the CPU checkbox in Edit > Preferences > System. Surprisingly, this not only resolved the issue but also made the render faster than before.

I had the same issue! And it blew my mind for several months! I found the solution.
The problem is CPU power settings in BIOS.
There is voltage protection that turnoff PC after some voltage threshold. You need to set it to some higher value.
Different vendors call this option in a different ways, but with similar words.
In my case:
BIOS -> Advanced -> VRM settings -> CPU Current Capability
I chose the "extreme" profile option, a max range for voltage, and I have good cooling for the CPU.

Wow. An answer that can lead to processor damage... That certainly deserves a downvote. Terrible advice.

If you're using Cycles rendering engine, try turning off Denoise and increasing the number of samples.
Hope this will help, I had the similar problem back 2 months ago.


text:
How to fix strange behavior of vertexes? (picture)
I cant understand the reason why this two vertexes move like if they are linked.
If I move one, the other moves too in a different direction, if I change the weight of one, weight of the other changes to opposite.
Please, someone, help to fix this!

check symmetry options like X mirror of weight paint (in T panel, options tab)

X mirror is off

Could you upload .blend? http://pasteall.org/blend/

Did I attachedd it to my post?

nope, just copy/paste the link

@Bithur
I am new here. How to upload files?

go : http://pasteall.org/blend/ click browse and select your file, click upload then copy the link. Then come back here, edit your question or add a comment and paste your link.

https://i.sstatic.net/FiPCG.pngfile:///home/lobzik/%D0%A0%D0%90%D0%91%D0%9E%D0%A7%D0%90%D0%AF/MODELS%20&%20RENDERS/%D0%A6%D0%95%D0%9D%D0%A2%D0%A0%20%D0%9E%D0%9A%D0%95%D0%90%D0%9D%D0%9E%D0%93%D0%A0%D0%90%D0%A4%D0%98%D0%98/problem.blend

@Bithur I am uploading it now

Here is it
http://www.pasteall.org/blend/34929

Your vertices are weighted on bad bones.

The selected vertex should have 1 for Bone1.035 and nothing else. This can be seen in Edit mode in the N panel. From there you can change the weight values (in this case, 1 for Bone1.035 and remove with X bone3.044).
The other vertex needs to have only bone3.044.
Once this is done, place your vertices where they should be and they'll do what you expect.
You're life would be easier with better bones names (Something like Arm1.bone1, arm1.bone2, Arm2.bone1 ...)

This feature in N-panel is very handy! Will keep in mind. Agree about names.
But after removing extensive bones in N-panel for both vertexes the problem is still here. When I move one of them the other keeps moving to where it wants.

Oh, here is it!
Now I turned the mirror off and everirhing became OK :)
Thank you very much! You are cool specialist, Bithur!

glad to help, have fun :)


text:
How do I export a simple Blender 3D model, without armature, to Three js?
I have googled it and have found a little or close to no info.The existing info is for old versions of blender and three js.
I have tried this method https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender, but I am not seeing "Import-Export: Three.js Format" in the Addons in blender.
I have Blender 2.72, and three.js (r70).
UPDATE:
I have been able to export my simple cube model into .JSON file type.
Now how should I upload and use it in three.js?

According to the docs you should do this. File -> Export -> Three.js the rest is self explanatory.

I'm using Blender 2.73 and three.js (r70)
The io_three folder has to be copied to blender's scripts/addon folder for the "Import-Export: Three.js Format" to appear. But this has probably been figured out by you.
During the export to three.js (.json) format you may want to include a few essential and additional attributes like vertices,faces,colors and materials for your model. By default, the following will be checked.

Depending on the complexity of the image, you may get texture files in addition to the .json files. Use them.
Now you have to basically re-create the model using a scene, camera, renderer and animation loop.
A tutorial with three.js basics --> http://www.kadrmasconcepts.com/blog/2011/06/08/three-js-blender-part-2/


text:
Did I download Blender correctly, or was it CG Cookie?
I downloaded Blender yesterday (or so I thought). When I click on the icon this morning, all I get is the beginning screen of a tutorial from CG Cookie.
Who is CG Cookie and how do I have them? How do I get Blender and the initial page I had when I first finished downloading it?

can you look thought your browser history and post a link to the page from which you downloaded blender? CG cookie is a training site not at all connected to the blender foundation, although they do have tutorials and addons for blender, they do not have a custom version of blender for download.

CGCookie is a website with tutorials and learning material, which among other software also includes Blender resources. I am guessing you didn't download Blender at all and you somehow clicked a shortcut to the website. Try following the instructions from Uncle Snail bellow.

Also if you downloaded Blender from sourceforge or similar sites, the default download often includes a installer which pack loads of adware... always make sure you find the projects own proper website and get the right links from there.

I'm voting to close this question as off-topic because its not actually about blender, its about downloading.

Try downloading Blender from this page https://www.blender.org/download/.
Make sure you get the correct version for your operating system.
You can also download a program file that does not require installing by downloading the zip.
Simply unzip the folder to your desktop, and run the program (it will be the file "blender" and will be a program file. [or application/executable, depending on your os.])
Or you can download the "bleeding edge" test builds from here. It is the most recent version of Blender, and is a kind of test build, so be ware, it may not be stable.


text:
X-Ray is too much X-Ray
When I use X-Ray, the mesh also becomes transparent which is often super confusing.

What I want is to see all the vertices/edges just like in the picture, the closest ones are more visible than the "hidden" ones, but I want the mesh to not be transparent.
I think it is really confusing to see the shape of the mesh in the X-Ray because it has no depth at all. Ideally, it should look like a frosted glass material
Is there a way?

just open the setting in shading and set the x-ray value to 1 that means it is fully visible but keep the edges and vertices see throu. The lower the number is the more transparent the geometry is.

Thankyou that was exactly what i needed!!!

@ErikW if this answer provided you with the solution to your question, you should consider accepting the answer


text:
Why does parenting Heel IK to Thigh Bone cause jittering in right leg but not left leg?
I have a character with legs that are not parented to a torso bone (they end at the top of the thigh - each thigh is a highest level parent). Other than that, I rigged the legs normally.
I wanted my character to be able to retract his legs upwards into his body. To do this, I scale each thigh bone down in pose mode.
This works for each leg, but each foot remains the same size, because each foot bone is parented to its heel IK bone.
To solve this, I tried setting each thigh bone as a parent of its respective heel IK bone. This worked fine in the left leg. However, in the right leg, this causes the bones to move wildly all about in pose mode.
To see what was wrong, I tried separating the right leg with all its bones into a different armature. When I did this, the right leg behaved normally.
My paint weights are fine, and influence the mesh properly; this problem is only with the armature. Both legs appear to have identical bone hierarchies, and identical constraints.
I've been able to solve my problem by setting a bone constraint to match each heel IK's scale to its thigh bone's scale. However, I'd still like to learn why parenting the bones the way I did caused the strange behavior, and I'd really appreciate help. Thanks!
I can post more information or screenshots if that would help.
Edit: https://drive.google.com/open?id=1-bWzTfC_T1BdgUn1wnHGU0S8ra1XRreM

If the left leg is OK while the right leg has the problem, probably there's a little hidden difference, so I think you should upload your file for inspecting.

I think you're right. Thanks, I uploaded the project.

To have an IK controller which is child of a bone which is part of the IK chain must be considered a rigging error, because it creates a circular dedendency, leading to unpredictable behaviours (and jitterings).
Instead you can create a new bone (which I called "scaler") that will be parent of the thigh and the HeelIK. In my picture scaling the scaler bone caused the whole left leg to scale proportionally, maintaining full functionality of the IK leg chain, without any need of constraints.

Awesome! Thanks for the answer. Any idea why it worked for the left leg? I got the sense that there was something invalid about the chain of operations I was performing, but I couldn't tell for sure because I only experienced problems in one leg.

Circular dependencies are impredictables. On my computer your file had jittering in both legs.

Gotcha! That makes the most sense. I was suspecting that the left leg might actually be the anomaly. Thank you!


text:
Switching camera view on multiple cameras form python
I've created 3 cameras in my scene and I need to go from the first to the last always in camera view.
What's wrong is that if I start my code in camera perspective, the camera changes and so do the view correctly.
But if i launch my code in user perspective, the cameras will switch correctly but the view not until the end, where it will go in the last camera's perspective
for w in bpy.context.window_manager.windows:
    s = w.screen
    for a in s:
        if a.type = 'VIEW_3D':
            for r in a.regions:
                if r.type='WINDOW':
                    override = {'window':w, 'screen':s, 'area':a, 'region':r}

by.ops.view3d.viewnumpad(override, type='CAMERA')
for c in [c for c in bpy.context.scene.objects if c.type == 'CAMERA']:
    bpy.context.scene.camera = c
    bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations = 1)

Seems like the viewnumpad() is not triggering correctly the view before the switching. How can fix it?

is the same code you are running ? there is an error in REDRAW_WIN_SWAP

pardon, I forgot the override for the view_numpad() context. Edited.

no i did the override part but as i said there is no REDRAW_WIN_swap

still my fault. It's DRAW_WIN_SWAP....don't know why I wrote that :)

did you take a look at this DOC

yes it's where I found the redraw method. I know that it's not a good practice use the redraw_timer()...are you telling me that this may be one of those case where the redraw fails? :\

I guess we have to wait for one of the blender  experts to drop by, but i'll keep digging :)

The problem appears clearly when moving from any view to camera_view but it is also present when moving from camera_view to another (you can see that the view change from camera than hold still and then change at last) and it is caused by the ED_view3d_smooth_view_ex() ( source code ) function  and as you can see in the source code it is skipped if you are in render view , so for checking you can switch to render view and the code will run as expected
here some code to make the transition clear (watch the view and console ) :
def main(context):
    print('******************************************************')
    bpy.ops.view3d.viewnumpad(type='CAMERA')
    bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations = 1)
    print('sleep')
    time.sleep(8)
    print('wake')

( it may have something to do with timers )

you're right, in render view it works correctly. Otherwise I can't do it in this way because if my scene starts to be heavy, any transition will require too much time; in this case doing it starting from the a camera view will be lighter. By the way thanks a lot for your time!

@UncleSax you're welcome, and if it is critical to your application ask the developers for any work around


text:
Material Preview doesn't match render
I've created a wood floor material using an image texture node, I'm happy with how it is displayed in the material preview.
However when I apply the material to any object, in this case the 'wood_floor', the shader seems to only apply a single color to the object rather than the textured material I've created.
Here is the blend file.

What is causing this effect and how can I get the material to apply to the entire floor object?

thanks, I have fixed the blend file, thanks for having a look!

related texture-is-missing-in-cycles  and texture-not-rendering-in-cycles

You need to UV Unwrap your mesh. You can do this by going into Edit Mode, selecting all vertices, and pressing U > Unwrap. You do not need to change your material at all, UV Maps are applied to all image textures by default.

For more in-depth explanation of the process go visit the wiki article


text:
Might it be possible to use scripts in blender to do what Mandelbulber does?
This would be a sort of extension of this question: Fractals in Blender?.
I was playing around in unity and found a tutorial for making fractal objects via C# scripts. I used the script from the tutorial and set up a scene to port to android and discovered the frame rate when looking at the fractal object was extremely low due to the vert count and number of individual objects. As I was unable to figure out how to merge the meshes properly in unity I figured I'd turn to blender with python scripts since I figured I could do the same thing in python and have seen how simple it is to copy and merge meshes via the array modifier.
Long story short, after trying to find scripting tutorials for blender 2.7 and getting lost in the API I started to wonder if what I'm trying to do is even possible. What is my end goal, you ask? I want to make a fractal landscape similar to what you might generate in mandelbulber, but finite in each direction. Fake 'infinite depth' is also unnecessary, as I'm fine with simply stopping recursion at a predefined depth. I want this landscape to be a single mesh that I can export to unity.

Sure you can generate such fractals at finite poly resolution.
You just need to figure out the fractal math and positions of vertices. Then you can build such mesh in python with the BMesh module.


text:
How to render a volumetric shadow?
I would like to render the volume that is shaded by an object (e.g. cube), not only the 2D shadow cast on the ground (as in the attached image).
I understand that in reality the shaded volume is not visible as shaded (only when it "reaches" a surface like the ground plane it becomes evident), but in my project I need to somehow show the shaded volume as well (preferably semi-transparently).
Is there an easy way to do it? I am using the lamp of type Sun and the Blender Render engine.

@someonewithpc thanks for the link, but it didn't help. It's related to the Spot lamp and/or Cycles.

@someonewithpc thanks again, but the link refers to the Spot lamp. I am using the Sun which does not support Halo :(

Further, it seems that the solutions refer to an inverse case, where there the light is limited (e.g. through a window).

Oh, ok I didn't realize that was what you wanted

if you are not prepared to use a spot light, the only way is for you to create an image to superimpose over the image. Is there any reason you would not do the spotlight?

No particular reason actually, except that the rays have to be parallel. However, on this small example it will not be noticed they aren't, so I will try with a spot light.

Possible duplicate: http://blender.stackexchange.com/q/6298/599

Do you want to be able to see the dark parts of the cube, but not the cube itself (like a smoky cube)? Or do you want to see something in the gap between the cube and the floor where the shadow is being cast (kind of like a god-ray)?

Most of the best solutions for this are going to require Cycles, because BI doesn't really know what light is, or where it's going, or what it's passing through...

Make a point cloud where you want your voluminous shadow to be (I suggest keeping it cubish in shape so everything matches up alright), and use the volume shader on this extra object instead of the surface shader. Making it a shadeless object would also keep it from casting any additional shadows (I don't think it does with the point cloud method, but this is a workaround if it does.). You can mix this whole thing with a transparent shader to control how visible it is.
EDIT: Point cloud is unnecessary with this method, just warp a cube to the right shape.

I'm not really sure what your asking and I didn't understand a thing IncessantLee said.  But if you trying to ask how to only render the shadow and the cube casting the shadow but not the plane.  select the plane, go to the materials tab, and under shadows check "shadows only".  when you render it the plane will not be visible but you will still see the shadow and the cube.  Hope this helps, again I wasn't really sure what you were asking.


text:
Transform multiple objects with (large) geographic coordinates to fit together
I have a few objects with geographic coordinates (for instance, X can be 1 300 000), so they are far from the centre of the canvas.
I want to get them to the centre together, and also that they are within the bounds of the plane (the one that is there by default, sorry I don't know the name).
However, when I use the command Shift + Control + Option + C - Geometry to Origin, each is transformed separately and they don't fit anymore together (two objects that were touching each other are now displaced).
Furthermore, because of the size of the objects I need to scale them (0.01 of the original size suffices), but things get further degraded here.
How can I translate and scale the coordinates of all objects to local coordinates in such a way that the objects retain their relations?
Edit: example
The two objects in Meshlab with the original coordinates (the example before the transformation is in Meshlab because it conveniently adjusts the view to the extent of the objects):

After importing them to Blender and performing the command Shift + Control + Option + C - Geometry to Origin for both objects selected together, I get both in the centre overlapping with each other (I made separate screenshots with toggled visibility because one is over the other):

Can you show some screenshots before and after transforming objects ?

@MrZak: I put screenshots for examples

Where are origin points of both the objects before performing Geometry To Origin ?

Do you mean the coordinates in the Transform/Location tab of the objects? They are both (0, 0, 0).

I meant objects origins which can be visible as a small dot once object is selected. It's visible for one of your objects but it's not for another. Can you include a screenshot of objects after importing but before doing anything else ?

But after I import the models and select any of them there is nothing shown because the objects float somewhere far away (the coordinates are on the magnitude of millions of units). The second screenshot I put after the transformation doesn't show the point because I deselected the object. When I align the view to selected (Num .) I don't see the point, I just see the green outline of the selected geometry.

It means origin point is somewhere far away which might be not desirable. Moving objects respecting their local position should be possible in Object mode by moving their origin points to their geometry and Shift+S > Selected to Cursor (Offset) with 3D Cursor set where needed.

I did that, but how do I then move and scale all objects to the center (the default grid around 0,0,0) and retain their relations?

See if this help - http://blender.stackexchange.com/questions/48320/move-meshes-of-several-objects-without-affecting-relative-position

Thank you @MrZak, that solved it. If you want you can make your comment as an answer so I can accept it.


text:
How do I change the color of particles with a color ramp?
I watched this tutorial https://youtu.be/eshOzshjt90 and at 2:18 he somehow magically managed to get a different color on his second particle via the color ramp. But the color ramp doesn't do anything at all? I'm really confused. How do I change or invert the color of my second particle?

If your particle system is instancing an object then you can customise the particles to sample random colours by using this node setup on your instancing object:

Here, all I've done is use the random output of an object info node with a colour ramp :)

mhh, thats not really what I'm searching for :/ my plane has two hair particles, the second one is a duplicate of the first one. The first particle should have color a and the second one color b... i tried with creating a texture and enable color ramp, but color ramp doesn't do anything...


text:
How do I choose a specific vertex to be extruded with Python?
I am a newbie here. I tried to write python script by copying and pasting commands from the top scripting window in Blender. I met a problem when trying to extrude an object programmatically. Here is my sample code:
bpy.ops.mesh.primitive_cube_add(
      radius=2.5, # The initial radius is the radius of starting point
      view_align=False,
      enter_editmode=True,
      location=(1,2,3),
      layer=mylayers)

bpy.ops.mesh.merge(type='CENTER')
bpy.ops.object.modifier_add(type='SKIN')
bpy.ops.object.modifier_add(type='SUBSURF')
bpy.context.object.modifiers["Subsurf"].levels = 4

bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False},
                             TRANSFORM_OT_translate={"value":(0, 0, 0),
                             "constraint_axis":(False, False, False),
                             "constraint_orientation":'GLOBAL',
                             "mirror":False,
                             "proportional":'DISABLED',
                             "proportional_edit_falloff":'SMOOTH',
                             "proportional_size":1,
                             "snap":False,
                             "snap_target":'CLOSEST',
                             "snap_point":(0, 0, 0),
                             "snap_align":False,
                             "snap_normal":(0, 0, 0),
                             "gpencil_strokes":False,
                             "texture_space":False,
                             "remove_on_cancel":False,
                             "release_confirm":False})

I first merged the mesh of a cube into a single point in edit mode and added a skin modifier to the point, then tried to extrude this point to create an object similar to this:

However, I realized that there is no such keyword to select the vertex that I want to extrude out the bar from. So I was wondering if anyone knows how to select or activate a specific point (by vertex coordinate?) for extrusion?

A bmesh approach.
In as much as the operator calls are written in INFO area, and can be used to make scripts I always recommend using API class methods when possible.
Here I've created a new object at (1, 2, 3) using a bmesh and the bmesh extrude individual vert bmesh.ops.extrude_vert_indiv(...) which returns the newly created vert at the other end.  For example sake I've added 3 random length branches in random directions.
Because of the random in all directions will get some rubbish result.  For practical use  some kind of tree data structure.
Added the modifiers using API method Object.modifiers.new(name, type)

a test run
import bpy
import bmesh
from mathutils import Vector
from random import randint, uniform
context = bpy.context
scene = context.scene
me = bpy.data.meshes.new("Thing")
ob = bpy.data.objects.new("Thing", me)

bm = bmesh.new()
root = bm.verts.new()
for i in range(3): # tree branches
    v = root
    for l in range(randint(1, 4)):
        ret = bmesh.ops.extrude_vert_indiv(bm, verts=[v])
        for v in ret['verts']:
            v.co += Vector([uniform(-1, 1) for axis in "xyz"])
        bm.to_mesh(me)

ob.location = (1, 2, 3)
skin = ob.modifiers.new(name="Skin", type='SKIN')
sub = ob.modifiers.new(name="Sub", type='SUBSURF')
sub.levels = 2
scene.objects.link(ob)

Used the extrude operator to match the question.  Could simply add a vertex at next location and use that to create edge.
newvert = bm.verts.new((2, 2, 2))
newedge = bm.edges.new([root, newvert])

Hi, thanks for the answer. The ops commands have been giving me warnings like ConvertViewVec: called in invalid context blender. I think I have to switch to bmesh. However, how do I select a vertex by location to extrude and then resize?

If you have some local location p select vert(s) such that v.select = (v.co - p).length < TOL where TOL is some small tolerance distance from your point.


text:
Objects can't go inside my mesh?
So I've been making a a character and I've fully sculpted, retopologized, and baked normals with this character. I then went to work on making an eye, and when i finished i tried to move the eye inside the head of the mesh, and for some reason it refuses to go inside. Every time i think i've successfully transformed it inside the eye socket, it ends up on the other side of the head altogether. It's like every time i move the eye, it's only sliding along the surface of the mesh rather than intersecting it. I don't understand what happened.

Did you happen to leave face-snapping enabled after retopologizing?

Yep that was it thanks, i totally forgot i still had snapping enabled


text:
RETOPOLOGY: am I doing it correctly? If yes, how time-consuming is it supposed to be for a full model?
[
This is the head of a bird model I'm making. The red is the retopo (plane meshes).

Your question is too broad. You should add details about the tools you're using for the retopo.


text:
Render layers added back in order after applying glow in compositor
I've just had my first attempt at applying glow in the compositor using different render layers.
When I try and apply the layers back together however there is a drastic effect happening that I have no idea how to correct.

As you can see, the eyes are now popping out from behind the eye sockets.
I have been following Andrew Price's Introduction to Blender's Compositor tutorial but cannot seem to get the eyes to sit inside the sockets where they are supposed to be.

As it turns out, It seems looking back at this that the whole way I went about adding the glow to the eyes only was ineffective.
This question Highlights a much better solution to give the material a separate index pass and using ID Mask then apply the glow directly to the eyes.


text:
strange shadows and artifacts on cycles render
I'm getting some unexplained shadowing artifacts after rendering in cycles.

As you can noticeably on the end of the nose, and more subtle under the green eye.
I'm using a 3 point lighting system that can be seen here

I've tried playing around with the lighting, and no matter what I do with the lights, the shadow is still there.
Anyone any suggestions for what could be causing this and what settings I could try playing around with to resolve this?

It looks like you are having duplicated meshes intersecting each other on your mesh, if not then it should be normals that are not represented correctly. Try to removing double and recalculate your normals and see if it helps. Also select all your face and apply smooth shading.
Attaching a portion of your mesh would let us help you diagnose the issue too. You could just leave the nose portion in the file where the artifact is showing up.
Preliminary Probe
Probing into the file, I found that you have meshes that have all the edges "mark as sharp"
to unmark the meshes. Go into edit mode, select all the edges ... hit CtrlE and select "Clear Sharp".
After which, I also found out that your faces are not joined as a single mesh ... to solve that.
Do this ... With all the faces selected , Hit W select "remove doubles". This will weld all the triangles into a single mesh and remove vertices that takes up the same 3d space.
At this point I apply "shade smooth" with the W "special meun. This mess up the normals. Then I proceed to add a modifier "Normal Edit" under then modify column. The strange shadows are gone but some harsh edges still persist.
Solution

Note
You can read about why this happens here. http://www.blenderartists.org/forum/showthread.php?370090-Cycles-Glass-render-Black&p=2864146&viewfull=1#post2864146

Removing doubles doesn't seem to do anything, and recalculating normals completely messes up the texture. Face is already smooth shading. Could you recommend a way I can upload my blend ?

http://blend-exchange.giantcowfilms.com/ use this link. Just upload the portion you need us to look at. Edit your original post and past the link in the Original question after you finished uploading. The upload page will spit out a link to your upload.

http://blend-exchange.giantcowfilms.com/b/943/

When you had applied the solution did you notice any further shadowing on the tip of the nose? i still have that issue.

Yes I do have the issue with the nose , but realised it's just because the nose is really too pointy and would have cause shadowing issue without manually modifying the normals, what I did was just moved the vertice back a little and it solve the problem one my end.


text:
How to properly set a UV map on generated faces in Geometry Nodes?
I have a group of faces generated in Geometry Nodes. They will be procedurally arranged in different shapes and the grid size will vary, depending on the image I use and the number of faces I need (it's a part of a bigger project).
I use these faces to display an image. Currently I get the bounding box of the original plane and save the vector to an attribute that I use in the shader.
I would like to scale individual faces, but keep their positions in the UV map as they are now (so that the part of the image that is on the face before scaling stays the same after scaling; now the image is just projected over the faces regardless of their size - see the pictures below, they explain better what I mean). How can I achieve that? I'm using Blender 3.4.1.
This is how it looks now:

Nodes close-up:

Shader:

Current result after scaling faces:

What I want to achieve:

*** EDIT ***
Here's the solution, if anyone is interested:

all you have to do is capture the uv map (you generated) before you scale elements.

Yes, that's it, thanks. I actually figured that out the next day, but got caught up in the project and forgot to add the answer here. I'll add a screenshot with all the nodes in case someone in future has the same issue.


text:
Offsetting a 3D bezier curve on the XY plane in Geometry Nodes
I have a catenary bezier curve that I generated in Geometry Nodes from mesh vertices.

I would like to duplicate and offset the curve on the XY plane (and make it work for both cyclic and non cyclic splines). I try to do it like this:

When the offset is small, it looks OK, but when I increase the offset distance, weird things start to happen (look at the last spline):

I think there's a problem with control points' handles but I'm not really sure how to fix it.
I'm using Blender 3.4.1.
*** EDIT ***
I'm attaching my .blend file if anyone would like to test directly on the problematic curve.
Also, some clarification: I would like to retain the catenary shape on all splines and the access to the handles of the control points after the duplication. The curve is a part of a bigger project (the .blend file is a simplified version), so I would also prefer to avoid converting to mesh and back if possible.
I tried to recreate the problem by hand and (if I understand correctly) the problem happens because as the curve gets offset and the distance between two control points gets smaller (or bigger), the vector handles stay the same, while actually they should be scaled down (or up) and moved closer (or further) to the original point on the XY plane.
Having said that, I have no idea how to fix this. I appreciate your help.

Someone will probably come up with a simpler way, but ..
This approach takes advantage of the peculiarity, that when a curve-line is swept along another curve, using Curve to Mesh, the indices of the longitudinal edges occupy the lowest range of the resulting mesh island. All but that range can be deleted from the mesh, leaving parallel longitudinal edges, which can be converted back to curves.
So the bulk of the group is index-wrangling:

This version expects a multi-spline curve as input, and exposes the duplicate count, inner and outer offsets to the interface:

Thank you for trying to help me with the issue. Your solution is quite creative but unfortunately it doesn't solve my problem because resampling destroys the catenary shape of the duplicated splines (after resampling my solution actually works similar to yours). Also, the nodes turn the curve into a poly curve, and I need to keep it bezier and retain the access to the handles of the control points (it's a part of a bigger project). I'll attach my .blend file in a moment. I'm sorry, I should have attached the file right away. I'd appreciate if you'd be willing to take a second look.

Hi @Karolina no problem at all :) .. I did anticipate these limitations might be unacceptable. I am a bit busy today. Maybe someone else will get there first.. will look when I can.


text:
Error: Object has no mesh data to be used for ray casting
I'm writing an operator that casts rays from the center towards certain amounts of points and finds the faces rays hit. I'm facing this annoying error, when I change the property of the operator.
I've managed to strip the code down to minimal code to reproduce this, that works on default scene
Code:
import bpy
import bmesh
from bpy.props import *
from mathutils import *

class SomeOperator(bpy.types.Operator):
    bl_idname = "some_operator"
    bl_label = "Some operator"
    bl_options = {'REGISTER', 'UNDO', 'PRESET'}

    prop = IntProperty(name="Prop",
        description="Prop",
        min=10,
        max=50,
        default=10)

    def execute(self, context):

        obj = context.active_object

        if bpy.context.mode != 'OBJECT':
            raise Exception("Please switch to object mode")

        cover = [Vector((0,0,1)), Vector((0,0,-1)), Vector((1,0,0)), Vector((-1,0,0))]

        for pt in cover:
            dummy1, dummy2, faceInd = obj.ray_cast(Vector((0.0, 0.0, 0.0)), pt)

            obj.data.polygons[faceInd].select = True

        return {'FINISHED'}

When you change the SomeProp value, the error occurs.

I'm getting this too when I do mesh.ray_cast, did you find a solution?

You need bpy.context.scene.update() just after execute() for it to work. It seems it needs to update some internal relationships.
Full code (modified to work on 2.78):
import bpy
import bmesh
from bpy.props import *
from mathutils import *

class SomeOperator(bpy.types.Operator):
    bl_idname = "object.some_operator"
    bl_label = "Some operator"
    bl_options = {'REGISTER', 'UNDO', 'PRESET'}

    prop = IntProperty(name="Prop",
        description="Prop",
        min=10,
        max=50,
        default=10)

    def execute(self, context):
        bpy.context.scene.update()
        obj = context.active_object

        if bpy.context.mode != 'OBJECT':
            raise Exception("Please switch to object mode")

        cover = [Vector((0,0,1)), Vector((0,0,-1)), Vector((1,0,0)), Vector((-1,0,0))]

        for pt in cover:
            dummy0, dummy1, dummy2, faceInd = obj.ray_cast(Vector((0.0, 0.0, 0.0)), pt)

            obj.data.polygons[faceInd].select = True

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

# test call
#bpy.ops.object.some_operator()

I had this error when trying to raycast on an object in a different scene than the active one. My solution was to temporarily link the object to the current scene.
Abbreviated code :
obj_is_not_evaluated = False
try:
    success, location, normal, index = obj.ray_cast(origin, direction)
except RuntimeError:  # Object is not evaluated
    if obj.name not in bpy.context.scene.objects:
        bpy.context.scene.collection.objects.link(obj)
        obj_is_not_evaluated = True
        success, location, normal, index = obj.ray_cast(origin, direction)

if obj_is_not_evaluated:
    bpy.context.scene.collection.objects.unlink(obj)

This error happens if you try to raycast in edit mode. For whatever reason, you can only raycast in object mode.

I get this error in object mode (and edit mode).


text:
How to create and assign a group to an fcurve with python script?
I am attempting to make an addon/script with blender python that works with mocap files (.bvh), my problem is that when the files are imported the group collection on fcurve.group is blank
for fcurve in bpy.context.active_object.animation_data.action.fcurves:
        if fcurve.group is not None:
            print(text='Source object fcurve group ' + fcurve.group.name)

How do I create and assign a group to the fcurve with python script?
fcurve.group = bpy.types.FCurve.new("LocRot") #what i tried first

Explanation of why:
When i import the files they have rotation mode XZY Euler on all the bones, I am attempting to use this script to convert the rotation mode to Quaternion however it fails due to the fact that the bones have no groups on them.... (hence my question)
Ultimately I plan to make my own pipeline which handles the small problems I have with the .bvh files when imported, such as converting FK -> IK
My full code can be found here and here if that helps at all

Why is this a problem? What do you do with the BVH files that Blender's importer doesn't do already?

dr Sybren: all i am trying to do is assign a new group to an fcurve, do you know how to do it?
fcurve.group = bpy.types.FCurve.new("LocRot") looked promising however i don't think i used it right cause it didn't work here

Both the fcurves themselves, and the action groups are part of the action object. You have to create new groups through the action and then assign that group to any fcurves you want inside it.
armature = bpy.context.scene.objects.active
anim_data = armature.animation_data
action = anim_data.action

# create a new group
group_1 = action.groups.new("group_1")

# assign the first three fcurves to the new group
for fcurve in anim_data.action.fcurves[:3]:
    fcurve.group = group


text:
How to keyframe custom properties in actions?
I'm using Blender to develop game animations. I have an animation that I want to attach hit boxes too. I then want to set boolean on/off values on keyframes the hit boxes are active and read this in game at run time.
Heres an example punch animation with hitbox attached to the hand bone.

On the last keyframe I'd like to set the hitbox to active. I thought I could use 'custom properties' for this. e.g. give the box a custom property of 'active' and then set it to 1.
I am using 'actions' to manage many separate animations. However it seems custom properties are not compatible with actions?
I'm confused because because the UI for the inserting key frames explicitly has a "Location, Rotation, Scale & Custom Poperties" option.

It appears that there is also a "custom properties" panel within the action editor :

This panel doesn't seem to respect the action time line and is always fixed to a value.
I've also tried adding the property to the armature itself

This doesn't get captured by the "Location, Rotation, Scale & Custom Poperties" option." insert.
I'm really just wondering exactly what custom properties the "Location, Rotation, Scale & Custom Poperties" insert option captures...

Don't know whether this YT tutorial will help?

I am not sure why you want to create a custom property to animate the activation of a hitbox. Wouldn't that be handled in the game engine anyway?

@L0Lock I want to use blender as the source of truth the game engine doesn't have an editor. I don't want to manually code up hitbox and frame data.

AFAIK right now, actions contain only keyframes from pose bones. So if you want to store custom properties' animation in an action, you need to create that custom property on a bone of the same armature.
For example, go in pose mode, select your hand bone, and got in Properties Editor > Bone Data tab > Custom Properties and create yours here:

This way, any animation on that custom property will be stored in the same action alongside the bones' other properties.

Hover mouse cursor over the value slider and press I. It will create a keyframe

This method binds the key frames to a global time line and not the individual actions. This means if I set this key frame in one action it will also be unexpectedly set in the other actions.