text:
Change Base Color of Paint Slot, or Delete Paint Slot
When you first decide to texture paint an object, you are given the option of adding a paint slot.

You then can choose the base color to start out with.

But what if you later decide that you want to change the base color you started with?  Are you able to change it without losing the texture painting you've done?  It's understandable if this isn't possible, but I can't even figure out how to delete the paint slot and start over.  At least that should be possible!  Anyone know the answer to this?

As far as I'm aware you can't change to base color later on. Basically it just creates a flat image with the base color that you're panting on. You can remove the material base slot by deleting the underlying image. This can be done by going to the image editor, holding shift and clicking on the unlink button. Once you save & re-open the file the image will be permanently deleted and the slot will be gone too.

Thanks, it worked!  As usual, there is more than one way to do things on Blender :)

You can change the base color.

Starting in Blender 2.8, the UV/Image Editor has been separated into two different Editors:

the UV Editor and
the Image Editor

Let's look at you what happens when when you're in Texture Paint Mode and you make a new Texture Slot, and how to change the color later on.
All hyperlinks below link to the Blender v2.83 Documentation.

Setup :
In the following example, I resized the default cube, and sculpted a crude rock.No materials nor textures have been applied. No other changes yet.

1st step, Add a Base Color to the Texture Slot :
In the following picture, I have four Editors open in four Areas1,

Image Editor
3D Viewport in Texture Paint mode
Outliner in the upper right
and the Properties Editor

Look at the Properties Editor.
Under the Texture Slots Panel, it says "No Textures" by default. Click the [+] button and click "Base Color" in the Context Menu. You can click the field for "Color" and select the base color for the Texture Paint Slot from the Color Wheel (shown in this next image).

Not shown in picture: I then renamed the Texture Paint Slot "Base Color for TexturePaintSlot", to make it apparent when we find it later.

2nd step, Find where this color data was saved :
We can now see that the mesh is displayed with a different color in the 3D Viewport's Texture Paint mode. We see this same color in the preview square to the left of our newly created Texture Slot, but it is nowhere else in the entire Properties Editor.
So where is this information stored?

If you don't have one already, open an Outliner Editor.

Once the Outliner is open, click the "Display Mode" button in the Editor's Header (next to the "Editor Type" Button) and select either Blender File or Data API. Each are shown in the following image.
Here we see the name we typed ("Base Color for TexturePaintSlot")
nested under Images.
The data we just created for the Texture Slot is an Image.

3rd step, Change the Color :
Open the Image Editor and click the dropdown for "Browse Image to be linked" and select the name of the Texture Paint Slot created in the 1st step above.
Note, this means you are "linking" the image into the Image Editor. Similar to how if you change Scenes using the Topbar2, the tooltip displays "Browse Scene to be linked". If you'd like to know more, read about Data-Block Menus3.

To change the color of our Texture Paint Slot image data:

Change the Image Editor's mode to Paint.
Select the Fill tool in the Toolbar.
Change the color for the tool.
Click on the image.

Concluding Remarks :
It would be nice if we were able to change the color by clicking that little preview square in the Texture Slots Panel, especially if you change your mind and just wanted to make a small tweak.
But for now this is a fairly straightforward way to change the base color (once you understand how the datatype works).
If you'd like to non-destructively change the color, simply go back to the 1st step above, add a new Texture Paint Slot, and select it in that Texture Slots panel. Then follow the rest of the steps and modify your new slot instead.

Links to Blender v2.83 Documentation for further reading :
Areas1 :
docs.blender.org/manual/en/2.83/interface/window_system/areas.html
Topbar2 :
docs.blender.org/manual/en/2.83/interface/window_system/introduction.html
Data-Block Menus3 :
docs.blender.org/manual/en/2.83/interface/controls/templates/data_block.html#ui-data-block

Can't remember the password for my old account, so I cannot post more than 10 links yet. If some kind user would like to edit this, by all means go for it. Otherwise I will revise and clean the links in this post when I am able.

Why don't you do the "Forget Your Password" button in the sign-in to reset the password for your old account?

I figured out how to at least change the base color, but by losing all prior painting work.  If you go to the UV image editor, go to the footer and click Brush.  From the drop-down check Unified Color.

Then go to the tools panel and set your texture painting tool to fill.  Now you can change your color to whatever you want and then simply click your model.  It will set the model to that solid color.  Just make sure you have your tool at strength of 1.


text:
Subsurf modifier rounding sharp edges
I tried to apply a Subdivision Surface on a part of my object. I can't keep the angles sharp, they all turn into rounded angles.
The angle before applying the Subdivision surface...

...And after

Related http://blender.stackexchange.com/questions/734/how-to-smooth-shade-an-object-while-retaining-hard-edges/735#735

In order to keep hard your edges, use the Crease. You find it on the right

The crease makes your edges purple, in order to show you wich one will remain hard or not.
Usually is set on 0.00 . . . Max it from 0.00 to 1.00 and your edges will keep their shape after a subdivision surface.
For example:
Before subdivision

After

Thanks Fuboski. I tried and it works perfectly. Do I need to apply an Edge Split?

It dipends . . .take care: edge split will need with the shading not for the subdivision surface. In order to undertsand better their function i suggest you this thread http://blender.stackexchange.com/questions/734/how-to-smooth-shade-an-object-while-retaining-hard-edges

@Grobby if you are keeping the model in Blender exclusively then by all means yes if it helps but I think adding supporting geometry (edge loops) is an equally favorable option. See http://blender.stackexchange.com/questions/734/how-to-smooth-shade-an-object-while-retaining-hard-edges/735#735 for some tips.

@Grobby if I answered your question please tick it as correct (the V) in order to close this thread

Where can I tick my question a answered?

@IKIsR I just read you post. Is it better to use the edge loops or the Mean Crease to make sharp corners?

The V is near the beginning of my answer on the left; there is the 1 between 2 "arrows" (2 triangles) . . .  the V is just below.

@Grobby Sorry I missed this, the use case largely depends. For high poly models or stuff you export I think edge loops are better, for anything not the focal point or will remain lowpoly or inside Blender, creases can be useful.

source: Stack Exchange

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

authors: Вадим Михайлов

authors: Никита Вдовенко

sort: votes


text:
How to "stick" two faces of two objects?
I'm totally lost and you are my last hope. I spent my day trying to stick these two faces with the magnet. I followed all the tutorials I found about to snap an object to the face of another object. I missed something but what?. Here the two faces.
Thanks.

I forgot the other face I want to snap, sorry

you want them to stick at the center?(at the yellow dot?)

Yes stick them at the center on the plan formed by the face shown on the image and try to rotating them on the same axe (x)

You need to enable the snap option (little red magnet icon) in order to do so. Right now you have it disabled. Then you need to choose the Snap Element you desire, in this case Face or Point.

Firstly join the 2 meshes. Then select only the faces you want to stick (, in the image that you post the axis you want to scale is x so) press s to scale then press 0 (be sure you set pivot point to median before doing this).And the faces will stick together .
I am not sure however if thats the answer you are asking for.

authors: Артем Бутырский

authors: Старовойтов Илья

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


text:
What are these spots that appear after using subsurf modifier?
I added a Subdivision Surface modifier, Creased some edges to 1.00 and some white spots appeared. I've never seen that before. Is something wrong with the UV shading?

Maybe it's the base mesh representation intersecting with the modified mesh representation. Try grabbing a vertex near there and moving it in and out.

It simply means that the subsurf is generating mesh outside the bounds of the non-subsurfed mesh. It's not an issue and they will not show as soon as you Tab back to Object Mode.


text:
Non-destructively joining meshes
Blender has no object joining modifier. I think it would be useful to somehowe achievce it. Can anyone suggest a method for properly doing it? I would like to retain the objects transform, like when simply joining objects, but of course with all the previous modifiers and the two original editable meshes kept non-destructively.

what I do not see in that idea is : what do you want to do after that ? Adding another modifier (for instance an armature) ?

I asked this with a dual purpose in mind: To share my answere, because I think it is generally useful, and hoping to get a better answere. I have currenty no specific project where I need this, but it might get handy, when I want to use a buch of modifiers on separate objects.

And not having to adjust the modifiers for all the separate objects. Or add particles on the surface of the joined meshes, use them as one single solid rigidbody, etc.

Sounds like group instances could do what you want to achieve, check my answer here and see if it helps. You could create a separate scene to keep group definition originals, and then use group instances in your actual scene.

Array Modifier
If I want to join A with B, I can add an Array Modifier to A with zero count, using Object Offset with B and setting End Cap also to B.
Drawback
If A is not centered, scaled or rotated, the two B objects will not align.
Workaround
I can add a C object and use the End Cap method two or more times, with A and B and other objects I like to join together.


text:
Best way to add color to your 3D model?
I have created a rigged 3D model, and it starts with nothing but white. I wonder how to color the model.
I did try painting it directly in Blender and did not like the results. There were spots I couldn't get to make my model blink.
I also tried unwrapping the mesh, painting it in an external program, and "wrapping" the new painted texture around it. The results were much better.
Am I on the right track? What can I do to improve the resulting model? What other options do I have? I want the model to be 100% done, to be used in an external game engine, so that I can start with the programming.

I also did something involving seams to (UV wrap?) and export to an outside program, color and import back. I don't know what it's called but I know how to do it, probably without looking at any tutorials, I remember it pretty well. What are the advantages to this way.

Are you just making it a solid color? Or do you want to paint a texture?

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

I want it done 100% ready to go. I want it ready to import into Unity with no more work required other than coding.

UV un wrapping seems to to me to be what you are looking for. It is a way to define a map of the surface of your 3D model in 2D, which can then be used to map an image.

Thanks gandalf. Although I know uv unwrapping isn't the only way to add color to a model I'll assume that it is the best way

AFAIK it's the most common way to texture objects for game assets.

Ok thanks man. It's just that when I see tuts and stuff they do different things so you're never sure which is the right way. Gonna make another model today and use that same method and check how it looks in Unity

From your supplemental comment, you seem to be creating game content for the Unity game engine, which will limit the set of possible answers, but the answer will still depend upon what kind of content you are making. Inorganic content--vehicles, metal objects, and painted surfaces, may be better colored by defining the color properties of the material. Organic content--living things (even imaginary ones)--and complex items like highly detailed structures may be best done with an image texture mapped to the surface of the model using UV unwrapping.
If you've got some modeling experience, I'd suggest Ben Simonds' book, Blender Master Class, where he discusses a wide range of coloring techniques for various kinds of elements, organic, and inorganic.
ns


text:
Where is the sculpt tool in 2.70?
Im following the Blender 2.6 tutorial from lynda and I can't find the sculpt tool in sculpt mode in Blender 2.70.
In 2.6 the sculpt tool is under the texture now the only options I have are:

Texture
Stroke
Curve
Topology
Symmetry Lock

In blender 2.70 just as in 2.60 the Sculpt Tools can be found under Brush once in Sculpt Mode.

In the 3d header switch to sculpt mode, note your active selection needs to be a sculptable mesh

In the Tools tab at the very top you will see the brush section. Exapnd it and you will have access to the sculpt brushes


text:
Get current frame of objects scene?
I've been working on an add-on that manipulates text data called randomiser
https://github.com/BenSimonds/Randomiser
My problem is a bug I'm trying to resolve with getting the correct "current frame" for an object based on what's scene it's in. If the blend file only has one scene, or if the object only appears in the active scene this is trivial (context.scene.frame_current).
However if the object appears in another scene it gets more complex. ob.users_scene will return a list of scenes that the object appears in and I could maybe get the current frame from them, but if the object appears in multiple scenes then how can i decide which to pick frame_current from?
Or is this precisely why the script should only let you use a value keyed by the user and not directly use the current frame?

You might consider using "Animation Nodes" to achieve the type of effects available in Randomiser. With just a couple expression nodes, one can manipulate the strings in text objects, and use nodes to drive their contents in a very visual way.

There is no current frame property for objects, there's only a frame_current for every Scene. What "current frame" means to an object is not defined.
What you might want to do is to get the current frame of the active scene, there's only a single active scene per Blender window and it's what the user sees (are you using a frame change handler that changes Text.body based on frame_current?)

Yeah this is exactly what I'm doing currently. However someone raised the point that if for example you then added a scene animated this way to the sequence editor with and offset it with respect to it's own starting frame, then frame_current wouldn't give the same results as it did in the original scene.

I'm thinking either I have to abandon using frame_current, or add a property to the script that tells the object which scene to get the current frame from.

I see. You could try to detect the VSE and get the strip's scene and the "local" frame_current

My first attempts at that weren't very successful - the frame_current frame of a scene doesn't change as you scroll through it in the VSE - it remains a the value it was when that scene was last active. My conclusion is that frame_current isn't to be used directly for animating, as it's seems to be more a property of the scene as it is being viewed by the user.

That's true. How about using frame_current of the sequencer scene and subtracting the linked sequence's frame_start?

That might be possible, however how would the object then "know" it was in a sequencer scene? I think it needs to be a bit more general than that.

The object wouldn't, but the frame change handler (it gets called by the current scene, which should be the scene with the sequence editor). Example blend with script: http://www.pasteall.org/blend/28475


text:
Blender CAD commands
Is there a way in Blender to achieve some CAD commands like extend lines to the intersection (or nearest) point, or trim/extend to plane?
Like this:
http://www.qcad.org/doc/qcad/2.2/reference/en/chapter28.html

Specifically for the commands you mention there exists a CAD add-on called mesh tinyCAD, allows you to easily do the following things (this is not an exhaustive list):

VTX (like _extend):

automatically extend edges towards their projected intersection
generate a vertex at the intersection of two edges  ("weld")

V2X:

generate an unattached vertex at the projected intersection of two edges

XALL:

intersects all selected edges.

BIX:

generates the bisector of two selected edges

CCEN:

given any three selected vertices (in one object), this can recreate a circular set of vertices of any number and scale.

For questions about the add-on or ideas use the project's issue tracker

For _fillet you can use the bevel command: CtrlShiftB With 1 vertex selected

It starts out as a bevel but you can increase the number of segments to turns it into a fillet.
Adjust radius

There are also some built-in features in Blender, which come in handy. Vertex/Edge slide for example can be used to move a vetex / edge by a factor of 0.5 for the midpoint. Turn off clamping to extend. Snapping does unfortunately not work while sliding.

There is a new Addon called CAD transform, that goes well with other commands as well. Have a look here
https://blenderartists.org/t/cad-like-transform/1226197
It can be found on the authors gumroad page.

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


text:
BGE Parenting loop
I have a simple game so far. The game is not made with realistic characters, but "blocky" ones, like Blockland.

I have several objects: collision-bound object and body (torso, arms, legs, head). Everything is set to No Collision except the bound object. The bound object have WASD movements, and the body has rotation, which comes from the head (I used ml.inherit in the mousemove event).

If I make the bound object parented to the body (the head is always the parent on the body), then when the bound object move, the body won't move.
On the other hand, if I make the body parented to the bound object, the bound object will not rotate which messes up the movement (I used local coordinates).
How can I make the bound object rotate and the body to move with it?

Hum, it's hard to figure out what you're talking about, please add an image or attach an example .blend... thx

I've been stuck here for an hour, and I don't want to give up

@TheBasicTroublemaker: Showing the logic brick setup for all relevant objects would help. These objects' relationship is clear enough from your explanation (except that the head is not the parent), but the logic controlling them is not.

@Adhi,: So you want me to attach a photo of the logic of the head, and the collision bounds. The body is just inherited rotation from the head. All the bounds has is just WSAD and [SPACE] controls. The head just has the mouselook, property hooks, and that's it.

@Adhi: You also said "except the head is not the parent," if it was the parent, then the body, arms, feet, and the collision bounds would rotate up and down with the mouselook.

@TheBasicTroublemaker: That comment was for the sentence "the head is always the parent on the body".

If I understand correctly, you want the character to move, and the head to rotate with mouse-movement?
Set up you WASD keys for the body, parent everything to that, then set up a Mouse Movement sensor, connected to a Python controller to the head. A link to the Python script is below:
http://riyuzakisan.weebly.com/mousemove-script.html

I would have just posted the code i used, but it's super long and has copyright issues. If you can't find the script, ask me and i'll just send you my .txt file


text:
Preventing axis being messed up by adding new objects to the scene in Front Perspective View
I've already had question according array modifier. I had changed object alignment from 'Align To: World' to 'Align To: View' in the 'User Preferences'. It's because i wanted to add objects in 'Front Persp' and spare me rotation steps i every time take when i'm adding a new object. After changing it i ended up having problems with modifiers relative offset properties, i had to tweak the 'Y' axis to move it up and 'Z' axis property to move it in the direction where normally 'Y' axis would be. So the question is: is it possible to add objects in 'front ortho' without messing up the axis of the object?

No, you either get it aligned to your current view, including the object's local orientation, or globally oriented.
Apply object rotation
Go to Object Mode and press Ctrl+A, 2 (Apply Rotation) and your object orientation is applied, meaning that the mesh stays exactly the same but all 3 axes are parallel to the global ones afterwards.
Concerning default behaviour
You can't make blender apply the rotation of your object all the time or always when you add an object.
I guess it would be possible to write a python addon/macro to always realign the axes for you after adding an object, but someone else would have to help you with that.
Other workaround
You can add any object first from top view (Numpad 7), delete the mesh (X) and re-add the mesh you want from the perspective you want (e.g. front with Numpad 1, Shift+A). This will only add the mesh within the already correctly aligned object. Which is not really a lot faster than the method mentioned above, sadly.
Third (probably best) workaround
Go to top view (Numpad 7), add the object, go to front view (Numpad 1), press F6, (disable and)* re-enable "align to view", this re-aligns the mesh to the current view without altering the object orientation.

only if align to view is enabled by default

Great!! it does work but could short explain why? Did i just rotated objects orientation to have it aligned with global orientation? because the object itself does seem to stay untouched.

and is it possible to set it as default behavior?

It basically rotates the objects to be aligned to the global coordinates, and then rotates the mesh back to where it was before from a global point of view, so both the orientation of the object and the position of every point within the object change, but globally, the mesh stays where it was.
See also: http://wiki.blender.org/index.php/User:Fade/Doc:2.6/Manual/3D_interaction/Transform_Control/Reset_Object_Transformations
I added a comment on the default possibilites above, but there is no ideal solution.

I added a third workaround that's probably even better, partially based on sambler's answer.

The option to align to view or world is available to each object added. Pressing F6 after adding an object gives you the operator options, which is also visible at the bottom of the tool palette by default. Among the options you have for a newly added object is Align to view, if turned off it is aligned to world.


text:
How to debug why can't select NVidia card? (Cycles renderer/CUDA support)
I seem to have lost ability to select NVidia (and cycles renderer engine) after some hardware fixes (changes were made to replace components with same components, so in theory there should be no difference at all) and Windows updates.
It was working long time before (I haven't had much time to play with Blender in last few months).
Note: I have seen this replay. I followed it, it still doesn't work.
I am using Windows 8.1 on a Lenovo ThinkPad.
I have two graphics cards:

They both seem to operate fine (as far as I can tell, NVidia Control Panel works fine, and Intel's one too).
I have just installed newest NVidia drivers from their website.
I have just installed newest Blender (2.76b) using msi installer.
I have tried running it explicitly through option to use NVidia graphics:

And I still can't select Cycles renderer:

And I can't select anything else than CPU for Domputing Device:

I don't get any trace in Blender's system console that would indicate any issues.
NVidia's GPU activity tool seems to pick up on Blender using its GPU:

Interestingly if I start it like above, with NVidia option, I can select different subdiv algorithms:

However if I run it selecting Intel card I get no choice:

So it does seem to make a difference which one I choose to run Blender through.
How can I debug what's wrong?

Try running it as administrator..?

Cycles render should be available independently of which compute device is chosen, if no compatible graphics card is present it still runs regularly with the CPU.
If the Cycles render engine is not showing up it's probably because it's addon is disabled. Try Enabling it under Blender User Preferences > Add-ons > Search for Cycles.
As for using the NVidia card, right above the computing device pull down menu there should be two buttons that say None and Cuda you have to enable Cuda before Blender is able to recognize your graphics card as a computing device, I think.
Edit: Upon closer inspection of your screenshot, the CUDA button is not visible, so Blender is considering no compute capabilities are present at the moment.
You mentioned a laptop with two cards. Many of these systems use a low power (Intel) graphics card for battery saving and the High powered one for graphics heavy applications. There is usually some sort of switching system and profile manager for this sort of setting. Try activating the High performance profile or making the NVidia card the active one before running Blender, so that CUDA capabilities are present when the application starts.

Thank you! I have spent ages thinking something terribly wonky happened to my Windows installation and yet it was so simple.
After enabling plug-in I could select Cycles Renderer. And after restarting Blender I can now select CUDA and my NVidia card.

Welcome. Hope it helped

authors: آرزو بهاره فرحناز


text:
Scale Keyframes Together From "Medium Point"
I have two key frames in order to make an object change location.  I decided to make it move faster, so I want to scale the key frames together.  However, when you select them and scale, both key frames will grow closer to each other, but they also start moving towards frame 0.
I want to scale both keys so that they move towards the middle of the original distance between them.  This would be like scaling two objects using the medium origin in the 3D view.  How can I accomplish this?

Mesh scaling and Graph scaling have pivot point option on the top of the graph window.  Look for the pivot point on the graph editor.  Bounding box pivot might be a good choice for you.  At the moment Blender is busy on my machine.  So maybe I can take a snapshot later.  You probably can find it.

Thanks man!  Nice - answering others' questions while Blender is at work :D

In the Dope Sheet, the position of the 2D cursor (the blue line) will be the pivot point:

As  atomicbezierslinger says, if you switch to the Graph Editor (CtrlShiftTab) you'll have the choice between Bounding Box Center, 2D Cursor and Individual Centers:

if you want the middle of your selected keyframes to be the pivot point, choose Bounding Box Center:

Thanks a lot, man!  That's exactly what I needed!

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


text:
EVEE: More than one Bloom Color
I like using bloom, but I don't want all emission objects to have the same bloom color.  Is there a way to have different emitting materials to have different bloom colors?

If you set the bloom color to white, it should be the same as the emission color of the individual materials. I guess the bloom color parameter actually determines which kind of RGB values qualify as bloom.

Thanks!  I should have noticed that by now!  Post that as an answer and I'll approve it.

The "Bloom Color" parameter is actually a filter. It determines to what extent emission colors create a Bloom Effect. If it is set to white, the emission colors will not get filtered and therefor every possible combination of RGB values will create the desired effect with the corresponding color. Basically, the color of the Bloom Effect is the product of "Bloom Color" and emission color.


text:
Change Settings per Object, using 1 Material
The idea is that I want certain objects to light up at different keyed times.  However, the objects will all use the same material; it's settings will just vary per object at different times during the animation.
How can I do this using one material?  Is it even possible?
I have seen a similar question but it is not identical to this one, because it requires more than one material.

@RBlong2us: https://blender.stackexchange.com/help/someone-answers

yes you can do this e.g. with this node tree:

The value is just keyframed from frame 1 to 250 with values 1 to 250.
And i just add the frame with the y-location (with some calculations) and so i got different colors for my two objects on different frames.
result:

https://youtu.be/OkoA8kQhqQ4


text:
Wrap Text in Text Editor?
I would like to use the text editor to add comments in my blend files.  I would like the text to wrap so that it will automatically fit to the size of the text editor window.  Is there a way I can do that without code?

In the Text editor header go to View > Word Wrap.

Appreciate the quick answer man!


text:
Using Drives to affect Two Shape Keys with One Bone
I have an object with 2 different Shape Keys to make an edge rise and fall, depending on the rotation of one bone. (see the Image)

One of the shape keys raises the edge, and the other shape key lowers the edge.  The problem is I have no idea how to set up the drives so that the bone effects them the way I want.
If this is not clear enough, let me know and I'll try and make my question more clear.  All help is appreciated!

Rather than use shapekeys, a hook was used instead because it's seen as an object, not a vertice.  You can use a driver on that. (Blend file below)

Both gable vertices are 'hooked' to the Empty and a simple driver expression is used to adjust it's transitions.  The bone's rotation in the Z axis is driving it up and down.

Select the hook, go into the Graph editor and in the Window's header, select 'Drivers'.
Select the strip at extreme left to see the expression and other settings in the panel called 'var'. (all lower case) (setup details are below)
Depending on your preferences, when the file is reloaded Blender may ask you (in the window's header) if you want to reload.  It won't work without that.  It's to prevent possible nasties (Python code) from running without permission.
Setting up the Driver
Select the Hook and Right-click in it's Z LOCATION slot, and select "Add Single Driver"
Go into the Graph Editor and in the Window's header, open up the 'Drivers' window.  Press N to get the properties panel up and at extreme left, click on the Hook's strip.  That should open up the driver details as they stand.  Nothing is going to work until you do a reload from the Window's header.  As explained, you need that to allow your driver to run.
The one driver that's in there is called "var". (all lower case)
You can set that up to look at the Armature's rotation in the Z axis only and use that to take the current radial value of the bone and apply it to the height (Z axis LOC) of the hook.  As the bone rotates, it's degrees (value) changes and that's divided by 10 and tweaked with the "+.73" .  The expression you see in that slot is simply typed in.

Dude!  Thanks so much for the quick and awesome response!  It's perfect!

Thanks @RBlong2us . It's always a buzz to hear when people get there. :)

Keep up the good work, man! :D  Peace.


text:
Blender 2.79 to 2.8 Animation Error
I have a problem when I transfer my jelly fish Project from Blender 2.79 to 2.8. Everything works fine in 2.79 but in the render of 2.8 the bell of my jelly is rendered at the origin of it's parent object (an empty), even though everything looks fine in the viewport.
Any advice or is this a bug maybe?
Images:
https://i.sstatic.net/Lf4ju.jpg
File: https://drive.google.com/open?id=1tLCzx5cvcyOmlGbYImVYJ6Thq3f7OrML

I'm voting to close this question as off-topic because it is about issues with unfinished experimental development versions of Blender

No, please don't. The contributor is only unable to express the problem. Check the images and the blend file.


text:
How do I import a .max file and it's associated materials and textures into Blender?
This model is from Mortal Kombat X and it was downloaded from the website below...
http://p3dm.ru/files/5595_tournament-reptile_.html

After downloading all of the files, I see lots of ones that I don't know how to work with properly. I am completely new to Blender.
I really need help with all of these files: FBX, .max,.mtl,.obj,.tga,. But I don't know how to set them up and put all of Reptile's textures on him exactly how the image displays.
Additionally, I'm also planning on taking this model and export it to Gmod and play as him.
Again, I really do need help with these files.

Upload to drive or blendswap please

Hi, welcome to the site, for a first timer I appreciate the detailed question and I can understand your frustration but I believe the marked duplicate is a sufficient answer to this issue. Blender has no native support nor will it ever for files saved in Autodesk's proprietary formats and I don't believe there are any third party solutions not including 3ds max itself. Your best bet is probably to get access to 3ds max somehow (maybe a trial), load the file and export to collada or wavefront obj.

Actually that should not be necessary, the user mentions FBX and OBJ files in the archive. My blind guess is they are all the same model with different file formats so all the user has to do is import one of the other file formats. @Cruzen7 Just import the FBX file instead, it should contain the same information as the MAX or OBJ one. TGAs are for the texture files


text:
How do I animate emission with an audio file?
In cycles,
I want an audio file of speech to cause an emission surface to change the amount of emission strength to match the volume from the voice actor's audio file.
No sound = 0 strength
Loudest sound = 10 strength
How do I connect one event to control the other?
Also, can a specific audio file can be isolated to ignore other dialog and sound effects?

For convenience later on, I'll add a Value node, which you can connect to the emission strength or any other input.

Set a key on the property, which you want to be "animated" by the sound wave.

In the graph editor, execute Bake Sound to F-Curves.

Adjust the resulting F-Curve with an Envelope modifier, mapping the output from 1 to 10. Or map the input from 0 to 1 and add a multiply node in the cycles material nodes to multiply it with 10.

Why does it say "Set a key" what does that mean? The image shows connected nodes, doesn't seem to correlate.

@EricHuelin I added a few words to clarify. In my example, I added the Value node. Then I hovered over the Value Node's Value and pressed I to set a key. You can see the field being highlighted in yellow. This means it has been keyed and there will be a corresponding f-curve. I suggested setting keys and animating on a separate node, because it can be connected to whatever. Let's say you did all the animating in the Strength property of the Emission, but later on wanted to transfer the animation to a color ramp (as in my example), you wuold be stuck.


text:
Gltf-model export from blender. Materials are missing in a-frame
I'm trying to export to gltf correct. This model is using in a-frame.
The problem is that materials are missing after export.
In a-frame model is represented only in black color. Settings attached.
If somebody know how to solve this, please let me know. Thanks
[Blender model]

[A-frame]

[Export Settings]

glTF 2.0 specification only supports exporting PBR materials based on a metallic-roughness model.
Material support for Blender's glTF exporter only works for Cycles render materials at the moment.
And even then it requires a specific node setup to be used, as mentioned in the user documentation, through the use of a Node Group designed for this purpose. The node group is available for download from the repository.
For future versions, EEVEE material node tree support is planned, using the Principled BSDF Shader, but it is unavailable at the moment.
Also see .fbx export why there are no materials or textures?

Are you sure blender gltf work with nodes? I set up the material nodes based on doc, and textures are missing.

I based my answer in the documentation never tried it myself. Also see https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures


text:
Build long mesh along bezier curve while using different meshes
So how would you go about making a long piece of pipe and use different meshes along the way.
For example I have one perfect straight piece, one with a dent and another just like the first but with different UV map.
I know you can have caps but can you in some way build it from different pieces?
Ideally I'd like to have a bezier curve to control the placement and then Array+Curve modifier on the mesh to extrude it along the Bezier. But how do you add variation to that other than do it manually? Is there a way to add and align multiple bezier curves one after another?
I thought about vertex groups but bezier curves don't support them?

See https://blender.stackexchange.com/questions/113973/place-spawn-objects-along-curve-with-randomized-scale-and-rotation also https://blender.stackexchange.com/questions/68923/torus-object-stretched-in-array-curve-modifier

While OP seemed happy with the first link, I am skeptical it will actually solve the problem. Additional, the OP seems to be having issues with the provided answer, as they added an answer requesting help to the linked question. I suggest this be left open so a better solution to this specific problem (which is different) can be provided.


text:
Popup Dialog StringProperty File Icons Do Nothing

The dialog above is created with the code below. When I click on the file icon (see red arrow), nothing happens. Is there a proper way to get these to just work or at least point to a custom operator which invokes context.window_manager.fileselect_add(self) or something similar?
It really seems like the functionality I want should be built into the StringProperty when using FILE_PATH as a subtype... I must be missing something obvious.
What I am trying to do is execute a single operation that requires selecting more than one file path. I can invoke 2 fileselect_add's one after the other, but it becomes confusing because right when you click to accept the path the new path window opens immediately. It is just too confusing as to which one is being selected as there is really no way to customize the fileselect_add window to any usefull degree (as far as I am aware) to make it more obvious what the user is selecting.
Dialog code:
class mydialog(bpy.types.Operator):
        bl_idname = "tools.mydialog"
        bl_label = "My Dialog"

        inFilePath = StringProperty(name="input file", subtype="FILE_PATH")
        outFilePrefix = StringProperty(name="out prefix", subtype="FILE_PATH")

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

    def execute(self, context):
        print(self.inFilePath)
        print(self.outFilePrefix)
        return {'FINISHED'}

Not sure why the file button doesn't work (your operator may be blocking context changes) but I believe you will find this idea won't work. Selecting a file will take the user to the file open window, which will dismiss your dialog. You may need to create a panel in the tool or properties panels for this to work.

There are certain limitations, e.g. popups can't redraw (so no dynamic layout like in panels), buttons work only once, and the modal file selector can't be invoked from certain context (e.g. from inside a running file select operator).

@CoDEmanX I'm stumped by this same issue as OP.  How does a generic popup launched by context.window_manager.invoke_props_dialog qualify as a file select operator, so modal file selector can't be invoked from the button?

Blender is designed to work non-modal as much as possible. Popups are used rarely, actually only if a certain operation is known to take a long time and thus is expansive to re-run using F6/Redo panel with new settings. The user is asked before the operation in such cases. I haven't looked at the C code, but I guess a popup is similar to a blocking modal op, and a file selector is the same. They can't both run at the same time. You should add file path properties to a panel, but it can't be in a modal file selector's sidebar.

You can use a CollectionProperty if you really need to let the user select multiple files (in different folders).
The following code invokes a file selector, that let's you add the current filepath as well as the selected files to a list. It allows for several input/output paths. It won't add duplicates, and you can also remove entries.
(The example operator is derives from the File Export template, but Add Files doesn't make much sense for an export operation - use it for imports instead!).

import bpy
from bpy_extras.io_utils import ExportHelper
from bpy.props import StringProperty, IntProperty, CollectionProperty
from bpy.types import Operator
from os.path import dirname, join

class AddFile(Operator):
    bl_idname = "export_test.add_file"
    bl_label = "Add File"

    filepath = StringProperty()

    @classmethod
    def poll(cls, context):
        op = context.active_operator
        return op.filepath not in (f.name for f in op.file_list)

    def execute(self, context):
        item = context.active_operator.file_list.add()
        item.name = self.filepath
        return {'FINISHED'}

class AddFiles(Operator):
    bl_idname = "export_test.add_files"
    bl_label = "Add Files"

    filepaths = CollectionProperty(type=bpy.types.PropertyGroup)

    def execute(self, context):
        file_list = context.active_operator.file_list

        for fp in self.filepaths:
            if fp.name not in (f.name for f in file_list):
                item = file_list.add()
                item.name = fp.name
        return {'FINISHED'}

class RemoveFile(Operator):
    bl_idname = "export_test.remove_file"
    bl_label = "Remove File"

    index = IntProperty()

    @classmethod
    def poll(cls, context):
        return len(context.active_operator.file_list) > 0

    def execute(self, context):
        try:
            context.active_operator.file_list.remove(self.index)
        except IndexError:
            pass
        return {'FINISHED'}

class ExportSomeData(Operator, ExportHelper):
    """This appears in the tooltip of the operator and in the generated docs"""
    bl_idname = "export_test.some_data"
    bl_label = "Export Some Data"

    # ExportHelper mixin class uses this
    filename_ext = ".txt"

    filter_glob = StringProperty(
            default="*.txt",
            options={'HIDDEN'},
            )

    # special prop, blender fills it with all selected files if present
    files = CollectionProperty(type=bpy.types.PropertyGroup)

    file_list = CollectionProperty(type=bpy.types.PropertyGroup)
    file_list_index = IntProperty()

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

        row = layout.row(True)
        row.label(bpy.path.basename(self.filepath))

        row.operator(AddFile.bl_idname, icon='ZOOMIN').filepath = self.filepath

        props = row.operator(AddFiles.bl_idname, icon='ZOOMIN')
        folder = dirname(self.filepath)
        for f in self.files:
            item = props.filepaths.add()
            item.name = join(folder, f.name)

        row.operator(RemoveFile.bl_idname, icon='ZOOMOUT', text="").index = self.file_list_index

        layout.template_list("UI_UL_list", "AddFiles", self, "file_list", self, "file_list_index")

    def execute(self, context):
        for f in self.file_list:
            print(f.name)
        self.report({'WARNING'}, "\n".join(f.name for f in self.file_list))
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.export_test.some_data('INVOKE_DEFAULT')


text:
How can I draw in the 3D view with Python?
I want to write a script for blender, and I wonder how can I draw something using python in the 3D view? Like lines or triangles? I mean something like debug drawing.

do you know OpenGL ? there is bgl ( blender opengl wrapper )  you can use

Start by looking and experimenting with TextEditor -> Templates -> Python -> Operator Modal Draw

related : http://blender.stackexchange.com/questions/912/draw-geometry-on-screen-using-bgl-module and http://blender.stackexchange.com/questions/21463/draw-points-on-screen-with-bgl-python


text:
Export multiple objects to .obj
It is possible to export all object from a scene into different obj files (each object in a obj file separately)?

There doesn't exist a way to do this in the options of the obj importer so what you could do is run a script that loops over the items in your scene,
check if it is a mesh and export the current selection to its own file relative to the path your blend file is saved.
Blender 3.1+
As of Blender 3.1.0 the name of the operator has been changed to obj_export() and is now part of the WindowManager namespace bpy.ops.wm.obj_export(filepath="//"):
import bpy
import os

# Get the path where the blend file is located
basedir = bpy.path.abspath('//')

# Deselect all objects
bpy.ops.object.select_all(action='DESELECT')

# loop through all the objects in the scene
scene = bpy.context.scene
for ob in scene.objects:
    # Select each object
    ob.select_set(True)

    # Make sure that we only export meshes
    if ob.type == 'MESH':
        # Export the currently selected object to its own file based on its name
        bpy.ops.wm.obj_export(
            filepath=os.path.join(basedir, ob.name + '.obj'),
            export_selected_objects=True,
            )
    # Deselect the object and move on to another if any more are left
    ob.select_set(False)

Blender 2.8+
As of Blender 2.8.0 the selection attribute (Object.select) has been removed in favor of get/set functions Object.select_set(State) and Object.select_get() to set and get the current selection state of each object:
import bpy
import os

# Get the path where the blend file is located
basedir = bpy.path.abspath('//')

# Deselect all objects
bpy.ops.object.select_all(action='DESELECT')

# loop through all the objects in the scene
scene = bpy.context.scene
for ob in scene.objects:
    # Select each object
    ob.select_set(True)

    # Make sure that we only export meshes
    if ob.type == 'MESH':
        # Export the currently selected object to its own file based on its name
        bpy.ops.export_scene.obj(
                filepath=os.path.join(basedir, ob.name + '.obj'),
                use_selection=True,
                )
    # Deselect the object and move on to another if any more are left
    ob.select_set(False)

Blender 2.7x
import bpy
import os

# Get the path where the blend file is located
basedir = bpy.path.abspath('//')

# Deselect all objects
bpy.ops.object.select_all(action='DESELECT')

# Loop through all the objects in the scene
scene = bpy.context.scene
for ob in scene.objects:
    # Make the current object active and select it
    scene.objects.active = ob
    ob.select = True

    # Make sure that we only export meshes
    if ob.type == 'MESH':
        # Export the currently selected object to its own file based on its name
        bpy.ops.export_scene.obj(
                filepath=os.path.join(basedir, ob.name + '.obj'),
                use_selection=True,
                )
    # Deselect the object and move on to another if any more are left
    ob.select = False

To further tweak your export options, see the parameters that
bpy.ops.export_scene_obj() accepts.
For example, you can include normals with use_normals=True, change forward axis with axis_forward etc.
There are more stringent checks that could be made but for simple use cases and if used properly, this should suffice.
Also see How to batch import Wavefront OBJ files?.

To have it export only selected objects, comment line 7 and change line 11.
# Remove
bpy.ops.object.select_all(action='DESELECT')
# Change to this where instead of the entire scene, we only look through selected objects
for ob in bpy.context.selected_objects:

or keep line 11 and add another line
for ob in scene.objects:
    # Add the check to see if in selected objects here
    if ob in bpy.context.selected_objects:
        # adjust indentation
        ...
        ...

NB: Make sure the layers you have objects on are selected otherwise you will just get an empty file.

ok, thanks. And how i control options of export with your script (the scale, the axis...)?

@GabrielS all the options that you can pass to bpy.ops.export_scene.obj are here, http://www.blender.org/documentation/blender_python_api_2_69_release/bpy.ops.export_scene.html#bpy.ops.export_scene.obj

@iKlsR, best only link to _release pages, we delete blender_python_api_2_69_4 dirs occasionally.

@iKlsR your script work fine and i have custome it to fit what i want.
One more thing. how can i modify the script to export only selected objects?
Thanks

@GabrielS updated answer.

Maybe obvious to some, but I didn't realize for a bit that the layer had to be selected. Otherwise empty objects are exported.

@Sprunth Thanks for that, I'll take your word for it and update accordingly.

For anyone using Blender 2.8, use bpy.context.view_layer.objects.active for the active object selection.

Following Add-on allows to batch export the current selection or simply all scene geometry objects as separate wavefront .obj files. All usual options like Apply Modifiers or Write Materials are available in the Properties Panel N too.
Repository: github.com/p2or/blender-batch-export-wavefront-obj

io_batch_export_objs.py (updated for 3.6+)
# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>

bl_info = {
    "name": "OBJ Batch Export",
    "author": "p2or, brockmann, trippeljojo",
    "version": (0, 5, 0),
    "blender": (3, 6, 0),
    "location": "File > Import-Export",
    "description": "Export multiple OBJ files, their UVs and Materials",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Import-Export"}

import bpy
import os
from bpy_extras.io_utils import ExportHelper

from bpy.props import (BoolProperty,
                       IntProperty,
                       FloatProperty,
                       StringProperty,
                       EnumProperty,
                       CollectionProperty
                       )

class WM_OT_batchExportObjs(bpy.types.Operator, ExportHelper):
    """Batch export the scene to separate obj files"""
    bl_idname = "export_scene.batch_obj"
    bl_label = "Batch export OBJ's"
    bl_options = {'PRESET', 'UNDO'}

    # ExportHelper mixin class uses this
    filename_ext = ".obj"

    filter_glob = StringProperty(
            default="*.obj;*.mtl",
            options={'HIDDEN'},)

    selection_only: BoolProperty(
            name="Selection Only",
            description="Export selected objects only",
            default=True,)

    scale_factor: FloatProperty(
            name="Scale",
            min=0.01, max=1000.0,
            default=1.0,)

    axis_forward: EnumProperty(
            name="Forward Axis",
            items=(('X', "X", "Positive X Axis"),
                   ('Y', "Y", "Positive Y Axis"),
                   ('Z', "Z", "Positive Z Axis"),
                   ('NEGATIVE_X', "-X", "Negative X Axis"),
                   ('NEGATIVE_Y', "-Y", "Negative Y Axis"),
                   ('NEGATIVE_Z', "-Z (Default)", "Negative Z Axis"),),
            default='NEGATIVE_Z')

    axis_up: EnumProperty(
            name="Up Axis",
            items=(('X', "X Up", "Positive X Axis"),
                   ('Y', "Y Up (Default)", "Positive Y Axis"),
                   ('Z', "Z Up", "Positive Z Axis"),
                   ('NEGATIVE_X', "-X Up", "Negative X Axis"),
                   ('NEGATIVE_Y', "-Y Up", "Negative Y Axis"),
                   ('NEGATIVE_Z', "-Z Up", "Negative Z Axis"),),
            default='Y')

    modifiers_apply: BoolProperty(
            name="Apply Modifiers",
            description="Apply modifiers to exported meshes",
            default=False)

    eval_mode: EnumProperty(
            name="Properties",
            description="Determines properties like object visibility, "
                        "modifiers etc., where they differ for Render and Viewport",
            items=(('DAG_EVAL_VIEWPORT',
                    "Viewport (Default)",
                    "Export objects as they appear in the viewport"),
                   ('DAG_EVAL_RENDER',
                    "Render",
                    "Export objects as they appear in render"),),
            default='DAG_EVAL_VIEWPORT')

    # GEOMETRY
    write_uvs: BoolProperty(
            name="UV Coordinates",
            description="Export the UV coordinates",
            default=True)

    write_normals: BoolProperty(
            name="Normals",
            description="Export per-face normals if the face is flat-shaded, "
                        "per-face-per-loop normals if smooth-shaded",
            default=True)

    write_colors: BoolProperty(
            name="Colors",
            description="Export per-vertex colors",
            default=False)

    triangulate_faces: BoolProperty(
            name="Triangulated Mesh",
            description='All ngons with four or more vertices will be triangulated. '
                        'Meshes in the scene will not be affected. Behaves like '
                        'Triangulate Modifier with ngon-method: "Beauty", quad-method: '
                        '"Shortest Diagonal", min vertices: 4.',
            default=False)

    write_nurbs: BoolProperty(
            name="Curves as NURBS",
            description="Export curves in parametric form instead of exporting as mesh",
            default=False)

    # MATERIALS
    write_materials: BoolProperty(
            name="Export Materials",
            description="Export MTL library. There must be a Principled-BSDF "
                        "node for image textures to be exported to the MTL file.",
            default=True)

    write_pbr: BoolProperty(
            name="PBR Extensions",
            description="Export MTL library using PBR extensions (roughness, metallic, "
                        "sheen, coat, anisotropy, transmission)",
            default=False)

    path_mode: EnumProperty(
            name="Path Mode",
            description="Method used to reference paths",
            items=(('AUTO', "Auto", "Use relative paths with subdirectories only"),
                   ('ABSOLUTE', "Absolute", "Always write absolute paths"),
                   ('RELATIVE', "Relative", "Write relative paths where possible"),
                   ('MATCH', "Match", "OMatch absolute/relative setting with input path"),
                   ('STRIP', "Strip", "Write filename only"),
                   ('COPY', "Copy", "Copy the file to the destination path"),
                   ),
            default='AUTO')

    # GROUPING
    group_by_object: BoolProperty(
            name="Object Groups",
            description="Append mesh name to object name, separated by a '_'",
            default=False)

    group_by_material: BoolProperty(
            name="Material Groups",
            description="Generate an OBK group for each part of a geometry "
                        "using a different material",
            default=False)

    group_by_vertex: BoolProperty(
            name="Vertex Groups",
            description="Export the name of the vertex group of a face. "
                        "It is approximated by choosing the vertex group "
                        "with the most members amoung the vertices of a face",
            default=False)

    smoothing_groups: BoolProperty(
            name="Smooth Groups",
            description='Every smooth-shaded face is assigned group "1" and '
                        'every flat-shaded face "off".',
            default=False)

    smoothing_group_bitflags: BoolProperty(
            name="Smooth Group Bitflags",
            description="Same as 'Smooth Groups', but generate smooth groups IDs as bitflags "
                        "(produces at most 32 different smooth groups, usually much less)",
            default=False)

    def execute(self, context):

        # Get the current folder
        folder_path = os.path.dirname(self.filepath)

        # Get all objects selected in the viewport
        viewport_selection = candidates = context.selected_objects
        if self.selection_only == False:
            candidates = [o for o in context.scene.objects]

        # Deselect all objects
        bpy.ops.object.select_all(action='DESELECT')

        for obj in [o for o in candidates if o.type == 'MESH']:
            obj.select_set(True)

            file_path = os.path.join(folder_path, "{}.obj".format(obj.name))
            bpy.ops.wm.obj_export(
                    filepath=file_path,
                    export_animation=False,
                    #start_frame=-2147483648,
                    # end_frame=2147483647,
                    forward_axis=self.axis_forward,
                    up_axis=self.axis_up,
                    global_scale=self.scale_factor,
                    apply_modifiers=self.modifiers_apply,
                    export_eval_mode=self.eval_mode,
                    export_selected_objects=True,
                    export_uv=self.write_uvs,
                    export_normals=self.write_normals,
                    export_colors=self.write_colors,
                    export_materials=self.write_materials,
                    export_pbr_extensions=self.write_pbr,
                    path_mode=self.path_mode,
                    export_triangulated_mesh=self.triangulate_faces,
                    export_curves_as_nurbs=self.write_nurbs,
                    export_object_groups=self.group_by_object,
                    export_material_groups=self.group_by_material,
                    export_vertex_groups=self.group_by_vertex,
                    export_smooth_groups=self.smoothing_groups,
                    smooth_group_bitflags=self.smoothing_group_bitflags
            )
            obj.select_set(False)

        # Restore Viewport Selection
        for obj in viewport_selection:
            obj.select_set(True)

        return {'FINISHED'}

def menu_func_import(self, context):
    self.layout.operator(WM_OT_batchExportObjs.bl_idname, text="Wavefront Batch (.obj)")

def register():
    bpy.utils.register_class(WM_OT_batchExportObjs)
    #bpy.types.TOPBAR_MT_file_export.append(menu_func_import)

def unregister():
    bpy.utils.unregister_class(WM_OT_batchExportObjs)
    #bpy.types.TOPBAR_MT_file_export.remove(menu_func_import)

if __name__ == "__main__":
    register()

    # test call
    #bpy.ops.export_scene.batch_obj('INVOKE_DEFAULT')

Note: The add-on is just a  wrapper of wm.obj_export() or export_scene.obj() operator in versions prior to Blender 3.2.0 until exporting multiple files is officially supported. To import multiple obj files see this answer: How to batch import Wavefront OBJ files?
Versions
To keep track of all the changes over the years I decided to create a dedicated repository instead of posting each version here, which makes it easier to download as well:

Blender
Addon Version
Release

Blender 2.74+
0.1.0
Download

Blender 2.80+
0.2.0
Download

Blender 3.1+
0.3.0
Download

Blender 3.3+
0.4.0
Download

Blender 3.6+
0.5.0
Download

Is there a way to export the object with the center of object for the mesh instead of the global origin?

I figured it out, I added a use_mesh_as_center option that sets the mesh's location to (0, 0, 0) before exporting and resets it back to its original after

Hi @p2or, thanks for the great answer. Do you know if there is a way to save modifiers along with the .obj, so that importing them later will preserve them? (I have a relevant question here: https://blender.stackexchange.com/questions/181143/create-mesh-in-scene-with-modifiers-export-and-save-it-then-load-later-with-mo)

.obj is a pretty old file format and doesn't allow to preserve any modifiers. Even when using alembic or usd, there is no way to preserve that (in 2020). If there is a serious reason to do that, I'd suggest to save all the modifier properties in a json string as text file and check for that file when loading the data back in. Cheers @ComputerScientist

Working example for Blender 2.8 to batch export, just change the path
import bpy

#example path to store files
path = 'path\subpath\name'

#store selection
obs = bpy.context.selected_objects

for ob in obs:
    #deselect all but just one object and make it active
    bpy.ops.object.select_all(action='DESELECT')
    ob.select_set(state=True)
    bpy.context.view_layer.objects.active = ob

    #store object location then zero it out
    location = ob.location.copy()
    bpy.ops.object.location_clear()

    #export fbx
    filename = path + ob.name + '.obj'
    bpy.ops.export_scene.obj(filepath=filename, use_selection=True)

    #restore location
    ob.location = location

#reselect originally selected objects
for ob in obs:
    ob.select_set(state=True)

For me iKlsR's method did not work when trying to export multiple meshes. I got all meshes in the first exported file. The other exports were rather random, some contained nothing, others contained 3 objects. I have changed some code around and it works for me now.

Method for exporting a selection.
import bpy
import os

# get the current path and make a new folder for the exported meshes
path = bpy.path.abspath('//objs' + os.sep)
os.makedirs(path)

for object in bpy.context.selected_objects:

    # deselect all meshes
    bpy.ops.object.select_all(action='DESELECT')

    # select the object
    object.select = True

    # export object with its name as file name
    bpy.ops.export_scene.obj(
            filepath=path + object.name + '.obj',
            use_selection=True,
            )

thanks for directing me here.  I had to modify your version a little more to get it to work on OSX.  path = bpy.path.abspath('//')
#os.makedirs(path)
It was creating a folder but not putting the .obj files into it and it was also prefixing all the names with "objs/"
Also, it crashed upon second run unless I deleted the empty folder it's trying to re-create.

feel free edit my answer, however the code i posted worked for me

For Blender 2.92.1
multiobj_exporter.py
import bpy
import os

basedir = 'absolute path'

sel_objs = [obj for obj in bpy.context.scene.objects if obj.type == 'MESH']
bpy.ops.object.select_all(action='DESELECT')
for obj in sel_objs:
    bpy.context.view_layer.objects.active = obj
    obj.select_set(True)
    bpy.ops.export_scene.obj(
        filepath=os.path.join(basedir, obj.name + '.obj'),
        use_selection=True,
    )
    obj.select_set(False)

the code worked with only background option like below because an context error occurred.
If anyone know the reason why, please tell me.
$ blender --background --python multiobj_exporter.py

Just Set This:

Untick All Other Settings And Set Only Obj Groups


text:
Blender 2.8 alt-lmb orbit view snapping
TL;DR What is this damn thing, and how do I turn it off?
I'm trying to work out a smooth workflow for using the new grease pencil object on an NTrig based convertible laptop.
The first problem with this setup is the lack of a keyboard in tablet mode, which I am working around by using an external keypad (old Nostromo n52, really handy!).
Second problem is that the stylus only has LMB (tip) and RMB (side button) which are not re-programmable, which means there's no MMB for orbiting (emulate three-button doesn't work). Luckily Blender has had alternate view control bindings forever: Alt+LMB to orbit, Ctrl+Alt+LMB to zoom, Shift+ALt+LMB to pan.
Now I have a new problem, there seems to be a new (to me?) feature for view-snapping. It is very hard to search for, and I've found no actual documentation of the feature. Unfortunately the shortcut is Alt-Orbit, regardless of how you orbit. The result is I can't orbit without the view randomly glitching/snapping around.
So the question is: does anyone know what this feature is called? And more importantly how to disable it?

While looking for another setting (Viewport roll) I found this under Preferences > Keymap > 3D View:
.
Removing those two entries (clicking the X) allows me to orbit smoothly!


text:
Best place to put bug reports?
What websites or other resources do users of Blender have available to them to report bugs or problems with the program?
I would like to get this issue cleared in Q&A format so that we can link new users with bug-report-style questions to this post.

https://projects.blender.org/blender/blender/issues
First, the most important thing to do is:

Make sure it's really a bug
We can only support the Blender binaries as have been distributed on
blender.org. First thing to test is therefore always if official
releases have the error. And if there's an error, test it with at
least one older official release to verify. This can reveal problems
with your graphics drivers for example, it's not likely that big
errors are there for many releases!
If the error is in current svn, try a build from someone else
(http://www.graphicall.org) or official test builds from (http://builder.blender.org) and when possible test it on another system.

The first thing users should do is try to consistently recreate the 'bug'. If you can repeat it, create a small and simplified test file (removing anything not needed to reproduce the bug) and submit it with a writeup of said bug.
Reports of "random crashes" or stuff that "breaks at unspecified situations" are unhelpful. Reporting them only creates noise and distraction rather than helping, if a developer can't reliably reproduce it he can't fix it.
If it is a graphical glitch, user interface corruption, viewport artifacts or any other issue related to graphics cards, the second step is updating your graphics cards to the latest available version. Make sure your GPU drivers are up to date, check the manufacturer site or the official brand site for newer versions. Many purported bugs in Blender are actually issues with the GPU that have recently been worked out in latest versions.
Likewise make sure there are no newly introduced known issues with the lastest drivers. Drivers themselves are also susceptible to bugs and some times newest versions introduce new issues. If you recently upgraded your hardware or installed updartes, rollback to last known good configuration and test if the issue is still there.
Reporting
The only place to report bugs is the bug tracker. Developers spend considerable time triaging new reports, avoid posting  duplicates. Browse through the already listed bugs in the tracker to see if someone else has already reported it, search using different keyword combinations to find similar issues. If nothing comes up then you would want to create an account, sign in and click Submit New to file a new bug report. The submission form is very intuitive and lists some guidelines for submitting reports. A .blend file must be attached. Try to make the file as simple as possible (remove anything not strictly necessary to reproduce the issue) and clearly write the steps you took to discover the bug.
You can also quickly reach the bug tracker from inside Blender by going to the Help > Report a Bug menu.

Bugs with user installed, third party or external addons, maintained by independent authors or companies not officially associated with the Blender foundation should be reported to the respective authors, not the official bug tracker.
For very simple problems or things users are not sure about, before filing a report, users can always visit the #blendercoders channel on freenode.net via the webchat to voice their concerns and or request clarification or tips from the developers.
Additionally, here are some more bug reporting tips from a developer.

It may sound annoying to follow all these steps, but remember that if
you don’t, the developers waste time figuring it all out themselves or
trying to coax the information out of the user for each bug. Some
developers like Sergey, Campbell (ideasman42), and Brecht (brecht) handle a huge number of
bug reports; you can really help them out by filling good ones.

You can also watch on YouTube How to Report a Bug in 5 Steps

1 Introduction
The right place to report bugs is Blender's bug tracker. Before you start writing your ticket, please read the following post. It will help you write a good bug report that allows developers to identify the source of the problem and thus fix the issue as soon as possible.

2 Preparation
The first step is to ensure that the issue is actually a bug in Blender and that you can provide enough information for others to
reproduce it on their system.
2.1 Minimum requirements
In order to run Blender properly, you have to ensure that your hardware fulfills the minimum requirements. The supported graphics
cards are particularly important. If your hardware is not supported, you may experience graphics glitches, crashes or may not be able
to start Blender at all. The developers do not provide support on the bug tracker for hardware that doesn't meet the minimum requirements.
Please note that the requirements for GPU rendering are higher than the minimum requirements for running Blender. In case you don't see any GPUs listed as render device in the preferences ("No compatible GPUs found for path tracing"), then this is most likely the reason why. It could also happen that your graphics driver is out-dated as explained in the next section.
If you're able to start Blender, you can get all the system information through Help > Save System Info.

2.2 Update graphics driver
Crashes of Blender or even the entire operating system can be caused by bugs in the graphics driver. Updating the graphics driver to the most recent version should minimize the likelihood that this is the cause of your problem. You may have to update the driver for both your integrated GPU and dedicated GPU.
Blender's manual provides additional information for troubleshooting on all supported operating systems.
2.2.1 Windows
The most recent driver for Nvidia, AMD and Intel graphics cards can be downloaded from their respective websites.
2.2.2 macOS
On macOS the graphics card driver is tied to the operating system version, therefore it may be necessary to update the OS.
At the time of writing the GPU rendering support for Cycles is limited. GPU rendering with OpenCL is only available in versions prior to 2.80 because Apple has deprecated their OpenCL compiler. GPU rendering with CUDA is only possible in versions before 2.9x because Nvidia discontinued the development of the CUDA Toolkit for macOS. For a more detailed explanation see this answer. As a consequence you may not find your GPUs listed as supported render device in the user preferences. This is not a bug.
2.2.3 Linux
Please note that OpenCL GPU rendering with AMD graphics cards on Linux requires the installation of the AMDGPU-PRO Driver. Consult your distribution's documentation to install and update the driver.

2.3 Reproducible steps and minimal project
Try to identify and write down a precise list of steps that result in the issue that you're experiencing. Ideally these instructions should allow to reproduce the problem beginning from the default startup file. If the problem only occurs in a specific project, try to create a minimal version of it. Remove anything that's not relevant to the issue.
The instructions should be detailed enough that anyone who is proficient in Blender is able to produce the same result that you're getting. Please use standard nomenclature in your description. Should you be unsure how certain parts of the user interface are called, consult the manual.

2.4.1 Test the latest versions
The issue may already be fixed in a more recent version of Blender. Test with both the latest stable release and the most recent daily build.
If you need to test a specific project file, create a backup copy of it. This is meant as a precaution, since files saved in a newer version of Blender may not open in the older versions of Blender that you're usually using. When you're trying to check if the issue still occurs in the most recent version of Blender, use File > Open to load the project file. Don't open the project file from your operating system's file browser as this may open a different version of Blender that is associated with the file extension.
In case the issue doesn't occur in the latest stable release, you should continue to use that version. If the issue is fixed in the daily build, you should continue to use your current version and update as soon as a new stable release is published.
2.4.2 Test previous versions (optional)
If you are able to, check if you can find the most recent previous releases of Blender that does not have the issue. This can help the developers to narrow down when the bug was introduced and what change has caused it. The portable releases (*.zip and *.tar.xz) don't require any installation, they just have to be extracted and thus allow for easy testing. You should not test further back than Blender 2.79b.

2.5 Check if it's a (new) bug
If you're unsure whether or not the issue is a bug, or if it could be a misunderstanding how Blender works, post a question on one of our community websites. For example:

Blender's chat support channel
Blender's StackExchange
blenderartists.org

In case your issue requires an enhancement or new feature in Blender, it's not a bug. Feature requests can be posted on right-click select.
Should you be fairly certain that it's a bug, verify that it hasn't already been reported. If you find an existing ticket that matches your issue exactly and others had trouble reproducing it, please add your step by step instructions in a comment.

2.6 Create a debug log
Blender can output detailed debug information when one of the debug CLI flags are used. If you're either experiencing a crash or Blender displays an error message, you should create a debug log file that can be attached to your bug report.
Additional log files with different CLI flags may be requested by the developers, but should't be provided up front.
2.6.1 Windows
Open Blender's installation directory and double-click on the blender_debug_log.cmd. This will start Blender in debug mode and create log files. Try to reproduce the error while Blender is open in debug mode. Close it once the error occured. The Windows Explorer should open automatically and show you two files. Copy them to a location that you know and attach them to your bug report in the following chapter.
In case Blender 2.9x or later crashes, it will create a crash log that contains valuable information about where the error occurred. This file should also be attached to your report. The location is determined by the environment variable TEMP. If you haven't modified this environment variable, it will point to C:\Users\[your username]\AppData\Local\Temp\ (replace [your username] with the actual username on your system). In order to locate the crash log, open the Windows Explorer (Win+E) and type %TEMP% into the path bar. The name of the crash log will be the same as your project file, but with the file extension .crash.txt. If you haven't previously saved the project before, it will be blender.crash.txt.
2.6.1 Linux
Open Blender and save the system information through Help > Save System Info. Open a terminal in Blender's installation directory and start Blender with the --debug and --debug-cycles flag. Redirect the output for both stdout and stderr to a file. The example command below places the log file in your home directory.
./blender --debug --debug-cycles > ~/blender_debug_output.txt 2>&1

Attach the system information and log file to your bug report in the following chapter.
In case Blender 2.9x or later crashes, it will also create a crash log that contains a stack trace. The file can be found in the /tmp directory. It will be named like your project file, but with the file extension .crash.txt. If you haven't previously saved the project before, it will be saved as blender.crash.txt. This file should also be attached to your report.
2.6.2 macOS
Open Blender and save the system information through Help > Save System Info. Open a terminal and start Blender with the --debug and --debug-cycles flag. Redirect the output for both stdout and stderr to a file. The example command below places the log file in your home directory.
/Applications/Blender.app/Contents/MacOS/Blender --debug --debug-cycles > ~/blender_debug_output.txt 2>&1

Attach the system information and log file to your bug report in the following chapter.
In case Blender crashes the macOS Crash Reporter will open and show you a detailed report with a stack trace. You should copy the text, save it in a text file and also attach it to your report.

3 Create the report
Create an account on developer.blender.org.
There are two different templates for reporting bugs, one for add-ons and one for Blender itself.
If you want to report a bug in an add-on:

Open Blender.
Open the preferences and navigate to the add-ons (Edit > Preferences > Add-ons).
Find the add-on you would like to report a bug for.
Check that it's an official add-on that is shipped with Blender. If it isn't, contact the developer directly.
The bug tracker is only for add-ons that are distributed with Blender.
Open the details section of the add-on and click Report a Bug.

If you want to report a bug in Blender:

Open Blender.
Use Help > Report a Bug.
Add which versions of Blender do not work.
Add which version of Blender works.

If you cannot open Blender and want to report a bug:

Use the bug report template.
Add your operating system and graphics card information.
Add which versions of Blender do not work.
Add which version of Blender works.

Once you've logged in you should see the submission template. Anything in square brackets should be replaced
with the information about your problem. Should you have trouble writing in English, then please write the report in your native language and include a machine translated text alongside.

Give your ticket a descriptive title. It should ideally explain what's broken and where.
Add a short description of your problem to "Short description of the error". You may include a screenshot
if the problem is hard to describe.
Add the detailed steps to reproduce the issue from section "2.3 Reproducible steps and minimal project" to
"Exact steps for others to reproduce the error".
Attach your system information file, debug log and crash log to the bug report by pressing the upload button or dragging and dropping the file into the browser window.
Attach your .blend project file (only if the bug can't be reproduced with the default startup file).
Click "Create New Task" to create the bug report.

3.1 Example of a good bug report
Title: Crash using color drag and drop in the image editor
**System Information**
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30

**Blender Version**
Broken:
 - version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: `rB375c7dc4caf4`
 - version: 2.83 (sub 12), branch: master, commit date: 2020-04-06 15:48, hash: `rB71a52bbe2a2e`
Worked: 2.80

**Short description of error**
Blender crashes when dragging and dropping a color onto the texture in the image editor.

**Exact steps for others to reproduce the error**
 1. Open the Texture Paint workspace.
 2. Create a new texture in the image editor.
 3. Put the mouse cursor over the current color in the header and drag it onto the texture.

4 Triage and bug fix
Once your bug report is submitted, volunteers and developers will try to reproduce the issue. They may have additional questions, so check once in a while if somebody has left a comment on your ticket. If the status of your ticket is "Needs information from user" and you do not reply within a week, the ticket will be closed.

Do not assign the task to anyone (unless they've told you to).
Do not change the status.
Do not change the priority.
Do not change the edit policy.
Do not edit parent or subtasks.

The ticket will then go through the "Life of a Bug". Once the bug is confirmed the developers will try to fix this as soon as possible. Please be aware that the developers get many bug reports and the more serious ones are being prioritized. It may take a while until the issue is fixed.
Please be kind, many of the people helping on the bug tracker are volunteers and our developers are working as hard as they can.


text:
Difference between Add Shader and Mix Shader?
What's the difference between Add Shader and Mix Shader nodes with the Cycles rendering engine?
I know that Mix Shader gives you more control over the material ratio, of course, but are there any important differences between using an Add Shader and a Mix Shader with ratio set to 0.5?

Add Shaders aren't necessarily physically correct. Simply put the values of the two input shaders are added up for every pixel
value_out = value_1 + value_2

It is possible to reflect more light than received.
If you mix two shaders with the Mix Shader Node you get more physically correct values because it calculates a weighted (by the Fac param) average
value_out = value_1 * Fac + value_2 * (1 - Fac)

This way you reflect at most as much light as you receive provided both inputs are physically correct.
When in doubt use the Mix Shader.

Sorry, @Maccesh. I hope it doesn't look like I'm stealing your answer, I just never posted my answer that I started working on this morning. . . Might as well post it. +1, btw.

Generally you'll want to use the Mix Shader to combine BSDF, Subsurface Scattering and Holdout nodes. For Emission and Background nodes Add Shader is ok.

@brecht What about with translucent BSDFs? (translucent+diffuse?)

For translucent BSDFs you still want to mix. A photon that hits a surface can either reflect or transmit, not both.

Both shaders have this in common: They are used to combine or put shaders properties together. The difference I would give is that the mix shaders takes the property of one shader e.g diffuse and mixes it with the property of another, say glossy shader.
However, in this case, the mix will be dependent on the factor value. The factor has a proximity of zero to one. By default, the factor value will be 0.5. Setting it to 0 would mean that you get the property of one of the shaders without the other. This will again depend on how you have connected the nodes; either the upper or the lower.
Setting the factor to 1 will get you the absolute property of the other shader. This is very different in the add shader. Taking the example above, and replacing the mix shader with the add shader, we get different results. As its name goes, this adds the property of the two materials.
To mention, this add shader should be used in specific materials since not all materials will add up desirably. Additionally, add shader doesn't have a factor since it cannot. Remember we are adding two properties together and the rule of math is. 1+1=2. Adding a diffuse to another diffuse will make it brighter, sometimes very unpleasant. Adding a diffuse on top of a glossy shader will give you a diffuse material a bit brighter than the original one but no glossy at all. In math you cannot add X and Y and arrive at an absolute answer. But you can add X and -X to give you zero.


text:
How to change Blender's default startup settings?
How can I change Blender from the default cube/lamp/camera default setup? Also, is it possible to change other features, such as the default view direction (Top, Side, etc) or the Editor type (3D View, Node Editor, Graph Editor, etc)?

File > Defaults > Save Startup File (also bound to Ctrl + U in the 2.7x keymap)  will save your current settings and setup as the default startup view, meaning it will set everything as the default including the current view(s), whatever data is loaded (images, models), and the User Interface. This overrides the startup .blend file found in the config folder and can be used on another machine or similar version of Blender.

You can revert back to the factory defaults at any time by using File > Defaults > Load Factory Settings.

see related http://blender.stackexchange.com/questions/78/how-would-i-import-export-blenders-preferences/82#82

In Blender 2.8, it's: File -> Defaults -> Save Startup File, and File -> Defaults -> Load Factory Settings.


text:
Is it possible to make Blender prompt to save on exit?
Does Blender have a setting or addon that makes it prompt you to 'save unsaved changes' when you close the window like other applications? I cannot count the number of times I have lost small pieces of my work because I exited the program just to check if I had made any changes.

Yes, (But only on MS-Windows) open User Preferences and look under Interface, you should see a checkbox with Prompt Quit beside it.

Additionally, or preferably you can use CtrlAlt + U to save it and make it load with your other defaults.
About Macs:
Closing the app with CmdQ invokes the save prompt. Quitting with CmdW doesn't. (possible bug?)
The only indication that you haven't saved is the 'dot' in the red, close-window  button, top left of the window.

To bad it doesn't work on linux..

@gandalf3 you have to use Ctrl + Q, updated my answer.

hm.. I know about Ctrl + Q, but never really used it..

On Mac, Cmd+Q does invoke the 'wanna save?' prompt. Cmd+W doesn't.

@MikePan thanks for clarifying this. Can you add it to the answer please.

Why not Ctrl + Alt + U to save user preferences only? Ctrl + U would also save everything else (e.g. scene objects) to startup file

Ctrl + Alt + U does not save the user preferences, only opens the window. (you must still click "save user settings").
I just tested the Prompt Quit setting, but it doesn't seem to do anything? clicking the "X" at the top of the window closes blender without any prompts.

@gandalf3 That's odd. You have to save once and have unsaved changes for it to prompt. This works for me on windows.

Additionally, Blender auto saves to a temporary directory every 5 minutes by default,
(settings located in User Preferences > File)
It also automatically saves a "quit.blend" file in a temporary directory when it has exited. (This is recoverable by going to Info > File > Recover last session)
Blender even saves backup files in the directory that your file is saved in
(foo.blend1, blend2) for a more permanent backup.
See this question for more info on this.. Blender saves a new file every time
All of this is default behaviour.

Also

that star indicates unsaved changes.


text:
How can I make sharp geometric 3d models look more realistic?
I'm making a scene in Blender with manufactured mechanical and electrical objects - cylinders, metal objects and so forth. I want to make these look real, be fully present with a sense of mass and substance.
3DCG has a tendency to make everything very sharply geometric, often looking mathematical and artificial. In other scenes, some organic curves, normal maps or particle systems would help make object look real. Like for example, making a simple plastic dog model look more believable, one can add more vertices for better definition, add texture layer, add fur etc.
My scene shows clean resistors, wires, metal strips and such, all sharply geometric. It's tricky to find ways to make the result less mathematical and more substantial, realistic and interesting to the eye.
What are some effective ways to add realism to these objects?

For one, you can bevel your objects.

Forgetting to bevel or chamfer edges is one of the most common errors
committed by beginning 3D artists. There are almost no razor sharp
edges in nature, and even most man-made objects have a slight
roundness where two opposing surfaces meet. Beveling helps bring out
detail, and really sells the realism of your model by allowing edges
to properly catch highlights from your lighting solution.

In object mode you can bevel an object by using the Bevel modifier and in edit mode you can bevel edges and faces with Ctrl+B and vertices with Ctrl+Shift+B. The latter will allow you to interactively adjust the amount of segments with the mouse wheel.
Using the modifier.
Take a sharp object you just made, say a simple step. It's plain, simple and ugly when you look at it and would look out of place in almost any scene aiming for realism.

Once beveled, the edges are softened and it just looks more appealing as this is what we are used to in real life. This can be a very subtle effect or an exaggerated one as essentially it just helps to catch light and help show off the shape and detail of the object better.
(It can be a bit hard to see in the viewport at times with the default lights but makes all the difference when rendering with proper lamps)
Here is the bevel modifier with some optimal settings, increasing the value in the Segments slider will make the edge geometry start to approach what is more commonly called a Fillet, effectively rounding your edges. Do be warned however, as adding extra segments creates additional geometry.

Here is another look at how beveling effectively softens your edges.

Some advantages of beveling over other methods are:

It's cheaper than subsurface, meaning it renders faster and weighs down your scene less.
For hardsurface models, it softens or adds realism to your edges easily and effectively.
It's faster to do and gives you more control when compared to other methods such as using creases and or subsurf with edgeloops.

At the time of writing, this is now easier than ever. Cycles will have a Bevel Shader.
Example from Mike Pan on twitter.

Resource links

Example renders https://developer.blender.org/D2803#65805
Discussion thread https://blenderartists.org/forum/showthread.php?436279-V-ray-got-rounded-hard-edge-shader&p=3230688#post3230688
More discussion and examples http://polycount.com/discussion/comment/2570081/#Comment_2570081

The link to the article that is quoted has since changed. I found it here: https://www.lifewire.com/increase-the-photo-realism-in-your-renders-2120

I've found that a good lighting rig goes a long way towards helping the realism of any scene. If you're looking for less harshness and a less geometric/calculated look, you should try enabling Ambient Occlusion in your renderer.

As you can see here, the modeling is rather basic (not to rag on the author), but the soft lighting effects of the ambient occlusion calculations reduce the sharpness.
Just keep in mind that this won't be a silver bullet; you still need other parts to make a good lighting rig, but that's a lot more involved than a single answer.

The Bevel method iKlsR mentioned is the fastest way, but possibly the most realistic method is to use two subdivision modifiers.
Using Subdivisions:
You need to have two subdivision modifiers, one as "Simple" (the first one in the stack) and the other as "Catmull-Clark".

NB: Subdivision modifiers are pretty heavy on viewport rendering, so if you don't need to see the final results when modelling, you can turn the number of divisions down.
Here is an example:

You can tweak the modifiers to get the results that work best for you. You can also use this along with the bevel method as it provides even more realism, though I must warn you, you need pretty good hardware to handle this in real time.
Here is an example with an actual, useful model (a Helicopter):

Rendered version:

Why Simple + Catmull-Clark?
Simple subdivision preserves the shape of your object, and in fact "enforces" the corners and "hard" areas of the object. However, it won't always give you a natural look. Catmull-Clark smooths as it subdivides, which is something you could do manually, but it is better with the modifier unless you want control over just which vertices/edges/faces are affected.

Those are some unhealthy view levels.

@iKlsR my system has to take cough medicine every time I open these files ;)

@RolandiXor Why do you use the Simple subdivision modifier? Shouldn't the Catmull-Clark be enough?

Having a simple subdivision preserves the original shape better than the Catmull-Clark; if you just had the Catmull-Clark you'd lose a lot of your original shapes.

Thanks for that question, I'll add that info to my answer to improve it and help future readers.

Use the Bevel modifier on squared objects!

In addition to the good suggestions above, don't underestimate the impact of good textures. Even surfaces we consider to be "one-colored" and even, aren't. There are always small variations in the surface, either from wear-and-tear, dirt or just the material and manufacturing process in itself.
One classic trick is the "orange-peel-effect", which simulates the small bumpiness of, for instance, an orange. It's easy to set up, and is basically a bump map that is packed very dense, but with a very low depth.

realism is about carefully adding accurate imperfections. Whatever you attempt to model:

Take time to examine the real object close up. Either using images, find macro shots or if you have the item, use a magnifying glass.
Take note of small irregularities on the surface, maybe something bulges toward edges. (use a bump or normal map, or add geometry)
Study how light hitting the object behaves as you rotate the object. Maybe some parts are shinier than other. Are there texture changes from rough to shiny? use a specular map, and adjust your materials to behave like their real world counterparts.

Objects rarely have uniform bevel / fillet radii all over, so the specials menu w has a bevel option that allows you to manually set the bevel segments for edges, hit F6 to see which settings can be tweaked. This is a desctructive edit (ie, not a modifier), so have a good look at the result and undo as soon as possible if it's not satisfactory.
Even subtle texturing and bump mapping are very powerful ways to make low poly geometry appear more lifelike.
A quick Flickr search of circuit boards, reveals an abundance of ways that circuit boards are infact less 'precise' than their design plans suggest. Stuff can be tilted, slightly bent. Fixtured and holes can be placed slightly to the side of the outlines. The bore-hole can be uneven, jaggy edged even.

Beveling is by far the easiest thing to do and will have a very positive impact on your realism.
The other answer showed how to bevel with the bevel modifier. If you want more control, you can bevel edges in edit mode using CTRL + B, then dragging your mouse until you have a desired bevel amount.
If you want to bevel a single vertex use SHIFT + CTRL + B

nice, I forgot you could bevel verts.

You can also use vertex groups in the modifier for more control.

@RolandiXor, but you can't adjust the scale of the bevel, unless you do it manually.

One method that is often overlooked is the Edge Split modifier with objects set to Smooth. When you turn on smooth shading Blender tries to smooth out all of the faces. The Edge Split modifier will smooth only that are less than a specific angle which is 30 degrees by default. You can also mark selected edges as "Sharp" and they will show as if they are Flat shaded.


text:
Is there a way to convert procedural textures to UV maps without rendering a final image first?
I've often wanted to use procedural textures for UVs, but it seems that there is no simple way to do this from within the application. Is there some standard way to achieve this without first rendering a bunch of images and then stitching?

The only way to do this is to bake the render into an image.
Of course this requires you to first unwrap the mesh with non-overlapping coordinates ('Smart project' or 'Lightmap Pack' can help here to save doing it manually).
Note, this process could be automated through a script (probably someone has done this before, its not so hard to do for someone already familiar with our API).
For all selected objects:

Add UV layer
Unwrap.
Bake textures into the image.
Save each image to a name based on the object.