text:
How can I change a cross-sectional area of a solid by a percentage?
I have a geometry of an artery that I would like to expand, increasing the cross-sectional area by exactly 240%.
Is this possible? The fatten tool allows this expansion only by a fixed dimension, not a percentage.
Hopefully, the attached picture makes it more clear.

I should add that scaling the whole model wouldn't work, since I want the length of the artery to remain the same.

You can use the solution provided in your other question, but use a custom vertex group to limit the displacement to a specific area

@Gorgious, Displacement is an offset ... tricky, with  topology in your link, automatically,  to know the cross-sections at those points, and so set the offset as sqrt(2.4) of those .. ?

Oh right this won't work for precise displacement :)

Hello Robin and Gorgious, thank you for your replies. @RobinBetts I did not understand your comment very well, would you mind clarifying it?

Hi @Okra  .. in order to know by how much to offset a surface point by the right amount to increase, by a percentage,  the cross-sectional area it takes part in bounding,  then we somehow have to know that  cross-sectional area. Could you supply a sample of few branches of your  vascular system on https://pasteall.org/blend/, so we can try out some ideas? If your topology had been regular loops around the blood-vessels, then the loop-length would have provided an instant circumference... but, I think, no such luck. Is this a one-shot remodelling, which can take some time?

@Gorgious .. maybe ray-casting down the inverted normal across the vessel? Either with a shader, or gnodes?

Hmm yes right, but this look a bit too involved for answering in a single question :) Would need to make a few assumptions first, and seeing the topology in the other Q it might cause trouble for precise calculations

Here's a first shot using Geometry Nodes (Fields).
Each vertex casts a ray along its inverted normal, which hits the opposite wall of the blood vessel. the ray's length is an approximation of the vessel's diameter.
That can be used to calculate how much the vertex must be displaced along its normal, to scale the radius of the vessel at that point by the square-root of your [cross-sectional area] 's scale factor:

At the moment, in order to make this work reasonably..

The caps are removed so they don't partake in the transform. (They could be selected out by vertex-group, instead)
A Corrective Smooth modifier is assigned after the displacement, to dispose of wilder artefacts.

This shows the cross-sectional area of your sample being scaled by 2.4. The behaviour at branches is not too bad..
If you're interested in this route, there will probably be some adjustments that can be made to cover edge-cases, inconveniences... and of course, any suggestions for improvement are welcome.

Blender 3.0a, recent.

What a beautiful way ... :)

@vklidu Thank you! It's the kind of thing I want to use gnodes for.. modelling modifiers. There might be too many edge-cases for this job.. depends on desired accuracy.

Hello @RobinBetts, I tried to implement your method, but I see no difference in the final model. What could I be doing wrong? Here is my file: https://pasteall.org/blend/33841480df154ef8ab2ee2ce8ad3aeb0

@Okra I think this is the only difference between my 'Dilate' GN tree an your unnamed one. (confusing, because it doesn't show in the number-field). You can always just append my 'Dilate' Node Tree to your file. Other adjustments you might need are relative to scale. Make sure the maximum Ray Length is enough to hit the other side of the vessel, and so on. Working, here.

@RobinBetts, I switched from Edit Mode to Object Mode and I can finally see the alterations! Thank you very much for all the help.

You can try Displace modifier and offset by texture or vertex group using thickness data ... not perfect - since the way I know is calculated from face normal ray lenght. You can imagine like a distance from face to another face in direction of face orientation.  In your case it will generate some "glitches" in branches conections.
You can inspect them via Mesh Analysis > Thickness ...
the dark blue color or any other edged gradients.

The same result you can get via OSL shader ... Material with OSL script can be downloaded from here. Or you can check this thread if some of the other calculations fits better to you.
Because I didn't found a way to convert this data to Vertex Weight (to be used by Displace modifier) I used just a black&white baked texture for displace.
Smart Unwrap your object, use this material, add unconnected Image Texture node with a New texture. Keep node selected and hit Bake button with just Emit pass enabled.

Now use this texture in Displace Modifier setup and adjust Strenght.

It results with thicker offset on thick parts and thinner on thin weins, but I'm unsure if it mathematicaly fits to distancing 240% ... btw what is 100% in your case?

Nope that's alright, thanks for illustrating it :)

@Gorgious ... at the end I didnt use vertex weight ... I dont know how to generate such thing from normal ray lenght ... so I edit A to baked texture.

We have a circular cross section here.  The area is proportional to the square of the radius, so the radius is proportional to the square root of the area.  If the area increases from 1 area to 3.4 areas (a 240% increase), then the radius should increase from 1 radius to 3.4^0.5, or about to 1.84 radii.
Note that it doesn't actually matter that the cross section is circular.  Imagine that we have some arbitary cross section and then draw a circle around that arbitrary cross section.  The cross section is some fixed proportion of the area of the circle.  If we scale both the circle and the cross section (about any point!) then that proportion doesn't change.  Doubling the size of the circle is also doubling the size of the circumscribed shape.  No matter the cross section, scaling the verts defining it by x will increase the cross section by x^2.
If we have clean topology, we can select all of the circumferential loops in edge mode and simply scale about individual origins by 1.84:

If we don't have clean topology, and we have some kind of horrible point cloud, we can make a temporary mesh deformer that has decent topology and use that to scale the mesh instead:

Here, of course, we're exactly increasing the area of the mesh deformer's cross-sections, which isn't the same thing as exactly increasing the area of the deformed mesh's cross-sections.  However, as we use more and more geometry on the mesh deformer to more exactly approximate the original mesh, we approach perfect agreement.
You could make a deformer out of knife cuts from your original mesh, in which case you'd have perfect agreement:

Hello @Nathan, thank you for your reply. The geometry that I have does not have a constant cross-sectional area (nor is it always circular), so increasing it a fixed amount won't do. In addition, the length of the artery must remain constant, so I cannot scale the whole body.

@Okra Okay, but it doesn't mater if its circular.  If you scale verts lying in a plane by x, the area described by those verts will increase by x^2.  And I'm not saying to scale the whole artery.  Look at the pics: I'm scaling individual edge loops along their individual origins.  This does nothing to change the length of the artery, only the width.

@Okra I made a few edits that might make it more clear to you how this will work.


text:
Node for setting render colour, regardless of lighting
I'm trying to make a material node setup to set final render colors, regardless of lighting conditions. Is such a setup possible?

Not sure to understand well your question... If you want to render an object with an image texture applied, which is not affected by lighting, you can try with a simple "emission" shader with value of 1.

That's probably what I want.. I don't want the emission to affect nearby objects though.

I assume you mean a "shadeless" shader:

To create this you can use the Light Path node to make an emission shader which is visible only to the camera, letting other rays straight through with a transparent shader:

Casting shadows:
With a diffuse shader (or a holdout shader, black transparent shader, etc. anything that will cast a shadow and render fast) used instead of the white transparent shader:

You'll notice that there is some indirect lighting (in this case it's a slight orange tint to the shadow, because I made the diffuse shader orange)

If you don't want that orange tint, you can either:

Disable it per object by disabling Diffuse in Properties > Object > Ray visibility:

Disable it per material with the light path node:

Result:

I think you took care of my "unaffected by lighting" by using the emission node, so the transparency shouldn't be necessary. In your example, I really just wanted to make sure that lamps around the scene make bright orange on some parts of the object, and dark orange on others.

How do I make sure the light emitted from this object doesn't affect its surroundings? (this object should still cast shadows)

Oops! In my first comment, I meant that there shouldn't be some dark and some light orange... orange should be orange I'd like to make many different colours though, based on textures; I just don't want the final rendered shade to be influenced by lamps.

@ajwood In that case, use a diffuse shader instead of a transparent shader. Note that there will be some indirect lighting from the diffuse shader if you use that. If you really don't what the indirect lighting, there are some workarounds..

In the interest of learning, what kind of workarounds would there be to get rid of the indirect lighting?

@ajwood I have updated my answer.

That's great, thanks! I'm curious.. how did you hide the unused output sockets of the light path node in your screenshot?

@ajwood Ctrl+H (or header > Node > Hide unused output sockets)

Update:
In addition to Gandalf's answer above, I noticed that my white emissions shaders in Blender 2.8 using Eevee render engine were not completely white. I set the color to #FFFFFF and they still looked a little grey. The reason for this is that the Color Management is set to Filmic by default. For emission materials to render in the exact color they emit (from scene backgrounds to individual objects), you must change the color management to Standard:

Hopefully this helps some people who want to integrate 3D Blender graphics into a presentation with a perfect white background template (anything less than white would show a noticeable line).

When you import images as planes, they acquire a fully-fledged material, preset according to options which open up in the source file window.. like this, in Blender 3.61:

The indicated option will result in a surface which does not respond to environmental light. It's a bit more sophisticated than an Emission (explicit or directly connected):

It employs the group IAP_SHADELESS , shown below:

.. which, as far as I can reverse-engineer, is made that way so as not to respond to external lighting or shadows, while also not illuminating its surroundings, in Cycles.

source: Stack Exchange

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

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

sort: votes


text:
Best practices for learning Blender
When I get an idea for something I'd like to make in Blender, I hit up Google for specifics, then blender SE when I get stuck.
I'm very overwhelmed by the immensity of Blender and I'm a little afraid that this self-directed approach is going to lead me to develop bad habits. Is there a "best practice" way of learning to use Blender?

Open ended questions are generally a bad fit for Stack Exchange. It would be better if your question could have one, definitive answer, rather than any number of possibly correct, but highly variably, answers.

This type of question is considered off topic. However, there are links to a bunch of tutorial sites in the beginners reference on Blender.SE meta: http://meta.blender.stackexchange.com/questions/40/beginners-reference

Your question is valuable, but in my opinion goes more into the direction of project management and project organization within Blender. Maybe ask it at blenderartists.org

Yes blender is a large topic to learn.
I wouldn't be concerned with learning bad habits. Find a way to do what you need to do.
Over time you will come across different ways to do the same thing, some of them may be from new features added to blender, some will just be short cuts that you haven't found yet. You just need to stay open to the thought of always learning and be willing to try different ways of doing tasks.
Even the best of us do things differently today than we did 5 years ago.

