text:
How to draw a specific color with gpu shader
This is a bulid-in shader of gpu module to display a 2D rectangle in viewport,
if you check the color of the rectangle via photoshop/MSpaint or use gpu.state.active_framebuffer_get().read_color(,  you will see the color is #060000.
The input for the red channel in the script below is 0.005.
However, when I test for values between 0 and 0.005, It never shows the color #050000.
So how can I draw that rectangle with the color #050000?

import bpy
import gpu
from gpu_extras.batch import batch_for_shader

vertices = (
    (100, 100), (300, 100),
    (100, 200), (300, 200))

indices = (
    (0, 1, 2), (2, 1, 3))

shader = gpu.shader.from_builtin('UNIFORM_COLOR')
batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)

def draw():
    shader.uniform_float("color", (0.005, 0.0, 0.0, 1.0))
    batch.draw(shader)

bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

I think you can't because floating-point decimal values generally do not have an exact binary representation so it gets capped. so basically you can't.

@HarryMcKenzie They have an exact binary representation, it just has a limited precision and uses a binary rather than decimal numeric system. Some aliens using a ternary numeric system on their planet (because they have 3 fingers), could be very annoyed human decimal system can't express $1 \over 3$ exactly (they would write it as $0.1$).

Actually you can, see edit below.
As @Harry McKenzie suggested, you can't. Let me make this plausible by some observations. I changed your script a little to produce all grey tones from 0-1 with a step of 0.001.
import bpy
import gpu
from gpu_extras.batch import batch_for_shader

indices = (
    (0, 1, 2), (2, 1, 3))

shader = gpu.shader.from_builtin('UNIFORM_COLOR')
batch = []
for i in range(1000):
    vertices = (
        (10 + i, 100), (10 + i+1, 100),
        (10 + i, 200), (10 + i+1, 200))
    batch.append(batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices))

pixels = []
for i in range(1000):
    pixels.append(None)

def draw():
    for i in range(1000):
        c = i * 0.001
        shader.uniform_float("color", (c,c,c, 1.0))
        batch[i].draw(shader)

        pixels[i] = gpu.state.active_framebuffer_get().read_color(10 + i, 100, 1,1, 4, 0, 'FLOAT')

        # warning: prints a lot
        print("p", i, ":", pixels[i])

bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

Inspecting the prints, you will notice there are "blocks of 4 equal floats":
p 0 : Buffer(FLOAT, [[[0.0, 0.0, 0.0, 1.0]]])
p 1 : Buffer(FLOAT, [[[0.0, 0.0, 0.0, 1.0]]])
p 2 : Buffer(FLOAT, [[[0.003921568859368563, 0.003921568859368563, 0.003921568859368563, 1.0]]])
p 3 : Buffer(FLOAT, [[[0.003921568859368563, 0.003921568859368563, 0.003921568859368563, 1.0]]])
p 4 : Buffer(FLOAT, [[[0.003921568859368563, 0.003921568859368563, 0.003921568859368563, 1.0]]])
p 5 : Buffer(FLOAT, [[[0.003921568859368563, 0.003921568859368563, 0.003921568859368563, 1.0]]])
p 6 : Buffer(FLOAT, [[[0.007843137718737125, 0.007843137718737125, 0.007843137718737125, 1.0]]])
p 7 : Buffer(FLOAT, [[[0.007843137718737125, 0.007843137718737125, 0.007843137718737125, 1.0]]])
p 8 : Buffer(FLOAT, [[[0.007843137718737125, 0.007843137718737125, 0.007843137718737125, 1.0]]])
p 9 : Buffer(FLOAT, [[[0.007843137718737125, 0.007843137718737125, 0.007843137718737125, 1.0]]])
p 10 : Buffer(FLOAT, [[[0.011764707043766975, 0.011764707043766975, 0.011764707043766975, 1.0]]])
p 11 : Buffer(FLOAT, [[[0.011764707043766975, 0.011764707043766975, 0.011764707043766975, 1.0]]])
p 12 : Buffer(FLOAT, [[[0.011764707043766975, 0.011764707043766975, 0.011764707043766975, 1.0]]])
p 13 : Buffer(FLOAT, [[[0.011764707043766975, 0.011764707043766975, 0.011764707043766975, 1.0]]])
...
p 987 : Buffer(FLOAT, [[[0.988235354423523, 0.988235354423523, 0.988235354423523, 1.0]]])
p 988 : Buffer(FLOAT, [[[0.988235354423523, 0.988235354423523, 0.988235354423523, 1.0]]])
p 989 : Buffer(FLOAT, [[[0.988235354423523, 0.988235354423523, 0.988235354423523, 1.0]]])
p 990 : Buffer(FLOAT, [[[0.988235354423523, 0.988235354423523, 0.988235354423523, 1.0]]])
p 991 : Buffer(FLOAT, [[[0.9921569228172302, 0.9921569228172302, 0.9921569228172302, 1.0]]])
p 992 : Buffer(FLOAT, [[[0.9921569228172302, 0.9921569228172302, 0.9921569228172302, 1.0]]])
p 993 : Buffer(FLOAT, [[[0.9921569228172302, 0.9921569228172302, 0.9921569228172302, 1.0]]])
p 994 : Buffer(FLOAT, [[[0.9960784912109375, 0.9960784912109375, 0.9960784912109375, 1.0]]])
p 995 : Buffer(FLOAT, [[[0.9960784912109375, 0.9960784912109375, 0.9960784912109375, 1.0]]])
p 996 : Buffer(FLOAT, [[[0.9960784912109375, 0.9960784912109375, 0.9960784912109375, 1.0]]])
p 997 : Buffer(FLOAT, [[[0.9960784912109375, 0.9960784912109375, 0.9960784912109375, 1.0]]])
p 998 : Buffer(FLOAT, [[[0.9960784912109375, 0.9960784912109375, 0.9960784912109375, 1.0]]])
p 999 : Buffer(FLOAT, [[[1.0, 1.0, 1.0, 1.0]]])

or as an image:

This is because you have to squeeze 1000 values into the R-channel which goes from #00 to #FF and offers place for only 256 values. Thus roughly 4 adjacent float values will fall into one hexadecimal value, because 1000 / 256 = 3.90625. (The two values at the beginning for #00 and the end value for #FF belong symmetrically together, p 1000 would also be 1.0). Thats why sometimes you can see a block of just 3 (missing a 4th) or a 5/3 split instead of 4/4 (e.g. at p 993/994). This is because of rounding errors (for the exact conversion formula one would need to know all data types participating when the color values go back and forth, but i did not look into the engine).
(Edit: choosing 1024 would have made the explanantion easier :))
But now you know for sure that:
{0.000, ... ,0.001} is mapped to 0.0 which is evaluated as #00
{0.002, ... ,0.005} is mapped to 0.003921568859368563 which is evaluated as #06
and so on...
So, no chance for these guys #01, #02, #03, #04, #05 :(
Edit:
I dug deeper and there actually is a way to get all hex values on screen, but not with the approach above so that observation still holds. But the observation only shows that the values get capped, but why?
Simplifying the above script to this:
import bpy
import gpu
from gpu_extras.batch import batch_for_shader

shader = gpu.shader.from_builtin('UNIFORM_COLOR')

batches = []
indices = ((0, 1, 2), (2, 1, 3))
for i in range(256):
    vertices = ((10 + i, 100), (10 + i+1, 100), (10 + i, 200), (10 + i+1, 200))
    batches.append(batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices))

def draw():
    for i in range(256):
        c = i / 255.0  # come on, all hex values plz
        #shader.uniform_bool("srgbTarget", False)
        shader.uniform_float("color", (c,c,c, 1.0))
        batches[i].draw(shader)

bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

and running it gives a linear looking gradient ((127,127,127) in the middle) but with capped values, so there may be a problem within the shader. The shader's implementation is interesting (source):
#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)

void main()
{
  fragColor = blender_srgb_to_framebuffer_space(color); // huh?
}

Looking further one finds the implementation of this function (source):
#ifndef USE_GPU_SHADER_CREATE_INFO
uniform bool srgbTarget = false;
#endif

vec4 blender_srgb_to_framebuffer_space(vec4 in_color)
{
  if (srgbTarget) {
    # this is the very precise version of the common gamma correction
    vec3 c = max(in_color.rgb, vec3(0.0));
    vec3 c1 = c * (1.0 / 12.92);
    vec3 c2 = pow((c + 0.055) * (1.0 / 1.055), vec3(2.4));
    in_color.rgb = mix(c1, c2, step(vec3(0.04045), c));
  }
  return in_color;
}

Note the uniform srgbTarget which is defaulted to false. Setting this uniform explicitly to false with shader.uniform_bool("srgbTarget", False) should not change anything. But surprise, now the gradient is nonlinear ((187,187,187) in the middle)!

This can't be. Turns out srgbTarget for the UNIFORM_COLOR shader is set to true (source), but this means the gamma correction in blender_srgb_to_framebuffer_space takes place before the color value is fed into FragColor. And this means the values must be somehow corrected back after that! There is a newer feature in OpenGL where the driver can gamma correct all framebuffers after fragment shaders have been run and there are traces of that in Blender (source), thus i assume its enabled for the default framebuffer. Thus gamma correcting and reverting this correction seems to be the root cause for the numerical issues.
However, one can do offscreen rendering (source) and hope that the driver's gamma correction is not enabled (i have no idea if this can be set). Starting from there and with the other examples, i created this script:
import bpy
import gpu
import math
import random
from mathutils import Matrix
from gpu_extras.batch import batch_for_shader

# create the 'UNIFORM COLOR' shader ourself

shader_info = gpu.types.GPUShaderCreateInfo()
shader_info.push_constant('MAT4', "viewProjectionMatrix")
shader_info.push_constant('FLOAT', "color")
shader_info.vertex_in(0, 'VEC3', "position")
shader_info.fragment_out(0, 'VEC4', "FragColor")

shader_info.vertex_source(
    "void main()"
    "{"
    "  gl_Position = viewProjectionMatrix * vec4(position, 1.0f);"
    "}"
)

shader_info.fragment_source(
    "void main()"
    "{"
    "  float c = color / 255.0;"
    "  FragColor = vec4(c, c, c, 1.0);"
    "}"
)

shader = gpu.shader.create_from_info(shader_info)
del shader_info

# create the batches to render each column in the image

batches = []
step = 2 / 255.0
for i in range(256):
    k = i * step - 1.0 - step * 0.5
    coords = [
        (k, -1, 0), (k+step, -1, 0), (k+step, 1, 0),
        (k+step, 1, 0), (k, 1, 0), (k, -1, 0)]

    batches.append(batch_for_shader(shader, 'TRIS', {"position": coords}))

# start offscreen rendering

IMAGE_NAME = "all_hex_values"
WIDTH = 256
HEIGHT = 256

offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)

with offscreen.bind():
    fb = gpu.state.active_framebuffer_get()
    fb.clear(color=(0.0, 0.0, 0.0, 0.0))
    with gpu.matrix.push_pop():
        # reset matrices -> use normalized device coordinates [-1, 1]
        shader.uniform_float("viewProjectionMatrix", Matrix.Identity(4))

        for i in range(256):
            shader.uniform_float("color", i)
            batches[i].draw(shader)

    buffer = fb.read_color(0, 0, WIDTH, HEIGHT, 4, 0, 'UBYTE')

offscreen.free()

# copy the render result into an blender image

if IMAGE_NAME not in bpy.data.images:
    bpy.data.images.new(IMAGE_NAME, WIDTH, HEIGHT)

image = bpy.data.images[IMAGE_NAME]
image.scale(WIDTH, HEIGHT)

buffer.dimensions = WIDTH * HEIGHT * 4
image.pixels = [v / 255 for v in buffer]

Save the image and you got all these precious hex values in its full glory:

yes exactly +1 :)

I made some tests and apparently the implementation underneath uses an 8-bit minifloat. Here's a calculator, if you set 4 as both precision and exponent bits, and then test consecutive numbers 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6… You will get 0, 0.001953125, 0.00390625, 0.005859375, 0.0078125, 0.009765625, 0.01171875, suspiciously similar ;)

Apparently it uses 3 precision bits (1 sign, 2 mantissa; if there's no sign, then it's just 2 precision bits) and 4 exponent bits, totaling 7 bits (or 6 without a sign), then it skips every other value listed above.

As user43967 points out in the comment section to his answer, the values listed 0.003921568859368563, 0.007843137718737125, 0.011764707043766975, when multiplied by 255 give 1.000000059138983565, 2.000000118277966875, 3.000000296160578625, so the precision is enough to get those low values. However, it starts failing at 0x9, which gives one too much: 0.0390625 ×255 = 9.9609375 instead of 9. This is because the exponent increases and from now on some colors will be skipped. Understandable: need 8 bits to describe 0..255 range, and above I just figured it's 6/7 bits…

There is a lower bound values of the color (00-FF) except ['0x1', '0x2', '0x3', '0x4', '0x5', '0x7', '0x8', '0xa', '0xe', '0x92', '0x96', '0x99', '0x9b', '0xa1', '0xa3', '0xa5', '0xa8', '0xab', '0xb1', '0xb6', '0xb8', '0xba', '0xbc', '0xbe', '0xc1', '0xc3', '0xe8', '0xf3', '0xfb']
This means that there are 29 color of a channel that cannot be displayed in this shader. (24389 of 16777216)
I'd appreciate it if someone could solve this problem through use the alpha value or a custom shader to display those missing colors.
Hex    Value
0x00 : 0.0
0x01 : -
0x02 : -
0x03 : -
0x04 : -
0x05 : -
0x06 : 0.0015771483886055648
0x07 : -
0x08 : -
0x09 : 0.005520019447430968
0x0a : -
0x0b : 0.009462890680879354
0x0c : 0.013405761215835811
0x0d : 0.017348631285130978
0x0e : -
0x0f : 0.02129150275141001
0x10 : 0.025234374217689037
0x11 : 0.029177243821322918
0x12 : 0.0370629858225584
0x13 : 0.04099433310329915
0x14 : 0.04546292312443257
0x15 : 0.04898468963801861
0x16 : 0.05300186388194561
0x17 : 0.061055721715092666
0x18 : 0.06452127173542978
0x19 : 0.06893400475382805
0x1a : 0.07262223586440086
0x1b : 0.07616695389151573
0x1c : 0.08006047829985619
0x1d : 0.08829088881611825
0x1e : 0.09216826036572458
0x1f : 0.0959075875580311
0x20 : 0.0999157913029194
0x21 : 0.10378383472561838
0x22 : 0.10752426460385324
0x23 : 0.11604240164160728
0x24 : 0.11942188814282419
0x25 : 0.12335999682545663
0x26 : 0.12780576199293137
0x27 : 0.13149937242269516
0x28 : 0.1350933536887169
0x29 : 0.1391696259379387
0x2a : 0.14312943071126938
0x2b : 0.15073328465223312
0x2c : 0.15490704029798508
0x2d : 0.15896772593259811
0x2e : 0.16292332857847214
0x2f : 0.16678082197904587
0x30 : 0.17054661363363266
0x31 : 0.17422639578580856
0x32 : 0.17871292680501938
0x33 : 0.18221714347600937
0x34 : 0.18984784930944443
0x35 : 0.19394680112600327
0x36 : 0.19795342534780502
0x37 : 0.20187317579984665
0x38 : 0.20571088045835495
0x39 : 0.20947109907865524
0x3a : 0.21388676017522812
0x3b : 0.21749045699834824
0x3c : 0.2217286452651024
0x3d : 0.22519230097532272
0x3e : 0.23326962441205978
0x3f : 0.23719196766614914
0x40 : 0.2410418912768364
0x41 : 0.24482300132513046
0x42 : 0.2491515800356865
0x43 : 0.2527943104505539
0x44 : 0.25696931779384613
0x45 : 0.2604866474866867
0x46 : 0.26509262621402746
0x47 : 0.26848720014095306
0x48 : 0.2729371637105942
0x49 : 0.27621997892856603
0x4a : 0.28052739799022675
0x4b : 0.2878845483064652
0x4c : 0.2919911295175553
0x4d : 0.2960308641195297
0x4e : 0.3000065237283707
0x4f : 0.3039207607507706
0x50 : 0.3077761381864548
0x51 : 0.31157501041889196
0x52 : 0.3153195530176163
0x53 : 0.31992693245410925
0x54 : 0.32355655729770666
0x55 : 0.32713808119297033
0x56 : 0.33155001699924475
0x57 : 0.33502940833568573
0x58 : 0.33931849896907806
0x59 : 0.3431235700845719
0x5a : 0.3468784242868424
0x5b : 0.3550512939691544
0x5c : 0.3590535074472428
0x5d : 0.3630023151636124
0x5e : 0.36689950525760656
0x5f : 0.37074701488018036
0x60 : 0.37454645335674286
0x61 : 0.37829931080341345
0x62 : 0.38274364173412323
0x63 : 0.38639952242374426
0x64 : 0.3900134414434433
0x65 : 0.3942967206239701
0x66 : 0.39782290160655975
0x67 : 0.4020042270421982
0x68 : 0.40613268315792084
0x69 : 0.40953396260738373
0x6a : 0.4135699421167374
0x6b : 0.41755788028240204
0x6c : 0.4214992970228195
0x6d : 0.4253955036401749
0x6e : 0.42924802005290985
0x6f : 0.43305812776088715
0x70 : 0.43745122849941254
0x71 : 0.4454674571752548
0x72 : 0.4491072744131088
0x73 : 0.45271067321300507
0x74 : 0.4568699449300766
0x75 : 0.4609823673963547
0x76 : 0.46447114646434784
0x77 : 0.46850042045116425
0x78 : 0.4724867194890976
0x79 : 0.47643129527568817
0x7a : 0.48033522069454193
0x7b : 0.48419974744319916
0x7c : 0.4880258589982987
0x7d : 0.49235282838344574
0x7e : 0.49610008299350744
0x7f : 0.49981193244457245
0x80 : 0.504012018442154
0x81 : 0.5081683099269867
0x82 : 0.511770099401474
0x83 : 0.5153402388095857
0x84 : 0.5193823873996736
0x85 : 0.5233851373195648
0x86 : 0.5273495018482209
0x87 : 0.5312764942646028
0x88 : 0.5351668894290925
0x89 : 0.5390217006206512
0x8a : 0.5428418219089509
0x8b : 0.5470990836620331
0x8c : 0.5513145625591278
0x8d : 0.5550274550914764
0x8e : 0.5587090551853181
0x8f : 0.5623598992824554
0x90 : 0.5668815076351166
0x91 : 0.5704658329486848
0x92 : -
0x93 : 0.5784274041652679
0x94 : 0.5823560655117035
0x95 : 0.586251050233841
0x96 : -
0x97 : 0.5939435064792634
0x98 : 0.5981624424457551
0x99 : -
0x9a : 0.6056618392467499
0x9b : -
0x9c : 0.6138570606708528
0x9d : 0.6179024875164032
0x9e : 0.6219141185283661
0x9f : 0.6250996291637421
0xa0 : 0.6329734027385712
0xa1 : -
0xa2 : 0.6368633806705476
0xa3 : -
0xa4 : 0.6453152596950531
0xa5 : -
0xa6 : 0.652876764535904
0xa7 : 0.6610659658908845
0xa8 : -
0xa9 : 0.6647453010082245
0xaa : 0.6683984696865082
0xab : -
0xac : 0.676345854997635
0xad : 0.6806304156780243
0xae : 0.6883957087993622
0xaf : 0.6918881237506868
0xb0 : 0.6960491836071014
0xb1 : -
0xb2 : 0.7001781165599823
0xb3 : 0.7035949528217317
0xb4 : 0.7076669037342073
0xb5 : 0.7117086350917816
0xb6 : -
0xb7 : 0.719703882932663
0xb8 : -
0xb9 : 0.7275852262973787
0xba : -
0xbb : 0.7353568971157074
0xbc : -
0xbd : 0.7428644001483918
0xbe : -
0xbf : 0.7510570585727693
0xc0 : 0.7547992765903474
0xc1 : -
0xc2 : 0.7628252804279329
0xc3 : -
0xc4 : 0.770742565393448
0xc5 : 0.7743611037731171
0xc6 : 0.7785550057888031
0xc7 : 0.782126396894455
0xc8 : 0.7862661778926849
0xc9 : 0.7903777062892914
0xca : 0.7938797175884247
0xcb : 0.7979399859905243
0xcc : 0.801973432302475
0xcd : 0.8059804737567903
0xce : 0.8099614083766937
0xcf : 0.8133535087108612
0xd0 : 0.8178474605083466
0xd1 : 0.8211969435214997
0xd2 : 0.82563516497612
0xd3 : 0.8294930160045624
0xd4 : 0.8333274424076081
0xd5 : 0.8371388614177704
0xd6 : 0.8409275710582733
0xd7 : 0.8452303111553192
0xd8 : 0.8489717543125154
0xd9 : 0.852691560983658
0xda : 0.8569168746471405
0xdb : 0.8611148893833162
0xdc : 0.8647662699222566
0xdd : 0.868397444486618
0xde : 0.8725230395793915
0xdf : 0.8766230642795564
0xe0 : 0.8806980550289154
0xe1 : 0.884243279695511
0xe2 : 0.8882721960544587
0xe3 : 0.8917779624462128
0xe4 : 0.8957622945308685
0xe5 : 0.8997233808040619
0xe6 : 0.9036616384983064
0xe7 : 0.9075773656368256
0xe8 : -
0xe9 : 0.9114709198474885
0xea : 0.9153425991535188
0xeb : 0.9196726381778718
0xec : 0.9234990179538728
0xed : 0.9277788698673249
0xee : 0.9315613806247712
0xef : 0.9353236258029939
0xf0 : 0.9427888095378876
0xf1 : 0.9474151432514192
0xf2 : 0.9510947763919831
0xf3 : -
0xf4 : 0.9547555744647981
0xf5 : 0.9588519632816316
0xf6 : 0.9629253447055818
0xf7 : 0.9665270149707795
0xf8 : 0.9705578386783601
0xf9 : 0.9745666086673738
0xfa : 0.9825190603733064
0xfb : -
0xfc : 0.9860263168811799
0xfd : 0.9903871715068817
0xfe : 0.9938577711582185
0xff : 0.9981732666492463

