text:
Make cloth follow linked rigged character
I've seen a few related answers, but nothing that addresses my particular issue.
I'm trying to have a well organized project, so the mesh characters and their rigging are kept in one .blend file, and the cloth items for clothing are kept in another. The idea is that I may use the character for lots of different clothing designs. So, when editing a garment, I use the 'link' feature to bring the mesh character into the 3D view, so that the garment can drape on it.
I set the mesh character to have 'collision' physics, and I set the mesh garment objects to have 'cloth' physics. When I run the animation, the garments fall correctly on the mesh character.
When I work on a separate garment I do the same thing - instead of using 'append' to bring the mesh character into the 3D world, I use 'link', to guard against inadvertently changing the mesh character or saving it with a garment project.
Recently I edited the .blend file containing the character mesh, and added some minimal rigging to it - just enough to let me reposition the arms. The idea is to see how the garments look on the character, as they move through a few different poses. In that file I set up keyframes and created a simple animation of the character changing its arm position.
After that, I opened a garment .blend file, used 'link' to obtain the character .blend file, and ran the animation. I expected the garment to drape properly on the character mesh, and then to follow the mesh, continuing to drape according to the cloth physics, as the animation modified the position of the mesh character's arms.
Instead, the mesh character moved, but the garment only draped around the original position of the mesh character. The garment didn't change position or location to follow the mesh character over the course of the animation.
I've looked for solutions to this, but all of the videos and tutorials I've found make the assumption that the mesh character is in the same file as the cloth, so that they can be modified together. But that's exactly what I want to avoid in order to keep my project files clean and well organized.
My question is: what can I do to the cloth mesh, to cause it to follow along with the linked mesh character, as that character follows its own rigging, during the course of an animation? My goal is to have any number of garments use this technique to drape properly on that same mesh character.


text:
How do I use render layers to give my model more light/dark contrast?
I found some answers here that say you can make shadows darker with render layers, but I could not understand exactly what to do.  Mostly, I would like for my model to have more contrast (in cycles).  I currently am lighting it with 3 emission planes and everything looks right except the contrast needs to be increased. Moving the lights around and adding more lights just detracts.  Right now it is too soft-looking and needs more "ooomph" and perhaps there is some other way to add contrast without making it too hard-edged.  I also read about using a "light path" but I don't know where to start with that either!  Thank you for any guidance!

Probably you can go without using render layers for that. Did you try using Bright/Contrast node or some other ones (or combining them) from Color nodes ?

I am not sure how to use Bright/Contrast nodes and other color nodes.  How and where do you plug them into the node tree?  Is there a good Youtube tutorial you can recommend?

source: Stack Exchange

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

sort: votes


text:
Modify light source so it will only create highlights and not reach into shadowy crevices?
My model has many protrusions and crevices.  I am satisfied with the shadow that currently exists in the crevices, but the protrusions need more highlight to create a sense of volume.  How can I adjust a light source so it only effects the protrusions and does not reach further into the crevices? As in, the light "falls off" at a designated point.  The goal is to make highlights with soft edges.  Thank you!

Are you using Cycles or Blender Internal?

You can adjust the Falloff type of the light source and increase the Soft Size

@Denis: I am using Cycles.

@WishyQ In lamp settings try to increase the size, higher value will make the shadow edges softer.

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


text:
Soft Select / Proportional Editing tool White circle guide disappeared
I am not sure when it happened, but I went to do proportional editing and the guide-circle that indicates how large an area is being affected, had disappeared.  At first i though it was perhaps very large suddenly but I scrolled out and it was not there.  When I select one vertex with soft select enabled it will just move the whole mesh, now.   Did I accidentally click the wrong thing, or could this be a glitch because my hard drive is in the red zone (getting full) ?  I restarted my PC but the problem remained.  Could i solve the problem by reinstalling Blender?
I opened another smaller file and the soft select circle is there!  So this problem only applies to this one project file.
Thank you for any help!!!

When Proportional Editing is active look in the 3D View header and find there option Proprortional Size (the last one); you might want to include that info into the screenshot. It still seems the size of PE is too high.

Holy moly... that number was up in the millions.  Thanks for the tip.  I had to scroll it down for a very long time before it reached a reasonable size.  I never would have known just HOW huge the circle had become without looking at that number.  I wonder how it got so big?

In the millions ? I'm not sure how to get it up there. If you just scroll the wheel / use PgUp & PgDown it will stop at 1000. You can multiply it by any value in F6 panel (after executing operator with any option), but this value won't be saved for the next operation. Related - http://blender.stackexchange.com/questions/7153/change-radius-for-proportional-editing

Btw, in twist mode (CTRL - t) the circle size is NOT shown. To see if this number is to high, pick a vertex type G and look at the header as suggested by Mr Zak. After "scrolling" the size down, twists works nicely again.


text:
Images as planes rendered as pink when i render with GPU
When I use the GPU Nvidia Geforce card instead of the CPU, some of the the images-as-planes are rendered pink.  There does not seem to be a reason for which image is not rendered properly.  The images are on different layers and it seems like the GPU prefers rendering layers 2 and 3 which are much simpler than layer 1.  One of the layers rendered with pink empty areas the first render, but rendered correctly on a second render attempt.
Is there something i can do to fix this problem?  Does this ever happen with CPU?  Is it possible to 'upset' Blender by moving things around to different layers after having them on one layer for many months?  I just started using the GPU, after using CPU for a while, could this be the problem?
Thanks!

Are you sure the Nvidia GeForce card drivers are up to date? What happens if you render the problem scene with CPU? This may be a hardware problem, rather than a blender one, and you might want to ask it instead on Hardware stack exchange.

Ok, this may be terrible silly question, but apparently I need to update driver when the pop-up box appears on my screen?  It has come up many times but i ignored it !  I thought my card might be too old too update and maybe trying to update the driver would render the card unusable.

The card is a GeForce GT 610.  Can I update it or is it too old?  The CPU renders everything just fine (so far) but it seems to take a long time to do so!  I just want to make sure that moving things to different layers is not going to cause some terrible unexpected problem.

The CPU in this computer is Intel Core 2 Duo  E7300  2.66GHz.  I have 4 GB of RAM.  Should i stick with CPU?

It's also possible that you have a feature enabled that isn't supported in GPU rendering, and this is causing your textures not to be processed, or something along those lines. I'm guessing you have textures on the object in question, because solid magenta is a symptom of missing textures. But in your case they are obviously not missing if CPU rendering works.

You should always update your driver. Drivers are not going to render your card unusable rather, updating the card driver is essential to make sure your hardware runs properly with the current OS environment you are running. It's a misconception that updating driver will cause your hardware to be damaged or unusable. Such problem only happens with IOS products from apple. I made a quick search on your graphics card online, it seems to support CUDA so the problem must be either the driver or the texture file has been renamed or misplaced.

@hawkenfox  I updated the driver as suggested, but the most of the images are still coming up pink.  What else can i do?

@Mentalist , what feature could be causing the issue?  No textures, just images-as-planes, simple PNGs.

You should pack your texture into the .blend file and upload a copy of the blend using http://blend-exchange.giantcowfilms.com/ - it could just be that you missed something we could spot immediately.

@WishyQ Ahem... "No textures, just images-as-planes, simple PNGs." What do you think an image is, within the context of a 3D scene's assets? It is a texture. Yes - if you are using Images-As-Planes, you are using textures. Think of it like this: Is there pixel data being referenced? If "yes", then your scene relies on images/textures. Why are there two terms? Because "image" can refer to either rendered output from the camera or texture input, whereas "texture" is always input - bitmap data mapped onto an object or the environment in a scene.


text:
Lining up vertices
Is there any way to select vertices and then align them along the x,y, or z axis?  So as to take willy-nilly sections of the model and smooth them out precisely. I am trying to ease my model into transparency along the z axis, and it would be easier if I could select a point, then line up the row of vertices to it, rather than pushing each point into place manually.  Thank you, I hope this question is clear!

There are several ways to go about aligning vertices, best would be a combination of these for either organic or hard surface modeling. For your use case, the first should suffice.
Scaling
Select the relevant vertices and scale while constraining to an axis, change the Transform Orientation so it aligns as you want it.

Snapping
Enable Snapping, select the Snap Element and adjust accordingly.

Smoothing
Smooth the mesh pulling the vertices closer to each other.

Here are a couple of ways to do this, starting with the common quick way:
Quickly align to Global X, Y, or Z

Select the verts you want to align. If they are all on the same edge you can select the edge loop from the Select menu.
Scale on the axis you want to align them all to, and type "0".
Type in a location value for that axis. I find aligning to 0 first, and then positioning, to be sufficient for most cases.
However, there are times when you'll want to use the 3D cursor instead of aligning first and then positioning.
There are also cases where you may want to use a custom axis (transform orientation). The following method describes how to do that.

Align to a custom Transform Orientation

In Vertex Select Mode, draw an edge
You can use Ctrl+LeftClick to create and then extrude vertices.
Then, with the entire edge selected, snap the Cursor to Selection using ShiftS

With the edge still selected, click the "+" button in the Properties Shelf under the Transform Orientations panel.

Click the Transform Orientation button which is by default set to "Global" and choose "Edge".

Scale along it

You can now hide (H) or delete (X) your guide edge.

Select the vertices you want to align.
Set your Pivot Point to "3D Cursor".
Scale (S) and constrain to your custom Transform Orientation by double-tapping an axis key (XX, YY, or ZZ). Then type "0".

This is an excellent reply! Thank you very much!

In the image above we see starting shape in gold circle.
Finished shaped in blue modified circle highlighted vertices.
Pivot around 3D cursor as indicated by lower golden arrow.
Vertex is selected.   Shift-S [Snap cursor] to selected.
This is indicated by the upper golden arrow.  Small Cursor require effort to see.
Select more vertices.
Keystrokes SZ0. Scale Z Zero.

Scaled vertices have same Z value as Cursor.

Haven't used Transform Orientations before, really useful solution. Thanks for sharing!

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


text:
Is it possible to get a wide camera shot without warping?
This may just be impossible but I am wondering if it is possible to get a wide angle shot without strange perspective and warping of the image, or is there a way to adjust the way a wide shot warps?  I am just learning about the camera and perhaps there is a setting/technique that I do not know about?
Thank you!

