text:
Boolean Solver Issue
I'm new to Blender and getting to grips with everything.
I've tried to make a simple difference boolean but the modifier only works on "Fast" Solver and not "Exact". Is there a reason for this?
Thanks

Hello ! The exact solver sometimes fails when the mesh is not manifold. Make sure both meshes are manifold, and merge vertices that are located at the same place with Merge > By distance in edit mode

Would you mind giving more information on this? To me this looks like to cuboids, the one you subtract is set to display as wire only. If I recreate this, it works in Fast and Exact mode. Any more there is to know about them? Are they the exact same width for example?


text:
How to get silhouette with contour
For an architectural visualization, I would like to use MakeHuman models, but:

Only get them to render white with a black outline (on reflection surface too, if possible).
Interact with light like normal human bodies in the scene (cast shadows, etc).

I can do the outline in freestyle, but any in-Cycles solution would be appreciated (OSL?)

You might want to look into using the Freestyle renderer.

Related: http://blender.stackexchange.com/q/2953/599

Update
Freestyle is  natively supported in cycles as of this commit (will be in 2.72). This means that you can do exactly as in Utas's answer, but without the extra scene/renderlayer.

Original answer:
You could try using this node setup, it works with composite nodes and is render engine independent.
Here is an example render:

Here are some other methods I thought of:
Method one:
You can get outlines by using the index passes:

Enable the Material Index pass in Renderlayers > Passes:

Create a new material and set the Pass Index in Properties > Material > Settings:

Create the material:

You can then use the pass index to create an outline in compositing nodes:

Note that a limitation is that overlapping objects will not have lines between them:

This can be worked around by using the object Index for each object individually, however for large scenes this is probably too tedious.
Method two:
Another way is with the Filter node:

Repeat steps 1-3 from method one.
Enable the Normal pass in Render layers > Passes:

Use the normal pass to create lines, then limit the lines with the material index pass: (click for full size):

Result:

Render your scene twice. First in cycles and then in Blender Internal. Leave cycles materials in BI and change the alpha to transparent in the shading setting. There will be edges only in BI. When you get both of your scenes rendered. Use the compositor with the "alpha over" node.
If you want your human to be a shadeless white, you could use a material index node in Cycles that creates a mask of your object without shadows but it will still cast shadows under image.
Node setup:

Test render:

yep looks nice, I'm on 2 big projects at the moment, so sorry, but I can't test it tonight. I'll experiment a bit later, thanks a lot for your help :)

Now that freestyle is included in cycles I think you should update your answer.

Is this node setup available for download?

I tried solving the problem you have posed and could achieve the following result using Cycles shader nodes.
I have used the cross product between the shading normal and incoming direction vector and passed it to a math node whose output is fed to the mix shader that plugs in to the material's surface socket. The mix shader is fed with another mix shader which feeds an emission shader for the camera ray, otherwise the output of second mix is black.

Link to high-res version: http://www.pasteall.org/pic/show.php?id=52714

looks nice, thanks for your proposition :) But the biggest part of the problem is to get the humans white (for the camera only, achieved with an emission shader) but casting shadows (not emitting light for the environment).

I have worked out a solution and have edited my original answer. The silhouettes are not that well defined for very curved objects though..

thanks a lot satishgoda, it's really near from what I want to achieve :) I have to test it when I'm back home.

Great.. Let me know how it goes. I am still trying to figure a way out to get consistent silhouettes.

In the Materials panel, in the top right, there should be a drop-down menu with 'Data' selected. Open the menu and select 'Object' instead. Then, if you use an Emission shader, the object will still cast a shadow (although a weak one), and will not affect the lighting on other objects.

hmm, not sure why, but it now works in both data and object mode with strength connected to "is camera ray" from the "light path" node. I compiled latest SVN too, so it was maybe due to a bug, no idea... anyway geting 100% white objects with shadows and no light emission now works :) thanks

Eevee
You can use a nice trick (specifically in my case I needed outline only for some objects in my scene) - Solidified mesh with flipped normals.
There are two ways Geometry nodes ...

... object has assigned two materials. Pink material at first slot is automatically used for whole object. For flipped faces assign white material - Emit shader and enable Backface Culling in material properties.

Another way is to use Solidify modifier and enable Flip Normals and Material Offset > 1.
Source https://www.youtube.com/watch?v=EsY7FdNFOoQ

In cycles, use a mix shader between emission and diffuse. Set the factor to be Input > Light Paths > Is Camera Ray. Hope this helps!

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 does Blender Autodetect Texture Culture?
I just asked(and found a solution) to a question here, which talks about how I encountered a texturing problem with my own Wavefront Model Parser. The problem was that some models that I was loading would be textured just fine, like models from Legend of Zelda. While other models would not be textured correctly, like Claptrap from borderlands. As it turns out, the issue was not with my parser, but due to the fact that those two models were crafted for two different API's. Nintendo uses OpenGL for Zelda/All Nintendo DS games. While DirectX is used for Borderlands. Why was this a problem? Well, OpenGL and DirectX have different texture-origins. OpenGL has its texture origin at the bottom left hand corner, while DirectX is top-left hand corner. In order to get my texture for Claptrap to render correctly I had to open the diffuse texture up in gimp and flip it vertically, thus inverting it for use with OpenGL.
This led me to an interesting question. I had opened both models in Blender before sending them into my own program. And Blender correctly textured them both. So how does Blender know which culture(OpenGL or DirectX) to use when attempting to texture a model?
I should also mention that both Models were in .obj format. The only difference is that one was created for OpenGL UV's in mind, while the other was DirectX UV's. I want to know how Blender decides which UV format/culture the .obj uses.

I think Blender doesn't know that and afaik uses OpenGL for drawing viewport in particular; so that's why the result is the same for both models.

@MrZak So how does it know to flip the DirectX texture coordinates if that is the case? Both of the models I used were in .obj format, so it's not the model format that it detects.

Did you try to see these models' textures drawn in programs which use DirectX for redrawing(like 3DS Max)? It may be some problem of the file format, which flips texture coordinates for some reason. Also look at this thread

@MrZak I did not. But I used them in my program(Follow the link provided in my OP). Which used OpenGL bottom left 0,0. The DirectX model was incorrectly textured, while the OpenGL one was fine. Once I flipped the DirectX model texture vertically, it worked just fine(because it had been inverted to work with OpenGL).

@MrZak I'm actually very excited to figure out how Blender does this. I can't even wrap my head around it because if you flip coordinates (DirectX->OpenGL), you still end up with one being invalid for UV mapping. I don't understand how it knows when to invert and when to ignore inversion of textureCoordinates.

I have a suspicion that Blender detects the winding order of the texture coordinates. This would tell it which API it should render for. I'll do some testing when I get a moment.

Blender's probably reading the instructions in the mtl (material library) file that accompanies the obj file.
According to the mtl specifications mtl files can include a parameter (-o) that instructs the program reading the file to reverse the texture's origin in the horizontal (u) or vertical (v) directions:
Quoting from the specification document:

The -o option offsets the position of the texture map on the surface
  by shifting the position of the map origin. The default is 0, 0, 0.
"u" is the value for the horizontal direction of the texture
"v" is an optional argument.  "v" is the value for the vertical
  direction of the texture.
"w" is an optional argument.  "w" is the value used for the depth of a
  3D texture.

-o v   # This should reverse the texture's origin in the vertical direction

Open your OBJ's MTL files in a text editor and see if you can find anything that resembles this.

I didn't give Blender the .mtl, nor was it near the .obj. I already considered that!

The mtl doesn't exist? Wonder how blender knew to associate the texture file with the OBJ file. Not sure if the obj can include the mtl inline, but that's worth inspecting.

Because I dropped the texture onto the model after it had loaded it. See why this is so odd?

There has to be something in the .obj it reads. Or some other weird kungfu it does with the order of the UV coordinates.

I'm at work so I can't look at the claptrap .obj. But can -o parameter be declared in the .obj? I will reiterate, the .mtl was not present on the machine when blender loaded the mesh.

This is some weird stuff indeed! I tried adding the -o parameter to an obj file, and the importer didn't fail, but I didn't see much change either. So, dunno.

I get off at 1. I will post the obj's and stuff. Get back to you soon.

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


text:
Baking two textures into one
I need to do the following - import two different Collada-files, join them into one and combine their textures to one texture. So, the output should be one Collada file with just one texture.
I am trying to bake textures like here: How to combine two different textures into one
but get some strange result in the baked texture.
Just for example - here is the joined object with two materials (and two textures):

When i try to bake the textures I switch to the Edit mode, select everything with A, push Bake in the render menu and get the following strange baked texture:
What approach should I choose to make the correct texture and material?
I will describe the way I worked step-by-step:

Load the first and the second model
Position the models side-by-side (just like on the first screenshot)
Created a new UV Map
Created a new image in UV Image Editor with default size (1024x1024)
Created a new material for the baked textures
Went to the Texture tab with the material selected and in the material textures tab created a new texture
In the texture selected the image created in step 4
Went to the Render Tab
Switched to the Edit Mode, selected everything with A in 3D View.
In the UV Image Editor switched to the image to which I want everything to bake
Push the Bake button in the Render Tab
Got this strange result.
What I have missed?

Thanks in advance!

Is the object UV mapped ? Did you join them before baking ?

Yes, the object is UV mapped.
I join the objects in the beginning and then create a new UV Map just like here http://blender.stackexchange.com/questions/32677/how-to-combine-two-different-textures-into-one

Did you create another one material especially for baked texture ? And also did you select in all the materials which UV map should they use ? It should be their own UV map for their own materials, and new UV map for the baked texture.

I will describe the way I worked step-by-step:

Load the first and the second model
Position the models side-by-side (just like on the first screenshot)
Created a new UV Map
Created a new image in UV Image Editor with default size (1024x1024)
Created a new material for the baked textures
Went to the Texture tab with the material selected and in the material textures tab created a new texture
In the texture selected the image created in step 4
Went to the Render Tab
Switched to the Edit Mode, selected everything with A on the left viewport

