text:
Finding objects from spesific vector from another object location with python?
I have made 8x8 array that should work as chess table and seperated faces to invidual objects. Then i have chess piece knight as object that i want to select active with mouse click and then find array plates that are possible to move on. So i know, that knight can have max. 16 checker areas with its's "L" movement where it can go on. What i would like to achieve is python script to first get knight's current location, and then find out if there is another object at for example knight location + (1, 2, 0)
EDIT:
For now i have come this far (i started learning python today)
import bge
import GameLogic as g
import mathutils
cont = bge.logic.getCurrentController()
obj = cont.owner
scn = g.getCurrentScene()
own = cont.owner

pos = obj.worldPosition
move1 = obj.worldPosition + mathutils.Vector((2,4,0))

so with this code i get one possible vector knightpiece can go, but haven't yet find way to check if there is other object at the same vector point

I would not use the 3D world at all. This is just to make it look nice. I suggest follow the MVC (model-view controller) pattern where the model is in Python.
Model
E.g. the board as 2d-array (list of lists) of fields. Each field knows what figure is on it (or if it is empty).
Any operation will be performed on that board (moving figures, removing figures etc.). The chess rules will be applied on that operations.
View
The view is what the user sees. So this is the 3D world. With all the meshes and materials. Whenever the model changes ... the view (3D world) will be updated. You can add eye-candy animations wherever you want. It has no impact on the model as it is not important to the chess game itself.
Important is that the model notifies the view when something changed. So the 3D objects know they need to do something.
Example A: the King moved from A1 to B2 (model change). You notify the view that there was a change.
The King sees: "I'm relocated to B2" -> so he jumps, crouches, flies .... to the location associated with B2.
Example B the King moved from A1 to B2 and tower (at B2) gets removed.
The King sees: "I'm relocated to B2 hitting the tower" -> so he fights .... to the location associated with B2.
The Tower sees: "I'm need to disappear" -> hie fights with the King and disappears with an explosion.
I hope you get the idea. (If not imagine your display is a 8x8 block of ascii characters). The model should still be able to do chess.
Controller
How does the model know what operation to perform? Here you need the controller (not to confuse with the BGE logic brick controller). The controller notifies the model about any input from the view (or somewhere else).
Example A
When the user clicks on the king the controller tells the model the user selected the king. The model calculates what fields are available for moving the king (the model knows the rules!). Then it notifies the view that there is an update (selection changed, clickable fields changed). The view shows a nice representation (e.g highlight the King, let the available fields glow).
When the user clicks on a available field (B2), the controller tells the model that this field was selected. The model moves the King to B2 ... see example A of section view.
Example B
When the user clicks on the king the controller tells the model the user selected the king. The model calculates what fields are available for moving the king (the model knows the rules!). Then it notifies the view that there is an update (selection changed, clickable fields changed). The view shows a nice representation (e.g highlight the King, let the available fields glow). As B2 is occupied by the tower, the tower gets an highlight too.
When the user clicks on the tower/field (B2), the controller tells the model that this field was selected. The model validates if that was a valid move removes the tower and moves the King to B2  ... see example B of section view.
Conclusion:
The MVC pattern, let you isolate the core game logic (chess rules, board data, chess operations) from pure visual aspects and user input.
The model should be independent -> the model should not know about the view or the controller. It should just know there is a view and how to tell that it should update (e.g. communication via messages).
Keep in mind the model could use any view and controller such as text output and calculated turns (from a chess engine/AI) in any combination. There can be even several of them at the same time.
The model defines an interface for communication to the view and from/to the controller.
I do not think that there is a sufficient way to implement a chess model without Python in the BGE.

Thanks for the answer as it clarifys lot of things i have been thinking too compicated ways. Now my problem is here that i don't know how do i check if place is occupied allready. I can check location of B2 easily, but how i check if there is something in spesific location with python.

when you use a 2d array as suggested above you can store the status of each single field by assigning an object. E.g. board[1][2] (which represents B3) = None (which is empty) or board[1][2] = blackKing. You can easily check if a field is occupied: isEmpty = board[1][2] is None, what figure is on that field: figure = board[1][2]. The access is very fast allowing you to do a lot of checks at one turn. And yes you need some more data such as list of figures for black and white ...


text:
Edit texture as burned and dirty in Cycles
How can I edit the following texture...

...so it looks like this?

And how to create the burned spots

Looking at the texture in the picture, in addition to the curves suggestion above, I would apply the same texture as a specular map and a bump map. Here's an example set up with the specular map:

I didn't have a way to make a normal map on this computer, but that would finalize the effect, with some good lighting effects like your reference image.

Yes I forgot to mention displacement. Thanks

The only difference is you need to use a "material output" node for cycles, and tweak the curves a bit.

You can use color curves in the node editor to change the color if you are using cycles. This can be found under the color menu. If this is meant for blender internal or BGE you should be able to edit the colors in the texture menu. I added some images to show.

source: Stack Exchange

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

sort: votes


text:
How do I light up a dark scene correctly in Cycles?
How can I light up a dark scene correctly in Cycles, so it looks as in a dark room with only one light (as a lamp, for example)

Since it depends highly on the render engine you intend to use, I think you should mention that in your question.

"Correct lighting" is highly subjective, and so my answer is just based on my personal preferences and not some formula of doing things 'right'.
To start, I like to use at least a bit of ambient occlusion or global illumination on the scene to prevent large areas of the scene to be lost in shadow. In general you should try to avoid absolute black values.
Add a point lamp wherever your light source would be in the scene or if you have a lightbulb mesh, you could add an emission material to it for more accuracy. Then simply play around with the lamp/emission settings until you get a level of brightness you like. Try turning off AO to see the effect of only your light. Also note that you can enter a negative value into a lamp object and place it in corners of the scene that you want to look extra dark.
Hope that gives you an idea or two.

This video shows how to set up an object (in this case a plane) as an emmitter of light. In your case you could use a Sphere instead, and play around with the size of the sphere to get the right feel. (this will help prevent extremely sharp shadows)
The video also shows how to hide the emitting object from the view of the render camera. (It still "works", but the object itself is invisible).
https://youtu.be/cQKk6sSQA-Y?t=48m55sVideo

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


text:
How to create spots that appear in material in Cycles?
I want to create a spots map for any material, so it looks like this:

Aprreciate the little spots on the front

Are you talking about the spots that can be seen in the eyes ?

I think he means the three spots in the cheeks/wiskers. Short answers is I don't think you can easily do it with nodes alone. Either use a specific image texture dor it or you are probably better off modeling them with actual geometry

Yes, I mean that

What did my answer to Texture doesn't show up not explain? This looks like a question that would have the exact same answer. However, if you are looking for something that would apply that effect to every material, I can show you how to do that. Let me know.

Yes, that would be nice.

PD: In this question I ask for spots textures and how to create them

I feel as if this is a simple case of just creating some UV spheres (Or whatever sphere floats your boat) and making them black.

The problem is that in the material preview, it appears as it should look, but in the model don't

@Jagredom Posted my answer. Let me know if you need any more info. Lastly, if it helps, please consider accepting it.

Judging by the reflections visible on those spots, I suspect they are actual geometry in the pictured model (maybe they are normal mapped, but I don't see any potential evidence of a normal map anywhere else)

@gandalf3 Could you be more specific? I cannot see any reflections in Img 5. I did not bump map the texture, and I don't believe that they are surface deformities. Plus, the OP set the Glossy BSDF's Roughness: value to 1.

@shadyPuck to what spots are you referring to?
I thought the op meant the three black spots on the cheeks

@gandalf3 OH! No, I was referring to the roughly _Noise Texture_ish spots that vary the surface color. See my comment above w/ 3 up votes and Jagredom's reply. Sorry for the misunderstanding.

The material appears in the Preview panel, but not in the model

You can add the node setup from Img 2 to that from Img 1 (which represents any basic material [Main Body Th3Unkn0wns shown in all example screenshots]) to create the nodes from Img 3, which should change the base material preview from Img 4 to the spotted one from Img 5. Note that I will be using the Noise Texture setup from Texture doesn't show up, but you can easily substitute the one with the Image Texture. Also, I will be modifying the face material in this case, but as I said, the method will work for anything and everything. Lastly, you may have to fiddle with the Noise Texture's Scale: value to get it to look right for each case.
Img 1:

Img 2:

Img 3:

Img 4:

Img 5:

A quick word about using the node setup:
The nodes from Img 2 will always go directly after the last shader and before the Material Output. The added Diffuse BSDF shader is pure black. I chose a 0.8 Fac: value in the added Mix Shader because it distorted the other shader to a dark enough value to see the surface irregularities. If you want to use an Image Texture, simply swap it out with the Noise Texture. You may also want to change an Image Texture's Texture Coordinates from Generated to UV, but you might not.


text:
Materials modified with GLSL in bge, return to original material (using only python)
I'm a noob and probably this is a completely silly question... Started using BGE two days ago...
I'm using GLSL to visualize a distance field while running in standalone player. I'm doing it using Vertex program and Shader program on the material of all mesh in the scene (all object with a mesh in fact). The shader program is applied on key pressed:

The transformation is performed through this module:
import bgl
import bge

vertex_shader = """
varying double DEPTH;

uniform double FARPLANE = 14.0; shader

void main() {
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    DEPTH = gl_Position.z / FARPLANE ;
}
"""
fragment_shader = """
varying double DEPTH;

void main() {
    // far things appear white, near things black
    float val = (1-DEPTH) * 2.35;
    gl_FragColor.rgb = vec3(val, val, val);
}
"""
# Search all object with a mesh (only one mesh per object) and
# applies the code in the previous line
def enable_depth():
    scene = bge.logic.getCurrentScene()
    for object in scene.objects:
        if object.meshes:
            for mat in object.meshes[0].materials:
                shader = mat.getShader()
                if shader != None:
                    if not shader.isValid():
                        shader.setSource(vertex_shader, fragment_shader, 1)

vertex_reset = """
varying vec4 color;
void main() {
  color = gl_MultiTexCoord0;
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
"""
fragment_reset = """
varying vec4 color;
void main() { gl_FragColor = color; }
"""
# this should reset the shader... I've done different test, reported
# in the last lines of this function
def disable_depth():
    scene = bge.logic.getCurrentScene()
    for object in scene.objects:
        if object.meshes:
            for mat in object.meshes[0].materials:
                shader = mat.getShader()
                if shader != None:
                    if not shader.isValid():
                        #shader.delSource()
                        #shader.setSource(vertex_reset, fragment_reset, 1)
                        #shader.setSource(vertex_shader, fragment_shader, 0)

How can I go back with this transformation? (I mean, from right to left) I tried with some sort of vertex/fragment program (report in code) but simply does not work and I am sure this is not the right way. Maybe I should have two materials for each object? But if a mesh has two materials, how do I change the active material in python? And finally, am I asking the right questions? :)
P.S. Only Blender Game Editor, no Blender Render!

