text:
How do I make an addon from this code?
I have this piece of code that I am using to remove duplicate materials. What I do is I open the Text Editor, paste it in and click Run Script. I would like to make it a Tools Shelf button. This is the code:
import bpy

mat_list = bpy.data.materials

for o in bpy.data.objects:
    for s in o.material_slots:
        if s.material.name[-3:].isnumeric():
            # the last 3 characters are numbers
            if s.material.name[:-4] in mat_list:
                # there is a material without the numeric extension so use it
                s.material = mat_list[s.material.name[:-4]]

I tried following the instructions here, but I get this error:

This is my first time messing around with Blender scripts, any help appreciated!
EDIT: This is my complete addon:
import bpy

bl_info = {
 "name": "Remove Duplicate Materials",
 "author": "Me",
 "version": (1, 0, 0),
 "blender": (2, 7, 8),
 "location": "3D View > Tool Shelf > My Tools",
 "description": "Remove duplicate materials",
 "warning": "",
 "wiki_url": "",
 "tracker_url": "",
 "category": "User"}

import bpy

mat_list = bpy.data.materials

for o in bpy.data.objects:
    for s in o.material_slots:
        if s.material.name[-3:].isnumeric():
            # the last 3 characters are numbers
            if s.material.name[:-4] in mat_list:
                # there is a material without the numeric extension so use it
                s.material = mat_list[s.material.name[:-4]]

Post your complete addon code, please. A while ago, data access was restricted from the addon registration code so you must now put it into very specific places.

Also see this: https://blender.stackexchange.com/questions/8702/attributeerror-restrictdata-object-has-no-attribute-filepath

To make a button, you have to make a panel and tell it where to show up -  as well as make sure that you register and unregister your classes including your panel. See my code below for what I got to work.

Maybe try this and see if it makes sense to you.
It really should also poll to see if objects are selected in the operator.
bl_info = {
"name": "Material Button Panel",
"author": "Your Name Here",
"version": (1, 0),
"blender": (2, 78, 0),
"location": "View3D > Toolbar",
"description": "Button to Remove Duplicate MAterials",
"warning": "",
"wiki_url": "",
"category": "Material",
}

import bpy

class RemoveDupmatl(bpy.types.Operator):
    """Remove Duplicate Materials"""
    bl_idname = "object.remove_dupmatl"

    bl_label = "Remove Duplicate Materials"
    bl_options = { 'REGISTER', 'UNDO' }

    def execute(self, context):

        scene = context.scene

        #new code
        mat_list = bpy.data.materials

        for o in bpy.data.objects:
            for s in o.material_slots:
                if s.material.name[-3:].isnumeric():
                    # the last 3 characters are numbers
                    if s.material.name[:-4] in mat_list:
                        # there is a material without the numeric extension so use it
                        s.material = mat_list[s.material.name[:-4]]

        return {'FINISHED'}

class TestPanel(bpy.types.Panel):
    """A custom panel in the viewport toolbar"""
    bl_label = "Test Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Tests"

    def draw(self, context):
        layout = self.layout

        row = layout.row()

        row.label(text="Single Button")
        row = layout.row()
        row.operator("object.remove_dupmatl", text = "Remove Dup Material", icon = 'ROTACTIVE')

def register():
    bpy.utils.register_class(RemoveDupmatl)
    bpy.utils.register_class(TestPanel)

def unregister():
    bpy.utils.unregister_class(RemoveDupmatl)
    bpy.utils.unregister_class(TestPanel)

if __name__ == "__main__":
    register()

Thanks for the edit - I haven't posted code enough to know how it should be here.

Also don't forget to click Save User Settings to make sure it stays enabled on restart.


text:
How do I prevent duplicate materials when copying between instances?
I have two instances of Blender open. One instance has a bunch of common objects that I am using to build a model (doors, walls, props, etc). I can copy, for example, a door into the other instance. Then if I need another door model that is using the same material as the first one I copied, it will create a duplicate material for that door.
Is there a way to prevent this? What I need is ALT-D (linked object) but for going between instances. Otherwise I end up with alot of this:

Thoughts?

The question is: Why would you do that? If you open the same file twice, you have an instance, but what to do with it? At some point, you have to save both files, so you have two files in the end. And with two files, what speaks against using standard linking? Am I missing something here?

Sorry if this is unclear. I'm not opening the same file twice. I have one file that is filled with objects. I then open ANOTHER instance of Blender. So now there are two separate Blender windows running. I copy objects in from the first one, and duplicate materials are created if they already exist.

Aah, so like in 3ds Max - if merging objects, it will detect that another material with the same name is in the scene, and ask what to do. Use the old material for both objects, the new one, or create a copy.
Or, like in After Effects, some functionality to consolidate footage - or in this case identical materials apart from name. Sorry, I don't know how to do that, but I guess it would be possible using scripting.

source: Stack Exchange

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

sort: votes


text:
What is the problem with this surface shading?
I am recreating this broken mesh on the right with another built with primitives, but the lighting looks off:

There appears to be a "white spot" where the shading isn't working properly. All normals are facing the correct way and the mesh is set to use Smooth shading and Auto Smooth is enabled.
From another angle:

Flat shading:

Normals:

What is going on here?
EDIT:
After I joined the new mesh to the existing base mesh (CTRL + J), the auto smooth shader picked up a new shading angle form the base object and it returned to normal:

What is the angle set to on auto-smooth?  Can you export that object into another blend file and attach it to the post?

So when I joined the new object to the existing orange base mesh, the shading returned to normal. I guess it must have picked up a new shading angle from the object it was joining to? Anyway, seems to be good now. I'll have to keep that auto-shading angle in mind for next time. Thanks!

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


text:
What is happening here? Boolean modifier works *almost*

So I want to hollow out a spheroid.
I redo the normals, extrude inwards, use p to separate the smaller spheroid copy, extrude its faces only outwards, move it into another layer, then use a boolean to subtract this from the original (big) spheroid. You see the result. It works almost.
Why not completely? What am I doing wrong? The smaller sphere's protrusions definitely go fully beyond the bigger sphere on both sides, inside and outside.
Here is the file for download: http://www.pasteall.org/blend/41696

It would be easier if you added only screenshots instead of gif in order to make post clearer. One reason for bad results of Boolean can be flipped normals; enter Edit mode for spheroid and press Ctrl+N with all selected, see http://blender.stackexchange.com/questions/3606/why-are-some-faces-in-my-mesh-darker. You might want to upload this file for convenience.

Thank you, I already aligned the normals. I will upload the file momentarily

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

What was the original mesh like (before Boolean) ?  As for now subtracted mesh has good amount of Ngons and inverted normals. If that was present while using modifier the result won't be expectable. Note: do you want to get effect of wire-like mesh ?

Before it was just a solid body with 12 faces. I used the answer from TLousky to get exactly what I wanted.
No, it was not a wire-like mesh - it has to be solid (from all sides) to be suitable for 3d printing.

You can do this with the new (blender 2.76+) intersect (boolean) feature.

Steps to recreate:

Go to edit mode (Tab).
Select all (A).
Extrude inwards (E).
Go to Face select mode (CtrlTab).
Extrude individual (Tools panel-->Add-->Extrude Individual) outwards.
Select entire inner mesh island (CtrlL).
Open dynamic spacebar menu (Space).
Type in "Intersect (Boolean)" and confirm.

Thank you very much for the detailed description. It worked way better than what I did before.
Oh, and it solved my problem :)
I've been trying for five hours today to find a solution or workaround. Thanks!


text:
Location vector turning into degree vector
I am making a node group that has an input coming from the location vector section of a mapping node shown below.

However, the actual input for the node group shows up as degrees.

This causes my shader output to be messed up. I double-checked everything, and when I unplug the location from the input and just enter it manually in the node tree, it works perfectly fine and my shader shows up correctly. Is there something really obvious I'm missing, or is there a workaround?

What version of Blender are you using?  The current Dynamic Sky addon in 2.93 does not have a World Location option

I am making a custom Dynamic Sky node group that will better fit the work I do.

perhaps you could share a screenshot of that group?

Welp, that's embarrassing. I just disconnected the node line for location and plugged it into a new input for the node group, and it fixed the problem.

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


text:
Particle distribution and material looks different in viewport compared to render
I'm working on a project with a long row of buildings. The buildings are distributed with a hair particle system on an array of planes. All the buildings are one material, with an object info node plugged into a noise texture going into a constant color ramp to determine the color of the buildings.

However, the buildings look like this in the viewport:

And like this in the render:

Not only are the colors different, but so are the building types. There aren't any children in the particle system.
This is my modifier stack for the particle system:

How do I fix this? Is this an inherent property of the particle system, or am I messing something up? Do I have to use something like geometry nodes? Thanks!
UPDATE: I seemed to have fixed it, kind of. This is my outliner:

I tried a lot of random things, but it seems that checking the collection group and then unchecking it fixed the issue (I tried other things like making the collection viewable or hidden in the render, both of which changed the render house order/color). However, the colors are now completely different, but at least they are synched between the viewport and render.
Blend-Exchange seems to be down: https://drive.google.com/file/d/1icrzSHqaWQJxqwB28QpAagWLL4cbvj69/view?usp=sharing

Do you have any modifiers or settings where they have different values for Viewport and Render?

@Kuboå Nope, I just checked. I also don't think that this is a result of a modifier, I'm not sure how a modifier would change the building type and color.

If you have a Subdivision Surface modifier with differing Viewport/Render values on a mesh you have a particle system on, for instance, you'd get different amount of faces, which means different indices and different distribution/instancing results.

@Kuboå I do have a subsurf modifier on the particle system mesh, but the values for viewport and render are the same. Even when I turn off the subsurf modifier, the same thing happens.