On the right viewport ((UV Image Editor) switched to the image to which I want everything to bake
Push the Bake button in the Render Tab
Got this strange result

What I have missed?

When objects were separate, they had their own UV maps as they should have been textured. Let's assume these are called "UVmap" as by default.
Objects had their materials, I assume they were called "Material_1" and "Material_2"; let's call the new material created esspecially for the bake as "Material_Bake".
After joining objects create new UV map and call it "UVmap_For Bake".
Make some arrangements on that new UV map so faces not overlap there (the easiest way is to press Ctrl + P with everything selected that you'd like to rearrange while in UV/Image Editor).
For "Material_1" and "Material_2" in Texture tab, Mapping scroll set Map option to "UVMap", so that the original images are mapped using original map.
For "Material_Bake" choose in Texture > Mapping > Map your new UV map "UVmap_For Bake" so that baked texture to be mapped on the both objects with arranged map:

It seems in your file "BakedMaterial" was assigned to all the model's faces, therefore others didn't affect on the final result.
The original materials should be assigned to those parts of mesh which they were created for.
After joining, you create that new material, but don't assign it to anything or you'll get circular reference in texture stack, empty result, rewritten images etc. Just create it and proceed to the next steps. You can look at 2 ways of how materials were assigned below.

It's most likely that you won't get expected result of baking in the second case.
The file below is the one with the result of incorrect baking, slightly edited. Open it, press Bake and enjoy. It'll bake generated images of one color (unfortunately your files weren't packed) into "Texture_For_Baking" texture.

I did not understand the step with Ctrl+P. In what mode should I press it? When I am in Edit mode and select all faces and press Ctrl+P it asks about "Make Vertex Parent" - if I choose this option it shows an error...

Tried your method and get another result from my previous, but still not correct. Here is the screenshot - the object with applied baked material and the texture itself: Screenshot(https://db.tt/yooBAlZ2)

Here are the source Colladas, Blender file with just two colladas imported and Blender file with the result of not correct baking: https://db.tt/Tm1uV107

The point is that I did not assigned baked material to the model before baking. I assigned it just to demonstrate that it is not correct. I would like to remind that the result I want to achieve is to get the model with just one texture which I will export to Collada (which should be with just one texture). So I need the way to merge two objects, merge their textures to one texture (material)  to get the correct result - collada with just one texture. And it is still unclear for me how I will achieve the desired result. Possibly I miss some details which prevent me from understanding

I assume that everything included in the sent blendfile was used in the workflow if not stated otherwise. As it's not, you simply confuse others because they aren't able to guess. 2. What's wrong with the result with "BakedMaterial" ? It allows you to use one texture with one material, which you should setup. Note that you didn't said anything about your edited file - it does just that (delete those 2 materials&save image to see that). 3. As you don't get desired result it's definitely true that you do something in a wrong way as baking from several materials does works. Good luck!

The main cause I opened this question is that I really understood that I did something wrong. As I stated in the very beginning the main aim is to get a model with just one texture and the result I get looks wrong. So, the question is still opened - why the baked texture is not correct, what's wrong in the workflow.

Finally, I have found the correct way for baking textures for my files.
There is a great tutorial here: https://youtu.be/Tj-S5QAac3U
Following all steps exactly as was shown in the video I got the correct result just in 10 minutes. Hope, this will save time to someone.


text:
Rotation animation on z-axis in Blender
I am  quite new to blender and it is first time I am making a character and an animation with it in blender.
I have a rabbit character that I gave some animation keyframe so it has an idle animtion, a walk animation and a jump animation.
I want to use this character later in Unity for a little game. I want to make a side view game, so the character can for example can walk to right and left. I do not know if you can flip/mirror the animaiton in Unity.
In blender I want to make an animation where it walks from right to left, and then an animation where it walks from left to right.
I tried changing the position of the character by rotating the whole armature on the z-axis to 180, and I hoped with the auto-keyframes turned on it would create new keyframes automaticly with the new location and rotation of the armature but as I play the animation it changed the whole animation to be 180 on the z-axis, so the whole animation was flipped. It did'nt work as I would love to.
I then tried to create a new Action and copy the keyframes and then do the 180-thing on the z-axis, but it also changed the characters position on the other Action...
I do not know what to do from now on.
I just want the character and keyframes to be flipped, so I get an animation that both walks from right til left, and left to right.
Hope you guys will help me!
Update
I tried to look at this question Rotate whole animation by 90 degrees
But this did not help, I could rotate it by using an empty cube and parenting it to the objects, but it still rotates the whole animation.
I have an animation where it walks from right to left and i like to keep that, I just want an animation from there on that walk the opposite way from left to right by just rotating the object and armature and make keyframes of that.

thank you for linking that question, I tried, but it was not quiet what I wanted. I updated the question.

@Alex378 It's hard to say without seeing the animation in graph editor. You probably can mirror Z rotation and X,Y location curves of the origin to achieve that.

Suggestion. Select armature in object mode. Go to  start frame 02. Insert Key frame rotation.  Go to end frame 08. Rotate armature on Z-axis. Insert key frame rotation. Test Animation.
Consider watching a tutorial video on a video website.  There are some really useful introductory tutorials on the web.  Search Blender Tutorial Keyframes.


text:
Make geometry from GPUShader visible for F12 rendering
I'm using GPUModule with shaders to render some points in the 3D view:
def render(self, context):
    shader = cache['shader']

    gpu.state.blend_set('ALPHA')

    vertices = ((-1, 0, -1), (1, 0, -1), (1, 0, -1), (-1, 0, -1))
    batch = batch_for_shader(shader, 'POINTS', {'position': vertices})

    # uniforms
    proj_matrix = bpy.context.region_data.perspective_matrix
    object_matrix = bpy.data.objects['Empty'].matrix_world

    # pass uniforms to shader
    shader.bind()
    shader.uniform_float('projection_matrix', proj_matrix)
    shader.uniform_float('object_matrix', object_matrix)
    shader.uniform_float('alpha_radius', 1.0)
    batch.draw(shader)

By using Offscreen Rendering (described here) I can render into the Offscreen Buffer and save it as a picture afterwards.
Now my question is: Is it possible to make the geometry drawn by the GPUShader also visible for the F12 rendering? Unfortunately the stuff from the shader is not shown in the F12 rendering.
I'd be very thankful for any help!

I kind of solved this problem and wanted to share my perceptions if someone ever comes up to this question and needs help...

I haven’t found a way to manipulate the image buffer the F12 renderer writes into.
I also haven’t found a way to make the shader renderings visible to the F12 renderer though very intense research. Although I realized that the shader stuff is only visible in the viewport because I’m calling the following function. (It adds a draw handler that is called in every viewport frame, without that I wouldn’t see the shader stuff in the viewport either.)

bpy.types.SpaceView3D.draw_handler_add(handler, (self, context),
‘WINDOW’, ‘POST_VIEW’)

This lead me to the idea to use bpy.app.handlers.render_pre. In theory I could have called this handler before rendering every frame. In this handler I tried to call my save_image function. For rendering animations this also didn’t work because of an No active GPU context found error that I couldn’t solve. Probably GPUModule doesn’t allow it to use the F12 renderer and shader rendering simultaneously.
Though I found out while trying out the last bullet point that it at least works for rendering images by using compositing mode: In the image node I can open my previously via shader rendered picture and connect it to the output node. When pressing F12 exactly that input image is rendered. (Yes, I know that this is very ugly. But it works…)

How I finally “solved” my problem:

As I needed the shader stuff to be drawn into a video, I’m saving all the frames from the animation to disk and using Blender’s Video Editing mode to make a video out of all the frames. I never used this mode before and didn’t remember it exists. But that’s way easier than what I tried to do.

TLDR: I don’t think it’s possible to render via shader and F12 simultaneously because F12 uses GPU context settings that GPUModule doesn’t like or vice versa.

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


text:
Shadow catcher over baked floor
I'm trying to make a semi real render without breaking Le VRam bank and time and so I decided to bake a combined on everything (even the floor) and then I placed my shadow catcher on the floor and put on a real time rendered object only to have it fly in a void above the ground  clearly the shadow catcher is transparent but not only to it self but to the object underneath it... how do I solve this? Thanks in advance for your reading and answering time!

Would you be able to add some screenshots to show what you mean? Having a hard time understanding the question

Okay sorry I didn't make the qustion clear enough, the idea is that I have a very dark scene which I have baked all lights on for ease of rendering, then I added a non light baked character onto the scene and I want her to cast shadow on the floor, so I added a shadow catcher and the shadow catcher made is transparent as if there is no object under it.

The floor is under the shadow catcher and it's not showing, just the shadow catcher making everything under it transparent.

The Shadow Catcher is under the Mask settings. It is basically used to create a mask in the shape of the object just like the Holdout option, with the the difference that it still can receive shadows. A holdout object is used to "cut out" a hole in the render to use in the compositor for showing underlying footage or images by using the Alpha Over for example. Any other 3D object behind a holdout object will be cut out, too.

So what is the situation? Render each on a different layer and compose them together?

Exactly. Depending on your scene, your character and the materials there are different ways to combine it more or less successful.

Alright, I guess I'll try this method, thanks a lot.


text:
Why is my "extrude mesh" offset scale uneven (Geometry nodes)
I'm trying to make levels for my game in a more procedural way and thought that geometry nodes would be the perfect way to start doing that, I'm trying to create some walls and an edge around this walls (2.5D game)
I have this so far but the second "extrude mesh" node is extruding the edges very unevenly, I suppose it may have something to do with the normals of the vertices not being correct but I'm not sure, how would I go solving this?


text:
Cloth physics not rendering correctly
I'm working on a Happy Birthday clip (200 frames), and I've got balloons floating up in the background with strings attached that have cloth physics so they'll float around like a string would. Everything looks fine in the viewport, but while rendering the animation, the strings start detaching from the balloons and floating below them not connected to anything.
You can see at the bottom of the first picture that the string has become detached.

Now, if I stop the animation render and restart it from where it left off, it'll fix the problem... for that one frame. And then the next one will be messed up again. And it's not just for those 2 balloons, it's for all 11 of them. So it's not like I can just suck it up and only manually render the frames these balloons are in.
Does manually rendering 200 frames sound like a nightmare to anyone else?
I'm relatively new to blender, so I can't tell if I did something wrong or if my computer just can't handle this render. I'm rocking a lonely GTX 1070, so I'm sure that might be a possibility.
I saw a lot of other cloth physics problems being caused by the object having a sub modifier, but none of these have any modifiers beyond the cloth physics. So that's not it. I forgot to adjust the color settings before I started rendering, so I have to start over regardless. If no one can help, I guess I'll try removing the cloth physics.
I've never used the cloth physics before, but I literally changed no settings, so I'm not sure how I could have screwed it up. I used a vertex group on each of them at the top of the strings for the shape setting, and that was it. I knew it couldn't be so easy lol.

It's probably because you joined the object only, you need to merge them. You can do this by using Boolean Modifier. Use Union to merge them together so they remain connected.


text:
Why all objects and background is black in material viewport blender 2.79b
I don't know why my blender 2.79 like this in Material Viewport.

But in Rendered Viewport Object Material showed

And when I click Object in Material Viewport like this

I have to reinstall blender and repair but still like this, is my graphic card isn't support? In blender 2.93 it's work normally

Difficult to say just based on screenshots, but Blender 2.79 is no longer receiving updates since 2019. If this is a bug in Blender 2.79 it won't be fixed. If you can, I would recommend that you use a current version.

IIRC you need to crank up the Environment Lighting in the World tab in the Properties editor, or everything is black.

Had a similar problem, turned out it caused by GPU's driver. If you have AMD GPU like me, install latest version of PRO driver, or 22.5.1 version of Adrenalin edition driver.


text:
Weird alpha bleeding
I am trying to render a Minecraft scene generated by Mineways. Quite simply, some of the blocks seem to have transparent edges, as in some cases the "sky" colour (plain blue for now) is showing through while in other areas there are visible "seams" between the blocks, implying that the adjacent blocks are showing through.
In the picture below this issue is most noticeable around the base of the tree in the foreground to the right and along the bank behind the tree (where the blue sky is showing through) and on the logs at the front of the greenhouse (where there are visible "lines" between the log blocks which seem to be caused by the same issue as these lines go away if I turn off the texture's alpha channel). (Don't worry about the weird lighting/shadows - I'm trying to light the scene from inside the greenhouse but have not finished setting up the lighting yet.)

EDIT: Here is the .blend file (ultimately this will be the background for another scene, hence the name background.blend). I would appreciate it if, if you make any changes, you let me know what they are instead of just uploading a modified file.
https://drive.google.com/file/d/0Bzg8zit7X1NALWtPM0RUN0tPdU0/view?usp=sharing
EDIT 2: Here is a .zip file containing both the .blend file and the accompanying texture files. Note that the .blend file in this archive is slightly different to the .blend file above as I had to change the textures to use the correct file path to work when the .zip file is extracted.
https://drive.google.com/file/d/0Bzg8zit7X1NANzN3cGIyUl9tSFk/view?usp=sharing

While I don't know what is causing this, I do think I should tell you something. My computer thinks Mineways has a virus. It could be wrong. It is most likely right. I suggest you stop using Mineways all together. But... but now you can't export and import Minecraft terrain! Well, I do have an alternative. After you get rid of Mineways, (Which I highly suggest you do for the sake of your computer), check out this tutorial. It will introduce an alternative service to use instead of Mineways, and will tell you how to render your scene in Cycles.

This may actually help your problem in the first place. I suggest to always get rid of software if you know if there is a virus. I know this is really the long way around, but if it has a virus, then it will be a great help to find an alternative. This external software that the video will introduce is actually more flexible. You can even render using resource packs. I hope you find this useful for the safety of your computer system.

@TheMinecraftMan757 I've used mineways before in wine, and nothing bad happened.. Though that's not to say that something couldn't have infected it since I tried it.

@Micheal Is it possible you could upload your .blend?

I am sandboxing Mineways in Wine under Linux, so I doubt that even if it is a virus it will do much harm. But the real problem is that the scene is not rendering correctly in Blender.

I have added a .blend file.

It seems the textures are missing.. Is it possible you could upload a packed version? (it seems probably that it's a texture-related issue)

.zip file uploaded.

@MichealJohnson I really disagree that no actions should be taken in the events of a potential computer threat, but beside the point, what is "Wine" and what do you mean by sandboxing? I'm not a linux user.

@TheMinecraftMan757 http://en.wikipedia.org/wiki/Wine_%28software%29 It's essentially a program which runs windows executables on linux by means of simulating a windows environment.

@TheMinecraftMan757 Also I have done research and the virus thing is a false positive.

@MichealJohnson It is possible, and that's your decision not to take precautions. By the way, if the answer below fixed your problem, you can press the check box to "mark as accepted."

If you look closely, you can see that this is caused texture interpolation getting a little bit of the alpha surrounding the wood texture. So in other words, your wood texture is outlined with a line alpha less than a pixel wide which lets you see through to the objects and sky behind.

This is why you usually want to have a small margin around UVs so interpolation will have something outside with which to interpolate with besides alpha.
To fix this, you can try using the solutions below individually or in combination.

Scale the wood UVs in a little so the UVs aren't right up against the alpha:

This is really a pretty generous margin for this situation. In this case it only needs to be scaled in about half a pixel, but a little extra can't hurt.
Not completely ideal, as you lose part of the texture (though it's unlikely anyone would notice).
Disable interpolation. It won't completely get rid of the problem, as the texture is still filtered a bit when it's distorted by perspective etc, but it will be so small that it's only visible when viewed really close up. This way you can also save some memory by using the 512x512 texture, as it will no longer be blurred by interpolation if it's disabled.

I had disabled interpolation and the 512x512 texture is still more blurred than the large version that I included (it is not as blurred as it was before I disabled interpolation but it was still not as crisp as the textures are in Minecraft, but enlarging the texture fixed that). Also I'm not sure that there is alpha around the wood texture, and also the same problem is apparent with the grass blocks behind the tree.

@MichealJohnson Did you disable interpolation and  set the filter to box and turn the filter size down?

No I did not realise that the filter had any significance if interpolation was turned off. I will check it in a moment.

I changed the filter and now not only is the bleeding problem gone but the textures are a lot crisper as well. Thanks!

@MichealJohnson As I understand it, since the texture is being transformed and skewed according to the angle of the surface to the camera there is still a need for filtering even if no 2D interpolation is done. This should make the 512x512 texture look good too :)

Yes I suppose that is why one needs to still have a form of filter, but I had misunderstood the options. I might try the 512x512 texture again, but I have been working on the lighting and camera rig now so I don't really feel like fiddling with the textures again :-) .


text:
How to delay execution of execute() function in an Addon?
I have the following code:
bl_info = {
    "name": "Align select verts to abs pos",
    "category": "Mesh",
}

import bpy
import bmesh

class MeshAlignVerts(bpy.types.Operator):
    bl_idname = "mesh.align_verts"
    bl_label = "Align verts pos"
    bl_options = {'REGISTER', 'UNDO'}

    x_pos = bpy.props.FloatProperty(name="X",description="X axis",default=0.0)
    y_pos = bpy.props.FloatProperty(name="Y",description="Y axis",default=0.0)
    z_pos = bpy.props.FloatProperty(name="Z",description="Z axis",default=0.0)

    chosen_axis = bpy.props.EnumProperty(items=(('X','X','Align along X axis'),('Y','Y','Align along Y axis'),('Z','Z','Align along Z axis')),name="Choose Axis")

    def execute(self,context):
        print (self.chosen_axis)
        self.update_indiv_vert_pos(context)
        print ("Executed script")
        return {'FINISHED'}

    # update individual verts
    def update_indiv_vert_pos(self,context):
        mesh=bmesh.from_edit_mesh(context.object.data)
        sel_verts = []
        for v in mesh.verts:
            if v.select:
                sel_verts.append(v)
    # TODO: Add logic to move points along custom defined transform orientation
      #   bpy.context.space_data.transform_orientation = 'GLOBAL'
        for v in sel_verts:
            if self.chosen_axis == 'X':
                v.co.x = self.x_pos
            if self.chosen_axis == 'Y':
                v.co.y = self.y_pos
            if self.chosen_axis == 'Z':
                v.co.z = self.z_pos

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

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

if __name__ == "__main__":
    register()

I want to either add a button which when pressed will call the function in execute. Or at least wait for the user to specify values for the Float properties and then choose an axis which then calls the function in execute()
How can I achieve this ?
This question looks similar to Addon: run execute() only when button is clicked
I have read that but am not able to get any sufficiently useful info from the responses there can someone please guide me on what to do ?
Also what are the other possible alternatives to delaying execution of the execute function for this script ?

Normally you can let Blender's layout system draw the properties, but when you want to have an action button on an Operator UI, you have to specify the whole interface. You might even consider writing a bit of Panel code instead of trying to do it all in the Operator.
But if you do want to stick with the Operator only you could augment your current Operator code with.

an unlocked property (boolean),
an explicit draw() function,
replace your current execute() function with something that checks if the unlocked property was set to True yet.

code:
unlocked = bpy.props.BoolProperty()

def draw(self, context):
    scn = context.scene
    l = self.layout
    col = l.column()

    col.prop(self, 'x_pos')
    col.prop(self, 'y_pos')
    col.prop(self, 'z_pos')
    col.prop(self, 'chosen_axis')
    col.operator('mesh.align_verts', text='Mesh Align').unlocked = True

def execute(self,context):
    print (self.chosen_axis)
    if self.unlocked:
        self.update_indiv_vert_pos(context)
        print ("Executed script")
    return {'FINISHED'}

I would not not use an Operator as a replacement for a proper UI panel.

Should "col.operator('mesh.align_verts', text='Mesh Align').unlocked = True" be set to False if I do not want the execute function to be run the first time when the operator is called from the menu.  So that only the second time when the button is actually clicked action is taken ?

Was unsure if the line 'col.operator('mesh.align_verts', text='Mesh Align').unlocked = True' would immediately call the execute function having the 'unlocked' property set to True rather than on button press.

Yep. That line has no effect on the value of unlocked until you press the button.


text:
How to get the collection an object belongs to?
I can access objects belonging to a collection like so:
objects_in_collection = bpy.data.collections["My_Collection"].objects

How can I access the collection a specific object belongs to?

Object.users_collection property returns a tuple containing all linked collections:
>>> obj = bpy.context.object
>>> obj.users_collection
(bpy.data.collections['Collection'],)

Many thanks!
I also needed to get the name of the collection and was able to do so like this:
ob.users_collection[0].name

@brockmann  :: Is the result always by order?   e.g. [0] = direct parent?   The official document in your link lacks detail.

Not sure, just test it. If not the case, you can sort it: https://blender.stackexchange.com/questions/146685/how-to-obtain-the-parent-of-a-collection-using-python/172581#172581 @cppBeginner

This doesn't seem to work in drivers.

Select this object by name and it should take you to the right collection. Selection by name is described in this section.

Selection works differently in Blender 2.8x: https://blender.stackexchange.com/a/132829/31447


text:
How can I delete all 'unused empties' in a blend file?
I have a huge blender file that contains many empty objects, and as a result it is very slow to work with that file.
Is there any way to have a python script that deletes objects of type EMPTY, but only if the empty is not the parent of any other object? I found a similar script here, but it works with a different  selection criteria.

List comprehension
Every now and then issues occur when removing objects from the collection that is being iterated over. (possibly an issue of the past) Now as a matter of choice I use list comprehension to create the filtered list.
For our filter, an empty has None for its data, and [] for children if none, both of which are boolean false.
Note since the advent of empties as bg images, a more robust test for all empties is e.type == 'EMPTY' and do_unlink=True has become the default option.
import bpy

childless_empties = [e for e in bpy.data.objects
        if e.type.startswith('EMPTY') and not e.children]

bpy.data.batch_remove(childless_empties)

This script worked for me in 2.8

That should work :
import bpy
scene = bpy.context.scene

for ob in scene.objects:
    if ob.type == 'EMPTY' and len(ob.children) == 0:
        scene.objects.unlink(ob)
        bpy.data.objects.remove(ob)

that worked like a charm, thanks very much!

Doesn't work in 3.5... first, the second to last line needs to be scene.collection.objects.unlink but that still leaves an error on the last line that the object which the script tries to remove is "not in collection 'Scene Collection'.

@eobet check the other answer. Iterating over a list while you remove elements from it is a big no no

Is it permissible to link a better answer off-site, since none of the above work in Blender 3.5?
https://blenderartists.org/t/how-to-write-a-script-to-delete-all-unused-empties-from-a-collection/1387684/9
bpy.data.batch_remove([o for o in bpy.data.objects if o.type == "EMPTY" and not o.children and not o.instance_collection])

Hello. Nope, link-only answers are not considered good answers because they may rot in the future and it requires users to go on another website which is not a good experience. If you're worried about copyright and as I was pleasantly surprised to see you link a post of mine, I hereby grant you the right to share this piece of code. I'll edit your answer so it's available to everyone. But it's basically a one-liner that's doing exactly the same thing as batFINGER's

@Gorgious thank you! I noticed that even instanced collections get removed using this line, however, but I haven't had time to look into how to avoid that yet.

I've updated the answer to not remove instance collections


text:
Does Blender support OpenType features of TTF fonts?
I have a TTF font equipped with some OpenType features and would like to use lnum (Lining Figures):

This feature changes selected non-lining figures to lining figures.

From: https://www.preusstype.com/techdata/otf_lnum.php
Is there any chance to use OpenType features like the one mentioned?

If you are referring to lining figures (lnum) vs old style figures (onum) I don't thing blender supports switching between OpenType features. Blender font features are very limited as you can see in properties panel.


text:
Return list of nodes inside material?
I am trying to write a script where nodes are spawned and sorted according to where they need to be in the node editor. Thanks to help from other users, I have learned to move the nodes properly. However, the answers they provided used a hard-coded list:
atomicNodes = ['Texture Coordinate', 'Mapping', ...]
imageTextures = ['Image Texture', 'Image Texture.001', 'Image Texture.002']

I have a method of returning a list of nodes that exist in the scene, but they aren't instantiated as a list when I call them:
for i in atomicNodes:
    nodes[i].location.x = locx
    locx += nodes[i].width + 50
    nodes[i].location.y = 0

for i in imageTextures:
    nodes[i].location.y = locy
    locy += nodes[i].height + 200
    nodes[i].location.x = nodes[1].location.x

When I go ahead and just print out the nodes, in the scene using:
bpy.data.materials['Material'].node_tree.nodes

it gives me this in the console:

Using the Python documentation for listing dictionary keys in this format:
nodes = bpy.data.materials['Material'].node_tree.nodes
nodeValues = nodes.values()
nodeKeys = nodes.keys()

then changing the variable atomicNodes to
atomicNodes = nodeKeys

Makes it run correctly.
However, when I try to do the same thing for my list of image textures, I'm having some issues. I get this error when I try to use the filtered list of image nodes instead of the 'nodes' variable:

Here are the scripts on GitHub, I am using the latest release candidate for 2.79 because I am interacting with the principled shader, but I have been having this issue while testing in stable versions of 2.78 too.
Edit: The issue seems to be that while the nodes variable
nodes = bpy.data.materials['Material'].node_tree.nodes

is a dictionary already by default, when I get the Image Texture nodes it is converted to a list, which I obviously can't grab keys from.
When I use my method to collect the Image Textures, it places them into a List already. Unfortunately there is a lot of extra content that I don't need:
[bpy.data...nodes["Image Texture"], bpy.data...nodes["Image Texture.001"], bpy.data...nodes["Image Texture.002"]]

I only want what is inside of the quotation marks of this list, is there any way of doing that aside from regular expressions?

Need to see more code, lie the "use the filtered list of image nodes instead of the 'nodes'" part and the part in the traceback.

For sure: I linked my full code on GitHub at the bottom just after you left your comment, but I can move it into the main question in a minute or two.

Is your question about how to get the names of all nodes in a list? @Rug

Yea,@brockmann, I want to return specifically the Image Texture nodes from the scene and use that instead of hard coding the names.

imageNodeDict is a list not a dictionary.  Hence you cannot access it using imageNodeDict["Node Name"] , only by index.  The error message indicates in your code, (and by the line numbers  prob not github code as it stands now), you are accessing a bpy collection like say material.node_tree.nodes[node] where node is a ShaderNodeTexImg (possibly a member of imageNodeDict), rather than an index (int) or by name (string).

BTW to make a dictionary use the items() method which returns a key, value pair,  eg tex_nodes_dict = {k : n for k, n in tree.nodes.items() if n.type == 'TEX_IMAGE'}

You don't need their names in a list. You can iterate through Material.node_tree.nodes collection which allows to test if the node type is Image Texture and set the position attribute in one go.
Operator example based on Templates > Python > Operator Node:
import bpy

class NodeOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "node.simple_operator"
    bl_label = "Simple Node Operator"

    @classmethod
    def poll(cls, context):
        space = context.space_data
        return space.type == 'NODE_EDITOR'

    def execute(self, context):
        tree = context.space_data.node_tree

        # set the location if node type is
        for n in tree.nodes:
            if n.type == "TEX_IMAGE":
                print (n.location.x)
                n.location.x += 50

        # filter by type
        image_texture_nodes = [n for n in tree.nodes if n.type == "TEX_IMAGE"]

        # get the names
        image_texture_names =  [n.name for n in image_texture_nodes]

        # check the console
        print (image_texture_nodes)
        print (image_texture_names)

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


text:
extrude mesh along z axis using geometry nodes
As I have started the creation of my mesh using geometry nodes I cannot use the simple "extrude mesh" function in edit mode it seems.
I would also like to keep the extrude "interactive" by adding it to my geo node setup.
When using the extrude geometry node I only can extrude along the normals it seems, where I would just like to extrude it along the z axis.
Anyone has a few tips for me, would be very grateful.
I am using Blender 3.3 alpha
Cheers, Methexisdesign

Could you please explain this with a picture. Also a screenshot of your node tree can help.

Just plug in vector like this:

Thank you very much Crantisz, this worked for me!

@Methexisdesign If this answer solved your question, please be so kind and mark the answer as "Accepted Answer". Thank you for helping to keep this platform clear and tidy. What should I do when someone answers my question?


text:
Blender Python API - accessing name of movie clip data-block from active camera
I'm writing a script that set ups a compositing tree with the MovieClip node. I would like to automate it to take the movieclip background image on the active camera in the scene and set it to be the same in the movieclip node.
The only thing holding me up is that I'm not sure how to access the value of the MovieClip data block on the active camera in python.
Any help would be very appreciated! Thanks!

You can use the following python code to add a movie clip to the selected camera in blender

# ========================================================
# Determine whether Blender is 3.2 or newer and requires
# the temp_override function, or is older and requires
# the context override dictionary
# ========================================================

import bpy
import os

def use_temp_override():
    version = bpy.app.version
    major = version[0]
    minor = version[1]
    return not (major < 3 or (major == 3 and minor < 2))

window = bpy.context.window
screen = window.screen

def get_areas(type):
    return [area for area in screen.areas if area.type == type]

def get_regions(areas):
    return [region for region in areas[0].regions if region.type == 'WINDOW']

def execute_main_script():
    area_type = 'VIEW_3D' # change this to use the correct Area Type context you want to process in
    areas  = get_areas(area_type)

    if len(areas) <= 0:
        raise Exception(f"Make sure an Area of type {area_type} is open or visible in your screen!")

    if use_temp_override(): # execute using new temp override
        with bpy.context.temp_override(window=window, area=areas[0], regions=get_regions(areas)[0], screen=screen):
            bpy.ops.view3d.background_image_add()

    else: # execute using legacy override
        override = {
            'window': window,
            'screen': screen,
            'area': areas[0],
            'region': get_regions(areas)[0],
        }

        # bpy.ops.view3d.background_image_add(override)
        bpy.ops.view3d.background_image_add(override)

def set_camera_background_movieclip(camera, movFile=""):
    mov_dirname = os.path.dirname(movFile)
    mov_basename = os.path.basename(movFile)

    camera.data.show_background_images = True
    execute_main_script()

    background_images = camera.data.background_images
    if background_images:
        background_images[0].source = 'MOVIE_CLIP'

        clip = bpy.data.movieclips.get(mov_basename)
        if not clip:
            bpy.ops.clip.open('INVOKE_DEFAULT',
                            directory=mov_dirname,
                            files=[{"name":mov_basename, "name":mov_basename}],
                            relative_path=True)

        clip = bpy.data.movieclips.get(mov_basename)
        if clip:
            clip.frame_start = 101
            background_images[0].clip = clip

movFile = "D:/my_movive.mov"
camera = bpy.context.selected_objects[0]

set_camera_background_movieclip(camera, movFile)

Reference Link


text:
Copying grease pencil strokes from one project to another
I have a problem with copying grease pencil strokes to other projects in Blender.
I cannot append files, as the strokes are lost and I cannot even edit them.
How can I copy and paste grease pencil strokes, so I can edit them freely in another projects? I am making 2D animation, so I need to copy some characters, places and so on.

you'll need to append the gp objects into your new file


text:
How can I replace a material from Python?
I read this first to get an idea on assigning materials.
How to assign a new material to an object in the scene from Python?
I wrote a script to replace one material with another. It seems to work on an active object but does not replace materials on selected objects if I loop through them. I do not know if it is because the rest of the objects are not active or there is another reason.
How do I correctly replace materials with others?
Code is posted below:
import bpy

def replace_material(object,old_material,new_material):
    """
    replace a material in blender.
    params:
        ob - object for which we are replacing the material
        old_material - The old material name as a string
        new_material - The new material name as a string
    """
    ob = object
    om = bpy.data.materials[old_material]
    nm = bpy.data.materials[new_material]

    print ("ob is ",ob)
    print ("om is", om)
    print ("nm is", nm)
    materialnum = len (ob.data.materials)
    print ("materialnum is", materialnum)

    for i in range(0,materialnum):
        # test if the old material is in the slot and replace it
        print ("running ", i)
        if ob.data.materials[i] == om:
            print ("match found", ob.data.materials[i])
            ob.data.materials[i] == nm

def main ():
    #get a list of objects selected
    selected = bpy.context.selected_objects
    active = bpy.context.active_object
    for obj in selected:
        replace_material(obj,'DEFAULT BASE','Default Base')

main()

Sample blend here:
http://www.pasteall.org/blend/42037

This script doesn't deal with 'Object' material links, for the objects this fails on, can you check the link option is set to Data and not Object ? (to the right of the material name.)

I checked. I used select linked to filter objects my material. Then I selected the objects and checked all of them the material is a "Data" material not "Object" I do not know the difference between the two. It appears by default all materials are "Data"

If you iterate the material slots rather than the data.materials you will bypass needing the Data/Object link test.  slots = [s for s in obj.material_slots if s.material.name == old_material] will give you a list of the material slots with old material, which you can then set with s.material = bpy.data.materials.get(new_material). (nb get will return None if there is no material of that name, whereas materials[name] will throw an error)

But since all materials are linked as  "Data" why is the above failing ?

What batfinger suggested seems to work. But I cannot understand why my previous code doesnt work.

ob.data.materials[i] == nm should be ob.data.materials[i] = nm

Not sure its worth keeping this question open, since issue was a typo

Ok from the above I noticed there are possibly 2 approaches to the same problem.
1) is iterate through the list of available materials linked as data and replace the material. This will not work if materials are linked by Object.
Sample code below:
import bpy

def replace_material(object,old_material,new_material):
    """
    replace a material in blender.
    params:
        object - object for which we are replacing the material
        old_material - The old material name as a string
        new_material - The new material name as a string
    """
    ob = object
    om = bpy.data.materials[old_material]
    nm = bpy.data.materials[new_material]
    materialnum = len(ob.data.materials)

    for i in range(0,materialnum):
        # test if the old material is in the list of used materials and replace it
        print ("running ", i)
        if ob.data.materials[i] == om:
            print ("match found", ob.data.materials[i])
            ob.data.materials[i] = nm

2) Iterate over material slots and replace the material in the slot of the object. This as batFINGER pointed out is a solution wherein whether the material is linked to the Object or Data is irrelevant and hence probably a better solution.
import bpy

def replace_material(object,old_material,new_material):
    """
    replace a material in blender.
    params:
        object - object for which we are replacing the material
        old_material - The old material name as a string
        new_material - The new material name as a string
    """
    ob = object
    om = bpy.data.materials[old_material]
    nm = bpy.data.materials[new_material]
    # Iterate over the material slots and replace the material
    for s in ob.material_slots:
        if s.material.name == old_material:
            s.material = nm

Notes:
1) The above samples do not do any error handling the script will just fail if the materials do not already exists. I wanted this kind of behavior.
2) For brevity sake I have posted only definition of the functions themselves this function can be used for a single object or along with looping to work with several objects. An example of such is shown in the main() function in the question.
Usage:
Suppose you have an object named "Bottle" 2 materials "Red paint" "Blue rubber"
and you want to replace the material "Red Paint" with "Blue rubber"
then you would use:
obj = bpy.data.objects["Bottle"]
replace_material(obj,"Red paint","Blue rubber")