shader.delSource() works for me. (You might want to skip shader validation check before deletion). ------Side-Note: Be aware you need to evaluate the sensor states. Otherwise this code will run on key press and on key release (twice).

It is absolutely correct Sir. Thank you. Could you write an answer so I can accept it? And thank you... The problem was that I have to skip isValid() line. With that, it does not work.

I wasn't sure if that helps you. ... adding the answer

The shader(s) can be disabled/removed with shader.delSource().


text:
My liquid looks like tiny balls not like a liquid
I made a liquid animation. It looks good, but it looks like tiny balls instead of liquid.
How can I fix this?

Hello and welcome, I would recommend to add more detail to the question, as for example which version of Blender you used, and maybe some details about the settings in your scene. You can use the Edit function to add these details and make it easier to solve your problem. The answer I wrote explains the possible situations, of which depending on a more detailed question maybe one might have been enough. The risk of the question being closed and you not getting help increases with lesser information by default.

While I can't say which version you use, I can be sure that you use a version of Blender that uses Mantaflow.
There are still some unknowns, so I try shine some light on the possibilities.

You use the Replay default setting of the "Domain-Cache"->Type:

With this you will not be able to scrub through the timeline as each frame needs to be simulated, BUT it's still possible to activate the Mesh option:

Beware that for this to show properly the domain-object must not be set to be displayed as "Bounds", else you would not see any form of geometry. With this setting you can run the simulation and should (slower then without the Mesh active) see the fluid shown as geometry. This is nice to get an idea and fine tune the simulation.
Should you have set the "Domain-Cache"->Type to any other of the available options like Modular, then you need to bake the simulation and by default the Mesh won't be baked along with it. That is to say, once the liquid is baked to the point you showed, all you need to do is activate the Mesh subpanel and in this panel will be a Bake Mesh button:

This button won't be there if in "Domain-Cache"-Type Replay mode. And the button will be greyed out if the simulation is not baked beforehand. Thus first bake the liquid, then you can bake the mesh. And different then in the 1st mentioned solution, you can not see the mesh simulated along with the blue particles in one go.
There is a final "Domain-Cache"-Type option All, which essentially on pressing the Bake All button:

This will simulate/bake all activated options in one fell swoop. While it may safe the separate baking and clicking, it may be most helpful for all set up(after trial and error and finetuning) simulation settings as a QoL option.

Happy Blending.

The pictures are taken from the 2.93 alpha version, BUT the differences to the latest stable version are not big enough and should not cause any confusion.

The mesh of a liquid-simulation needs to be activated seperately, and is not turned on by default. (probably for performance reasons)
Make sure that you have the "Mesh"-option in the physics tab of your domain object anabled.

When I activated "Mesh" checker - the liquid is generated as a mesh in viewport. But on the render it is stil displayed as spheres (a source mesh object)...

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