In fact, I used 0.000000...001 step to test more than trillion of values, and that table is the result, there is no way to display some colors in that shader :(

@X Y, i updated my answer, hope it helps!

Thank you, this helps a lot!

Although you can't get 0.001 steps, the steps should be 1/255 = 0.0039...  Try 1/255*5=0.0196..., or just use 5.0/255.0 to get 5 in the red channel.
This provides a simple test.  Replace pixels in bpy image with X/255.0, then you can just hover over the images and see the RGB values, which are all int8 and not float.
show_image(bpy_image):
    pixels = np.multiply(bpy_image.pixels, 255)
    array = np.array(pixels, dtype=np.uint8)
    array = np.reshape(array, (bpy_image.size[1], bpy_image.size[0], 4))
    print(np.shape(array))
    img = Image.fromarray(array)
    imgplot = plt.imshow(img)
    plt.show()

Unfortunately this is not true, as stated by both OP and taiyo

That isn't what Taiyo showed.  He actually showed that 0.001 was smaller than one step.  As expected, you see 0 for the first 2 steps.  Then you see: 1 (0.0039...) for the next 4 steps, 2 for the next 4 steps (0.0078...) and so on.  If he is using the shader and it continues to work that way, you should see the value for 5 (0.0195...) in some of the other steps.  If the values are really skipped like X Y indicates, that is a different issue.  Based on Taiyo's test, all 256 values should be possible.

You're correct, I was so focused on very low precision that I missed the first value 0.003921568859368563 multiplied by 255 gives 1.000000059138983565. However it still doesn't solve the question, and setting the value to 1/255 (1/256 would be incorrect) doesn't allow to set the color to 0x01…

Little but important typo: it should be 0.0039... not 0.039...

255 is actually correct -- see https://docs.blender.org/api/current/mathutils.html#mathutils.Color

@user43967 turns out it is a different issue and the values are possible. I edited my answer.


text:
How to reload a blf font id when user changes theme?

Suppose you draw some text in viewport via draw_handler_add

import bpy, blf

font_path = 'D:\\some.ttf'      # <-- choose your font here
font_id = blf.load(font_path)

def draw_callback_px():
    blf.position(font_id, 20, 20, 0)
    blf.size(font_id, 50.0)
    blf.draw(font_id, "BLF")

bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, (), 'WINDOW', 'POST_PIXEL')

When the user changes the theme in the UI, the text disappears (unexpected results) until the font ID is reloaded.

So, How to catch the theme changes and then reload the font id?
import bpy, blf

font_path = 'D:\\some.ttf'      # <-- choose your font here
font_id = blf.load(font_path)

def draw_callback_px():
    blf.position(font_id, 20, 20, 0)
    blf.size(font_id, 50.0)
    blf.draw(font_id, "BLF")

def when_theme_changed():    # <------- Need to run when theme changes
    print('Theme change detected')
    global font_id
    font_id = blf.load(font_path)

bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, (), 'WINDOW', 'POST_PIXEL')

source: Stack Exchange

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

sort: votes


text:
Angle issue in Point Rotate node. [Blender 2.93.0]
I am trying to generate a circle from points turned towards the center and for some reason magic (or a bug) happens.
As you can see, for four elements the angle is 90 degrees, but in radians, incorrect values and incorrect rotation of objects are obtained.
But if you set 90 degrees with your hands for example, then everything works (for one iteration).

Differences in radians.

Does anyone know what the problem might be?