Could also do while oldmat in obj.material_slots: obj.material_slots[oldmat] = bpy.data.materials.get(newmat)

The script had a typo, heres a working version.
import bpy

def replace_material(obj, obj_data, mat_src, mat_dst):
    """
    replace a material in blender.
    """
    print("ob is", obj)
    for i in range(len(obj_data.materials)):
        # test if the old material is in the slot and replace it
        if obj_data.materials[i] == mat_src:
            print("match found", ob.data.materials[i])
            obj_data.materials[i] = mat_dst

def main():
    # get a list of objects selected
    selected = bpy.context.selected_objects
    active = bpy.context.active_object

    mat_src = bpy.data.materials['DEFAULT BASE']
    mat_dst = bpy.data.materials['Default Base']

    for obj in selected:
        obj_data = obj.data
        if obj_data and hasattr(obj_data, "materials"):
            replace_material(obj, obj_data, mat_src, mat_dst)

main()

Huh? Isn't obj_data.materials[i] == mat_dst the same typo and should be obj_data.materials[i] = mat_dst?

Kind of in a Dilemma I wish I could accept both


text:
Keeping IK controller in place
How do I keep IK controll bone from "jumping off". Like keep it so it cant go further than the bone moves. Hard to describe, just look at the picture.

I know its not a big deal if its a character since then