text:
Vertex Coloring After Parenting in BGE
I am trying to use a python script during runtime of bge to vertex color a mesh. The idea is to click the mouse and vertex color a mesh (the color is not uniform so I can't use object color). A simple version of the code is below and can be illustrated on the standard cube. Put in a logic brick for a mouse left button click and call it "click" along with a python controller running to this script.
cont=bge.logic.getCurrentController()
own=cont.owner
mesh=own.meshes[0]
click=cont.sensors["click"]
if click.positive:
    vertex=mesh.getVertex(0,1)
    vertex.color=[1,0,0,1]

This setup will color one vertex red. However when I parent the object to an armature (single bone) the code fails to do anything to the mesh.
If anyone can tell me where I am wrong or what I can do to achieve the end result in another way please let me know.

I believe this may be an error in the base code. Does anyone know where the C/C++/Python code that would control color rendering in bge is in the blender base code?

cont=bge.logic.getCurrentController()
own=cont.owner
mesh=own.meshes[0]
click=cont.sensors["click"]
if click.positive:
    vertex=mesh.getVertex(0,1)
    vertex.color=[1,0,0,1]

This code has no relation to a parent of the (controller owning) object. So this should never be an issue.
I can only guess you execute this code at the armature. An armature has no mesh and will fail when you try to access it (line 3).
Hint: When using code you should always have a console window open to see any error messages. If you already have ... please post error messages together with your question.

I have the logic bricks set on the mesh. I opened the console window and get no errors. I even tried printing the vertex colors before and after and they all come out correct. I spent some time debugging it until I got down to just the parenting step. I go from functional to no effect by just doing the parenting.

I just replicated this from a basic blender window on the basic cube in about 5 minutes in case someone wants to verify the problem.


text:
image loading, but not appearing in an Empty, latest release 2.77
Still a bit of a noob with Blender and definitely with this stack exchange, so please go gentle!
Anyone else having a problem getting images (.png, .tiff, .jpg) to show up in an empty in the 2.77 release? I realize I can use a background image, but would rather use an empty for the perspective view. Tried disabling the "import images as planes" add-on, thinking that script might've altered something, but no luck.
Hope this issue isn't something moronically obvious that I'm missing here; many thanks ahead!

How do I get a constant Background Image?

(tab) into Object mode --> Properties tab (n) --> select Background images. Load it in. Note that you will only be able to see it in Orthographic view (5) on your numpad.

I had the same problem. But after I hit show overlays it comes back. Hope this can help.

There is a workaround. Blendercoders assisted with this one: 'Set UserPref -> System -> Clip Alpha to.. 0.005' and/or load factory settings. This worked for me.

I have the same problem and tried the above and no luck. Any other ideas? I'm assuming this is a bug. I've been trying to learn blender but these show stoppers just leave you scratching your head. I put in a new empty plane and an image for my sculpt. The image doesn't show up and I'm stumped since I'm very new as to what is causing this.

@imaginethepoet, have you tried loading factory settings in the File pop-down menu? I double-checked and the previous workaround Clip Alpha 0.005 still works on my end. You sure you're adding an Empty and not trying to add a Background Image? If you're choosing the latter, make sure you're in Ortho view to see it; won't show up by default in Perspective view.

Hi, yes I tried this on my mac and I'm having the same problem. I changed the clip on alpha and closed out the file and tried again. I'm in Ortho mode after I changed the mac to allow for emulating keys. Still no image is showing up. Any other ideas or maybe I should revert to an older version?

You can always revert back to the earlier version, but there should be a way to fix this. Attach some screenshots and a detailed account of your workflow.

Just experienced the same problem and found out that "Empty Images" are categorized as "Extras" in the Overlay Options. I had Extras turned off, so the image wasn't showing.
So for anyone with this problem, check under Viewport Overlays and enable Extras and your "Empty Image" should be visible again.

I think I found the solution - make sure you're in the "Modeling" tab as opposed to the "Layout" tab. Not sure why, but the Empties are in fact empty in Layout view.
Found that after trying all of the above and seeing no difference, but it might need the combination.
-Destructor

Probably I have a special case as I create just something in 2D.
I import images just as plane, then they are displayed without problems.
It's increasing the Blender file certainly, so it's probably not a very good solution.

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


text:
Erratic apply-scale behavior with vert groups and displacement modifier
When trying to scale an extruded and assigned faces vert group back to zero on the Z-axis after applying a displacement modifier, it either seems to work correctly, or the entire mesh goes flat, as if I'd never applied the modifier in the first place. I know individual origins is supposed to be selected, but sometimes it works, sometimes it doesn't. Any help would be deeply appreciated. My workflow:

Add plane –>
apply two array modifiers with one offset along Y-axis –>
UV unwrap –>
E RMB faces to extrude and hold geometry –>
assign these to a vert group for displacing –>
apply displacement modifier and adjust as needed –>
tab into edit mode and select only that faces vert group from individual origins
S Z to 0

Am I missing something here?
The first image shows the error. I've added and applied the displacement mod; selected only the faces vert group; then scaled that group to 0 along Z.

The below image shows what's supposed to happen, but often I can only get this to work after switching back and forth between the indiv. origins and 3D cursor tabs, and toggling between the faces/vertices tabs.

Knew I should've added images. Yes, I applied the displacement mod to make it permanent. The first image above shows what happens when the error occurs. The second is the correct mapping.

To be clear, I'm just going for a simple, but what I understand to be, accurate visualization of bit depth via a displacement mesh, so that I can alter it from there as need be. I was following this tutorial: (https://www.youtube.com/watch?v=ZB3UEnCE_T8).

OK, found your culprit.
I just realized that you typed out the correct step in #7, however, it seems that you have mistaken the icon per your screenshot on your erroneous one (it's easy to do, because it looks very similar). Be sure to set your pivot point to individual origins.

Here's the behavior of doing S Z 0 using the different pivot modes:
Active Element:
When using the active Element, Blender is considering the origin of whatever your last active selected item is (in this case, the last face selected). In other cases/selection modes, it could be the last selected vertex/edge, as well as in Object mode - this would be the last selected Object, and would consider its origin as the pivot center.

Median Point:
In the demonstration below, I used two selections for simplification, however when using this mode, Blender will take whatever is selected and calculate an averaged pivot location, and use that.

Individual Origins:
For this mode, Blender considers the "origin/pivot point" whatever the median pivot would be if you were to use median, and pick only one object. The difference is that it does this on everything selected.

3D Cursor:
For this mode, anything selected will pivot from the Viewport's 3D cursor location.

Bounding Box:
This one acts a lot like Median Point, although instead of thinking about calculating a median like origin between object origins, it calculated the extremity boundaries of the items selected, and then brings you to the mid/center point of that (in this example it is hard to tell the difference between Bounding Box & Median Point Pivot Mode.

I'm not trying to apply a shape key. You're probably more experienced than me – still pretty new to Blender – but I'm not missing the point of what cegaton said. Rather, I was just following the above-mentioned tutorial, and its author was indeed achieving a more nuanced displacement mapping by scaling the assigned top face vert group to 0 on zed AFTER applying the dis mod in object mode. Do I know why? No I do not. But it does create a more detailed mapping for me as well, when I can get it to work.
If you're interested, that tutorial is here: https://www.youtube.com/watch?v=ZB3UEnCE_T8.

@j_a_l - Just updated my answer, it should solve your problem.

thanks for the update. Yeah, I saw that discrepancy earlier in my screenshot as well. Don't know how that happened. I guess what I was doing was starting from an individual origins pivot, instead of 3Dcursor, which was causing the problem when trying to S Z to 0.
To yours and @cegaton's point though, I still don't why this works re the more detailed, voxelized mapping. Any idea? Maybe because after applying the dis mod, the mesh is being treated such that every other extruded, displaced vert group is 0, regardless of where they're positioned on Z? Hope this makes sense.

More precisely, if I start from 3D cursor – anything other than Individual Origins, and then select the latter when scaling to 0 on zed, it works every time.

@j_a_l - I am working on an explanation of this, and will make it pretty thorough as an appended part of my answer, I need a little bit of time though.

@cegaton - Thanks for the reminder. I actually have it installed, I just keep forgetting to use it. I think that I get too concerned trying to keep my GIF size small enough to post.

@RickRiggs – appreciated. No rush.

@RickRiggs, thanks much for the really thorough response and explanation. I did not at all know that the pivot locations, for example, have such an effect on scaling vertices. Makes complete sense, for in my naivety, I thought the pivot/cursor locations only affected the positioning (rotation for example) of mesh points along axes in 3D view. Thanks again.


text:
Generate texture map
I'm trying to create a 3D first-person game which could run in browser using webGL technology. I have generated a landscape with Blender and now I'm bothering with textures. In my game I scale Blender's landscape in 1500 times to achieve large world but with this approach I can't use single texture file for all this world. So i was drop into technique called texture splatting. As result I wrote a shader that combine 4 textures in one using texture map file which look similar to this:

4 RGBA channels in this image set's the intensity of 4 textures. Here is how it works - https://www.youtube.com/watch?v=JMaaumAB_Rg&feature=youtu.be
Now I want to find a way to genereate that texture map. I would like to be able to draw in in blender on landscape mesh. I was following steps in this video https://vimeo.com/15679785 but having problems with it a here is where I need help.
I'm adding dirt texture as basic texture, then I'm adding new texture of type image or movie but I select new to create new image. I deselect influence->diffuse->color and check influence->stencil and influence->rgb to intensity for this texture. Then I'm adding grass texture and expecting then drawing on landscape mesh in texture paint mode  will
reflect in changes in texture map layer and will bring a grass on mesh. But when I drawing it only change dirt texture and has no any effect on texture which is supposed to be texture map. What am I'm doing wrong here?

Here are screenshots of texture settings I'm using:

https://i.sstatic.net/jZdeV.png
https://i.sstatic.net/I2vnr.png

I can see on your screenshot that you have been painting the stencil on your dirt texture

That was a question about. I didn't know how to switch drawing slot to paint on stencil texture instead of painting on dirt texture.


text:
Muscular system in blender
I would like to know if there is a tool or an addon in Blender that can help me to create a muscular system, i.e. a way to move the mesh (like the contraction of biceps).
I was watching this video but I'm not sure how well it works.
Any advice or should i use shape keys?

There's brand new X-Muscle System for Blender. It supports jiggle, X-Mirror and it is dedicated to create whole Muscular Systems for characters. Check it out! https://blendermarket.com/products/x-muscle-system

Do you need muscle jiggle? Thats the real question.
If yes you have to use softbody simulation. The Muscle Tools plugin is imho not very helpful, because it treats the muscles one by one and not like a whole muscular system. Here is how I would setup that:
How do you assign multiple shrinkwrap modifiers to rig muscles?.
If you don't need muscle jiggle than the simulation and shrinkwrap is just overcomplication and you can use bones and shapekeys to do everything. In that regard you can also use stretch maps and lattices for skin sliding.

Maybe Blender Muscle Tools can help, it's a commercial addon but at $20 doesn't seem to be overly expensive.

Already seen. Do you think a tool or addon could help (like this one)?
It isn't a problem of money. I have seen better results with shape keys than these tools but shepe keys it's sometimes complex and i don't wanna to waste much time on that

I can't really comment on that unfortunately, I am not much into animation myself, and I have never rigged or done any character animation since it's not my main work area. I just reaclled seeing that addon somewhere.Maybe someone else can answer that.


text:
How to make curves go around obstacles
I'm looking for a way to generate bunch of cables chaotically crossing each other in a cluster, something like this ...

... but there is a principal for start / end points. All cables should start from a specific point and end inside a specific places. There are also some obstacle objects. Something like here ...

Originally I used geo-nodes with Simulation Zone to let spline grow from certain place, but it ended up with splines penetrating a boundary or slow down growing close to obstacle or accumulate at some places.
So ... I used another approach ... I generated a point cloud, connected them by curve, that seems to be a promising direction.

Now I wanted to use obstacle objects (based on Geometry Proximity) to move curve points from areas of obstacles to let cables lay around obstacles, but I don't know how.
Notes:

if there is completely different efficient way to reach the result I'm open to it
cables will be used statics (not animated)
visually they are a simple wires (no special ends)
also I would like to avoid cable penetrating each other if possible

I thought it could be just enough to use Geometry Proximity just to push some points away. Thanks to Markus von Broady's answer, it worked for my study case ...

... but there is was quite a lot of intersections in real project ...

... it means a lot of manual adjustments ... and when adjustments are done the client changed obstacles position :)

So my Q for GN solution persists :)

Not an answer, but you're looking for pathfinding algorithms. This is a complex topic, but well-researched. Here is a link to get you started : https://www.redblobgames.com/pathfinding/a-star/introduction.html
Also look up Djikstra for a starter on shortest path algorithms.

Back in 2020 I did something similar: https://twitter.com/Syziph/status/1329860910920437760 I mentioned something about Grease pencil and probably Soft body physics. If I remember how it was done I'll get back to you.

i am not sure how the "should not penetrate" fits too "should all start from a specific point"? What is the more important rule? if it is "should not penetrate" i would try it with softbody + pin group and some randomization. For that i would use animation nodes because GN isn't really usable to animate empties. Another advantage is that AN can also use script nodes which makes other things also much easier + quicker.

@Hadriscus Thanks, are you sure the "pathfinding" or "shortest path" (already implemented in blender) is the right way? Cables should be randomly curved on their way, so it doesn't seems to be done by this approach ... Am'I wrong?

@RumenBelev Thanks, yes I tried it with Cloth Sim that works better for this objects https://imgur.com/TLTrCVl ... it works kinda, but it is not too much flexible and wasn't an easy to avoid penetration (and keep flexibility). I wanted to use this technique, to make it more flexible, but it doesn't collide.

@Chris :) Sure they can start close next to each other (and not exactly from the same loc). SoftBody - see comment for Rumen. AN - sorry, totally out of my knowledge. I would be blind for any adjustments if needed.

Although it's most likely possible to simulate cable tangling with Geometry Nodes it is currently too complicated to set up due to lack of physics simulation operators. I would love seeing it executed in Geometry nodes in this thread at some point in the near future.
In this solution we are going to use the currently available Soft Body Physics simulation.
It is preferred due to the availability of Collision settings for the points of the simulated mesh. (Soft Body is basically collision balls connected with springs).
Although it looks quite complicated the concept is fairly easy to understand and developed further.
Back in the days - I designed the tangling in such a way that the colored wires form the year 2020:

Simulating the whole tangling process is not possible due to time and program limitations so we will take an artistic shortcut and draw our approximately desired look of the cables from the Top View using Grease Pencil.

First let's block out the Scene by placing a floor plane and some cylinders:

They will also participate in the simulation so add Collision Modifier for each one of them. You could leave the default collision settings and adjust them later - mostly the Thickness Outer parameter.

Now go to Top View, choose an appropriate Viewport display and draw a continuous squiggly line. The main idea is just to draw while avoiding intersections with the cylinders. You can cross the line itself as many times as you want. You can draw multiple lines based on how many individual cables you want. In this case I drew 2 separate lines. The coloring is optional and I did it for illustration purposes:

[Easy Mode] To make things easier one can skip the Cylinders part and work with the Floor as the only collision object.

You can sculpt the Grease Pencil Strokes using Grab and Smooth brushes correcting intersections with the collision objects and making the curved lines smoother. [Note] This look will not remain exactly the same due to the simulation so don't spend too much time sculpting. Once you are happy with the look you can proceed to converting the Grease Pencil object to Curve object.

The Curve object needs to be resampled using Geometry Nodes. Imagine this Curve as a bead string and each bead has a constant radius slightly larger than the radius of the cable. I created a small circle to help me decide the resampling Length value which is double the circle radius - in this case 6.66 cm. The node setup is Applied to the Curve object:

Apply the Geometry Nodes modifier to the Curve. Usually this works by choosing in the 3D View - Object > Apply > Visual Geometry To Mesh.
This will convert the Curve to Mesh:

[Optional] Add Hook Modifiers to both end vertices of each string inside the Mesh. In my case there are 4 Hook Modifiers in total. You could add more vertices to the Hooks if needed. Make sure to add the vertices assigned to the hooks - all into a single Vertex Group and name it "Goal". This way we can animate the ends of the cables during the simulation and position them where we want.

We can now add Soft Body Modifier to the Mesh
The Soft Body Settings are shown bellow, but these can be tweaked according to your scene dimensions and preferences:

The most important setting is turning on the Self Collision and setting the Calculation Type to Manual with Ball Size set to slightly less than the radius of the small circle we used for choosing the resampling length.

Now you can push the Floor slightly down. You can play with the distance. [Optionally] Add a Force Field Empty of type Force, Shape - Plane and animate the Strength from 0.1 to 0 and Noise Amount from 3 to 0 for the first 10 frames of the simulation. Also animate the Hook Empties to place the ends of the cables at the desired final positions:

Run the simulation. Usually in 50 frames the result becomes stable. The simulation is a bit slow due to the enabled self collisions of the balls ("beads"). The balls will try to push themselves away from each other while tangling the strings along the process. The end frame should looks something like this:

To generate the cables we are going to add Geometry Node Modifier to convert the Mesh back to Curve, smooth it out a little bit and add some thickness to the Curve. Here is the node set up, which also includes adding different materials to the cables:

Examining the simulation from all sides shows variety of tangles:

One can apply the simulated result and edit the mesh refining it even further, before applying the final Geometry Node Modifier.

Lastly you can download and study the .blend file from the tutorial:

OK :) Right, Soft Body works very well ... I didn't notice it can sim edges (those make it much easier than Cloth Sim, thanks for that) ... Also thanks for detailed step by step tut :) Very descriptive. I'm not going to mark as accepted (not yet ... I still believe in more generative solution) ... but definitely I'm going to reward you by a bounty (since available). Thank you for your help and time I'm going to use it for my project :)

Hi vklidu, thank you for rewarding my efforts :) Do you think there is a better approach than using Soft Body physics? Anything specific in mind? There are a lot of Geometry Nodes experts that may get interested in joining if pointed at the correct direction.

Although lacking some constraints - here is brilliant example of string physics with Geometry Nodes by Seanterelle - https://www.youtube.com/watch?v=h5_uA9sOw7g

Thanks :) I will check that, I also saw some basics ... in my case I can fake it (it doesnt has to be super real sim) I just need to avoid intersecting (so I asked also here that partly works). I'm also on a way to play with "shortest path" ...

Плюс едно for combining grease pencil with soft body physics, and with geo nodes.

Thanks! Hopefully integrating Grease Pencil and Soft Body physics in Geometry Nodes will make this easy to set up. I'll definitely revisit this tutorial once this happens.


text:
Grease Pencil 3 and Python: get / set the active layer
In the previous Blender version (4.2), I used the following lines to go up one layer in Grease Pencil:
# Assume this is a valid Grease Pencil object
gp = bpy.context.active_object;

curr_layer_index = gp.data.layers.active_index;

if ( curr_layer_index < len( gp.data.layers ) - 1 ):
    gp.data.layers.active_index += 1;

The code for going down is the same, save for the last two lines:
if ( curr_layer_index > 0 ):
    gp.data.layers.active_index -= 1;

According to the Blender 4.3 docs page for migrating Grease Pencil scripts, the active index was previously obtained with:
# Blender 4.2
layer.active_index

and can now be identified with the following:
# Blender 4.3
layers.index(layers.active)

(Notice how the first example uses layer, singular, whereas my code, which I'm quite sure was functional up to the final 4.2 release, uses layers, plural.)
Looking at the class references:

the GreasePencil class does have a layers property, of type
GreasePencilLayers;
GreasePencilv3 also has a layers property, of type
GreasePencilv3Layers.

Neither of these layers properties has an index subproperty. The old version, naturally, does have active_index; the v3 version does not.
How can I get and set the active layer with Python in Grease Pencil 3?
Extra note: it appears that a layer's index in its GreasePencilv3Layers parent is determined by its position in the UI's layer stack, but I can't find confirmation of this anywhere in the docs. And I still need to know the active layer's index to increment or decrement it.

Get Active index of Grease Pencil v3
layers = ob.data.layers
active_layer =  layers.active
active_index = layers.find(active_layer.name)
print(active_index)

# Or
active_index = list(layers).index(active_layer)

Set Active from index
layers = ob.data.layers
layers.active = layers[0]

Move
layers = ob.data.layers
layers.move(layers[0], type="UP")

# move_top, move_bottom, ...
# https://docs.blender.org/api/4.3/bpy.types.GreasePencilv3Layers.html#bpy.types.GreasePencilv3Layers

In your case it becomes
gp = bpy.context.active_object
layers = gp.data.layers
curr_layer_index = layers.find(layers.active.name)

if ( curr_layer_index < len( gp.data.layers ) - 1 ):
    gp.data.layers.move(layers.active, type="UP")

Well that solves the immediate problem, thank you! I wasn't specifically trying to move a layer though, just change the selected one. Also, there is the matter of the docs and the 'layers.index(layers.active)' instruction. Do you happen to know how that is supposed to work? Did I miss something or are the docs just wrong?

The layers is not a list and needs to be converted to a list first: list(layers).index(layers.active)

Wow, that's... something I really wish I could have seen on the reference page. At any rate, that answers just about everything, so answer accepted, well done!


text:
What's the math behind cast modifier?
I can't find any documentation or article about it on the internet different from the information provided on the manual page. For me, Blender's documentation is not clear on what mathematical method is used to displace a mesh with the cast modifier. If anyone understands how to work this modifier, any help would be greatly appreciated. Thank you!

I do not figure out how to answer such a question without digging into the source code itself...

Please provide some background on why you need this. https://en.wikipedia.org/wiki/XY_problem

I think the algorithm isn't all that hard to understand. For example, casting to sphere is normalizing all positions, and the "Factor" defines the linear interpolation between the two:

This geonodes setup controls left monkey, the purple field is driven by the cast modifier, which controls the right monkey:

Normalizing the vector is dividing its components by the length of the vector.
Scaling the vector is multiplying its components by the "Scale" which here is the average length of all vectors. Some "Cast" modifier properties allow you to override this size.
"Mix" node pairs the $xyz$ components of two vectors, and for each pair calculates the outcome with a lerping formula: $(1-t)A + tB$, where $t$ is the "Factor".
There's a lot of little subtelties of the algorithm, like the mentioned size, or limiting the effect to an axis (lerp only on chosen axes), or instead of casting to a sphere you could cast to a cube, which I think works as if by shooting a ray from origin in the direction of the current position and the result is the position of the ray hitting a bounding box of the input geometry. Of course this can, and probably is in the algorithm, calculated mathematically - an intersection of the ray and the bounding box (axis-aligned cuboid).

A Clamp will do for the Cube, maybe? (If necessary preceded by a scale)


text:
Selecting in nodes
How do I select the 4 things highlighted in green on the node like in the screenshot below. I’m trying to follow a tutorial on how to make an animation but when the guy selects those things on the map range I have no idea how he selected them. Can anyone tell me the key or command that allows me to select them.

Hold the mouse down on the top one and drag it down over the others. However those colours mean that keyframes have been inserted on each value by hitting 'I' at one frame and I think those have to be inserted individually. Then the frame number has changed hence the green colour. Do you have a link to the tutorial with the time in the tutorial where the tutor was selecting them?


text:
Cannot use two glare nodes at the same time
I am trying to use two glares in the compositor, and it works in viewport, but on render and compositor view only one works.
Screenshot shows desired output on the left and render output on the right, where the fog glow does not render.I also tried running them in parallel then using a mix node instead of in chain, but the result is the same.
Both viewport and render are 1024 samples Cycle, no denoising. Using RTX2080 on Blender 4.0.2
Thanks in advance for your help !

Having 2 times a glare node with mix at 0 doesn't make much sense. It means your 2nd glare is applied to the image + the 1st glare node. Try inputing your render layer to both your glare, then combined them with a mix node (screen or add) or an alpha over. At least one of the glare should be at mix 1.


text:
How can I make Fluid+Cloth animation togather?
I've used Cloth modifier and then Fluid modifier.
But result doesn't looks like as I expected.....
The fluid is stopped by the cloth mesh(As a plane before it animate cloth simulation). Domain size is big enough....
How can I make the fluid follow the cloth surface?
(I've applied Cloth modifier to the plane with pins for all 4 corners and applied Fluid modifier obstacle type)
Thanks in advance.......

As far as I know it isn't possible they are two different solvers.

You could probably bake cloth simulation to frames then use it as collision for fluid.

@LukeD How can I bake cloth simulation?

Under the physics tab in "cache" there is a bake button. Do this for both the cloth and fluid physics and check if that works.

I'll prepare answer later for you.


text:
How to merge around 300+ duplicate materials?
I just made a scene with a city made of mostly identical skyscrapers. I did that by copying and pasting. Then I joined all of them with Ctrl+J, but now I can't undo the join and I have got around 300+ glass and wall materials in one obj. My question is how do I merge them into 1 glass and 1 wall material so I can change all windows and all walls at once? Selecting them all is not an option. I have 1000+ windows in my scene and now in one obj.
Short version: I mucked up and now I need to clean up 300+ materials. How can I do that? Maybe an add-on?
edit: I tried deleting all but the first glass and wall. i had one skyscraper left that had colors.
edit2: my materials are in alternating order. like glass, wall, glass, wall, glass, wall.... i think you get the idea.

Can you post the blend file (or just a small sample of it with the problem)? I'm not sure what your material slots look like and what order they are in.

Script is needed to do this. It has to know some pattern to know how to merge. Do the materials have a naming convention? Let's say all glass materials have "glass" in them? Or are they in some specific order? Or do all glass materials have the same setting/nodes?

Close to your need, but not sure it can do it all (untested) https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Material_Search

Possible duplicate of How to append many objects without appending materials

This is not as straightforward as it seems. When you copy - paste objects in Blender, unfortunately not only the object is duplicated, but also the materials on the object. So that's why you get materials called Glass.001, Glass.002, Glass.003 and so on. For Blender, those are now entirely different materials, even though they look identical. If you had used Shift D to duplicate the objects, the materials would have remained singular, even after joining the meshes. The only solution here is a brute-force addon which changes material assignments by name. It's possible but not safe

This is possibly the go re "glass, wall, glass, wall"  consolidates material slots to unique set, and assigns to faces accordingly https://blender.stackexchange.com/a/129155/15543

The following script extends from the already linked answer in that it removes any double-materials and assigns the 'correct' materials to the faces respectively. However, you'll need to understand that a few assumptions are made here:

your original material is named something
the duplicates are named something.045, something.046 and so on
they are REALLY duplicates
you've saved your scene before you run this :)
the active object in your scene is the mesh object you want to clean

Copy the following Python code to a text editor within your file and run it:
import bpy

# only search on own object materials
mat_list = [x.material.name for x in bpy.context.object.material_slots]
remove_slots = []

# the following only works in object mode
bpy.ops.object.mode_set(mode='OBJECT')

for s in bpy.context.object.material_slots:
    if s.material.name[-3:].isnumeric():
        # the last 3 characters are numbers
        # that indicates it might be a duplicate of another material
        # but this is pure guesswork, so expect errors to happen!
        if s.material.name[:-4] in mat_list:

            # there is a material without the numeric extension so use it
            # this again is just guessing that we're having identical node trees here

            # get the material index of the 'clean' material
            index_clean = mat_list.index(s.material.name[:-4])
            index_wrong = mat_list.index(s.material.name)
            print(index_wrong, index_clean)

            # get the faces which are assigned to the 'wrong' material
            faces = [x for x in bpy.context.object.data.polygons if x.material_index == index_wrong]

            for f in faces:
                f.material_index = index_clean

            remove_slots.append(s.name)

# now remove all empty material slots:
for s in remove_slots:

    if s in [x.name for x in bpy.context.object.material_slots]:
        print('removing slot %s' % s)
        bpy.context.object.active_material_index = [x.material.name for x in bpy.context.object.material_slots].index(s)
        bpy.ops.object.material_slot_remove()

It should turn this:

into this:

replying to a very old question, but its nice to be able to mark it solved

I'm using Blender 2.83 and this isn't working for me. I have many duplicate materials across different objects.

@AaronFranke I've just tested the script and confirmed it still works, even in 2.90 alpha. Can you elaborate on what you struggle with? Keep in mind that this script is designed to remove duplicate materials on one single object, not across many objects

Yes, that was the problem, I had many objects. It's a shame the script can't work for multiple objects, but I ended up just fixing it manually, so my situation is resolved.

I have only tested this on Blender 2.82
This solution only works if you are trying to get rid of duplicates like mat.001, mat.002 … (etc.)
You should save your work before running the script in case it doesn't produce the results you want
Copy/Paste the code into the Text Editor and run the script
Once it has finished running, all of the duplicate materials (mat.001, mat.002 …) will be replaced with a single material which will be named mat.
import bpy

def replace_material(bad_mat, good_mat):
    bad_mat.user_remap(good_mat)
    bpy.data.materials.remove(bad_mat)

def get_duplicate_materials(og_material):

    common_name = og_material.name

    if common_name[-3:].isnumeric():
        common_name = common_name[:-4]

    duplicate_materials = []

    for material in bpy.data.materials:
        if material is not og_material:
            name = material.name
            if name[-3:].isnumeric() and name[-4] == ".":
                name = name[:-4]

            if name == common_name:
                duplicate_materials.append(material)

    text = "{} duplicate materials found"
    print(text.format(len(duplicate_materials)))

    return duplicate_materials

def remove_all_duplicate_materials():
    i = 0
    while i < len(bpy.data.materials):

        og_material = bpy.data.materials[i]

        print("og material: " + og_material.name)

        # get duplicate materials
        duplicate_materials = get_duplicate_materials(og_material)

        # replace all duplicates
        for duplicate_material in duplicate_materials:
            replace_material(duplicate_material, og_material)

        # adjust name to no trailing numbers
        if og_material.name[-3:].isnumeric() and og_material.name[-4] == ".":
            og_material.name = og_material.name[:-4]

        i = i+1

remove_all_duplicate_materials()

```

Short version (works with Blender 2.93.1):
import bpy

mats = bpy.data.materials

for mat in mats:
    (original, _, ext) = mat.name.rpartition(".")

    if ext.isnumeric() and mats.find(original) != -1:
        print("%s -> %s" %(mat.name, original))

        mat.user_remap(mats[original])
        mats.remove(mat)

Output example:
gold.003 -> gold
gold.004 -> gold
paper.001 -> paper
paper.005 -> paper
paper.006 -> paper
paper_white.001 -> paper_white

If you enter edit mode, you can select each glass material, and click select (Not sure if you can select all of them, and click select once or do them individually off the top of my head) then once everything that uses all of your glass materials is selected, delete all but one of them with the minus button near the top of the panel, then select that one material and click the "Assign" button underneath the panel. Rinse and repeat for the walls.

You can try this add-on. It checks materials and removes duplications.
https://b3d.interplanety.org/en/blender-add-on-m-cleaner/
The main difference of this add-on from the scripts above is that it can really check the materials and find the really equal material.
If you merge two materials only by name and prefix (.001, .002) they could differ by their nodes - so, the name shows that they are equal, but not, they aren't. The "M-Cleaner" add-on really checks materials node by node, compares them, and only if the materials are really equal - it merges them into one. If materials even have equal names but differ by nodes - they wouldn't be merged. This mode is non-destructive.
Also, it has destructive methods of work, like described in the scripts below. It can merge materials by names and only by nodes on the first level of materials (with no checking groups).

Hi! Please add more detail what the add-on actually does, otherwise this is a so called "low quality" post. At a first glance it does the same thing like both scripts listed here. Might be wrong, but I strongly suspect that it's just a copy of any script from this site to monetize python code.

Thanks for the posts, but this is not a regular forum, according to site rules links to answers are not answers if the link goes missing your answer becomes an empty shell without content. Answers should be substantial and stand on their own without relying on external data. Either transcribe essential parts of the process here, or posts these in the comments section instead.

I added some more info to my comment.


text:
How can i make blender more comfortable, as the handling is very alien to me?
I have rephrased my question.
How can i change the short-cuts and the handling in "templates", like "Netbeans" does, when you can select "Eclipse"?
The handling of the system is very alien from any windows or linux based non-modelling software also (Google map, photo editor like gimp), not just from existing 3D modelling tools.
Middle button usage for screen rotation (zoom in needs other fancy stuff while rotating as it holds the middle wheel button), 3D cursor holds the whole left button, which is not that important. Right clicks is not throwing me any popup menu, i need to know the particular short-cut keys for that.
A first time beginner looks at the software and recoils, when he just don't get "any responsiveness", trying to click on the crazy way on the left button, and says "what the heck".
i have looked at some webpage which have been generated by blend4web, and interestingly the sites itself worked in the same way, what i have expected how Blender must work,
I would like to see similar behavior like the example sites are working.

Hi. I suggest reducing the information in your question to just the relevant pieces of information. The core of your question seems to be "I would like to change the shortcuts of some tools", but that may get lost in the information regarding your learning of blender (which I would say is not relevant to the question).

I learned by making a look up table of all the shortcuts keys, and asking here many many times how things are done. There are things in Blender you say so much simpler than Maya's way and way less annoying, in other aspects you think Maya can do this why can't Blender?

First you need to stop comparing it with Max because it is the different workflow what makes Blender that good (for me). If you start to try make Blender behave / look like Max, it won't serve you well. Just complete some basic tutorial, try to remember basic shortcuts, find what can you do with 3D cursor.. and I am sure the most of things you don't like at this moment will start to make sense for you.
And just a hint - you can always hit Spacebar, type what you want to do and will find your function together with the shortcut.

In case the mouse buttons are bothering you, there is an option to switch the mouse button that you select with (go to User Preferences > Input then change "Select With" to left).

I have figured out at the end of the day, just i didn't dare to change yet fearing to screw up the system.

Consider having a cube, and wanting to move it vertically by 5 units. In blender, there are two ways of doing this.

Keyboard: G, then Z, then 5.
Mouse: Click the blue arrow, hold down ⎈ Ctrl while dragging it upwards and count how many clicks it goes through, releasing the mouse when you get to 5.

The second way it easier to learn: you click/drag on the arrows, but if you are using blender for multiple hours per day, using the first method is far superior. As a result, those who make tutorials will often teach methods heavy in keyboard shortcuts - because this is what they use, and it's easier to say "Press G, Z then 5" than to show clicking/dragging an arrow.
The other thing you need to know about blender's interface is that it follows the rule of "No Dialogs." This is different to most other software, and it means that blender does not 'get in your way' by placing windows over the top of the thing you are working on. As a result, most functionality is visible straight off, and it leads to the 'shotgun of buttons' effect. However, once you have learned how blender manipulates data (eg difference between mesh and object data) you'll find the layout is actually quite intuitive. Again, yes, it requires learning.
I will admit to being unsure of why the mouse buttons are done the way they are, but I don't see any better layout either. Even Real Time Strategy computer games can't decide if it's left or right click to select.....

The keyboard shortcuts that are useful/essential to know are:

Tab (edit mode/object mode)
G, R, S (grab, rotate, scale) combine with X, Y, Z and maybe ⇧ Shift
E (extrude in edit mode)
W (subdivide in edit mode)
F (Make a face in edit mode)
X (delete, but under your finger as opposed to miles away)
⇧ Shift + D (duplicate, not linking mesh data)
N and T (toggle side panels)
Z (toggle wireframe and solid shading mode. Combine with ⇧ Shift and Alt for other modes)
⎈ Ctrl + Z (undo)
⎈ Ctrl + ⇧ Shift + Z (redo)

Other useful buttons

GG (edge slide in edit mode)
⎈ Ctrl + R (Ring cut in edit mode)
Alt + D (duplicate, linking mesh data)
⎈ Ctrl + G (group objects)

If you put Key around your shortcuts, it will look a lot better in a post.

Thanks for your answer, although my question was not that straightforward, but somebody got the point. Your one is very helpful, only one stuff is missing, how i can zoom and rotate the screen at the same time in a slippy way (not by +/-), if my middle mouse button holds the wheel? The no dialog window didn't cause any headache, as i'm developing for mobiles, i'm not creating dialogs either.:)

Zoom and rotate? I just don't do them at the same time, and never really considered that it would be useful. I can't think of an easy way, unless you enable 'emulate 3-button mouse', and use alt+click to rotate the view. Then you can use the mouse wheel as normal.


text:
Increase Ambient Occlusion Effect
So ive been trying to figure out how to do this in blender for the last 2 days now and got no where.
I want to increase the effect of ambient occlusion when i bake it onto a texture.

I achieved this(right monkey head) by ticking the ambient occlusion box in that side panel and adjusting the settings but couldn't figure out how to bake this into a texture :/

As you can probably tell im not that great with blender. As a programmer, blender is turning into a bit of a night mare since everything i want to do seems straight forward but turns out is isnt at all
Any help would be greatly appreciated.
Thanks ~Scott

Unfortunately, AFAIK there is not a way to bake that AO. It is there for preview only to help you when you are modeling complex objects.
However, you can use the Cycles or BI AO to bake it correctly...

Thanks for the reply. Im not to sure how to use "Cycles or BI AO" to bake it correctly. Ive been using the bake button in the Render tab (Image Link > http://puu.sh/tGIQt/4cb9ccd79d.png) and it  works, just when i change any relevant settings it doesnt seem to have any effect what so ever(apart from sampling ). could you link me something or go a bit more in depth as to how i would use BI Ambient Occlusion? Thanks

Please see my answer...the first link that I posted at the end is a nicer demonstration than mine, so make sure you upvote his answer if you like it too. BTW welcome to Blender Stack Exchange!

After UV unwrapping your mesh and creating a new image to bake to, try playing around with the the Distance and Strength values in the Gather menu of the Properties panel.
While test baking with different Distance and Strength values have the Samples set to around 6 or 7. When you think you have found something acceptable then up the Samples to around 25 or so for your final bake.
Do some test bakes with the Strength at small negative values.
If you need still darker AO textures then open your AO bake image in Gimp or PS and edit the image there, then bring it back to Blender.

Thanks for the Answer. I tried using your settings, but only making the strength to a negative number seemed to have an effect. After messing around for some time i decided to save the baked image and edit it in gimp like you suggested. Gimp let me edit the image and get the effect i was after, its not perfect but it will do for what i want. Thanks ~Scott

@WeirderChimp53 Your normals may be backwards...try recalculating

This is a basic setup of environment lighting (with lots of AO) in BI:

To bake out the AO, just go to the bake panel and select to bake AO...

Of course, you need to do the usual bake stuff for BI (UV unwrap to a valid texture, etc.).
Here are some links for BI:
How do you bake ambient occlusion for a model?
https://docs.blender.org/manual/en/dev/render/blender_render/bake.html#ambient-occlusion
https://docs.blender.org/manual/en/dev/render/blender_render/world/ambient_occlusion.html
https://docs.blender.org/manual/en/dev/render/blender_render/world/ambient_light.html
And for Cycles:
http://www.blenderguru.com/tutorials/introduction-baking-cycles/
Here is my demo blend file (post all blend files on this site BTW):

Thanks for the answer. The first link, Keavon's answer was what i originally used when i was trying to figure out how to bake Occlusion, but it was more just a basic explanation of baking from what i read and didn't seem to go into much detail about how the different settings worked.


text:
How to UV Unwrap and Scale UVs with Python (while in object mode)?
I realize similar questions have been asked, but I'm having a lot of trouble and would like to understand.
How can I UV unwrap (smart project) the originally selected object and scale all UVs (scale double) while in Object Mode?
I have a script that adds some array modifiers. It also adds some empties to manipulate the arrays. When I attempt to unwrap it I can't get past the 'failed, context is incorrect'
I read a little about override, but I'm not sure how to use it.
I've included the code for setting up the empties and arrays. I gets input from the user as to how many are needed. I greatly appreciate any help!
    #define selected object
    obj = bpy.context.active_object

    #store current object to select again?
    object1 = obj

    # code so that I can move the origin of each empty
    # store the location of current 3d cursor
    #saved_location = bpy.context.scene.cursor_location.copy()

    # give 3dcursor new coordinates
    #bpy.context.scene.cursor_location = (1.0,0.0,0.0)

    # set the origin on the current object to the 3dcursor location
    #bpy.ops.object.origin_set(type='ORIGIN_CURSOR')

    #CREATE EMPTIES TO MANIPULATE ARRAYS
    #for i in range(int(context.scene.arry_amnt)):
    #    i_amnt = i
    #    e_mount = ("E" + str(i_amnt))
    #    bpy.ops.object.text_add()
    #    obt = bpy.context.object
    #    obt.name = e_mount
    #    obt.data.body = e_mount
    #    obt.data.offset_y = i_amnt
    #    obt.show_x_ray = True
    #    obt.show_texture_space = True
    #    obt.hide_render = True

    #    if context.scene.rnd_rotation == 1:
    #        obt.rotation_euler[2] = random.randint(0,2)

    #    if context.scene.rnd_location == 1:
    #        obt.location[2] = random.randint(0,2)

        #ADD ARRAYS
    #    p = obj.modifiers.new(name= "BLIX01", type='ARRAY')
    #    p.use_relative_offset=False
    #    p.use_object_offset=True
    #    p.offset_object = bpy.data.objects[e_mount]
    #    p.count = context.scene.arry_cnt

    #how can i select the original object and unwarp / scale uv
    bpy.ops.mesh.select_all(action='DESELECT')

    bpy.ops.object.select_all(action='TOGGLE')

    object1.select = True
    bpy.ops.object.editmode_toggle()

    bpy.ops.mesh.select_all(action='DESELECT')
    bpy.ops.mesh.select_mode(type='EDGE')
    bpy.ops.mesh.mark_seam(clear=False)
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.object.editmode_toggle()
    bpy.ops.uv.smart_project(angle_limit=30, island_margin=0.02, user_area_weight=0.03)

Look for python code in bl_operators
Some default blender operators have their python code available in 2.79/scripts/startup/bl_operators in this case uvcalc_smart_project.py .A quick peruse of the code and you will see that most of it can be done in object mode, by passing operator properties to the main(...) method. . Except "aspect correction"
print("Smart Projection time: %.2f" % (time.time() - time1))
# Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec" % (time.time() - time1))

# aspect correction is only done in edit mode - and only smart unwrap supports currently

Quick test in console, in object mode (defaut scene camera view) (Please also note that even though blender uses radians as its rotation unitprojection_limit appears to use degrees going from 1 to 89. So pass it  30 rather than radians(30)
>>> from bl_operators.uvcalc_smart_project import main
>>> main(
main(context, island_margin, projection_limit, user_area_weight, use_aspect, stretch_to_bounds, )
>>> main(C, .02, 30, 0.03, True, True) # not radians?
Smart Projection time: 0.10

producing

Scaling UV is pretty trivial see python templates > Operator UV simple  Script below doubles the size of object mode context object UV.
import bpy
import bmesh

def main(context):
    obj = context.active_object
    me = obj.data
    bm = bmesh.new()
    bm = bmesh.from_mesh(me)

    uv_layer = bm.loops.layers.uv.verify()
    bm.faces.layers.tex.verify()  # currently blender needs both layers.

    # scale UVs x2
    for f in bm.faces:
        for l in f.loops:
            l[uv_layer].uv *= 2

    bm.to_mesh(me)

Note:
bm.faces.layers.tex.verify()

is no longer supported in 2.80 and will need to be removed.

Thank you batFINGER!!!!! :D Is there a way I can buy you a coffee or something? I had been grappling with this for weeks.

Where can I access Python templates > Operator UV simple ?

text editor, templates menu.


text:
Cut Off Edge Particles?
I've added a particle system to my odject. The particles follow the normal orientation. I was wonder if there is a way to limit them from hanging off the edge? My approach right now is to convert to geo, then cut them off. I tried using a collision with kill particles, on a box bigger than the object. It didn't seem to work. I'm really hoping there is a better approach. Thank you! :D
I have attached a test project. Link to greeb_test.blend
Edit: In the interest of full disclosure... This my current method to trim up the edges.
1) add particle system to object.
2) convert particles to object (apply visual transform)
3) select the new objects and join them together using ctrl + J
4) add decimate modifier to cut down on lag.
5) use boolean or knife tool to edit object and cut off unwanted pieces.

Could you include a .blend file?

Here is a link to a test project  https://drive.google.com/open?id=0B4TguvcrwWRXQzFmampIWkdZdkk  Thank you :D

I was not able to find a way to cut the edges off, but I was able to find a decent substitute: Weight Painting. This is the result I produced:

With your mouse in the 3D viewport, key Tab to enter edit mode. Key W and select Subdivide 3-5 times (the more the better, until it lags to much).
Next, key Tab followed by Ctrl + Tab to enter weight painting mode. Go to the Tools bar. Make sure Weight: is set to 1. Paint a streak down the middle of the lateral faces and a dot on each end by dragging the mouse while holding the left button down. Your result should look something like this (mirrored on the hidden sides):

Note that I moved the emmission time to 5 frames so that I could paint in peace.
Lastly, go to your particle system settings, the Vertex Groups drop down and the Density: option. Select Group (it should be the only group there). Here is the modified .blend file. I might fiddle with the painting and size of the emitted particles to get a nicer looking result.

Brilliant! Thank you very much for taking the time to find a solution. :D

Glad to help! ...even if I couldn't do it exactly.


text:
Teleport rigid body (physics) object?
Is there a way to "teleport" a rigid body when it comes in contact with some kind of trigger object?

attached a sample scene.
Edit: Perhaps this is a coding (python) question. logic would be if object makes contact with a trigger (another object) it is moved to an X,Y,Z coordinate in the world space. Unfortunately I do not have enough experience to know how to execute. Thank you very much.
I would like to have the balls fall into the 1st portal and then appear in the 2nd portal. I would like to have this driven by the simulation (if that makes sense). I can make this happen in unity by using a trigger that changes the object location. I am grateful for any help. Thank you for your time. :)

maybe use a trick like a second ball?

thank you moonboots for the suggestion. I would like to have it controlled by the simulation. Maybe it's more of coding question? I wish i had a better way to articulate.

there is no way AFAIK to do this "just" by simulation/physics (or whatever you want to call it). You have to "turn off" the physics (check the animated checkbox) at a certain point to achieve this effect. So either you use a second ball as moonboots proposed, or use the "animated" checkbox or another hack.

That is why OP add the bounty for a python solution :) ... it doesn't sounds impossible to me (someone without scripting skills  :) ) ... if object reach second ring location (proximity) switch ON Animated, change location to first ring loc, switch anim OFF ... what I see as an issue - ball is speeding up in its trajectory, so you would have to cheat with some compromise of initial speed and direction to keep a feeling of portal continuity ... or OP would have to wait for Blenders Game Engine.

@vklidu I tried answering the question using physics... Strangely, since a few blender version updates, the developers have stopped updating physics. I tried animating dynamic, animated values but ------ It went haywire, falling down and then suddenly blasting up at the speed of light. Of course, we could use a second ball like moonboots said, but not always the ideal solution.

@vklidu Maybe geometry nodes could work... Make sphere go to the 2nd portal, then switch off animated (considering it was already animated to be on) and then maybe it would work.

thank you very much for the information. I appreciate the thoughts on how to solve. :)

as you can think of, even teleporting takes some time ... ;) and so this might be a solution:   [1]: https://i.sstatic.net/8FYJJ.gif i just gave it a try and of course my additional mechanic should be made invisible. If this would be a solution for you, let me know, then i will write an answer. It is indeed all done by physics with drivers. And a very bit of python. I just realized it for two balls...because i am lazy, so just forget about the third ball ;) and i am sure you could optimize it so the ball is even quicker "teleported" ;)

@Chris. Thank you. I think that's a great work around.

Ok, here is my example (which of course could and should be improved, so it is "just" a proof of concept):
This is my python script:
import bpy

def funny1(obj):

    obj = bpy.context.scene.objects["ball1"]

    print(obj.matrix_world.translation)

    zLoc = obj.matrix_world.translation.z

    print("z is", zLoc)

    if zLoc < -10:
        return 6

    return 11

def funny2(obj):

    obj = bpy.context.scene.objects["ball2"]

    print(obj.matrix_world.translation)

    zLoc = obj.matrix_world.translation.z

    print("z is", zLoc)

    if zLoc < -10:
        return 6

    return 11

bpy.app.driver_namespace["funny1"] = funny1
bpy.app.driver_namespace["funny2"] = funny2

All it does is set back the piston spring (pusher), if the ball is higher than a specific z-value. If it is lower than a specific value, it releases the pusher and the ball will be pushed.
So these driver functions i added to the y location of the pusher like this:

to execute the example file, first run the script, then update both drivers, then run the animation.
please be aware that i set the pushers on different rigid body collections so that they don't disturb each other:


text:
Cycles bake is too dark
I'm trying to bake Cycles materials to a texture, for use in a different program. The issue is, whenever I bake the materials to a texture, the result is far darker than the original version.
This is it using Cycles materials:

And this is it with a texture. No other changes were made other than changing it from materials to a texture.

The second hat is dramatically darker than the original. How can I fix it?
These are the baking settings I'm using.

Any help would be much appreciated.
EDIT: Here's a link to the .Blend file of the hat. The texture is packed in with it, but if you need it separate, let me know.
https://www.dropbox.com/s/pvfrixxsd0p1atb/hat.blend?dl=0

Can you post the .blend and / or the newly baked textures? If it was baked properly, then you should probably just turn on "Shadeless" in the baked hat's material settings.

I'm doing this in Cycles, and I don't think Cycles has a Shadeless option like Blender Internal does. I edited the question to include a link to the .Blend file, though.

For shadeless in cycles you would use an emission node that is only applied if it's a camera ray using the light path node.

The way I found to do this is to set your cycles settings this way:

Under Render Properties
Under Bake
Change "Bake Type" to "Diffuse".
Select the "Colored" button, while disabling "Direct" and "Indirect"

I used Blender 2.78 by the way. Hope that helps!

For an explanation of why this works: the direct and indirect options are baking lighting information as well as just raw surface colour.

For those still bumping into this problem (I did)
Try switching the direction of the normals once or twice. Even if it looks all right.
Somehow that helps. (not sure why).
And experiment with very low detail 256x256 to see if it works all right.

On blender 2.82 I was getting dark bakes. Recalculating normals didn't help but flipping them twice solved the issue. Thank you for the answer.

Solved my prob - but emphasis on ONCE. I didn't have back face culling so didn't realize my normals were backward. The result was simply darker which is pretty weird.

how do you flip normals?


text:
Script to move object to world origin without changing z-axis position
I have a blender file with 4 objects. Every object has position [0,0,0], rotation [0º,0º,0º] and scale [1,1,1] but they are located in different positions in relation to the world origin - [0,0,0]
I need to move them all to the world origin except the z-axis.
I have a script that I use to rotate all the objects in the scene but I can't figure it out how what to do in this case.
# rotate objects:
sel_objs = [obj for obj in bpy.context.selectable_objects if obj.type == 'MESH']
for obj in sel_objs:
    obj.rotation_euler = (0, radians(-90), radians(270))

I'm using Blender 2.83.0

You've lost the original locations of the objects so technically they are at the origin. In the script below I've cheated and used bpy.ops to reset the objects origins to Center of Mass.
import bpy
C = bpy.context
D = bpy.data

bpy.ops.object.select_all(action='DESELECT')

for obj in D.objects:
    obj.select_set(True)
    C.view_layer.objects.active = obj
    ### Pick one ###
    #bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
    #bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME', center='MEDIAN')
    bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')
    obj.location[0] = 0 # x
    obj.location[1] = 0 # y

    C.view_layer.objects.active=None
    obj.select_set(False)

After batFINGER's suggestion I modified the code to not loop through bpy.ops calls. I also changed it to only affect selected objects. The original version would have moved cameras, lights and whatever else.
import bpy
C = bpy.context
D = bpy.data

### Pick one ###
#bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME', center='MEDIAN')
#bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')

for obj in  C.selected_objects:
    obj.location[0] = 0 # x
    obj.location[1] = 0 # y

Thanks Ron. Now that I saw your answer I noticed one detail that I missed. In the blend file I have "perfect" cubes but in fact it was a bad example because what I have is not a perfect square in the z-axis. What I mean is that from top view all my 4 objects are a rectangle or square but in the z-axis it's not. I attached a screenshoot to show better what I mean.

Instead of a screenshot, I attached a new blend file. If you choose the top view you can see that all 4 objects are square (they also can be rectangles from top) but because they are not uniform in the z-axis, when I use your script I don't get the objects centered in the x and y axis. What I need is to ignore the z-axis completely when I define the center of mass. I don't know if this is possible.

I left the other two options for setting the origin in the code commented out, but the script doesn't move the Z axis at all. The numbers get set but that isn't a big deal, you can always 'Apply Location'

@zephirus Suggest also adding a screen shot example  as to how it is now and expected result,  Ron, running the origin change operator once (outside loop)  on all selected objects will be a lot quicker when object count is high..

I know that the z-axis isn't changed. But in the x and y, the objects are not centered. That is what I need. I explained myself wrong in my question.

This is the best you're going to get programatically, I think. When you apply location you lose all the information about where the object center was.

@batFINGER good point, I modified my answer to only hit bpy.ops once and not play selection games.

Thanks Ron. I think this will work.


text:
GN - Delay animation per instance
I recreated Bradley's node tree of flipping book pages.

He is using several his own node-groups. One of them is Delay Fall-Off where I can delay start, but since I generate instances of final book it is applied to all instances of course.

How can I set delay per instance
How can I control delay by another object (Empty) or even better by value of procedural texture in place of instance.

Here is whole node tree ...

I didn't fully understand the whole node-tree, I will need more time ... (or entire of my life :)

Without putting in a lot of research. You can simply subtract some scaled value of the index of each instance from the value thats animating them. So find the value thats animating the books. Add a math subtract node there. Create an index node. Multiply that index value by some scale. Then connect that to the subtract node.

If you mean this setup ... it still affects all instances.

Hi! I found it almost impossible to reverse-engineer Bradley's groups.. but I did rough out one of my own. It would take a bit of tidying up to make it half-useful to anyone else, though. Is that of any interest?

@RobinBetts Sure, awesome result :) Cover control is welcomed (in the best it should be UV textured as well). Final goal is like table full of books animated as coming "wind" opening books from right to left on the table with a bit of randomness. Anim ends with open books on random page. Sure also random book thickness is welcomed too, but since it would be taken almost from top view current version can fake illusion too. GN are hard for me, so any step further is welcomed. Thanks :)

I'm afraid there is currently no workable solution in this specific case with instantiation: An instantiation occurs at different points, but always exactly one (!) object is instantiated. One single object which is copied to n points and can no longer be changed after instantiation.

@quellenform Hm ... but if you check the RobinBett's link, there seems to be a way.

...possibly he is right. But maybe he just copies the objects with different properties to different positions instead of instantiating them. ... @RobinBetts, please tell us more.

@quellenform etc. sorry for delay, busy, and it's a bit of a tangle. vklidu's extra requirements actually change it quite a lot, chiefly, to thicken the books and cover the spine? Here's the messy version without any concessions to being understood :(. Got to figure out how to make it a reasonable BSE answer.

@RobinBetts, thanks for sharing! You are right: if you do the page flip after realizing the instances, it is possible this way.

@RobinBetts Thanks for blend ... easier for me to study :) For the project I had to speed it up by old school way ... Render one book and composite in VSE in a few minutes :)

@vklidu I'm really sorry for the delay.. I got all tangled up, trying to make a kind of modular version so the books could have spines and thickness, pages on arcs, etc.. I still don't know how I would squeeze that down into a one-subject BSE answer. I've learned a lot, but that's not much help to you.


text:
Specific sculpting brushes causes asymmetrical results
Im having some issues sculpting.
So far, I have noticed this issue occur in two different sculpting tools, one being "Smooth" and the other one being "Clay". Most other brushes do not have any issues, and a simple workaround for my issue is to hit the "Symmetrize" button, however I'd like to find out what's going on with my Blender.
I've tried to reinstall it completely, and it still did not help.
First, heres the mesh Im trying to smooth. Its supposed to be the base of a tail. I want to smooth the bottom right part.

When doing so, despite making sure everything was located and scaled correctly, and the proper options enabled to sculpt symmetrically, it fails to do so. Picture below.

Same thing occurs for the Clay brush.

Does anyone have any idea how to fix this? Im completely lost on what Im doing wrong.

I don't understand your issue here. You are sculpting with a x-axis symmetry, which looks like it's working. What is it you are trying to achieve VS what you just showed us ?

Its not working. If you look closer, especially at the bottom picture, it is not symmetrical. Its slightly off. Its as if its trying to make it symmetrical but it doesnt follow through entirely.


text:
Changing a Tiled Texture model to clip Texture
First post here. New to blender
I am working with 8 materials that I have to combine into one. The object has each material as a simple repeating tiled texture and a detailed UV map that goes out of texture bounds. This is what one of the materials look like.

This made Texture Atlasing seem impossible. Are there any solutions?
Is Virtual Photogrammetry possible? Exporting the sword's already aligned texture by scanning it

You might look into baking the texture onto the object.

@AxiDes I tried but it didn't help with majority of the UV being outside the texture. Setting it to clip instead of repeat meant that the majority of the material would not be textured either


text:
Converting FBX Camera Movement from Millimeters to Meters
I have a camera movement in an FBX file that I exported from After Effects, and I want to import it into Blender. The problem is that the location appears in millimeter values and with a very small movement range, for example, the Y-axis first point is at 0.004987 and the second point in the animation is at 0.004988.
I need to convert all the keyframes in the animation to meter values, meaning to move the point three places to the right - so the location would actually be 4.987 and the second point 4.988 meters.
How can I perform this conversion?

You can just scale all keys on the y axis.
First open the Graph Editor, select a keyframe with a value of 0, press ⇧ Shift + S and then select Cursor to Selection.
This will ensure that all values will be scaled relative to 0, so all positive values will remain positive and all negative values will remain negative.
Next set the pivot point to 2D Cursor (the one you just set to 0). It's the icon to the left of the magnet icon/snap option.
Now you can select all keys and scale them on the Y axis by 1000.


text:
How can I convert XYZ Euler to ZXY without changing the camera movement?
I’m trying to change the rotation order without disrupting the current camera movement. Is there a way to do this? If so, could I get an explanation?
When I change the Euler rotation order in the Transform settings, the change doesn’t seem to export in the FBX file. Could there be additional steps needed during export to apply the new rotation values? (I am selecting 'Apply Transform' in the export settings.)
Thanks to anyone who replies!


text:
How can i extrude or scale bottom of an object along it normal using Geometry node
I'm stuck in a problem where I can't figure out how to extrude the bottom of an object in the way shown below. I'm new to blender geometry node, been trying Set Position, Extrude Mesh and Scale Element but still can't get the result desired. Didn't know the keyword to research the problem. It would be great if anyone could teach me on how to do it.

Hello, 0292.. do you mean any object, (like a GG edge-slide) or this one in particular?

Yes, i mean it edge-slide. It would be great if there was a solution for any object rather than just this one in particular. If not possible, then the method for this case is also good help. I searched that blender geometry node does not support extrude by normal yet. Correct me if i'm wrong.

For clarification: do you want to extrude (i.e. create new points, edges, faces, not moving existing ones) or to scale (i.e. in your case, slide end point of edges in each edge direction) ?

Yes, I'm actually want to extrude it as you said: slide end point of edges in each edge direction.

Here is an alternative method if you instead of Extrude or Edge Slide want to have something that behaves like scaling in Edit Mode with the Transform Pivot Point set to Active Element, by choosing a vertex from which you want to scale everything (well, I said instead of Edge Slide but scaling an edge away from or towards an endpoint is basically edge sliding):
Use a Sample Index node to determine which vertex you want to be the scaling pivot. Then subtract this vertex position from all positions to get the vectors from the pivot to the other vertices, then scale those vectors and add the pivot again afterwards (scale by > 1 to increase, by < 1 to decrease the size). The result goes into a Set Position node to move the vertices. By switching the Index you can switch between pivot points.

This way you can scale the geometry "away" from the vertex with the chosen index.

Of course this also works if you want to define the center of an edge or a face as pivot point just by switching the Sample Index node to a different domain like Edge or Face rather than Point.

Work like a charm! Thank for clearly explain and sharing!

you can use this node setup:

and play around with the 2 values in the red nodes.

Sorry for lacking info, actually i want to extrude it's bottom edge loop, my object doesn't have bottom face. But by your answer i get the idea now. Thanks for your help.

no problem, just open a new answer with your additional detail - you may open as many questions as you want!


text:
How to subtract cylinder from a cube, add bevel and make it all smooth
So I have this kind of cube and I need to subtract half of the cylinder from it. The cylinder is centered in the z-axis. The boolean operation seems to work fine but on top of that I want to bevel all my edges of the cube and smooth the semi-hole I just carved before.
Eveything I try results in glitches in the mesh.
What am I doing wrong?
I'm using blender 2.91.0 beta

I'd recommend starting with autosmooth along with a weighted normals modifier to help the result after
a bevel modifier.
Here is my cube's modifier stack:

Here is the result:

Thanks. Tried your suggestions but I can't even get the bevel to show. I attached the blend file to my question. Can you tell me what is wrong?

@zephirus if you look closely  you will see that bevel is indeed there.

it's a bug of 2.91.0 beta. I just opened it in blender 2.90.1 and it shows.

Interesting. I am using 2.91 latest stable

Also, in 2.90.1 the boolean cuts an hole in the cube. I will install the same version you have.

Ok, with 2.90.1 latest stable I'm getting the same results you have. Btw, to get even more smooth curves, what are my options? Use a cylinder with more vertices or is there another way similar to subdivision surface?

It’s just default cube and default cylinder. Nothing more than the images I posted.

My question was about how to smooth even more the curvature - I added a second image as an example.

Not working anymore when I create a new scene. It seems like a blender bug. When I use "Exact" for boolean I get a perfect cut but Bevel does nothing. If I use Fast, the cut is not done but I get the bevels. Damn!

Might depend on the Z position of the cylinder. If edges intersect it can fault the bevel modifier. try inserting a weld modifier between the two others and increase the weld threshold distance

Thanks again. That solved the issue. Now I only have to get a way to smooth the curve. It's not smooth at all. Added a new screenshoot with a shining matcap

Please ask a different question for different issues. Comments are not intended for discussion and should not be continued for longer than necessary.


text:
Precision modeling - how to achieve this simple shape?
I know this is a basic question. I know how to model the shape below but I don't understand how, if I want to do it with precise measurements.
I started with a cube and set the dimensions but then how to do the diagonal face?
Can someone guide me on how to do this?
Thanks.


text:
Texturing - Best approach to apply textures from photos
I'm modeling a piece of furniture that I have in my house, so I have full access to the model. I'm starting with Blender only for a couple of weeks so I started with simple geometric forms.
My question is related with texturing. I really wanted to mimic the look of the furniture that I have so, what is the best way to extract those textures from photos? Or, how to take those photos? Is there any kind of software to help preparing these textures? Or is this approach the wrong one? Should I use generic textures?
It seems these are many questions but I think it's all related.
Thanks in advance!

UPDATE:

Creating textures from photos can be a pretty complex topic. In general you want to have flat lighting with no shading or specular highlights (since that will be added by the render engine depending on the 3d scene). See here and here. It might be easier to just grab something off textures.com.

As mentioned by Greg Zaal taking photos to use in textures can be full time project on it's own, especially if you want to take the time to make them reusable elsewhere in other projects, which frankly is the only situation I would see it being worth the trouble to make new textures from scratch.
As mentioned, textures should have as generic as possible lighting as to avoid visible shadows, lighting gradients and shading artifacts that would ruin tiling, an no reflections at all, since those will be added by the software from the virtual 3D scene at render time.
Besides that if you want them to have any value besides the very specific scope of the current project, reusable wood textures are generally desired to be tileable or repeatable. That means they are edited in image editing software in specific ways so they can be repeated side by side without noticeable seams or borders and avoiding repeating patterns.
So unless for some reason you want a very very realistic, down to specific wood features in the right places, and very true to the original recreation of your furniture (which is a perfectly valid goal, if that is what you want) I would recommend downloading some "off the shelf" generic textures from the internet.
There are plenty good quality tileable textures everywhere, I am sure you can find some that suit your need, with the same wood type or one that is similar enough.
One other desirable alternative you may be interested in, since your goal seems to be learning Blender, is to go the procedural way and try to use computer generated materials and textures which can have a high reuse value.

Thanks for the answers. For the furniture I used a free texture on some site and, for a beginner like me, I'm happy with the results. For the mosaics on the wall, I have the same problem but, in a related question, is there a way to easily correct the difference in brightness between the top and bottom rows and the rest of the mosaics?

I had a technique to do that can't quite remember how it went anymore, it's been a while since I last used it. I think was something like opening photo in an image editing software, duplicating the image as a new layer, inverting it's color, then then changing it's opacity and blending mode. I'm not sure what the blending mode was anymore though, try a few different ones and see which works best.