Haven't dabbled much in geometry nodes. In almost all cases in blender,  the "raw" angle value is in radians. Looking at image it appears you are getting an angle circa >>> math.degrees(90) / 360 which is
14.323944878270579 degrees.  Try setting the step in radians $pi / 2$  (An angle in UI is displayed as degrees, if degrees is the default rotation unit in scene units settings.)
`

When you set an angle in degrees in the Point Rotate node, it is automatically converted to radians under the hood.
All angle operations are done in radians because that's how trigonometry is defined. You can assume that if it's not expliciltly noted that you are working with degrees (°), you should write angles in radians.
You set the attribute to 90, thinking the unit was degrees, but it isn't. 90 radians is the same as 2.035 radians. In a python console, type :
from math import pi
print(90 % (2 * pi)) # 90 modulo 2 pi -> Constrain angle to [0..2pi[

The output :
2.0354056994857928

What you should write then, instead of 90, is pi / 2.
You can alternatively set a Math node or an Attribute Math node to convert from radians to degrees and vice versa :

Indeed, the Point Rotate of a node from other nodes takes a value in radians. But this is not indicated.
I fixed the problem on your recommendation by converting degrees to radians.

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


text:
Keyframing Clip Threshold does not update on viewport
I'm using Eevee and I'm controlling a shader through the alpha clip threshold under Settings in the Material Properties tab. If I right click on the "clip threshold" slider I can keyframe it, but while the value changes if I scroll through the frames, it still won't update in the viewport.
I noticed that the clip threshold slider doesn't have the "animate property" diamond on the right. But still, if I keyframe it, the value will be animated, just not rendered.
Any ideas? Maybe a bug?
Blender version is 2.90.1

2.93 is out, so maybe they fixed that, but it does sound like a bug.

It seems that when I render the animation, the clip threshold is actually working, even though it won't show in the viewport when playing the animation through the timeline.
I guess the solution is to just rely on the final rendered animation, instead of the viewport.


text:
Fail to draw on current keyframe
Basically,
When drawing with onion skin activated.
Normally after you paint your drawing it should stay where you put it.
But the problem I'm having is the drawing turned green (which is the onion skin of the previous frame)

It seems it was drawn in the last frame.
And this had bothered me for days.
The frame rates was 25 in defult, had changed it to 24 before I start to do the animations, not sure if thats the problem.
Thanks for the time and the answers.
Hope I've written my questions clear, English is hard...

Don't worry, your English is perfect. As I don't think I've seen this problem before, would you be willing to upload your Blend file to let us investigate it for a solution? You can use this website. https://blend-exchange.giantcowfilms.com/

Hi! thanks for the comment!
I've uploaded the file.
My goal is to make the birds flap their wings in the layer named "floating"

Oh sorry forgot to mention you need to give me the link to the blend file you uploaded. You can make a new comment, or edit your original question.

Here you go!
https://blend-exchange.com/b/0raxERdr

This was tricky to work out but basically it's because you have a frame offset modifier with a Frame offset set to 1. So at any time, the frame you see is actually one frame ahead of the frame you're actually on.
That makes any new drawing go back by one frame as soon as you finish drawing, immediatly turning to the onion-skin greeenish colour.
Your problem will disappear if you either disable the modifier or set its Frame offset to 0.

I've tried the method and it does fix the problem!
Thanks for the help!


text:
How to apply transformation constraint on objects having different orientation?
I want to rotate wheel having its own custom orientation. When I apply transformation constraint, that wheel rotates according to global orientation but I want it in custom. Can anyone help? Thanks

I suspect you're misunderstanding what the object's local axes are-- they are not the directions that the object moves when you translate it in local orientation!  I recommend parenting to bones with bone constraints instead of direct object constraints, as the local axes are more obvious with bones, and armature/bones provide additional benefits.

I have given constraints using empy cube. I have uploded video of my problem on drive. This is the link https://drive.google.com/file/d/16N2vbWU1983sR_FXfIYg8XoHBjazcW0h/view?usp=sharing


text:
When I try to render an animation in cycles my character shows up as completely black
Everything else in the animation shows up as completely fine except for my character. I'm very inexperienced (this is my first animation) so the fix might be something painfully obvious.

The texture for the arms and legs is also glitched in the viewport model but even while they were glitched they rendered correctly in earlier wip renders.

I am using blender 2.9

Hello and welcome. Are you rendering with workbench like in the second image ? or are you using a different render engine for your final render?

The error occurs when i render in cycles sorry for the confusion. @Emir

@Emir sorry for the confusion I had only switched to workbench for a second while i was trying to figure out the problem, I adjusted the lighting in cycles. I think that the issue has something to to with the material itself. I'm sorry I'm not articulating my issue very well. If you would like I can send you the .blend file.

Before you do your final render in cycles, make sure to adjuste the lights in the viewport using Cycles Engine, so could have the same result in the final render. Workbech in viewport it's going to look different from cycles


text:
How can I achieve sequin glitter material like shining disco ball?
How can I achieve material like the one in the castle? It looks like glitters, Sequin, led dots. I don't know to be exact.
Also, I want to make subtle animation on it like random shine over time

Welcome. Please use a title that matches the content of the question. It should be descriptive but succinct, unique and identifying, summarizing the issue in such way that anyone searching for a similar problem may easily find it. Use the [edit] link above, remove anything superfluous, avoid words like "this","issue with" or "question about". Remember, your title is the first thing potential visitors will see, answers you get depend heavily on how inviting it is. See "What is the problem of asking “How do I do this?""

hello are you talking about the mirror balls or about the spots with their beams?

The material on the castle

Please don't post essential information like links, file downloads or additional details in the comments section where it can be easily missed. Instead edit them into your original post with the [Edit] button above. Comments are transitory by nature, are hard to index or search for, and may be erased at any moment.

Try something like this - if you are using EEVEE, remember to change the Blend Mode to Alpha Blend (Right side). Backface culling and/or Show Backface are optional - I showed an example with backface cullling  off and on - it may require a bit of tweaking of the colorramp with it off, because there are double the amount of "flakes". Also, if using eevee, don't forget to enable "Bloom" to get the glow effect. If you are using Cycles, you will have to add the glow afterwards in the compositior with a Glare Node.
Show Backface off

Show Backface on

If you want to animate it, there are 2 ways I can think of. First, if you want the "glitter " itself to move, you can use the setup below, either using the mapping node to move the glitter "downwards", or by using a 4D Voronoi texture and animating the W, or both. Either way, the movement is driven by a Value node, with #frame written in the value box (to make the value equal to the current frame at all times).

The second way, is to change the brightness of each piece of glitter, by "dragging" a noise texture across it, making random areas brighter and dimmer as it passes. Value node works the same way as the above example.

Thank you very much

how to keep the transparency in cycles ?


text:
How Do I Switch Back To Sculpt Mode?
I'm New To Blender, I selected something that brought me to Object Mode.
I went ahead and tried to switch back to sculpt mode, but it doesn't have any options for me except Object Mode.
How can I fix this? I haven't been able to work on my project due to his issue.

Hello and welcome, the orange lines around the model means that you are probably selecting more than one object and one of those could be not compatible with sculpt mode (like a Camera), make sure to select your object only and it has to be highlighted in Yellow

make sure to select only "mesh objects" to be precise.


text:
How to achieve the same function like 3dsmax?
UVVMapping→ Box→ Length/Width/Height, not Scale/Size.

Thanks

https://blender.stackexchange.com/questions/100373/texture-to-scale-on-object/100400#100400

Also, please use descriptive titles

sorry, my English is very bad.

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


text:
origin point touching with object in mirror modifier
I'm trying to make a sword, but when I use the Mirror modifier, the mesh overlaps with the origin point, creating a strange artifact. I tried changing the origin, but it’s not working

hello could you please share your file?

https://we.tl/t-axCXkIspKC @moonboots

it's because of the Bevel modifier, not sure why it does that, maybe first apply the Scale and choose Geometry > Miter Outer > Sharp?

its because of bad topology, thanks @moonboots


text:
Default hair strands = weird, flipped normals?

I add a plane
I add Emitter
I set it to "Hair"
I reduce amount to 10 and increase Diameter Root to 10, so you can clearly see it.

Then I get this ?! The individual strands are rendered as if they had flipped normals? But sometimes they don't even look round, but rather flat at the base?
Is this the expected behavior, and if yes, why ?
I just want "hair", and I thought that's what this was for ?
I'm completely confused, no option in the hair emitter seems to fix this.
The documentation has zero information, if I search for this, I just get people with flipped normals and hair growing in the wrong direction.
I was expecting simple tapering tubes.
I'd be super thankful for any explanations. Thanks in advance.

No, this is not an actual 3D shape. Blender has 2 types of curves, that you can use for hair:

Rounded Ribbons
Render curves as flat ribbon with rounded normals, for fast rendering. Shape is always faced forward to camera like a billboard setting
3D Curves
Render curves as circular 3D geometry, for accurate results when viewing curves close up. Curves are automatically subdivided until the curve is smooth.
So if you don't change default settings, it is Rounded Ribbons. This shape looks Blended in Cycles, because of lack of accuracy, which saves a lot of time in rendering millions of strands, but looks weird in close up.
For close up, use 3D Curves setting, which creates actual geometry.
Blender manual


text:
how do I make this head fit on the bone without deforming
so I need the head on the right to be placed on spine.006 but when I try to place it the head goes all wonky im trying to use the custom object thing under veiwport display.
bone before head is selected as custum object

head after

Suggestion.  Delete all armature modifiers from your [head objects] to give you a fresh start with your previous attempts [deleted].  Create a small head with rotation, scale, location [applied].  The head will likely need to be only as large as a single bone .. or use the armature modifier with the mode of [single bone].  The skull bone may need, in beginner actions, to be affected to be affected by only one bone.  You can try other options later.  You can search some of the concepts mentioned here at BSE.  Be ready to delete previous armature modifiers that fail .. and reapply new modifers.

I see your images and some effort to convey the problem.  The question is still only 50% clear to me.    One image shows 2 sphere and the next shows 3 spheres.  You may also help yourself by showing all modifiers and constraints on the sphere which has a behaviour that you does not meet your expectations.  Again ... since a sphere is quick to create .. I would delete some previous work and try fresh work and new application of an armature modifier.  When using Blender for the first few times (< 38) it is difficult to see common  mistakes.

The video website that has a name that rhymes with noonoob has many tutorials on using an armature ..  consider searching blender armature modifier tutorial.

so the sphere on the left is just a uv sphere I added to see if it would have the same effect. it didn't. the sphere on the right is a sculpted face that I made and the third sphere  one the 2nd image is what the bone looks like when I make the custum shape the face


text:
How to detect keyboard input in languages other than English in Operator modal via Python
When the user uses keyboard languages such as Chinese and Japanese, how to catch the text input in operator modal?
import bpy

class ModalOperator(bpy.types.Operator):
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    def invoke(self, context, event):
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):
        if event.type == 'ESC': return {'CANCELLED'}

        print(event.ascii, event.unicode)

        return {'RUNNING_MODAL'}

def register():
    bpy.utils.register_class(ModalOperator)

def unregister():
    bpy.utils.unregister_class(ModalOperator)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.modal_operator('INVOKE_DEFAULT')

Blender's Python API may not provide direct access to IME input events


text:
Python access Bevel Custom Profile handles
We can access the profile points via
obj.modifiers["Bevel"].custom_profile.points[1].location
But how to get the handles location at that point?

It is not possible.

You have to interpolate points[1] and points[2] to get the handle location.

@Karan i don't think interpolation will work with the Free Handle type because you can't even access the values of the handles. You only have the point locations, which is not enough information for interpolation.


text:
How to get Named Attributes in Geometry Nodes Modifier in Python
How to get Named Attributes used in Geometry Nodes Modifier via API?
I want to get a list represented by strings

def get_attrs_list(md):
    if not md.node_group: return None
    return [..]

# >>>> [("Read", "position"), ("Read", "sharp_face")]

I don't know if there's a dedicated api feature for that, but iterating over "Store Named Attribute" for writes and "Named Attribute" for reads seems to be a reasonable option. Though I think you would have to do it recursively so would also involve custom groups...

That kind of stuff is gonna be inherently folded into the Object/ObjectData API, since the attributes are tied to the object itself. If you want to get those values it's fairly straightforward. I'm not sure if the node group itself has access to that data aside from what Markus just described.

@MarkusvonBroady Jakemoyo Hi guys could anyone of you be so kind and add an answer for this? I will upvote it :)


text:
Determine if an Object is infront of the Camera or Behind it?
Is there a way in Blender (3.6.5, preferably Geo Nodes, but I'm okay with drivers or scripts as well) to figure out whether an object is behind the camera (so as to stop doing geo nodes animations and other processing on it).
I only want to process/simulate objects while they're in front of the camera.
What would be the simplest solution to this?

I think you're looking for frustum culling, there are tutorials

also you can search for "camera culling"


text:
Geometry Nodes: Fonts with Overlapping Shapes Problem
Fonts with overlapping shapes are broken, the intersection becomes a hole, how can I fill these?

Maybe helpful: https://blender.stackexchange.com/questions/288548/how-to-boolean-union-closed-2d-curves-within-same-bezier-object-with-geometry-no/288610#288610

It would be nice if you attached the font… https://i.imgur.com/9GvNEHw.png

If these are Google variable fonts, Blender is not handling those, inside or outside Geometry Nodes, as far as I can see. They can be converted to paths in Inkscape, and exported as .svg.. but I guess that might not be much help

Maybe Google would be interested in the fact their clever optimization is failing in some software. Maybe they're already aware, maybe not.

@MarkusvonBroady I fixed the fonts afterwards using FontForge to "remove overlaps", but Blender can easily do the remove overlap itself optionally. I was wondering if someone was aware this is a bug and if they're working to fix it or should it be reported.


text:
Geometry node - How to compare differente values in a field
I make a simple exemple for me problem.

I have a GN object with limited integrer random value for Z position (or anything) , I want compare this values for delete the instance with the same value. I suppose that the best way is to transform  array to enter in the "selection" socket of "instance points" node.
In JS, I Think something like this
const GeometryNodeToto.valueZ = [5, 1, 1, 5, 4];

for (let i = 0; i <GeometryNodeToto.valueZ.length; i++)
{
    valueI = GeometryNodeToto.valueZ[i];
    valueJ = GeometryNodeToto.valueZ[j];

    for (j = 0; j <GeometryNodeToto.valueZ.length; j++)
        {if (valueI  ==  valueJ)
            {
                GeometryNodeToto.valueZ[j] = false;
            }

        }
  }

Is it possible in GN ???
Thanks for your help. ^^

You can use Accumulate Field's Group Index to see that the Group Index is already in use:

Thanks a lot. The node "accumulate field" is exactly the solution to my problem.


text:
Surface fall off while sculpting?
Recent Blender switcher here so please forgive my ignorance.
I'm trying out Blenders sculpting features. ( Very nice) But I can't seem to figure out how to do surface fall off on the brushes. eg. I have a head model and the mouth is closed, I want to use the elastic brush to seperate the lips. But the fall off means every time I try move the top lip the bottom lip moves too. In other software ( XSI and Maya) I could chose surface as the fall off method to get around this issue.
Is there a similar setting in blender that I'm missing?
Many thanks

If I understand correcly what you want, you could use Face Sets or the Mask brush (shortcut M, AltM to remove) to preserve an area:

That's what Ive resorted to doing. Is there a way to save a mask that you use often? Or even a way to convert a face set into a mask?

You can create a vertex group, select its vertices, then Face Sets > Face Set from Edit Mode Selection. Maybe there's another way...

Ok, I found it! (sort of)
If you check the topology option on the Advanced tab > Auto-mask of the brush it does what I'm looking for. Sadly it only seems to work on the grab brush.

Oh ok so it only affects the connected faces I guess


text:
Reselect objects from list that I stored in avariable
I'm very new to scripting in Blender.
How do I reselect a list of objects that I have previously stored in a variable?
import bpy

# Create a variable that stores the currently selected objects
sel_Objs = bpy.context.selected_objects

# Now deselect everything
bpy.ops.object.select_all(action='DESELECT')

# Now select an object called 'Cone'
bpy.data.objects['Cone'].select_set(True)

How would I now reselect the objects stored in the sel_Objs variable? Many thanks

for obj in sel_Objs: obj.select_set(True)

Perfect!
Thanks

You should store the obj.name instead bpy.types.Object,   because it can't access them after you do a undo. You also need check the object.name is it exist.


text:
Store the currently selected bones in a variable using python
I have an Armature ("Armature1") with a few bones in it ("Bone","Bone.001","Bone.002", "Bone.003"). I'm in pose mode and I have selected two bones. ("Bone.001", "Bone.002")
How do I create a variable that contains the two currently selected bones? (using python) So that I can reselect those bones again later in my script?
Hope this makes sense.

Store the names of the bones somewhere:
"""
    Save
"""
import bpy
from bpy import context as C

bone_names = [b.name for b in C.selected_pose_bones]
bpy.types.Armature.saved_pose_selection = bone_names

And then you can load the data from there:
"""
    Load
"""
import bpy
from bpy import context as C

for previously_selected in C.selected_pose_bones[:]:
    previously_selected.bone.select = False

for name in bpy.types.Armature.saved_pose_selection:
    C.object.pose.bones[name].bone.select = True

Apologies for the very late reply. I was out of office and away from my computer last week.
@Markus- Thanks so much for this reply!


text:
Parent an object without inverse but keep transforms
I'd like my child object to inherit the space of it's parent. By that I mean that when zeroed out the child object moves and rotates to it's parent's position and rotation. But I don't want the object that is becoming the child to move it's new parent's position and rotation when I create the parent child relationship.
Is this possible?

If you select the child first, then the parent and hit CTRL+P in the 3d view, there are a few options. Non of them helps?

The Object(Without Inverse) is the option that results in the behaviour I want. But Blender zeroes out the child's transforms. I want it to stay where it is.


text:
scale an object based on it's velocity
is it possible to drive an objects scale based on how fast it's moving? I'd settle for scaling the points of the object through something like geo nodes? I had a quick look in geo nodes but, the solution didn't jump out at me so I thought I'd ask if this is possible in Blender before investing too much time to this.
Many thanks

Not experienced enough with it to post an answer, but I think it should be possible with the new (very alpha) Simulation branch. You could capture and store the Self Object's position info and compare it to the previous frame's data, then use that to scale. For a beginner-level demonstration of it: https://youtu.be/9AROoKXxpS0?t=338

What's your setup, how do you define the movement from which you want to get the velocity? Do you animate the object using keyframes, or a driver, or physics...? Please read this post for an advice how to write a good question: https://blender.meta.stackexchange.com/questions/2620/could-we-brush-up-the-help-center-please

The object in question is inheriting it's animation from it's parent, which is in turn driven by a follow path constraint. Although I would like a system that works with motion drive by key frame animation. As thatt happens in some shots


text:
Use an object as the up target on a track to constraint
Is it possible to use another object as the up axis on a track to constraint?
By default I only seem to be able to use the world X, Y or Z axis.
At the moment I'm using a single bone IK constrain and setting up a pole vector.
Is there a way to do this with normal object constraints?

I hope I understood your question right. A "Locked Track" constraint can achieve this:
The order of these constraints matter, if these two are switched it'll go wonky.

Not really. I have a object that I want to point at another object. Theres no need to move the contrained object I just want to drive it's rotation. A track to constraint is perfect for this but doesn't seem to allow you to use a third object as an up vector


text:
Turn off light bouncing for one view layer only
I'd like one of my passes ( view layers) to have the Total set to 0 in the Light paths>Max Bounces of the Render properties. (cycles renderer)
How can I over ride this setting for just one view layer?
Many thanks.

New Scene > Linked Copy ... like that you can control bounces independently and mix View Layers in Compositor (that you would have to anyway) ... or probably better if you can illustrate by image (mockup) with desired result ...  reason for such thing.

Unfortunately I can't share any production images for confidentiality reasons. Basicly we've been tasked with animating some "Cartoony" (hand drawn) looking characters into a live action plate. The idea is to develope a toon shaded version of the characters, (Complete with toony textures) to render in one view layer, and more realistic material version ( complete with sub surface and bounced light to match the plate) in another view layer and fine tune the "toonyness" of the final result by combining the two in comp.

Nobody is asking you to share confidential data ... to illustrate your situation you can find reference on internet or create some mockup by you. Simple ball (as character) visualised or structured in desired result could be enough with some description. My comment is answering given question, but maybe can be handled by another way ... like by shader, but it depends how you want to get toon effect and how comp is done ... for that your file and reference of result is the fastest way to help you. Please take a few minutes to extend your Q to avoid our guessing. Thanks

You've already answered the question. The linked scene allows me to switch off the bounce and acts like the over ride I need. thanks

If this solution fits to you than OK :) Good luck with your project.


text:
Deleted objects appear when Appending model
I've been having this strange issue since I started using Blender, and I cannot find any information about it anywhere online.
The issue is, whenever I append a model into another file, it Appends objects that were deleted in the original file, such as the base shapes used for custom bone shapes. And for some of my models, even random armatures that never existed in the base file.
It's not a huge issue, but it's getting annoying having to delete a bunch of random shapes every time I want to Append a model into another scene.

open the original file and do a File -> Clean Up to remove unused data blocks.

I've just had this problem and I had to change my Outliner view mode to Blender File then there were grayed out objects I had previously removed, but still appended whenever I brought the file into somewhere else.
Just delete those and voila. Though, important to note within this menu are also grayed out objects that are hidden, so remember to use Alt + H to unhide, Backslash to de-isolate an object/group.


text:
How would I model these grooves / holes in this handle
I am trying to model a gun grip and I am almost finished with it except theres 1 part and I am not sure on how I would be able to do it
Here is my handle

And this is what I am trying to add

This is what the topology looks like before the subdivision

Can anybody assist me with this?

This could be accomplished as part of the texture

+1 to @AllenSimpson, although it's not unheard of to model this into the HP mesh to get that texture onto the lp. Can you share your .blend file?

I'm with @Allen on this. If you want real geometry instead, you'll have to get more polygons to work with and apply the subdivision modifier first :)


text:
Shift-Alt Not Working when selecting a face, edge, or vertice loop in Blender 3.3
I recently downloaded Blender 3.3. I am having difficulty in selecting a loop of faces, edges, or vertices on an object. In previous versions of Blender, I was able to accomplish this task by selecting a face, holding Shift-Alt and an adjacent face in the direction of the loop of faces I am wanting to select, and then those faces would be highlighted. I am unable to do this using Shift-Alt in Blender 3.3. I found somewhere on the web that if you double tap on the adjacent face,you can select a loop of faces that way. Well, this works to an extent, but most of the time this method ends up selecting the wrong loop.
Is anyone else experiencing this issue and is there a solution? Perhaps a preferrence that I need to select or unselect? Any and all suggestion regarding this matter are greatly appreciated. Thanks

Unless you're selecting multiple loops I've never needed to use the Shift key with Alt to select a loop. For a face loop, just go into Face mode and Alt-click on an edge between two of the faces on the loop. Similarly for loops of edges or verts just Alt-click on one of the edges on the loop that you want selected. If you want to add a loop to others already selected, hold down the Shift key and then Alt-click to add a loop as above.

John Eason, thanks. I will give that a try.


text:
Animating the vertex paint shade of a model to another vertex paint shade
I am trying to basically transition a base model male bust (from shoulders up) I scuplted in Blender into a Hulk like bust (much larger and gruesome looking). I was successful in doing so using Shape Keys. Now I am trying to figure out if there is a way gor me to key frame or somehow animate the color change from basic human skin tones to a greenish Hulk type color. I painted the base moxel using vertex paint and have searched the little key framing icons while in the Shader Editor and am unable to find any. Does anyone know of a way to transition between the two shaders so that the transition is animated along with the Shape key transition or animation?

You can Mix Shader and add keyframe to the factor with "i". Or Mix two colors and also "i" to keyframe factor. Did you try that or do you need help on that ?


text:
Exporting fbx breaks rig

The rig breaks when exporting to fbx and reimporting in any app. the first pick is before and the second is after

my quick question is, did you apply rotation to your objects before exporting?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.


text:
Moving Bones in X-Mirror Mode not working (Bones jump to other side)
As can be seen in the pictures below, I created a simple Blender rig and moved the bones using X-Mirror mode (Top right). It worked fine until I reopened the project today. As soon as I move a bone, the other one immediately snaps over.
Pls help :)

Ok apparently I had to turn armature + model by 90 degrees and apply rotation in object mode..


text:
How to scale an object so that all it's faces are moved 2 centimeters towards the median from their original position?
I have modelled the outside of an airplane's fuselage in Blender, and now I want to model the inside and doors. For that, I need to make the fuselage skin a 2 centimeter's wide "wall". Below is a screenshot of that "skin":

Now, I need to move each face inwards along it's normal by 2 cm and scale it at the same time so that all faces still fit together.
I've tried various things:

Simple scale
Push - Pull
Shrink - Fatten
all with more or less the same result - in some places the outer and inner faces were spaced 10 cm and in others only millimeters.

I could of course move all the vertices by hand, then connect them - but that would take ages. Isn't there a simpler method ? Basically I need to implode the skin by 2 cm.

Shrink/Fatten should work but you need to apply the scale before

@moonboots ah, will try that !

@moonboots wow … This worked, thank you sooooooo much ! If you make it an answer, I'll be happy to accept and upvote it ! ;)

Apply the scale of your object (CtrlA) before you do the Shrink/Fatten.


text:
How to apply all edits to two meshes, but mirrored along an axis?
I am modelling an airplane. I need to e.g. rotate some faces of both wings (they are separate meshes that are exactly symmetrical along the X axis) around their local center. I tried to simply select faces of both wings and rotating them, but that way they both were rotated clockwise, whereas the faces of the left wing should be rotated counter-clockwise and the faces of the right wing should be rotated clockwise. I think of a functionality similar to the Mirror modifier, but live, and acting on an already existing vertices instead of creating new ones. Is this possible ? Of course it should also work for other transformations, and for vertex / edge/ face deletions (or creations)

if you don't want the Mirror modifier, there's a XYZ symmetry option on the top right, but it acts like the Mirror modifier. How what you ask is different from the Mirror modifier btw? Also, you can symmetrize your mesh whenever you want (Mesh > Symmetrize and check the Operator box on the bottom left of your 3D view), if you've lost the symmetry between left and right it's a way to get it back

1. Why don't use Mirror modifier?
Mirror has an option "Mirror object". You can set here a central part of your plane or add an empty:

2. Linking object.
If you want to keep left a right wing separate, maybe it is a good option.
Copy one part of the ring with linking (Alt+D) then mirror it using Ctrl + M
Two objects will be separated, but geometry will be shared, and all changes will appear on both sides.

Note, that you can make links by Ctrl + L -> Object Data also and remove links by Object ⇾ Relationships → Make Single User ⇾ Object & Data
3 Symmetrize whole wing.
If you have lots of objects, and you want to mirror them all at once, it is your option. Make a new collection from one wing, when add an instance of it to the scene and mirror it:

Now not only geometry, but objects itself mirrored.
If in the future you will need to break apart this mirrored part, simply press  Ctrl + A - make duplicates real

Thank you - solutions 2 and 3 are just what I needed !


text:
How to cut a quadratic hole into a face of a mesh?
I am modelling a house in Blender and want to inset the windows. To do that, I thought I would cut out a quadratic hole from the middle of the plane, then extrude the new vertices and create a face from the extruded vertices. I have tried several methods to cut out that hole - using the Knife tool, using a Boolean modifier on the House with a Cube as target, etc. - but all either did nothing, or created two edges between some vertices of the hole and some vertices of the face, like this:

I want to get the above, but without the edges and vertices surrounded in red - I waant to keep only the four vertices (and connecting edges) circled in white. Can this be done ? Please help quickly.

you can't create a hole without edges connecting the edges of the hole to the outer edges

This is a duplicate question, but it’s almost not worth looking up. It’s the hidden basics of 3-D that you cannot cut a hole in a face. In fact, even blender 3-D engine is faking a bit, since it allows you to create faces with more than three vertices. In reality, all this gets triangulated before being rendered. But Blender does not fake where sketchup does: sketchup allows faces to have virtual holes in them with no (visible) connecting edges, but blender stays true to the glue and does not.
What I think you should do here is create an edge going between where the two gutters of this house would be. Although this may not be necessary for your texture, it would make geometric sense, and would satisfy the no holes condition. Note that if you just select the two vertices and create an edge, you will have to select all and “weld edges into faces” for it to actually split the face.


text:
My texture won't show up on the object
I am designing a simple tent in Blender. I created a prism from a cube. Then, I added a material and a texture, and UV-unwrapped the prism. But the texture won't show up on the prism. I made double sure I had enabled material / texture mode in the view mode - that didn't help. Here is the blend file with the texture included - I really tried everything I could find in the internet to make that texture show up, but without succes … You are my last hope … Apologies if I missed something obvious.

You need to tell the shader what texture to put on the cube.  Add a Texture Coordinate node and an Image Texture node to your shader:


text:
How to rotate many objects around their individual origins?
I have got about 500 planes in my scene that were generated by an addon. But the addon generates them in a horizontal orientation, whereas I need them in a vertical orientation. One object, or two, I would just rotate one by one. But, doing  that for 500+ planes takes forever. How can I rotate them all at once ?
I tried selecting all shapes and then setting Pivot Point to Individual Origins, as suggested in this question, but that didn't help - still, all planes were rotated around the world origin.

maybe your pivot point of your objects is at the world origin? so before rotation select  all and use object -> Origin to geometry. if this doesn't help, please provide blend file

It may be, as @Chris suggests, that these are separate objects, and all of their origins are at World 0. In that case, their 'Individual Origins' are all at the same place, if you rotate in Object Mode.
However, in Edit Mode, 'Individuals' are islands of geometry, and their origins are at their centers.. so  Edit Mode, with all selected,  might do it for you.


text:
Symmetrize Armature does not Mirror bones correctly
As stated in the heading, the armature symmetrize feature does not work properly. Although it does create missing bones, it does not position / mirror them correctly. (See Images)
-> Origin is set to Cursor, Cursor to World Center
-> Model is mirrored / built alongside the X-Axis
Thank you guys in advance for your help <3

First thing, apply the rotation of your armature in Object mode

Already did that :)

The symmetry operation will use the origin as the center, your origin is not correctly placed, move it (for example put the 3D cursor at the center of your mesh, then set the origin to 3D cursor):

Applying the armature's location in object mode will to the trick since the armature seem to have its base at the world center anyway.

it will move the right legs, so I'm not sure that it's what he wants, but yes you can apply the location, then move the legs back to their current position

Oh yeah it worked! Thanks a bunch mate!


text:
Cylinder follow end of animation path
Hi I am trying to create an animated logo were the border starts from the top centre and draws around the perimeter and nearly meets at the bottom.
I have this working ok.
Next I have added a small cylinder and added an emission shader, trying to give a glow effect at the point the border is increasing.
My cylinder follows the path although not from the top middle were the animated border starts from.  How do I get the cylinder to start at the same point the border animation starts from?

When I started this answer, I thought: 'Instance objects on the ends of trimmed curves in Geometry Nodes, and it will save work'. Only one place to key-frame (The 'End' parameter) .. nothing to sync up.. all procedural..

.. but by the time all the tweaking is over, I'm not sure it saves time, for a one-off. Anyway.. here it is:

The group should be adaptable to your purposes, by modifying your 2-spline curve with it, replacing the 'Ball' object with your cylinder, and using your own materials.

You must have clicked on the Animate Path button of the Follow Path constraint of your small cylinder, which generates a modifier that moves the object along the curve. First thing, delete it in the Graph Editor:

Instead use the Evaluation Time value of the curve to move your cylinder, at frame 1 create a keyframe so that the cylinder is at the top center position (Evaluation Time should be around 48):

At the end of the animation create a second keyframe with the value of the Evaluation Time at 0:

You'll need to create some intermediate keyframes so that the cylinder moves as fast as the curve End value.


text:
solid mode objects have highlighted area & distortions in material mode
I have an issue were some objects have a strange highlight area around the centre in solid view mode, in material preview the objects have a distortion on the reflection. The 2 main raised panels show a lighter area just off centre.
The left hand side object is a copy  and removed the panels then recreated and all appears fine.
But I cannot see what is wrong with the original, normals appear ok and comparing statistics it appears ok.
You can see the issue between the two raised panels on the left hand side of each object.

thanks for all help

This is due to lack of geometry. There are several solutions to this, here are my 2 favorites:
If you are using a bevel modifier use more segments, or harden normals.
If you want to use hardened normals, you need to set your object to smooth shading (as it already is in your screenhot) and then go here:

Enable auto smooth. This could solve your problem even without the bevel modifier.


text:
import VDB file and start the animation at a certain frame in your scene
Hi I have created a VDB file explosion and it looks great.  I Have imported it into another project and it all works.
This is using Blender 3.6
However I would like to change the frame that it appears on.
Is it possible to have it start on frame 30 or frame 50 in this project?  Or do I have to go back to the original VDB animation and reconfigure it?
I see the offset option but I believe that this is to use only part of the VDB file itself.  I want the whole vdb file just would like it to start at a different frame in this new project?

It is actually quite simple, in the settings for the OpenVDB File there is a Start value. This is the one on which you want the simulation to start.
If you hover your mouse over it, the appearing tooltip says: "Global starting frame of the sequence, assuming first has a #1". That sounds a bit mysterious maybe, it means if your sequence starts with 1, this starting point will be placed on the frame you specify with the Start value (if Offset is 0).
The Frames are to say how long the sequence is (if you set a lower value then the sequence contains, they will be cut at the end) and the Offset as you already suspected is how many frames you want to be cut off at the beginning of the sequence.

Thanks I noticed that and the summary left me thinking it related to the VDB file itself, it did make me confused.


text:
Separate displaced items from the original Plane
Newbie here trying to learn blender.  I have been following some tutorials on creating 3d maps in blender and have followed them ok.
I have a large plane that has been displaced using a black and white texture image then the map itself applied as a texture image.
The original plane has quite alot of flat area around the 3d map.
When a I go into Edit mode I loose the texture so I have no idea how much I mesh I can remove?
Is it possible to copy only the displaced area of the Plane?
The final idea would be to create a base that I would then place the map on?

use a boolean modifier?

Use the black and white map for alpha


text:
How to cut the same geometry into two similar meshes?
I am modelling an airplane, and I want to cut windows into both it's front doors. Every door is a separate object.
What I tried:

I selected both doors in Object mode
I went into Edit mode
I pressed k to activate the Knife tool, then z to enable cut-through.
I cut the window into the left door.

The result was that I had the window only in one of the doors, but I wanted it to be in both doors. The doors are exactly mirrored along the X axis.
How can I make the Knife cut two meshes ?

To cut through with the knife, press Z after you've pressed K. It won't work if you've selected 2 objects though. You could also use the Knife Project tool for the same kind of purpose, it would allow you to cut with a circle or with the shape you want. You could also link-duplicate your object and mirror it, so that every change you'll make on an instance will also happen on another one.

As I said in my question, pressing z did not help. I ended up deleting one of the doors, cutting the window into the left one, then Duplicate linkeding and mirroring the duplicate.

oh ok you say "every door is a separate object", it explains why "cut through" doesn't work, you can't cut through if the other mesh is another object.

Also not if I selected both in Object mode, then went into Edit mode ? I can do everything else on both meshes, so why not Knife cut through ?

yes I guess knife doesn't work this way yet, it may comes later

I would only cut one door and then use symmetries to create the other door or use a mirror modifier.


text:
How to have UV Unwrap move one island only as a whole and keep it's vertices in place, relative to the island?
I'm trying to unwrap a very complex mesh, more specifically the panel of an airplane, from which I have extruded sunk-in patches for the instruments. To make it simple I did Project from View for the flat part of the panel including the sunk parts and pinned all the vertices that are part of the sunk-in patches for the instruments. Then I selected everything in the 3D view and did a normal Unwrap. This resulted in the other two islands that are also part of the mesh to be unwrapped correctly themselves, but they're now at a different scale and overlap the Project from View'ed island:

Now I thought if I could somehow pin the red colored vertices onto the island instead of glueing the vertices to their absolute UV position, I could let Unwrap let bring everything to the right size and position instead of having to do it manually. Is this possible ?

Pinning will always keep the vertex at its absolute position. You don't need to "glue" these faces as they are already part of the same island. You can select all the islands you want to automatically position, then click UV > Pack Islands. If you want more resolution (more space in texture space) for a certain island. Simply select an island, scale up and repack. You can select islands with L. Make sure UV> Constrain to Image Bounds is unchecked to making scaling easier.
I hope this is what you are looking for.

Well, I hoped to be able to just tell the Unwrap which faces it should not re-unwrap but just move, rotate and scale around, but Pack Islands is something which looks quite useful. Does it only move the islands or can it also scale and rotate them if they don't fit the image just by moving ?

Pack islands will Move and Scale, there's a toggle option for Rotation.


text:
How can I remove natural gaps on a 3D model with Blender before printing?
I have a 3D dental model that I will use in an academic study. On this model, there are some small gaps marked by the yellow arrows on the figure. These gaps are the natural areas between the teeth and gum. However, I cannot print the model with these gaps. Can I automatically turn off these gaps with Blender?

Depending on the mesh you can try placing a Smooth modifier with a negative value to close the gap, and then use a remesh modifier set to voxel.

You could select all objects in edit mode, press space to search, and type in "Fill Holes". It depends on the model how clean the fill will be, but it might be printable then. The best way would be to go into edit mode and select inner and outer edge ring of each tooth with "alt clicking" and use "bridge edge loops" (when searching with space bar).

Thank you very much for help. However, I m a beginner at Blender and I cant find fill holes or bridge edge loops option. When I press the space bar in edit mode, it tries to play an animation. Could you please tell me where to search for these two options? Further help will be very much appreciated.

It might be on "Alt-shift" or "F3". If it is not, go into the top bar. Next to "file" (where you can save your projects for example) is a button called "edit". Click on it and choose "preferences". Go to the settings for the "Keymap" and search for "search". Then you can see which key bind is set for you.


text:
How to match FK bone to IK bone via script?
I'm trying to make an IK to FK script, so I would like to have the FK bones align with the IK bones. What would be a good way to go about it?
I tried doing something like this:
upperArmFK.matrix = upperArmIK.matrix

forearmFK.matrix = forearmIK.matrix

handFK.matrix = handIK.matrix

But it would only align the upper IK and FK bones and not the forearm and hand bone.
Before applying my script:

After applying:

Your problem is described in part in the "Gotchas" section of the manual, here, 3.0 but it applies to 2.8 and 2.9 as well.
You need to call bpy.context.view_layer.update() after each matrix copy.
In addition it is safer to copy the matrix than to assign from it, so your code fragment should be
upperArmFK.matrix = upperArmIK.matrix.copy()
bpy.context.view_layer.update()

forearmFK.matrix = forearmIK.matrix.copy()
bpy.context.view_layer.update()

handFK.matrix = handIK.matrix.copy()
bpy.context.view_layer.update()

unless  your code fragment exists inside of a method that has context as an argument.  If it does, drop the bpy. from the above.


text:
Blender Text Not Rendering Over Background Colors
I am hoping someone can help with me this. I have text objects in my blender file which are positioned in front of other grease pencil objects (along the y axis). When I try to render the animation, the text does not show up. I noticed it is being blocked by the colors I have filled in the grease pencil objects. It's a 2D animation.
Not sure if I have some incorrect settings on the text objects.
I have uploaded my blender file here if anyone can help:
https://www.mediafire.com/file/d8n0nrmj7d8b7wg/Scene+1+-+Text+Issue.blend/file
I have also pasted a screenshot of what it should like and a screenshot of what actually shows up after rendering.

Thank you

i just downloaded your blend file, rendered and got:

so either you changed something in between or a miracle happened or is it not ok?

That's strange, what you have is what it should look like, but I just tried rendering it again and mine still doesn't show the text. I even downloaded the file I uploaded just to make sure. Since it works for you I wonder if there is some overall setting that I have that is off.

I couldn't figure it out from my laptop, but I tried rendering it on another computer and it worked fine, without changing any settings. Thanks for your help.

You are welcome


text:
Noob support please

Hi, a starting out with Blender person here.
I’ve always and by that I mean always had this question: How do I fill a circle hole like this? When I try to alt+click an edge it just selects the edges of a face, and not the hole. And when i manually select edges and fill their bridges, it turns out sh!t.
Again, to recap: my questions are:

how do i select the edges quickly and effectively?
how to texture ANY round object, not just this one, like a pro
how to make the fill tool actually work (preferably no add-ons)

Huge thanks in advance.

Hello, select the 2 edge loops and Ctrl E > Bridge Edge Loops? As for the texture select the face ring, choose the front view and U > Cylinder Projection?

@moonboots THANK YOU SO MUCH!!!!!!!!!!! Finally some person is helpful in months

Hello and welcome. Please use a title that matches the content of the post. It should read like a question, be descriptive but succinct, unique and identifying, summarizing the problem so that anyone searching for similar issues is likely to find this. Remove anything superfluous, avoid using words like "this", "help with", "issue" or "question about", instead describe what "it" is. Remember, your title is the first thing visitors see, answers you get depend heavily on it. See What is the problem of asking “How do I do this?"

Select the 2 edge loops and CtrlE > Bridge Edge Loops (or enable the LoopTools addon and right click > LoopTools > Bridge). As for the texture select the face ring, switch to front view and U > Cylinder Projection.


text:
Viewing the animation button isn’t working
When I press render than view animation it’s showing different animations that I made in the past even when I deleted them? Why is that.

Can you add some screenshots and perhaps share a small blend file demonstrating the problem https://blend-exchange.com

hello, maybe you have loaded the animation in the Video Sequencer? In that case delete it or Output panel > Post Processing > deactivate Sequencer

You have probably loaded an animation in the Video Sequencer, it will be rendered instead of your 3D scene, remove it or go into Output panel > Post Processing > deactivate Sequencer.


text:
How can I make magnetic reconnection animation?
Does anyone know how to make the following animation?
Only the interacting lines.


text:
Why does my cylinder create 4 horns when I only want 2 while beveling the top?
I am working on a model where I want to create a human hat with two horn-like shapes. I started with a cylinder and used Proportional Editing to modify the top and bottom of the cylinder. However, when I try to bevel the top part to create two cones for the horns, I end up getting 4 horns instead of the intended 2.
This is before bevel:

After bevel i get this:

I want it to look like this:

Hello how did you create the 2 horns?

I didn’t create the horns,that is from a tutorial

i think you can just select the vertices,which formed the horns and just move them down using G.This way you have only 2 horns

select the vertex in edit mode, go to vertex data , check the bevel weight, make it zero , if its mot working , try , press "A" change the bevel weight to zero in vertex data , i hope this works


text:
polycount increased too much if using subdivide modifier
I was creating a character. For the body, before subdivision, the triangle count is 6.9k. After subdivision, it increases to 110k. What can I do to make the character look smooth without significantly increasing the polycount?

Hello, don't apply the modifier!

If you don't apply the modifier the real amount of polygones will stay the same, you can verify it if you switch to Edit mode. Don't apply the modifier if you don't have any good reason to do it. Also, to make the object look smoother, you can right click in Object mode and Shade Smooth.

i see. so under what conditions should I apply the modifier. for example I want to rig and animate the character. do I need to apply it?

no, don't apply, it will be much lighter to animate a low-poly mesh, also make sure that the Subdivision Surface modifier is under the Armature modifier


text:
New UV Unwrapping Tools
I used to be able to copy and paste UV maps between faces in Blender. Now I have updated to Blender 4.3 and I can't find it anywhere. Nobody is talking about it. I do city renders and properly unwrapping building windows used to be a breeze. Now I am in the middle of a project and I can't continue unless I want to unwrap a million windows across a city scene individually. I have tried the Copy and Paste in the UV editor but it doesn't work. I need to be able to copy and paste UV maps within the same object as well as between objects. Also, I can't find this Object Menu I've seen mentioned. The Blender page seems to assume everyone knows where it is.

Has my new answer helped? If so, please, mark it with "accepted" tick.

It's in UV editor:

UV > Copy UVs

UV > Paste UVs

You can add these to quick favorites:

Right click while mouse hovers over specified menu item
'Add to Quick Favorites'
Call Quick favorites using Q button

Or you can assign shortcuts (for example,  Ctrl+C  /  Ctrl+V):

Right click while mouse hovers over specified menu item
'Assign Shortcut'
Ctrl+C  // or Ctrl+V

The user explained that it's not possible to do that in it's Blender version. Probably needs to explain a bit more

Nobody said that I does not work for any blender version. I'm saying that for this specific user it's not working, why? We don't know, the user needs to describe a bit more the steps followed. Probably a missing step or something

I need to be able to copy and paste UVs within the same object in Edit Mode.

@SeanCollett — I've updated my answer. Now it contains instruction how to copy UVs from one face to another within the same object.


text:
Is it possible to "freeze" the reflections/lighting on a metallic model from a single point of view?
Blender beginner here.
I'm trying to use a 3D model with a glossy metallic texture as a painting reference, and I'd like to be able to view the placement of reflections and lighting from different perspectives. But since the positions of the reflections on that model naturally change in accordance with the viewing angle, I can only really reference the model from one point of view.
I'm wondering if it's possible to "freeze" (or maybe project) the reflections/lighting from a particular perspective on the model so that I can turn it in space without them changing.

Like this? https://blender.stackexchange.com/questions/242262/extract-the-current-objects-surface-as-generated-by-blender-so-it-can-be-applied/242283#242283

Yes, actually! Is it possible to do this when there's no environment and the object just has a metallic material with some lights pointed at it?


text:
Transition from 3DsMax to Blender
I want to know is there a UI mode change in blender that simulates 3Dsmax UI... i am new in blender and I kind of get lost.

I think 2.92 only have Maya Preset under Edit > Preferences > Themes > Presets

@Emir thankyou I will check it up.. (but I don't use Maya)


text:
Texture painting backface culling option doesn't work while symmetry on
When I try to paint onto a texture while symmetry on any axis is turned on the backface culling option just doesn't work. Is there anything I could have accidentally turn on or off? Because in the new .blend file everything seems to work correctly.
Here I've made a video to make it more clear: https://drive.google.com/file/d/1Fx4lJ6H8iFlJNnN6rUsIaGaXrech_nWX/view?usp=sharing

Hello, which version are you using ?

You might have enabled/disabled display back-face culling on accident for your viewport contrary to what you are going for.

@Gorgious hello, it's 2.92.0

@RandomPanda, I don't beleive this to be the problem because i check the backface culling checkbox in active tool and workspace settings tab while in texture paint mode.


text:
Glass BSDF gets totally grey/white in cycles
I have a little problem here:
As you can see I am using a Glass BDF in cycles. At the left you can see my cycles render output and at the left you can see my The viewport shading output. I would want it so i can see trough the glass into the box, but that wont work (even if IOR = 0). Could someone please help me?
greetings,
Sjondepon

The render output is the sphere icon on the right side, not the middle.

I am aware of that, but that's not my question

It's not a raytraced render as the cycles. Of course you won't see the same.

In cycles, for a glass material you need to set the roughness to 0 and the IOR to 1.450 on a glass BSDF. For the viewport shading, it is not possible to make the glass transparent unless you switch to eevee rendering engine and adjust the materials (You'll have to learn about screen space reflections).
Edit: For more transparency:
With only glass shader:
With transparent and glass shader:

So i will never be able to use glass in cycles?

@Sjondepon I am saying that glass works properly in cycles with an IOR of 1.450 but it doesn't work in eevee (or viewport shading) until unless you use some tricks. Glass works in cycles, I repeat.

oh i see, thank you! but is there a way to see more details in my object behind the glass?

@Sjondepon Yes there is. If setting the IOR to 1.450 and the roughness to 0 doesn't help, you can drop a mix shader between the glass shader and the material output and then cnnect a transparent shader to the bottom socket of the mix shader. This will make your material a bit more transparent. I will add an image in my question of the material setup.

@Sjondepon You can check the question now, I've attached examples.

Thank you very much

You're welcome! (:


text:
Exporting entire world from blender to unreal without exporting same asset multiple times
Imagine i have a "world" with a proceduraly generated terrain and a proceduraly generated forest (blender script), using only one tree model but placing it a 100 times with random placement, scale, and rotation.
Now want to export this to unreal, preferably as a single file with both terrain and trees. However i don't want unreal to load each tree as a single/individual mesh, but rather one tree mesh, and that the file contains placement coordinates, scale, and rotation. Is this possible? Is there any 3d format that both both Blender and Unreal supports that could do this?
A single fbx bulk export creates one file and is easy to import but it creates one mesh for each tree (all 100) in unreal? or am i missing some setting?
I understand this question overlaps with Unreal knowledge.
I'm preferably looking for a solution that is as universal as possible, that works with other game engines / simulators as well. Otherwise just exporting coord, rotation, and scale for each tree and then importing using a handcrafted unreal script is the solution we are looking at.

I don't have much experience with this, so I am going to give you an answer that is a basic starting point.  If you haven't already you should download an add on from Epic Games called "Pipeline: Send to Unreal".  In this add on there are some options about "exporting collections" and "combining child meshes", as well as various FBX related controls.   Further research into these settings should help to answer your question more.
https://epicgames.github.io/BlenderTools/send2ue/quickstart.html


text:
black grid around one mesh in object mode
I have some text that I have converted into separate meshes, in object mode one letter has a black cube around it all the others are ok.  I can't understand why I have no modifiers added to the  object and can see no difference when comparing to the other characters?
The cube is visible when in in edit mode?
I haven't come across this before.

can be viewport settings, can be an empty ...or other reasons. If you shouldn't guess - then pls provide blend file and we can check it out. thx.

Does the object has Viewport Display set to include 'Bounds' > 'Box' ?

I have figured my issue the Viewport Display pointed me in the right direction, some how the Texture space option had been turned on.


text:
Imported mesh from maya looks off
hello guys can someone help here, pretty new to blender, currently imported a polygon hair mesh from maya to blender and this happens, looks like all the points are stuck on the center axis

what format do you use ? can you share your mesh ?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Re-exporting the file as an Alembic helped solve the problem instead of an FBX.


text:
Blender render "splits" frame in two parts
I have a strange problem rendering Blender. In the Viewport Shading everything is fine, but when I render in cycles, the frame "splits" into two parts, and it seems that above it renders in CUDA, while below in OptiX (which is the Render Device I am using). I have a GTX1050Ti and a Ryzen 7 3800X. Thank you

You posted a rendered image above and a viewport image below. Where is the spliting? I can't see anything strange, what do we looking for?

Are you referring to the fence?

@CameronCritchlow yes


text:
Reset influence of neighbour vertices for smooth shading of certain area
I'm doping low poly model for exporting it into the game after (Godot game engine, if it matters). I've met a problem while doing nails for fingers: in "shade smooth" display mode nails are shaded differently.

My guess is that happens because of sharp angles formed by "internal" structure. I use double extrusion to make nails (first one is pulled down a bit and behind, the 2nd one extrudes up and upscale (forms a nail plate). Is there a standard or common way to "reset" influence of neighboring vertices on smooth shading of a faces, forming nail surface?
I can guess one possible solution is to make nail unconnected mesh, but is there something like "Crease" for subdivision? Like you mark edges, that limit smoothing though them?

Have you checked the normals are facing in the correct direction? - Enable the Face Orientation option on the Viewport overlays menu and see if they show in red. If so, select All in Edit mode and use Alt-N > Recalculate Outside to reset them.

the problem is that while normals themselves are ok. Its smoothing of that double extrusion that breaks stuff. That double extrusion creates invisible small faces that are at sharp angles to one another. And those small edges affect shading of visible surface in a wrong way.
The approach in accepted answer  is what solved it for me.

Ok. It's always worth checking that if you have problems after extruding.

Its "did you reset you device" for any shading problem: did you check orientation of normals? did you check for vertex duplicating? XD

Try the combination Auto-Smooth and Weighted Normal Modifier, trimming values, if it suits your needs (you can apply the modifier when satisfied).

Yes, that works exactly like I want it too! I might only add that making vertex group with nail and closest neighbors for this modifies makes it even better!


text:
Parametrizing rig in pose mode
Probably very simple question, but could not find any answer by googling.
I know there are shape keys to parametrize mesh. For example imported DAZ models have shape keys for gripped/relaxed first. I also know there is an asset library now in Blender.
But is there a way to parametrize bones with a slider, like in shape key (and preferably put all of the sliders on side bar of viewport, like with imported DAZ.
I'm aware that what I want to do is commonly achieved through IK/FK and restraints, but they are mostly controlled by objects in viewport. An I'd like to have a bunch of sliders to control my rig in pose mode. Is it possible at all? If so, how?

Post updated
Mostly, what I wanted is described in this video
https://www.youtube.com/watch?v=_197jQFh22E
The idea is having properties accessible on for whole Pose Mode for given object (not just when specific bone is selected). That is achieved with plugin "Space Switcher", that allows to choose bone for storing custom properties and displaying them for whole Pose Mode. In video name "PROPERTIES" is used.
You can create custom properties in Properties editor → Bone data Tab → Custom Properties panel, as shown on picture below. This must be done in Pose Mode:

To make drivers creation easy, you can  RMB a property value of a bone in the sidebar → Copy as new driver.
Then  RMB the driven value → Paste as driver.
It will automatically set the driver with correct targets and settings, all you are left to do is adjusting its influence curve via  RMB the driven value → Open Drivers Editor.

It does work in 3.1 and doesn't require any script to make it work. Make sure you added the custom property from the bone data panel, not the armature nor object data panel, and be in Pose mode. The video explains further why in the Rig custom properties chapter.

@L0Lock I did exactly that. Unless I've missed some other checkmark, that needed to be checked, It does not work. there are bunch of comments, stating it does not work for them too. I don't even have the tab "Rig Properties". Even on your screenshots there is no such thing and properties disappear as soon as other bone is focused. Author of the video himself admitted that scripting is needed to achieve that. So your edit of my answer is incorrect (though you made it better in terms of presentation

I've returned the script snippet with some updates, since without it answer is not full. Also thanks for mentioning Copy as new driver I did not know about that technic.

There is no scripting ever required to display a bone's custom properties on the sidebar, that simply works if you add custom properties on the BONE DATA. Your screenshot shows you added them on the ARMATURE DATA, which doesn't work. You can make it work using scripts, but that's a convoluted solution and doesn't solve the issue that you will animate your properties in the wrong action and data block.

Now what Pierrick posted in his video's description, is that the Rig Properties panel that constantly displays all custom properties of any bone named `PROPERTIES' is actually a feature from the third party addon Space Switcher.

So either you use that addon, and then you can make a PROPERTIES bone that holds all the custom properties you want to see at all time, or you just put custom properties on any bone you want and will be required to select them to set the properties. And most likely the best solution is to do both, to avoid clutter. But in any case: you MUST put the custom properties on the BONES DATA. Not the object's, nor the armature's.

https://i.imgur.com/IN3UUiB.jpeg

@L0Lock Why Adding them on ARMATURE DATA is wrong? it works for drivers and for at least make more sense to host custom properties there, since it hosts all bones

Basically, what I've done is created similar addon (because blind ad did not notice  Space Switcher in description), but without any need to create special bone for that purposes

Proof that it works: https://prnt.sc/sFnO2uEUPCmN

Let us continue this discussion in chat.

TL;DR I updated my answer to more convenient approach, using addon


text:
Edge highlight length of selected vertex
I have made the selection highlight somehow extremely shot, but only for single object. Every other object in scene has normal edge highlights for selected vertex. I might've accidently moved some kind of bar, but I have no idea which one. Below are examples of highlights of problematic object and newly created cube within same project

have u tried pressing a to select all vertices and pressing m > merge by distance

A bit late on that, since answer was already given, but yes, it was the first thing I tried and even duplication of vertices would've been the case, highlights were not displayed at all most likely

You've enabled the 'On Cage' option in Subdivision Modifier.
This shows the mesh with more vertices, which makes the gradient shorter.

oh, I guess then the highlight shows for subdivides mesh if "on cage" is on. That is why it was way so short. Thanks, new to blender and would no have figured it on my own!

Yes, exactly. Welcome to blender btw :)


text:
Python: I'm trying to snap vertices to the cursor while keeping the offset but I keep getting the context is incorrect error
Here is the code
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
    bpy.ops.mesh.extrude_vertices_move(MESH_OT_extrude_verts_indiv={"mirror":False}, TRANSFORM_OT_translate={"value":(-0, -0, -1.53096), "orient_axis_ortho":'X', "orient_type":'GLOBAL', "orient_matrix":((1, 0, 0), (0, 1, 0), (0, 0, 1)), "orient_matrix_type":'GLOBAL', "constraint_axis":(False, False, True), "mirror":False, "use_proportional_edit":False, "proportional_edit_falloff":'SMOOTH', "proportional_size":1, "use_proportional_connected":False, "use_proportional_projected":False, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "cursor_transform":False, "texture_space":False, "remove_on_cancel":False, "view2d_edge_pan":False, "release_confirm":False, "use_accurate":False, "use_automerge_and_split":False})
    bps.ops.mesh.view3d.snap_selected_to_cursor(use_offset=True)
    bpy.ops.object.editmode_toggle()

I'm given the error of RuntimeError: Operator bpy.ops.view3d.snap_selected_to_cursor.poll() failed, context is incorrect

https://blender.stackexchange.com/a/270716/142292


text:
Geo Nodes: How to use curve parameters to control specific instances
I’m trying to use a spiral curve as an instance and I want each instance to have a random end heights and revolutions but having trouble figure out how to use those parameters from the spiral curve after creating instances. Trim curve sort of works but I can’t control the spiral beyond that.

simple answer: you cannot work with spiral as instances here. You have to create these curve spirals yourself by math nodes. There are a lot of questions here and answers, why you cannot change instances after instancing (because they are just copies and you can only change scale/rotation and position).

If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer" so that this question will not continue to be displayed as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it.

I am not quite clear what the result should be, but the height (number of turns) as well as the Trim Factor you could make variable in the following way:

Of course, the flexibility is limited, because after an instantiation only the individual parameters of the curve are changeable, but not those of the spiral.


text:
When rendering the animation, shading rules are not visible
I'm yet a beginner, and faced some issues, when trying to do an animation. I applied shading rules (=nodes?) to the surface (plane), they look just as I wanted. But when I do the animation (I want the camera to move above the surface), in the rendered video, the shading rules are not visible, I only see the plane, with the given modifiers. I checked some posts with similar issues, the results said "uncheck "Only show selected" in the graph editor", etc, it did not work for me. By the screenshot I provide, could someone please give me an advice, what do I do wrong?

Hello and welcome. Sorry, I don't understand the question. Screenshot 3 shows a render. What's wrong with it? What is missing there? I'm also not sure how the Graph Editor is related to the shading issues. The Graph Editor shows you the keyframes for the camera and the interpolation between the keyframes. It's used for animation.

Hi, thank you for the fast reply! I just used the graph editor to smoothen the lines. As for the last screenshot, it reflects to my problem: that, in the rendered view (right), the surface is visible, but without the Shading parameters I set before (that would be the grayscale/hillshade "skin"), visible on the left side. I would like the model, with the shadings on the left, to be animated and rendered in the output video too.

Ah, I see. The render lacks shadows and looks flat. Does the Displace generate all the geometry? Is the plane flat without it? Maybe it's the sun that is in the high noon position and kills all shadows. It's hard to tell only from the screenshots.