The simplest solution would be the following:

Step 1:
First your foot bone has to be set parent to the leg, not the ik bone.
Then deselect "inherit rotation" in the bone settings of the foot bone. This way the foot will allways stick to the leg, but will not rotate with the leg.

Step 2: After that, go to the bone constraints panel and add a "child of" constraint. select the ik controler as target, only select rotation and hit "set inverse". this way the bone will copy the rotation of the ik controler.


text:
Generate Points in a Color Center
I'm looking for a way to generate a point at centre of each color in each layer.

Originaly I did a selection of faces per layer and used Merge by Distance node (that worked perfectly for layers with bigger distance between them, but of course it failed when layers became closer).
So I was thinking if there is a way to limit merge in X, Y axis (and ignore Z) ... here is an example of one separated "color" (red) per layer and I need single point at centre of this color (marked by pink points).

... or I'm open any efficient way to generate points at centre of each color directly from image texture if possible :)
Thanks

Edit: For now I'm using "workaround" - increase layers distance / merge by distance / decrease layers distance back ... that works here as suppose to ...

... but I'm still interested if there is a better way to detect centre points. Thanks :)

why don't you seperate your layers, use your method and move them then back? ;)

@Chris I'm probably tired ... how? (just consider there can be like hundreds layers) ... Thank you :)