Very wide shots are always bound to get some distortion around the edges, however if you don't decrease the focal length too much it should be acceptable, after all we are talking about a virtual camera, there are no actual lenses to distort your image.
Otherwise, I don't know if this fits your needs, but you could try a panoramic camera in Cycles. Just select the camera then go to the Properties Window > Object Data (Camera) > Lens and click Panoramic.
You can only get a preview through the viewport Rendered View or by rendering out an image.

Blender perspective camera has no distortion what so ever (other than 3 point perspective) - so no distortion around edges. This is the perfect camera with perfect perspective. To get warped perspective you need the Panoramic type (like you say in 2nd paragraph).

In both the physical world and the computer modeled sense, yes.
While it is vastly more complex to achieve it with a physical camera, it is possible with precise optics. The term typically is referred to as rectilinear distortion when it is unintended. Unintended because some lens optics are designed to deliver a spherical image such as fisheyes, while others deliver cylindrically compressed imagery such as anamorphic.
In the case of your question, it is unclear whether you are referring to physical optics, which may suffer from rectilinear distortion, or computer generated work, which will only have perspectival distortion typically.
In the simplest of senses, the field of view is a byproduct of lens length with gate size.
So while it is tricky judging your desire from your question, you can achieve your goal from within Blender by adjusting your field of view and your gate / sensor dimensions.
Remember, optics are optics and a wider lens with a smaller gate size will exacerbate the perspectival vantage. Longer lenses will compress the perspectival components. To disable the perspectival aspect, you could also consider an orthographic camera.

Could you elaborate a bit on the gate/sensor dimensions and the field of view?  Is "field of view" the same thing as "focal length"?

No, FoV is a byproduct of gate size and focal length. Focal length determines the qualia of the light and perspectival qualities, while the gate dimensions determine how much of that projection is captured. See http://www.panavision.com/sites/default/files/docs/documentLibrary/2%2520Sensor%2520Size%2520FOV%2520(3).pdf


text:
Locking planes together and animating them separately with shape keys
I have several images-as-planes in Cycles that make a face.  I want to lock them all together so I can move them as a group while animating them separately with shape keys.  How can i do this?
Thank you!

You can (sortof) do it like this

set the pivot point for all the planes in the same exact point in 3d space.
this can be done in more then one way: you can join all them togheter (so that all meshes get one single pivot point) and then separate them back again, one by one (the pivot point of separated meshes remains untouched); another one would be manually "set origins" to one 3d point of your choice...
then select one plane as "base" and use "copy location" constraint on all the others, with the "base" one as target.

the constrained planes can't be moved anymore, if not moving the "base" one, which moves all the others too.
shape keys for each plane are still independent
for rotation/scale, just select all them, they will rotate/scale around the same pivot point for all so they will rotate/scale all together

Please, how do i select one plane as base and use copy location constraint?  Thank you!

I mant this: once all planes have the pivot in the same exact 3d space point, you have to make one of them to be the base point, say "plane1". All you have to do is select another plane, "plane2" add a a"copy location" constraint (in the rigth tabs, constraints), and select "plane1". I added some image above.


text:
Bounding Box faces relative to world coordinates
Is there a way to create a bounding box around an object so that, while still being minimal, it has its 6 faces parallel to the (x,y), (x,z) and (y,z) planes?
For example, when I rotate the monkey head object and toggle viewport render I get this rotated box, instead of a cube with faces parallel to the world planes. What am I missing here?

The end goal here would be to have the dimensions of the projection of a complex object onto the world planes. I thought that a bounding box would be the best way of finding these dimensions, but I might be wrong.
Any help in regard to this solutions are greatly appreciated.

simply apply the rotation ? ctrl+A then rotation

Related - http://blender.stackexchange.com/questions/14070/create-and-export-bounding-boxes-for-objects. It may be a bit complicated though to do that if the transforms are applied

You can obtain the result you want by applying (eventually temporary) the rotations of your object.
To do that simply use Ctrl+A and choose 'rotation'.

Once the dimensions are obtained, eventually come back to the original orientation with Ctrl+Z

Note that this work if object was rotated in Object mode (there're no rotations to apply if it was transformed in Edit mode). And constraints can pick transfroms made in Object mode much easier.

Sure @MrZak, but the question shows an rotation in object mode.

Well I guess it shows that I started using Blender just a few days ago, I had no idea that I needed to apply transformations to the objects! Thanks!

@user50513, generally, you don't need it, except from some special purpose (like your question is). So don't do that 'all the time', as often you will prefer to keep the orientation as it is originally.

@user50513 read when to apply rotation - http://blender.stackexchange.com/questions/7298/why-is-it-important-to-apply-transformation-to-an-objects-data. I'd say in most cases you want to apply it; your question is however another situation.


text:
Creating smoke domain manually instead of using quick smoke makes domain visible
When I use quick smoke to create a smoke simulation everything works fine,

but when I create a box and make it a domain, the smoke simulation is not visible in the render due to visible domain?

What's causing this?

Please make your question clearer.  Please show the settings for the manual domain.  A domain can remain a box before the simulation starts.

In the past there was problem with having more than one domain with a bake.

Only one domain in the scene at a time, domain settings default... when I make a box a domain manually it just doesn't show the smoke in the render

You have not yet shown your settings.  Screen Capture.  You might even have an extra box.  Did you Bake?

What material have you assigned to the domain? Is it a volumetric or just a surface shader? The Quick Smoke does more than just create the domain - it also assigns a volumetric material to it.

That's because the default material for the domain is still enabled
so you see on that image that it doesn't work
so you have to make a random image and apply quick smoke on it and then delete it and then select the domain again and choose the smoke domain material   and then it works.

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


text:
Viewport performance due to high poly count
Is there a way of reducing poly count only in the viewport?
My gtx 1070 is struggling while sculpting terrain (It has 2000x2000 subdivisions)

The multiresolution modifier is probably what you are looking for, but you might also want to try dynamic topology sculpting.

@gandalf3 no, I have a 2000x2000 mesh that is already subdivided without modifiers. I'd like to reduce the poly count rendered in the viewport, because it's impossible to sculpt with so many polygon's due to lag


text:
Is it possible to join all objects into one and their animations into one?
SITUATION: I want to create an animated "3D experiment" which will be imported to Unity for Vuforia AR. The animated 3D model will include lots of small 3D objects(10 chemical equipments,...).
I'VE DONE: At first, I had them animated in Blender by changing each "equipment's" state, one by one at each keyframe (140 keyframes in total). Then I exported the file to .fbx and put it in Unity.
I EXPECT:: The "experiment" had all of its equipment animated, which means there would be only one big model - The "experiment" and its one Animation.
TURNED OUT:  each object has their own animation, 10 "equipments" - 10 animations, each lasts 140 keyframes. The inspector only let one animation run at a time.
(I haven't tried but I guess: to make all of them animate in parallel in Unity we have to assign each "chemical equipment" to its according animation, somehow...)
MY QUESTION is that: Is It Possible to make all 10 "chemical equipment" as only one big object and all the animations into one animation, so that when animating each "equipment" is just like animating a part of an object and when exporting the file, we will have only: ONE big model and ONE animation for that model.

Depends what type of animation we are talking about. Can you share some screenshots of what you mean?

Yes Is possible. Imagine character animation - one object with rig. You can set which bone will control which vertices very easy by vertex group (and vertex paint) Vertex group must have exactly the same name as bone which control vertices in this group.

Thank you for your time,
glad to see the word "possible" in your answer. I'll give it a try and update the result later. :)

If I understand your question you have several animations to put in one.
It would use a null object (empty) and link your animations + mesh top.

authors: Роман Попенчук


text:
Using Transparent Background with Volume Scatter
everyone. I need your help with. I'm trying to use the Volume Scatter feature with a transparent background in Blender Cycles. I have transparency turned on if that's what you are wondering,but every time,the background isn't transparent like I want it to be. Please help!
I hope that this isn't a duplicate question.

Can you please edit your question by adding an example of the result you are getting, and describing how it is not like you expected?

I finally figured it out. You have to use a cube and turn on the Shadow Catcher feature. It'll make the background transparent while at the same time creating realistic shadows and making the Volume Scatter transparent as well.

Nice, you found a new use for the shadow catcher! Like cegaton said, this deserves an answer. :-)

I figured out how to get a transparent background while using Volume Scatter. Easy to say that it was purplexing as Edward Nigma's riddles,it finally came to me. The answer to this giant enigma which has puzzled me for months.
The first thing you do is create a plane and enlarge it to surround your camera. The next step is to extrude the plane above your camera. I personally did this step by extruding to Z: 8.00000. Finally,you enable the Shadow Catcher in the object settings and press Shift+LMB to view the object and Shadow Catcher scene at the same time.
Render the scene with Volume Scatter with the Shadow Catcher scene,then the Shadow Catcher background will be transparent. I hope my answer will help those later in the future.


text:
Question on Rigging and Bone roll
So, I've done a lot of searching and I've found a number of questions and posts dancing around this topic, but nothing that gives me a sure answer. I'm going to ask the question again with a little bit more framing in the hopes that someone with more technical knowledge can provide some illumination:
When rigging in Maya, the creation and manipulation of bones happens all within the same system. If I were to explain that in blender terms: object, edit, and pose mode for bones are all combined into the same mode - there is no difference between them.
For that reason, when rigging in Maya it is imperative that we apply the transformations of all the bones as we rig, especially the roll of bones because that affects our rotational axes when animating. Also in Maya, we are constantly cleaning up our history, resetting values to 0, and performing other maintenance to make sure that nothing goes horribly wrong when we skin and begin to animate a rig.
Now then, coming from Maya and going over to blender, suddenly I have an ugly bone roll of 92.3 degrees I can't apply and zero out, there doesn't seem to be a history to clear, and the fact that I don't understand how changes in 'edit mode' translate the fancy 'pose mode' is literally painful; deeply ingrained habits in one program are making me worry about the numbers I see in another program.
So, some questions I have about blender as a maya user:

Does a non-zero bone roll in Edit Mode have an adverse effect in Pose Mode?
Do I need to clear a history? Is node history even a thing in blender?
Is there a way to keep controlling bones and shapes separate, or is that question nonsensical in blender?
Lastly, if I want to export a rig/animation in fbx format, what exactly is being exported, because I'm not finding a lot of things I wish I were when I export.

Also, as a post script, if you need to ask a clarifying question please do; I really want to help you help me :)