You may wish to check out the Blender wiki. For instance, it has a series of articles on starting to use Blender for the first time, and it has many articles for specific topics.
Some tutorial websites you may find useful include:

BlenderCookie and their Blender Basics tutorial series
BlenderGuru, offering a tutorials of varying difficulty for specific tasks with general lessons
BlenderDiplom, another similar website

You can also ask for critiques on the BlenderArtists forum.
I would recommend checking the regular contests on websites like BlenderGuru and BlenderCookie. Even if you don't feel qualified to enter, give it your best shot – you may learn something along the way.

Blender is immense and does have a lot of features/functions, so you will find people have many different methods and workflows.
The best practice would really be learning how to use the necessary Hotkeys that you'll be using the most. If your goal is to create a decent model in the most efficient and time-conserving way possible, memorizing Hotkeys is important.
You can also check out http://darkscarab.com. Fairly small community for people who aren't comfortable with tons of people. The members are also quite knowledgeable and helpful.

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


text:
How to adjust operator settings after leaving the settings panel
I've added a torus knot using the the "Add Curve: Extra Objects" addon. I've done some work on the scene, and now would like to go back change the knot parameters that were in the operator settings when I first added the curve.
How do I get back to that panel to adjust operator settings?

Unfortunately, you can't. Once you perform another operation, the changes are set.
However, the operator should retain its last-used settings; you can delete the knot and re-add it, then change the settings to suit your liking.
If you want to change the settings before doing anything else, you can use the panel in the Tool Shelf, or press F6 in the 3D View to bring up the options for the last-used operator.

Is this general for all "add this special object" addons? Is it possible for an object to remember that it originated from an addon, in order to stay flexible to constructor parameters, if the addon was written with enough care?

This is the default behavior. I suppose it would be possible for an operator to write custom properties to the object or mesh datablock, and then have a "refresh" button or hook. However, I don't know of any addons that would do this.

Does that mean that if I add a tree with the "sapling" add-on, put in a lot of work to format it, and then later on, when I want to change something to the tree, I can't, unless I start all over again? It's all very well that the operator remembers its last settings, but what if I have ten trees, and want to re-edit the third. The operator then only has remembered the tenth (= last) tree ...

@TavernSenses Unfortunately, that's correct.

This is not the current behaviour for Blender nor the current crop of addons. There is a development proposals for editable object parameters on the wiki. I also seems to remember talk of a editable history stack like gSculpt in one of the Blender conference videos (but perhaps the current redo last step is all that was planed, I don't know).
I the mean time, a lot of primitives can be parameterised using modifiers.
For you torus knot the Surface setting when creating the torus are just the standard properties found under Object data.

Like @Aldrik said it is impossible by default in Blender, maybe in the future it will be changed. Anyway I can suggest you an addon where such things are possible.
It's called ArchitectureLab and available on GitHub. I have the same problem and decided to develop a plugin to make it possible modify object properties at any time in Blender. If you will require additional feature just make a request on the GitHub issues page.


text:
Animating slicing up an object
I'm animating slicing up something like this along the y axis:

I'm going to shave slices off the front until the whole block is gone.
My understanding is that the only way to do this is by having many pre-sliced meshes, moving them around together as one unit until it's time to make a "cut".
The above approach doesn't work because of the transparency:

What is the best approach I could take to animate slices coming off the front of this block?

I'm currently working on a script that keeps a "slices" list and a "remaining" list. With those, it adds keyframes which toggle visibility to show the next "remaining" mesh as each slice comes off the front. Is there a better way?

Oop... didn't see your comment when I made my answer. Short version, though: this is animation; it's naturally time-consuming. :P By the time you come up with a better way, you probably could have achieved the effect you're looking for using this method.

It's seriously hard on the head! Glad to hear I'm on the right track - excited to see how it turns out :)

A script like that could be massively useful when combined with the Cell Fracture addon for joining different shards and toggling visibility for them on the proper frames.. :)

@gandalf3, what I'm doing now is quite specific to my my block and the objects inside. If you can describe what a general purpose script would do, I can try to make this as generic as possible!

@ajwood Maybe this would be different.. (I think it would have to interact with rigid body simulation to know which objects came off first) See my question here: http://blender.stackexchange.com/questions/1871/rendering-transparent-objects-with-the-cell-fracture-addon

A common trick is to have multiple objects... not just for the slices, but also for the remaining chunks. You animate the visibility of the chunks in succession as each slice is made. This is taking a note from the stop-motion animation world. In effect, you're not animating slices so much as you're swapping in and out the sliced parts in order. When done right, it will look like the slab is being sliced up.

Dissolve slice
Use a Boolean modifier with and animated intersection object:

Chop slice

Add a Boolean modifier to your mesh and set the target boolean object.
Shift+select the boolean object and Object | Parent | Object (or Ctrl+P, o).

You can now use the boolean object to move the mesh without affecting the boolean operation.

With them both still selected Object | Duplicate Linked (or Alt+D), cancel the translation (Esc) and change the boolean operation type of the new mesh to Difference.

You should now have two half's that can be moved separately.

Finally create a shape key on one of the boolean objects that you'll animate to enable/place the boolean/chop.

This way, I get the "remaining" but lose the "slices." Perhaps it's unclear in the question, but having both is a requirement.

This is a neat trick though!

I want to animate shaving slices off the front of the block. To make it realistic, something needs to happen to the pieces that are shaved off, rather than simply disappearing.

I don't understand how your chop slice works, but it looks promising. Could you elaborate, or point to a tutorial that might explain some things?


text:
Animate Extending a Curve
How can I animate a curve extending? I'd like the animation to look like a circle extruding along the path.
I've found lots of tutorials like this, using the taper/bevel objects in the curve settings, but I'm trying to do to it without the funky taper off the front of the extrusion.

You can do this by using a Bézier extrusion with animated start/end values, which was added in Blender 2.65. You'll need two curve objects: the path and the circle (if you don't have a circle curve, just add a Curve → Bezier Circle).
First, select the path, and set its Bezier Object (under the curve options tab) to the circle. This will take care of the extrusion portion. To avoid the "funky taper," just don't set the taper object.
Then, animate the End Bevel Factor value. To do this, go to frame 1, and set the End Bevel Factor value to 0. Hover over it and press I, or RMB → Insert Keyframe to insert a keyframe. Then, go to the frame where you want the transition to end, set the factor to 1, and insert a keyframe again.
This image demonstrates the two key things to set:

NB Using the circle as a curve object allows you to have a more flexible swept object. If all you need really is a circle with no endcaps, just set the Bevel Depth to a higher value than zero and set the Fill to Full instead of Half.

Ahhh so simple. I've been trying unsuccessfully to understand the taper object... still don't get it at all, so thought I was missing something there.

The taper object adjusts the thickness along the length of the path. If you don't want this, don't use it.

If you want to animate the bevel of a closed path (cyclic), you won't be able to. You can, however, "break" a cyclic path and place a point exactly where the loop would "close", that way it'll look like it's a cyclic path but it won't be and you will be able to use the method mentioned above to animate it! :)


text:
Preserving the size of an object
If I import a Stanford ply mesh, scale it using S, export it, and import it again, the mesh data hasn't actually changed.
How can I use blender to scale the vertices contained in mesh data, and export them correctly or preserve the scale of the model?

I was unable to reproduce this, you can try applying the scale with Ctrl + A..

Ahhh I didn't know about the apply! Is this a stupid question, or is it worth leaving it up for other fools like me?

heh, It might be helpful as we've had a mix of these types of questions including some about armatures etc, I will post a short answer.

What version of blender are you using? 2.67 applies the scale on export so you dont need to apply scale.

I'm still on 2.62 - I need to get off the Ubuntu 12.04 repository and upgrade on my own.

@ajwood You could also use the irie PPA for blender, http://askubuntu.com/questions/169542/how-do-i-install-the-latest-blender-3d-builds-from-a-ppa (if you want the SVN versions that is)

I was unable to reproduce the case you mentioned above as all exporters bundled with Blender will always apply the scale on export and in some cases, you can choose to apply the modifiers and other things as well.
You more than likely missed or changed something or it is a bug, try updating the version of Blender you are using.

This is incorrect. the exporter applies scale on export so there is no need to apply scale manually.

@ideasman42 ..In forgetting that I was unable to reproduce his 'error', I forgot to mention that..

It must have been fixed between my version 2.62 and the current version. I've come across another importing 'error' but I'll hold my tongue until I'm running the most recent version :P


text:
Getting vertex weights with the vertex proximity modifier
I am trying to use the Vertex Proximity Modifier to update vertex weights and hoping to be able to read the same with Python.
I have a plane and a vertex group called "all" (which includes all the vertices and default weight 0.0) and the proximity object is set to a sphere. The modifier behaves as expected. But when I try the following code:
import bpy

obj = bpy.context.active_object # select the plane

for i in range(0, 24): # I know there are 25 vertices
    print (obj.vertex_groups['all'].weight(i))

I get 0.0 printed out for each vertex. Can I get the individual weight of each vertex with the modifier in action but not applied? (If I apply the modifier, then I get the intended results.)

Use bpy.types.Object.to_mesh:

to_mesh(scene, apply_modifiers, settings, calc_tessface=True, calc_undeformed=False)

Create a Mesh datablock with modifiers applied

This leaves your object unchanged and gives access to the modified vertex groups, e.g.
import bpy

mesh = bpy.context.object.to_mesh(bpy.context.scene, True, "PREVIEW")
for vertex in mesh.vertices:
    for group in vertex.groups:
        print(vertex, group, group.weight)

Works great! I was using bmesh - so I had to write it back to a mesh before this produced the expected results. Sorry I had missed giving the information about the bmesh earlier. Thanks a ton!


text:
Why does python need you to define a properties's existence?
I have the following for my code (working):
import bge
from bge import logic

def property(cont):
    own = cont.owner

    if 'Speed' in own and 'Recoil_Level' in own and 'Proportion_Size' in own:

        speed = own['Speed']
        level = own['Recoil_Level']
        size = own['Proportion_Size']

    else:
        print('No properties found in Weapon_Recoil_Level_Determiner')
        return

    own['Recoil_Level']= speed / size
    print("recoil level: ", own['Recoil_Level'])

cont = logic.getCurrentController()
property(cont)

Also, I have the following:
import bge
from bge import logic

def property(cont):
    own = cont.owner

        speed = own['Speed']
        level = own['Recoil_Level']
        size = own['Proportion_Size']

    else:
        print('No properties found in Weapon_Recoil_Level_Determiner')
        return

    own['Recoil_Level']= speed / size
    print("recoil level: ", own['Recoil_Level'])

cont = logic.getCurrentController()
property(cont)

Why won't the second one work? I am asking this because when I write scripts that include many properties, I do not want to have a really long, ugly paragraph saying "if x in own and if y in own and..." and so on. How can I make the second script work?

@zeffii I am having trouble with the code, I am not understanding how to cover it up correctly.

the second snippet is not correctly formed python code. Look carefully at it. You have an else without an if

@zeffii Ahh! Me too. Seems funny. I was in a rush and couldn't think of anything, but you are fine. :)

I'm voting to close this question as off-topic because it is a general Python question which isn't specific to Blender.

Although I think this is more a Python specific question, maybe an answer is still useful for style.
It is possible to use the all keyword
import bge
from bge import logic

def property(cont):
    own = cont.owner

    speed = own.get('Speed')
    level = own.get('Recoil_Level')
    size = own.get('Proportion_Size')

    if not all([speed, level, size]):
        print('No properties found in Weapon_Recoil_Level_Determiner')
        return

    own['Recoil_Level'] = speed / size
    print("recoil level: ", own['Recoil_Level'])

cont = logic.getCurrentController()
property(cont)

.get() is useful because it will return None if the key isn't present.

authors: НИКОЛАЙ  КЕРЕМЕДЧИЕВ


text:
Connect vertices where they would meet, not fill?
Lets say I have a plane, and I extrude two edges, it would produce a gap. I would like to fill this gap by using the projected intersection of the new outer edges. Shown in the right most example of the image below:

I can extrude the two vertices and fill the area, making the desired outcome. If I had used F to fill before I've made the vertices meet, the result would be a square with diagonal edges (the empty area would be filled and turned into a triangle, not a square).
For my situation, I am trying to do the same, except I am using a circle. If I simply hit F to join the two vertices I get the result seen on 3.
How can I connect the two vertices where they meet (shown in 4). Are there any tools to get the intersection or fill it automatically?

Possible duplicate of Add point to intersection of two edges

@GiantCowFilms - Which edges of illustration 2 are intersecting at the desired vertex position (shown in 4)?  I see no edges at all at that position.

In Blender, navigate to File > User Preferences... > Add-Ons and search for "f2". Enable this add-on:

So now, if you have the following extruded plane:

Select the vertex on the innermost corner of the face you want to create:

Now, press the F key, and the F2 add-on will complete the face, where the vertices should meet:

This doesn't work on other than square geometry.

You might want to try the tinyCAD addon.
Select the two extruded edges then choose w->TinyCAD->VTX Auto and you will get a vertex joining the two where they would intersect.


text:
Why does my PyDriver only update on frame-change?
I have created a driver using this expression:
bpy.data.objects["e1"].location.x**2/5
It works whenever I change the frame but I'd like it to work on redraw. One solution that won't always be appropriate is to select the driven object along with the driving object. Is there a more universal solution?

Don't use bpy.data.*** because blender won't know to create a dependancy between the objects (this is why updates are not working properly),
Instead:

add a driver variable with the button Add Variable.
select object ID type.
then enter "e1" as the object name.
the location channels X axis are default.

Now you can use the variable name defined by the driver variable in place of: bpy.data.objects["e1"].location.x.

I added a screenshot because the syntax of the path wasn't clear to me. Other than that it worked like a charm (:

Another way to do this (building on ideasman42's answer) would be to forsake Python altogether and use a couple different aspects of the driver interface: the polynomial generator and the transform channel option.
Why?

Python is not automatically enabled anymore. Your blendfile must be opened as "trusted" for any Python drivers or scripts to run.
It's more elegant. There's no need to use Python when all you want to do is a bit of math. This also makes it more legible (someone who doesn't know Python might have no idea what var**2/5 does), easier to maintain (there's a nice GUI interface instead of having to modify a scriptlet), and more flexible (you could easily change this to a cubic, quartic, etc. equation just by entering the coefficients; var**5/3+var**4*0.34-var**3/2+... doesn't look nearly as nice).
It could be faster. I don't know how or if the driver system optimizes the driver instructions, but it's certainly more likely that an explicitly specified arithmetic expression could be optimized than a Python-wrapped one.

How?
First, we'll change that RNA property to a vanilla Transform Channel property, and eliminate the Python, like so:

Then, we need to get that polynomial effect. Click Add Modifier Generator and input the following settings:

This will have the desired effect.


text:
SpaceNavigator in Linux: How to configure with Blender?
I have since yesterday a SpaceNavigator (from 3Dconnection).
I  got it to work with the demo apps (xcube and xvalue). *
But it doesn't do anything with Blender.
I did not find any posts about it except some "it will be possible in 2.48" or "there's a plug-in for 2.46" (should I use it? Because I have Blender 2.7. And how can we add a plug-in?).
I use Blender 2.7 and I wonder if there is something to add, or it's just something to configure in Ubuntu (13.10).
I watched many sites, but they all talk about 2.4_ or 2.5_, no 2.7 or even 2.6!
Every help is welcome! :)
*: Some informations about how I installed it (from the given CD):
 - I followed that (part of the official how to):
    cd /tmp
    tar xf /<cdrom>/3dxunix.tar linux   [where <cdrom> is the path to the root directory of your mounted CD]   (I replaced <cdrom> with the correct path)
    sh /tmp/linux/install-3dxunix.sh

I had an error:
error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory

and found an answer there: 3Dconnection forum
the install worked. -> I have now one "app" (the driver app?) : 3DxWare 1.6.0

I got it working for me under windows. good luck with getting ti to work on linux. For me it works out of th box, no driver needed

I got the old "spacePilot" one, and works great on Linux, no needs to install nothing... Just plugged in, start Blender and enjoyed a flight into my scene.

I set both buttons respectively to Shift and Crtl, and they work everywhere! Included in Blender! But the mouse doesn't want to move anything!

Support for Linux has been dropped by connexion years ago, so this answer will likely not work anymore, it is recommended that you use the spacenavd daemon which is now part of many distributions. Unfortunately, companies still purposefully ignore Linux and as a full paying customer I hate being ignored.

On Debian 11 sid edition and XFce it turns out that the UNPLUG the device by usb cable is causing system to logout without question. Beware of unsaved files!

First you need to install Spacenav, which I've found works very simply.

Install 'spacenav', I expect most Linux distros would have a package for this.
Run sudo spacenavd -v -d
Run blender, the 3D mouse will be detected, and printed in the terminal.

spacenavd can run automatically as a service but to begin with just execute in a terminal.
See spavenav's site, it has general info. I followed the Arch Linux 3D Mouse Instructions to get this working.

I exited 3DxWare 1.6.0 and installed spacenav (spacenavd in the Ubuntu software center) and it works straight forward! Thanks a lot! (just two little questions: By moving the mouse, I move my point of view. But how do I move the object? And can I custom the button actions?)

@tuxtoriel currently only view navigation is supported (though I think at one stage there was basic support for object movement), I can look into adding support for transform with 2.71 release.

Great, but is there any documentation on the default setting for the key mapping of the SpaceMouse (Enterprise) and where to change that how?
I understand that there is the configuration file for spacenavd, but there are also preferences in ´blender´.


text:
Memory efficient way to store many numbers (floats, ints) in a .blend file
For my addon I need to store large amounts of data in a .blend file (mostly floats, but other types are possible as well).
I tried using a normal CollectionProperty. Performance wise this works fine (with foreach_get and foreach_set). However some rough measures show that Blender stores roughly 128 bytes per float this way, which is quite a lot of overhead and therefor not really acceptable.
Is there a better solution to this problem?

Could a numpy array give less overhead and control of item size?

right, but I can't just store a numpy array in a .blend file afaik

Collections are indeed not ideal for this use case.
You can store raw arrays in ID properties, which will native data types that don't take up excessive space in memory or on-disk. eg:
bpy.context.object["my_array"] = [1.0, 2.0, 3.0]

You can assign from an array type too:
import array
data = array.array('f', [1, 2, 3])
bpy.context.object["my_array"] = data

Internally float values are stored with double precision (8 bytes per value), as with Python's floats.

I have two little follow up question, tell me if I should ask them in a separate question:

Blender uses only doubles here, right? Because even if I give it a memory view with floats, it seems to take twice as much memory as expected.
Is it possible to access this data more quickly? Like with foreach_set/get?

It seems like there always has to be a normal Python list as intermediate data type. Even when I have the data as raw array and Blender as well. This is not the case when I use a CollectionProperty (although there I have to create many items in a loop before I can use foreach_set).

For the float / doubles issue:
Let's say X is your double and you only need 3 decimals of precision...
from math import floor
floor(X * 1000)

Then store your value as an int to conserve space.
Divide by 1000 when importing to get a double value again.
If you need more precision, add a few more 0's on there.
7 decimals of precision...
floor(X * 10000000)

Divide by 10000000 when importing to get a double value again.
You'd conserve space, but it would take time to do the conversion.


text:
How to tell whether Object is a duplicate?
Say I duplicate (not linked duplicate) the default Cube, "Cube", N times and name the duplicates "Cube.001" to "Cube.NNN". How can I tell, aside from the name, that "Cube.NNN" is a duplicate of "Cube"? Is it possible to determine the object, that "Cube.NNN" was duplicated from? I need this for my export program to avoid exporting the geometry of duplicates.

The question doesn't if this is talking about object or mesh data.

You have a point, but the question, as it is, refers to pure object duplicates, with meshes and all else.

This can only be done reliably by comparing all the mesh data (every vertex, weight, normal, UV ...etc).
The automatic name given to newly duplicated objects is always the original name plus some postfix (.001, .002 etc). As soon as you manually rename the duplicates then that 'thin' link to their past also goes. When you duplicate using Ctrl+D you also duplicate the Mesh.
You can Duplicate linked (Alt+D), which creates a new object, but references the mesh of the original object. Duplicate linked does let you see where it came from. object.data.name

Because I don't think you'll find any quick solution, for future projects you might consider a naming convention for your duplicated objects so that they do include the name of the original.
If you named your duplicates with the convention
Cube -> Cube0, Cube1, Cube2, Cube3, Cube4

Then sure, then you do
obj = bpy.data.objects['Cube0']
original = obj.name[:4]
mesh_to_export = bpy.data.meshes[original]

Naturally not all objects will be duplicated from a Cube, you could use regex pattern matching if the naming convention is consistent. Some people don't like regex, but whatever. I'm assuming you know how to write a regex if you are writing an exporter.
Or even a loop to test if the obj.name starts with any of the following ['Cube', 'Plane'] etc.

I think OP is looking for a python solution.

yeah, but I mention the keyboard shortcuts anyway. I don't think there is a python solution, not something that would work retroactively anyway cross sessions.

@zeffii Thanks. Is the linked reference retained somewhere in the object?

mmhhh, but I think it's possible to compare the geometry even if it would take long time for calculation.

@poor Yeah, the comparison time is quadratic to the number of objects. The idea doesn't count :)

yeah @user1095108 the object.data.name will show the name of the mesh used.  --- @poor, yeah that's always possible, I think there's even a Mesh diff tool which can compare meshes, never used it..

@zeffi BTW: what happens when there's an overflow of duplicates >999?

@user1095108 it just keeps going, from memory .999 > .1000 >  .9999 > .10000 , after the first 3 I don't think there's any zero padding. you'd have to try..

It's possible to check the vertices of both meshes via unit_test_compare for a first quick test:
import bpy

first_obj = bpy.data.objects['Cube']
first_obj_mesh = first_obj.data

second_obj = bpy.data.objects['Suzanne']
second_obj_mesh = second_obj.data

print(first_obj_mesh.unit_test_compare(second_obj_mesh))

Console Output:

Number of verts don't match

For Linked Duplicates iterate through the mesh objects in the scene and check if mesh data block is associated with multiple objects:
import bpy

obj = bpy.data.objects['Cube']
obj_mesh = obj.data

mesh_dict = {}
for i in bpy.data.objects:
    if i.type == 'MESH':
        mesh_dict.setdefault(i.data, []).append(i)

print(mesh_dict[obj_mesh])

Note: Of course, it's always possible to compare the geometry, even if it would take long time for calculation and a bit of math, depending on your requirements.

I get the following error when testing your code: KeyError: 'bpy_prop_collection[key]: key "Suzanne" not found'

Add a monkey or any other geometry and rename it to Suzanne @HelloGoodbye

if object.data.users are bigger than 1, you already know that any of those meshes are the same than original so you can use any of them as "original".


text:
What techniques are used to begin creating new models?
What are the different methods for modeling something in blender? I know a few like mesh modeling and sculpting, but am interested in other methods to create shapes.

For "where to begin" questions, these guys -- http://cgcookie.com/blender/cgc-courses/mesh-modeling-fundamentals-blender/ -- and Andrew Price's Blender Guru site are the place to go. That said, Jonathan's tutorial (link above) is very comprehensive, and no single approach will work.

I would recommend you look at this WikiBook, I learned most of my modeling skills in it. http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro

@iKslr There are only so many approaches to modeling something, I think this is a very valid question. Topology questions are often more broad then this.

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

There really are only ~6 in blender, except for impracticable ones/not supported, the rest are derivatives:
1. Mesh modeling:
This is where you use edit mode, and move around, connect and disconnect vertices to form a shape.
There are a lot of sub-approaches, like extrude modeling and box modeling to name a few. As a rule, use extrude modeling if you're not going to have to eyeball proportions, since you can use the details from the start and work faster (like modeling off blueprints), and use box modeling for when your eyeballing stuff since it is much easier to adjust proportions.
Some people only like to do it one way, I'd try both and see what you like.
In this area Blender has very good tools.
2. Sculpting:
This is where you work off of a very high poly mesh, and form a shape by pushing vertices in large numbers to form a shape, this can produce very creatve and organic workflow, generally used form non hard surface meshes, although some people sculpt hard surface meshes.
In this area, Blender has quite good tools.
3. Curve modeling
This is where a form is created using joined curves, spline modeling. This technique has been largely fased out, but was popular in the 90's (I think)
The most famous form is NURBS modeling, where you can create surfaces between curves, but as I said few people now use that method.
Blender does have curve support, but no support for trimming or viewport UV's.
4. Procedural Modeling:
This is where code/modifiers does the modeling work. A good example is the displacement modifier, where a mesh can be distorted based on a height map. It is easy to create rock surfaces using this technique.
With code added, procedural modeling can go very very far, see these videos. https://www.youtube.com/watch?v=jOLhnwllpgs & https://www.youtube.com/watch?v=WP473rNZ_Eo
Blender's tool set here aren't so advanced, though there are external add-ons that can help: eg: https://github.com/nortikin/sverchok
5. Simulation
This is useful only for things like a fluid, liquid or gas/ it also is useful for modeling damage or clothing.
The fluid and to some degree the smoke simulator are limited, but the  cloth simulator is pretty well featured
6. Metaballs
These are basically shapes that are enclosed in what can best be descried as a shrink wrap shell... They merge together, making it easy to modeling something like a peanut. When they are separated sufficiency they split and go back to their original form. There are few practical applications I know of for meta balls in blender.
See: http://en.wikipedia.org/wiki/Metaballs (this example only shows a few but you can have 100's)
Other Methods of Modeling:
These mostly include scanning and photo-modeling, but Blender doesn't include tools to do this out of the box, you'd need specialized software for this.

Don't forget NURBS, Blender's NURBS isn't super expansive (though I have heard the devs are working on getting it up to speed) but it is still a method of modeling.

@PGmath That fell under curve modeling for me, as a subset... I think I could add some detail about that

You could include metaballs too.

@poor I wish we had that kind of procedural support, Houdini is probably one of the best tools in 3D overall because if its procedural workflow.

@ideasman42 I really don't see many uses for them, but sure, why not

There were more techniques with fancy names (something starting with r), that I don't see here, I'll post again, if I stumble on them again.

Could also include skin modifier. https://www.blender.org/manual/modifiers/generate/skin.html

I would leave out the ratings from the text as they are mainly opinion based. Sculpting is nowhere near 80/100 (compared to 3d coat, zbrush, mudbox). And in modelling 90/100 is also exaggerated since blender lacks good re-meshing workflow (only goodie being Bsurfaces). Thats just my opinion and others might not agree with it also..

@Jerryno They are rough estimates, blender's hard surface tools are very useable, its curve modeling is not, thats what the rateings are for.... if you have a better way, please do update :D

Removed ratings - This site is to answer questions about Blender, not to compare with other applications, If a feature is limited - say why, but comparing with various other apps is highly opinionated and not the purpose of this question. The question is asking how to create content, not Blender compared to All-other-3d-software, and such questions are off topic anyway. If users like to compare Blender with other applications there are user forums where you can find such comparisons.

sverchok is "parametric modeling" , I think procedural modelling uses a declarative language/grammar..whereas sverchok use a flow-control node system (Which can be used procedurally). The distinction may be subtle but worth pointing out.

Besides Mesh (Polygon) modelling in Blender we have support for most of the now standard techniques.
In no particular order, and non exhaustive
Sculpting
Sculpting aims to be a digital implementation of the workflow involved in the traditional Art of clay sculpture (start with a virtual ball of clay and push + pull + pinch + lay strips + carve + flatten + polish, etc). Made popular mostly by ZBrush, but has a fair implementation in Blender. This way of modelling has drawn a wide audience including non-traditionally trained artists, and can be used to generate both organic (soft-body) and mechanical (hard-body) shapes. A web search for the term "Blender Sculpting dyntopo" returns many examples to give you an impression of how far it can take you.
Boolean Modelling
Similar to the Set theory uses geometric algorithms to produce Union / Intersection / Difference of 2 selected Objects. In Blender this relies on the Boolean Modifier, and both meshes must be manifold (and not self intersecting). It allows for fast Carving of one shape from another, or joining two shapes together, or even extracting just the parts of two meshes that are in the same 3d space. Because the current implementation is Polygon/Mesh based the resulting mesh will often not be ideal for further manual editing where you might expect topology to be directly related to the contours and features.

Patch Modelling (Curves and Nurbs Surfaces)
With these forms of modelling the surface itself is not defined vertex by vertex by us, but by control points, knots, weights and interpolations. These surfaces remain defined purely in mathematical terms until you convert them to Meshes. Blender distinguishes between 2D and 3D Curves. While 2D curves are great for logos / typography and profile shapes, the 3D switch can take one Curve and use it as a profile along a trajectory. These techniques allow for non-destructive experimentation without dealing directly with the resulting mesh for as long as you want.
Parametric node based Modelling
At the moment (mid 2015) the PyNodes system Sverchok is the only Blender add-on that's explicitly aimed at generating geometry and has over 170 operator nodes. Sverchok takes its inspiration from Grasshopper for Rhino. Targetting architects and designers it assumes some knowledge of basic Vector and Matrix maths, familiarity with Linear Algebra isn't required but helps. If the names Zaha Hadid or Greg Lynn resonate you might want to investigate parametric modelling.
Skin Modifier
Similar in a sense to ZSpheres (if you know what those are), it allows you to define a basic edge based mesh and assign radii to each vertex, then it grows a 3d mesh around the structure. You will see this in a lot of Blender sculpting movies as a starting point.

There are a few ways to model from reality data these days. Generating meshes from scans/photos (photogrammetry) and modelling on top of such data, is an alternative workflow you might want to try out.
check out http://memento.autodesk.com/about .. may be you'll find it useful!


text:
How can I create a 3D repeating pattern on top of a flat surface?
Consider:

I try to create a pattern and project with shrinkwrap on an object...But the main problem is after deleting a face from the target object I have too many vertices to connect. I try to create a 3D pattern on that shape.

hello, I think it's not clear, could you please reformulate?

i want add 3d pattern on face of object, isnt problem on cylinder or cube but on different shape i cant

so how did you do the one you show?

i create plane and make square grid after that use poke face, alt J and insert after that get pattern on plane... that cut the plane to make size perfect to fit shape of object...but problem is bridge that plane with object...

Another solution is to use tissue add-on

Model your base shape:

Create a component shape (the shape on top of final object)

Select the component object first, and then the base object, and click tessellate.

Note that the order in which you select the objects is important with tissue, if selection is done in the incorrect order you will up with strange results.

Adjust options in redo panel F9

For this object, it was needed to merge by distance and extrude the bottom faces in -Z. This step may vary per object use case.
Also, can select border faces and Alt+E >Extrude Faces Along Normals to create an extended border around the object.

Result:

looks great i will try thx

I was only looking for this kind of thing last week. Will the result be manifold so it can be 3D printed?

I would think so. Blender comes bundled with 3dPrint Toolbox to perform checks before export for printing.

What you can do is create your plane, inset the faces, cut the shape with the Knife Project tool:

Inverse the selection, delete the faces:

Use ShiftG to select the areas, shift select the ones that it may miss:

Extrude up:

Switch to Pivot Point > Individual, scale down:

Now you just have to extrude the outer border to create the rest of the shape:

thanks man, u only reply on my 3 question and u help me a lot... i think about that what u suggest me but i wondering about more practical solution, if that is only way i will use that...thank again

Another solution is the Tissue addon, I'll try it and add to my answer if necessary. Edit: doesn't seem to work fine for this kind of case but you could give a try

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


text:
How can I apply (not add) modifiers to multiple meshes at the same time?
I have about 200 objects that all have the subdivision modifier added. I want to "apply" the modifiers (effectively "baking" the subdivisions to the meshes).
Is there a way to do this to all objects at once, or do I have to go through all 200 objects and manually apply the modifier to each one?

I’ll bet you can do it with python scripting. I’ll see about it in the docs…

I was able to achieve what I wanted by using ctrl+a and selecting "visual geometry to mesh". It worked in my case.

Here are are some Python scripts that could accomplish your goal, although I dislike being forced into using a programming language unless I need to do something complicated or repetitively.
In the following there may be some nuance as to how you select the objects to apply modifiers.
The simplest is to look at all objects, and apply the modifier if the object has the modifier of Subdivision:
import bpy

for obj in bpy.context.editable_objects:
    if "Subdivision" in obj.modifiers:
        print("modifier_apply: ",obj)
        bpy.context.view_layer.objects.active = obj
        bpy.ops.object.modifier_apply(modifier="Subdivision")

Or, let’s say they all have a common name like "My.Subd.*", so perhaps:
import bpy

bpy.ops.object.select_all( action='DESELECT' )
# get a list of objects with a name pattern
bpy.ops.object.select_pattern(pattern="My.Subd.*")
objs = bpy.context.selected_objects
print("objects are: ", objs)
bpy.ops.object.select_all( action='DESELECT' )
for obj in objs:
    print("modifier_apply: ",obj)
    bpy.context.view_layer.objects.active = obj  # set active object
    bpy.ops.object.modifier_apply(modifier="Subdivision")  # apply only a type of modifier

Or, perhaps you have linked all to a named Collection and can enumerate with:
objs = bpy.data.collections['Collection_subdiv'].objects

Thanks for taking the time to write the script! I was able to figure out another way to achieve what I wanted, which was selecting all objects and Ctrl+A > "Visual Geometry to Mesh". It worked for what I wanted to do.
But I will test your script later. If it works I'll mark your answer as the solution.

Thanks @Alexandre Marcati -- I have interesting in learning while I help, but I also as a boy I "compete for points" haha.   I think there is a but, so wait until I test and refine!

Ok! Let me know when you think it's finished so I can test and mark your answer as solution!
Your script would be very useful because it would allow to only apply a specific type of modifier, it would sure be a good tool to have in the toolbox.
:)

@Alexandre Marcati -- I have tested and fixed a bug in how to select the object to apply the modifier.   I may update it later to apply the modifier to any object with any name that has a modifier of type 'Subdivision', as another example.  You might also have all of the desired objects in (or linked to) a particular collections so could use objs = bpy.data.collections['Collection_subdiv']

Awesome! I tested it and it seems to work perfectly with the name pattern. I wasn't able to make it work with the collections, I'm not sure what line I should change for the new one (I don't really know anything about python scripting).

@Alexandre Marcati -- you caught me scripting without testing again!  should instead be: objs = bpy.data.collections['Collection_subdiv'].objects.  And again I think we should be able to accomplish more, intuitively, through the GUI.

Ok, I was able to (kinda) figure it out. Here's a way to do it in case someone else is wondering:
select all the objects you want to apply the modifiers, press Ctrl+a, then select Visual Geometry to Mesh. This has the same effect as "applying" the modifiers, but can be done to multiple objects at once. The limitation is that it will apply all modifiers, you can't pick and choose which modifiers you want to apply.

That does work :-) the only thing I could find in the docs was a bpy.OPS call, which has to have the right object selected.


text:
Blender Python Propertygroup update
I try to define five variables (called weights) with Propertygroups
and a function to be notified if the Floatporperty-sliders have been moved:
def weightUpdate():
  print(f"update----------------------{time.time()}" )

class My_Settings(bpy.types.PropertyGroup):
  wgt1: bpy.props.FloatProperty(
     name='wgt1',
     default=0.0,
     update = weightUpdate()
  )
  wgt2: bpy.props.FloatProperty(
     name='wgt2',
     default=0.0,
     update = weightUpdate()
  )
  wgt3: bpy.props.FloatProperty(
     name='wgt3',
     default=0.0,
     update = weightUpdate()
  )
  wgt4: bpy.props.FloatProperty(
     name='wgt4',
     default=0.0,
     update = weightUpdate()
  )
  wgt5: bpy.props.FloatProperty(
     name='wgt5',
     default=0.0,
     update = weightUpdate()
  )

The registration seems to work:
 def register():
    bpy.utils.register_class(My_Settings)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=My_Settings)

And in the draw function of my main addon-class I also could define the slider, even in a loop for all five sliders:
def draw(self, context):
...
 for i in range(0,N):
      row = layout.row()
      wTxt = f"wgt{i+1}"
      row.label(text=wTxt)
      row = layout.row()
      row.prop(my_tool, wTxt)

The problem:
The function weightUpdate is only called when the script is started for the first time. Although any slider change is printed into the Python console in Blender, the function is not called again.
Also, is there a way to pass parameters to the update-function, like  update = weightUpdate(3) for the third wgt-slider
to identify which slider was changed?

When you initialize your bpy.props.Property attributes, you assign what's on the right side of the equal sign to the attribute that's on the left side.
If you assign update to weightUpdate(), you're not assigning the function weightUpdate, but the result of this function, which is None, the default implicit return value of a function.
That's why the print is done once on registering, and never again. The function is called only once and the result is stored in the update callback, but since it's None, it might as well not exist.
What you want to assign update to is the function :
update=weightUpdate
But even then the code will throw an error, because according to the docs :

This function must take 2 values (self, context) and return None

The two parameters will be automatically provided by Blender at runtime when the update is fired. Here, self will be the object that's holding the property, so the instance of My_Settings that's tied to your scene. context will be the context at the time the update is fired.
So a stripped down soluton would be :
def weightUpdate(self, context):
  print(self)
  print(context)
  print(f"update----------------------{time.time()}" )

class My_Settings(bpy.types.PropertyGroup):
  wgt1: bpy.props.FloatProperty(
     name='wgt1',
     default=0.0,
     update = weightUpdate
  )
# etc.

Now let's say you want to use only one update function, but you want it to behave differently whether you update value1, or value2, etc.
You can use a lambda expression to set up additional parameters.
def weightUpdate(self, context, index):
  print(f"Weight {index} was updated")
  print(f"update----------------------{time.time()}" )

class My_Settings(bpy.types.PropertyGroup):
  wgt1: bpy.props.FloatProperty(
     name='wgt1',
     default=0.0,
     update= lambda self, context: weightUpdate(self, context, 1)
  )
  wgt2: bpy.props.FloatProperty(
     name='wgt2',
     default=0.0,
     update= lambda self, context: weightUpdate(self, context, 2)
  )
# etc.

In this case the lambda is a new object that's not evaluated directly on creation. It can be called and evaluated at runtime, that's why you can call weightUpdate(self, context, index).
A minimal working example :
import bpy

def weightUpdate(self, context, index):
  print(f"Weight {index} was updated")

class My_Settings(bpy.types.PropertyGroup):
  wgt1: bpy.props.FloatProperty(
     name='wgt1',
     default=0.0,
     update= lambda self, context: weightUpdate(self, context, 1)
  )
  wgt2: bpy.props.FloatProperty(
     name='wgt2',
     default=0.0,
     update= lambda self, context: weightUpdate(self, context, 2)
  )

class HelloWorldPanel(bpy.types.Panel):
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout
        my_tool = context.scene.my_tool
        for i in range(0,2):
           row = layout.row()
           wTxt = f"wgt{i+1}"
           row.label(text=wTxt)
           row = layout.row()
           row.prop(my_tool, wTxt)

def register():
    bpy.utils.register_class(My_Settings)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=My_Settings)
    bpy.utils.register_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

BTW, the standard number of space indentation usually used is 4, not 3.

Thank you very much for this elaborate and detailed answer! This was very helpful to me!


text:
What is the difference between the number of samples of a render and the resolution of an image?
Does increasing the number of samples and increasing the resolution of a render affect the quality in the same way?
Because I've usually kept my resolution high and the number of samples fairly low.

those are 2 very different things, samples tells how many times render calculates each pixel and image size says how many pixels there are

Not 100% sure of this, therefore just a comment, but more than 1 sample per pixel means a loss of information - the position of the sample is rounded to the nearest pixel. Therefore you want your resolution to be as high as reasonably possible, and then increase samples to further improve quality. Of course neither storage nor bandwidth is free, so you're likely to get the best results by figuring the final resolution in your workflow and rendering directly to that resolution. Rendering to a higher resolution and then scaling down may yield worse results, due to double rounding...

Sample size affects the amount of rays casted from your camera. Low sample size yields a lower quality image but a faster render time.
Your image resolution is the canvas size of your image. Image quality depends on the resolution of the display which you view the image.
For example if you have a 1920x1080 monitor and you render your image in 3840x2160; your display interpolates every 4 pixel in to 1. That might give you the impression of a higher quality image but it'll be blurry and/or noisy. If you really want to get a high quality image, you have to sample the pixels more so you'll get more accurate data on that pixels information. You will get a better result on reasonably lower resolution but high sample count render.


text:
How to create 2.35:1 movie with no stretching?
I am working in blender in the video editor and I want to make my 16:9 film into 2.35:1. My film is 1920x1080 so I type 1920x800 in properties as a resolution but video doesn't became cut, it becomes stretched.
What can I do to get my 1920x800 resolution video without any stretching?

To use a video strip's original resolution without any stretching, activate the strip's Image Offset. Change the setting's X  and Y value to offset the video image's position in the overall image.

thx, works good ;)

@mikeee233 If this answer has satisfactorily solved your problem, you can accept it

You've set the output resolution correctly, but you also need to crop the footage. In the Properties self N, in the Strip Input panel, enable Image Crop and set the top and bottom to 140 (for a centre crop).

The same result can be achieved via the compositor:
Run your images or video through a Scale node set to Render size and Crop. Then use the Y value to best frame your footage.
I know that if you are working on the video editor then Adhi's answer works just fine, this is just another method that could be handy in case you are doing some compositing.


text:
Using wrl data in Cycles
I'm importing .wrl data from matlab that I would like to display. When I'm using the Blender render, I can see the colors as I wanted ( the object already has a material when imported). But when I switch to cycles render (since it produces "nicer" results), my colors disappear.
is there is away to use the cycles render with the imported colors? or how can I make the render look like the cycles render, when sing the blender.

maybe if you could upload a representative .wrl I could provide a nicer answer.

I've tried the answer suggested by @zeffii but I could not get it to work. I'm attaching and example, which could be found here:
http://s000.tinyupload.com/?file_id=03936112909451894934

i've updated my answer.

The material provided by your importer may need a small adjustment to display the 'vertex_colors' layer when you switch over to Cycles Render engine.
Ideally you should be able to import the .wrl while already in Cycles Render engine and let the importer set up the material correctly -- but at present this is not the case.
A solution is to add an Attribute Node to the Cycles material Node Tree and write Col into the name field. This won't display properly in texture mode, you must set the viewport shading to Rendered, or currently you will only see black.
steps

Import the .wrl as normal

Create a node material for the object,
2a. With the object selected, open a Node Editor
2b. set the Node Tree view type to Material
2c. Tick the box labelled Use Nodes

Add an attribute node, and write 'Col' (without quotes) into it as in the picture.

Hook up the output of the Attribute node, to the colour input of the Diffuse BSDF  node.

Can you provide step by step instructions how to do it?

sure, give me a few minutes


text:
Modelling fighter plane cockpit
I'm trying to model a ww2 fighter plane but stuck at the cockpit. As we know it's made of metal bars with pieces of glass in between. Just wondering what's the common method for such models.

Shall I model the metal bars as solid first and add glass planes or is there a way to model them as a whole and then add some sort of transparent textures to it?
Thanks in advance!

There are many ways to do this, obviously.
I recommend, for the best result, to first model the whole cockpit, completely ignoring any seams and materials, just getting the shape perfectly right using subsurf and as many or few loops as you want to use.
Then, you can use the retopo tools in Blender to model a relatively fine mesh over this base-shape, fully concentrating on the right topology following the aluminium or glass surfaces. Because, through the retopology-tools (surface snapping), you don't have to worry about the three-dimensional shape at all, you will get one perfectly fitting mesh with the edge loops in the right places.
All you have to do then is to separate (Y > Split) the sections that are made out of different materials and give them some thickness through a solidify modifier or by hand. This way both the glass and the metal will look good from all angles because they have real thickness.
I actually wrote a blogpost about this a few years ago and made a screen capture of the process. The Blender Version is 2.49, but all techniques used there are still applicable today: Blogpost (Sorry, it's not a good tutorial, but maybe it helps in some way).


text:
One side of an object appears normal but the other side is transparent
I have Blender 2.49b and have this mesh:
Front:

But on the back the mesh is transparent:

How to fix this?

"I have Blender 2.49b" well there's your problem. Are you having trouble upgrading?

:D 2.49b Blender is good compatilible with export to DirectX for working in a game.. :D P.S. Its a not bug of Blender..

I don't know where this is in 2.49b, but try disabling "backface culling"

I finded it, but its only flip it [in front side is a transparent]

@GAMELASTER then you might have to make it have some thickness. (I don't know if 2.49b has the solidify modifier, but you might be able to just extrude it)

@GAMELASTER I have added an answer :)
BTW, related: http://blender.stackexchange.com/questions/2082/one-side-material

2.49b:
Try adding some thickness to your mesh.
It seems to be currently a 2 dimensional plane, which will only have one side drawn unless double sided faces is enabled.
2.6x:
It seems that double sided faces was removed in 2.6x.
Backface culling can also cause this.
The Backface culling setting is located in 3D view > Properties panel > Display:

In 2.5x Double Sided was moved to Mesh Properties under Normals. The backface culling option was added in 2.64 but the back of the poly should be visible in solid mode, it's only textured mode that hides the backface.

@sambler thanks :) fixed. (though backface culling does seem to effect the mesh in solid view?) According to this, double sided normals is not the same as double sided faces

backface culling will make the back transparent in solid and textured mode(2.64+). 2.49 that GAMELASTER is using doesn't offer that so textured mode or texture solid should be the only time it is transparent.


text:
Mesh appears normal in solid mode but looks weird in textured mode
I have Blender 2.49b and have this model:

When I change mode to Textured, the windows look weird:

When I go back to solid mode, it's normal, but the biggest problem is when I export the model, it looks like the image above. How can I fix this?

You probably won't get too may answers because you are using a version which is nolonger actively supported. Also the image from your first link appears to be broken.

I fixed the first image.. Yes, is not supported, but only this version is compatible with the game [OMSI]

What format do you need to export? Some export formats aren't enabled by default, you may need to enable them in the addons section of the preferences.

Looks like your normals are flipped around.

@sambler to DirectX [.x]

@GAMELASTER There is a directX exporter available in 2.68 but it isn't turned on by default, try enabling it (it's in User Preferences under Addons) and see if you can import into the game. The same tips for correcting normals apply to the newer versions.

@sambler hmm, i try it, thanx :)

The most likely cause would be the normals, that is which way the polygon is facing, the outer side is the one that has the texture drawn on it. In edit mode select all and press CtrlN. If that makes it worse try CtrlShiftN to flip them the other way.
Worst case scenario you can select individual faces and flip the normals using Mesh->Normals->Flip (Flip normals is also available in the specials menu W)

This appears to be an issue with the faces themselves rather than which mode you have selected.
I would first check to see if the faces are pointing in the wrong direction.
First enable Draw Normal from the Mesh Tool Panel

If they are point the wrong direction then they can be flipped the correct direction using Ctrl + Shift + N. See the wiki docs - Face Normal for more information about flipping direction.
I would also check to see if these faces have been UV wrapped. In edit mode, select the faces in question. Open the UV Editor and if they have been uv'd then they should be visible for manipulating the UV layout. If not you will have to UV unwrap those faces.
You should also check to see if these faces have a texture associated with them. If they don't you will have to assign one.
At this stage if the format you are using allows it you can enable double sided.


text:
What, fundamentally, is wrong with my metal texture?
I've been working on a metal texture.  The key, it seems, it so mix the glossy type with the diffuse type; and of course there are various other things you can do (like bump-mapping.)  I was wondering if someone among you could be so kind as to tell me why my metal looks like shiny plastic, I just can't get it right.
Eh, this was supposed to be some sort of light-saber variant. Here is a copy of my sheet:

What I'm really asking is what to look for.  I've tried about 100 variations on this and I still can't quite nail it down.
The blend file is here.

It tends to help if you include a reference image in the question too. You can maybe imagine it's hard to judge how far your current attempt is from your goal without seeing the reference. (something to work towards)

My experience with metals has been that you need to include much less diffuse and much more glossy. I would try setting your factor value to something more around 0.05, or less.
In fact, if you're going for something more shiny I would try simply a glossy shader, with a roughness of about 0.05.
Result

Node setup

Hope this helped.

I think that if you switch your mix shader to around .14, that should help for sure. Your lighting,  from looking at your .blend, may also be part of it. I've had trouble before with similar lighting set ups, and have found it to be easier to set an area lamp with a wide angle and high emission to get the lighting and reflectivity that I need for my scene. I didn't have a lot of time to render something out, so this is low samples. With higher samples, and a clamp indirect value of 1 ( to eliminate fireflies), it should look ok.

Amount of reflection for metals is much higher sRGB 155-255, (lower for gold,brass,copper and higher for aluminium and silver). So this color should be connected to mix shader and color of glossiness, because usually it's also color of reflections itself (eg. light orange for gold)


text:
How can I remove artifacts from a flat surface after using a boolean modifier?
I tried to model a simple keypad, I got this model after using a boolean modifier on an array of cylinders and a cube:

The face of the cube had way too much edges and as suggested here Cutting hole into a face with a line loop? I used limited dissolve and got this:

What would be a good way not to get the rendering artifacts on the plane?
EDIT:
The face normals look like that:

This question may help.

Along with using Shade Flat, you can still smooth shade your model and use an Edge split modifier. See How to smooth shade an object while retaining hard edges? for more info. If your model is faceted or not exactly flat, using shade flat will keep the hard edges but smoothing and using this modifier can get around that.

The problem was solved by setting Shading to flat in the Object Tools Panel T

This will mask the issue, but not solve the problem. If that's all you need, then it might be fine.

Note that you can also set specific faces to flat shading while keeping others smooth shaded.
Simply select the face(s) you want to shade smooth/flat and press the appropriate shading button in Tool shelf > Mesh Tools > Shading:

This is useful in case you don't want to use the edge split modifier.

EDIT: Based on the comment (and the update) it seems like pinching is much more likely than backward normals. Oddly shaped polygons can be difficult to render in OpenGL, but they often look okay when fully rendered (per-pixel shading, versus vertex shading).
The artifacts are actually unrelated to the question about holes in faces. The artifacts are a consequence of surface normals that aren't all facing the same direction. In the 3D viewport, tab into edit mode and press n to open the settings panel. There's a section in that panel marked "View," where you can turn on "Draw Normals" (there are two buttons, one for vertex and one for face, you want face normals). This will make blue lines that show the direction each face normal is pointing. They need to all point the same direction. If you find a normal pointing the wrong direction, select that face (face select mode is easiest), press ctrl-f, and select "Flip Normals." Repeat this process with each incorrect face until all the faces have normals that are pointing the same direction.
Incidentally, if you have a fully enclosed mesh, then in edit mode you can select Mesh->Normals->Recalculate Outside to solve this problem all at once. But the mesh you've displayed doesn't look like it's enclosed. (A sphere or a cube would be fully enclosed, and a plane is not. If there were a hole in the sphere or cube, it would not be fully enclosed, and it would be difficult for Blender to be certain which side was "outside" and which side was "inside").
As for the "best" method for putting holes in a plane, that really depends on what you're doing. The method you're using here is a common one, and if the artifacts are the only problem, then it is probably "best."

I hardly think it's a normals issue after running a limited dissolve, more than likely pinching issues and the smooth shading is highlighting this.

Ah, that's a good point. My thought was that the dissolve built some polys and just got them backward, but the pinching makes more sense.


text:
Save screenshot (bge) without writing to disk
This is a little odd but I need to save a screen-shot as an array (numpy array for eg) without writing to disk. The idea here is to create and then call the array once per frame in an external script so doing this...
bge.render.makeScreenshot("frame.png")