animation nodes, python...? maybe even GN?

Purely GN ... from object generated like this https://blender.stackexchange.com/questions/264619/ just instead of UDIM I use Sprite Sheet ... I can change layers distance, use merge, and change distance back after that ... It just sounds to me as workaround, than propper way ... But yes I will use it if no one here since I will need just a single node for that :)

The Accumulate Field node can do the job. You can use it to get the average position per layer, identical to the results from the workaround. Replace the Transform > Merge > Transform with nodes in the image.

Thanks works great :) I will try to learn how-why :)


text:
GN - Set Image at Centre of Each Face
How can I translate or position all UV faces at centre (under (Geometry Nodes or Shader Nodes) ... like centre of all faces are set at the same UV location (in this case at centre of image texture).

I have done this Voronoi object generated by Geometry Nodes.
And I want to place at each face the same image. So result should look like this:

Scalling texture according to Face Area is already achieved, and is not necessarily part of my Q.
Or any other idea how to achieve this effect without applying modifiers?

Blend file description:

visible object is GN Voronoi with UV Unwrap (I wanted to position UV Faces at centre, but I failed...)
one hidden object is the same object with GN Applied, just for illustration purpose, it use UVMap of second hidden object)
second hidden object used few more nodes to position faces at centre because I wanted to Capture or Translate somehow face position as UVMap, but I failed ... in blend file is GN Applied just to create illustration of desired result.

Here's a shot at it.
The group:

Stashes the face corner indices (Edit: turns out to be unnecessary)
Starts a parallel branch to the incoming geometry, and stashes face-center positions.
On that branch, splits the faces, rotates them so their normals are up object Z, and centers the faces on 0 (by face-center)

Then:

Scales the faces about 0 by 1 / sqrt(Face Area) .. then:

Branches again for a bounding-box, shifts the geometry so its  minimum XY is at 0, and scales all towards 0 by 1 / its maximum dimension.
The face-corner positions are transferred from the manipulated branch, (which is now 'physically' in  the 0-1 UV square,) to the original geometry, by face-corner index.