Hi DestryU, welcome to Blender SE.  I started out with Maya too, so I know, the lack of 'clearing history' in blender was both disconcerting to me, but ultimately made my life a lot easier.  You're questions are well-worded, but one suggestion I'd make for future posts is to make one question for each question.  This makes each question more accessible to search engines, and anyone else with that same question.

Regarding your first question, you should be able to clear the roll - I usually have.  It looks like it might've gone missing, but will be added in a future (post 2.77) release : http://blender.stackexchange.com/questions/48125/reseting-the-bone-roll-value-to-0

There's not really any construction history, at least on par with what Maya has.  It has a history of operations you've done (mostly to show what the python equivalent of commands you've done is).  All of this is discarded when you quit Blender though, nothing is lurking around once you reload the file.

I just realized I haven't answered all your questions.  Blender does allow rigs to follow the master-slave paradigm of rigging too, so you can have deformation bones constrained by the control bones, etc.  It certainly isn't nonsensical - extra weight painting should be avoided when rigs get revised!

A rig could (theoretically) function perfectly well in pose mode without the roll set at zero.  But this depends on the goals of your animation and rig.  Nothing will blow up like in Maya if roll isn't zeroed out.  But it may not bend the way you intend, and an IK constraint might behave strangely too, depending on the poll target.


text:
Painting texture model lag
I using blender 2.76b or older (2.75, 2.76).
I painting model 1k face, 1024x1024.
my PC corei3, ram 8gb, win 10,  gigabyte  r7 250 2gb.
I use brush radial 1>3 pixel and > 50 pixel no lag.
But brush radial 3 > 50 pixel very lag and slow.
My setting i use default.
Help me.
Thank so much.

That makes sense. Some settings make it necessary for more calculations to be made per stroke.

Stoke space
setting spacing >30% is better than.


text:
Animation Mixamo's FBX in blender

I'm trying import the character and animation from mixamo in blender.
Default pose my character is A-pose, but Mixamo's animation is T-pose.
Hand's bone is error when run animation.
Here's what happen when i try to run animation.

I had this problem and managed to fix it by doing this:
First you need to scale your model correctly to the size you want in Blender. Then while in object mode press A to select all and then press Ctrl+A and apply scale, rotation and location.
After that, export your model as an .obj.
Import it into Mixamo, animate it and then export it as a .dae.
Now, import the .dae into blender. Re-scale the model to what you had it as before and then it should work.


text:
Specularity map vs Fresnel
I'm confused about when to use Specularity map (like the one made in CrazyBump) vs Fresnel node. Both are recommended to make materials look more realistic, I use them to combine Diffuse node with Glossy one (white colour), but everytime I'm using Specularity map, material looks too glossy and bright, while Fresnel gives more realistic look. What's the actual difference between that two?

In an ideal situation you would use both actually.
The Fresnel node will simulate the real physical property of many surfaces that causes more light reflection grazing angles. Think looking through a glass pane perpendicularly (transparent, see through) or sideways (you will see more reflection).
The specular map will deal with differences of reflectivity along the surface of the material due to uneven or varying surface properties (more polished areas versus more rough surfaces)
To achieve to most realistic results your could mix both with a Color Mix node and tweat blending values to the desired result
Edit: Here are two examples, either add the texture to the roughness input of a glossy shader

Or add the image texture to the mix value of a shader mix node.

Or both, and if desired you can additionally use it for bump mapping if necessary

Thanks for the answer! How do I go about using them both? I've tried some node setups, but the glossiness doesn't seem right, can you provide an example?

Updated original answer with details

Actually we cant compare the 2 of them.
Fresnel node is used to make more reflection at high angles,and specular maps are used to define where those reflections should be no matter what the angle is.
Fresnel is mostly used in dilectric materials like PVC plastic along with specular map in some cases.
The right way to make a material is to use both of them if needed.
Example:
Making Scratched PVC plastic:
I have a specular map and i want to use it,easy !
Just add the fresnel to the specular map.

And this will give us:

Note: If the specularity is very high when using specular map,just darken it using the rgb curve or other color node.

Wrong, you shouldn't add it to fresnel. You may rather express IOR from specular map and plug in(e.g. multiply the specular map by 2 and add 1 to it).


text:
Overlaying an image to cover a face in a video?
I am trying to make a youtube video and in the part of the video I'm going to have a image of a face on top of my face to preserve my privacy. I tried going frame by frame with a picture that has a transparent background but somehow it didn't work.

You can track a point in your footage and overlay an image in the compositor.

Common practice is to blur a face, when wanting to preserve the privacy of someone in a video. I will explain this first, as it is quicker to achieve.

Bluring a moving persons face in a video

Load the video into Blenders Movie Clip Editor. Set the scene start frame, end frame and resolution.
Go to the first frame of the scene. In the Tools Tab of the Movie Clip Editor in the Track section, set the Tracking Settings to Previous Frame. Click the Add button in the Marker section, then click on the video to add a marker. The marker should be positioned on the face you want to track. Markers can be translated, rotated and scaled. G, R, S
With the marker selected, press Ctrl + T to track it.
Switch to masking mode and add a new mask.
Ctrl + click to add new masking points. Add new masking points and track the face shape, which you want to mask. To close the mask, press Alt + C. Mask points can be selected, translated, rotated and scaled as usual.
Parent the mask points to the track by selecting the track and all the mask points and press the Parent button in the Tools menu.
[Anonymously suggested: Alternately, in case you are facing issues with track selection, click each of the mask points one after another while pressing Ctrl + P after each click. This will directly parent the mask points.]

The masked points will now follow the tracking marker. The mask can be keyframe at any frame by pressing I. This may be necessary if the shape of the face changes. Mask keyframes can be viewed and edited in the Dopesheet in Mask mode. In the example, a key is used on the start and on the end frame.
In the node editor, go into Compositing mode and check Use Nodes. Add a Movie Clip node and load your clip.
If the scene size and the source movie clip size are different, connect the Image output of the Movie Clip node to a Scale node set to Render Size. Connect the Scale nodes output to a Blur node. Set the amount of blurring you want in the X, Y fields. Add a MixRGB node and connect it to the Scale and the Blur node. Add a Mask node and select the mask. Connect it to the Fac input of the MixRGB node.
Rendering the composite will blur the area, where the mask is.

Overlaying an image onto a moving persons face in a video
Do steps 1 - 3 as explained above.

In the properties panel of the Movie Clip Editor, check 2D Stabilization. Select the tracked marker and add it to the Tracks for Location.
In compositor add an Image node and load the image, which you want to lay over the face. Add a Transform node to be able to position it later. Add a Stabilize 2D node and select the video which we used in the Movie Clip Editor. Check Invert. Since the Stabilization works in the space of the movie clip, we need to bring the smiley image into the Movie Clip space. To do this, add a Set Alpha node and connect it to the Movie Clip. Set the Alpha value to 0. Add an Alpha Over node and connect it to the Set Alpha and the Transform node. Append the Stabilize 2D node after the Alpha Over. After the stabilization the smiley image follow the track in the correct space. Add an Alpha Over node and connect it to the Movie Clip node and the Stabilize 2D node.
Rendering this will overlay the smiley image ontop of the movie clip. The smiley image is matched moved with the stabilization node.

How do you get from 6/7 to step 8?

This answer is amazing. I never would have figured out that I needed to get the coordinate space to be the same, let alone using a Set Alpha and Over Alpha to achieve it.


text:
How to make a holographic reticle shader in cycles
Does anyone have a lead on how to set up a shader in cycles to mimic the behavior of hologhraphic sights in blender, as shown in this image?

I don't want to have to try and figure out exactly how to get the lenses and reflectors etc. physically correct because there seems to be no public knowledge of how exactly it's done.  I'm thinking it will probably have to involve some vector math, but I don't know how to do it.

Please don't use link shorteners. You can link the image directly or rehost it on imgur.

Pure Shader Solution!
Hey look, high-school maths does have a purpose......

From what I could understand with a little research, holographic/reticle sights display a holograph that appears (when looking through the sights glass) to be fixed to a spatial position a certain distance (d) from the glass. Basically, we need to work out the x,y coordinates of the point d distance down the camera ray for each point we render on our sight. We can then use that to map our texture.
This would be a piece of cake if we had matrices in cycles nodes (in particular, the transform matrices of the sight object and the camera, as well as the projection matrix). We don't, so lets improvise.
The camera data node (which is where you'd expect to find the view and projection matrices) is a good starting place. While we don't see any juicy matrices, we do get one vector.
The View Vector

Location: Camera Data Node
Age... No idea when it was added
Height: ....Dude, this is a node
Weakness: Its normalized

The view vector provides a vector representing the ray that was shot out to hit that point of our mesh. This direction is in camera space. Therefore Z is always forwards, x is always left/right, and y is always up down. Each vector is normalized, so they always have a length of one.
Lets visualize this a bit. We'll do this in 2D because I can't draw this in 3D it will be easier for you to understand.
Looking at our camera top down in camera space, z is forwards (now up relative to our view), and x is left to right. This is drawn with the dark colored axis. If we look at our ray (in yellow) which has a length of 1, you will see that it can be broken up into an x and a z component (light colored axis). This is the ratio of x to z movement needed to travel down the ray.

I am available to illustrate geometry textbooks.
Do you remember when I said

Basically, we need to work out the x,y coordinates of the point d distance down the camera ray for each point we render on our sight.

If we multiply the View Vector by d, we will get the x,y coordinates of a point d distance from the camera in that direction. Progress!
However, our sight is now fixed to the camera. We can improve this, using the vector transform node.
Vector Transform

Strength: Secret sauce that makes everything work
Weakness: Doesn't seem to understand the idea of location

Obviously, our hologram should not always be d distance infront of the camera. It should be d distance in front of our sight. To do this, we will need to go from camera space to object space. The vector transform does exactly this:

To explain exactly how this space conversion works, we will need to understand object space. Object space is where the origin of our space is the origin of the object, and all the axis (plural) line up with the objects local axis (plural). Pretty simple. Our sight just needs to be d distance down the z axis is object space.
So how does this space conversion work?
If you will direct your eyes to my next graphic (again drawn looking top down), you will see that a plane as been added (our sight), and the camera has been rotated. In light colors are the axis of the object space, and in dark the axis of the camera space.

If we ignore position for a moment, and overlay the two spaces, we can see how the axis don't align:

If we line the axis up as such:

We can see that the ray, which is in camera space, is pointing the wrong way. If we apply the inverse of the camera's rotation to the data, the ray will go back to pointing the correct direction.

This is what the vector transform does.
However, this space transformation does not take the relative positions of the camera and the object into account. Therefore, if we move the camera, our sight slips:

To fix this, we need to take position into account.
Object Texture Coordinate

Location: Texture Coordinate node
Weakness: Weird positions for object origins

The object texture coordinate give the object space location of the ray/mesh intersection. Since our rays are traveling at the right angle, all they need is to start at the right place. If we take the object space coordinate, and travel d distance along the ray direct (in object space), we will get our desired x,y coordinates. This can be achieve simply be Adding the two vectors together (using the vector math node).
Now it works:

Lets re-cap.
We take the view vector, transform it to object space, multiply it by the distance d (scalar multiplication). We then add it to the object texture coordinate.

Since we sample textures in 0,1 space, and our xy coordinates range between --25 and + 25, we then divide by d, and add .5 to the xy coordinates, Clamp to avoid the texture repeating, then sample it. The whole setup looks like this:

I created my own vector clamp and scalar multiply node groups. Those can be obtained in the provided blend file.

Denormalizing the View Vector
The view vector travels out from the camera, which is a point in space. We adjust the position, transforming it to the origin of the object. Because the vector is normalize, our "projection" plane is actually a sphere d distance from the origin of the object.
In the examples, we view a very small slice of the sphere, so the curvature is not very noticeable

However, if we were to place a camera with a very wide FOV very close to the glass, we would see a much greater amount of curvature:

Which would produce very visible distortion (clamping is turned off because the repeating pattern makes to distortion more visible):

To fix this we need project the point represented by the normalize view vector (Yellow) onto a abstract plane (Teal) that is one unit away from the camera along the z (depth) axis.

The target point is in magenta. RGB lines represent components of the view vector. Also, 2.8 grease pencil improvements are awesome.
This diagram is a little confusing, a top down view provides some more clarity:

If we scale the vector's components by the ratio of the distance to the plane and the z components 1.0/z (big purple bracket divided by little purple bracket) We can extend the vector to the plane.

Implemented in nodes:

And now the warping is gone:

The center target is still roughly the same size. They appear to have shrunk since the spherical projection was moving the outer targets closer.
Author's Notes
This is a pretty robust shader. It handles object rotation, scaling moving, and zooming (focal length changes) in stride. The scope texture will always be centered around the object origin, and be visible when looking down the z axis of the object. Because the output of view vector is normalized, the output x,y coordinates used to map the texture will be projected along a sphere d distance from the objects origin, rather than a plane. This shouldn't be too noticeable. Pity they don't let the user decide whether it should be normalized.

Upvoted purely for the MS paint diagram!!! :)

You should be able to use trigonometry to project the view vector onto a plane and not a sphere, but, you're right, it's unnoticeable.

Just out of curiosity, why the hell don't we get access to matrices of things.

@joojaa No idea really. Kind of a shame. TBH, alot of improvements could be made to the cycles nodes. There are oodles of procedural texture patterns that we don't have, and lots of math features that are downright missing, or a pain in the neck to use. Best solution would be to remove OSL, and allow users to add their own SVM shaders for GPU rendering (although I am willing to be there is a technical reason as to why this hasn't happened). Doing that would allow a massive amount of community nodes to appear, which in turn could be added to blender proper, fixing many issues.

Final

Objects
You will need two objects. Lens and sight. Place them as you will do it for gun without holographic sight.

Materials
For lens use just Glass Shader.
For sight use mix between sight material (could be anything, I've used just Emission Shader) and Transparent by Light Path > Transmission Depth. This will create material that will be visible only trough glass.

Note: Do NOT shoot innocent monkey!


text:
How to do the geometricaly-like texture

How can I create a geometric pattern texture like this in blender?

This site is more gered towards learning from each other. If you just want someone to do it for you there is a payed work section at Blender artists forum

Related Welcome to bse,., albeit an inauspicious start lol.  Try re-working question into a how-to , rather than a request.  Include what you have tried, or found so far etc... .

Start by creating each glyph/character as individual Mesh/Curve/Text object. Then group them together with CTRL+G. Now you can create the base mesh and add a Particle Emitter set to Hair with the Render panel set to Group and select your group. This will create a scattering of the Glyphs across your mesh. There are lots of settings to be tweaked when using Particle systems so have fun and if it does not create the results come back with what you tried. The more information you can give us and the more things you try the easier a complete solution can be proposed.

Related .. also related re writing a good question.

@Jayem14 I don't think that can be done with nodes - not easily at least. I would recommend you try drawing the shapes and loading them in as a texture. It should be possible to make that shape with curve modeling.

I did a little experiment creating the texture using blender. It got this result:  https://i.sstatic.net/GWnZm.png (blend file: https://blend-exchange.giantcowfilms.com/b/5087/). I could write an answer explaining how I did it, but we'd need to edit this question to get it re-opened.

Thank you very much for your responses. It was a big help. I think I am good going forward. I have Autism and sometimes its difficult to get my thoughts across. Thanks for your patience.

I've re-opened this question, and I apologize for all the miscommunication happening here. Generally speaking we prefer questions arise out of an effort to achieve the desired effect/solve the problem. This usually ensures that the question is about a well defined topic which can be well addressed in a short answer. That said, trying it first, though highly encouraged, isn't necessarily required. Given the question is now asking how to do something, rather than for something to be done, it's now on topic. Sorry about the delay, and thanks for your patience :)

I do want to recommend once again trying to find some tutorials and attempting to achieve effects yourself first. We'll be here if you run into a roadblock. If you're unsure how to get started, we have a list of a few resources here, though a search engine may serve you better.

I think the best way to create this pattern is by using an image texture. The procedural texture tooling blender provides is simply not equipped to create shapes like that.
Fortunately, we can stil create our shapes in blender, and render them out.
The shapes in the provided image are quite simple, and we can create them using curves.
Creating the Shapes
To add a curve, use ShiftA>Curve>Bezier. Hit Tab to go into edit mode. You can now edit the curve by transforming the handles. In order to keep your shapes flat, I recommend editing in top down orthographic view (Numpad 7).
To get the rings like in the picture above, you can add a Bezier Circle (ShiftA>Curve>Circle).
We will need to give them thickness. Change to the curve properties window, and replicate the circled settings:

You can adjust the Bevel Depth to change the thickness. This will turn our curve into a 3D tube.
Rendering the Shapes
We will start off by setting the materials. Add an emission shader to your shape, with the strength set to 1. You can set the emission color to set the color of your shapes. I chose #E79F69. An emission shader with the strength set to one will have a uniform color no matter what lighting or camera position is used.

The reference has a black background. We can recreate this by setting the world color to black:

Now we need to setup a camera to render this. Since are shapes are supposed to appear 2D, but are infact tubes, we will have to get rid of the perspective. Otherwise the shapes further from the center will have funny shaped ends, rather than the flat lines we desire.

Left: With Perspective, Right: Without.
To fix this, we can use an orthographic camera. To set a camera as orthographic, go into the camera properties, and change it to orthographic. to "zoom" in and out, you can change the Orthographic Scale.

You will also want to position your camera so that it faces top down, and is centered. With your camera selected, go into the object properties panel. Set the X and Y values to 0, and all three rotations values to 0 (Shortcut: AltR).

Lastly, set the image to be square, this makes working with textures much easily. This can be done in the render panel, by setting the resultion. I recommend 2048 x 2048.
Scattering the Shapes
Now that we have setup our scene, and modeled all the shapes, its time to scatter them.
There are two ways to do this. Manual instancing, and particle instancing.
Particle instancing will automatically distribute the shapes over a plane. However, it has some drawbacks. It can take work to setup, and it will be difficult to get the shapes to pack tightly without intersections. Its also extremely difficult to get the shapes to tile.
Manual instancing Each shape is manually instanced (a fancy duplication method). The advantage is that the layout can be customized and tiled relatively easily, the downside is that for large areas it can become tedious and time consuming to setup.
For this demo, I will stick to manual instancing.
To instance a shape, select it and hit AltD. This will act like ShiftD, but with one key difference. The shapes are linked. If you edit one of the shapes, all its instances will have the edits applied. This also saves computer memory when rendering.
To spread the shapes out, select a random shape, instance it, and place it randomly. Rinse and repeat.

Tiling the Shapes
Now comes the really fun bit. We want to cover a large surface area in shapes, and we want the shapes to be sharp in the picture, but we don't want to have to use a massive image. We can get around this by tiling the shapes.
Tiling is when the edges of an image line up so there is no visible gap. This means the shapes on all four edges of our spread will need to be identical, and positioned identically relative to the camera.
Because we need the edges to line up, certain areas of the image will need to be identical. All four corners will need to match up (red), and the edges will need to match their opposite:

Basically, we will need to replicate a roughly square shaped patch of pattern to all the corners, and two roughly rectangular slices of pattern across the edge.
Positioning the patches
To start, we need to get the repetition interval. This is how often our pattern needs to repeat. In this case, our repeat interval is the same as the height/width of the scene. This number is the same as the orthographic scale mentioned above, which in my scene is 22.7.
For simplicity sake, I will refer to the repeat interval from here on out as ri, and half the repeat interval as ri/2.
To make lining things up simple, the patchs should not be too thick, or two thin. I recommend making them about 2.5 times the average size of a shape. Since my shapes are about two blender units across, I made my patches by 7 units wide. This means the corners will be 7x7 squares. The edge patches will now be ri - patch width in length (and path with in height).
using my numbers:
22.7 - 7 = 15.7 therefore the edge patches in the example will be 15.7x7.
In order to get our shapes to roughly line up with the edge patches, we can make some planes to use as reference. Add a plane (ShiftA>Mesh>Plane) in the properties sidebar (Toggle with N) set the x dimention to be 15.7 and the y to be 7. Duplicate the plane ShiftD and set its location to be ri/2 (11.35) on the y axis. It should now be in position like so:

We can now take our other plane (not visible in the above screenshot), and rotate it by 90 degrees (R90) and set its X location to 11.35.rx

I'll skip adding a reference plane for the corner since it is pretty easy to see where the corner is.
Filling in a Patch
We will start by filling in the horizontal patch. Instance (AltD copies of your shape and spread them around inside the patch. Its okay (acutally good) if the shapes stick out a little (especially on the long edges) so there is no seam. We can tweak the patches later if they overlap.

Instancing the patches.
We now have the horizontal patch. However, we will need to replicate it. Duplicating it would make tweaking hard later, since every patch needs to be fully identical. Therefore, it would be much better to instance the patch.
The bad news is that AltD won't work for us. That only replicates the mesh data, we want to copy the object transforms as well. So instead of instancing the mesh, we will instance a group of objects.
Begin by selecting all the objects in your patch. Then hit ⎈ CtrlG to group them. Hit F6 and name the group "Horizontal".
With the objects all selected, go into the object properties panel, and set the groups Y offset to half the repeat interval (11.35).

Now we can create a new instance of the group, ShiftA>Group Instance>Horizontal. Set Y transform of this new group instance to negative half of the repeat interval (-11.35).
We now have one edge done. Repeat for the other edge.
For the corner, you must add three additional instances, one at (x=ri/2,y=-ri/2), one at (x=-ri/2,y=ri/2), and one at (x=-ri/2,y=-ri/2).
The end product should look like this

Tweaking
There are some ugly gaps, and some of the shapes seem to have collided, or are too close. We can now select and move shapes that are parts of the original groups, to fill gaps and separate collisions. Because they are instances, all the corresponding groups will remain identical, and will therefore tile correctly.
Fill in the middle
the middle can be haphazardly filled in as described in the section on scattering the shapes.
Result
In the end we get this:

Tiled:


text:
imported model with distorted texture?
I downloaded a model as an FBX and OBJ, but when I open it in blender the texture is missing. I can assign it manually, but when I do it does't show up correctly, it is stretched and big or just a color. As far as I know if the model is UV mapped then the texture should be assigned automatically. I tried other objects and worked perfectly fine.

Did you check if it is properly UV unwrapped? It seems to pick up only one color. If you render, do you get the same result?

You can see in the UV image editor if your model is actually UV unwrapped. Also, did you import using the OBJ, or FBX, or did you try both?

Did you check if the mesh has multiple UV maps or any at all? Never assume textures carry over properly between different 3D software, but UVs should.


text:
Rendering flat faces shows too many tris!
I am rendering out images of some low-poly cars I am working on. I am having difficulty with making the quads look as good in the render as they do in the scene view...in the below pic the scene view is on the left and render on the right. Any suggestions? Is this just a matter of modelling/flattening each face or is there a way to tweak this in the render?

Based on the provided image it looks like the internal render, and not cycles.

Internal render? You mean, inside of Blender? Yeah, that's what I'm using. Just wondering if there is a way to avoid triangulating faces on render?

We have two render engines inside blender, cycles and internal. Both of them are actually internal to the program. I ask because normally we tag questions as either cycles or internal so people know what engine to answer for. See https://blender.stackexchange.com/questions/5820/how-is-cycles-different-from-blender-internal for an explanation on the difference.

Ah found the answer:
"Set smooth shading and add an edge-split modifier with the Edge Angle set to 0 degrees"
https://blenderartists.org/t/making-mesh-render-faces-as-quads-not-triangles-in-sculpt-mode/518770/7

not 'the answer', but rather, just a way around it


text:
Problem while exporting .svg file in blender
When attempting to export an SVG out of blender, I get this error:

This looks like a bug in the addon...

The line that says "DLL load failed: %1 is not a valid Win32 application" gives a clue. You can find it documented at https://docs.blender.org/manual/en/dev/troubleshooting/python.html#mixed-python-libraries-dll-s
A simple fix is to delete or rename "C:\Users\\AppData\Roaming\Blender Foundation\Blender\2.79" and restart Blender. Then you will need to reinstall or re-enable all your addons.


text:
Armature bends object but makes one side bump out
I added armature to a TV model and everything was fine, but now when I bend its foot, the side of the TV bumps out.
Any idea what this could be?
Very new to Blender, but have been searching videos and posts, but no answer found yet.
Much appreciated.
Views with and without the armature. Circled part is the issue, the arrow pointing to the foot is just to show it's in a pose.

It looks like a Weight Paint issue. Sometimes weights can be applied accidentally and even a .01 influence will affect the mesh. There are two ways to check for that.
A) In Edit mode, scroll down the Properties panel on the 3D window (right panel, press N if hidden). Click on the vertices where the bump is and you will see a section called Vertex Weights". There you can see what bones are affecting the selected vertex. Press X to remove unwanted influences and fix the remaining weights.
B) In Weight Paint mode, go to the Options tab, find "Show Zero Weights" and press the Active button. The blue mesh now turns black and you are able to see if bones have an influence of less than .1. Use the Subtract brush to paint them out and then go to Tools>Weight Tools>Clean


text:
Simulating and baking post effects
I've been wondering if it's possible to bake something like this
to look good in low-poly. I understand that there should be a diffuse map, glossiness map (since buildings are mostly glass), emission map (it's night scene). But is it possible to bake something close to glare that can be seen on buildings?

Are you trying to recreate this image or use this image as the bake texture?

https://blenderartists.org/forum/showthread.php?157112-Texture-baking-reflections-both-light-and-objects
Providing you are speaking about re-creating this image, here is an idea that is relevant to your use of Glare - relevant part is:

Baking reflections and specular highlights is a bad idea if you want to move the camera, the object or any of the lights. The position and content of the reflections and highlights depend on their relative positions
You should bake the base colours, apply it as a colour map and let Blender calculate the specular highlights dynamically. It shouldn't slow things down too much.

One more piece of reference is this post from the Blender Stack Exchange that asks about baking glass:

Baking is generally used to simulate effects like shadows, lighting, small details like bumps or roughness through displacement maps, bump
maps, normal maps, etc., the kind of thing that is either too complex
or too expensive, or somehow unwanted or not needed to calculate in
real time.
Baking means it will be pre-calculated and become static, so it wont
react when you change the viewpoint. So if you bake things like
transparency or refraction or reflections they will become static, and
seem to be "printed" or "painted" onto the surface of the object and
that is generally not desired.
See here What does "Baking" mean?

If you are using this image as a texture, like a diffuse image on a plane for instance and you want the lighting to dynamically light your scene while the glass would be a glossy color, I would suggest it probably won't matter significantly to have an incredibly high level of detail between objects, you aren't getting that close to buildings. If you are recreating it, then try to avoid baking the gloss if you are doing a moving camera and let Blender do it automatically. If you are just creating a still frame with this image as reference, go for it.
If you are using this direct image as like a background to reflect on something, you would want to enable the Import Images as Planes add-on that comes with blender, choose this file and then you'd have the image already set perfectly on a plane mesh that you can manipulate and use for whatever you need.
As for how to draw different textures to different pieces of the building, either you would create the windows as separate meshes, and apply the glass texture or something I just found this post about using Vertex Paint to draw different textures. Either Vertex or Texture Paint would allow you the control of the emission or glossiness you are looking for, and it will mix all nice with certain settings to make your image more realistic reflectively.
Good luck! If you can clarify what your project is a little more, I'll try and help more!


text:
I have a problem in my split-screen game
I have made my one scene single player and the other split-screen, the are both fps. For the single player scene I set a parent of cube to my character and made it look like the sky . In my split-screen I can't do that as one camera can see the other box when they enter. If I just add a box and not partner it, it looks like the sky is more of a wall with a sky on it and not a sky. i know you can stop objects from being rendered, but is there a way to set one of two cameras from seeing an object while the other can

Try using a background scene for the skydome instead of a parent.

I have try that, almost every time the background was to big to make out, so I moved to the box insted as it was easier, but I will try it again because I use a panarama insted of a HDRI image.

Do split screen on the background scene too.

It has worked, but is still big and difficalt to make out, but for now it works


text:
Drawing on tracked video footage with the grease pencil
Fellow night workers,
I am trying to draw sketch like drawings of houses on to drone footage. I have used Syntheyes for planar tracking. Now I am trying to find the best way to draw in Blender. When using the grease pencil the lines will not attach to the planar tracking. Any suggestions on how to do this will be greatly appreciated. Attached picture is of the blocks where the drawings are suppose to be. The drawings are just lines, like a stick figure house.
Many thanks in advance
//Hank

When you just want to add some paintings on the wall a simple image texture on a transparent background (e.g. created in Photoshop/GIMP) would do the job. If you would want to dynamically build up a drawing on the wall have a look at Blender's "Dynamic Paint"-system.

Paul, Its drone film footage, does Dynamic paint system work in the 3D animation?

Yes, of course it does.


text:
Select faces by shader?
Say I have a Mix Shader in a node setup.
Say I have a Wave Texture connected to the 'fac' input on this said Mix Shader.
I'm assuming that this functionality isn't built into Blender, so how can I use Python to select the faces that are a certain shader from the Mix Shader?
Thanks in advance.

Could you be more precise? Materials are assigned to faces, but shading properties belongs to the surface points. Usually shaders are masked out with the input of the Mix shader, in your case the Wave texture.

@Carlo I don't know exactly what you're asking me to say.

Just to add more information about what you would like to achieve, because at the moment I cannot figure it out clearly. Think about a single-quad plane with a wave texture: I can see black and white areas, but the truth is that the face is only one. You would not be able to select non-existing geometry.

@Carlo Yes, but if the plane were subdivided, would there be a way to select the vertices that are expressly in the white areas, for example?


text:
Smoke won't render in cycles
I'm having some trouble with a smoke simulation... I used quick smoke to simulate a candle and it viewed fine in the 3D view, but when I tried to render it, it showed up invisible.
Example images:
Solid view mode viewport:

Rendered view mode viewport:

Rendered via Camera:

Smoke Domain Material node setup:

Please note that I'm using the 'Quick Smoke' option, not manually creating my smoke.
Thanks, Flae.

Oh darnit I was using GPU

I was using the GPU as render device.
I simply needed to change the render device to CPU, after which, it rendered perfectly.

@cegaton Yep - wasn't out when I answered :D excited now though :3


text:
Animation render: Save plain rendered image AND composite image
I'm looking for a way to save both the plain render layer frame and composite frame in an animation render (PNG sequence output); is this possible?

@cegaton thanks Ceg! Wasn't aware of the File Output node.

I simply added a File Output node connected to the Render Layer output in the compositor, as well as a File Output node connected to the last compositing node:

The second File Output node is unnecessary, as you will already be rendering out a file for the Composited output. This solution will write out 3 files to disk per frame.

@ToddMcIntosh True, but I was simply rendering still frames at this point and the above method suited my needs.


text:
Trail particles ending in a point?
I'm back with another question.
I've been working on a particle system, and I have a cube which outputs square particles from its volume without a normal movement value, then, I move the cube around (via keyframing).
My only problem is that particles usually achieve something similar to the right side of this image:

When what I really want to achieve is what's on the left.
Is there any way I could move the particles to form a point at the end?

Help anyone? :/

Could you upload the .blend here http://blend-exchange.giantcowfilms.com/ ?

Hey, it's not that hard to just set up a cube that emits particles from its volume. I'm not uploading 5MB of something anyone can do. Besides, that's all my project is, a cube that emits cube particles from its volume.

I tried this hours ago but couldn't find out how you setup the materials to fade out (particle node/lifetime) whether or not you emit objects (since cycles doesn't support halos) and so on. The basic scene with an animated cube shouldn't take 5mb.