Originally, I had all the buildings in separate collections, all disabled. I enabled the buildings, and had to set them to enabled in renders as well. I moved the buildings out of frame (so there's a clump of intersecting buildings off-camera), and the buildings are now correct in the render. However, the material is still incorrect. Really unsure about what's going on.

And now if I don't show the DISABLED collection in the render, it doesn't render the houses anymore?!? And the materials match up now somehow, even though all I've done is uncheck a box on and off.

please provide blend file so we can check it out. But i would agree with Kuboa - you have made something different for render + viewport

You need to disable the library collection for render, not the individual objects inside it. Please post a screenshot of your outliner

@Chris I've been trying to, but blend-exchange keeps saying that "there was an internal error attempting to complete your request."

@EdwardWang: i know - it seems to have problems. just use another cloud service like dropbox or whatever

@Chris updated post and also added file link

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


text:
Uv unrapping an incredibly complex shape
Firstly, I know that there are several other questions on here that are something like "how do I unwrap a complex shape" and its something they modelled with a couple hundred edges, but to be honest... the complexity I'm dealing with is on a whole different level and I need help:
I have this:

They're tracts from a brain found in an MRI.
The file was a .ply with per-vertex color in it.  I'm trying to uv unwrap and bake the colors so that I can export the file as an .obj with a material file so that my 3d printer software (which can handle several thousand colors, its a fancy printer) can print it (there's still other problems with the file prior to printing but that's a different question for here)
I know the basics of how to UV unwrapping and baking and have done so with this object several times, but every iteration kinda looks like this:

I.e. the colors end up in totally different spots and sometimes they look like they were kinda spray painted onto the object.
So my question specifically is:  what options/settings would you use when UV unwrapping to duplicate the colors as precisely as possible?
EDIT:
Per requested, wireframe images:

I don't think I'll be able to help you much, but I think if you add a screenshot of the wireframe it might give some insight.
Also if you share your blend file someone might take a look directly.

@AlexandreMarcati  Will do.  I forget, what's the official way to share blend files on here again?  I could just provide a onedrive link or something if necessary.  Will edit question to include wireframe in one sec

You can use https://blend-exchange.com/ to upload your blend file.

Have you tried just selecting all edges and marking them all as seams and then unwrapping and then baking? Have you tried baking a simple object first to see if you understand the baking process correctly? Have you tried increasing the resolution of your target texture for baking?

Consider that you have to clean up your geometry in the first place (removing all intersecting/inner geometry and fuse each part into one final piece) otherwise it isn't worth it to unwrap the model at all. Hard to give any advice based on the provided screenshots... at a first glance it looks like your UVs are a mess.

I'm not totally sure this is the way to do this, correct me if I'm wrong, but since you already have the objects textured, what you could do is

create a new UV map
unwrap your object whichever way you prefer to do it on the newly created UV map
you can bake the textures to the second UV

I'm sorry if my question wasn't clear... but step 2 in your answer is the problem.  I can unwrap and bake it, but none of them are being accurate.  I need help figuring out the "whichever way you prefer to do it" part in order to make it accurate enough.


text:
Exporting modular objects to Substance Painter for baking
I do want to create modular assets within Blender which I use to assemble the full model. I want to bake the high poly version onto the low poly version. It does work for the modular assets alone like this in substance painter:

But I do enjoy seeing the fully assembled asset in Substance Paitner, as it makes painting much easier. But if I export a copy (or several) of the modular assets (*as fbx), baking does not work any more. Here with a simple wall out of the stone.
Blender:

Result in Substance Painter:

I can bake the modular assets first and then import the modular assets with the assembled version. This does work, but it feels like it's a kinda hacky workflow. This is the result (with my baking information):

How can I export my modular assets together with the finished asset and bake it in Substance Painter?

It did work, when I moved all the UVs of the assembled asset by 1 to the right.


text:
My object is missing when i turn on alpha
I have my camera set up to render my object with a transparent background in PNG format. But when i enable transparency, I get nothing rendered other than an empty PNG.
These are my settings for blender render shown in the image attached (may need to open image in another tab to see it larger):
Also as a side note, is there such an option in cycles render, as I could never find the option to render with transparent background so had to resort to blender render.

I assume that you didn't link the Composit node in Node Editor, however, a blend file is very helpful here, to quickly target it. You can try to upload it here

@LeonCheung http://www.pasteall.org/blend/33575 here you go. Warning it won't have good performance on poor PC specs.

According to your file, the problem is you are trying to use Cycles material node as BI material node, which cannot happen.

Solution:

Switch the Render engine from Blender Render to Cycles;
If you want to render it in Blender Render (BI), you have to either toggle off the Use Node button, or create a new material node readable for BI.

I assume the first one is your better option, since it seems you sort of mis-switched the engine at some point (or the material node is appended from anywhere else).

So which is better quality between the two types of renders?

Cycles by far. Actually, I'm not allowed to voice my opinion (curses!) but Cycles generally has more solid and realistic images.


text:
Using Spin causes rotation
I am using spin on extruded faces but for some reason it twists as it rotates.
This is what i have before i press spin:

So when i press spin i get this result:

Why does this twisting happen? I am using a mirror modifier don't know if that matters but if so the settings for it are:
Axis X and Z ticked.
Options:
Merge & Vertex ticked.
I was hoping it wouldn't twist but would just do a nice curve so the faces were facing outwards.
Am i misunderstanding how Spin works with the cursor?

The Spin operator is view based as such it is view point dependent. Align your view with the direction you want to revolve around. The view's Z axis (viewing direction) will be used as rotation axis

Yes, you are misunderstanding how Spin works. Spin takes your selection and does a spin extrusion about the 3D Cursor, from the current perspective of the 3D Viewport.
Here's a screen shot to illustrate:

If you want your spin extrusion to be in alignment with a specific axis, align your 3D Viewport accordingly and enter Orthographic View before executing the Spin.


text:
How to reverse animate?
For example when I record a rig walking and then I'd like to make it walk backward so how can I do that without much effort

See: How do I animate time?

Note that most natural walk cycles are not identical or 'flipped' forwards/backwards.  For a quick thing this'll probably work fine, though.

Or for a starting movement that can be later tweaked.

You can flip the animation around by actually inverting your animation data in your animation editor.

Go to your dope sheet editor.
Set the current frame to the beginning of the animation (probably frame one)
Select the frames you want to reverse. Press S and type -1
Move the inverted animation back to where it is supposed to be positioned (using G)
Play back the animation!

When you're scaling the frames by negative one, you are really just reversing the animation. Similar to turning a shirt inside-out.

This is great! I've never tried that before. I just noticed too that the cursor line acts as the zero if you scale and drag.

Yes, by default all keyframes will scale around the cursor.

thank you. I've been trying to do this in many ways.

If you don't want to reverse F-Curve key-frames, the NLA editor has a reverse option you can enable non-destructively per-strip. The NLA editor allows you to work with your animations in a non-linear manner; this allows you to repeat, scale, and reverse them, among other things.
In the NLA editor, press N to open the sidebar, then enable Reversed in Active Strip → Playback Settings.

Another way to do this is to render your animation, then go to the video sequence editor. Add your rendered images or movie, press N and go to the options in the filter section and check the option to play the active clip backwards. Go back to VSE press control F12 (to sequence render, again), with the backwards box checked and this will render your animation in reverse.

Since I can't comment on Lindsay's answer (which is excellent): In Blender VSE the option to reverse the clip is now in the N-panel under Strip > Video > Reverse Frames in Blender 4.0.2.


text:
No light sources but object illuminated
My set has no light sources and no environment maps, resulting in black background - however, the objects are still illuminated. Have I enabled some obscure setting by mistake?
PS. This is in Cycles. When switched to Eevee, everything is back as expected.

in Properties > World, are you sure all options are disabled in Ray Visibility? Also, is Ambient Occlusion disabled?

Oh no, it was Ambient Occlusion. So ambient occlusion does not multiply colour with the shader output? Ie. if the raytraced object is dark, why does AO illuminate it?

Your problem is that you've enabled Ambient Occlusion. Ambient Occlusion is a fake light that was mostly used in Blender Render to improve the shadows. I'm not sure it's still very useful with 2.8 except maybe for some effects like baking shadows...
Vader explanation here. Manual explanation here.


text:
Blender motion blur too long
I don't like how long the trail of this motion blur is. I know the curves can be manipulated, but I'm thinking I need something that just changes how long the blur lasts.
Question 1: Is this a situation where I should adjust the shutter, and if so, what would be the best value? Animation is set for 24fps.
Question 2: Should I avoid motion blur entirely, and what is the most appropriate setting for a slow motion glass shattering scene?
Thanks!

Edit: After lowering my shutter to the correct setting (thank you @cegaton), another issue occurred, as mentioned in comments.


text:
Noise on glass in cycles
I cannot get rid of noise/fireflies in my glass shattering scene, rendering with cycles. I've tried all of the following suggestions:

Increasing Samples (up to 4000, still tons of noise)
Filter Glossy (from .5 to 20, still no fix)
Increasing Clamp (to 5)
Increasing light source (emissions doubled, still tons of noise)
Denoising (from .25 to 1, it works but makes the image too blurry)
Caustics (turned off and on, makes no difference)
Light Path Bounce min/max equal (both set to 8, that helped but did not fix)
Multiple Importance Sampling (turned on for all tests)

Is it possible I really need to go up to 10k samples? Or, maybe there is something wrong with my glass texture, which is just "Glass BSDF" with Roughness at .1 and IOR at 1.45?
EDIT: Everything follows almost exactly a tutorial by Blender Guru found here
Here are my renders:

EDIT: Here's the render without the emission planes and with on sun light source instead. Any ideas?

You have a ton of emission planes. Mesh lights make noise worse. Can you either replace some of them with area lamps, or merge multiple planes into one large plane?

Thanks, glass texture is just "Glass BSDF" preset. I added the tutorial I'm following in my edit. Also, I should mention this render crashes my 2017 iMac every single time. (Memory: 32 GB 2400 MHz DDR4 | Graphics: Radeon Pro 580 8 GB | Processor: 3.8 GHz Intel Core i5)

I went with the following settings, which seemed to do the trick.

Removed the emission planes and replaced with a sun light source
Changed the color management to "Filmic" since that is supposed to be better with dynamic range
Used denoising to eliminate most of the grainy look
Increased the resolution of my animation to 1080p (not sure if that made a difference, but it looks better to me)

If you want better quality of your renders, get rid of the emission textured objects and go for the lamps. They give off less noise, and make the render look much more better than before. I'm currently making a little animation that features a cup of coffee with steam, and features a painting, sofa, and a glass coffee table the cup is sitting on. I had noticed that with these emission materials, they give the glass and glossy materials a horrid shine, and will normally result in grainy looking objects. NOT GOOD! I would strongly recommend that you use the Lamp, Spotlight, or the Area lamps, as they are pretty easy to control and have a better and easier to use lighting (the sun is odd, as it lights up the WHOLE scene instead of a single area, which makes it only useful for outdoor scenes, in my opinion). For your particular project, I would probably use area lamps, as they would be a good substitute for the planes in the background. This lamp makes little noise, and is much more better in the use of lighting. As you can see bellow, there is no comparison in how different the renders look:

See? Looks super rushed and really fake. I must say, that noise in blender is one of the most annoying things to work around, as you need to put soooo much more effort in to ensure that your projects look professional. Now, lets try doing a simple render with the emission planes switched with area lamps...

Now, as you may see, the glass looks 20X better! (sadly mine has a reflection but I'm not too worried about it at this time) This is with the area lamps, which give the room more better look. The glass no longer has light specks, and the room has a nicer feeling to it, and does look much better compared to before. I hope this helps with figuring out how to fine-tune the lighting to your needs. I think that once you do this simple change with the lighting, your project will look amazing! Hope this helps you out, and that you can make a super cool looking render in the end.
-Cody :D

Its true that emission can be problematic, but there are other this that can work in some cases as well, worth reading through https://blender.stackexchange.com/questions/8152/what-is-multiple-importance-sample-option

First time using this website because I had the same issue with a glass ball I made, it was super noisy. I fixed it by selecting it, going to materials, then settings, then changing the blend mode from Alpha Hashed (Which I think is the default) and changed it to Alpha Blend which made it have slight reflections but totally see-through just like actual glass! (After having a transparent and glass shader applied :D
-P.S. I know this was about three years ago but I'm adding this in case it can help any other future Blender creator :D
-JRockThumper :D


text:
Boolean creates a hollow object
I am trying to carve out some wear lines on a bullet, from where the barrel of a gun would cut into the metal. I am using a boolean modifier on the bullet, set to difference.
It cuts into the object ok, with the striations / wear lines in the right place, but the bullet is now hollow inside. Is there a better method to achieve something like this?

EDIT: Hollow effect appears when boolean object is close to flat end of bullet.

Have you tried the carve method? Have you tried making the subtraction geometry manifold?

Couldn't reproduce

Edit above. I checked the bullet and it should be manifold. For the sake of simplicity, I removed the previous boolean object and replaced with a simple torus. It looks like the issue appears when I scale the torus along the Z axis.

Actually, it appears when it gets close to the flat end of the bullet. Any idea why?

I meant the subtraction geometry. It looks as if there could be some non manifold intersection due to the noisy displacement. Upload your file then someone can find a suiting solution.

Related https://blender.stackexchange.com/questions/50252/can-i-fill-an-empty-object

Ok, it turned out to be an issue with the original object being non-manifold on the example I posted.
When I replaced it with a simple torus (which was manifold) the error occurred again because there was accidentally an edge split modifier as well. When I moved boolean above the edge split, in the modifier panel, the hollow look disappeared.


text:
How can I make a kind of napkin (twirl, pleating, vortex) whirl kind of extrude effect?
At its simplest it's like twirling a napkin or piece of paper from the center where alternate edges rise.
If a picture's worth 1000 words, this kind of effect:

There's already a flat spiral example here:
How can I make a flat, spiralled surface?
As I'm envisioning it, for example, the red twirls would be raised.
I've seen comparable examples on cylinders, but not on surfaces (square or circular) - like a pleated dress for example, or a curly cone, but not a flat surface.
Is that enough info?
Tried simple deform and proportional editing, but I keep missing the mark.  Maybe they're key to the result or not.

At its simplest, this is a selection problem.

Create mesh Circle, 'Triangle-Fan', with an even number of segments, in XY.
Select the central vertex, and CtrlShiftB - drag Bevel it, to make all faces quads.
CtrlR cut in some subdivisions of the radial edges, as below.

Using O, Proportional Editing, select the central face, and RZ rotate it, which should drag all the other vertices in the radius of your prop. edit into a spiral.
Select 2 sections of radial edges, in the same ring, 1 edge apart, as just visible in the central image, below.
CtrlShiftNumpad + Select Next Active, to select every other radial edge in 1 ring.
Header Menu > Select > Select Loops > Select Edge Loops to select every other radial edge, as show in the last picture, below.

Now you can GZ, RZ.. raise, tuck the pleats.

If you wanted to, using a similar selection method to the one used for the spokes, you could select every other edge-ring, to delete those. Or, think ahead, and delete them before all the twisting, etc.
The finished example, here, has a Solidify and Bevel modifier.

"Select 2 spoke sections at the same radius, 1 spoke apart" is confusing to me, please clarify.

This method works with the example, but, doesn't seem to work as well with a less circular shape like a square, polygon, or hexagon.  I know that's not what I asked for.

Ctrl-Shift-B doesn't seem to work for me.  I must be doing something wrong. I get a gloopy mess.  Doesn't matter whether I choose percent, width, offset, any of the options - same result.

Found this that helped with "Ctrl-Shift-B:  https://blender.stackexchange.com/questions/39512/how-to-divide-a-circle-into-slices-for-each-side

Under O rotate the central face is also confusing.  There's no explicit "rotate the central face" option.

I got to what you had in mind by selecting the center vertex, extending rotation to the whole object and rotating the z-axis - double tap.  Probably useful to remember to turn off proportional editing before G-Z, R-Z the edges.

What worked for me:

Create mesh Circle, ‘Triangle-Fan’, Default 32

Ctrl Shift B Instead I used:

Circle select all the edges, Esc out of Circle select and W - Subdivide max, (10) twice

Use O to turn on proportional editing

Select the Central Vertex
R to rotate, scroll  (wheel on the mouse) to select the whole cirlce, Double tap Z to rotate
Select Alternate edges, I used Shift-Alt to select each in turn
Then G-Z, R-Z to rais and rotate
(Extra:  E, Edge Crease -1, Bevel Edges: .03, 3 segments, then smooth corrective and subdivide)
Think that's everything.

When I typed that all in it was a lot cleaner.  StackExchange limitations - my apologies.

My Blend file - more legible instructions included:  https://pasteall.org/blend/2faf4c58695d4f8ca4f3f3cd20d760bf
Good for 6 months. (Pasteall rules)

Hi @unkerjay! Phew!  Had to be AFK... I'm sorry I'm being so unclear.. do you have editing privileges? If so, feel free.. I can't really answer all this in the comments.. I'll take what I can from your .blend

I've tried to improve it, a bit.

As with all things Blender, there's more than one way to do it.  I'm just applying what I've learned.  You provided the template.  So, thanks.

I would try it like this:

create a circle, use twice as many points you will need and then press F3 and find "checker" use this option, it will deselect every second vert

Then you can use E and S to extrude it to middle

Next you want to subdivide your edges as much as possible
Now use proportional editing , select middle vertices and rotate it around Z axis to make spiral:

and now you want to Extrude all vertices you want to be solid like in picture, extrude with E and rotate around Z axis till you get your shape... After that it is only about rotating and moving vertices... I ended up with this and I think it is usable:

Yours is easier to follow and I think, simple, but Robin's is closer to spot on to the example.


text:
OSL: Can I use a closure as an input to an OSL script?
I'm experimenting with NPR materials in Cycles, in particular, half-toning and hatching. In order to make things work, I often have to bake the output of a Cycles shader to a texture map and, in a second session/pass, multiply the colors in that map with a halftone screen, put the result through a threshold, etc., and feed the result back into say, an emission shader, to render the result.
Would it be possible to write an OSL shader that would accept a closure color as input (like the Cycles 'Mix Shader' node) so I can use the output of, say, a Diffuse BSDF node as the input for further calculations? (so as not have to bake it first?) I've seen OSL scripts which contain the grammar for this, but I've never seen it used.
At least, for example, it would be nice to be able to combine the outputs of Cycles closures in other ways than the factored mix provided by the 'Mix Shader' node. Maybe multiply, subtract, and all those other modes.
Being an OSL baby, I'm afraid I might be getting the shading logic all wrong- I don't understand why I haven't seen this done in any of the OSL scripts I've seen - even if it worked, would it be an abuse of the rendering system?

When OSL is enabled in Blender all shaders are compiled using OSL.
Therefore the Add Shader and Mix Shader are very good examples of what you are looking for.
The next script is the implementation of the Mix Shader node used in Blender 1.
shader node_mix_closure(
    float Fac = 0.5,
    closure color Closure1 = 0,
    closure color Closure2 = 0,
    output closure color Closure = 0)
{
    float t = clamp(Fac, 0.0, 1.0);
    Closure = (1.0 - t) * Closure1 + t * Closure2;
}

BTW I don't see it as abuse of the render system but still be aware that OSL will not allow you to do many operations on a closure

At present, the only type of closure supported by Open Shading
  Language is the closure color, and the only allowed operations are
  those that let you form a linear combination of closure color’s.
  Additional closure types and operations are reserved for future use.

- closure color:  unary negation
color * closure color: component-wise scaling
closure color * color: component-wise scaling
float * closure color: scaling
closure color * float: scaling
closure color + closure color: component-wise addition

Other operations are not supported. and that said there is just a little room left of things to do, what cannot be done by a set of Add Shader and Mix Shader

..and thanks for the link: now I know where to  have a root around.


text:
Bmesh : how do I keep track of vertices in edited topology?
I'm trying to write a script to bisect Ngon rectangles, horizontally or vertically, at a given percentage of the distance along their sides. (The sides may consist of more than one edge).
Some of the script involves finding the right edges to cut, and moving the new vertices to the right place, but I hope this is a minimal expression of my problem:
ob = bpy.context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)

bm.edges.ensure_lookup_table()

e1 = bm.edges[4]
e2 = bm.edges[3]

ret = bmesh.ops.subdivide_edges(bm, edges=[e1], cuts=1)
v1 = ret['geom_inner'][0]

ret = bmesh.ops.subdivide_edges(bm, edges=[e2], cuts=1)
v2 = ret['geom_inner'][0]

bmesh.ops.connect_verts(bm, verts=[v1,v2])

bm.to_mesh(me)
me.update()

bm.free()

(Here, I've hard-coded the edge selections)
The  bmesh.ops.connect_verts(bm,verts = [v1,v2]) generates an error: '..BMVert has been removed..', which is perhaps understandable, but how would I keep track of v1,the vertex generated by the first cut? If I run this snippet without the connect, the vertices appear just fine in the updated mesh, so they are there, somewhere.

I'm in 2.79
The mesh starts in Object Mode (does that make a difference?)

Consider doing both at once ret = bmesh.ops.subdivide_edges(bm, edges=[e1, e2], cuts=1)

@batFINGER Thanks very much, that works, and makes the new edge... I'm  still confused, in general, about how to keep the database in good nick while you're fiddling with its entries.. but maybe just carry on.. i'm used to learning things in a more abstract, systematic way ..

Tag the verts.
As mentioned in the comments could be done via
bmesh.ops.subdivide_edges(bm, edges=[e1, e2], cuts=1)

in one fell swoop.
When an operator creates new geometry there is a chance any old geom becomes invalid. However the data of the old will match the new, in which case can use the tag or select attribute to advantage.
Make sure to ignore the invalids with How to remove dead BMVerts from a list?
Test script. In edit mode to see what is going on.. Will work same in object mode
import bpy
import bmesh
ob = bpy.context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)

bm.edges.ensure_lookup_table()

e1 = bm.edges[0]
e2 = bm.edges[2]

ret = bmesh.ops.subdivide_edges(bm, edges=[e1], cuts=1)
v1 = ret['geom_inner'][0]
v1.tag = True
ret = bmesh.ops.subdivide_edges(bm, edges=[e2], cuts=1)
v2 = ret['geom_inner'][0]
v2.tag = True

bmesh.ops.connect_verts(bm,
        verts=[v for v in bm.verts if v.tag and v.is_valid])

bmesh.update_edit_mesh(me)
me.update()

Note  in 2.80 a mesh can be in edit mode in one view, object in another.
On a formatting side, in argument list, space after a comma, none around equals.

This is a great help.. not just for doing this job, but as an aid to learning the system.. seeing what's going on. Greatly appreciated.

Always a pleasure @RobinBetts


text:
Audio is 1 frame off
I am experiencing a very strange behavior and I just cant explain whats happening.
Setup: I have a video shot with a GOPRO at 59.95 fps. I want to use in a 29.97 fps environment inside blender, so I use ffmpeg to change the fps value.
Problem: When I import 29.97 video, the audio and video are off by 1 frame. Specifically, the audio is one frame longer than the video. I would like to have the audio and video to have the same==identical length.
What have I done so far: Now comes the funny part. So when I import the 29.97 fps video, the audio is one frame longer, as described above. However, the actual audio information is indeed a little shorter than the video. So I split up the audio and video, encoded the video separately and then joined the two parts together. That did not change a thing. However, when I just import the audio file, then the resulting strip is actually 1 frame shorter than the video! Both audio strips (from the video and the single one) line up perfectly in regards of their waveform, so there is only a difference in the padding at the end of the file.
BTW: The audio part from the original 59.94 video would line up perfectly with the encoded 29.97 video. But that would be too complicated to always import two videos and then combine audio and video...
Question: Has anyone ever experienced such a thing? I believe the way blender determines the audio length (in number of frames) maybe does something wrong.
Thanks for your help.
ffmpeg 59.94 to 29.94
ffmpeg -i GOPR7304-59.94fps.MP4 -y -probesize 5000000 -s 640x368 -c:v prores -profile:v 0 -qscale:v 13 -vendor ap10 -pix_fmt yuv422p10le -acodec copy -r 30000/1001 GOPR7304-29.97.mov

ffmpeg splitting
ffmpeg -i GOPR7304-59.94fps.MP4 -map 0:0 -vcodec copy 04.m4v -map 0:1 -acodec copy 04.m4a

Thanks!

Related: http://blender.stackexchange.com/a/49219/2843 (using AviSynth before importing your footage into Blender will allow you for precise fps rates)

Thanks for the comment. I will have a look at this. However, I still think the error lies within blender, specifically in how blender calculates the length of an audio strip. How is it possible, that the identical audio stream is represented in different lengths inside blender (one coming from a video file, the other from a single audio file) ?

Related: Bug report https://developer.blender.org/T21138 Still I think this is a real bug, I might open a new bug report.

Might it be an unwanted side effect of https://developer.blender.org/T47135? You are using 2.77? Is it the same problem in an older version?

So i tried importing the same files into 2.76b and indee I observe a different bevavior as such, that all different strips are all 1 frame shorter than in 2.77, but still different in length. My 29.97 video file now comes out correct, but it still bothers me, that the identical audio stream leads to different strip lengths. When I use ffprobe, the audio stream will aways show the identical length, no matter if its embedded in a video or not. How can I retrace how blender determines the length of an audio stream?

The sound file in question is about 32s long. I used audacity to shorten the sound to about 20s and then joined the resulting audiofile with my video. When importing to blender, the sound strip shows the same length as the original one. So Blender actually uses the length of the video or some meta stream (in frames / fps) to predict the length of the audio stream and does not use the actual audio length information. This in conjunction with link leads to  inconsistent audio strip lengths. Can someone confirm?

I'm voting to close this question as off-topic because it doesn't appear to be caused by Blender.

The audio strip of an imported video does not represent the actual audio length. imho this is indeed blender. I'll file a bug report within the next days.


text:
How to set off background color reflection?
I'm very new to blender. I animated this model:

I want to use this animation in a video. I use chroma key to take away the background but it's impossible to do this when the green color from the background reflects on the door(see image). I did change the Environment and Indirect lighting but it did'nt help. I tried many things but nothing worked. Can someone help me out?
EDIT
I'm in blender render mode.

If you wan't to use a video format that doesn't support alpha, you can also render out a black and white matte.

You Don't have to use chroma,You can just render the video in alpha channel.
Cycles:

To do so,You just have to check transparent  film panel:

This will render the background as Alpha but the reflections will be still here.
To remove the colored reflection,Uncheck use Environment in render layer:

Blender Internal:

You just have to Uncheck Sky in render layers:

Thank you, but is it possible too in "blender-render"?

Sorry, I did already: same result

You did the process under the blender Internal?Can you add another screenshot after the Sky checked?

-1 This doesn't actually answer the asked question. Adding alternate suggestions for a better method to achieve an end result is okay; however, answering the actual question is also important, since other people may read this question and still want to achieve, for different reasons, what the question originally asked to do.

@GiantCowFilms I answered the question without any alternatives,he never said anything about file format,Most of us probably render a PNG image sequence not a video anyway.

@cegaton yes, but the original request result should still be achived, which was not.

@OmarAhmad, the question asked how to create a colored background without having the color appear in reflections. He implied a particular use for that, but still, the question was not about rendering transparent backgrounds.

@GiantCowFilms when you disable sky in the render layers everything that is related to it is one including reflections,same in cycles when you disable environment the refection wont be here,So I pretty much answered his question.

@OmarAhmad But the background is black, not green.

@GiantCowFilms It is alpha not black,he car alpha over a green color easily,I don't think it is a problem.

@GiantCowFilms and Omar Ahmed: Anyway, this answer was'nt the solution for me but it was a good answer. I can't input transparent video's in to my video editing program. I let this rest for a few days and two days ago I found my solution, to do it with the compositor.

For anyone who still sees this in Blender 2.8: go to Materials -> Surface and there you can set the strength to "Is Camera Ray".

I believe what you are trying can be accomplished by turning off everything except Camera in the ray visibility window in the world menu.


text:
Is Python Capable of Creating Thousands of Unique Renders with Similar Subject?
Programming Question
I've been using Blender for several years now but I have little to no experience in programming python. I'm managing a project to create 10,000 unique images with a similar base between all. The images will feature a similar subject such as a robot but each image will feature different props such as hats, body color, background etc...
There will be 5 sets of props, each containing 10 unique units. For example 10 unique hats, 10 unique backgrounds etc...
I'm asking for advise from experienced scripters if there's a way to create a program to do the following:
Automatically display 1 prop from each set in an instance, render and save the image (eevee would be fine), display a new permutation, render & save, and repeat to create 10,000 unique images (thus without repeating any combination of props from the sets).

Short answer is, Yes.

10^5 is 100,000, not 10,000 fyi :) you might be interested in the python itertools module for figuring out the permutations

Appreciate it haha. This is why I'm not the dev lol. I appreciate any and all tips.

Agree with batFINGER. Recommend edit your question and add any real world example to test, ideally a blend.

Not only is it possible, I dare to say it's easy, and with low output resolution and sample size ("Eevee would be fine") the script probably can do all the work in a single day (for 10 000 renders) or a week (for 100 000 renders)

I don't know if this will help. But....
I am writing a tool where I read info from a .csv file. Then I use that info to create geometry. As part of the creation stage, I create a collection for everything that I want to render.
Then I create a render layer for each collection, and I automate the activation/deactivation of each collection for each render layer.
This gives me a bunch of render layers, that I can then render out using F12.
Your question isn't specific enough, but I'm fairly sure you can do what you want to do. But you'll most likely have to load everything you need into the scene, and then activate/deactivate whatever you need to render at any given time.


text:
Motion tracking is oriented incorrectly; no depth
I took a quick video on my iPhone 4, and tracked it in Blender. It appears to have tracked quite well. Note that I have some tracks in the foreground and some in the background:

However, after solving, Blender seems to think that all the tracks are basically planar, at a roughly fixed distance from the camera:

I used the tripod solve mode, because the camera isn't moving (just panning/rolling) in the shot, as suggested here. Is this correct?
I did select the "iPhone 4" preset, but I didn't change any of the other settings.
What can I do to get the scene to be tracked correctly?

Video file: Dropbox link.
Blend file (not packed; video not included): PasteAll link.

@cegaton Hmm…I hadn't noticed that, but it looks like you're right. Do you know any workarounds? (I tried without tripod solve and it's really jumpy.)

@cegaton I tried setting Origin and X–Y axes, but it didn't turn out quite right (at an odd angle, and I'm going to be doing simulations, so that won't work). I also tried to use Floor, but the floor was placed perpendicular to how it should be, because the tracks aren't correctly solved.

@cegaton Thanks very much! It didn't occur to me that you could reposition the camera even though it has the Camera Solver constraint. So the key, then, is that the Camera Solver constraint is relative, not absolute? (If you post an answer I'll accept it.)


text:
issue after changing the color of the UV image with photoshop
I am using texture paint and I have used different photos to do so, and the color of the skin is slightly different (in the green circles):
To correct this problem I have open the UV image in photoshop and use the split frequency technique to have one picture in greytone which corresponds to the detail (also know as high pass filter in photoshop) (here is a sample)
and then uniformed the color as you can see
Every thing work fine up to this point but when i import the modified UV image I get this strange result:
(the line matches with the wire frame).
Does someone knows how to fix it? or how to make a split frequency to get something similar to the high pass filter in photoshop but with the node editor?

On your 3rd image you can see that on each polygon border on your UV layout the color are brighter, this probably happened in Photoshop for some reasons. This is what causing the wireframe pattern on your last image.
To do the same thing in the node editor you should use a Color Ramp node, which will convert your RGB image to a grayscale image. Then you can control your skin color with a RGB node.


text:
why colour cannot be applied to faces

I am applying colour to the object.
When doing the brush on the left leg, the colour only appears on any faces at the rear of the leg that are in line of fire of brush.
This has only happened on this model. I edited the mesh using a copy of right leg mirrored. Why is the paint going through the one front face and painting the one behind it?
An image or sample material as the link source on the unwrapped template is mapped as it should be.

Your question isn't clear. I can only assume that what you don't expect is in this line "left leg faces have the colour appearing, sort of mess, on the opposite leg faces" but it's not clear how can color be on left leg faces while being on the opposite leg faces, it's like Mobius strip from description. When mirroring note that UV coordinates will be mirrored as well and might overlap original ones which will mean painting as well. Aside from that rephrase and clarify your question.

Can you edit your question and post a screenshot which uses a generated color grid texture instead of the one you're currently using? This will help us see if something went wrong with UV-unwrapping. Also, you should expect odd things after just a few hours of using blender; you can't possibly understand how the software works at this point.


text:
Adjusting the proportional editing falloff curve continuously
I'm a fresh noob Blender user who has learned to love the proportional editing tool. I've mostly benefitted of the 'sharp' falloff shape but at times hoped I could adjust the falloff curve somewhere between, say, linear and sharp (like the shape with the bevel tool). In fact, to me this feature seems so powerful and obvious that I've began to hope there would already be an addon to make it happen but have had no luck finding one. Maybe all you smart people here can help me with this.
Also, I'm a bit familiar with scripting and node based stuff on other environments so I have no problem with getting my hands dirty with either if it would allow to implement the described functionality.

Isn’t there a custom falloff option?

I sure hope so, but haven't been able to spot one. Maybe you would!


text:
flipfluid side of the fluid not showing up
I'm trying to do waves, I experimented a lot with parameters whether I didn't know exactly  each was doing, after 1 week just lost the side of the fluid, I don't know what did I do wrong to make that happen.I can'T see then my fluid like I was underwater neither. any help on this one please?

pls provide blend file because you didn't provide any useful information as parameters/settings etc

sorry , I posted  more infos thanks

From the screenshot of the settings, it looks like the FLIP Fluid Surface > Remove Mesh Near Boundary option is what is causing the issue. When this option is enabled, the simulator will remove the sides of the liquid mesh that are touching the domain boundary.
To fix the issue, disable this option and re-bake the simulation.
Hope this info helps!

ooooh , that's it, I didnt even notice I checked this parameter, thank you so much , looks obvious  now, thank you for helping!


text:
randomize multiple materials to different objects
I found  a nice tutorial
https://www.youtube.com/watch?v=I6o3Dq6bkn8&list=PL8iHMWPijQzs7RqTZDcXx7mtjMMTKk5es&index=116&ab_channel=Blender
this is to randomise material according a prefix name  , so you can take a several materials starting with the same prefix  and  apply  them randomly to several meshes.
how could I apply this script  if each mesh use a different prefix.
if I have 2 objects and I want to randomise 1 with a prefix  and randomise the second one with another prefix in the same script.
I don't know anything about python
import random
import bpy

prefix = '_'

materials = []
for mat in bpy.data.materials:
     if mat.name.startswith(prefix):
         materials.append(mat)

for obj in bpy.context.selected_objects:
     obj.active_material = random.choice(materials)

here is the python script  on the youtube tutorial
If anyone has a solution , that ll be great

You could create a list of prefixes and use a loop to check against them all.  (There are other ways but this is easy to explain.)  Here's your loop modified:
import random
import bpy

prefixes = ['_', '.']

materials = []
for mat in bpy.data.materials:
    for prefix in prefixes:
         if mat.name.startswith(prefix):
             materials.append(mat)

for obj in bpy.context.selected_objects:
     obj.active_material = random.choice(materials)

You can have as many prefixes in the list on the 4th line as you'd like. You just have to make sure each one is unique.
I used a period in my example.  Replace it with whatever you want for your second prefix.

Thanks! it works great  with material with different prefixes to use them randomly,  actually I try for exemple having materials on prefix A and materials on prefix B, to assign one object the A and the other object the B only, here it's mixing both, may be  my question wasnt clear enough, sorry

No need to apologize. Perhaps I didn't understand the question.  Do you mean you want two lists, one for object A and the other for object B based on prefixes?  So any material that starts '_' could be used for the first object, and any material that starts '.' could be used for the second?

exactly, to be more clear and explain the idea behind this, I want to swap some haircut , so A would be for hairstyle bottom head , and  B tophead. That would use the materials  with prefixes.  , but I don't want to  play 2 scripts  for each plane just one, so it combines randomly different haircut. may be I,m getting too specific, but i think a sketch could be better than words , here is a link https://imgur.com/YkeIpEI


text:
sound control smoke particle

I try to create a music, and I would like to do  a simple animation , just a black background with some smoke on the front that would be animated  following the sound of the track, I have no idea how I can achieve this, but I know this community is huge and I hope someone can give me a clue with something I can start with, thank you :)