Thankfully, the face-corner index survives the edge-split at the beginning of the branch. This works for 3D geometry, too, although more work would be needed to gain control over orientation per face.

Blender 3.2b

Wow !!! ... Thanks a lot ... now I know why I could not figure this out ... I don't have a super-power :) If you are interested  you can answer the corral Q - bake height map of hires element and use for miscrodisplacement, elements blend by mask from Edge proximity :) I will try to learn from your solution, just seems to be to much to reuse in another scenario ... but I will try :) Thanks again (after whole day of pain ... finally satisfaction).

Hi @vklidu! Glad this one passes your muster!  :) I guess it could be improved by getting rid of the parallel branch altogether, and just calculating the transforms on the original mesh.. but doing it with actual geometry is much easier to debug, you can see what's going on. And some operations would be very nodey to reproduce. Is the other Q posted?

Other Q ... No, I mean Coral Reef ... I wanted to offer micro-displacement instead of heavy topo (he is using) and blend by shader similar to break tilling repetition ... so with your support I got displacement [corral reef)(https://imgur.com/cmlHlWx) ... but trying to blend leads me into other issues (even without GN and entirely as shader) ... so if you are interested to solve it this way its yours :)


text:
Detect with python script if a blend file has packed images
I'm trying to know if a blend file contains images and if it contains to unpack the images out to the directory.
So just before I'm running this line:
bpy.ops.file.unpack_all(method='USE_ORIGINAL')

to ask if this blend file is with packed images.

Image.packed_file
Look at the value of the Image.packed_file property. Will be None if not packed.
Console test.
>>> for i in bpy.data.images:
...     i.name, i.packed_file
...
('3cb598.jpg', bpy.data.images['3cb598.jpg']...PackedFile)
('3b17ebcf9eb9.jpg', None)
('huge.49.247445.JPG', bpy.data.images['huge.49.247445.JPG']...PackedFile)
('Render Result', None)

>>>

Thanx @batFINGER :) it's exactly what I need.