...and then converting the png takes too long to be feasible mostly due to saving the image (which is something I don't need anyway).
I'm trying to avoid digging into the rasterizer's source as it's completely foreign to me so I figured I'd ask here first. Any thoughts or suggestions would be greatly appreciated.

Look into: glReadPixels, combine with this PNG writing function, http://stackoverflow.com/a/19174800/432509

Thank you! A quick proof of concept worked perfectly. When I have a full script I'll post it as the answer in the off chance that someone else needs to do this.

you could post the script you ended up with as an answer, I'm sure others would find interesting.

depending on your os, you might have a memory-backed filesystem, for example the debian/ubuntu/linux hosts tend to have a '/dev/shm/' folder which can be used to write files that are backed by memory not hard drive. this is naturally going to couple your scripting to your OS, being able to get the data directly would be nicer.

That works for me:
import bpy
import numpy as np

# Take screenshot
bpy.ops.render.opengl()

# Get screenshot data
image = bpy.data.images['Viewer Node']
pixels = image.pixels

# Convert to numpy array
np_pixels = np.array(pixels[:])

# Reshape array to match image dimensions
np_pixels = np_pixels.reshape((image.size[1], image.size[0], image.channels))

# Show the numpy array of the screenshot
print(np_pixels)

It doesn't write it to disk.
First it renders it, then it takes the image from the viewer node and then converting and reshaping to a numpy array.
I hope that helps you and it is what you looking for


text:
How to modify Blender data from vector/arrays in Python?
I was writing a script and discover weird thing. I have code like this:
import bpy
obj = bpy.context.active_object
for s in obj.scale:
    s *= 2.0
    print(s)

and it doesn't change scale of the object although print(s) shows me correct values. I thought I get a pointer to the object's property as I get pointer to the object in case with:
for obj in bpy.context.selected_objects:
    # do something

The issue here is that its not always clear when values are wrapped or not, that is to say, when modifying a value will apply changes back to the Blender data the values originally came from.
The rule of thumb here is that array/vector/matrix/quaternion/euler/color types wrap blender internal data, but when you get a single number from any of these types, changes to it won't be applied back to the original data.
Taking Object.scale as an example...

This will modifiy the objects scale:
obj.scale[0] = obj.scale[0] * 2.0

# or...
obj.scale[0] *= 2.0

# or...
scale = obj.scale
scale[0] *= 2.0

This won't modify the objects scale:
# s is a float and holds no reference to the original data
s = obj.scale[0]
s *= 2.0

# or...
# this does nothing other then to do a multiplication and ignore the result
obj.scale[0] * 2.0

# or...
# by making a copy of the scale, the reference to blender data is dropped,
# this is often useful when you *want* to get some data and manipulate it
# without touching your data in Blender.
scale = obj.scale.copy()
scale[0] *= 2.0

# or...
# by decomposing the scale value by axis,
# we get a list of floats which won't wrap original data,
# this is like '.copy()' but gives us a list rather then a Vector.
scale = [obj.scale[0], obj.scale[1], obj.scale[2]]
scale[0] *= 2.0

# or...
# this also has the effect of returning a new, modified copy.
scale = [s * 2.0 for s in obj.scale]

Note:
While this is a Vector, the same thing applies to color, eulers... etc as mentioned before.
In the example given in the question, its looping over numbers, so you would have to do something like this...
for i, s in enumerate(obj.scale):
    obj.scale[i] = s * 2.0

Note that in this case Vectors can be multiplied by numbers so its best to do:
obj.scale *= 2.0

Note:
if you have a mathutils class - Vector/Matrix/Color/Quaternion/Euler, you can check to see if they reference some other data with the readonly is_wrapped attribute. You can even get the data they came from using owner

summary
namebinding - does not affect b
b=a
a=42

modifying attributes or items - does affect b
b=a
a.attr=42
a[item]=360
>>>b.attr
#42
>>>b[item]
#360

some more details
What happens when you call (see for loop)
for elem in obj:

is, that an iterator will be retrieved from the obj like this
obj_iter=iter(obj)

This iterator has a method __next__ which can be called by
next(obj_iter)

and will return the next element in the collection. The for-loop repeately calls __next__, assigns the returned value to the variable elem
elem=next(obj_iter)

and executes the body on each turn until the iterator raises the StopIteration exception signalizing that there are'nt any elements left.
If the elements in obj are mutable you can modify the elements .attributes or [items] with the value given to elem.
In your example you are rebinding a new value to the iteration variable 's name. (see assignment)


text:
How to get world-space matrix of any pose bone?
Is there a command for getting world-space matrix of pose bones, same as obj.matrix_world for objects? I found pose_bone.matrix, but it gives weird result for me.

Yes:
As the documentation says, a pose bones matrix is in object space, this means - unless the object has no loc/scale/rot applied, you will have to apply the objects matrix.

matrix_final = obj.matrix_world @ pose_bone.matrix

This test script adds an empty at the pose-bone.
# Assume we are in pose mode with an active bone

import bpy
from bpy import context

pose_bone = context.active_pose_bone

# we can get the object from the pose bone
obj = pose_bone.id_data
matrix_final = obj.matrix_world @ pose_bone.matrix

# now we can view the matrix by applying it to an object
obj_empty = bpy.data.objects.new("Test", None)
context.collection.objects.link(obj_empty)
obj_empty.matrix_world = matrix_final

mathutils now uses the PEP 465 binary operator for multiplying matrices.
matrix_final = obj.matrix_world * pose_bone.matrix

becomes
matrix_final = obj.matrix_world @ pose_bone.matrix

Since 2.8 object are now stored in Collections, so :
context.scene.objects.link(obj_empty)

becomes
bpy.data.collections['Collection'].objects.link(obj_empty)

Here is the complete script updated:
# Assume we are in pose mode with an active bone,
# and a collection named collecion exist

import bpy
from bpy import context

pose_bone = context.active_pose_bone

# we can get the object from the pose bone
obj = pose_bone.id_data
matrix_final = obj.matrix_world @ pose_bone.matrix

# now we can view the matrix by applying it to an object
obj_empty = bpy.data.objects.new("Test", None)
bpy.data.collections['Collection'].objects.link(obj_empty)
obj_empty.matrix_world = matrix_final

Thanks, this is useful !
But now I would like to ask, I have global_matrix, how to convert it to localtransform (localtion / rotation / scale)?

Again with tip to tail offset.
Slight addition to @ideasman42's answer to enable globally locating to tip or tail of bone based on an offset. 0 is as above at fat end of bone (head), 1 at skinny end (tail).
This is to emulate somewhat the option in copy transform constraints to locate with offset along bone.
The vector
(pb.head - pb.tail)

describes the object space vector from head to tail
A translation matrix is created to translate point of interest  locally along the bone.
# Assume we are in pose mode with an active bone

import bpy
from bpy import context
from mathutils import Matrix

# add empty half way along bone
offset = 0.5 # 0 for tail 1 for tip.

pb = context.active_pose_bone

T =  Matrix.Translation(
    offset * (pb.tail - pb.head)
    )

# we can get the object from the pose bone
obj = pb.id_data
matrix_final = obj.matrix_world @ (T @ pb.matrix)

# now we can view the matrix by applying it to an object
obj_empty = bpy.data.objects.new("Test", None)
context.collection.objects.link(obj_empty)
obj_empty.matrix_world = matrix_final


text:
Auto-run scripts security options
We have a preferences option to enable auto-run of python scripts when opening blend files. We can also add paths that are excluded from auto-running scripts. Then we have a cli options to enable or disable auto-running scripts and to bypass the startup.blend with --factory-startup.
In regard to auto-running scripts which of these options overrides all others?
If my startup.blend disables auto-run, can a python script be run from the cli to enable auto-run for the blend being opened?
Does --factory-startup bypass my auto-run settings?

It seems that the order is as follows (in order from weakest to strongest):

Startup .blend settings (does not override anything)
--factory-startup will override all startup .blend preferences (including auto exec), but the default setting for auto exec is disabled (disallowing auto execution globally).
-y (--enable-autoexec) enables -Y (--disable-autoexec) disablesBoth these options override the startup .blend auto exec preferences (including when used with --factory-startup) allowing auto execution. Note that it does not edit the preferences (even temporarily), it just allows execution.
Running a script with -P (--python, --python-text, --python-expr) will execute the script immediately ignoring auto-execution settings. It is possible to enable auto-execution from such a script.

But it only allows to run the script given to -P, or does it also allow other scripts? I guess only that script is executed, but can probably import and execute others. Text datablocks registered as module shouldn't be allowed, only because a certain script was passed for execution.

@CoDEmanX - clarified the -P behavior.


text:
Array modifier (vary textures on duplicates)
Using the array modifier and textures, can the individual array objects be slightly textured differently for individual look?

Related: http://blender.stackexchange.com/questions/1911/can-i-use-an-image-sequence-with-offset-frames-as-a-texture-on-array-items

I found this related question.  You might find the best answer informative.  I needed to solve the same problem and this solved it for me.  Good luck.

This is awesome!  Thanks for the feedback.  I know it has been a while since I submitted this question i, but I really need this.  Both answers on that related question help me.

Well seeing as you said 'slightly' then yes, you can have slightly different textures on an object that has been arrayed:

This cube has a texture which uses 'Generated' coordinates instead of other texture mapping coordinates such as UV.
Generated coordinates can be set for either the internal renderer in the mapping panel of the texture settings:

Or in Cycles with a 'Texture Coordinate' node:

The example above uses a procedural cloud texture with generated coordinates. This method doesn't allow you to specify different textures to appear on each cube, however, it does allow you to slightly vary each different cube.

Thanks, I'm modeling a box of cigars and I guess I can work with the generated values instead of a texture of tobacco leaf. I'll try that.

It's only the mapping coordinates that are generated. You can use a texture as long as it is tileable instead of a procedural one.

No, not easily at least.
Some options you could use for UV coords.

UV Project (after the array modifier).
Vertex group modifier, then UV-warp modifier and use vertex weights as an influence.
Vertex group modifier, then use vertex weights to modify the texture (cycles nodes can do this).

There may be other ways you could tweak values, but they dont give good control. You may be better of looking into dupli-frames (dupli objects in general).

Thanks, I'm modeling a box of cigars and I'll try the one above but I really want to use a texture.  I can convert the array to individual objects and do them individually.

Use an Input->Geometry node to get a vector value that varies with each object created by the Array modifier. You can use a Converter->Vector-math node to add it to the UV coordinates from a Texture coordinate node.
Been looking for this for ages... finally found a way!

Actually this is a rubbish answer. Sorry. It does produce per array-object offsets, but it warps the UV map.

Why not delete it then? Press delete at the bottom of your answer.


text:
Connected Bone Parenting Issue with IK Constraint
I have created a model with movable eyes. This uses two separate UV Spheres which are parented to their bones. These bones are then set to an IK bone in front of them. My issue is when I connect the eye bones to the model's armature, the model tips forward when in object mode. In edit mode there is no issue.
Here is a screen shot of the eye bones not connected to the armature in object mode:

Here is a screen shot of the eye bones connected to the armature in object mode:

I can upload the actual .blend file if needed.

Have you setup the IK constraint's Chain Length setting? Its default value of 0 means the whole chain of bones, right up to its root which is the head, will be affected by the constraint. You'd need to limit it to whatever length of bones really need the IK behavior, in this case 1.

If you want to make eye target controller, IMHO a Damped Track constraint would be more appropriate than IK, because it works on a single bone and very easy to setup correctly.
Each eye's bone need not be connected to the head, BTW.


text:
Can symmetrize by used with the multires modifier?
I was sculpting a hand on a character with a multires modifier, and I hid the rest of the character (including the other hand). Because the other hand was hidden it didn't get effected by the sculpting symmetry. So my question is, can the sculpting that I did on that hand somehow be mirrored to the other hand while still keeping the multires modifier? Something similar to the Symmetrize feature of Dyntpo?

Did you try the edit-mode symmetrize tool?

@ideasman42 It's a little finicky and it left some artifacts, but after a few tweaks everything was back on track. Thanks!

How is it finicky?

@ideasman42 In a few places it reverses the stroke (i.e. an indent becomes an outdent, a crease becomes a mound) But oddly, not all the strokes get reversed, just a few.

That's not finicky, Its a serious bug in the Symmetrize tool which consistently gave incorrect results, committed fix https://developer.blender.org/rB66043cc6c1911c9b8af971fb26916ed8363549ce - please report bugs to our tracker in future.

@ideasman42 I just tested it, works great! Thanks.

Yes, you can use the edit-mode Symmetrize tool.

EditMode -> Mesh (Menu) -> Symmetrize

Note, there was a bug with Multi-res modifier which is now fixed in daily builds and will be included in the 2.77 release (commit).

Would I be correct in assuming that this no longer works, as of 2.90, due to https://developer.blender.org/T73317? I tried to use "Symmetrize" to fix distortion that came from sculpting at a lower level, and instead I just got even worse distortion.

@WillChen Just used it with 2.92 and it works fine


text:
Best way to "sculpt" sphere-shaped holes on a sphere surface?
Sorry for the confusing title, the best way to explain it is to look at my image (don't pay attention to the lines connecting the holes and sorry for the poor quality)
I have been thinking about this for a while and I can't think about a good way to do it. Booleans would result in a very glitchy topology and very bad results when subdivided, sculpting it wouldn't be precise enough (for me) and modeling it poly-by-poly would probably take forever, not to mention quite challenging.
There is surely a good and simple way to do it, but I just cannot think of one.

perhaps the word you are looking for is 'excavate' or 'hollow out' (dictionary)

look at Tip: Cutting a Hole in a Curved Surface – Revisit http://cgcookie.com/blender/2010/12/28/tip-hole-curved-surface-revisit/

If you use booleans and want smooth spheres as results, increase your original sphere segment counts, later on you can always retopologize if the resulting face count is too high. Starting from a highpoly mesh and working to a lower one can give acceptable results.
The implementation of Blender Booleans is from the Carve Library, this is what the blender dev has to say about how to use booleans (in another very similar question) -- link

The carve library has made it possible to do really nice booleans in blender, but you need sufficient geometry for the polygon based approach to retain smooth shapes.
Cleaner topology results come from being precise about matching up the level of sudivision where the objects interface each other. Taking a highly divided sphere like above and doing a difference with a scaled down sphere with identical vert count will produce more geometry than needed.
Ideally you will have similar face sizes like here:

Use the EdgeSplit Modifier, on smooth shaded faces, in combination with matching face sizes it looks acceptable.

Thank you very much.
I'm a bit ashamed to admit I've never tried it without smooth shading...
Thanks for the links

Thanks again, I guess it can't get any better at this simplicity

yeah, sometimes you just need that defining bit of geometry, especially viewing side-on it's not possible to have smooth round and low poly at the same time.

Shrinkwrap
Possibly not the best solution but you
might use shrinkwrap. It is non-destructive.
Topology is kept the same but edges are strange.

You could follow the workflow below

Add a multi resolution modifier and subdivide 3-4 times
Smooth shade the mesh
Switch to Sculpting mode
Choose Inflate/Deflate brush type and set its strength to 1 and enable 'Deflate' mode and check 'Accumulate'
Under Stroke panel, choose stroke method to 'Airbrush' and Rate to 1
Under the Curve panel, choose the Round falloff.
Continue clicking on an area and watch the dents form.

Note: This method has its limitations. Its dependent on the view you choose before sculpting the holes and the depth of the hole is not visualized unless you change the view.

3 problems with this method: It creates a lot of artifacts around the hole's edges, It makes it very hard to have a precise control over the hole's depth and position and the "angle" of the hole (dependent on the brush's curve) is almost impossible to get right

With the boolean approach, you are subdiving the source mesh a lot before applying the operation, similarly by increasing the multires subdivision count you could get rid of the artifacts. This method is not perfect but could be useful for planar surfaces.. I do agree about the view dependent and depth of the hole though.. I have updated my answer by adding a note.

A few more solutions:
Displacement map
This removes the need to mess with geometry and can be a fine solution. If you all you need is the 'sense' that there is hollowing out on the surface

and the nodes (here collapsed to show only the used inputs, outputs and parameters)

MetaBalls (positive and negative spheres)

Maybe you didn't realize this, but with metaballs if you go into edit mode you can set if the sphere will add or subtract from other spheres in this panel. This setting is adjustable for every metaball:

Stitching / Patching (classic Polygon modelling method)
Think of the mesh as a patchwork quilt, putting more effort into getting low poly meshes to follow a desired topology. This is a labour of love (or hate..depending on deadlines). Any geometry you want to mix with other geometry can be patched / stitched into place. To get good at this takes practice and patience, and demands that you master a whole bunch of tools (3D cursor, fill, snapping, transform orientations)

I like the displacement map solution because it's the easiest way to be very precise and have a good control over the holes, and the result looks very good if the camera is at a good distance from it.

Yeah, and it doesn't require tonnes of geometry!

You need a face loop around the rim where the big sphere meets the carving.

Duplicate the big sphere. The duplicate will be deleted lated.
Shrinkwrak the original big sphere to the duplicate.
Delete a portion of the sphere to cover the carving, and then some.
Select the edge loop around the hole.
Extrude it and scale it down some.
Use "to sphere" (I never found this in any menu so I hit space and type "sphere") and hit 1 to make your loop round.
Apply the shrinkwrap modifier.
You may need to iterate "to sphere" and shrinkwrap a couple of times before it looks good. This is because the shrinkwrap can change the edge loop.

The rest of this you can do in a number of ways. Here is one way:

Fill the hole.
Inset the edge a number of times to get enough geometry for a nice carving.
Make a vertex group of the geometry to be carved.
Use a shrinkwrap modified to do the carving. Set the vertex group to be shrink wrapped (otherwise your whole sphere will be wrapped).