xD the above image is not a render, just an example :)

Still, I'm interested to see how you'd curve the particles.

Just add a follow path constrained as described here: http://blender.stackexchange.com/questions/44459/blender-3d-movie-frames-around-an-arc/44473#44473

I'll try that and see how it goes.

Sorry, but I'm not completely sure how to do this... could you post an 'answer' with more information?

You could emit objects from a vertex group of a ico sphere. Let the emitter follow a curve a force field could follow the emitter and attract all particles. The distance of the force field can be controlled by offset.

The fade out of the trail can be controlled by the particles age e.g.

(Note that the particle count has been lowered in the .blend) The age is not correctly calculated when using child particles.

It looks to me that you need to apply Size-over-Age texture to your particle system.
Size is, apparently, the key influence, the velocity -- optional.

I'm not trying to make it smaller as it ages, I'm trying to curve it specifically.

@Flaeon sorry I got your pictures wrong -- both of them kind of curved to me. If you don't want to reduce the size of the particles, just add physical forces to your scene to influence (curve) particles trajectories. You can control the influence to the specific type of force in the particle system config.


text:
No materials showing up in cycles
So im trying to make a minecraft animation test with my world and i want really good lightning. The only problem is when i render in cycles none of my materials show up like they do in blender render.


text:
Rendering file wont appear
Im trying to make a cycles rendering test with HDRs but when i render an image it doesn't appear in the specified folder.
Here are some screenshots:

Related - http://blender.stackexchange.com/questions/43178/image-not-appearing-in-output-folder-when-rendered?rq=1. This is as expected, thus no images will be in output folder even if it's setup in Render > Output rollout because you're rendering only one image. See more info in linked questions

When you render images they don't export themselves to a folder, you have to do that manually. Just use the shortcut Shift + F3 (with the mouse hovering over the render in the UV Image Editor) and navigate to the folder you want the image to export to.

Ive already specified the folder on "output" And when i try to click "play rendered animation" it comes with an error saying the file doesnt exist..

What are you actually doing? Are you rendering a single frame, an animation or something else?

I clicked "Render" and "Render Image"

@MartinLund  The output folder is only for animations, if you render a single frame you have to save it manually.  This can be done (in the UV/Image Editor) under Image > Save as Image or with [Shift]+[F3].


text:
Uv Unwrap not working
After I unwrap in my current project file the texture never appears in rendered mode what could I be doing wrong? When I watch tutorials they unwrap and the texture automatically appears on the object you are working on.

Are you in textured view (Alt Z)? (related)

when I check textured view the object is black and not what I have in the uv editor... I don't know what I am doing wrong I selected the image and unwrap the object yet nothing appears in rendered view or textured view.

In blender internal you have to switch display mode from multitexture to GLSL (under shading in in 3d-view) for the texture to appear in texture view. Don't know about cycles.

Mark out the seam on the mesh in the 3D View window.
Open a UV/Image Editor window.
Make sure the whole mesh is selected in the 3D view (press A key a couple of times if necessary).
Then select Unwrap (or press U while mouse is over 3D View).
You should then see the unwrapped model in the UV/Image editor window.


text:
Cutting Diagonal Lines
Ok I need to cut two diagonal lines into a plane essentially creating an X. Problem is blender has no easy to use tool for this so I chose to triangulate the plane and this only creates one diagonal line going from the top left vertex to the bottom right how do I make that second diagonal line from the top right to bottom left?

What you are looking for is the Poke Faces operation.
In Edit Mode, with your plane selected, press AltP. This operation creates a node at the face's center, and then triangulates the face around that central vertex.

authors: Μαριαννα Βουρακη


text:
select python code from info view
I'm trying to copy python text from the info view, but I can't select any text. I tried 2.6.4 and 2.7.6. Am I doing something wrong?
I'm using Blender on OS X 10.11

Have a look at the UserPreferences->Input->Info

The 'Select Mouse' on window is a right-click. This will highlight a line, and the same action to remove the highlight. Whatever you use on the Mac to select geometry, should be the same key that will work in the info-window to select lines.
Copy Reports: will copy highlighted reports.
short-comings: (November 2015)
It isn't currently possible to select part of a line, it's the whole line or nothing.

Thanks! I changed Mouse from Select Mouse to Left Mouse and now I can select line by line.

Oh OK. interesting! I would have expected the equivalent of geometry selection to work on the info panel.


text:
Ellipse Construction Advice
I'm working on a add-on for Blender, and part of this add-on requires me to calculate the position verts along the arc of an ellipse. At the moment, I'm using the { r_i^2 = (scale_x * cos(theta_i))^2 + (scale_y * sin(theta_i))^2 } equation with a fixed delta to the theta on the arc. This basically, gives you the same thing as if you were to scale a circle by different amounts along the x and y axis.
My issue with this is that the edges along the longer sides of the ellipse are longer than the edges along the shorter side of the ellipse. I want an algorithm that will create edges of (near) equal length.
I could do a binary search for the correct edge length. Yet, this algorithm runs quite often due to the different arcs with different edge counts, so a binary search for edge length might not work so well when I check to see if the edges fit the size of the given ellipse.
I was also thinking about trying the Parallelogram Method. The spacing of the points looks a bit better on the animated-image from Wikipedia, but I also noticed that that the image doesn't quite line up with instructions on creating an ellipse with this method I've managed to find on various sites.
I was wondering if anyone had any advice on fining equally spaced points along an ellipse when all you have are the number of points and the dimensions of the ellipse. I should probable add in that I'm only finding the points along a single quadrant, and I'm using mirroring to find the rest of the points.

There are some posts here https://stackoverflow.com/questions/6972331/how-can-i-generate-a-set-of-evenly-distributed-points-around-an-ellipse and https://mathoverflow.net/questions/28070/finding-n-points-that-are-equidistant-around-the-circumference-of-an-ellipse that may be useful.  The eccentricity eqn etc is non-trivial to solve.  Might pay to check out whether numpy has this.
Here is a "brute strength" approach that adds up the arc length of every second (as in degrees, minutes, seconds) until we have an arc length approximately the length we desire.

import bpy
import bmesh
from math import sqrt, pi, sin, cos, radians
from mathutils import Vector
def ellipse_point(theta):
    return Vector((a * cos(theta), b * sin(theta)))
a = 4
b = 6
# approximate circumference of an ellipse
C = pi * ( 3 * (a + b) - sqrt((3 * a + b) * ( a + 3 * b)))
print(C)
N = 32 # Number of points per quadrant

d = C / (4 * N) # length of arc
theta = 0
point = ellipse_point(0)
points = [point]
lengths = []
l = 0
dtheta = radians(90.0) / (60 * 60 * N)
while theta <= radians(90):
    theta += dtheta
    v = ellipse_point(theta)
    lengths.append((v - point).length)
    l += (v - point).length
    if abs(d - l) < 0.001:
        l = 0
        points.append(point)
    point = v

print("SUM", 4 * sum(lengths))
bm = bmesh.new()
mesh = bpy.data.meshes.new("ellipse")
verts = []
# load in the verts
for p in points:
    pt = (p.x, p.y , 0)
    verts.append(bm.verts.new(pt))
# edges
edges = [bm.edges.new([verts[i-1], verts[i]]) for i in range(1, len(points))]
# close
#bm.edges.new([verts[-1], verts[0]])
bm.to_mesh(mesh)
ellipse = bpy.data.objects.new("ellipse", mesh)
bpy.context.scene.objects.link(ellipse)
mod = ellipse.modifiers.new("mirror", type='MIRROR')
mod.use_y = True

Not every point is going to be interactive, so why waste resources when you can fake the general shape (Mesh menu having a triangle under the name circle)(please look at my latest question to see why/how I ended up finding this answer). Wouldn't it bemore useful to calculate just the vertices that have importance XD such as the intersections.  Maybe you could explain in short why this isn't implemented when it's apparently possible, Geogebra is an example, or at least I think that's how it works (because it works).

t's the same for any other primitive, the edges consist of infinite vertices, but the increments of movement along them are determined.. why wouldn't the same be possible for a circle. Always displaying it as a smooth curve, and pulling up a flag when a limit based on the hardware capability is reached ? Though I doubt that would happen with all the fakery going down uder the hood.

every irrational value is fakedisplayed. What matters is that it's documented correctly (without even trying to resolve beyond a limit, though that is what is displayed) so other ratios end up being documented and so on

I propose an adaptive approach :
The idea is to start from the simple x = a * cos(t) and y = b * sin(t).
Then calculate all the distances between the consecutive points, and progressively adapt the angle between them relatively to each distance compared to the average distance.
Note : this is to improve, as the last point (on top in the image below) does not "move". So its own angle does not vary as the others... edit : this note is false. After some tests, this is just matter of setting the good precision to reach (for instance set the precision to 0.00001 and all is ok and needs 6 iterations, so 6 * the amount of vertices calculations).
import bpy, bmesh
from math import radians, sqrt, cos, sin

rad90 = radians( 90.0 )
rad180 = radians( 180.0 )

def createVertex( bm, x, y ): #uses bmesh to create a vertex
    return bm.verts.new( [x, y, 0] )

def listSum( list, index ): #helper to sum on a list
    sum = 0
    for i in list:
        sum = sum + i[index]
    return sum

def calcLength( points ): #calculate the lenghts for consecutives points
    prevPoint = points[0]
    for point in points :
        dx = point[0] - prevPoint[0]
        dy = point[1] - prevPoint[1]
        dist = sqrt( dx * dx + dy *dy )
        point[3] = dist
        prevPoint = point

def calcPos( points, a, b ): #calculate the positions following the angles
    angle = 0
    for i in range( 1, len(points) - 1 ):
        point = points[i]
        angle += point[2]
        point[0] = a * cos( angle )
        point[1] = b * sin( angle )

def adjust( points ): #adjust the angle by comparing each length to the mean length
    totalLength = listSum( points, 3 )
    averageLength = totalLength / (len(points) - 1)

    maxRatio = 0
    for i in range( 1, len(points) ):
        point = points[i]
        ratio = (averageLength - point[3]) / averageLength
        point[2] = (1.0 + ratio) * point[2]
        absRatio = abs( ratio )
        if absRatio > maxRatio:
            maxRatio = absRatio
    return maxRatio

def ellipse( bm, a, b, steps, limit ):

    delta = rad90 / steps

    angle = 0.0

    points = [] #will be a list of [ [x, y, angle, length], ...]
    for step in range( steps  + 1 ) :
        x = a * cos( angle )
        y = b * sin( angle )
        points.append( [x, y, delta, 0.0] )
        angle += delta

    doContinue = True
    while doContinue:
        calcLength( points )
        maxRatio = adjust( points )
        calcPos( points, a, b )

        doContinue = maxRatio > limit
        print( maxRatio )

    verts = []    #edit : to add the edges
    for point in points:
        verts.append( createVertex( bm, point[0], point[1] ) )

    for i in range( 1, len(verts) ):
        bm.edges.new( [verts[i - 1], verts[i]] )

A = 2
B = 1

bm = bmesh.new()

ellipse( bm, A, B, 12, 0.01 )

mesh = bpy.context.object.data
bm.to_mesh(mesh)
mesh.update()

The algorithm seems to converge (stop) around 4 iterations for a 1% around the mean distance and around 6 iterations to be under 0.01%.
Not very mathematical, but it avoids complex analytical calculations...
 (edited : added edges)

Youll porbably have to find the perimeter of the ellipse, and then divide that by how many points you want, so it would be equally spaced?

I was thinking of using one of the upper bound estimation equations as my starting point for the binary search of edge lengths. The real issue would be all the attempts to fit the points onto the perimeter while keeping them equal spaced. The algorithm I've been working on in the back of my mind will tell me if the edge length is too long or short, but fitting them over and over could end up being expensive.


text:
BGUI change color for Text_Input
how can I change the color of the text_input widget in the BGUI?
I've tried:
self.input = bgui.TextInput(self.win, text="text", color=(0, 0, 0, 1), size=[.4, .04], pos=[.04, 0.12],
        input_options = bgui.BGUI_INPUT_NONE, options = bgui.BGUI_DEFAULT)

but it didn't work, the color is still white. In the default theme the TextInput color is set to black too.
Thanks in advance.

Looking at the code for BGUI, it appears that the color parameter is not being used in text_input.py. Your best option is to use theme to customize the input text color.


text:
BGUI modify text_input widget
I would like to tweak the BGUI, so the text_input widget would swap the color from highlighted to inactive after it has been deactivated by the mouse.
I realized that the color changes to inactive after pressing the enter key, but not after klicking with the mouse somewhere else on the screen.
Could you help me with that, please?
Thanks in advance.
Eugene

I couldn't fix the BGUI to solve the problem, but I found a workaround for this.
Set a Left Mouse Button Sensor and connect it to a python controller that activates a callback function.
if not own['sys'].layout.input._active == 1:
        own['sys'].layout.input.text = own['sys'].layout.input.text


text:
Essentially, what are drivers?
Okay, so I'm a relatively new user of Blender. I've delved into most of Blender already, including the Graph Editor and F-curves, but not the Dope Sheet or Drivers.
I'm planning to get into what the Dope Sheet is later on, but for now, I wondered what drivers are...?
What can they be used for?
How can I use them?
Are they Engine-specific?
(I usually use Cycles.)
Thank you.

Drivers are ways of controlling certain properties based on the values of other properties or scripted Python expressions.

Thanks guys! I should probably read the manual a bit more :) although I sometimes find it overwhelming to read and not very well explained.... Or rather, so well explained I don't understand it :) Thanks again!

A driver is a Python expression that is used to control the value of some field, generally depending on some external variable. They're generally limited to one line, but can actually span many.

Drivers can use properties, numbers, transformations, and scripts, to control the values of properties.
Using a F-Curve, the driver reads the value of the Driver Value and sets the value of the selected property it was added to.

From the Manual entry: drivers
F-curves are just an easier way to animate a property overtime, by manipulating the handles that define a function that maps time to some value. Then, Blender interpolates for the values between the handles.

The idea is simple: you define a few Key Frames, which are multiple frames apart. Between these keyframes, the properties’ values are computed (interpolated) by Blender and filled in. Thus, the animators’ workload is significantly reduced.

From the Manual entry: f-curves


text:
How can I do glowing halo particles/special effects in Cycles?
Now, I've been wanting to create special effects in Blender (Cycles), but I don't know how to do it.
For example (just a picture I googled):

Or:

I can't figure out how to do this in Blender (specifically Cycles). Blender Internal had the 'halo' material, which would be one step ahead concerning special effects I suppose, but you don't get half the capability Cycles has.
I've been fiddling around with a lamp/light emitting object, and a sphere/other mesh with a volume scatter volume input, but that doesn't have very advanced results, and is incredibly grainy when rendered, unless you head upwards of 500 samples.
For example, this was a simple point lamp with a strength of 100 and a very large UV sphere with a volume scatter volume input. It took 15 seconds to render (at 150 samples) and still doesn't give me satisfactory results.

Is there any way to do special effects like this in Blender (especially Cycles)?
Thanks, Flaeon.

I think you can do this in the node compositor using render layers, emission, and the blur filter.

@Dontwalk I'm not talking about the compositor, I need materials, because if I use the compositor it composites the entire frame and if a normal poly mesh happens to be in the same frame with the effect, it'll be applied to the normal mesh as well.

If you use the compositor you have control over what it composites. I don't think effects from both images are done with materials only. See http://blender.stackexchange.com/questions/46382/how-can-i-make-a-part-of-a-texture-glow, also http://blender.stackexchange.com/questions/35853/one-part-of-the-render-layer-glowing

Halo particles are available in Cycles, actually with more flexibility than BI.

Thanks a lot, I found out how to achieve something similar from these comments :)

I was working on this clock anyway... Now it glows.
I moved the clocks “Bells” to layer 4 (It could be any other layer than the layer the clock mesh is on. In my case layer 1). I gave the bells mesh a material with “Emission”.
Then in the “Render Layers” panel I added a render layer and selected layer 4 and named it “Glow”. Although you don’t need to rename it.

Here's the node set up in the Compositor.

How can we create the above blue color mesh so that we can give a glowing material.


text:
Preview a voronoi/magic/clouds/other texture?
Usually, when I am using a Displace modifier on an object and want to use a texture for it, I can get a preview in the texture tab:

However, when I use the texture in the node editor as a mix shader fac input (as I have been doing recently), I cannot preview the texture in the texture tab.

How can I preview the texture in the node editor and change the contrast/brightness as I can with the Displace textures?
Thank you in advance.

You could preview them directly on the mesh using an emisssion shader. Node Wrangler / Node Efficiency Tools provides a hotkey for that (sadly I can't recall it.)

Ctrl Shift click on the node to be previewed (Node Wrangler Addon)

@user277143 I don't want to preview on the mesh, I want to preview the texture.

@joshsanfelici I'll try that.

@Flaeon We both mean the same thing: Ctrl Shift click (thanks, Josh) with the node wrangler addon makes the surface of the mesh be an emission shader. If you UV-unwrap a plane and have it have your material, you can preview the texture that way.

So you can't actually preview the texture? Seriously Blender?

Just change the preview window on the right side to the plane.  The node wrangler tool adds the Ctrl Shift Click shortcut (like in the compositing nodes) to preview a texture.  It's much more flexible this way.

You can't currently preview cycles textures independently in the texture tab, as far as I know, they belong to a completely different rendering system.
You can however get some kind of preview of the texture by previewing the material itself in the Materials tab of the Properties Window by expanding the preview panel and switching to a Flat preview object.

authors: Алексей Леонов


text:
How to change material properties with time
I'm trying to create a magic halo behind an object. For this I decided (maybe, improperly - but I'm a newbie) to use hair. So I grew up a long hair, assigned an emissive material and made its colour change with location.
But now I also want that halo to gradually change colours as the time progresses. I cannot find any time-based shaders in the nodes collection, only as a composition node - but that one is to my understanding only applicable to the whole scene animation.

This can be be done with keyframes. Almost all values in blender can be animated; to insert a keyframe, hover over the value you want to animate and press I. Then switch to a different frame, change the value, and insert another keyframe. The value will now change from the first value to the second over the course of the frames between the two keyframes.

But well, why can't I add a new keyframe? I tried adding the properties to a keying set, that went well, but adding a frame for that keying set produces "failed to insert any keyframes" error...
Modifying the colours directly seems to produce a keyframe, but I can't see it on the timeline.

Can you see the keyframes in the dopesheet?

Yes, thank you, I haven't seen this Dope Sheet before :-)
Do you have any idea about the keying set problem?

First you have to set everything up and then click "I" on the color bar.
Next You have to go to the desired time where the colour change will end on the timeline. After that change the colour of the Halo. Finally click "I" on the colour bar again. This sets the selected colour to the selected time on the timeline.
Final Product:

NOTE: Example above is made in Blender Render since it takes a long time for a cycles animation, but this also works in Cycles as well.
BTW This is probably not the kind of "Halo" you are talking about, but it's a good example.


text:
How to trim down the total ammount of keyframes in a animation
Hey guys I'm currently working on a motion capture project using the rokoko studio. At the moment studio exports animations at 100 fps and can't be changed. This leaves a huge number of keyframes in the animation for me to have to go through and clean up. I was wanting to find out if there was a way to pack down the sheer number of keyframes to something more manageable like 30fps.

Have you tried "Simplify Curve" operator? With cursor in Curve Editor hit search. If not there probably needed activate an add-on in Preferences. I m on tablet can't ensure now.

Youn go to pose mode, menu pose, animation, bake action, and set the frame step to three, reducing at one third the number of keyframes.

Yeah this has worked supper well for me. Thank you so much for this.


text:
OPening user prefs Crashes blender
So I had this problem when opening user prefs (creating a new window) blender immediately crashes. It doesnt crash if I just change a panel to user prefs.
I was overdue on maintainence, so I reinstalled windows clean installs  all round.  And despite that its still knackered. I read about changing the intel vga drivers butnot sure that applies as I run GPU's not on chip graphics... Any help appreciated.
heres the sys info
https://www.dropbox.com/s/bi88sqixfg9f1la/system-info.txt?dl=0

This used to happen in some laptops with dual GPUs with integrated Intel graphics card and a discrete AMD GPU. It was caused by some driver bug solvable by installing a more recent version. Bad news is most manufacturers used specific proprietary drivers, and no newer versions were ever made available.

In keeping with your idea, I disabled one GPU and Itnow works... of course this meeans i have half the GPU's for rendering  Can't seem tofind a more permanant fix


text:
Quaternion problems, Rotation in direction of transit
Quaternion problems
Hi Guys and Gals. I've been trying to code my way out of a problem. Essentially, I've been trying to get an object to roll in whatever direction its travelling, so if moved on the x axis it'll roll on the Y, and so on.
So here's the code I'm trying to use. and below that is a dropbox link to the blend. As you can see i'm close. But the rotations all wrong. It looks like the quaternions misinterpreting things, and my brains to frazzled to unravel the issue. I would really appreciate it if some one could tell me where its all going wrong.
import bpy
from mathutils import Vector
from mathutils import Quaternion
from math import pi
# create variables
target = bpy.context.scene.objects['CTRLEmpty']
empty = bpy.context.scene.objects['offsetEmpty']
rotator = bpy.context.scene.objects['RotatorEmpty']
obj = bpy.data.objects['Sphere.001']
# create a custom function called delay on the empty
target['delay'] = 2
# create a custom function called delay on the empty
target['radius'] = 2

# create empty list
prev_locations = []

# define the function
def roller_function(scene):
    # add the location of the Target (variable) to the prev_locations list
    prev_locations.append( Vector(target.location) )
    rot = Quaternion((0,0,0,0))
    # create variable called loc_count that is equal to the amount of entries in prev_locations list.
    loc_count = len(prev_locations)
    # cull list to 10 items
    # whenever loc count is larger than the delay variable...
    while loc_count > target['delay']:
        # "pop" or remove the entrie at index position 0 (i.e.  the first entry)
        prev_locations.pop(0)
        # then subtract one from location count
        loc_count -= 1

    # create an average location vector and position vectors P0 is for previos frame position (or current frame of delayEmpty P1 is for current position
    loc_average = Vector()
    P0 = Vector()
    P1 = Vector()
    for loc in prev_locations:
        #  add together location average and loc
        loc_average += loc
    # divide loc_avrage by loc count to get the actual average location
    loc_average /= loc_count
    # place delayEmpty in the priorframe location
    empty.location = prev_locations[0]

    #the clever bit
    #create previous frame Position variable
    P0 = loc_average
    #create current frame Position  variable
    P1 = target.location
    #if no distance travelled rotation is the same as prior frame
    if(P0!=P1) :
        #find the difference in location between this frame and last
        dif = P1-P0
        #get the distance travelled
        dist = dif.length
        #set the radius from average dimension
        r0 = (obj.dimensions[0] + obj.dimensions[1] + obj.dimensions[2])/3

        vec = dif/-dist
        zUp = Vector((0, 0, 1))
        rotAxis = vec.cross(zUp)
        angle = 360*dist/((r0)*(2*pi))
        rotDif = Quaternion(rotAxis,angle)
        rot += rotDif
        # print feedback in console
        print("locational difference is")
        print(dif)
        print("distance travelled is")
        print(dist)
        print("vec is")
        print(vec)
        print("angle is")
        print(angle)
        print("rotation is")
        print(rot)
        print(loc_count)
        rotator.rotation_quaternion = rot
        obj.rotation_quaternion = rot

# clear then add a function
bpy.app.handlers.frame_change_pre.clear()
bpy.app.handlers.frame_change_pre.append(roller_function)

https://dl.dropboxusercontent.com/u/35247393/troubleshooter.blend

What do you mean by "get an object to roll in whatever direction its travelling"? It seems like you are going to rotate object in its yaw or pitch.I just skim your source code and see the definition of zUp, which will be crossed with vec to get your rotation axis. I advise that if you want a rotation about object's local axis, you should not use a global vector like (0, 0, 1).

Hi thanks for your reply, If you get a mo, take a look at the linked blend file.  The sphere has keyframed movement along the x axis (and later diagonally), the code starts it rolling like a ball however part way through the x axis move it starts to rotate in the reverse direction, like the w value of the quaternions gone wrong. Also If I shouldn't be using a global vector, can you recommend what I should be using?

It is ok to use (0, 0, 1) as your up vector if you are moving in XY plane. I found other potential problems: (a) If you want to accumulate rotations in every frame, you should use Quaternion((1, 0, 0, 0)) as your identity and use rot.rotate(rotDif) to accumulate rotation. (b) I noticed you compute angle use angle=360*dist/((r0)*(2*pi)). It seems very like a conversion from radians to degrees. But Quaternion accepts the rotation angle in radians. I am not quite sure of your intention. (c) You may put rot out of your handler function, or it will be reset to initial value every frame.

I think its fair to say your my hero !  :) It still needs a little finesse but its finally rolling straight, thanks to your suggestions.

How do I select your answer as "the" answer? :)

I have tried my suggestions on your code. It does not work as excepted. So I believe my comment is partial. You can answer your own question by writing down how you fix it.

So thanks to TheBusyTypist I was able to fix my code to work...
import bpy
from mathutils import Vector
from mathutils import Quaternion
from math import pi
# create variables
target = bpy.context.scene.objects['CTRLEmpty']
empty = bpy.context.scene.objects['offsetEmpty']
rotator = bpy.context.scene.objects['RotatorEmpty']
obj = bpy.data.objects['Sphere.001']
rot = Quaternion((1,0,0,0))
# create a custom function called delay on the empty
target['delay'] = 2
# create a custom function called delay on the empty
target['radius'] = 2

# create empty list
prev_locations = []

# define the function
def roller_function(scene):
    # add the location of the Target (variable) to the prev_locations list
    prev_locations.append( Vector(target.location) )

    # create variable called loc_count that is equal to the amount of entries in prev_locations list.
    loc_count = len(prev_locations)
    # cull list to 10 items
    # whenever loc count is larger than the delay variable...
    while loc_count > target['delay']:
        # "pop" or remove the entrie at index position 0 (i.e.  the first entry)
        prev_locations.pop(0)
        # then subtract one from location count
        loc_count -= 1

    # create an average location vector and position vectors P0 is for previos frame position (or current frame of delayEmpty P1 is for current position
    loc_average = Vector()
    P0 = Vector()
    P1 = Vector()
    for loc in prev_locations:
        #  add together location average and loc
        loc_average += loc
    # divide loc_avrage by loc count to get the actual average location
    loc_average /= loc_count
    # place delayEmpty in the priorframe location
    empty.location = prev_locations[0]

    #the clever bit
    #create previous frame Position variable
    P0 = loc_average
    #create current frame Position  variable
    P1 = target.location
    #if no distance travelled rotation is the same as prior frame
    if(P0!=P1) :
        #find the difference in location between this frame and last
        dif = P1-P0
        #get the distance travelled
        dist = dif.length
        #set the radius from average dimension
        r0 = (obj.dimensions[0] + obj.dimensions[1] + obj.dimensions[2])/3
        angle=dist/r0*2
        vec = dif/-dist
        zUp = Vector((0, 0, 1))
        rotAxis = vec.cross(zUp)
        rotDif = Quaternion(rotAxis,angle)
        rot.rotate(rotDif)
        # print feedback in console
        print("locational difference is")
        print(dif)
        print("distance travelled is")
        print(dist)
        print("vec is")
        print(vec)
        print("angle is")
        print(angle)
        print("rotation is")
        print(rot)
        print(loc_count)
        rotator.rotation_quaternion = rot
        obj.rotation_quaternion = rot

# clear then add a function
bpy.app.handlers.scene_update_pre.clear()
bpy.app.handlers.scene_update_pre.append(roller_function)
#bpy.app.handlers.frame_change_pre.clear()
#bpy.app.handlers.frame_change_pre.append(roller_function)

The last 4 lines are interchangeable, the frame change set is more stable the scene_update allows you to see changes as you drag.