text:
Create pose from existing armature
I have two armatures with all of the same bones. Armature A is a basic character T-stance, Armature B is of a run animation. I had first attempted to copy the pose from Armature B to Armature A, but realized that there was no pose, and that the positions of the bones of Armature B where baked into (I think that's the proper term) the armature, meaning there was no pose to copy.

Rest Poses: T-pose Armature A on left, Armature B's (the one with animation) on right
Is there a way to create a pose of Armature A using the positions of the bones of Armature B?
An example blend can be found here:
Bip001 is the primary armature that the model is bound to, Bip001.001 is the armature with the animation I am attempting to apply to Bip001. (Bip001 == Armature A, Bip001.001 == Armature B from the above explanation).

Does armature B also have T-pose rest position?  And if so can you just associate run action that is on armature B to armature A?

Armature B does not have T-pose rest position. I can associate the action from B to A, but since I do not have the initial stance from B, A is, well, messed up to say the least when the animation plays out.

Can you post the blend file. (or cut down example of)  As I have a script that may do this, but would like to test first.

Original question edited to include example blend file

Here is a script I've been working on to do this for bvh files.  Basically it adds a copy transform constraint to each pose bone, then using Object.convert_space, retargets animation to another rig with same bones.
It's good practice to keep scale on armatures to unity, to avoid issues. Applying scale to both armatures. Ctrl-A scale will make the scale (1, 1, 1). I applied rotation as well and put the armature objects at location (0, 0, 0) before running script..

import bpy
from bpy import context

remove_constraints = False
scene = context.scene
rig1 = scene.objects["hands_reference_skeleton"]

rig2 = scene.objects["hands_reference_skeleton.001"]
if not rig2.animation_data:
    rig2.animation_data_create()
rig2.animation_data.action = None

# add copy transform constraint to each bone
for pb in rig2.pose.bones:
    ct = pb.constraints.get(pb.name)
    if ct is not None:
        ct.influence = 1
        continue
    ct = pb.constraints.new('COPY_TRANSFORMS')
    ct.name = pb.name
    ct.target = rig1
    ct.subtarget = pb.name

action = rig1.animation_data.action

f = action.frame_range.x
# add a keyframe to each frame of new rig
while f < action.frame_range.y:
    scene.frame_set(int(f))
    context.view_layer.update()
    r2 = rig2.evaluated_get(context.evaluated_depsgraph_get())
    for pb in r2.pose.bones:
        #pb2 = rig1.pose.bones.get(pb.name)
        m = rig2.convert_space(
            pose_bone=pb,
            matrix=pb.matrix,
            from_space='POSE',
            to_space='LOCAL',
            )
        if pb.rotation_mode == 'QUATERNION':
            pb.rotation_quaternion = m.to_quaternion()
            pb.keyframe_insert("rotation_quaternion", frame=f)
        else:

        # add rot mode checking
            pb.rotation_euler = m.to_euler(pb.rotation_mode)
            pb.keyframe_insert("rotation_euler", frame=f)
        pb.location = m.to_translation()

        pb.keyframe_insert("location", frame=f)
    f += 1

# set constraints to zero or remove entirely.
for pb in rig2.pose.bones:
    ct = pb.constraints.get(pb.name)
    if ct is not None:
        if remove_constraints:
            pb.constraints.remove(ct)
        else:
            ct.influence = 0

The blend file you provided is excellent. However I am attempting to rebuild it from my original file so that I can understand exactly what all had to happen to get to that point. Whenever I run the script, Bip001 becomes very large. I know you had said you rescaled the armatures. Was there a specific size you scaled them too? This is what I am seeing after running the script: https://stashcube.com/stackexamples/armatures.PNG

Yes that looks familiar  had a similar result when I opened test file and ran script..  Prob could fix by multiplying by the inverse of the object's world matrix.  Your scale was 0.05 or something hence the inverse is 20 x bigger in a roundabout way.  On the other hand it's good practice to keep scale on armature to unity, to avoid issues.  Applying  scale to both armatures. Ctrl-A  scale will make the scale (1, 1, 1).  I applied rotation as well and put the armature objects at location (0, 0, 0) before running script.

That was indeed the step I was missing. Greatly appreciate the assistance!


text:
How to combine images using Python
I have a couple of images in a python script that I want to add together. Here is a rough example of what I want to do. All the image variables are of the type bpy.types.Image:
final_image = bpy.ops.image.new(name="lightmap.png", width=1024, height=1024)

#This line does not work
final_image = lightmap_direct + lightmap_indirect + lightmap_emissive

So my question is if there is an easy way to add these images together. I am mainly interested in the add blend mode, though others modes are also interesting.

The + operator isn't overloaded to do that. What exactly would the + symbolize? Additive? or mix?  It can be done using bpy alone but it's more involved than your example..

Blender comes bundled with numpy. Image references have a property called .pixels which you can turn into a numpy array of the same dimensions. Numpy does use overloaded operators for array math. The initial setup aside, you'll see it is quite close to what you were trying.
import math
import numpy as np

import bpy

def np_array_from_image(img_name):
    img = bpy.data.images[img_name]
    return np.array(img.pixels[:])

pixelsA = np_array_from_image('A')
pixelsB = np_array_from_image('B')
pixelsC = np_array_from_image('C')
pixelsD = (pixelsA + pixelsB + pixelsC) / 3

image_D = bpy.data.images['D']
image_D.pixels = pixelsD.tolist()

# then click in the UV editor / to update the view..to see the pixels of `D` updated

Maybe this will give enough insight, and push towards learning some numpy.
This does 'mix' btw..

I'm not sure about the algorithm for add.. (below shown using material rgb mix nodes)

it's not as simple as a+b+c.  maybe something like adding the smallest value of each array:
# add smallest element values
interim_1 = np.minimum(pixelsA, pixelsB)
pixelsD = np.minimum(interim_1, pixelsC)

producing this:

Just out of interest: Why fortran is doing the math?

I've edited the answer. It may not be executed in Fortran, most likely straight in C. Both execute much faster than Python, and are the reason numpy is chosen for fast computations using a python higher level language as a 'director'.

see: http://stackoverflow.com/questions/8385602/why-are-numpy-arrays-so-fast

Interesting, nice to know that numpy is a built-in module now. Thanks zeffii!

Nice, also did not know that numpy was built in! About the "add" thing, I have three lightmaps (direct, indirect, emitted). Adding the rgb values, at least i think, should give the correct result in that case. Anyhow, good answer.

Note that the np_array_from_image function could return directly np.array(img.pixels) (without the [:]) but surprisingly, it would be about four times slower.

@emu see http://blender.stackexchange.com/a/3678/47


text:
Seamless animation of Wave procedural texture
Following advice from this question on Stack Exchange I’m now able to seamlessly animate generated textures. I’m now using these methods to animate stripes via the Wave texture.
Something that I’ve noticed is that the stripes only will appear seamless if the scale is set 1.88889 or multiples thereof (see gif below). Is there significance to this number? What does it relate to?

You wrong. Perfect number is 1,884955781 ( or Pi / 5 * value in modulo )
For answer the question, first you need to know, that exactly Wave Texture node do.
So I build in simpler nodes exact copy of Wave Texture node:

This node setup produce similar result as Wave Texture node, and you can check this:

So now we can follow the nodes, to know where 1.8888 is hidden.
We begin in modulo coordinates here, from reference question. As i see, you have 3 repeats, so I think you set 0.3333 in modulo. You didn't give any information about it, but it's looks like that I'm right.

x,y,z now is from 0 to 0.3333.
Next stop is my node setup, in first nodes texture coordinates are multiplying with the result of this two:

First, multiply 10: 0.3333*10=3.3333
Next it is our X-number, that you think is 1.8888. I call him X, so result is 3.3333*X.

Last stop - sine. You need to know, that Sine repeats in 2*Pi period. So now we can get eaquation:
3.3333*X=2*Pi

So X will be:
X=(2*Pi)/3.3333

X=1,884955781

So, you wrong. perfect number is 1,884955781

I don’t think this is correct - since Sine tepeats, why the Modulo function? I think the value used in the modulo will affect the ‘perfectness’ of the wrapping. This answer is certainly along the right lines but not mathematically correct.

@RichSedman Modulo is goes from reference question. He used it for tilling. As you see, He have 3 repeats, so module must be 0.33333.

@RichSedman check my blend file, if you think, that I'm not right.

@Crantisz's answer is almost correct - in that 'pi' is related to the required scale factor. However, the correct value is actually pi / 5 - ie, approximately 0.628. For seamless faces you should use a multiple of that (note : 2*pi/3.33333 effectively reduces down to 6*pi/10 or 3*pi/5 - 3 times the ‘base’ factor).
Using the above scale (pi/5), coordinates in the range 0.0 to 1.0 will map to a seamless texture. This means that you could use this to map two separate cubes using Generated coordinates as follows :

Similarly, the above scale can be used for seamless quad UV mapped faces that cover the whole of the (0.0 to 1.0) UV range.
The factor '5' appears to have been chosen by the developers purely so that the wave texture is at a convenient scale with typical values similar to other textures (and is unrelated to the default scale of '5' in a newly created texture node).
Note that when entering the scale you should literally enter, say, 'pi/5' to generate the calculated value rather than typing the rounded result - for increased accuracy.

Rich I am curious, what is your background with math?

@icYou520 As a kid I loved maths and that developed into a love for computers and coding - which I’ve been doing as a career and hobby for many years.

Coordinates are not in range 0 .. 1 because he used modulo from this question

@Crantisz I don’t think you can infer the use of Modulo from this question as it is written - nor from the linked question. Perhaps from the answer to the linked question. The issue exists with the much simpler case of using the ‘raw’ generated coordinates. Perhaps hellocatfood could edit the question to make it explicit.

I draw a conclusion from the gif which he provided


text:
Eevee performance benchamark
Are there any figures for the system requirements of the new Eevee renderer, measured in something like stream processors/face given a certain material?
The current viewport has worked for me on low polygon meshes on very modest hardware, even cheap or old laptops (with ao off), and my complex landscape shader (lots of conditionals) works ok but is somewhat laggy, in non-edit mode on GTX 1050 ti.
I am soon going to build a new machine and want to be future-proof when blender 2.8 is out. Do I need the beefy 1080ti or would the GTX 1050 ti still be sufficient for the same things it used to be?

I'm voting to close this question as off-topic because it both about hardware and experimental development versions

@DuarteFarrajotaRamos Certainly true. However do you know of any preliminary benchmarks. This video https://www.youtube.com/watch?v=HntAab0Z7tg appears somewhat choppy, put there the machine does encode video as well, so not a really good one.

I think you can in the most cases use the old test scenes because Eevee and cycles are for the most part compatible. And if you feal like it, upvote my question link and I think @Duarte Farrajota Ramos will be hated if he continue to off-topic all 2.80 questions that whas agreed on in the meta to be on topic

@AlfonsMarklén can you also  provide a link to agreed on in the meta to be on topic

Are questions about the 2.8 branch on topic?

You should be able to use EEVEE on more than Cycles because EEVEE is based on approximations that produce more or less the same result as Cycles but isn't as flexible as Cycles because of that.
In Cycles you can add a sun with energy 100 if Filmic is enabled without problems but that will not have the same result in EEVEE (I think Cycles did get an update to deal with stuff like that outside Filmic)
The biggest advantage with EEVEE that I can see is that it allows you to make a lots of work with a accurate viewport but it will not be good enough for everything.
The version of 2.80 I used recently didn't have the translucent shader as an example but I just skip using that until I have everything else right and EEVEE can handle to get input it can't use.


text:
Select object and recalculate normals via script?
I have a script that allows to import and export .obj files which is working fine. However, I'd like to perform some operations in between these calls, for example select the mesh and recalculate the normals (outside). If I try that, I get a context error and I'm not sure why...?

RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect

    bpy.ops.import_scene.obj(filepath=source_to_file)

    print("Starting--------------------------------------------")
    for obj in bpy.data.objects:
        bpy.context.scene.objects.active = obj
        # go edit mode
        bpy.ops.object.mode_set(mode='EDIT')
        # select al faces
        bpy.ops.mesh.select_all(action='SELECT')
        # recalculate outside normals
        bpy.ops.mesh.normals_make_consistent(inside=False)
        # go object mode again
        bpy.ops.object.editmode_toggle()
    print("Ending--------------------------------------------")

    bpy.ops.export_scene.obj(filepath=target_to_file,use_materials=True)

How is it possible to know the object imported by any operator (there is no return value) and how can I recalculate the normals per object that is triggered by a button?

You can use bpy.context.selected_objects[:] to get all imported objects. Iterate through the list, set the select state of each object to True and make it the active object as well in order to call operators like mesh.normals_make_consistent():
Blender 2.8+
import bpy

bpy.ops.import_scene.obj(filepath=source_to_file)
obj_objects = bpy.context.selected_objects[:]

for obj in obj_objects:
    bpy.ops.object.select_all(action='DESELECT')
    obj.select_set(True)
    bpy.context.view_layer.objects.active = obj
    # go edit mode
    bpy.ops.object.mode_set(mode='EDIT')
    # select al faces
    bpy.ops.mesh.select_all(action='SELECT')
    # recalculate outside normals
    bpy.ops.mesh.normals_make_consistent(inside=False)
    # go object mode again
    bpy.ops.object.editmode_toggle()

Blender 2.7x
import bpy

bpy.ops.import_scene.obj(filepath=source_to_file)
obj_objects = bpy.context.selected_objects[:]

for obj in obj_objects:
    bpy.ops.object.select_all(action='DESELECT')
    obj.select = True
    bpy.context.scene.objects.active = obj
    # go edit mode
    bpy.ops.object.mode_set(mode='EDIT')
    # select al faces
    bpy.ops.mesh.select_all(action='SELECT')
    # recalculate outside normals
    bpy.ops.mesh.normals_make_consistent(inside=False)
    # go object mode again
    bpy.ops.object.editmode_toggle()

Updated .blend file can be found here:

I have this error: AttributeError: 'Context' object has no attribute 'selected_objects' (I use 2.78a)

@D.Giunchi Could you provide your whole script to be able to debug it

http://pastebin.com/vpyi29Nq , I also used obj_objects = [ o for o in bpy.context.scene.objects if o.select ] but I got the first error.

@D.Giunchi I tried this http://pasteall.org/225375 and it's working totally fine with no errors

in the console I can see this: location: :-1
Error: Traceback (most recent call last):
File "\fix.py", line 73, in
File "\fixpy", line 52, in main
File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\bpy\ops.py", line 189, in call
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect
location: :-1
Error: Python script fail, look in the console for now...
<!> event has invalid window

@D.Giunchi what are the lines 73 in 52 in your script?

52 is bpy.ops.object.mode_set(mode='EDIT') , the other is the main that call. I discover that using another obj it seems to work. The weird thing is that when I run the script I see in blender that the obj that is loaded and selected and I can change the mode to edit with the combo.  I uploaded the obj here http://filebin.ca/3AqCDhS3JUuI

@D.Giunchi as shown here http://pasteall.org/pic/index.php?id=111981 it's working perfect with me.

really don't know what to think, if I used the script with your change I get this error: AttributeError: 'Context' object has no attribute 'selected_objects' , I have a windows 10, 64 bit...maybe should I try in a Virtual Machine, don't know what;s going on.

@D.Giunchi send me your .blend file

@D.Giunchi the file you sent doesn't include the script. Please provide the complete file with script and everything causing the error.

actually you don't need the blend, since I open blender and simply run the script but I put everything here: http://filebin.ca/3AsCCCCsBnJu

I tried also in virtual box (linux mint) and I force my friend to run it and he got the same error :(

@D.Giunchi check this file http://pasteall.org/blend/index.php?id=45346

it works this one, I did several tries... like removing the model and run the script. But what I miss to do to have a blend like this? My workflow was, open blender, open the script ,run it.

@D.Giunchi It looks like the problem is in the .blend file. I'll update my answer and provide the .blend file if you can accept and upvote.

works for me, but probably I miss something to do for let blender knows the context or something like this

@D.Giunchi Obviously, The problem is in your .blend file

maybe I got it, it was the reset_blend function, it cleared too much and lost the context. Many Thanks

Making normals outside can also be done with the bmesh module operator recalc_face_normals(bm, faces)
Sample script
import bpy
import bmesh

from bpy import context

#bpy.ops.import_scene.obj(filepath=source_to_file)
bm = bmesh.new()
meshes = set(o.data for o in context.selected_objects
            if o.type == 'MESH')
for mesh in meshes:
    bm.from_mesh(mesh)
    bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
    bm.to_mesh(mesh)
    bm.clear()
    mesh.update()

bm.free()
#bpy.ops.export_scene.obj(filepath=target_to_file, use_materials=True)

Saves the need to flip mode and context object.

I would upvote this answer 5 times if I could... I hate using the ops functions...


text:
Blender to unity wrong armature position (feet)
The problem is that Unity misreads bone positions. Look at the feet -> it goes down. Everything is fine in the blender and the feet are on the ground as they should. Anyone know what this could be a problem with? I will add that before that everything worked well. It broke after exporting new shoes to the unit: /

Are you using humanoid avatar?

Yes, base model with armature is body then shoes is exported with armature also. but just body is on humanoid rig, (humanoid in unity) and earler it worked fine but now i  have sad foot fingers.


text:
How to turn off all material "Use Nodes"
Does anyone know how to script or do this I need it badly I don't want to single handedly toggle off all the use node option for all of the materials.

Nevermind. I figured it out ;)
import bpy

for eachMat in bpy.data.materials:

    eachMat.use_nodes = False


text:
simultaneous rendering from cameras in geonode instances?
Is there a way to access each camera instanced on a geometry node and render from each of them? I created a geometry node shape and was able to instance cameras on it, but I am unable to neither access camera instances nor set them as the active camera. I am aware that if we had multiple cameras, we could run some script to render each of them for each frame. But since it is a geonode setup, the camera's functionality is limited.
Can anybody please help me with this?

i wish this would be possible, but AFAIK with the current status of GN this isn't possible. Maybe with help of python...

thanks for the reply it would have been really neat if we could do that, but it makes more sense for the geometry nodes not to support camera-related systems.


text:
Modifying a script for splitting a terrain into chunks and exporting each resulting object
This is my first post on the Blender StackExchange, so I hope that it's well received :)
Essentially, I'm making a 3D game in Godot, and for that I need to divide my terrain up into chunks. I've already found and got working a fantastic piece of code from  this thread which successfully divides the terrain up into different objects within the same scene based on a grid.
However, to really get an efficient workflow going, I now need to find a way to export each one of those separated objects as its own .obj file - as manually doing it all by hand is excruciating. Is there anybody familiar with scripting who would feel charitable enough to modify this existing code from that thread:
from bpy import context
from  mathutils import Vector
# bounding box helper methods
def bbox(ob):
    return (Vector(b) for b in ob.bound_box)

def bbox_center(ob):
    return sum(bbox(ob), Vector()) / 8

def bbox_axes(ob):
    bb = list(bbox(ob))
    return tuple(bb[i] for i in (0, 4, 3, 1))

def slice(bm, start, end, segments):
    if segments == 1:
        return
    def geom(bm):
        return bm.verts[:] + bm.edges[:] + bm.faces[:]
    planes = [start.lerp(end, f / segments) for f in range(1, segments)]
    #p0 = start
    plane_no = (end - start).normalized()
    while(planes):
        p0 = planes.pop(0)
        ret = bmesh.ops.bisect_plane(bm,
                geom=geom(bm),
                plane_co=p0,
                plane_no=plane_no)
        bmesh.ops.split_edges(bm,
                edges=[e for e in ret['geom_cut']
                if isinstance(e, bmesh.types.BMEdge)])

bm = bmesh.new()
ob = context.object
me = ob.data
bm.from_mesh(me)

o, x, y, z = bbox_axes(ob)

x_segments = 2
y_segments = 2
z_segments = 1

slice(bm, o, x, x_segments)
slice(bm, o, y, y_segments)
slice(bm, o, z, z_segments)
bm.to_mesh(me)

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.separate(type='LOOSE')
bpy.ops.object.mode_set()

Basically having that modified so it can also export each of those chunks as its own .obj file into a given directory, after splitting the terrain up. Is that possible, and is there anybody who would be willing to help out? I have no experience with python (even though Godots scripting language is quite python like...) so I don't really know where to start doing it by myself!
Thanks for reading.
~ Skelly <3

Hi, regarding the actual splitting, I needed similar thing, check this question & answer: https://blender.stackexchange.com/questions/145176/separate-by-vertex-count-fast

Hi, thanks for your reply - but getting the terrain sliced up into chunks is actually working fine with the existing script I've got. What I really need now is a way to save those resulting chunks as objs without needing to do it all manually - Id even be okay kicking someone 20 bucks or so to write the code if needs be, its just that its waaayy out of my field, haha. But thank you for your reply :)


text:
How to do custom Freestyle brush shape in Blender 2.74?
Instead of a solid "pen" line, I would like Freestyle to use a custom brush, that is an image file (e.g. PNG) that I create. I found this post:
Blender Freestyle Brushes
And read his link:
Help doc
But it does not work. I added a LineStyle Texture layer and selected my PNG image as the Single Image Source (Mapping = Along stroke). But when I render it is the same default "pen" line and not my custom brush image.
How do you do a custom brush?
---- updates below (after trying T.K.'s suggestions):
First, I try to copy all of the settings from the teapot and then use my own brush. But that did not work at all. Here is what that looked like:

Here is what I am trying to do:

So, next I try to just use the teapot file and change the brush image to by brush image and this is what I get:

It seem to be repeating the texture instead of sliding it along like a brush?? And it is also opposite (invert?) color? The round flat part is see-through instead of the black part. So I try the “invert” under image sampling and that did not work.
It seem to be filling the line with a texture instead of using the image as a brush. How do I use an image as a brush, like in the example picture I give?

Have you looked into example .blend files for using textured strokes?  If not, try a couple of example .blend files available within the Blender 2.71 release log you cited, i.e.:

http://wiki.blender.org/index.php/File:Teapot_pencil.blend

http://wiki.blender.org/index.php/File:Mouse.Blend
Start from one of these existing line styles for textured strokes, and customize it with your texture PNG image.
EDIT: In reply to the updated question (22 May 2015)
Freestyle textured strokes always use a texture image as non-overlapping tiles repeated along stroke.  Internally, textured strokes in Freestyle are rendered using UV texture mapping (that is a general functionality of Blender).  Freestyle strokes have its own UV coordinates along stroke to map a 2D point in a texture image on to another point in the 2D stroke space.  This means that the texture image cannot be mapped in such a way that one tile overlaps on top of another.  (I guess this is a general limitation of UV texture mapping.)
I believe you need to rely on other Freestyle options to achieve what you are intended to do.  How about using the Calligraphy thickness modifier instead?

I try your suggestion and then update my post above. I try all the options and none of them work to make a simple brush like I show above. Any more suggestions? Thanks

Thank you I read your updates. It looks like the Calligraphy modifier just changes the thickness of the line and does not use my specific brush? It will not look right unless I can use the exact brush. It looks like custom brushes are beyond the capabilities of the built-in Freestyle options? Will I have to learn code a custom module to make this work? I am a programmer, I can probably learn it. Or is it impossible, even in a custom module?

I think it is possible to write a custom style module in Python so that a brush texture is applied exactly in the way you like.  Basically, you will need to split a stroke into very short pieces (splitting operation), extend them (as in the Backbone Stretcher modifier) to make them overlap, rotate them (as in the 2D Transform modifier) and apply a brush texture.  Using textures in Freestyle scripting is a bit of hassle but is possible.  Take a look at the scripting example .blend file mentioned in "Using textures in Python scripting" in the Freestyle section of the Blender 2.71 release log.

FYI, here is the direct link to the scripting example .blend file: http://wiki.blender.org/index.php/File:Texture_scripting_test.blend

I added an answer with my closest solution that I am going with for now. But I check yours as answer because you the only one who helped me out

It seems that Blender Freestyle does not support brushes currently, so this exactly effect cannot be achieved. But I was able to achieve a similar effect by adding a Calligraphy modifier in the Thickness section for the thick and thin effect and a Perlin Noise 2d modifier under Geometry to make the shakiness.


text:
Why does this Copy Loc contraint not work with this IK bone?
I'm working on a (toy) VR kayak simulator, but have limited rigging knowledge. I'm attempting to have two IK rigged arms holding onto a paddle, so they will animate with the paddle's movement, like this:

My basic strategy is to create an empty (visible by the hand), and then use a copy location and rotation on the hand bone targeted at the empty. Here's my constraints tab for my hand bone:

The IK works fine, the copy rotation makes the hand rotate with the empty, but moving the empty has no effect on the hand, despite the constraint. Wondering why this is, if I can fix it.. as I'm writing this, I've found this answer:
Do some Bone Constraints only work with Root Bones?
...but I don't understand why I can't move this bone with a constraint, as I am clearly moving it when I pose it. I've also tried using an additional bone and a 'child of' constraint, with the exact same results, I get rotational tracking, but not location. I was also able to get a 'paddle bone' working as a child of one hand, but couldn't get it to affect the movement of the other hand...Thanks for your explanations! (how do I post the project?)
EDIT: Another method that I tried was creating two paddle bones meeting in the center, and then each separate paddle bone having a "paddle control bone" that was in the same location. I figured I could copy transforms for these control bones, and it would keep the hands a set distance apart.. but that didn't work either.

The issue you have is parenting. You would have the hand bone as a child of the lower arm bone, this parenting defines the position of the hand, preventing the location constraint from moving it. As the bone parenting doesn't effect the rotation, your rotation constraint can do it's thing.
You have the right idea with using IK, the IK constraint will set the location of the hand bone and move the arm bones to the right position to match it. What you need to do is remove the location constraint and set the empty as the target for the IK constraint.


text:
Render Animation renders the same frame each time while Wiggle Bones addon is installed
Using Blender 2.83 and wiggle_bones1_5_b16. I have recently rendered plenty of still-frame animations without this addon but after installing it, something has suddenly gone wrong. I want to render frames 1-24 into .png's, inside a folder with some gifs in it.
I have tried baking the keys for the addon but the same issue happens. Others are experiencing the same problem (see comments):
https://www.youtube.com/watch?v=hpQW9RQdwNA
Uninstalling the addon, restarting Blender makes rendering work again even though some new bone properties get leftover.
It does have to do with the "Wiggle Bone" addon because I was just able to render successfully after uninstalling it again (its Properties get leftover in the bones but it is ok). But after installing it again, I have the same problem.
Addon download:
https://blenderartists.org/t/wiggle-bones-a-jiggle-bone-implementation-for-2-8/1154726

Did you upload the right file? Nothing is animating when I move the timeline playhead.

Did you choose an action in the Action editor? Select the armature and choose an animation in the action editor. When you scrub the timeline, the animation is there. But it's stuck on the first frame when you say "render animation"

If I select action (any other than "Ref") it animates and renders too. So ... https://imgur.com/sSl2ZeK

I tried to render "Creep", "Jump", and "KO" using Render Animation. For me, it renders frame one over and over but calls it "0001", "0002", etc. Something must be wrong with my render settings. I have been around the block many times with rendering posed characters so I am perplexed. Do you know how to reset my render settings?

Try Spring Bone addon that i tried without issue.

I figured it out, there just wasn't an explanation (yet), you have to disable the addon in the Armature tab after you bake.

HOW TO RENDER ANIMATION WITH WIGGLE ARMATURE:

Select all bones with Wiggle settings applied and bake them in
the wiggle bone properties area of the Bone tab. When you do this,
that panel becomes deactivated.
…however, rendering animation will still fail until you go to the
armature tab, scroll to the bottom, and uncheck “Wiggle Armature”.

These screenshots show what worked for me: