text:
How to dynamically show/hide panel elements with python?
I followed the recommendation of How to dynamically show/hide panel elements using python?
for an addon and it works fine during script development. But when I install the addon and use the panel an EnumPropery which defines the layout seems to have lost the default value. The code is e.g.
class ABCK_Panel_with_sectors(bpy.types.Panel):

    bl_space_type = "VIEW_3D" # window type panel is displayed in
    bl_region_type = "TOOLS" # region of window panel is displayed in
    bl_label = "Create ABCK objects in sectors 03" # heading of panel

    def draw(self, context) :

        layout = self.layout
        scene = context.scene
        col = layout.column()
        #.........................................................
        box = layout.box()
        box.label("General definitions")
        row = box.row()
        row.prop(scene, 'Object_type')
        if scene['Object_type'] == 2: #!!!!!!!!!!!!!!!!!!!here is the problem
            row = box.row()
            row.prop(scene, 'with_bevels')
            row.prop(scene, 'with_colors')
        #.........................................................
        layout.label("")
        box = layout.box()
        box.label("Math only, no Blender objects")
        box.prop(scene, "Generations")
        box.prop(scene, "all_sectors")
        if scene['all_sectors'] == False:
            box.prop(scene, "Selection_of_sectors")
        row = box.row()
        row.operator("compute.objects", text = "compute")
        row.operator("print_number_of.objects_sectors", \
            text = "print count math")
        #.........................................................
        layout.label("")
        box = layout.box()
        box.label("Final creation")

        row = box.row()
        row.prop(scene, 'Border_type')
        col = box.column()
        if scene['Border_type'] == Border_sphere:
            col.prop(scene, 'Size_max')
            col.prop(scene, 'Size_min')
        else:
            #col.operator('select.object_for_tesselation')
            col.label("select object for tesselation")
            col.label("and press 'create objects'")
        row = box.row()
        row.operator("display_all.objects_sectors", \
            text = "create objects")
        if scene['Border_type'] == Border_sphere:
            row.operator("print_number_of.objects_sectors", \
                text = "print count tetrahedrons")
        #.........................................................
        layout.label("")
        row = layout.row()
        box = row.box()
        box.label("Other")
        box = box.row()
        box.operator("delete.objects", text = "delete")
        box.operator("toogle_select_all_visible.objects", \
            text = "toggle selected objects")

        layout.label("")

        row = layout.row()
        tets_on_layer_0 = [ob for ob in bpy.context.scene.objects \
            if (ob.layers[0] and ob.name.startswith("T_"))]
        if len(tets_on_layer_0) == 1:
            row.label(text="1 object generated.", icon='OBJECT_DATA')
        else:
            row.label(text=str((len(tets_on_layer_0))) + \
            " objects generated.", icon='OBJECT_DATA')

and I get a 'KeyError':

'bpy_struct[key]: key "Object_type" not found.'

What can be done here?

More code would be helpful, but I would suggest 'if context.scene.object_type == 2:' or whatever you used when you created the property.

this did not help, now I have shown more code

scene['Object_type'] will refer to a custom property you have added to a scene either by using the Custom Properties panel in the scene properties or by blender automatically creating it as you used scene['Object_type'] = 2 in your script or the python console.
The proper way to create a new property for your addon to use is by using bpy.props.
In your addons register() function you define the new property then in unregister() you remove it. Within your panel you can then access it with scene.myprop
import bpy

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the 3D views toolbar region"""
    bl_label = 'Layout Demo'
    bl_idname = 'SCENE_PT_layout_demo'
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

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

        row = layout.row()
        row.label('testing')

        if scene.myprop == 2:
            row = layout.row()
            row.label('my property is 2')

def register():
    bpy.types.Scene.myprop = bpy.props.IntProperty(name="My Storage", default=2)
    bpy.utils.register_class(LayoutDemoPanel)

def unregister():
    bpy.utils.unregister_class(LayoutDemoPanel)
    del bpy.types.Scene.myprop

if __name__ == "__main__":
    register()


text:
How to make elements of mini cooper (door, hood, fender, bumpers, side panel) and their transitions smooth?
I'm making a mini cooper at the moment, and the modeling goes pretty ok. I model the mini cooper by using front, back, side and over view and match the mesh to these images and make elements of the car individually. But realistically these elements (door, hood, fender, bumpers, side panel) are aerodynamic and align each other. So how can I make the elements smooth (without modifying the general shape) and align them to make it look realistic, since right after modeling these elements and the transitions of the elements are not very smooth.
What I try to do after the modeling:
Join adjacent elements, set 3d cursor in the gap between the elements, select vertices that are next to each other with respect to the gap (so transition of the elements), and scale to 0 on the axis that is normal to the gap. But I think there is a more efficient method. So how can I make the elements smooth (without modifying the general shape) and align them to make it look realistic, since right after modeling these elements and the transitions of the elements are not very smooth. :)
Without material cannot be seen directly:

But with Glossy shader it can be seen the fender and door are not aligned nicely:

And the side panel at back is not smooth:

The images with Glossy shader can be reproduced with this blend file (by using the camera's in the scene)
http://www.pasteall.org/blend/37591

The answer will depend in part upon exactly what vehicle you are trying to model, and to give concrete advice you will probably need to provide screen shots of the model, and perhaps a link to a blend file, uploaded to GiantCowFilm's Blend-exchange.

@brasshat The vehicle is a mini cooper :)

if I may, the vehicle is not a Cooper Mini, it is your Cooper Mini. And to give concrete advice, I still need to see screenshots (with descriptions as to why you are dissatisfied), and a ~.blend file.

@brasshat I have added images and a blend file :)

It is very helpful to have the ~.blend file and screenshots; I know exactly what the problem is. But for the benefit of others, later, there is a major disadvantage to placing the ~.blend file on pasteall.org, in that it will be deleted in several months, while the question will persist for several years. It would be better if you move the ~.blend file to the Blend-exchange site I referred to in the first comment, or a to a site like dropbox <www.dropbox.org> where you have more control how long the ~.blend file persists.

I examined the screen shots, and then examined the blend file, and found immediately what the problem is. The geometry does not match across the joints in the body. I opened your blend file, combined the front fender, door, and rear fender into the same object using CTRL - J, and with the side view selected, switched into edit mode. Here is a screen shot:

Note that in the front fender, you have five segments, and in the rear fender you have seven, but in the door you only have four. To have the meshes line up on either side of the joints, you need to have exactly the same geometry on either side of the joint, so you'll need to add two more segments on the front fender, and three more on the door, and the x and z values of each pair of vertices on either side of a joint along the front and rear door edges will have to be identical, with the only difference being a small variance in the x value of the vertices in each pair. The same will be true of the joints between the fenders and the hood, and between the rear fenders and the rear door.
If I were doing this model, I'd likely make the door, and two side fenders a single object, and when I had the whole side to my liking, go back, and add a couple of loop cuts to define the front and rear edges of the door.

Thanks :) So in case of this model, after making the vertices match at the joints, I could select a pair of vertices, merge them to the center and do this for every vertex, and after merging I could select the faces that form the fender and seperate by selection?

source: Stack Exchange

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

sort: votes


text:
Why does blender not compress file by default?
When working with large blendfiles, then compressing maybe handy in terms of drive space. After clicking the 'Save as' or 'Save copy' option, I see an option of checking 'Compress'. Why is this not checked by default?

for fast openning/editing/accessing (linking)/saving ?

Blender developer and graphics software engineer Brecht Van Lommel answered this question on the developer.blender.org website in December 2018 (https://developer.blender.org/T54943).  Here's the exact question and quote:

Is there a technical reason about why "Compress" option is not enabled
  by default when you save a .blend file? Slow hardware maybe? I do not
  think people can use very slow computers with Blender 2.8 anyway.

Brecht answered:

This option makes file saving and loading significantly slower. With a
  faster compression algorithm it could be enabled perhaps, but right
  now it's not good enough.
Another downside is that if you are using a version control system, it
  will actually increase file size.

So, if you're not using a version control system and aren't troubled by the performance hit, you should be fine to enable the option.  Alternatively, you could simply compress your .blend files for archival purposes (within Blender or otherwise) when you're not actively working on them.
I've heard Ton Rosendaal (the original creator of Blender and chairman of the Blender Foundation) speak of how important it was for Blender to be extremely performant and responsive - and when you consider how much time it takes for many software applications to simply start up (consider almost anything in the Adobe suite, for example), it's clear from Blender's generally excellent performance that this has been a guiding philosophy that has been respected and adhered to for some time.

There is a checkbox in the User Preferences/File tab, if you want to have it checked by default.

useful answer, but why isn't the preference turned on by default?

all_licenses: 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/


text:
Make water wheel with hinges
Could I make little 'doors' in the water wheel that rotate with the wheel itself, but can also rotate around their own hinge?

Ok, reduced to one question

First set up your doors with the origin on the hinge edge, or us an empty. See this question for more info How do I create a hinged door?
Next Parent the little doors to the main water wheel.

In the above gif I have added an empty that is also parented to the water wheel. That empty is used to control the rotation of all the doors with a Copy Rotation constraint on each of the doors.


text:
Use 3 films (front, side, top) for motion tracking?
When I use motion tracking and I have 3 films: 1 filmed from front, 1 filmed from the side and 1 filmed from top. First I track the objects in the first movie and click the solve button, which makes some empties. Can I use the same empties for tracking the next film for more precision? If it doesn't work with empties, how can I achieve this?

Precision depends on the shot, here is an add-on for solving multiple camera object tracks: https://github.com/Uberi/MotionTracking

Empties are added to the scene as a result of the perspective information obtained during tracking. So no, you cannot use the empties from one solution to track a different camera.
Watch "Track, Match, Blend" to learn how tracking data is gleaned from following features.


text:
Curve not smooth after deleting more than n-3 vertices, where n is amount of every vertex in path
After when I add a path, enter edit mode, and delete every vertex, except for 3 vertices, then the path is smooth:

But when I delete every vertex, except for 2 or 1 vertices, and extrude vertex 3, then the path is not smooth anymore. How can I fix this?

Thanks :)

when you delete a vertex the path order gets lower ( can't have order greater than number of vertices and the max is 6 )
so just change the spline order back to 3 or higher and it will be smooth again :


text:
Black drawings showing as white
I'm in the Blender render mode, not Cycles. I created a texture with an alpha channel and drew on it with a black-coloured brush, enabled Z Transparency on the material it was applied to and enabled the Alpha influence in the Influences tab, only to find the black drawing is white (see below).

I'm not sure why it's doing this. Is it because of the material behind it also being black? I'd like to know how to fix this problem.

I found a solution but it's not quite what I expected. Go to the material tab and change the Diffuse colour to Black instead of white. This'll make the drawing go black sure but you won't be able to use any colours.

Okay I finally have it. All I had to do was enable the Colour field in the Influence tab via the texture section. It works fine now!


text:
Why is object mode slow but sculpt mode fast?
I am currently sculpting a mesh with 500,000 triangles; the object mode has very noticeable lag but sculpt mode is a silky smooth 60 fps. This is very unusual and I don't know why it is doing this. Fast navigate doesn't make any difference to object mode's frame rate.
I thought changing the view clip end to 50 and removing both the camera and lamp from the scene would speed things up but, while it did temporarily get me 60fps, when I clicked on the character the lag starts up again. When I click on an object such as a cube I get full frames but clicking back on the character slows things down.
Why is this happening and how can I speed up the FPS?

How many different objects are there in the scene? How many meshes does the object you try to sculpt consist of?

It consisted of a single character mesh and nothing else. Just 1 object.

Interesting, I can't get that on my end while my hardware isn't recent. The only thought I have is when object is selected then Blender draws wire of its faces (even if wire is unchecked) and some options pertaining to Object mode which is not present in Sculpt mode. Though wire is known to have little to no difference in performance so this is quite unlikely. Try appending object into another project and testing, if nothing comes up then either report a bug (and you'll need to share some file) or just stick with how it works so far

I created a new object in the shape of the character I made previously and detail flood filled it to 400,000 triangles and it still lags, even with wire unchecked in the object tab. I also remeshed the sculpt to have only quads and it still lagged.

Two possibilities:

If you have hidden most parts of the mesh in sculpt mode (H), these faces will be visible in object mode.

If you are using a multiresolution modifier, you can set the preview subdivisions higher than sculpt mode.

I have backface culling enabled and 2) I used dyntopo.


text:
Preserving Vertices
This is a bit of an odd question but I was wondering if there is a way to preserve vertices to remain unphased when using a modifier that decimates/adds geometry?
Below is a model I downloaded of a high poly male mesh.

The mesh contours don't quite work out very well in this explanation but imagine the red lines are vertices that loop all the way around and connect again; ideally these would function as joints that could be used to move limbs. I would like to decimate the mesh detail without destroying the vertices marked with a red line. I suppose you could manually reduce the level of detail by dissolving certain edges or vertices, but I think decimating the geometry with a modifier is quicker, albeit dirtier.
Would you need to add the vertices you wish to remain untouched in a vertex group, or a sculpting mask? If anybody has a recommendation I would love to hear it. Thank you for reading.
UPDATE: I tested a method suggested to me. I selected the vertices I wanted to keep, created a vertex group, assigned them to the vertex group and named the vertex group to Joints. I then applied a Decimate modifier to my model, selected the Joints vertex group, and clicked the double arrow button on it, which decimates everything except the vertex group.

My result looks a little sloppy and could use some tweaking, but I am very pleased. This could prove useful for creating different levels of detail (LODs). :)

Your base mesh was really nice.  You can reduce loops quickly by holding Alt and then clicking on a loop.  You can do this multiple times then press  'x->g' to dissolve them.  You can also hold, "Ctrl+Alt" and click an edge to select the entire row of parallel edges.  Then use "checker deselect" and then "Edge Loops".  This will leave every second loop selected.  Now you can use x->g to delete them.  With a model that is all quads, you can also use the Un-Subdivide option for the Decimate Modifier, it will try to keep an all-quad topology.

Thank you! I feel I could have done better, especially with the toes, but that could be remedied quickly. Thank you for the comment!

Vertex groups
Decimate modifier has a field where you can specify the vertex group that will be affected by the decimation. The little arrows on the right set the "inverse" selection.

In the image sequence below you can see how the sphere vertices that are assigned to the vertex group remains untouched till the very end of the decimation process:

I see, thank you! I will give that a try. :o

I tried it and it worked very well. I have updated my original question with my result. :)


text:
How to write a simple OBJ exporter with Python?(With Normals and UV)
So i've been trying to write an OBJ exporter, to learn how Python and scripting for Blender in general works, i'm pretty new to Python scripting. I successfully managed to export vertices and polygons, but i can't export normals. Here is my code, i wrote it on top of the Template Exporter that comes with Blender, this is the exporting part of the code:
import bpy
def write_some_data(context, filepath, use_some_setting):
print("running write_some_data...")
f = open(filepath, 'w', encoding='utf-8')
sce = bpy.context.scene
for ob in sce.objects:
{
    if ob.type == 'MESH':
    {
            dats = ob.data
            c = 0
            for vert in dats.vertices:
            {
                f.write( 'v %f %f %f\n' % (vert.co.x, vert.co.y, vert.co.z))
            }
            for face in dats.polygons:
            {
                for vert in face.vertices:
                {
                    c += 1
                    vnor = dats.vertices[vert].normal
                    f.write( 'vn %f %f %f\n' % (vnor.x, vnor.y, vnor.z) )
                }
                f.write('f')
                cuv = 0
                for vert in face.vertices:
                {
                    f.write( ' %i//%i' % (vert + 1, c + cuv) )
                    cuv += 1
                }
                f.write('\n')
            }
    }
}
f.close()
return {'FINISHED'}

The normals are all in random order when importing and i can't fix it.

Please indent your code correctly. And explain what you mean with messed up? What is the output you expected and what is the output you get?

If I remember well, vertex normals are not at the "face level" but at the "vertex level" in OBJ. So you should export them the same way you did for 'v', outside of the polygons loop

Okay, thanks to lemon for this answer:

If I remember well, vertex normals are not at the "face level" but at the "vertex level" in OBJ. So you should export them the same way you did for 'v', outside of the polygons loop

I added this code in the vertex loop:
f.write( 'vn %f %f %f\n' % (vert.normal.x,vert.normal.y,vert.normal.z))
And used the same index for both the vertices and normals in the face definitions and it imports correctly!


text:
array of cylinders around sphere surface (sea-urchin-like)
I have a sphere and I want to make some cylindrical cavities on it's surface, which are tangent to the sphere's surface
The cylinders wich which I should make the boolean difference should be disposed as a sea urchin, i suppose: with the bottom faces of the cylinders being on the same origin and the top faces spreading out radially.
Here are some images to give a better idea of what I should do:
This is a "flattened" version of what I want to acieve

How do I do the same thing on a sphere?
I need to get to the point where i get something like this but with the cylinders going all around the sphere orbiting around its Z-axis

Thanks in advance :D
Edit: Is there a versatile way of doing so on objects which have an elliptical/irregular shape?

Thanks @zeffii , is there a more general approach towards a non spherical/round object?
What if the sphere were "squashed" on one axis and I wanted the cylinders to rotate around that axis (therefore performing an elliptical revolution)?

Yeah, you might use Duplifaces, but that becomes a different Question entirely, with different approaches.

k, posting a new question then, thanks :)


text:
Boolean Difference not acting as expected
I'm trying model and render a ring in blender.
I obtained my model with a cube on which I applied the following modifiers

I need it to be "empty" on the inside. So I duplicated my model (Shift+D) and scaled it by 0.9. I got this:
  (not visualized correctly, but the whole thing is there)
When I try to boolean diff the larger with the smaller I get this:

Which is the smaller ring, which should in theory create the negative space on the larger ring's inside.
What I get though is the smaller ring with that weird checkered selection, and no space on the inside of the larger ring, which, in fact, disapperars.
Can anybody provide any help on this?
Is there a way to do this keeping my modifiers on the larger ring?
It's not the first time I encounter problems with boolean differnce, so any explanation on why it behaves like this is greatly appreciated :)
Thanks in advance :)
Edit: Attached Blender File
Edit2: Half solved. Answer in comments. I still would like to figure out a way to merge two edge loops of a curved cube. It's actually the same cube (with one corner in 0,0,0), mirrored X,Y, and curved along a Circle. See below image for a better explanation

Are you sure both meshes are manifold and you are using the bool modifier right?

@Jerryno what is manifold? (or mainfold, not sure if that's a typo or the actual word. Either way I ignore its meaning)

http://blender.stackexchange.com/questions/7910/what-is-non-manifold-geometry If the meshes would be non-manifold the bool modifier wouldn't work at all, can you try your setup on some simple cubes if its right or give the .blend file so people can investigate?

Ok, tried it with a simple-subdivided cube with a curve modifier along a BezierCircle.
It's giving the same problem: THE FINAL EDGE LOOPS AREN'T MERGED.
It works once I merge them. This implies I applied my modifiers though.
Is there a way of merging the edge loop to its reflection?

Try to enable the Clipping option in the Mirror modifier. Can you post a screenshot of the modifier stack expanded? This question is hard to answer, too many possibilities what might be wrong..

clipping not working 'cause it's the same face/edge-loop really.
I don't know if it's even theoretically possible.


text:
Bake Depth / Displacement in Blender 3.0 and up
In Blender 2.79, I can bake from high poly to low poly mesh easily using Displacement option and changing distance.
In Blender 3.0, the only node I can see that should work is Camera Data - Z depth. It works fine in renders but not bake.
An example of what I got in 2.79:
.

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


text:
How can I make a sharp looking axe?
Can I somehow make my axe look "sharper" in cycles nodes?

Suggestion.  Place an image of an axe that appears sharp to you in the question.  Also place your artwork in the same position.  Free images on the internet should have one example that agrees with your concept.

U could make a texture that makes the edges more bright as you see it on real axes:

Here the quick setup - maybe it can help

There are many ways to accomplish this. The answer involves more than nodes in Cycles. It includes the geometry of the axe head, lighting and yes materials.
Reference images are very helpful. A quick web search of “sharp axes” for example will return a lot of reference images to consider.
-The leading edge of an axe has an angle to it. The angle varies depending on the type of axe. Incorporating this angle into you geometry will help your axe to look sharp.

-Adjusting your lighting to get a reflection and/or highlight on the axes leading edge will also help to give the impression of sharpness.
https://en.wikipedia.org/wiki/Reflection_(physics)
-A simple node setup to start with:
Select your axe head create a new material. I’ll name it Axe.Body

Click the “+” icon in the Material pane to add a second material. I’ll name it Axe.Edge.
In “Edit” mode select the faces that represent the leading edge of the axe then click “Assign”.

In the node editor add a Glossy Shader and a Mix Shader. The “Fac” variable of the Mix Shader determines the balance of Glossy to Diffuse. 1 = all glossy and 0 = all diffuse .5 would be an equal mix. The “Roughness” variable of the Glossy Shader also plays a part in the material surface.


text:
Blender normal Shader not working
I wanted a wave texture to convert to normal but it has a problem.
This is what I want:

And it gives me this:

Since the texture you are trying to use is a B&W image, not a purple (tangent space) normal map, you should be using a Bump Node instead of a Normal Map Node. Connect the wave texture to the Height input of the Bump Node, and then connect the Normal output of the Bump Node like you would with a Normal Map. Additionally, I often find the contrast between black and white on many of the generated textures to be too strong to make a realistic bump map on it's own. I find that using a MixRGB node, to mix the results of the generated map with white (or black), helps to soften the impact of the texture and make the resulting bump map look more realistic. This can also be done by controlling the strength factor of the Bump Node, however I feel this way gives me more control, especially when using multiple generated textures at once.

thanks, man! appreciated


text:
I Can't Figure Out How to Build This Chair
I'm currently learning Blender through a book called "Blender 3D By Example". Right now I am on a section about creating chairs.
I can't figure out how to make the first chair by following the instructions. It uses almost entirely modifiers rather than box modeling. If any one could explain or show how to make this chair it would be a great help.
Here is the finished file provided with the book: Finished File

I'm not sure how familiar/new to Blender you are, but if you're just starting out and looking to learn modelling through making a chair, I'd recommend watching Blender Guru's chair modelling series: https://www.youtube.com/watch?v=Hf2esGA7vCc
Additionally, if you're really new to Blender, then I'd suggest his beginner tutorial series: https://www.youtube.com/watch?v=TPrnSACiTJ4
Sorry, I know this doesn't exactly answer your question, though modelling is quite a subjective topic, and there are multiple ways to achieve what you want with various techniques, which are learnt over time.

For both the chassis and the slats he is just arraying a mesh along a curve, so he's mainly using 2 modifiers: Array and Curve. You'll easily find tutorials on this matter. For the slats, it gives that (I won't use a Mirror modifier but it doesn't make a big difference):

Create a bezier curve, give it the profile of the chair back along the X axis (it will make the array along curve easier to keep this axis)
Create a plane, stretch it in Edit mode on the Y axis. Make sure its origin is at the same place as the curve's origin:

Give the plane an Array modifier, choose the amount of instances (Count), enable Relative Offset and choose a X value of 1.2 for example, so that you keep a gap between the instances.
Give it a Curve modifier, choose the bezier curve as Object, choose X as Deformation Axis:

To change the slat length, select the bezier curve, go in Edit mode, select a vertex, and press AltS to scale:

You can create additional vertices for the curve: go in Edit mode and right click > Subdivide. And you can give thickness to your plane with a Solidify modifier:

I added a bezier curve, then clicked on a verticex inside it, brought the 3d cursor to it and then set the curves origin to the 3d cursor. I then created a plane and scaled it on the x and y since it needs be 0.6 meters by on the y axis. I then added an array modifier and gave 1.2 x offset with relative offset. I then added a curve modifier and selected the bezier curve. Except the planes arent following the curve correctly. Here is what it looks like: https://imgur.com/gallery/ZaV8gcx .

please share your file, upload it here: https://blend-exchange.giantcowfilms.com/

maybe try to apply the scale and rotation of your plane, if you ever transformed it in Object mode

I only scaled in edit mode, scale and rotation are all 0.

As I said it makes things easier if you align the object and curve on the X axis (in the +X direction), so rotate both object and curve in Object mode and apply their rotation and it should work

It worked, thank you very much!


text:
Donut project: Extrude producing blocky icing
I am following Blender Guru on Youtube step by step, but seem to get hung up on this part, even after restarting the project from scratch several times.  I'm not sure what I'm missing but his extrude seems to be nice and fat and rounded off by default, but mine is totally squared off.  I"m obviously missing something fundamental but for the life of me I'm not catching it when he says/does it.
I applied the additional subdivision as he does as well, and solidify settings were the same.
Edited to provide more detail.

I've also tried rounding the edge first, and got this:

And here's what his looks like:

I haven't seen that tutorial but did make a doughnut some time back.  I didn't extrude the icing, rather used proportional edit which allows you to move a single vertice up or down, and those vertices nearby will follow it, but proportionally. (graduated fashion)  Some subdivision beforehand would likely be required. You end up with a nicely curved edge.  To see the radius of influence the P/Edit will have, select the vertice first then press G (grab) and use the page up/down numpad keys to see and change the size of the influence.  Hope that helps...

have you given a Subdivision Surface modifier to your object? It looks like not...


text:
trying to create a bmesh from csv coordinate list
Hello fellow Blender snakehandlers,
I have a list of coordinates in a csv file and I would like to create a mesh with only vertices from it.
When I run it, it throws the following error, which I can't decipher.
Any ideas on how to make this work? Thank you!
line 54, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\bpy_types.py", line 429, in from_pydata
    self.vertices.foreach_set("co", tuple(chain.from_iterable(vertices)))
TypeError: couldn't access the py sequence

CSV
id,x,y,z,r,g,b
0,0.30778491,0.12740749,0.04903458,174.0,84.0,118.0

PYTHON
import bpy
import csv, os, bmesh, math

#filepaths
filepath = bpy.data.filepath
directory = os.path.dirname(filepath)

blendname = bpy.path.basename(bpy.data.filepath)
blendname = os.path.splitext(blendname)[0]
if blendname:
    bpy.context.scene.render.filepath = blendname
print(blendname)

some_dict = {}

# DO POINTS
csvpoints= directory+"/csv/3d-points.csv"
pointsReader = csv.reader(open(csvpoints, newline=''), delimiter=',')

#bpy.ops.object.mode_set(mode='EDIT')

obj = bpy.context.object

verts = []
edges = []
faces = []

for idx, row in enumerate(pointsReader):
    #print(idx, row)
    id = row[0]
    print("id = "+ id)
    x = row[1]
    print("x = " + x)
    y = row[2]
    print("y = " + y)
    z = row[3]
    print("z = " + z)
    vert = (x,y,z)
    verts.append(vert)

#create mesh and object
mesh = bpy.data.meshes.new("wave")
object = bpy.data.objects.new("wave",mesh)

#create mesh from python data
mesh.from_pydata(verts,[],[])
mesh.update(calc_edges=True)

#set mesh location
object.location = bpy.context.scene.cursor_location
bpy.context.scene.objects.link(object)

Might be related: https://blender.stackexchange.com/questions/36837/convert-csv-latitude-longtitude-to-blender-coordinates?s=1|49.5043

The manuals suggest using the csvreader in a with block.
You made two mistakes.

You have to skip the first csv line, since it doesn't hold any values. (Or treat it differently.)
You have to parse the numeric values. float(row[0])

Working example.
import bpy
import csv, os, bmesh, math

#filepaths
filepath = bpy.data.filepath
directory = os.path.dirname(filepath)

verts = []
edges = []
faces = []

csvpoints= directory+"/points.csv"
pointsReader = csv.reader(open(csvpoints, newline=''), delimiter=',')

with open(csvpoints, 'rt', encoding="utf8") as csvfile:
    pointsReader = csv.reader(csvfile, delimiter=',', quotechar='|')
    for idx, row in enumerate(pointsReader):
        if (idx > 0):
            vert = (float(row[0]), float(row[1]), float(row[2]))
            verts.append(vert)

obj = bpy.context.object

#create mesh and object
mesh = bpy.data.meshes.new("wave")
object = bpy.data.objects.new("wave",mesh)

#create mesh from python data
mesh.from_pydata(verts,[],[])
mesh.update(calc_edges=True)

#set mesh location
object.location = bpy.context.scene.cursor_location
bpy.context.scene.objects.link(object)

Ah that works! Which manual do you refer to? I googled and came up with nothing suitable. A lot of code examples parse csvs with a for loop...

@anf Just various python docs.

I have another csv that lists edges like so:
source,target
214,0
how do i create edges between the verts in the mesh? a nested for loop? with itertools?
with open(csvedges, 'rt', encoding="utf8") as csvfile2:     edgesReader = csv.reader(csvfile2, delimiter=',', quotechar='|')     for idy, row in enumerate(pointsReader):         if (idy > 0):             edge = mesh.verts.[edgereader.row[0]], mesh.verts[edgereader.row[1]])             edges.append(edge)             #print(idy)             mesh.edges.new((mesh.verts[0], bm.verts[1]))

@anf Go ahead and ask a new question. =)

https://blender.stackexchange.com/questions/96070/how-to-create-edges-in-existing-mesh-based-on-csv-with-python
Vielen Dank / thank you for your help! :)


text:
Does Blender remember every manipulation done?
Does Blender remember every manipulation done (especially creating mesh, scaling, translation, rotation, extrusion, deletion, loop cut etc)? If not, how can this be achieved? Because I was looking at this video and was asking myself how every edit he made were recorded and I would like to look back the process of my model. https://www.youtube.com/watch?v=3edaWDU_xKE

http://blender.stackexchange.com/questions/3026/how-increase-decrease-undo-steps
This is probably what you're looking for

Yes, I've read this :D But I would like to know how to record the edits, because the person who modeled the car didn't make that car without breaks :P

There is an addon for creating snapshots from mesh - http://blenderaddonlist.blogspot.com/2015/03/addon-non-destructive-modelling.html, and possibility returning to them after if something's not good..

@MrZak Why not converting this into an answer?

@poor as I've got from Jerryno asnwer, the OP wanted to create animation using that and that it's not possible. And yes, that addon can't do that. So I was in doubt whether this answer could be useful for other visitors

@MrZak Ok, upvoted the comment - hopefully other users will find it...

No it doesn't remember edits for playback like you want (and like ZBrush and others can).
What you would need to do is to export each step as an .obj, load them all into a new scene and animate them so they appear in a sequence one after another.
Then you can render this with orbiting camera and with wire-frame modifier on.
Using scripting to do this would be smart, there are many answers here how to import multiple obj's and how to animate multiple objects.
Some addons can store geometry states into a buffer, but there is no way that I know of how to efficiently animate them.


text:
How can I select a vertex/edge/face created by modifer, without applying modifier
After using a modifier, how can I select a vertex/edge/face created by modifier, without applying the modifier?

Why not using multires modifier instead?

For some modifiers will work turning on Display modifier in Edit mode and Adjust edit cage buttons in modifiers properties (like Array, Solidify, Mirror)

Nope, that's not possible - There is no 'Edit Mesh Modifier' like in Max at the moment to edit the geometry afterwards. The only solid option you have is adding a lattice to deform your geometry.


text:
How can I make springs stretch and squeeze, depending on the cube movements?
I have a lot of springs, connected in between cubes. These cubes are next to each other. How can I make the springs stretch and squeeze with stiffness, depending on the cube movements? With constraints or with physics?

It could greatly depend on the degree of realism, versatility and easiness you wish, since you have three ways: simulation (physics), constraints (dynamic rules), and animation (static rules). Animation is "easier" to setup but gives "easily" less natural results not versatile at all, though if you can simulate the spring behaviour in the "blender game" mode, there you can automatically "record" the animation steps, frame by frame, and the reuse it in the animation.

for the last part, see this also: http://homepages.ihug.co.nz/~m_collett/blender/spring4.html or search similar tutorials

The stretching of the springs can be accomplished through the 'stretch to' constraint.
The motion of the cubes driven by the springs can be generated using Blender physics.
The animation, generated in Blender 2.76, uses rigid body physics to solve for the motion of the cubes and uses the 'stretch to' constraint to stretch the springs.

The steps to generate this kind of animation are:

Add three cubes to the scene. Name the cubes 'top', 'mid', 'bot'. These will be the red, green, and blue cubes in the animation.
In the physics tab, add rigid-body dynamics to each cube. Add rigid-body constraints. Setup spring constraints between each cube. For the top cube (the red one in the animation, check 'Animated'. This setup will animate the cubes moving up and down, driven by the springs.

Add 4 empties to the scene. The empties will be used to locate the ends of the spring on the cubes. Name the empties as follows: top-lower, mid-upper, mid-lower, bot-upper. These empties are placed at the upper and lower face of the cubes. The image below illustrates the placement on the bottom of a cube.

Create the spring so it aligns with the y-axis. Parent the spring to the empty on the bottom of the cube. Repeat this each cube.

Add the 'Stretch To' constraint to each spring. Chose the empty on the upper part of the cubes as the target.

Now, if the animation is started, the results should resemble the animation.

The blend file for this animation is:

this is awesome!


text:
How can I make a node setup, where only round emitter glows outside the image?
How can I make a light source glow and that only this glow surrounds the emitter?
I tried the following compositor setups:
In this setup the emitter (white) is blurred, so that it glows outside the image. But, what I don't want, the red piece is also blurred to outside the image

In this setup, the red piece is not blurred, but the glow of the emitter (white) doesn't glow outside the image either.

How can I make a setup, where the emitter glows outside the image, but red piece doesn't?

Use a ColorRamp Node to isolate the highlights

NOTE
This is a common way to set the treshold of black and white area for creating a mask.
However, the answer of @ajwood is more specific to the question, because the glow effect is applied to materials that actually emit light.

You could enable an emission pass in the render layers tab:

Then blur and overlay the Emit pass:

For the Emit Pass doesn't have alpha channel, you could use a Mix Node Add or Lighten and switch the inputs. Doing so, you can apply the effect even over image with a background.

This selects by color and has colored alpha over.  In case you do not want to use white light objects and object id.  White ignored. Blue is selected and yellow is cast.

Nodes

The second image emphasizes the nodes with larger nodes. You may evaluate the second image.


text:
What is the difference between 'Save as' and 'Save copy'?
When I want to save a copy of my blend file, I know two options:

File > Save as
File > Save copy

What is the difference of the two?
And after I press them I see the same result, except difference of 'Save Copy' being checked:

When I point my mouse on it it says for both:

I guess those descriptions are the same because it's the same operator just with another parameter?

The only real difference is which file you continue working in

Save As will save the current file as a new file, and you will continue working in that new file.
Save A Copy will save an exact copy of the file with the entered name, and you will continue working in the file you had open before the operation, leaving the copy exactly the same.


text:
Blender doesn't ask 'Do you really want to quit', when I press file -> new
When I am working on a .blend file, but didn't press file -> save or file -> save as, then when I want to close Blender, Blender will ask whether I am sure to quit:

However, unlike for example microsoft paint, it doesn't ask this question if I press file -> new or file -> open (thanks to Jan Kaderabek :) ):

It explicitly says "Open the default file (doesn't save the current file)" when I point my mouse on it, but some new users may not know this and open a new file without saving their previous file.
My question: how can I make Blender ask this too when I want to open a new file?

Is this a feature request or a question?

Sorry, edited my question :)

For me it shows a standard pop-up "Reload Start-Up file?" which you should click to confirm. The session won't be saved of course if previous file was closed by creating new one, but the confirmation should be there.

But there is no confirmation if you open another file via Shift-O... I think a user should be notified that he has changed the current file and prompted to save it before loading another one.

Unfortunately, you can't do this. Notice that Blender uses an operating system specific dialogue box instead of the normal Blender UI. This appears to be more of an operating system thing than a Blender, but it obviously doesn't work with the Blender controls.
You can see that if you do File > Quit, Blender will open a dialogue box that asks if you want to quit (it is the same whether the file is saved or not).

This is not a "smart" dialogue. The same applies to the "new file" button. Blender opens a dialogue box, but it is not an OS level "smart" dialogue box.


text:
Match two planes with different origin locations (Blender Python Matrix Math)

We see two identical Plane objects: A(blue) and B(red)
They are oriented arbitrarily in the 3D space.
Notice that the origin of A is located in the center and the origin of B is located in the lower left corner.
The problem:
What is the python code in Blender that will match the shapes of A to B perfectly.
I tried to match the matrices:
A.matrix_world = B.matrix_world

This matches location, rotation and scale of the objects but I still need to offset A by half width and half height in order to fit them perfectly.
Is it possible to do that with some of the available Matrix functions in Blender?

Are these both single face planes?

Yes they are single face Plane objects.
Maybe I should upload the blend file for more clarity?

Face centre as "Pseudo Origin"
Given we have 2 single face planes, will make the face centre the "pseudo origin" and match that.
Test script, moving "Plane.001" to "Plane".  The difference in face centre coordinates vector is used to create a local transformation matrix. Premultiplying this by the matrix world will translate the "face centres" to match.
import bpy
from mathutils import Matrix
context = bpy.context
scene = context.scene
# going to match transform of p2 to p1
p1 = scene.objects["Plane"]
mw = p1.matrix_world
p2 = scene.objects["Plane.001"]

# local offsets
o1 = p1.data.polygons[0].center
o2 = p2.data.polygons[0].center
# match the face centers global coords
# local translation matrix
LTM = Matrix.Translation(o1 - o2)
p2.matrix_world = mw * LTM

Your answer really helped me!
I will post slightly modified version that takes origins instead of face centers, but it doesn't deviate much from this answer. Thank you!

Here is my slightly modified version of batFINGER's solution:
import bpy
from mathutils import Matrix
from mathutils import Vector

A = bpy.data.objects["A"]
B = bpy.data.objects["B"]

# local offsets
# The origin of A is in the center (positive dimensions divided by 2)
# The origin ob B is at lower left corner (zeroes)

# local translation matrix
LTM = Matrix.Translation(A.dimensions/2 - Vector())

# match Planes - A to B

A.matrix_world = B.matrix_world * LTM

This will work if one of the origins is in the center of the Plane and the other origin is in the lower left corner, and both planes A and B don't have applied rotation to them


text:
How to transfer scale direction and magnitude of rotating object to another in world space with Animation Nodes or Sverchok
I was trying to figure out the following problem.
If given two objects A and B, A is scaled non uniformly (i.e. scaled along Z axis), B have no scale transformation - can B object be scaled according to A worlds scale direction and magnitude, which additionaly can be modified by rotation.
I already did somewhat succesfull attempt using directly python, here is an example:
https://twitter.com/Syziph/status/903380750619299840
but I am curious if this could be done in Animation Nodes or Sverchok easily.
A little clarification

In the first state the scaling object (red arrow) has orientation 0 and scale of 1 i.e. it has no effect on the target object (black rectangle).
In the second state - the arrow is rotated 47 degrees CW and scaled by factor of 2. The rectangle is scaled in the direction of the arrow.
The third state is similar to the second just different orientation and scale of the scaling object.
Basically it is like Rotate object by angle X  - apply rotation - Scale object on single axis by given factor - apply scale - rotate back by angle -X - apply rotation.

i'm not sure what you mean, but if you show the python code you used it can probably be modified to work inside Sverchok too. Code may be easier to comprehend than the natural language (english) description.

I posted some additional explanation.

I am not sure if there is a mathematical way to describe this transformation, but the closest I can think of is the Shear transformation.

Or translation of vertices based on the distance to the line perpendicular to some vector:

That's interesting idea Omar! So, I have to input the control object's scale and rotation into the Compose Matrices?
BTW, by chance I discovered internal Blender object that behaves in the desired way:

Create an Empty object (type Arrows, so you can see the XYZ letters)
In Top view scale the Empty along Y axis (for example by 3 )
Press R to rotate the empty in top view and observe the letter Z - it shears according to the scale and rotation of the Empty, but the letter itself doesn't rotate.

So I played with the node set-up from above adding control object and keeping the modified object still (by inverting the rotation). Here is the new setup:
https://i.sstatic.net/X2S6T.png
The only issue is that the scaling is in wrong direction. But it's pretty close to what I was aiming for. Any ideas how to fix that issue?

Thanks, Omar! I think the last variant is an ultimate solution of the question.

So finally, thanks to the help from Omar, I think I found the solution of the question.
You can see a little demonstration on YouTube here:
Arbitrary Scale Direction with Animation Nodes
and the node setup for Animation Nodes below:

Here is more solutions from Fábio Biff CG using Latice Modifier, Drivers, Animation Nodes and Sverchok.
https://www.youtube.com/watch?v=ntd9cI0i7S0
https://www.youtube.com/watch?v=nDAlkn20k5g
https://www.youtube.com/watch?v=QXC5HZLBkmc
https://www.youtube.com/watch?v=3kMeT2U9tl4


text:
how to avoid gaps on the distribution of hair on a model?
How do I get particle hair on a model I made, with out it resulting in many spots on the mesh with no hair at all?
Here is a picture of the problem.

Often the gaps are on the tail arms and legs.

Use interpolated Children and augment particle numbers if needed bro.

Hair particles are able to cover all the faces of a mesh. Maybe some your  setting are not pointing in this direction (ex. it's emitting from verts instead of faces, it has a density texture...). Could you post a 1/2 screenshot of them and add more information?

i posted the problem now.

Please use the "edit" button below your question, instead of posing additional information as  "answers."

Maybe some faces are facing the wrong direction. Have you tried to recalculate normals (Edit Mode > Ctrl + N)?

Particles with Interpolated Children
Probably in some parts of your mesh, the particles (hair in this case) are not dense enough.
Interpolate option creates children based on the "main" particles properties (location, orientation...)

if these particles (main) are not enough, increasing the number of children would not help in filling the gaps. Notice how the spiral patter is similar to the one in your screenshots.
The image was made by adding a Particle system (Hair type) and tweaking the following values:

Emission Number = 100
Interpolated Display = 280

By disabling the Interplated children option, you can see the particles that actually are generated. These are the only one that will be truly affected by simulations, hair editing...the children will simply follow their properties.

You must ensure that the "main" particles are well distributed upon the mesh, and only at that point you can increase the overall density with childrens.

The image was made by adding a Particle system (Hair type) and tweaking the following values:

Emission Number = 4000
Interpolated Display = 7

Notice how the thinner part of the mesh is full of "guiding" particles.
Result:

Could you add an explanation of how to get from the second to the third image?

@PGmath He have activated the "Interpolated" option. See the difference in "Children" panel of both images.


text:
How to make an animation play in the blender game engine?
Ok so I have created a character and rigged it and when I hit the play button for the animation it plays just fine.
I have set up the logic bricks multiple time yet whenever I hit P to play the animation never plays.  I cant seem to find my mistake if anyone could help me it would be much appreciated.
edit: here's the link

First you had the logic bricks on the wrong object. You needed the Action actuator on the Armature not the mesh object, because it is the armature that is animated.
Your second problem was the mirror modifier (I applied it). The mirror modifier was causing the animation to not play in the BGE. Just another one of the differences between the game engine and blender.
In general you should not have any modifiers or transforms (scale or rotation) on your objects in the BGE.
Your working blend file.

Thank you so much for your help i was so puzzled by this but i am very new to the bge so i guess this is something that is learned along the way, thank you for taking the time to look at it and solve my problem:)


text:
How to shade geonode-animated mesh with mid-graph location attribute?
Using geometry nodes, I set up hexagons to move up and down in a sine wave pattern as the scene moves through time. Then, I added noise as an offset, to vary the hexagons' height as they move up and down the sine wave. When assigning color to the material, I'd like the color to come from the hexagons' height, but only their heights from before I added the noise offset in the geometry nodes graph. Right now in the shader nodes editor, the "Object Info" node's Location value is outputting the final location, after the geometry is offset by noise. Can I get the pre-noise location to drive my shader color?
Edit: Capture attribute doesn't seem to be working the same way as one answer shows. I'm posting screenshots and my file for reference. I'm using Blender 3.1 :

Try to use Transfer Attribute node.

this node setup does what you want:

shader setup:

modifier:

to answer the question in the comment, how to setup the shader that the top part is white and the bottom part black:

you can use a colorramp and the generated texture coordinate z for that. Together with a math node (greater than) you can determine which color should be chosen.
You have to mute the "realize instances" node in GN to make that work.
--- UPDATE on next comment:
you can use this shader node setup:

and adapt the GN node tree like this:

to get this:

Thank you. I tried using your same node setup using Capture Attribute, but it doesn't seem to work for me. I'm using Blender 3.1. Instead of using noise, I'm using an empty whose Z transform is baked from sound files (for music visualization). Perhaps I should upload my file?

If you want me to take a look : yes

Much appreciated. I edited my original question with three screenshots of my setup, as well as a blend-exchange link to my file.

you have set the output to instance, set both to point and it works [6]: https://i.sstatic.net/hHcz2.jpg [7]: https://i.sstatic.net/Rl5Ko.png if my answer helped you, please click on the checkmark left to my answer. thanks.

Thank you so much Chris! One last thing I wanted to ask is, is there a way for the color of each hexagon to vary along it's height? As in, if the center of a hexagon prism was at z = 0, could the top part (where z > 0) be in one color like white, while the bottom part (z < 0) be in black?

so you now want the color to be constant and should not change anymore over time, did i understand you right?

i updated my answer

I apologize, I should've been more clear. I would like to keep the varying color over time, but instead of each hexagon being a single uniform color between the two colors of the color ramp, the individual hexagons also have a smooth gradient along the z axis. Edit: perhaps to put another way, even individual meshes have smooth color gradation to go along with the overall color ramp from top most hex to bottom most hex

i updated my answer again. Please do not ask more questions in comments. Please open a new question so everybody with same problems can learn and get help from them. You can ask as many questions as you want - but please - don't ask in comments. Thanks


text:
How to setup IK Arms with upper and lower arm twist bones?
I have two bones for the upper arm, and two bones for the forearm. This is to assist in proper deformations when rotating the elbow and wrist, respectively. (ie: Using forward kinematics, if I want to twist the elbow, I simply twist just the 2nd bone in the upper arm; to twist the hand, I simply twist the 2nd bone in the forearm)
How do I setup Inverse Kinematics using these bones? I don't want the movement of the elbow pole target to rotate the 1st upper arm bone and ruin the shoulder deformation, and same goes for the forearm/wrist. I'm having trouble figuring out the rig setup.
EDIT: The main problem is that my upper arm bones are not aligned along a straight path from shoulder to elbow, due to how the arm mesh is modeled.

Similar like this: https://blender.stackexchange.com/a/41550/7777. You can even use BBones if you won't use it outside of Blender.

Unfortunately that solution may not be the way, due to how my upper arm is rigged.

I suggest re-rigging that arm and placing the shoulder in the correct place. You won't get good results with this.


text:
Using python to create freestyle line groups
I am trying to make a python script that creates a 3-d graph and automatically puts certain edges in a freestyle line group.  So far I am able to create a surface with the code
import bpy
from bpy.types import Operator
from bpy.props import FloatVectorProperty
from bpy_extras.object_utils import AddObjectHelper, object_data_add
from mathutils import Vector
import bpy
import bmesh
import numpy as np

xmin,xmax,ymin,ymax = -3,3,-3,3
N = 30

def f(x,y):
    return (np.sin(2*x)+np.sin(2*y))/2

verts = [Vector((x,y,f(x,y))) for y in np.linspace(ymin, ymax, N) for x in np.linspace(xmin, xmax, N)]
faces = [(i+j*N, i+1+j*N, i+1+(j+1)*N, i+(j+1)*N) for i in range(N-1) for j in range(N-1)]

mesh = bpy.data.meshes.new(name="New Object Mesh")
mesh.from_pydata(verts, [], faces)

mesh.update(calc_edges=True)

obj = bpy.data.objects.new('new object', mesh)
obj.location = Vector([0,0,0])
scene = bpy.context.scene
scene.objects.link(obj)
scene.objects.active = obj
obj.select = True

I would like every other line of edges to be marked as a freestyle edge.  By hand, I would go to edit mode > edges, alt+click on every other edge (to select the whole line of edges) and then do a "Mark Freestyle Edge".  However, I would like my script to automatically mark the edges when the mesh is created.
Below is a picture with every other row of edges selected.

Nice script.  Could you please provide an image of the selection, ( bit confused by "every other edge") and result desired. (even if it's for N = 5)

@batFINGER Thanks :-).  I've added a picture.  My end goal is actually to mark edges whose vertices lie near an integer, but if I can figure out how to mark edges from python at all, I think I can figure out how to do the rest...

I think you are looking for object.data.edges[0].use_freestyle_mark

@sambler yeah that was the easy bit, got a bit stuck on how to select edges to mark.  Think there should be a quick way to do this with edge indexes, but it wasn't jumping out at me.

To mark a freestyle edge use MeshEdge.use_freestyle_mark
Here is some pretty ugly demo code to select every second line of edges in the x direction, that works because mesh is aligned x, y.
import bpy
import bmesh
from mathutils import Vector

context = bpy.context
mesh = context.object.data
N = 30
TOL = 0.0001

# clear all freestyle mark edges

for e in mesh.edges:
    e.use_freestyle_mark = False

def edge_by_value(e, axis, value):
    v1, v2 = e.verts
    return getattr(v1.co, axis) == getattr(v2.co, axis) and abs(getattr(v2.co, axis) - value ) < TOL

bm = bmesh.new()
bm.from_mesh(mesh)
bm.edges.ensure_lookup_table()

x = -3
while x < 3:

    edges = [e for e in bm.edges if edge_by_value(e, "x", x)]
    print(x, len(edges))
    for e in edges:
        mesh.edges[e.index].use_freestyle_mark = True
        mesh.edges[e.index].select = True # selected
    # every second edge
    x += 2 * 6 / (N - 1)

mesh.update()

Running with this line of code
    edges = [e for e in bm.edges if edge_by_value(e, "x", x)
               or edge_by_value(e, "y", x)]

Probably a better approach is: if you know the index order of the edges, would be using row/col integer modulus and div on the edge index.


text:
Print(store) particle velocity vector and distance from other particles
I am newbie to blender and I want to know if it's possible to store or output to a file the particle motion details (like velocity vector of each particle, distance from all other particles, particle ID, etc.) at various time-stamps (like at time T than at T+ΔT, so on).
Or are there any other hacks to do so?

You can loop through the particles in a particle system and read the location and velocity of each particle.
For the distance you will need to calculate that for each particle. The distance is a pythagorean calculation.
import bpy
from math import sqrt

scn = bpy.context.scene
obj = bpy.context.object
p_system = obj.particle_systems['ParticleSystem']

def distance(p1, p2):
    return sqrt((p1[0]-p2[0])**2+(p1[1]-p2[1])**2+(p1[2]-p2[2])**2)

for f in range(scn.frame_start, scn.frame_end):
    scn.frame_set(f)
    print('At frame {}'.format(f))
    for i1,p1 in enumerate(p_system.particles):
        if p1.alive_state == 'ALIVE':
            print(' particle {} has a velocity of {}'.format(i1,p1.velocity))
            for i2,p2 in enumerate(p_system.particles):
                if p2.alive_state == 'ALIVE' and i1 != i2:
                    d = distance(p1.location,p2.location)
                    print('  particle {} is {:.4f} from particle {}'.format(i1,d,i2))

Another take on this, using vector maths, and optimizing the distance from each to all some.
Suggest just exporting particles location and velocity vectors. The distance between them can be calculated anytime from the data.  As these are vectors, we don't need to define a distance function. The distance from particle p1 to p2 is d = (p1.location - p2.location).length  The vector v = (p2 - p1).normalized() gives a unit vector pointing from p1 towards p2.  If we travel d * v, the scalar distance times the direction, from p1 we will be at p2.
When calculating the distance of all particles in list to all others, can take advantage of transpose nature d(i, j) = d(j, i), in that  don't need to find the distance from p300 to p0 if have already found the distance from p0 to p300.  The direction vector from p0 to p300 is the same as p300 to p0, negated. v(i, j) = -v(j, i)
Change the calc_dist boolean to True to show distance calculations.
Test script, uses selected (active) particle system of active object.
import bpy

scn = bpy.context.scene
# active object
obj = bpy.context.object
# active particle system
psys = obj.particle_systems.active
calc_dist = False # True calculate the distance between parts.
f = scn.frame_start
while f <= scn.frame_end: # iterate over whole frame range.
    scn.frame_set(f)
    parts = [(i, p) for i, p in enumerate(psys.particles) if p.birth_time <= f <= p.die_time]
    #parts = [(i, p) for i, p in enumerate(psys.particles) if p.alive_state == 'ALIVE'] # equivalent
    print("Frame %4d %4d alive" % (f, len(parts)))
    print("-" * 72)
    while parts:
        i, p1 = parts.pop(0) # keep popping off left
        print("Particle %4d %s   %s " % (i , str(p1.location), str(p1.velocity)))
        if calc_dist:
            for j, p in parts:
                v = p1.location - p.location
                print("      -> %4d %12.4f" % (j, v.length))
    print("-" * 72)
    f += 1


text:
Can't Texture Paint
I came back to my 3d model after a while, and whenever I try to texture paint, nothing happens.  How do I fix this?

Your texture mask is black, it means that everywhere will be no brush. Make your texture mask white or delete this.
And, most likely, you should put your cloud texture in place of texture mask, with mapping "random" or "view plane"


text:
Need detailed instructions on how to make a football image rotate using Blender 2.83
I am a newbie with Blender (Version 2.83) on Windows 10.
I want to make a simple 3D animation for rotating a football. Now I have one footabll image in the Blender IDE.
But I can't find any good step-by-step guide. What I want is: to rotate the footall image for 360 degress within 60 seconds, I don't know which axis, I think Z-axis should be OK.
I read some documents, but it didn't help me, just made me more confused.

Assuming you want to rotate the ball as an object (the question is a little hard to understand, sorry), the best way would be to keyframe animate it.
At the bottom of the layout there is a timeline, pull that up so you can see it a bit better.
Keyframe animation works this way: you define a bunch of key poses that will occur at given times. The computer then will fill in the transitions making a smooth animation without much effort.
So to spin the ball:

Select the ball, make sure you are on frame 0.
Press I and select "rotation".
Move the bar a few frames forwards, for example 20.
Rotate the ball 90 degrees (any direction)
Press I again and select "rotation".

If you stopped now and pressed the play button and started from the beginning, you will see the ball spin... a quarter of a rotation. So repeat this process to have the ball make an entire 360-degree spin.
Now open a graph editor window with the ball selected and you will see a bunch of points. Each point represents the value inside a certain attribute of the object (e.g. rotation x) at the given time.
Press A to select all and V. Choose "Vector". This will make the ball's rotation smoother. Then press N to open up the side panel. Go to properties and add a "Cycles" modifier to every attribute that was animated. This will make the ball spin infinitely.
That's it! Keyframe animation is a very useful animation method because the user only needs to specify a few poses and the computer will fill the rest.


text:
Hello Im wondering if anybody can help me figure out how to keep the edge from stretching while using the mirror modifier?

Hello Im wondering if anybody can help me figure out how to keep the edge from stretching  while using the mirror modifier?

hello, it's not clear what's happening, are you looking for the Clipping option (in your modifier)?

Your modifier is both bisecting and flipped along the X axis meaning all geometry in the positive X space will be overwritten by the geometry in the negative X space mirrored. If you want it to stop stretching, check "Clipping" in the modifier settings and move the extended geometry back to the X = 0 plane


text:
Fluid mesh disappears when I save
I am brand new to Blender and this is the first project I've made. I am using 2.83. I am following this tutorial: https://www.youtube.com/watch?v=6zOjJfc6ZJI to make a fluid fill a container.
Yesterday I baked my data and my mesh and everything seemed to look as it should. I saved this project with multiple versions each time, 5 to be exact. I could close the file and reopen it and everything still looked correct. Last night my computer died of low battery, however, I knew my files were saved, and I was going to save rendering for today. Now that I opened the file today, my fluid looks totally wrong
The fluid and its color is still there but it now fills the container in a weird way:

When I am in the solid view and I move through my timeline I see no particle data and no mesh at all. When I am in the render view it looks as it does in the attached picture. Everything is in this weird oval shape and there is no movement. I've also attached how things should look as in the tutorial. This is how it looked for me yesterday:

I am not sure how to fix this other than freeing the data and baking it all again.

Inside the fluid simulation settings, go into the Cache menu. Inside of it there should be a file path. This will lead to the location where your fluid data is stored in.
Navigate to the folder where the Cache says the data is. Inside that folder, look for more folders titled with names like Data, Mesh, Config as those are the folder names that Blender uses to store fluid sim data. If you are able to find these folders and they have files inside, then you have a problem because Blender is not reading them. Double-check the file paths.
If they don't exist, then you have a problem because the fluid simulation files are gone. This is usually because if you do not specify a cache folder, then Blender finds a temporary space for it. On my computer, this temporary space is always cleared when it shuts down or restarts. This means you have to rebake everything again.
To avoid this problem in the future, always specify a cache folder in the cache menu before you bake anything.


text:
Can I set my pose position like the new rest position?
I would like to move my armature from pose mode to another pose (a random one) and set the position I create like the new rest position. Is there a way in order to achieve this goal?
My armature is deforming a mesh so I want to deform the mesh too.
This is my mesh and its relative REST POSITION:

I want to change and set a new REST POSITION and I follow your advice;
I change my armature in pose mode and then click on Apply pose as Rest Pose:

The result is this one:

The armature resets the rest pose like I wanted, while the mesh - I can't understand why - comes back to the original position (the one set by the old rest pose).
Why doesn't it work?

If none of these solutions work for your scenario, you might want to try Pose Library, set a default pose and add a new pose, that's it. It should be noticed that this is not actually a default pose, but you could apply the pose instead, or even another rest pose.

Apply the armature modifier - armature in rest pose doesn't deform anything, so we need also a mesh to match the new rest pose.
Pose > Apply Pose as Rest Pose. This will set current pose as the rest pose. It sets only bones poses - constraints or custom properties in complicated or badly designed rigs might make the rig act weird with bones in different rest state!
Add the armature modifier back.

Seems to be more complicated than necessary, why do we have to apply the modifier first, it should work without this?

And what about rigify? It's definitely too complicated or badly designed. How to make it right for a rigify rig? Should I re-pose the source metarig and then just rebuild, or there is another way?

@Mechanic Yes, exactly like that. You do that on metarig and then generate the complicated rig again. It's the reason why complicated rigs need to be generated with scripts and not build by hand. If it didn't had this functionality to generate from metarig, it would be indeed "badly designed rig".

@Jaroslav Jerryno Novotny, thank you. I've played a bit with different layers of the rig, and eventually I regenerated it in the new pose. Thanks gods there is a snap tool to easily re-pose the metarig against the already posed actual one.

Where is "Apply the armature modifier"? How do I change the mesh to the pose position?

@AaronFranke In object modifiers: https://docs.blender.org/manual/en/latest/modeling/modifiers/index.html

One thing to be aware of is that you cannot apply a modifier to a mesh that has SHAPE KEYS.   So if your are using (for example) a converted Daz3d rig with morphs and associated shape keys, you cannot use this trick (unless you want to sacrifice all your morphs and associated shape keys.)

Apply the pose as rest pose.  Remember this will naff up any animations using the previous rest pose.  There will be a warning of such in the system console.
Applying the armature modifier will deform the mesh to match a pose.

i edit my quesion after i use your method. Please check it. I can't understand why doesn't work

How do you apply the armature modifier? I can only see where to apply a pose as rest pose, but this results in the bones being outside the mesh.

Apply pose as Rest Position only sets armature position, there is a sophisticated way to do this without any plugin by a hack, this blog saved me several hours of modelling.

-It copies armature modifier in Object Mode.
-Then applies one of the modifier, and voila. :)

In addition to the other answers, I've been using the Cats Blender plugin which has a built-in button to do this. It handles both mesh deformation and changing the pose bones at the same time.

Once you have Cats installed, you can open this menu by pressing N, then "CATS", then you can click "Apply as Rest Pose". Note that if you wish to pose the object further, you need to go into "Object Data" Context -> "Skeleton" -> select "Pose Position".

Hey this one will simply help you a lot dude! Simply click on armature then click the human form Icon under it it indicates the rest position! Good luck !

That just switches between the 'Pose' position and the 'Rest' position, it doesn't apply the 'Pose' position as the 'Rest' pose.

Since NO ONE GAVE AN ANSWER.

Click on Mesh. The Golden/Green Triangle.(main model the triangles that make the shape ETC) in Object Mode.
That Blue Wrench Icon on the lower side panel(if going by default Blender UI) That's your Modifiers
From there your Armature Modifier lives here. This allows you to choose which Armature the Mesh is Parented to and will deform to.
There is a VERY SMALL ARROW MENU next to a bunch of toggle buttons and Close Button. In there is Apply, This will apply the Mesh into the Pose you have just done. IF you have ANY Shape Keys in the Armature this will fail to run and MUST BE DELETED Blender will give a popup about this error if there are any.
You MAY have to remake you Armature Modifier depending on how blender feels today. Just Click Add Modifier -> deform -> Armature. Then in the empty Object box hit the icon and click which Armature in the scene you want.
Now all you need to do is return to Pose Mode CTRL+A apply -> apply Pose as  Rest Pose to Match your bones back up.
Now save CTRL+S and hope you don't go mad because of the UI design again.

Remember Undo/CTRL+Z is your friend.


text:
How can I assign a value of a variable only with the start of the game
I need that certain value of a variable be available in other functions.
Furthermore I want it initialised when loading the game, at which point the variables are set to their default value. Within functions, the value of the variables may be changed, but the value, which was initially assigned to the variable, is not affected by the new value which the function may assign the variable.
I want the initial value to be constant and for it to be impossible to update the value.
I'm grateful for your help, I'm a beginner in Python.

Your question in its original form is somewhat confusing. I have attempted to clarify what you are asking. If I am incorrect in my assumptions, and edit, then please do not hesitate to roll back the edit.

If I understand your question correctly, then I think you mean that you want a global constant that is initialised at the start of the game. The value of this global constant should be accessible in other functions, but those functions should not be able to change the value of that constant. Is that correct?
If I am correct in my assumption above, then the answer is in this question on StackOverflow: How do you declare a global constant in Python?:

You can just declare a variable on the module level and use it in the
  module as a global variable. An you can also import it to other
  modules.
#mymodule.py
GLOBAL_VAR = 'Magic String' #or matrix...

def myfunc():
    global GLOBAL_VAR
    #do something

Or in other modules:
from mymodule import GLOBAL_VAR

ok thank you this solved my question.

If this solved your problem, then please mark this question as the accepted answer, and upvote. Thanks.


text:
Why do I get a "seam" using Mirror modifier?
I started using Blender a few weeks ago and right now I'm starting my first project without a tutorial. I'm starting to create a character and the first thing that came to my mind was "It needs to have symmetry", so I used a Mirror modifier on my object and it has this "seam". In the image I used a Sphere because it is much more noticeable.
So, how can I fix it? And why does this happens?

You probably forgot to include the image you referred to. But try checking Clip in the mirror modifier's settings, to 'prevent vertices from moving through the mirror plane' (https://www.blender.org/manual/modeling/modifiers/generate/mirror.html#options).

You should turn on clipping, as Cebbi has already mentioned. Also, the subsurf modifier should go after the mirror modifier.
That should do it.

Thanks. The problem was the order of the modifiers. It tried a lot of things,  yet I forgot about the most simple.
PD: I'm DarkDiosito, the one that helpled was Cebbi. THANKS CEBBI!

Glad I could help!

you could mark this as answered. ;)


text:
Is there any way to turn off light contribution from the HDR environment maps in Blender Cycles?
I want to turn off any light contribution to the scene by HDR maps. Background texture must be visible but there should be no light contribution to the scene.

you can texture a UV sphere and use it as a dome.

Related - http://blender.stackexchange.com/questions/38851/cycles-how-do-i-exclude-the-environment-texture-from-reflections.

You can disable the ray visibility of the environment for everything, except for the camera.

unchecking the diffuse texture is all I had to do , thanks!

Setup your world material like this:

Using ray visibility is somewhat faster than the light path node in a lot of cases (although I'm not sure about this one). This is because it can prevent a sample instead of just zeroing out the sample after it's taken. Not sure that applies in this case, but generally if you can obtain your desired result with the ray vis switches, you should use those instead of the light path node

Yes, it would be faster in this case, but there are other reasons to use the light path node.


text:
Change active object through scripting
Currently running 2.79
I'm having issues figuring out how to select objects:
This is my code, what I want it to do is create two spheres, and then resize the first created sphere after the second is created
def sphere(x, y, z, radius, resolution=30):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=resolution, ring_count=resolution, view_align=False, enter_editmode=False, location=(x, y, z))
    bpy.ops.transform.resize(value=(radius, radius, radius), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
def renameActive(name):
   bpy.context.active_object.name = name
def scale(x, y, z):
    bpy.ops.transform.resize(value=(xScale, yScale, zScale), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
#change active
sphere(3,0,0,1)
renameActive("RescaleLater")
sphere(0,0,0,1)
renameActive("leaveAlone")
scene = bpy.context.scene
objs = scene.objects
rescaleSphere = objs['RescaleLater']
scene.objects.active= rescaleSphere
print(objs.active)
scale(1,2,1)

After running this, console shows:

< bpy_struct, Object("RescaleLater")>

So the active object should be what is being rescaled, but as shown below the sphere titled leaveAlone is being scaled.
This is what shows up; the leaveAlone sphere has been resized but in the scene outliner RescaleLater has its name highlighted, though it's not actually 'active' in the sense where I can edit it through scripting as the activated object.

More elaboration:
I know I can just resize immediately after creating the first sphere, but I need to figure this out to implement applying Boolean modifiers on specific objects (I can create the Boolean modifiers and tie them to the correct objects but haven't been able to apply), my code is more complex but this I've simplified it to this to get to the core problem of not being able to manually set the active object through python scripting. I can provide full code if helpful. Have also tried all the other versions of this question that I've seen here/elsewhere but haven't found something that works.

You could return the sphere object from createSphere so you can access it directly later:
def sphere(x, y, z, radius, resolution=30):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=resolution, ring_count=resolution, view_align=False, enter_editmode=False, location=(x, y, z))
    bpy.ops.transform.resize(value=(radius, radius, radius), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
    return bpy.context.active_object

Now the sphere creation, renaming and scaling could look as follows:
first_sphere = sphere(3,0,0,1)
first_sphere.name = "RescaleLater"
second_sphere = sphere(0,0,0,1)
second_sphere.name = "leaveAlone"
# Rescale first sphere
first_sphere.scale = (1, 2, 1)

Another way to retrieve and object: from bpy.data.objects, if you know the name of the object
obj = bpy.data.objects.get("ObjectName")
if obj:
    obj.scale = (1, 2, 1)

Thank you, I didn't realize i could call bpy.ops.transform functions directly on to objects. Is there a way that i would be able to do something similar with the bpy.ops.object.modifier_apply(apply_as='DATA', modifier="nameofmodifier")?  Ive tried and first_sphere.modifier_apple(etc...) calls an error " 'Object' object has no attribute 'modifier_apply'   "

Use the object reference
One issue here is that operators often work on the selected objects. When a primitive is created, it is both active and selected. In your code above if the other sphere, albeit not active, is selected, it will be scaled.
If we have some object reference ob and we want it to be the only object selected and active before calling an operator
for o in context.selected_objects:
    o.select = False
ob.select = True
scene.objects.active = ob
bpy.ops.foo.bar(...)

I would seriously reconsider the logic of context reliant methods and pass and or return object references. As shown in sphere method in code below, can return the reference to the newly operator created object via the context.
Can rename the object via the reference.  Because of blenders need to have unique object names per blend. eg in default scene rename Cube to Camera and it will set it to Camera.001 since the scene already has an object named Camera.  With a reference to the object ob the name designated by blender will always be ob.name Keep this if you want to reference later by name.
Secondly can often do the same operations on objects without using operators, Changed the scale method below as an example of how to globally scale an object with matrices via the API.
While writing this another similar answer has been posted, suggesting much of the same Please note though the difference between setting local scale with ob.scale = (x, y, z) and using the operator, or method in code below which applies a transform. If both are run three times, on same object, with x, y, z = 2, 2, 2 the latter two will yield a global scaling of  8, 8, 8 the former only ever sets local scale to   2, 2, 2.
import bpy
from mathutils import Matrix

context = bpy.context

def sphere(x, y, z, radius, resolution=30):
    bpy.ops.mesh.primitive_uv_sphere_add(
            segments=resolution,
            ring_count=resolution,
            view_align=False,
            enter_editmode=False,
            location=(x, y, z))
    '''
    bpy.ops.transform.resize(
            value=(radius, radius, radius),
            constraint_axis=(False, False, False),
            constraint_orientation='GLOBAL',
            mirror=False,
            proportional='DISABLED',
            proportional_edit_falloff='SMOOTH',
            proportional_size=1)
    '''
    scale(context.object, radius, radius, radius)
    return context.object

def scale(ob, x, y, z):
    Sx = Matrix.Scale(x, 4, (1, 0, 0))
    Sy = Matrix.Scale(y, 4, (0, 1, 0))
    Sz = Matrix.Scale(z, 4, (0, 0, 1))
    ob.matrix_world = Sx * Sy * Sz * ob.matrix_world

sphere1 = sphere(3, 0, 0, 1)
sphere1.name = "Sphere1"
# because of naming convention wont always be the same
print(sphere1.name, sphere1.name == "Sphere1")
sphere2 = sphere(0, 0, 0, 1)

scale(sphere1, 1, 2 ,1)


text:
How can I setup Live mesh modification in the Game Engine?
In the Blender Game Engine (BGE), I want the player to be able to "dig through" an object. In other words, the player can shoot a cylinder at a large cube from their perspective, and in its wake, the cylinder projectile leaves a hole through the cube.
Here's the shooting of the cylinder itself using WASD-style controls and firing with a left mouse click:

and I want the result to look something like this (made outside of the game runtime using a boolean difference):

The most obvious-seeming way is to use a boolean difference-operation - in fact, that's how I generated the second image above. However, I tried using a boolean difference modifier and then running the game, and it doesn't seem to work - as you can see in the first image above. Anyway, according to this answer, a live-updating boolean operation might just not be supported in BGE.
So does anyone have any ideas for an alternative way to implement a similar functionality, given the limitation in BGE? My best guess is somehow having python detect the collision, and modifying the mesh on the fly, but I have no idea if that's even possible. I'm relatively comfortable with python though, so if you have an idea of how to approach it, please do give me a hint. Or, if there IS a way to implement boolean operations live, while the game is running, I would love to hear it.
edit:
This is different from Make modifiers update in the game engine. That question's only answer is predicated on there being a pre-meshed hole/feature in the larger object (water) that follows the boat around as a child. In that method, the mesh isn't modified at all during game runtime. It's a clever work-around, but it doesn't work at all in my case. In my case, the user needs to be able to create a hole (or more than one!) in any orientation and position he/she desires.

You can manipulate vertices in real-time with python, however AFAIK you can't really add or remove any. So implementing a true boolean function in the GE with python isn't possible atm :/

What you request is not possible (See comment above). It is a game engine, I suggest to ask how to create the illusion of such an effect.


text:
How to have rigid-bodies and charge fields interact?
Using the answer in "Why don't effectors effect effectors?", it is possible to have rigid body objects interact with each other using force fields. However, I would like to do something similar using charge fields.
If I try using this approach with the charge fields, there does not appear to be any forces applied.
Is it possible to use charge fields with rigid objects? If so, how is it done?

Example:
The animated result using force fields in Blender 2.76:

This is created using rigid body physics. The cage is a rigid body. Each sphere is a rigid body. An empty is parented to each sphere. Each empty has a force field assigned as shown below.

If the force field is changed to a charge field, the spheres end up on the bottom of the cage.

Did you have any luck in using charge fields to produce forces between rigid bodies?

It would seem that there is a paradox going on in the (blender) physics...
from the manual
"Charge
It is similar to spherical field except it changes behavior (attract/repulse) based on the effected particles charge field (negative/positive), like real particles with a charge. This mean this field has only effect on particles that have also a Charge field (else, they have no “charge”, and hence are unaffected)!"
Unfortunately this means that charged objects will only affect other charged objects and that giving an object a charge (force/field), turns it into an effector, and therefore does not affect other effectors...
With the field added to an empty, the field will have no effect on the uncharged spheres.
Seems like a bug/glitch/oversight/unintended consequence of the negation of the effectors affecting each other.

No its not a bug that's how blender is built. What you can do is make it a separate active rigid body and animate it. I have use this method in blender 2.77a, it worked fine except you want to use soft body or cloth simulation which will blow it as you expect.


text:
Can I make a force field that is defined with differential equations?
Can I make a force field in the xy plane that is defined with differential equations as:
x' = f_1(x,y) (speed in the x-direction is dependent on x,y coordinates)
y' = f_2(x,y) (speed in the y-direction is dependent on x,y coordinates)
So for example we can see a rigid body (such as wind) or liquid flow (such as a whirlpool) as a result of the force field.
Example is a phasediagram:
That is described with the following differential equations:
x' = x(2-x-y)
y' = y(-1+x)

http://systems-sciences.uni-graz.at/etextbook/sw2/ph_plane_analysis.html

As the documentation says,

You can use a Texture force field to create an arbitrarily complicated force field, which force in the three directions is color coded. Red is coding for the X-axis, green for the Y-axis and blue for the Z-axis (like the color of the coordinate axes in the 3D View). A value of 0.5 means no force, a value larger than 0.5 acceleration in negative axis direction (like -Z), a value smaller than 0.5 acceleration in positive axis direction (like +Z).

You can create the texture corresponding to your equations using Mathematica or similar packages. Or you could write your own program to output the texture.


text:
Why does Boolean modifier cause unexpected results when parenting is involved?
I have two objects in a scene: a sphere and a cube, where the sphere is parented to the cube
On the cube I have added a Boolean difference modifier and the sphere is the object that cuts into the cube. However, the location where the sphere cuts in the cube is not the same a the original location of the sphere.
See following:

I recalculated the normals of both the sphere and cube, but it does not solve the problem.
The file:

It might have to do with the fact that the sphere is parented to the cube. I've reproduced your setup and, on my computer, it also appears quite "glitchy". If you select the sphere, hit "G", then discard the translation with "Esc", does the cut get recalculated to its intended position (as it does on mine)?

My thought was the parenting as well, but I wasn't sure. Yeah it's glitchy when I move the sphere and hitting escape results indeed in the expected cut. But if select the cube and enter "Edit Mode" and back to "Object Mode" the cut goes back

Hmm, then we're either in a different situation or I don't quite get what behaviour you're observing. As far as I've reproduced it, the problem is easily solved because starting any operation then dismissing it with "esc" reverts the modifier to a normal state where it stays stable ever since. If this isn't the same for you, I'm unfortunately not able to help. Maybe if you could edit your question and add a Blend file through Blend exchange we can look more directly at your issue.

Btw, very nice remark about that the sphere is parented to the cube! I forgot to mention it in my question :p

ALT + "P" clear the parent keeping transformation. CTRL + "A" to apply scale to both objects (one at a time in Object Mode). The Boolean Modifier should work.

@Dontwalk I would like to keep the parenting, is there a way to parent and use the Boolean modifier?

Preform the above and re-Parent before applying the Boolean Modifier.

I have noticed that you are parenting to vertex. Parenting to object still gives some visualisation glitch, but they don't affect the actual object. If your goal allows you to choose between parent to vertex and parent to object, I'd suggest switching to the latter, as a workaround

but sometimes the result is just a ring instead of a crater and when I have multiple (identical) spheres, it works for some of the spheres while for some it doesn't


text:
Z component of position not changing adequately in Geometry Nodes
I have been trying to solve a problem all week, and even started my Blender scene from scratch a couple of times, but I can’t get Geometry Nodes to work properly. I need help. The following explanation may be a bit long and detailed, but I’m trying to make sure I’m not doing anything wrong, and the details may help figure where I’m bungling things up. (Also, forgive me if it gets confusing, at any point: English is not my primary language).
I saw this, done by a Twitter user named @Concinnus, (using other tools either than Blender) and I thought I’d implement something similar using Geometry Nodes:

The variation I’m going for uses the sine function of the X position to determine the Z position (I’ll have peaks AND valleys, but that’s OK: I believe it will look good). The sine function for each row is dislocated a bit, but it’s the same function.
I have a grid 2m x 4m, with 100 vertices in the X axis and 200 in the Y axis:

Here’s my node tree, with the spreadsheet and the erroneous result (in orthogonal view):

I start by separating the position in PosX, PosY and PosZ.
Then I map PosX from 0 to 2π (it’s a blessing just being able to type tau in the float field and see Blender gets it right). I store it in PosXTau.
I use the Frame ID to animate the curve, so I map it also from 0 to 2π and subtract it from PosXTau.

Here’s where things start to get weird:

I use PosY to shift the curve for each row. For such, first I map PosY to 0 to 1.
Then I create DeltaY, which is 1/200 of 2π, 200 being the number of rows in the Y direction.
I then proceed to add DeltaY to PosXTau and leave the result in PosXTau.
I calculate the sine of PosXTau and store the result in PosZ
I recombine the position vector with PosX, PosY and PosZ

The result should be my sine function sinuously curving in the y direction as well as in the X direction, but that doesn’t happen, as can be seen in the 3D View Port. It curves correctly along the X axis, but is “flat” along the Y axis.
What gets me is that I can see with my own eyes that both PosZ and the z component of the position vector are, indeed varying along the Y axis, as can be seen in the spreadsheet but, alas, it remains flat in the 3D view.

Someone pointed out to me that although PosZ is changing, it is a small change, and so I should multiply it by a large number and see if it registered visibly in the object. I did just that, bu to no avail. In the image below I multiplied PosZ by 100, but the sides continue to be "flat", although the PosZ Variation should reach 3.14m (for scale, from the leftmost portion to the rightmost portion of the image, there is a distance of 4m):

Can anybody please explain what I’m doing wrong and help me get to the expected result?

What happens if you input just the Y coordinates, made to alter something simple, like +1 on the Z - Does the "y mapping" work correctly on its own (without the X manipulation)?

do you want that? [1]: https://i.sstatic.net/P3ZyB.gif

@ChristopherBennett I made a simple, small scene where I add the value of Y to the SineX and it works. It's essentially what I'm doing in my actual file, so I still don't know why it doesn't work there. Here's an image of the result, the spreadsheet and the nodes:
https://imgur.com/a/ZSPwQcd

@Chris Sort of. It's a step in the right direction, but the first image in my original post (the "sinuosity" in the Y axis) is my main goal.

Here is a crazy thing for you:

Have fun with it!
(Blender 3.2 !)


text:
How is the force necessary to counter gravity calculated in Blender?
Different values are required to balance forces in the physics tab with the force of gravity. For example, if the force of gravity is defined as -9.8, a force field setting of about 234 is required to counter the effect of gravity for an object with a mass of 1.
My expectation was that the force-field setting of 9.8 should counter gravity. However, the required setting is far away from that. Changing units from None to Metric did not affect the ratio.
How is the force necessary to counter gravity calculated in Blender?
For example, create a simple scene with a cube, a plane, and an empty. Enable rigid-body dynamics for the cube. Enable a force-field for the empty on the physics tab.

The gravity is left at the default setting.

By experimentation, the counter acting force-field is found to be about 234 to balance the cube.

This setup results in the cube staying almost still. It would be useful to be able to calculate the force-field setting required to calculate the balance force rather than use experimentation.

The blend file with this setup is located at:

Is it true that you want the cube to be stationary at certain times and then to be acted on by gravity at other times?

That is one use, but not the main reason this was asked. This question was prompted by http://blender.stackexchange.com/questions/23925/set-resting-length-for-a-generic-spring-constraint/42292#42292 , where force-fields are used to set up the rest position for a spring. The values don't make sense if force = mass * acceleration. Since the mass is 1, the acceleration (gravity) is -9.8, then there must be a scaling term or some other calculation is involved.

Blender forces and values have little in common with physics. Only the spatial values will be correct. Everything else are just some code coefficients, even the gravity accel (which just looks right).

The force field has many paremeter such has application point, shape of the object, range ... whereas the gravity is the global variable that has no parameter except it's the value.
So you can't expect to counter the gravity with a forcefield at a value of 9.8 .