There are tons of tutorials on YouTube for this... search for "Audio React" and you will find plenty of step by step info.

This is a great Youtube tutorial on using the 'bake sound to f-curves' to drive animation, starting with very basic movements based on the sound graph to being able to control different parts of animation based on different stems of audio. It uses Blender v2.79 but I recently followed along using v2.82 and it is still very comprehendible.


text:
2.8 Cursor Orientation
Since the interface to 2.8 is now frozen, I think this is a fair question?
In previous demonstrations and answers concerning the behavior of the cursor in Blender 2.8 I have seen the option (by dragging with the 'Cursor' tool selected,) to set the location and orientation of the 3D Cursor to the face beneath it in  the 3D view, independently of the snapping system.
I've also seen the creation of new objects aligned to the orientation of the 3D cursor, rather than the world, or the view. Try as I might, I can't find a way to reproduce this behavior in my fairly recent build of 2.8.
Am I missing something obvious?

The most straight forward and "useful" thing that I managed to find online is as follows:

Select the 3D Cursor tool
Open the properties tab (N), check "surface select" and select "Geometry"

Click on a face: the cursor will stick to that face and orient itself so it's normal to the face

Go to edit mode and select the "Add Box" tool

Click and drag
Poof you've now created a box that is normal to the face you selected

Warning: 3DCursor Tool in Edit mode and object mode are independant so if you click again on the cube in edit mode it will reposition itself based on the configuration of the edit mode's 3D Cursor tool
That's something I found in a Youtube video from "Blender Developers" from a year ago so maybe you can do more things with it now or maybe in the future I don't know.

Phew.Thank you. I was missing something obvious. But I spent half a morning looking for it. I'll assume some others might find it as difficult as I did to find it, and so the 'silly' question may not be so silly :/.. This winds up being the faster replacement for temporary Custom Transforms I guessed must be there, somewhere.


text:
How to write drivers to be copied and pasted between objects' modifiers?

I have assigned a script-expression driver to a field in a modifier.
The expression is a function of properties of the object to which the modifier is assigned, extracted as Single Property variables.

I can CtrlL link the modifier to a new object. I can copy the driver from the old object's modifier, and paste it into the new object's modifier.
But, of course, the driving properties still refer to the old object, and so I have to go in and manually point the variables in the driver to the new object.
How should I use 'self', or suchlike, either in an expression, or in a driver-namespace function, so I can copy the driver between modifiers on separate objects, always referring to the object the modifier is assigned to?
EDIT:
I've just worked out that self in an expression driving a modifier field, refers to the modifier, not the object the modifier is assigned to.
AND YET, if I create single-property variables to be used in the expression in the UI, the root is the object. For example, to reach the value of a field in the driven modifier that way, I use modifiers["name"].modifier_property.
This makes no sense to me at all...

The id_data property of any object returns an ID object
Simple example adding a driver to the count of an array modifier  The modifier is on the default cube.

The driver script, prints out self,  self.id_data the path from self.id_data to self and returns 2.
import bpy

def test(self):
    print(self)
    print(self.id_data)
    print(self.path_from_id())
    return 2

bpy.app.driver_namespace["test"] = test

Here is the output to console
<bpy_struct, ArrayModifier("Array")>
<bpy_struct, Object("Cube")>
modifiers["Array"]

Hence other properties of the modifier can be accessed using self.other_modifier_property and properties of the object it is on via self.id_data.some_object_property
The driver UI deals in ID objects, as does the datapath used by fcurves etc.  You select the (ID) bpy.types.Object instance the modifier is on, and add the datapath from ID object to modifier. In this case self = self.id_data.modifiers["Array"]

Phew! Thank you. This begins to crack open a lot more than this particular problem, for me. I've been able to go back and read the API introduction and bpy_struct with a bit more understanding. I  often wish the documentation for this and other APIs would kick off with more of a view from 30 000 ft - How to look  at the data structures / database, in plain language, before considering how to use them.

It's the string representation of most blender objects str(obj) Consider  <bpy_struct, Object("Cube")> an instance of bpy.types.Object named "Cube".  Printing repr(self.id_data) would return bpy.data.objects["Cube"]


text:
Why is this background render/script for the command line not working?
I'm trying to run Blender as a background process via batch process (or directly from the command line), neither seem to work.  Has anyone done this before?  I'm using the following pages for guidance:

https://www.blender.org/manual/advanced/command_line/arguments.html
https://www.blender.org/manual/render/workflows/command_line.html

When rendering, it should use the info in the .blend file (.PNG vs AVI, frame rate, etc.) by default.  For both of these, there is a file called ANIMATION.blend already created.
Here is the FIRST script, to render in the background:
cd\program files\blender foundation\blender
blender -b C:\pathtofile\ANIMATION.blend -o C:\pathtofile\renders\ -x

It gives me:
found bundled python: C:\Program Files\Blender Foundation\Blender\2.78\python
read blend: C:\pathtofile\ANIMATION.blend

Blender quit

But does not actually render anything, either in /tmp, or the output file above, or the one in the .blend file already.
If I just render the animation via the in Blender GUI, it works fine.
Any ideas? Is it broken or am I doing something wrong?

You haven't given the command to render the animation, which is -a. The command line isn't just for rendering, so unless you explicitly tell blender you want to render, it won't.
Your first command should look like this:
blender -b C:\pathtofile\ANIMATION.blend -o C:\pathtofile\renders\ -x -a

Thanks, that worked!  Now I have a new problem, it says there is no camera present, I'll figure that one out myself.

Creating the animation .blend file from the command line still doesn't work, though. :)

'No camera present' means there isn't a camera in the file that it can render from. You have to add a camera object. As for the animation file, it probably means there is an error in your Python script.

Thanks again!  Solved it with the follow line, highlighted:

cam = bpy.data.cameras.new("Camera")
cam_obj = bpy.data.objects.new("Camera", cam)
bpy.context.scene.objects.link(cam_obj)
bpy.context.scene.camera = cam_obj        <--added this line


text:
Blender 2.78 .obj import via script
So is importing .obj in 2.78 via script broken, or am I not doing it right? It's crashing on import in my script when I try and reference the object at all.
import bpy
file_loc = 'C:\\Users\\MyComp\\Documents\\3Dobjects\\obj\\humans\\human_figure_JOINED.obj'
imported_object = bpy.ops.import_scene.obj(filepath=file_loc)
obj_object = bpy.context.object
#print('Imported name', imported_object.name)
print('Imported name: ', obj_object.name)

Running this with the first print statement yields this:
AttributeError: 'set' object has no attribute 'name'

If I let it run as shown, the second print gives me an object "Point.001" which is I think the last created object, so the active one?
I have tried to link the imported object to the scene by adding the following code, but this doesn't seem to work:
scn = bpy.context.scene
scn.objects.link(imported_object)

This gives me an error:
TypeError: SceneObjects.link(): error with argument 1, "object" -  Function.object expected a Object type, not set

Appears to me to be something wrong with the import.  If I import via the UI (File..Import...Wavefront(.obj) everything seems ok, as in it imports and can be manipulated.
Any ideas?
I would select it referencing the name but I can't even get the name because the reference getting it from "imported object" fails.

Operators return a result set, eg {'FINISHED'} or {'CANCELLED'} not an object.  Usually an operator, if run successfully, will change the appropriate context property.  Scene imports often import multiple objects, and can be ref'd after using for o in context.selected_objects:  or similar.

also related: http://blender.stackexchange.com/questions/5064/how-to-batch-import-wavefront-obj-files

You need to get the context selected object as shown below:
import bpy
file_loc = 'C:\\Users\\MyComp\\Documents\\3Dobjects\\obj\\humans\\human_figure_JOINED.obj'
imported_object = bpy.ops.import_scene.obj(filepath=file_loc)
obj_object = bpy.context.selected_objects[0] ####<--Fix
print('Imported name: ', obj_object.name)

Thanks to Tak and also Batfinger above.  It was a combination of these two.

In case there is already an object selected, it seems to be appended to the list of selected object. In my case, I changed the 4th line to obj_object = bpy.context.selected_objects[-1] to be on the safe side.


text:
Weird shading in my faces
I have used blender for some time and have never seen something like this, I tried: Changing normals; Flat/smooth shading; deleting the faces; making the faces planar, and I can't find the solution.
It also appears in the render.

Can you upload your .blend file?

is this imported from a different 3D app? or modeled in blender directly?

Without viewing a file it's hard to say with certainty, but it appears that the 3 edges in question are slightly raised. If you have already checked normals, double vertices etc. then a possible fix for this would be as follows (using a circle):
If you do not have the Mesh: loop tools add-on enabled, then enable it in user preferences>add-on tab under the community add-ons.
(Ctrl+Alt+U)

Select all (in edit mode)  and press W then choose loop tools>flatten

I would try removing double vertices and recalculating the normals.

Please consider adding how to remove doubles and how to recalculate normals.


text:
Particles don't collide with rigid bodies
I have a scene with 2 Cubes, Cube 1 (using a soft body (Rigid body doesn't work either))falls through Cube 2, and Cube 2 has a particle system on it. I want Cube 1 to "push away" the particles on Cube 2 however, goes straight through. I have Collision physics on Cube 1, but it doesn't seem to interact with the particles at all.
Here is my .blend file:

also: to clarify, i don't want the two cubes to collide, I want the particles on Cube 2 to colide with Cube 1

Can you add some more details or a screenshot?

And I have soft body physics on the thing that falls. Maybe that's why?

That's possible. If your running a simulation on an object, Blender might want particles to collide where the mesh was initially.

Is there a fix? add it as an answer if yes.

Can you upload a .blend file to http://blend-exchange.giantcowfilms.com ? I could then look more closely.

You can bake it, but that's not quite the same, I don't believe.

I tried to bake it but, nothing. Also, I'm uploading it to your website thing.

Thank you! I'll look at it. You can edit your post and post the link there.

Got it. Typing up an answer now.

Posted! Please consider accepting if it helps.

I see what you were trying to do with the Soft Body Physics, but what you really need is a Rigid Body Physics simulation. You can learn a bit about it in this quick, fun tutorial, but it is basically a simplified physics engine for gravity and whatever else you want to have affect your meshes.
For the falling-through-the-bottom-box issue, I turned off Collision Physics for all of the meshes except the floor because it has to deal with the particles. I changed some settings to make the particles bounce nicer. I also added all of the meshes to the Rigid Body Physics simulation. You can tell this because when you select them, the outline is green instead of orange. Additionally, I adjusted the particle settings so that they began emitting at the collision of the two boxes.
Final result:

Here is the modified .blend file:

It works nicely, but it's not the look I was looking for.

@snipers500 Perhaps you could have added more details about the look you were looking for in your question? I did the best I could and made some assumptions based on limited data. I do apologize if it didn't work for you. However, you said in your answer that you changed to rigid body physics? So maybe my answer helped a bit? If it did, please consider accepting it.

If you don't need soft body you could use ridged body. Just add rigid body on both cubes. Remove soft body on all of the cubes/objects. The add ridged body on the plane and check animated.


text:
Blender is not on the start menu
The blender shortcut says it's pinned to start as shown in the photo,
but when actually looking through the start menu or the Windows search, it's nowhere to be found.

I think this is an issue with your operating system, not blender.

I'm voting to close this question as off-topic because it is not a question about Blender

everything else works, blender doesnt

To solve this problem you can copy the blender shortcut and go hit the WindowsKey+R or search for Run. Next type %appdata%\Microsoft\Windows\Start Menu\Programs and hit enter. Then a folder will open, just paste the shortcut into the folder and it should show up in your search bar.
Next time please ask questions as such on https://superuser.com/

it's already there, and it only did it for blender so I posted it here. next time ill post it there, thanks!

sorry for accepting this answer so late, it happened again and I found this post, so I followed these steps and it worked. I don't know why it didn't work for 2017 me.

No probs, I'm glad it worked for ya :)

This has probably happened as you downloaded the ZIP file instead of the Installer(.msi) file. If you download the installer instead it will put the icon into the menu and you will be able to search for it.


text:
Sphere projection option is missing
I'm trying to map a texture to a sphere without UV mapping, and here's my node setup:

I wanted to set the image texture projection to "sphere", as I saw it being used in a tutorial, but as the picture shows, I don't have the option to use sphere projections. I am using Cycles render and have the texture on a UV sphere, not an icosphere.

What version of Blender are you using? Seems like an outdated version

My blender version: Blender 2.71. Newest version:  2.77a

In the screenshots shown Blender version 2.71 was installed. One should have upgraded Blender to a newer version as this functionality was added as of 2.74:

Nodes
   Image texture node now supports sphere and tube mapping.
  12ccac6, dda3554

Thank you cegaton


text:
Point density doesn't render
I am trying to make a shockwave effect in blender, but when I add a cube surrounding the particle system, and set up the material nodes as shown in the image, the particles still don't show.
Here is the .blend file:

You need to setup the Point density node correctly and you will need to post pictures of your whole setup or the .blend file for us to see what is wrong.

I posted an image for you

On my original project, they don't show but on the copy I made does. I only deleted a text(converted to mesh) and removed some music, but i think it's because i moved it forward a bit

I got it to work, but I can't see it in rendered view. Why?


text:
View looks around in first person, rather than orbiting around
If I hold down the middle mouse button and move my mouse around, the view should orbit around, instead just looks around, similar to how it does in fly-mode. If I press the button to enter/exit fly mode, it still does the same thing.

You are in Fly Mode press Escape or Right Click to cancel

I am aware fly mode exists, as I mentioned it in my post, I can confirm I am not in flight mode

It turns out my blender was just glitching and restarting it helped.

sorry this response answer was late, I completely forgot about this post for 2 years


text:
Toolbars and Headers don't have transparent backgrounds

heres a screenshot of a youtuber's blender UI (look at the top and left side)

and here's a screenshot from my UI
what can I do to make the toolbar on the left and the header transparent?

also if you can, how to get rid of the text in my photo that says User Perspective and stuff, i've never used it, and it looks cleaner without it

nevermind, the text part of the problem is under Viewport in User Preferences, but I didn't fix the opaque menus

Found it! You just have to enable "Region Overlap" under User Preferences>Interface>Themes


text:
How do I install the Fracture Modifier Add-on?
Here's the add-on I'm talking about.
I have the zip downloaded, but it just looks like the blender folder (the one in program files), and not like a common addon. What do I do?

The fracture modifier project is not an addon, it is a development branch of blender that adds the fracture modifier as a core feature within blender's source code and aims to have it incorporated into a future blender release. You need to use a copy of blender that was built using the separate branch of development.
The site you link to includes downloads of pre-built versions of blender which include the fracture modifier. If the available versions don't work on the system you have, then you will need to build your own copy of blender by checking out the fracture_modifier branch instead of the master branch.

So how do I use the pre-built ones? -or the fracture modifier branch.

The fracture_modifier branch refers to the source code used to compile blender from source, you can download and use the pre-built ones from the df-vfx site the same as you would a normal copy  of blender. The df-vfx site has a tutorial  which is on youtube.


text:
How can I make Blender put less strain on my CPU?
I am using GPU rendering and my CPU is really bottlenecking blender down to only 50% of max GPU performance, while blender is taking up more than 90% of my CPU usage. How can I put less strain on my CPU so it will stop bottlenecking my GPU?

What do you mean by making it 'easier' on your CPU? If you are on a laptop and the CPU is heating up too much, there are ways to reduce the CPU speed at the expense of slower performance.
If you think the CPU is bottlenecking your GPU, then you want to speed up  your CPU, not slowing it down.

If 90% of CPU load bothers you, ie its not comfortable to work with other programs, you can set priority to the Blender by Task Manager.
Press Ctrl+Shift+Esc to launch Task Manager.
Prior Windows 10, right click on Blender process->Set Priority->Low. In the Windows 10 select details tab, and again right click on Blender process->Set Priority->Low

Also, you can launch "powershell ise" with admin privileges, then paste Get-Process | where ProcessName -eq "blender" | ForEach-Object {$_.PriorityClass="Idle"}

Btw, by lowering number of threads, you lower performance, because they are executed per core/processor, so in case of Intel i5, there are 4 cores, and therefore 4 concurrent threads which can do max performance. Can't reply to you directly because of reputation limits. Hope that help

Even if you are rendering on GPU that does not mean evetything runs on it.
And things like physics, BVH creation, etc has to be made via CPU still.
So if your CPU is a bottleneck that is likely to happen always.
The only thing you can do is lower the number of threads Blender uses:

That will release CPU power but may slow the render

ok thanks, ill try it out(wonderful screenshot btw), what do threads do?

I found out what threads are, but I'm trying to reduce load on my CPU to make the GPU rendering go quicker

@cegaton, I was answering from my mbl sry :')

@snipers500 a thread is like a sub-process. multiple threads can run at the same time, accelerating the job but eating more CPU power.

@snipers500 You should take your time to learn about the Performance tab in Blender, it will help a lot your render times


text:
Selecting Face Maps
I'm trying to select faces by assigning them to a Face Map, and then using
bpy.ops.object.face_map_select(True)

This works, but I can't figure out how to specify which Face Map to select. It selects the active Face Map but I see no way to make a Face Map active by name or index. I tried using Vertex Groups, where I can use
bpy.ops.object.vertex_group_set_active(group="Name")

bpy.ops.object.vertex_group_select()

but it selects faces I don't want since you can't define faces by its vertices without including neighboring faces.
I can even move an active Face Map up and down in the list with
bpy.ops.object.face_map_move(direction='UP')

but if I can't set the active face map I don't know what good that does.
Are Face Maps not fully implemented yet? Is there a better way to select specific faces with Python?
EDIT - I found a good way to do it with Material Slots: How do I select vertices by material slot in Python?
However I would still like to know if it's possible with Face Maps.

For your information https://docs.blender.org/manual/en/latest/modeling/meshes/properties/object_data.html#face-maps

But you can  obj.face_maps.active_index = obj.face_maps['FaceMap'].index

Thank you! I don't know how I missed that.


text:
Set player position
Ex. You want to move your character to coordinate 0,-10,1 but you don't want to add location normally. When you touch an item, i want to SET the position to those coordinates. The motion actuator can't do it even though character motion has a SET setting that doesn't work correctly. What should I type for Python to achieve this? Also, is it possible to set an object's location to match another object's location?

You can set the location like this:
object = bpy.data.objects["Cube"]  # for example
object.location = ((0,-10,1))

or
object.location = bpy.data.objects["Sphere"].location

to match this objects location to the one of i.g. a sphere in your scene.


text:
Duplicated objects created in Blender Render are invisible in Cycles
I cannot figure it out. Perhaps you guys can help me out. I have created several objects in blender render, I forgot to switch to cycles at start. Anyways, the first object that I crearted shows up in cycles render, no problem. Any other objects (they were all duplicated meshes from the first object) are gone. I checked the visibility in outliner, all are listed as none under object->duplication. None has any textures applied, not even materials. Any help would he appreciated.
Blender file:

I tried to consult this thread, but no luck:
Why does my object not show up?

Hi Ryuu, it's a lot easier for people to diagnose problems if you post your blend file.

Cheers for such a quick reply, Dale. My bad, sorry, here is the link:

Navigate to Object properties, Cycles settings tab:

Turn on all Ray Visibility types:

Leave Shadow catcher unchecked.
But i will vote for close, becouse it's #5 from here: Why does my object not show up?

Cycles camera visibility disabled in object settings

I am embarrassed. That will teach me to read harder next time. Massive thanks for your help. One more question, though. Why is that one or two items had those options checked by default, and all others did not. Was it because they were duplicated from the original object? I am just trying to understand how it works.

By default all of them are checked, maybe you unchecked them and coped objects with this settings

I have not touched any of those check marks. All I did was creating objects in blender render from the start, that is it. Note that the first obecjt I created, which was the floor base, had all those check marks on, and that was by default, just like you said. All other objects were duplicates (shift D) of the main object. And all of those duplicates had all the check marks off. That was not done manually, so consequently, it seems that by default blender is unchecking those options for duplicates.I will try this out today and see. In any case, I really appreciate the help!


text:
Blender Weight Painting is now not working
So basically, I have a rig that I'm trying to set up as a test rig for future projects, and whenever I try and set automatic weights the leg bones don't influence the right areas of the mesh.
It's supposed to look like this.

Instead, the leg bones aren't influencing the correct legs, so it turns out like this:

Any help I can get would be great, as I can't understand the issue.

could you please share your file? https://blend-exchange.giantcowfilms.com/

it looks like there are several problems, first you need to apply the mirror modifier, then bend a bit the armature knees in Edit mode, put the foot controller head on the exact same place as the lower leg tail, symmetrize the armature, in Pose mode change the lower leg Pole Angle so it stays as it is in Edit mode, maybe delete the foot constraint and parent it to the IK controller, then reparent... it is still not good, it happens, so use the Weight Paint mode to correct everything...

Alright sounds good! Thanks for the Help!

also maybe put some hip and shoulder bones, it might help to make a better rigging


text:
Why is my image not showing up after UV unwrapping?
I'm following a YouTube tutorial on UV unwrapping the image of a mouth onto a character ( https://www.youtube.com/watch?v=5NlvgMYZgaY ), and although I've followed all the steps, several times, to a T, I cannot get the mouth image to show up on the character. I've included the blend file for your convenience. Could you please help me understand why this is not working?
Steps that I took:

Mark the seam.
Unwrap the faces.
Open the png mouth image.
Create a new material that is a copy of the material used for the body.
Add an image texture to that material.
Assign the new material.
When I use the file that he provides to go along with, the results are as expected. But when I do the same thing to my file, I do not get the same results.

Please, if you could take some time to help me I would very much appreciate it. Thank you.
Here is a copy of my file: https://drive.google.com/open?id=1JxxWnnUfpxqWwv0Fo_5trLo4L7luAJq-
A copy of his file:

The png file used for unwrapping:

I'm such a dummy! I was in the solid shading the whole time! I forget these little things some times. It's all a lot to take in, keep track of and remember. That was it. Thank you!

Have you possibly tried applying the texture to the material AND texture tab? How about with the same texture? One way to make sure you have the right texture is to, instead of reopening a file, just select the same file by clicking the arrow next to it. Hope this helps, sorry for not being a teensy bit more specific.


text:
How to change dimension of circles without scaling it?
https://photos.google.com/share/AF1QipM6N7e-ZtVL0fwkwy3ro-GcIc6N8B31TkXccejEsRnbLwbFGzJ-_8oVY9HKey7FxQ?key=VjVvekRZbm5vQzdHUUhEQ0p5dWkySlVWOWJoLV9R

I want to make all circles with same thickness.
Also with different dimensions in circles but scaling changes the thickness of the circle.
Please provide me solution.

Your image is missing in the post. Please don't use photos of your screen, these have poor quality and are hard to read, take a screenshot instead

I find a literal screenshot once in a while refreshing and funny, actually.

To the right is a single nurbs circle which I opened with ALTC in Edit Mode and turned into a half circle by deleting one control point.
To the left is a former mesh with three edges which I turned into a poly curve (again with ALTC, just this time in Object Mode)
The left curve becomes the bevel object of the right curve. All one needs to do in order to change width or diameter of the circles is to move or scale the short curves to the left inside Edit Mode.

Can you please give more detailed answe....

"Make it more detailed" is not much of a motivation. So I slap you around a bit with the manual: https://docs.blender.org/manual/en/dev/modeling/curves/index.html

One way of doing this (it may not fit your workflow, though) is using an array modifier, fitting and following a circled curve (you can create a mesh circle, then convert it to curve with ALTC in object mode):
First, you create a thin rectangle that will fit and then follow a curve, with modifiers. A thinner rectangle will give (as replied by array) higher resolution of the curved shape.

which produces this:

to make another circle, of the same width, duplicate both curve and rectangle, first:

then, scaling the curve, will keep the same width:

another bigger curve:

If you need to have just static meshes, you can then apply (in order) modifers... (maybe keep a "dynamic" copy to create new ones...)


text:
Missing polygon when baking in Cycle render
I'm trying to bake my character for unity but only some polygons' materials were baked. The body isn't showing up :(
I am using cycle render and assigned different materials to different polygons.
Please see attached screenshot for clarification. Thank you, really appreciate any help!
Agatha

Got it. my body's normal was inverted. Didn't realise that was the problem until I baked the texture on a transparent image - showing the polygons as black.


text:
How do I delete meshes?
I don't know how to delete meshes. I know I can create them using the create tool but I'm not sure how to delete objects. Can someone please help me?

You have to select the object you want to delete. Then you can click delete on the tool tab or you can use your shortcut which is x and select delete.


text:
Why is my render window always black with no realistic shine
I'm really new to rendering in blender, so I don't really know much about texturing except for UV unwraps and things like that. I only recently decided to start rendering models since I've only used my previous models for 3d printing and such. Now, for some reason, every time I try to render some image, it's just really gray and drab and unrealistic, like this (this was made with a Glass BDSF texture just so I could see how that would actually render:
I know this is how it's supposed to look, but what if I wanted to create a nice bright scene, like in real life?

See https://blender.stackexchange.com/questions/48659/why-does-an-object-with-a-glossy-shader-render-in-black. Tl;dr is add environment to make the scene behave a bit more like real life. Real life isn't flat grey background. Glass shader also is known to cause noise, see https://blender.stackexchange.com/questions/2558/how-to-illuminate-the-darkness-inside-glass-objects-in-cycles

Hmm.. @MrZak whenever I try to set a material for my background, it still looks kinda dark (see image posted

What did you put to the world background shader? The easiest way to lighten the scene is use hdri map (free or paid online). Not so easy way is to construct your own lighting system (several lamps / planes with emission material, you can add texture to vary emission intensity for those planes.. and so on and on. You can read about photo studio setup too)

https://blender.stackexchange.com/questions/2558/how-to-illuminate-the-darkness-inside-glass-objects-in-cycles


text:
Can't get Blender to render smoke
I am having somewhat of a problem. I get a real nice flame and smoke in the Viewport but when I render only the fire does. I've been to other forums and tried different things but can't figure out what it is.
This is a screenshot of the viewport
And this is a screenshot of the render

Here's the link to the blender file if it helps.
Thanks everyone.

The problem was quite simple - attribute name. In Cycles the spelling of attributes matters, including capital letters. And there isn't attribute "Smoke", you have to use "density" (w/o quotes) instead. With that corrected - http://i.imgur.com/N661GoK.png If you don't want these difficulties use Quick Smoke operator on desired mesh, see - http://blender.stackexchange.com/questions/45697/after-configuring-the-domain-shader-i-do-not-see-smoke-simulation. For smoke setup see http://blender.stackexchange.com/a/24424/1245.

@MrZak This doesn't seem to fix my problem for some reason. I had actually tried that before. I tried it again and it still behaves the same. Any ideas why?

Because you multiply density by 1, which means using default values; and by default density isn't visible that much. Also don't combine fire with smoke via Mix node, rather than with Add. You could try creating some dummy mesh and assinging Quick Fire+Smoke to quickly check how settings should look like.  As a side note I suggest deleting caches, rebaking and replaying animation.

Select the Flow object and make sure that the Flow Type: is set to Fire + Smoke. It is likely just set to Fire. If this doesn't help, consider uploading a .blend so someone can locate the problem more easily.
Edit:
Got it! The issue was in your nodes. I'm not quite sure what the issue was, but I replaced the current smoke nodes with this, which I plugged into the mix node that the other thing was previously plugged into:

The value in the multiply node affects how dense the smoke is. Here is the fixed .blend file:

Thanks for answering @ShadyPuck. I checked the flow type as you suggested and it is set to Fire + Smoke. I am attaching a link to the blender file under my original post. Thanks, again.

@edherigh I found the problem and updated my answer. The .blend I included includes the solution. Glad to help. If you wouldn't mind accepting my answer (the checkmark near the top left), I would be grateful.

@cetagon Not quite. The reason I didn't say that was because if you simply changed Smoke to density, it would not fix the problem. You had to fix up the other things that I did as well.

@ShadyPuck what were those other things?

I believe it was the scatter node. I don't think that you had one originally.

Smoke isn't combined with fire via Mix node, rather than with Add. Scatter node was present in the original setup. The problem was in the attribute property spelled wrong, but that just was not the only problem. The density was too small.

If you are GPU rendering, ensure you are the on the latest version of Blender (2.77).  Older versions do not allow for GPU rendering of smoke/fire/particles.
https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/Cycles

if this were the problem, it would not render just fire, it would render nothing.

@Kirbinator, thanks for answering. I am using blender v2.77. I rendered using the CPU just to be sure and I still get the same result.


text:
Animating Glare angle offset
Is it possible to animate the "Angle offset" property of the Glare node? I am making a photon torpedo that has a glare applied to it, which should rotate when the torpedo is on the way.

Most of Blenders properties can be animated. Just hover over the Angle Offset field with your mouse and press I to insert a keyframe. A keyframe will be inserted on the current frame. Move to another frame, change the value and insert another keyframe by pressing I again.
The created key will show up in the dopesheet and graph editor, where you can edit/remove them.


text:
Huge increase of memory use when increasing the resolution
I've been struggling to render an interior scene (pic below), which I don't think is very complex, around 2,5M of vertices. As I had many problems running out of memory, I had to do some optimisations, this is what I've done:

Render with the CPU (It would take 50 hours)
Get rid of a couple Adaptive Subdivision and use regular Normal Maps. Now I only use it for the carpet.
Reduce some levels of most of the Subdivision modifiers in some secondary objects.
Use 1K textures instead of 3k for most objects.
Decrease the resolution to 1980x1250px.

With these tweakings I managed to reduce the poly count to 1,7M and, most importantly, to render the entire scene using around 4GB (I have a 1060 6GB, so there's no much room).
I tried to increase the resolution to see how much I can get, so I've tried to increase it by just 15%. When starting, the memory usage is higher but no errors, it's still below 4.7GB which It's the limit for my graphics card. But when it reaches a specific tile the memory usage increases to... 22GB!
Why does increasing the resolution this little produce a huge difference?
This is the scene:

And here's the screenshot of the error:

The .blend file is(90MB)
I've uploaded it to Dropbox, here's the link.
Thanks in advance,

Split your scene into multiple render layers, that should help you the most. I also doubt texture size is the problem.

@JaroslavJerrynoNovotny How do you set up the different layers in an interior scene? I mean, everything interacts with everything, right?

Yes, you trade off some photo-realness. You split objects that do not influence each other much and you fix anything in postproduction. It's not like you are publishing the raw render, there is some tuning and enhancing anyways. I know it's not the best advise, but it's hard to help. It is weird that your render would spike this much for a single render bucket. And imho you should be able to fit an interior scene under 6GB. Hard to tell without anything to debug.

@JaroslavJerrynoNovotny I've uploaded the blend file to Dropbox in case you want to take a look.

This "may" help some https://blender.stackexchange.com/questions/2014/render-borders-related-check-boxes-how-do-they-work

After looking at the file I think I know, try disabling Denoising. Now your every render tile should consume the same amount of memory. Why it does what it does is here. To denoise you can use Topaz Labs Denoise or other post-production denoisers.

@JaroslavJerrynoNovotny I would have never thought that this was because of the Denoiser. Thank you! I will have it in mind for future scenes.

If you see memory usage changing while rendering, it could be because of Denoising enabled, try:

lowering the render tile size
changing the tile order (from Hilbert to Left-to-right), so the minimum number of tiles are kept in memory
disabling Denoising altogether

Explanation why extra memory has to be used for denoising is here:
Why does Denoising take up so much memory?


text:
How can I join my baked textures into a new material [cycles]
I have two cube objects, both with a specific material and with a texture. I want to join the objects together so I do that and then I make a new material called 'Bake'. I also make another UVMap with the same name. I make a lightmap pack of the joined object and after selecting the 'Bake' image texture of the 'Bake' material, it was finally time to bake...
The bake texture resulted in black but the cubes got baked onto their own materials..
What I'm trying to do is that both cubes get baked into the 'Bake' material/texture
There are more then 2 images that I want to share so here is a link to that

You don't bake onto a material, but you bake onto a texture. Add a texture node in your material, set a texture to it. Don't connect it to anything but this node needs to be selected so that Cycles knows where to bake. Here as you have two materials, set this texture node in both materials. And lower the margin as your UV map parts are very close to each other

For the new material... once the bake done, simply reuse the baked texture in this new material (assigned to a copy of your mesh, for instance, after you have removed the other materials)


text:
Cycles Render grainy despite many samples?
So I'm pretty new to the cycles rendering engine, but decided to give it a shot. However the image seems to come out rather grainy whatever I do.
I've tried with up to 700 samples, which already seem like waaay too many, but with no effect.
Any help would meen a lot!
The Blender file can be downloaded here.

3000 is minimum I would render a glossy scene. Usually you need like 5k samples. 700 is very low.

Check "Square Samples", otherwise Blender will use -exactly- the number of AA samples as you type in. 700 unsquare AA samples is around 27 square samples.
The blend file you provided has it set at 100 AA samples, which is barely preview quality.
Additionally, you have some REALLY strange material shaders. Theres a fresnel node plugged directly into a color node. A ray path node directly in an add shader node. You mix glossy and glass shaders.
Its really strange, i've never seen shader setups like this.
Last thing: you built a closed box and put objects inside with indirect light, this gives you huge amounts of bounce light, which creates loads of noise. If you get a HDR instead you can get better results with way less bounce and noise than this approach.

Thanks a lot for the feedback! I've just been grabbing from different tutorials, so maybe that's why the shaders have turned out so weird...
Anyway, how do I get ahold of HDR? or can I even make one myself?

@philipdamore This is a good website for it: https://hdrihaven.com/hdris/