Using Blender for Radio Frequencies I'm a researcher interested into radio channel modeling and I'm currently working with a custom-built ray-tracer for such purpose.
I would like, though, to have better performance, e.g., using GPU accelerated ray-tracing, which is not trivial to program from scratch.

I was wondering whether I could do this with pre-existing open source (optical) ray-tracing software such as Blender.
For this to work, I would need to

Define transmitters (TXs) and receivers (RXs) nodes. I guess TXs are equivalent to light sources and RXs to cameras, but I would need 360° cameras. Also, TXs and RXs should be points with no size
Obtain output files containing information about every single received ray, such as traveled distance/delay, received power, angles of departure and arrival
Possibly, access to the render engine programmatically based on a pre-built Blender CAD scene
Ideally, create an interface (an add-on?) specifically for RF ray-tracing and make it available to the community which allows the complete workflow to stay on Blender, i.e., (i) scene creation, (ii) material settings, (iii) RX/TX positioning (possibly moving), (iv) ray-tracing computation, (v) ray visualization.

I have no idea whether this is even possible, I'm asking the Blender community for a feedback on whether these few points could be more or less easily obtained.

If not directly from Blender's render engine, maybe some other open engine one such as Lux Core Render, POV-Ray, etc.

Your opinion will be greatly appreciated

The POV-ray newsgroups are quite responsive to such scientific visualization demands. and Blender is cleaner to script. You could use both except for the most accurate results, where LuxCoreRender might end up slightly better since spectral based. :-)


Particle system rotation as a whole I have set up an animation of a quite large particle system (over 50,000 particles). The Rendered Shade Mode is quite heavy so I prefer to use Render > OpenGL Render Animation. Camera animation is out of question in such a scenario. However, I am in need of showing around the object emitting the particles and the only solution, in this case, is to rotate the object itself. The problem is that the physics animation doesn't keep track of the rotation of the emitter. Once the emitter is rotated, the physics animation continues as if the object was in its initial position.

One part of the problem - i.e. OpenGL-rendering an emitter and its particle system being spatially transformed at a definite keyframe of a physics animation - was solved thanks to Rich Sedman comment about locking the 3D View to the camera (Numpad 0).
Yet, I also had two additional constraints:

make the physics animation as short as possible in an orthographic view and rely on its end (physics) state to produce a panoramic view of the particle system;
hide the emitter and leave the particle system alone while panoramically showing around the last frame of the physics animation;

To reach these goals, the particle animation render (Particle System ‣ Render) was chosen of type Object (or Group of objects) with a (small) UV sphere in place of each particle. In the Display panel of the emitter, I had to switch the Maximum Draw Type from Wire to Solid though Wire was enough for my purpose of showing the (haloed) particle system alone but with Object as render type it ran into the pitfall of drawing the edges of each single sphere. So, I had to rely on Transparency which had to be checked off in the same Display panel to enable the alpha channel of emitter Viewport Color set to 0 (Cycles Render).
Having run and baked the animation and selected its end frame, pink vertex (I would like to generate a particle star field that I could keep as static background) provided a super script which allowed to supersede the particles with a real mesh of point-vertices. Then, using the DupliVerts technique (Object panel ‣ Duplication ‣ Vertices), a copy of the (small) sphere chosen for the physics animation render was used to replace each point-vertex.
From this point forward, it was just a matter of making up the animation through the Dope Sheet (Action Editor) applying Restrict View / Restrict Render keyframes to show the original particle system for the actual duration of the physics animation and keep the duplicated one hidden at the same time. On the contrary, during the part of the animation which was not physically baked, the duplicated system was visible while the camera moved around and the original particle system was hidden.


How to register global (i.e., unique per file) properties? I need to store additional information in a .blend file, that occurs only once per file. So, attaching it to, for example, bpy.types.Scene doesn't help.

Since bpy.data is an instance of bpy.types.BlendData, I tried attaching properties to bpy.types.BlendData. This failed:

>>> bpy.types.BlendData.testProp = bpy.props.StringProperty()
>>> bpy.data.testProp
(<built-in function StringProperty>, {})

Here, bpy.data.testProp is not a string, but some tuple, So it looks like registering properties on bpy.types.BlendData is not supported, like it is for bpy.types.Object:

>>> bpy.types.Object.testProp = bpy.props.StringProperty()
>>> bpy.data.objects['Camera'].testProp
''

Is it somehow possible to attach properties to bpy.types.BlendData?

Are there other ways to register global data in a .blend file?

Short answer: no, you cannot store per-file custom data.

A .blend file is basically just a collection of ID data blocks. There is no customizable data instance for "the file". All custom data must be associated to one of the ID blocks (or possibly eligible subdata that supports custom props, like bones or nodes).

Depending on what you actually want to do there are a number of other options:

You could make a dummy ID block (e.g. Text) to which you add custom data
Addon preferences can store custom properties for persistent settings of addon scripts
Scene data blocks can be a viable option, they are a sort of "root node" in most cases

It really depends on the actual use case.


How do I attach a mesh to a rig? I've spent hours trying to use the Automatic Weight option in Rigify, but the left forearm of my mesh deforms(tried merging verts and scaling).  Everything looks fine until I parent them.  I want to keep the generated rig, but are there any alternative methods to attach it to the mesh?

Have you tried the Automatic weight?

Did you do the retopology?

The first time I tried doing Rig, it didn't work until I learned about retopology, wich is (im not that sure) putting less ''points''. I don't know how to explain that correctly, you should watch the video of FlippedNormal on retopology for begginer.

If you already learned about this, maybe look if you have only square, for me when I have triangles it dosen't work.

Hope it will help. Good luck


Can't use hotkeys for vertex/edge/face selection I just downloaded the latest daily build "blender-2.80-532536bf52da-win64" and when I launch it and try to use those hotkeys, they don't work nor show in the keymap preferences.
What should I do?

go to preferences>keymaps>3D View>Mesh>Mesh(Global) at the bottom click 'add new' in the new key map paste mesh.select_mode and configure the keymap how you want.


Vertex selection without edge highlighting? Selecting a cube's vertex displays an orange point (sure it is vertex) with its connected three edges (edges highlighted as orange to black gradient).

For example, selecting a vertex in 3ds Max only highlights the vertex point.

In Blender, when selecting a vertex, it does highlight the vertex point with its connected edges. I don't want to see gradient orange edges.

Is there an option to change how vertices are highlighted?

What is or is not shown is in the Properties Region N on the right hand side of the 3D viewport. Untick edges in Mesh Display → Overlays:

You can show/hide vertexes, edges, vertex normals, face normals, etc.


What lighting settings would be used to achieve colored and soft directional light In reference to this video: https://www.youtube.com/watch?v=SbCJKfol-WQ and here's a screenshot of the result:

The person that made the video said they didn't use any materials, it's just Blenders default diffuse and that all the color comes from the lighting. What lighting would be used to achieve this white paper effect?

There is not that much to this.
Any big light source with the color you want will do.

The bigger the light source the softer the shadows on the scene.


Split mesh along Bezier curve in Blender 2.75 Found this topic, but my Bleder seems to lack the Knife Project tool. Is there anything alike that in newer versions?
I tried using the Sculpt Tools, but all the Grease Cut does for me is duplicate the part of mesh the curve should split without any cut. I'm splitting multi-part mesh and sometimes need several parts to be split with one curve. Like making jigsaw puzzle.

You have to just select the face you want to add a cut in and Subdivide it, by going (w) and the first option 'subdivide', then for instance you want a vertical cut, so select the horizontal edge and by pressing (x) or (Delete) key and choosing 'Dissolve Edges' you will delete it but with out corrupting the mesh, and then you can use the 'Edge Slide' to position your cut on any position on your face you want. To Edge Slide press  (Ctrl+E) and choose the fifth option from the bottom 'Edge Slide'.


How to register keymaps for all editor types? I want to write an addon, which enables you to switch quickly, via a pie menu, between the editor types. (e.g. Node Editor, 3D View, Graph Editor, etc...)
To get my shortcut working, I need to register the same keymap for every space or editor type.

(e.g.:keymap_items.new("wm.call_menu_pie", type = "E",alt=True, value = "PRESS"))

Right now I got it working with only one editor type:

keyconfigs.addon.keymaps.new(name = "Node Editor", space_type = "NODE_EDITOR")

I know, I could simply register my keymap for every single editor type with a loop, but I am sure there is a more convenient and beatiful way to accomplish my objective.

( Maybe something like space_type = "WINDOW"?)

PS: My current registration code looks like this:

addon_keymaps = []
def register_keymaps():
    global addon_keymaps
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name = "Node Editor", space_type = "NODE_EDITOR")
    kmi = km.keymap_items.new("wm.call_menu_pie", type = "E",alt=True, value = "PRESS")
    kmi.properties.name = "view3d.switcher"
    addon_keymaps.append(km)

I randomly discovered the answer to my question on the Blender Python API Documentation

My registration code now looks like this:

addon_keymaps = []
def register_keymaps():
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name = "Window",space_type='EMPTY', region_type='WINDOW')
    kmi = km.keymap_items.new("wm.call_menu_pie", type = "E",alt=True, value = "PRESS")
    kmi.properties.name = "editor_switcher_pie_menu"
    addon_keymaps.append(km)

You can find the final version of my addon on GitHub


Using existing topology to model details and grooves I'm trying to model the Five-Seven handgun, which as you can see in the image below has some grooves running along its handle.

So far, I have blocked out the lower part and am trying to add in details such as this. What I usually do is try to use the 'inner' vertices created during the blocking out phase to trace out the details, but my geometry always ends up messy instead. Here's an example:

I translated the vertices I had to best fit the groove on the right, however I am bound to run into problems - the vertices in the top curve of the groove are going to go extremely close to the vertices that resulted from modeling the engraving on the top left. If I try to use those, then I end up with very awkward edge flow. I also attempted using the Knife Tool to cut some triangles, but they also result in extremely bad topology, not to mention that I've been repeatedly instructed to avoid triangles as much as possible (this is going to be a game asset).

The dealbreaker is that even after trying all those alternatives, when time comes to bevel the groove I also end up with bad geometry and checking the mesh under smooth shading gives me horrendous results.

Tthis is one of the walls I always end up running into when modeling complex hard surfaces. I'm including a .blend file in case you'd like to take a look, and am open to critique about my mesh overall. Thank you!

EDIT: Here's the blend file

I would do it this way: First model the general shape of the gun with no worry for the grooves. Once your good, begin to draw the grooves lines with the knife. Keep using the knife to make sure you have mainly quads and not tris or ngons, then bevel the grooves, and extrude inwards. You'll have to bring some corrections of course. You could even separate the grip in several different meshes as anyway it will be hidden by the grooves.


Blender 2.8 - all non-rendering objects gone from viewport but still exist I remember there was an option in pre-2.8 for "only render" option to display but where is it in Blender 2.8+.  I must have hit some terrible hotkey something.

All object such as camera, fields, empties are all invisible in viewport.

Anyone know what hotkey or checkbox that controls this?

Did you unselect the Show Overlays button


How to scale the scene relative to an objects metric values? I have created an office desk in Cycles and am very pleased with the result and how it appears to the eye.

It is only now that I have changed the scale to the metric system and want to re-scale the table plate with metric values - so that it stays true to the real world measurements but at the same time, having the rest of the table (scene) change its values accordingly.

I had hoped there is a way to accomplish that without having to refit every piece by hand.

Thanks for any help!

This is probably a duplicate, but I couldn't find any answer right now.

Scale all objects simultaneously towards a common center (the 3D cursor).

Position the 3D cursor at the common center. This can simply be the origin of the scene. To place the 3D cursor at the scene origin (0, 0, 0), press ⇧ ShiftS and select Cursor to Center.
⇧ ShiftRMB select the objects you wish to rescale.
Note, that the dimension values take all selected objects into account not just the active one.
Set the 3D cursor as the pivot point with the shortcut NumpadPeriod or via the 3D view's menu.

Rescale with S, then enter the desired value (e.g. 0.01) and press ⏎ Enter to confirm.
You will have to calculate this value beforehand by dividing the desired measurement with the current measure. E.g. If you table has a dimension[0] of 1.5 and you want it to be 2, your scaling value will be 2 / 1.5 = 1.333. This can be done during the scaling operation.
Press S 2 * /1.5 and confirm with Enter.
Apply the scale of the objects by pressing ⎈ CtrlA and choose Scale.


How to fix relationship lines? Sorry i'm new to blender so i dont know how can i word this question better. I just learned that these dotted lines relationship lines. So i guess they show parent-child relationship between objects but in this case its not what i expected it to be. I have this door here whose relationship line goes to the origin even after i clear its parent (alt+p >> clear right?). even if i set parent of the door the doorframe object which is around it (select door>>then select frame>>ctrl+p>>object), the relationship line from the door still keeps going to the origin. This looks and works ok in blender for some reason but i want to export this model as fbx to unity. In unity, these doors dont show up at all.

As you said you've tried Ctrl+p, so the door is not a child of any object.
Then the only thing that can cause this problem is that the origin far away from the door. Select the door, press T > on left hand side menu set "Origin to Geometry".

If it still doesn't work, share the blender file with us or recreate the problem (if you can) in a separate project and share that file.


How to apply Noise texture to specific portion? I made this parabolic image with math function and displaced it with the Displacement node.  As in the screenshot when I applied noise texture before the parabolic math node its applying throughout the surface and showing distorted edges while displacing. I would like to add noise texture only in that black portion.
Thanks

Connect your Color Ramp output also to Math: Subtract with 1 set as the first value - this way you invert your value, where black is represented by 1, white by 0 and you keep the gradient (smooth transition). Now multiply Parabola Math custom node by that inverted value to, so that black areas are multiplied by 1 (the height doesn't change), white areas are multiplied by 0 (the height becomes 0) and areas in between are multiplied by a fraction (get higher and higher towards the black).

In linear interpolation, the height change is too sudden, so you might want to switch it to Ease:

For a finer control, you might want to use another color ramp to control the displacement transition specifically (this way you don't have to change the color by using Ease mode on color going to the shader), though I wouldn't recommend moving the sliders on the 2nd Color Ramp, I was getting ugly results...


How to move greated texture? How to move created gradient without customizing Texture Gradients from which created gradient created?

Find the texture coordinate node within your tree (it may be helpful to expand out the node groups) and attach a Mapping node.  This allows you to translate and rotate your coordinate space.

Attach the same mapping node to both locations of textures from which you created your Final Texture.


Principled BSDF and Glass BSDF black in GPU Cycles viewport rendering When I use CPU everything works fine, but when I switch to GPU all materials using Principled BSDF or Glass BSDF shaders go completely black in the viewport rendered view; all other shaders seem to work fine. I am using Cycles in blender 2.83 and my graphics card is a GeForce RTX 2060, which I just updated.

I don't know if you solved this, but I had a similar issue until I realised that I had Transmission Bounces set to zero (not Transparency bounces as mentioned in your comment above) ...


Faces appear to have an underlying mesh in edit mode Using blender 2.79 here. One of my file has this issue where faces appear to have an underlying mesh in edit mode, even with a freshly added cube. Any clue?

it's looks like Z-culling issue when clipping distance is too big. In this case you may:

Reduce the distance between start and end of clipping (in N-panel):

Try 2.79b or 2.79 master daily build, it have not this problem
Do not pay attention to it - it is not affects on render.


Lighting on triangles - every other one is darkish I have a mesh in Blender, imported from elsewhere. You can see individual triangles on it in a funny checkered pattern, like this:

This is consistent with a popular bug where every other triangle is inverted, and you see half of them from the inside and half from the outside. But if you enable normal display, all the normals are facing outwards, as expected.

The mesh is available at http://www.jishop.com/temp/4osh.blend . Can someone please take a look at it explain the effect?

The triangles are all being displayed in 'Shade Flat' mode, which is the default. To change this, go to edit mode and select all faces (hit 'A' once or twice, until all triangles are selected). Then Hit 'W' then select 'Shade Smooth'

[Shade Flat] mode is appropriate for modeling a faceted gemstone, or cut crystal glass, for example. Since blender cannot know ahead of time what type of shading you need, it defaults to 'Shade Flat'.


rigify problems generating a rig I'm having a problem using the add-on 'rigify', I line up the rig to my model then generate the rig but it creates a strange group of empty circles around the vertices of the rig rather than the rig.

you may have disconnected or deleted something on your meta-rig before creating it. Retry with a fresh meta-rig and hit the "generate" button to check if it works. You can still delete the rig object and re-generate another from time to time to check everything works... until your meta-rig is perfectly placed !


Bones not rotating properly in gimbal mode I am trying to pose bones in gimbal mode but they always rotate on odd angles even though the red arrow shows the proper angle of rotation. Why is this and how can I fix it?

That red line that shows up when you are rotating means you are locking the rotation to the X axis by pressing X - this will be the world's X axis.

When you first start to rotate by only pressing R the rotation is restricted to the view orientation, meaning it will appear to rotate in a circle as seen in the view you are using.

You can also lock the transform to the objects local X axis by pressing XX.

This can also be adjusted to the Y or Z axis when moving, rotating and scaling. Also to remove an axis from the transform also press Shift. eg pressing S then ShiftX will scale on both Y and Z axes.

You can change the transform orientation used by the widgets in the header menu.

Sometimes you can also find it helpful to use RR which puts you in trackball rotation - that is not locked to any particular axis.


How can I generate an object from a mathematical function? I have a formula that mathematically describes the heart surface in Cartesian coordinates:

$$\left(x^2+\frac{9y^2}{4}+z^2-1\right)^3-x^2z^3-\frac{9y^2z^3}{80}=0$$

Unfortunately, I have no idea how to implement it in Blender.

Explicitly, I want to use for the Mesh Math Function. I already activated the Addon ADD Mesh: Extra Objects.

I searched for a tutorial, also for a syntax, I have found nothing, something near it.

I created (guess) from other functions this syntax.

(X**2+ ((9*y**2)/4)+z**2-1)**3-((x**2)*(z**3)-((9*y**2*z**3)/80)=0

I found another formula:

5 + (-sqrt(1 - x**2 - (y-abs(x))**2)) * cos(30*((1 - x**2 - (y-abs(x))**2)))

x is from -1 to 1, y is from -1 to 1.5, z is from 1 to 8

Have used the equations found here http://www.econym.demon.co.uk/isotut/real.htm#heart1
The first can be crunched into XYZ surface.  Notice the use of fabs(...) in the A helper function.  The abs(...) method is not in the list of allowable methods and creates an error.

Here is some code for the second. Which required a mapping from spherical coordinates.  Run the code to produce a heart mesh.  Change the line h = heart(1.0, 1.0, 0.2) to produce other hearts.
import bpy
import bmesh
from math import degrees, radians, sin, cos, tan
from mathutils import Vector
from bpy import context

class SphericalCoordsPoint:
    @property
    def xyz(self):
        theta = self.theta
        zi = self.zi
        x = cos(theta) * sin(zi)
        y = sin(theta) * sin(zi)
        z = cos(zi)
        R = self.R
        return R * Vector((x,y,z))

    def __init__(self, R, theta, zi):
        self.R = R
        self.theta = theta
        self.zi = zi
        #self.xyz = self.point(theta, zi)

    def __repr__(self):
        return "SphericalCoord(%.4f, %.4f)" % (degrees(self.theta),
                                               degrees(self.zi))
# define the heart method.
def heart(a, b, c):
    def heart(v):
        x = a * v.x
        y = b * (v.y -pow(abs(v.x),0.8))
        z = c * (v.z)
        return Vector((x, y, z))
    return heart

# make the heart bmesh
bm = bmesh.new()

# TODO come up with a nicer way to do this.
sphere_rings = [[SphericalCoordsPoint(1, radians(theta), radians(zi))
                 for theta in range (0, 360, 10)]
                 for zi in range(0, 181, 10)]

h = heart(1.0, 1.0, 0.2)

verts0 = [bm.verts.new(h(p.xyz)) for p in sphere_rings[0]]
verts0.append(verts0[0])
for ring in range(1, len(sphere_rings)):

    verts1 = [bm.verts.new(h(p.xyz)) for p in sphere_rings[ring]]
    verts1.append(verts1[0])

    faces = [
        bm.faces.new((
            verts0[i], verts1[i],
            verts1[i+1], verts0[i+1]
        ))
        for i in range(len(verts0) - 1)
    ]
    verts0 = verts1

# create mesh link it to scene etc
mesh = bpy.data.meshes.new("heart")
bm.to_mesh(mesh)
obj = bpy.data.objects.new("heart", mesh)
scene = context.scene

context.collection.objects.link(obj)
context.view_layer.objects.active = obj
obj.select_set(True)
obj.location = scene.cursor.location

which produced this result filled like the UV sphere (the node is in the middle of the heart

Can change the shape by tweaking the scalars in the heart equation. For example
def heart(v):
    x = v.x
    y = v.y -pow(abs(v.x),0.8)*1
    z = v.z * 0.5
    return Vector((x, y, z))

EDIT: this can now be done with h = heart(1.0, 1.0, 0.5)
produces

Samples of both using Spherical and Toroidal spaces

Another similarish object is the cardioid


Select a file from an invoke menu rather than ImportHelper or Panel What I'm after here is to give the user the freedom to either search for a missing image texture via file selector or replace it with a dummy image stored in the addon folder.

This is what I'm attempting to do:
class FixMe(bpy.types.Operator):
    """Find or replace missing image texture"""
    bl_idname = "object.fix_me"
    bl_label = "Fix Me"

    file_: bpy.props.StringProperty(name= "Image File", subtype='FILE_PATH')
    replace: bpy.props.BoolProperty(name= "Replace with a dummy image", default= False)

    def execute(self, context):
        print("Selected image is")
        print(self.file_)

        return {'FINISHED'}

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

    def draw(self, context):
        layout = self.layout
        col = layout.column()
        col.label(text= "Replace image")
        sub = col.column()
        sub.prop(self, "file_")
        if self.replace:
            sub.enabled = False
        col.prop(self, "replace")

I'm trying to get the selected file path using self.file_ but sounds that all the code in execute() does not run at all and an error find_node_operation: Failed for (DRIVER, 'cycles.seed') shows up in the console.
Adding Replace with a dummy image as an ImportHelper property will make the interface less intuitive, the user should be able to select that option in a single click rather than open a file browse window to do.
I'm aware that I can do that via Panels and Properties, but this will not fit into the use case I'm after in this particular situation.

Well, I've come up with a dirty workaround, by creating a new ImportHelper operator and added it to the menu. I couldn't think of a smarter approach that's why I'm not marking the answer as the correct answer.


Point density halo particle system not rendering 'head on' Rendered:

Refuses to render (Seemingly) outside of emitter:

Even when on a separate layer:

There is a rendering 'domain' that is sufficiently sized (Since it renders in the first instance) and it's not range clipping related so I'm sort of stumped.

The rendering issues seemed to be tied to how massive the scale of the project was (Needlessly, too).
Scaling down to 1:10 (The object is now 100m long, not 1km) seems to have fixed the issues with rendering particles at all angles.


How do I variate the color along one axis? So I have a laser-exhaust on my spaceship, coming out of the engines.

David already helped me variate the strength of the beam along the length, so it can taper off or remain strong along the length of the mesh.

But I also need to variate the color along the axis.

I'm modeling it after this: http://web.ccpgamescdn.com/newssystem/media/63965/1/EVE_Online_Retribution_OREFrigate.jpg

Which to be honest, I'm wondering if I need to scrap this material and try something else, but this feels above my head, I need some help.

Create a second color ramp node with the desired colors and plug it into the emission shader:


Blender for Mathematics Visualization EDIT: For those believing that Blender is good for mathematics or want to prove it, this may be helpful: Blender + Mathifold. I hope it does indeed meet the aspects I need Blender for.

I have recently discovered Blender and it seems a most powerful software. However, I am interested in mathematics visualization, pictures and media. To understand better the kind of things I am interested in, please visit the following links:

Film Dimensions

Film Chaos

Mathematical Imagery, Jos Leys

Ellipses (four videos in the middle of the page)

For such issues POV-Ray is usually recommended, but the design with Blender seems definitely easier. That is why I would like to ask you:

To what extent is it possible to design such mathematics visualization with Blender? And in this case, is there any place with a gallery of such pictures / videos?
Does Blender easily support rendering surfaces by parametric equations or (more difficult) implicit equations?
Is there anything else to recommend Blender for mathematics visualization?

The closest thing is the Add_3d_Function_Surface addon.

Related:

Generate curve from equation
Organic yet accurate modeling with the golden spiral


BPy Image_Editor - remove Image completely problem i have a big problem in the Image_Editor/UV to remove completely a Texture. her a screen:

I don't think I have to say anything more about that.

i hope anyone can me help.

UI redraw issue.

The issue you are seeing is UI related. The red is an indicator of this: warning that there is an issue, in this case showing the name of an image that has been removed.

If this is the case then issuing a tag redraw to the image editor will fix .

import bpy

img = bpy.data.images[0]
bpy.data.images.remove(img)

for a in bpy.context.screen.areas:
    if a.type == 'IMAGE_EDITOR':
        a.tag_redraw()


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

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

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


How to change from 30fps in the animation view (not render)? I'm trying to figure out how to change the fps for when I press the play button in the scene.

It automatically uses 30fps and moves down if the animation uses to much resource.

I want to force it to a specific fps (1fps or 2fps etc)

thanks

In time remapping, put New to something like 1000.
This will slow down the playback to 3 fps.


Looping Hook Modifier Assignment I've been trying to generalize the solution to this question: Using python to create a curve and attach its endpoints with hooks to two spheres, so that it can work on an arbitrarily long bezier curve, but I can't seem to get the hook_assign() function to work right. (See also How to use bpy ops that take a modifier Enum as an argument?)

When I print the state of .select_control_point for each point on the curve before (or after) I call the hook_assign function, the console output looks right except the function still returns Warning: Requires selected vertices or active vertex group.

Below the code is some sample console feedback.

noodcurv = bpy.data.curves.new('noodcurve', type='CURVE')       #create a new curve
noodcurv.dimensions = '3D'                                      #set some settings
noodcurv.resolution_u = 2
noodcurv.bevel_object = bevob
noodcurv.use_fill_caps = True

bez = noodcurv.splines.new('BEZIER')                            #create a new spline
bez.bezier_points.add(len(coords)-1)                            #add points
for k, coord in enumerate(coords):                              #set coordinates & handles
    p = bez.bezier_points[k]
    p.co = coord
    p.handle_right_type = 'VECTOR'                              #or 'AUTOMATIC', 'ALIGNED', 'FREE_ALIGN'
    p.handle_left_type = 'VECTOR'

noodcurvobj = bpy.data.objects.new('noodcurve', noodcurv)       #create object
modnames = ['hook.'+str(k).zfill(3) for k in range(len(coords))] #create modifier names

for k, coord in enumerate(coords):                              #create modifiers & set Parent Object
    noodcurvobj.modifiers.new(modnames[k], type='HOOK')
    noodcurvobj.modifiers[modnames[k]].object = bpy.context.scene.objects['link'+modnames[k][4:]]

scn = bpy.context.scene                                         #scene variable
scn.objects.link(noodcurvobj)                                   #link to scene & activate
scn.objects.active = noodcurvobj

bez.bezier_points[0].select_control_point = True                #this fixes the warning!?

bpy.ops.object.mode_set(mode='EDIT')                            #change context
for k, coord in enumerate(coords):                              #assign points to modifiers
    p = bez.bezier_points[k]                                    #assign points to variables
    p.select_control_point = True
    for q,t in enumerate(bez.bezier_points):                    #debugging check
        print('control point: ', q, ' is', t.select_control_point)
    bpy.ops.object.hook_assign(modifier=modnames[k])            #assign vextex to modifier
    p.select_control_point = False

bpy.ops.object.mode_set(mode='OBJECT')

Some of the console output:

control point:  0  is True
control point:  1  is False
control point:  2  is False
control point:  3  is False
control point:  4  is False
Warning: Requires selected vertices or active vertex group

control point:  0  is False
control point:  1  is True
control point:  2  is False
control point:  3  is False
control point:  4  is False
Warning: Requires selected vertices or active vertex group

control point:  0  is False
control point:  1  is False
control point:  2  is True
control point:  3  is False
control point:  4  is False
Warning: Requires selected vertices or active vertex group
...

(I know it'd be better if I could use one loop instead of three, but as I ran into problems I kept rearranging stuff to more closely mimic the original answer, and at this point I'm out of ideas!)

I also noticed that if I set .select_control_point = True for one or more points before I enter the third loop, the warnings go away and the modifiers are all assigned to whatever control point(s) I selected before the loop (even though the console output will indicate I'm still stepping through the selected points correctly).

So what am I missing?

After a great deal of rearranging code and learning what doesn't work, I've finally found the solution! The key turned out to be these two lines from the answer to the related question, (Using python to create a curve and attach its endpoints with hooks to two spheres):

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

# the mode_set() invalidated the pointers, so get fresh ones
p0 = curve.splines[0].bezier_points[0]
...

So all I needed was to add the line p = noodcurv.splines[0].bezier_points, before entering the loop. So this is the final code:

noodcurv = bpy.data.curves.new('noodcurve', type='CURVE')       #create a new curve
noodcurv.dimensions = '3D'                                      #set some settings
noodcurv.resolution_u = 2
noodcurv.bevel_object = bevob
noodcurv.use_fill_caps = True

bez = noodcurv.splines.new('BEZIER')                            #create a new spline
bez.bezier_points.add(len(coords)-1)                            #add points
p = bez.bezier_points                                           #for convenience
for k, coord in enumerate(coords):                              #set coordinates & handles
    p[k].co = coord
    p[k].handle_right_type = 'VECTOR'                           #or 'AUTOMATIC', 'ALIGNED', 'VECTOR'
    p[k].handle_left_type = 'VECTOR'

noodcurvobj = bpy.data.objects.new('noodcurve', noodcurv)       #create object
modnames = ['hook.'+str(k).zfill(3) for k in range(len(coords))] #create modifier names

for k, coord in enumerate(coords):                              #create modifiers & set Parent Object
    noodcurvobj.modifiers.new(modnames[k], type='HOOK')
    noodcurvobj.modifiers[modnames[k]].object = bpy.context.scene.objects['link'+modnames[k][4:]]

scn = bpy.context.scene                                         #scene variable
scn.objects.link(noodcurvobj)                                   #link to scene & activate
scn.objects.active = noodcurvobj

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

p = noodcurv.splines[0].bezier_points
for k in range(len(coords)):                                    #assign points to modifiers
    p[k].select_control_point = True                            #select point
    p[k].select_left_handle = True
    p[k].select_right_handle = True
    bpy.ops.object.hook_assign(modifier=modnames[k])            #assign vextex to modifier
    p[k].select_control_point = False                           #deselect point
    p[k].select_left_handle = False
    p[k].select_right_handle = False
    p[k].handle_right_type = 'FREE'                             #or 'AUTOMATIC', 'ALIGNED', 'VECTOR'
    p[k].handle_left_type = 'FREE'

bpy.ops.object.mode_set(mode='OBJECT')


Blender 2.8 Smoke Sim Bug Recently, I started using 2.8 for smoke simulation. Everything looks normal until I render it out. Though I can preview the smoke in the viewport(render mode), it does not appear in the final render(F12).
Then, I found out that I have to bake the smoke in order to render it out. I even saw some article in the forum stated it is "mandatory" to have your smoke baked.
But is it? I mean I'm not a expert in blender but I pretty sure that baking is not mandatory back in 2.79, right?
Is this some kind of bug or something, any suggestion?

(BTW, I'm using cycles in the 2.8)

THX

You don’t need to bake.
Try adding a Volume Scatter node to Smoke Domain and connect it to Volume input of the material. Also delete the standart BSDF.


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

How do I get back to that panel to adjust operator settings?

Unfortunately, you can't. Once you perform another operation, the changes are set.

However, the operator should retain its last-used settings; you can delete the knot and re-add it, then change the settings to suit your liking.

If you want to change the settings before doing anything else, you can use the panel in the Tool Shelf, or press F6 in the 3D View to bring up the options for the last-used operator.


How do I get file such as texture out of already packed blender file? So I downloaded some .blend files, and it came in .blend files with packed texture file (meaning the texture is not in separate files or folder, but packed inside the .blend file).

How do I get the texture from this 'already packed .blend file' out of it in a separate file so I can apply it to my other 3d model ?

You can either go in the UV/Image Editor, and, in the bottom horizontal menu, select the image you want to save un the drop-down menu, then Image menu > Save As Image... or in the Node Editor, click on the Open (now Unpack) button of the Image Texture node: as the images have been packed, this button will unpack the image the way you want


How to match a separate dome mesh for an eye to an irregular eye hole perimeter? I've got a simple head mesh with eye holes already cut and I would like to add eyes as a separate mesh. I would like to maintain the dome-like topology of the new eye mesh while matching the existing eye hole perimeter. This is a bit of a challenge since the eye holes are bit irregular in all axes (part of the design).
I've only got a few flight hours in blender, but so far I've tried simple deform, mesh deform and shrinkwrap modifiers to match the eye mesh to the eye perimeter. I've also tried making a grid fill of the eye perimeter and then proportional editing to grab and pull out but the shape turns out pretty bad. I also tried insetting and extruding the eye perimeter to stairstep new geometry in a dome-like fashion, but couldn't get the results to be dome-like.
If I can utilize modifiers to get me pretty close then I can tweak vertices from there.
Final utility: to be separate meshes for 3d printing ... therefore the number of vertices on the eyehole don't necessarily need to match the eye.
(Next time I will probably model the eyes before making the eye holes.)

Your shape is a bit hard to work as it is already high in polygons, you should not work with high-poly as long as you are not satisfied with the whole shape in my opinion (and even afterwards, keep it low-poly, use a Subdivision Surface modifier to smooth, and only apply it if necessary), but, starting with what you're sharing, what you could do is duplicate the outer edge loop, simplify it (header menu > Select > Checker Deselect, then X > Dissolve vertices):

Then extrude inwards and fill:

Put it on the head, make some adjustments:

If you want to smooth it, give it a Subdivision Surface modifier (3 subdivisions) and apply:

Here is what it gives:


Placing an image under a transparent object won't reflect in it So I'm basically placing a sample poster under some transparent dominoes I created. First I had a normal plane under the objects to see the transparent effect but when I placed an image (I imported it as a plane) the grey blender background only reflects in the dominoes. I feel like there is a simple solution to this but I'm new to blender and hoping someone can help me out!

If you are using Eevee as your render engine, in Render Properties you have to enable Screen Space Reflections
Without
With
If you are using cycles it should work unless your dominos have bad geometry.
Select a domino
take it into edit mode
select all
type SHIFT-N to recalculate normals.
If that doesn't work you've got other geometry problems.


Locomotive Bogie U shape bracket modelling I'm working on bogies for my locomotive model and I'm kinda stumped at how best to approach this shape:

That center U shaped piece the springs sit on, how would you recommend modelling it?
Cheers! :)

You could do it with some bevels:

Create the profile (use a Mirror modifier as it is symmetetrical):

Begin to bevel the vertices (ShiftCtrlB to bevel vertices, or CtrlB and click the Vertices option in the Operator box):

Do the same with all the vertices (keep the same amount of segments):

Fill the faces (it's fast if you fill the first face then only keep one edge selected and press F several times):

Extrude, bevel the edges, etc...


Options for object creation are greyed out I am trying to model a tree. I turned on the Add a sapling add-on in user preferences, however once I want to begin editing the settings, they come up but is grey and doesn't let me click on it.

I have also attached my blend file here: http://www.pasteall.org/blend/32199

You have to enable: Global Undo
For 2.8x and 2.9.
Edit > User preferences > System > Memory & Limits: Global Undo

For 2.79
You can do it in User Preferences (Ctrl+ Alt U), in "Editing" Tab.


How to add a button to outliner header via python script? Is it possible to add a button via python to here?

The header of the outliner panel can be accessed through bpy.types.OUTLINER_HT_header. It is possible to add additional buttons to the header by appending or prepending a draw function which assigns the relevant operators to the layout. The draw function could look like the following, if your operator class is called EXAMPLE_OT_something.
def draw(self, context):
        self.layout.operator(EXAMPLE_OT_something.bl_idname)

If the operator has been registered the draw function can be appended to the header. This places the button at the end of the header. Using .prepend would place it at the beginning.
bpy.types.OUTLINER_HT_header.append(draw)

Below is an example add-on that demonstrates the concept.
bl_info = {
    "name": "Outliner Header Button",
    "author": "Robert Guetzkow",
    "version": (1, 0, 0),
    "blender": (2, 81, 0),
    "location": "Outliner",
    "description": "Adds an example button to the outliner header.",
    "wiki_url": "",
    "category": "Outliner"}

import bpy

class EXAMPLE_OT_something(bpy.types.Operator):
    bl_idname = "example.something"
    bl_label = "Do something"
    bl_description = "This operator does something"
    bl_options = {"REGISTER"}

    def execute(self, context):
        print("Hello")
        return {"FINISHED"}

def draw(self, context):
    self.layout.operator(EXAMPLE_OT_something.bl_idname)

classes = (EXAMPLE_OT_something,)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)

    bpy.types.OUTLINER_HT_header.append(draw)

def unregister():
    bpy.types.OUTLINER_HT_header.remove(draw)

    for cls in classes:
        bpy.utils.unregister_class(cls)

if __name__ == "__main__":
    register()


How can I smooth edges but keep faces untouched? How can I keep 1 face flat but smooth everything else?

I want to keep the line from the first picture. I tried auto-smooth but it doesn't work. It works with shade smooth and edge split, but shade smooth its not enough to give me this effect, I still need to apply a subdivision surface and when I do that, the line also disappears because that specific face is smoothed too...

While the best would be to find a topological solution, Shade Flat and Shade Smooth can also be applied on a per face basis in edit mode.  This can produce some strange results sometimes.


How to unlink a material only from a linked object? I've created a second scene with a linked object but want to replace the materials on those objects only in the second scene.

Nothing happens if I choose the material in the outliner and choose unlink. Is there some other way to do this?

If it's a mesh object, it might be that your material is linked to the mesh (the data), not the object. Try this structure: Two different objects, both of which use the same mesh. The materials are linked to the objects instead of the mesh. Then you have an object identical in shape, but different in color.

You can set the type of link to the right of the material name.


How to use the File Browser's (with ImportHelper) execute function? I now have the file browser, and I've found out how to load the texture into the node but not from the file browser. I have to type the file path in manually, and I had to put it in a different class that was activated with a bool... so, how can I activate the file browser instead?

code

import bpy
import os
from bpy.types import (Menu, PropertyGroup)
from bpy.props import (BoolProperty, FloatProperty, EnumProperty, StringProperty)
from bpy_extras.io_utils import ImportHelper

def update_texture(self, context):
    path = self.screen_texture.value
    img = bpy.data.images.load(filepath = path)

    nt = bpy.data.materials['Screen'].node_tree
    n = nt.nodes["screen_texture"].image = img

class IgnitProperties(bpy.types.PropertyGroup):

    screen_path = StringProperty(
       name="Browse Image:",
       description="Loads the texture for the screen",
       maxlen= 1024,
       subtype='FILE_PATH',
       update=update_texture
   )

class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_label = "File Browser"
    bl_idname = "macbook_controller.identifier_file_selector"

    def execute(self, context):
        fdir = self.properties.filepath

        # Screen Texture

        return{'FINISHED'}

class IGLayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "MacBook Controller"
    bl_idname = "macbook_controller.macbook_controller"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        scene = context.scene

        # Screen Texture
        layout.label(text = "Screen Texture:")
        layout.prop(scene.ignit_panel, "screen_path", text="")

Use the ImportHelper - a class that wraps the FileBrowser.

import os
from bpy_extras.io_utils import ImportHelper

class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_idname = "something.identifier_file_selector"
    bl_label = "some folder"

    def execute(self, context):
        fdir = self.properties.filepath

        # do something with fdir here  (fullpath)

        return{'FINISHED'}

bl_idname

Should be lowercase.
For your own sanity it's useful to make it consistent with the class name. If the class name is XxxxxxYyyyZzzzzz then a predictable  bl_idname would be "xxxxx_yyyyy_zzzz"
The prefix (i called it "something" in the code above) is a way for you to create a namespace for your own operators. Each operator is found in bpy.ops.* therefor your operator would be found at bpy.ops.something.identifier_file_selector

In this scenario, the StringProperty isn't something you want to be typing into ever. The update function is a little overkill then. See that property as visual reference to show you which file you picked.

class IgnitProperties(bpy.types.PropertyGroup):
    screen_path = StringProperty(description="Contains path to a texture")

class IdentifierFileSelector(bpy.types.Operator, ImportHelper):
    bl_label = "File Browser"
    bl_idname = "macbook_controller.identifier_file_selector"

    def execute(self, context):
        # Screen Texture
        img = bpy.data.images.load(filepath=self.properties.filepath)

        # update the node
        nt = bpy.data.materials['Screen'].node_tree
        n = nt.nodes["screen_texture"].image = img

        # also update this StringProperty so it reflects what you picked
        context.scene.ignit_panel.screen_path = self.properties.filepath
        return{'FINISHED'}

your draw

scn = bpy.context.scene
row = layout.row()
row.prop(scn.ignit_panel, "screen_path")  # <-- just for display purposes
row.operator("macbook_controller.identifier_file_selector", text="", icon='FILE')


Exported Model and Shader Not Displaying as Intended I used Blender 2.79 to create this model and shader in cycles render

I exported it as a .obj & then attempted to display it in a-frame and I get the following result

I would like to know how I can get the same glassy shader on the exported model

The problem is that Cycles is a blender specific feature and any shader you make in a .blend file wont really transfer to say an .obj or any other exported file form.

For what I know, .obj's consist of a mesh and a texture and can't display such a complicated shader as a refractive, ray-traced glass.


How can I make my 2d character and background non transparent Hello I am working on an animaiton and when my character walks I can see the back ground through him. It appears to be very transparent. Most animations the character and back ground are seperate and you do not see anything moving through the character unless intended to do so. Can anyone help me with this? Thank you.

Every Grease pencil material can have a line, or a fill, or both.
Your materials look like they are only lines.
The usual workflow is to draw the lines, then use the fill tool to automatically add a new stroke with a fill-only material.
If the lines aren't closed, you can use the Alt key to temporarily switch the fill tool to a stroke, which lets you close the gaps (make sure that fill and stroke of your fill material share the same colour).
In my example in the right third I've scaled lines only, to underline the fact that lines and fills are two different strokes (but fill strokes are a single click of fill tool, or a little more).


problem with subdivision surface modifier So Im making this model of BMO from Adventure Time.Being beginner and all I am not quite skilled with subdivision surface modifier(and all modifiers in general),so could somebody tell me a way to model these "fingers" so they dont look warped the way they look now.
Thanks!

Use sculpting on the finger or try to roughly model them in edit mode and then use the subsurf modifier.


I want to learn how to create 3D games using Blender and Godot. First Step would be what steps would I need to create a universe? Have basic understanding of Scenes and Nodes.
Things I want to have are:
Black Hole (The Center of my Creation, I hope)
Constellations (Which I plan to orbit around the Black Hole)
Stars or Suns (Which I plan to orbit around the Black Hole)
Planets (Which I plan to orbit around Stars or Suns)
Dead Planets (Planets which do not have atmosphere)
Live Planets (Which have atmosphere and can support life)
Asteroid Belt (Which I plan to orbit around Stars or Suns)
Moons (Which I plan to orbit Planets)
Space Stations (To orbit anything or on the surface of a Planet or moon)
Ships to travel
Playable Characters
and Playable Characters.
Knowing this is more on the Basics, I just need to get a general idea on how to do many of these items or objects and make templates for adding others simply.
Like adding new start from a list of star types, and the same with planets, moons and space stations.

Sounds like you want to make a game, and really you just want to make some assets.  I'm not sure this it's possible to really answer the high level of complexity here but I can give you some overviews.

LOD is Level of Detail, and it means that you create at least three versions of a planet (Or any other object): A small four point plane with an image mapped to it for when you are too far away to care what it looks like, a low poly sphere with a texture mapped onto it for medium range, And a high detail version which includes multiple sphere's with transparency set on the outer spheres to represent clouds and atmospheres.

Use camera cuts to show show them landing on the surface, and then load up an area with natural boundaries to keep them contained in that area.

As for your universe and the planetary systems, there are quite a lot of ways to accomplish this.  I'm just going to suggest A way.

Create a few basic models of planets and moons together as groups.  Parent them to an empty object at the center of your planets.  Add Array modifiers to the moon to get more than one moon. Use drivers on the rotation of the empty to rotate the moons, and a driver on the moon to turn the base moon. Try playing with array modifiers stacked on array modifiers.

Once you have some variations of planets, you create a subdivided plane and add particles to it.  The particles can be groups and you can add your planet groups to the particle field.  Make sure you use the outline view of the plane to turn rendering of the plane off.  You can add more planes with different geometry to cluster or distribute other planet groups.  Remove geometry in the center of your plane to make room for the black hole.

Use a very large sphere UV mapped with stars with the normals flipped inside to represent deep space.

Use the camera depth to trigger your LOD detail for the planets and moons.

Assuming this is for a game, you CAN use the blender game engine, but you should probably leave it to Unity or the Unreal Engine (UE4) for the actual game environment.


Black artifacts on plane with procedural displacement I'm trying out the procedural displacement in 2.8 with Cycles following this tutorial. The object has 100 subdivisions in addition to a SubSurf modifier, and one material with two shaders separated to form rocks and some water. When rendering with 4 levels of subdivisions, there are these black marks all over the water.

When I render with only 3 subdivisions, there are fewer artifacts.

Shouldn't more subdivisons give a more realistic render?
.blend

Sorry for the late answer, but those are not artifacts. The person in the tutorial used procedural displacement to create "waves" in the water by adding a noise texture to displace the water surface, then stretching it in one direction. If you look closely, the black marks are actually parts of the waves.

Take a look at the noise texture you used to create this effect and make sure it is scaled properly. This also makes sense because displacing a more high-res geometry just results in more intricate details like you have noticed.

A little advice for later on: when following a tutorial, don't just try to copy everything. That will get you a result, but in the end, you have learned nothing. Try to understand what the person is doing. This will teach you a lot, and will also make it easier to find and solve mistakes.


is there a way to automate render file names and avoid accidental overwrites? is there a way to automate render file names and avoid accidental overwrites?

E.G. add timestamp to filename?

I find my workflow involves many fast test renders, and it drives me nuts that for each time I launch F12 if I have not renamed previous render and overwrite is enabled I lose it, if overwrite is not enabled it does not save the file automatically.

I am using the compositor file output node to at least automate file saving for images

I do not understand why there is no simple way to press F12 and have a file with a unique name (eg. timestamp added at end) be saved automatically as soon as the render is complete, it seems ridiculous that you can wait maybe hours for a render to be done and risk losing it entirely because it is accidentally overwritten or you forget that you have not saved it.

After a day passed fruitlessly googling and reading forums I humbly ask for help here!

The following add-on generates a unique file path from a given directory and the current timestamp. It modifies both the output path (Output Properties > Output) and every base path of File Output nodes.

For instance, if the directory (Output Properties > Auto-Filename > Directory) is set to C:\tmp\ and the current timestamp is 2020-03-22_01_10_43_857754 then the output path is C:\tmp\2020-03-22_01_10_43_857754\#### and the base path of the File Output nodes are C:\tmp\2020-03-22_01_10_43_857754\[name of the file output node].
bl_info = {
    "name": "Auto-Filepath",
    "author": "Robert Guetzkow",
    "version": (1, 0, 2),
    "blender": (2, 80, 0),
    "location": "Output Properties > Auto-filepath",
    "description": "Automatically sets a unique filepath for each frame based on the current timestamp.",
    "warning": "",
    "wiki_url": "",
    "category": "Render"}

import bpy
import datetime
from pathlib import Path
from bpy.app.handlers import persistent

@persistent
def update_filepath(self):
    if not bpy.context.scene.auto_filepath_settings.use_auto_filepath:
        return
    now = datetime.datetime.now()
    path = Path(bpy.context.scene.auto_filepath_settings.directory)
    base_path = path / now.strftime('%Y-%m-%d_%H_%M_%S_%f')
    bpy.context.scene.render.filepath = str(base_path / "####")
    bpy.context.scene.render.use_file_extension = True
    bpy.context.scene.render.use_overwrite = False
    if bpy.context.scene.use_nodes:
        for node in bpy.context.scene.node_tree.nodes:
            if node.type == "OUTPUT_FILE":
                node.base_path = str(base_path / node.name)

def set_directory(self, value):
    path = Path(value)
    if path.is_dir():
        self["directory"] = value

def get_directory(self):
    return self.get("directory", bpy.context.scene.auto_filepath_settings.bl_rna.properties["directory"].default)

class AutoFilepathSettings(bpy.types.PropertyGroup):
    use_auto_filepath: bpy.props.BoolProperty(name="Automatic filepath generation.",
                                              description="Enable/disable automatic filepath generation. When enabled, "
                                                          "this will overwrite the output path and the base path of "
                                                          "all File Output nodes.",
                                              default=False)

    directory: bpy.props.StringProperty(name="Directory",
                                        description="Directory where files shall be stored.",
                                        default="/",
                                        maxlen=4096,
                                        subtype="DIR_PATH",
                                        set=set_directory,
                                        get=get_directory)

class AUTOFILEPATH_PT_panel(bpy.types.Panel):
    bl_label = "Auto-Filepath"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "output"
    bl_options = {"DEFAULT_CLOSED"}

    def draw_header(self, context):
        self.layout.prop(context.scene.auto_filepath_settings, "use_auto_filepath", text="")

    def draw(self, context):
        layout = self.layout
        layout.prop(context.scene.auto_filepath_settings, "directory")

classes = (AutoFilepathSettings, AUTOFILEPATH_PT_panel)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.auto_filepath_settings = bpy.props.PointerProperty(type=AutoFilepathSettings)
    if update_filepath not in bpy.app.handlers.render_pre:
        bpy.app.handlers.render_pre.append(update_filepath)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.auto_filepath_settings
    if update_filepath in bpy.app.handlers.render_pre:
        bpy.app.handlers.render_pre.remove(update_filepath)

if __name__ == "__main__":
    register()

The add-on can also be downloaded from GitHub Gist.


easiest way to do this? (Amplifier Grid) i finished full donat tutorial. and im wondering can u tell me the easiest way to do it ? I tried modeling myself with path and using array model but it doesnt look right becouse i cant do it to look evenly across.

any tips ?

Edit: Robin Betts inspired me a simplification. You could do it with arrayed meshes:

Build your segment, move up the middle with the Proportional Editing option, duplicate and turn it upside down.

Give it 2 Array modifiers to duplicate the segments on the X and Y axis. Duplicate and rotate the whole thing 180°.

Keep a copy somewhere, rotate all 45° on the Z axis, apply the modifiers, join everything, delete the mesh so you only keep a square grid.

To finish, curve the edges with a Curve modifier.


Warning from custom panel unable to get Python class for RNA struct '' First time posting here so excuse me if there is an issue with this question.

I have been writing a custom UI addon for blender I have taken out the majority of the code and hopefully kept it as clean as possible to replicate this warning. I often use the console window for debugging and when I am using my plugin the following warning is constantly spammed:

unable to get Python class for RNA struct 'MAIN_PT_Mainpanel

The simplified code that produces this error is as below:

import bpy
import numpy as np
import mathutils as m
import math
import os

bl_info = {
    "name": "Generation tool",
    "description": "",
    "author": "",
    "version": (0, 0, 4),
    "blender": (2, 80, 0),
    "location": "3D View > Tools",
    "warning": "",  # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

from bpy.props import (StringProperty,
                       BoolProperty,
                       IntProperty,
                       FloatProperty,
                       FloatVectorProperty,
                       EnumProperty,
                       PointerProperty,
                       CollectionProperty
                       )
from bpy.types import (Panel,
                       Menu,
                       Operator,
                       PropertyGroup,
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MyProperties(PropertyGroup):

    sample_rate: IntProperty(
        name="Samples",
        default=500
    )

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class Main_panel(Panel):
    bl_label = "Generation Settings"
    bl_idname = "MAIN_PT_Mainpanel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Generation"
    bl_context = "objectmode"
    @classmethod
    def poll(self, context):
        return context.scene is not None
    def draw(self, context):
        layout = self.layout

class General_sett_subpanel(Main_panel, bpy.types.Panel):
    bl_idname = "SUB_PT_Gensett"
    bl_label = "General Settings"
    bl_parent_id = "MAIN_PT_Mainpanel"

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

        layout.prop(mytool, "sample_rate")

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MyProperties,
    Main_panel,
    General_sett_subpanel
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)
    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()

I would appreciate any help you can offer me. Thanks in advance!

I've coded a fair amount of scripts that use Blender's layout api, but i've never ventured into subpanels. So i may be misunderstanding the intent here.

try

class General_sett_subpanel(bpy.types.Panel):
    bl_idname = "SUB_PT_Gensett"
    bl_label = "General Settings"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_parent_id = "MAIN_PT_Mainpanel"

notice this drops the inheritance of the Mainpanel, but forces you to add bl_space_type and bl_region_type explicitly.  I'm not sure it made sense to inherit Mainpanel, the Mainpanel's poll function will determin if the subpanel is displayed anyway.

either way, this does suppress the warning.


Removing the arms/legs from a mixamo model I'm quite new to blender so I don't know how tricky this may or may not be.

I'm trying to specifically remove the arms/legs from a Mixamo model. I've tried going into edit mode and deleting vertices, but I thought that would be too tedious given that they are all together.

I also tried moving the pose to a different position before going into edit mode, but the pose gets reset in edit mode as well. Any tips/hints?

You can essentially get rid of the arms by adding a cube, scaling the cube over the part of the model that you don't want, and adding a boolean modifier to that cube. In the boolean settings, make sure that the boolean operation is set to difference. (It should be the default). Finally, set the object that it removes mesh from to your model. Now apply the modifier.


Understanding 3D transforms and rotations I am aware that a 3-D linear transform (combination of: stretch, shear, rotation) takes the form of a 3x3 matrix.

Also that if the transform is required to also handle translations, then one can either use 3x3 matrix + translation vector, or 4x4 matrix

However, I'm also aware that there is a different technique for handling rotations: to use quaternions, which looks like a 4x4 matrix (but does it behave in the same way?).

So my question is: how do these objects play with one another?

Say I start up my default Blender scene with a cube and a camera.

Now that transform panel is confusing to me. As it stands in that picture, I can imagine blender is using either 3x3 matrix + translation vector, or 4x4 matrix

But then there is a 'Rotation Order' pulldown which allows quaternions.

Can anyone explain what blender does behind the scenes?

The reason for my asking is that I'm attempting a script that transforms an object into camera space (i.e. If you were to transform the scene so that the camera is at the origin pointing downwards, wherever the object ends up, this is the location I use)

def main(context, num):
    bpy.ops.scene.new(type='FULL_COPY')
    cloneScene = bpy.context.scene
    cloneScene.name = 'clone'

    camera = cloneScene.camera

    for ob in cloneScene.objects:
        if ob.type == "MESH":
            me = ob.data

            # WorldToCam( ObToWorld( ObCoord ) )
            world2cam = camera.matrix_world.inverted()
            ob2world = ob.matrix_world

            obj2cam = world2cam * ob2world

            bm = bmesh.new()
            bm.from_mesh(me)

            bm.transform(obj2cam)

            for v in bm.verts:
                v.co = MyTransform(v.co)

            cam2obj = obj2cam.inverted()
            bm.transform(cam2obj)

            # save back into orig mesh
            bm.to_mesh(me)

And so I would like to have a clear understanding of what is happening when I apply a transform.

Although I've tested that this method works in simple cases, it looks like it might fall over when dealing with translations and quaternions (seeing as I'm inverting the matrix not the transform, I'm not sure if these are guaranteed to be the same. In a straight linear transformation they are...)

EDIT:
http://www.essentialmath.com/GDC2013/GDC13_quaternions_final.pdf <-- amazing walkthrough!

ftp://ftp.cs.indiana.edu/pub/hanson/Siggraph01QuatCourse/vqr.pdf <-- starts good, lost me with the links

courses.cms.caltech.edu/cs171/quatut.pdf <-- Ken Shoemake Quaternions

The transformations are applied in this order: scale, rotation then translation.
Note that you would need to multiply the matrices in the reverse order to get a single transformation matrix.

For a rotation around one axis you would only need a $2\times 2$ matrix, e.g. a rotation around the z-axis wouldn't change the z-values of the vertices. For $(x,y,z)$ vertices a $3\times 3$ matrix is more convenient since it can hold all rotations. The conversion from $3\times 3$ (orange) to $4\times 4$ is done by adding (green) a $1$ to the bottom right cell and fill the remaining with $0$.

$$
\begin{aligned}
&\begin{bmatrix}
\color{orange}1 & \color{orange}0 & \color{orange}0 & \color{green}0\\
\color{orange}0 & \color{orange}{\cos{\theta}} & \color{orange}{-\sin{\theta}} & \color{green}0 \\
\color{orange}0 & \color{orange}{\sin{\theta}} & \color{orange}{\cos{\theta}} & \color{green}0 \\
\color{green}0 & \color{green}0 & \color{green}0 & \color{green}1\\
\end{bmatrix}\\
R_x = &\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & \cos{\theta} & -\sin{\theta} & 0\\
0 & \sin{\theta} & \cos{\theta} & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\\
R_y = &\begin{bmatrix}
\cos{\theta} & 0 & \sin{\theta} & 0\\
0 & 1 & 0 & 0 \\
-\sin{\theta} & 0 & \cos{\theta} & 0\\
0 & 0 & 0 & 1
\end{bmatrix}\\
R_z = &\begin{bmatrix}
\cos{\theta} & 0 & -\sin{\theta} & 0\\
\sin{\theta} & 1 & \cos{\theta} & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}
\end{aligned}
$$

A translation vector doesn't fit into this matrix, therefore it is expanded to a 4x4 matrix. This is in order to make translation compatible to the other transformations (This is called Homogeneous coordinates.)

$$
\begin{aligned}
T(d_x, d_y, d_y) &= \begin{bmatrix}
1 & 0 & 0 & d_x\\
0 & 1 & 0 & d_y\\
0 & 0 & 1 & d_z\\
0 & 0 & 0 & 1\\
\end{bmatrix}\\
S(s_x, s_y, s_y) &= \begin{bmatrix}
s_x & 0 & 0 & 0\\
0 & s_y & 0 & 0\\
0 & 0 & s_z & 0\\
0 & 0 & 0 & 1\\
\end{bmatrix}
\end{aligned}
$$

Quaternions are a more complex way to describe rotations which avoids a Gimbal Lock, a situation where you would loose one degree of freedom.

Related questions:

What is the order of transformations when exporting to Collada?
Could someone please explain gimbal lock?
Apply rotation to camera?


How to achieve higher BGE frametime? When I hit P, my game starts usually. I have "Show Framerate and Profile" ticked, and when I play, it seems that there is a cap at 60 for my frames. How can I increase this? Also, it reads the following: Frametime  :  00.0ms (00.0fps). What is the "00.0ms"? Mine does not display 0, thats just for explanation, but I am quite confused on what it means. To summarize, how can I increase the fps cap and what does the "00.0ms" area mean?

The default settings are "capping" the framerate to 60, but it seems you can "unlock" the cap by deselecting the "use frame rate" checkbox under render > system properties tab:


How to set random X Y Location from script? I want to set random X Y location between a float range, lets say 1 to 3, and I want to set a keyframe after that. I came across this script but I couldn't figure how to set location from random:

import bpy
import math

ctx = bpy.context
ops = bpy.ops

ctx.scene.frame_start = 0
ctx.scene.frame_end = 400

ctx.scene.frame_current = 0

for i in range(400)
    ctx.scene.frame_current = i
    //how to set random locatio here?
    ops.anim.keyframe_insert_menu(type='Location')

Any tips are welcome.

random.uniform(a, b) returns a random float between a and b

import bpy
from random import uniform
from mathutils import Vector

context = bpy.context
obj = context.object
minloc = 0
maxloc = 3

# set frame with scene.frame_set()
# setting scene.frame_current wont always work.

scene.frame_set(frame)

for axis in "xy":
    setattr(obj.location, axis, uniform(minloc, maxloc))

obj.keyframe_insert('location', frane=frame, group="Location")

Scripts that loop thru frames and change frame using scene.frame_current = frame often appear to fail because only the first frame value is keyed as changing frame_current doesn't call a scene update, whereas set_frame does.


I can't find the ` apply ` button in subsurf modifier After I made desired shape with subdivision modifier, how do I turn it into a mesh, there is no apply button in modifier.

You have to click the little down arrow in the modifier options. The apply option is hidden underneath:


Mesh not UV unwrapping well? I have my model made and seams marked but the mesh doesn't unpack well. I tried exporting and painting it in Photoshop anyway but doesn't apply like it should. What am I doing wrong?

Solid view:

Textured View:

Rendered View:

Seams/Wireframe View:

It looks like the normals are not consistent.

Those dark spots on the mesh are caused by flipped normals. By enabling face normals display in 3D view > Properties region > Mesh display > Normals, you will notice that they are pointing the wrong direction:

To fix this, select everything in edit mode (A) and press CtrlN.

Now all the normals should be facing outwards:


I am using a Magic Mouse but am not able to select any vertices or faces I am using a Magic Mouse but am not able to select any vertices or faces altought I have changed the use preference of the mouse to emulate 3 button mouse and select with right click in blender.
Can u help me with that.

I also work with a magic mouse and only changing the Blender user preference is not enough. You also have to change the right click settings in the system preferences of your apple system. So .. check Secondary Click for right click on the Mouse preferences.


Texture rendering differently than in material view Newbie here.

What could be wrong here? I want bricks to appear like in material view.

It was good before. Must have done something a little wrong.

Change the scale of your mapping node to something greater than 0


Add animated "tv static" effect to object in animation? Essentially, I want to animate a white noise/tv static effect on a shape for like a couple seconds.

How would i go about doing this? (I'm a blender noob)

Just use any high frequency texture like a small scale Voronoi, Noise or similar, attached to your shader, like an Emission and then animate it.

In this example I use a Voronoi texture, set to Cells with a high scale value. Then just animate any parameters you like.
Easists and most seamless would probably be animating the position of the texture. If the speed is higher than the animation frame rate it will just look like it is changing randomly.

Use a Color Ramp node to adjust coloring and intensity as desired.


AttributeError: __exit__ error on custom operator I'm new to both python and scripting in Blender, so I am sure this is just my misunderstanding of how python and the Blender API work. I have no idea what this error means.

This is the full traceback for my error:

Traceback (most recent call last):
  File "/clipImporter.py", line 103, in execute
  File "/clipImporter.py", line 78, in scan_files
AttributeError: __exit__

location: <unknown location>:-1

location: <unknown location>:-1

So as the file name suggests, I am just making an importer to bring in clips, objects from libraries or whatever. I have a similar script working for .blend objects, but trying to do it with movie clips is giving me this error. So I have a suspicion that it is my misuse of datablocks. Here's some more relevant code:

The Function

def scan_files(folderpath, datablock):
    exec("bpy.context.scene." + datablock + "_directory_list.clear()")
    exec("bpy.context.scene." + datablock + "_directory_index = 0")

    folderpath = bpy.path.abspath(folderpath)

    for file in os.listdir(folderpath):
        filepath = folderpath + "\\" + file
        with bpy.data.movieclips.load(filepath) as (data_from, data_to):  # this is line 78...I have a feeling it's movieclips.load
            for name in eval("data_from" + datablock):
                my_item = eval("bpy.context.scene" + datablock + "_directory_list.add()")
                my_item.name = name  # these two correspond to custom props group
                my_item.file = file

The Class

def execute(self, context):
        if bpy.context.scene.dir_clip:
            if context.scene.folderpath_clip:
                scan_files(context.scene.folderpath_clip, "clip")  #this is line 103

        return{'FINISHED'}

I've been hacking and slashing this guy's script to do what I want if you want to see his logic behind his importing. The scan files function is scanning a directory and loading available options to import.

If you need the whole script let me know and I'll do a pasteall, though I'm sure I could probably solve the error if I even knew what AttributeError: __exit__ actually meant. I do come from a bit of a C# background, so an explanation paralleled to that would be fabulous.

Thanks lovely people!

focus on the code around the error:

import bpy

files = ['/home/zeffii/GL_fillet.mpeg', '/home/zeffii/GL_fillet2.mpeg']

for filepath in files:
    with bpy.data.movieclips.load(filepath) as (data_from, data_to):
        print(data_from, data_to)

Even from that snippet I get AttributeError: __exit__

I may be wrong, but this suggests to me that there is no context manager (in the python sense, not in the bpy.context sense) to use with x.y.z as (a, b) on the bpy.data.movieclips.load() operator. Hence that error. The documentation confirms this. movieclips.load() does return an object though!

If you just want to get stuff done, rewrite it so it doesn't use the with x.y.z as (a,b) context, instead assign to the left.

import bpy

files = ['/home/zeffii/GL_fillet.mpeg', '/home/zeffii/GL_fillet2.mpeg']

for filepath in files:
    clip = bpy.data.movieclips.load(filepath)
    # you know what you need here.
    print(clip.name)
    print(clip.size[:])
    print(clip.source)

>>> GL_fillet.mpeg
>>> (1280, 720)
>>> MOVIE
>>> GL_fillet2.mpeg
>>> (1280, 720)
>>> MOVIE

Additionally, there's also a typo I think. The original code has

for name in eval("data_from." + datablock):
    # blah..

and you omit a necessary . after data_from..

Your scan_files function for movie_clips might start to look something like:

def scan_files(folderpath, datablock):
    exec("bpy.context.scene." + datablock + "_directory_list.clear()")
    exec("bpy.context.scene." + datablock + "_directory_index = 0")

    folderpath = bpy.path.abspath(folderpath)

    for _file in os.listdir(folderpath):
        filepath = folderpath + "\\" + file
        clip = bpy.data.movieclips.load(filepath)

        data_from = ...  # clip.name ?
        data_to = ... # clip.source ?

        for name in eval("data_from." + datablock):
            my_item = eval("bpy.context.scene" + datablock + "_directory_list.add()")
            my_item.name = name  # these two correspond to custom props group
            my_item.file = _file

Without seeing more of your code (got a github repository?) I'm not able to say more. Looks like an interesting project though.


Strange stretching of mesh when using automatic weights I am using this tutorial.

I've been attempting to work out what exactly is making the mesh snatch onto the original T model instead of moving with it. I'm completely stumped on this one.

The automatic weights didnt paint the entire mesh the way you want it.

You can manually weight paint the mesh
here is a youtube tutorial:
https://www.youtube.com/watch?v=S0VS0IVylzg

Or just try changing the "bone envelope" and parent the bones to the mesh with automatic bone envelopes

here is a tutorial:https://www.youtube.com/watch?v=wBLv6oa60_k

But either way you will probably want to tweak it to make it perfect by manually weight painting a little


Trouble deleting mesh parts from sculpting -From symmetric View So I am quite familiar to Blender but I am coming across this very annoying part in sculpting mode in Blender. I did in fact have dyntopo on so you all know and was increasing from the original mesh until I increased something and decided I didn't want it. I tried to decrease it but I couldn't as it still has some sort of left over and I can't remove it.
Here is a screenshot of what I mean.

Now, how can I remove this, I really need to remove it or it will just be such a nuisance and I just don't want start over from the my last history point (I create certain history saves just in case I mess something up big.), as I didn't do it in a while.
I should mention I am making a humanoid so I can't just go to edit mode and delete those vertices as it won't be symmetric if I did because I would have to try to get it just right and that will take way too long.
So how would I remove this properly with keep symmetric on both sides and such?
Update 1:
I really still need help, like badly. I cannot continue my work until I know how to delete it. I really don't wanna start all over.
Update 2:
I am going to upload my blend file. I tried using blender exchange personally file hoster, but the upload bar will not budge so I used mediafire instead. Hopefully that is alright. I did use the same image for most however, just a quick update on that so no one gets misleaded.
So when ever you download it, try to sculpt the arms down and see what happens first. So you can get a better picture.

Conclusion [Solved]:
I've got an answer I have been looking for so I've edited the title and added a tag to help with others who may have the same problem I did.
I believe to well understand the answer, you should know blender quite a bit to get what the answer means.

You could remove the vertices in Edit Mode and use Symmetrize function to make identical changes on the other size.
Select the pinching vertices and delete them. Fix the hole that was left behind. Select all a and under Mesh select Symmetrize. In your model x asix is up so you need to use Symmetrize direction +Z to -Z to make the other arm identical.


(FM Build) No fracture tab? I am trying out the Fracture Modifier build for the first time, everything is working just fine, except I don't have a fracture tab!?!?!

Any idea why?

My screen below:

Tutorial Screen below:

I guess after downloading the FM build you also need to download the helper addon.

http://blenderphysics.com/fracturemodifier/

This solved my problem.


Blender lags with 40,00,000 faces Blender lags with 40,00,000 faces in my Laptop with 8 gb ram ryzen 5 4600h cpu , gtx 1650. What must be the reason ? Is it my Ram?

400 000 faces is a big number of faces and yes, the RAM may be a problem. But it also depends on the speed of your RAM, so what's your RAM speed and is your notebook humming when you try to move around, or move some vertices in Blender?


Strange lines appearing when rendering glass My scene is a cube standing on a checkered plane. For some reason I don't quite understand, when i render the final product lines will appear on the cube, as seen in the picture:

What really bugs me is that I rendered another picture awhile ago, with pretty much the same settings (quite close at least) but this time no lines appeared! Unfortunately the blender file that came with this picture was deleted, making it impossible me to copy from:

The cube was intersecting with the floor which created this effect :

Select the object and hit G then Shift and move the mouse up slightly
or you can enable face snapping and move the cube to place it on top of the floor plane

Here is the render after moving the cube


How do I get rid of this weird pattern on my mesh? I imported a mesh from roblox studio into blender and weird shadow patterns appeared on it.

Try clearing 'custom split normals' in the object data panel


How to give an image or video a TV screen effect? I thought it would be interesting to create a .blend that filters any regular video or image with vintage television look.

Edit: Although this question initially arose from my desire to create a vintage look, it has since been pointed out in a comment that all displays use arrays of RGB emitters, so it's not really an issue of vintage or not. How vintage it will end up looking is probably more a matter of the shape, size, and density of the emitters.

Reference images:

Upon examining the structure of screens, the most common seems to be rows of vertical RGB bars:

Here is another type which I believe is common in computer displays - circular dots in a hexagonal grid:

I have been thinking about how to make a screen in Blender that takes its input from an image or image sequence and for each frame converts the RGB value for a pixel (or region) and uses that to illuminate the red green and blue phosphors in the correct ratios so that when viewed from a distance an image is distinguishable.

Do you think this will require python scripting? I made some initial attempts modeling an array of phosphors then using a Light Path node and a Separate RGB node in Cycles but I haven't gotten very far. I would love to hear what you all can suggest.

Thanks!

Create an object that has the basic shape of your pixels and assign 3 materials to it using emission shaders. I named the materials for clarity:

For each of the materials use the same image texture and a separate RGB node to control the brightness of an emission shader, change the color of the emitter to mach that of each channel. Here's the setup for the red material for example:

Note that I'm using an empty to control the texture coordinates.

Then by creating arrays of your base object, and controlling the size and placement of your texture (using the empty) you can easily get the effect you are after:


How do you visualize changes animations in the graph editor? This might sound stupid but I think I've looked everywhere for a good tutorial and explanation on the graph editor, but I still don't fully understand. I know that generally, it's the main animation and it is manipulated using F-Curves. I've seen videos on how to manipulate them, but I can't find anything that explains how to know which way everything should be changed. How do you visualize the edited change to the mesh's animation by just looking at the graph?

The graph editor displays what a keyframed value is set to at every frame. Left to right represents the frame of the animation while up and down represents the animated value.

An fcurve can be directly compared to a bezier curve, in fact that is what it is. The position of the curve as it is drawn at a certain point represents the frame and value that will be used.

Here we see the x location of a cube. On frame one it is 0.0 and at frame six it is 5.0. As the curve is set to linear interpolation we see that it will be an even movement every frame from start to the end.

Now if we change the interpolation to bezier and adjust the handles we can get a different curve. Here the cube stays close to the start position until frame four and very quickly moves to the final position only in the last couple of frames.

Now looking at this curve, you can see the x location goes past and then back to the final position.

And here is the curve with a noise modifier added, can you "see" where the cube will be on each frame?

So you don't really "see" the movement, what you get is an understanding of how it moves in between two values. So you watch the animation changing in the viewport, then when something looks odd you can often see and remove the glitch in the curve that is making it move the wrong way. With enough experience you may even be able to pick out a bad fcurve without watching the animation.


Unwrapping planar rectangle doesnt result in same rectangle in uv editor I have a planar mesh, but when i unwrap it, it gets distorted. So i gave up and marked every single edge as seam. But even unwrapping one single planar face doesnt result in the same object in the uv editor. In the image i marked the corresponding vertices in 3D View (top) and UV Editor (bottom).

There are many faces within my mesh with this problem, so correcting this manually is no option.
Thanks in advance.

If you want to maintain the proportions of a planar mesh, set the view from top ortho, then press U "project from view" option.


I can't render any fluid dynamic nor can see inside any fluid domain Two issues have been crushing my dreams of doing literally anything related to fluid dynamics.
I am following along with this tutorial.
However, at the 2:00 mark, the instructor very casually turns an object into the fluid, but when I do exactly the same thing, nothing happens. I even went into Cache and gave the cache folder a specific folder since I recalled something about that from prior training.
What's killing me is that I have had fluid working, but I don't know what I have done - the specific steps I've taken - to turn this from object into fluid.
The second problem is one that has plagued me literally since the start of my looking into this: I can never actually see inside the region fluid-dynamics region. It's always a damned cube. I figured out I could apply a wireframe modifier to it just to see inside (in that project, I got fluid to work... somehow). But when I went to render, it was still a cube.
Anyway, if you have guidance, I would love it. I'm tired of banging my head against a wall. Here is the blend file.
Using v2.83.1 / Windows 10 64bit

The main problem is that you need to increase the "Resolution Divisions" setting for the Domain object. In newer versions of Blender (I'm using a 2.90alpha), the default looks like it's 32.  In the tutorial, the default appears to be 64.  It refers to the number of divisions along the longest dimension of the domain.  With a tall domain and short flow (in the Z direction), there's a reasonable chance the flow will get missed entirely, and it won't generate any particles.  Reset to the first frame with Shift←, and then try increasing the resolution division until particles appear.  (You need to reset to the first frame for this to work.)
Now, if you start the animation with Space, the particles should start moving around.  If they don't, it's probably because the cache directory is bad, so blank out that cache filename and try resetting to frame 1 and replaying the animation.
Once that's working, another problem is that a Replay Cache (i.e., Cache -> Type -> Replay) is extremely flaky in current versions of Blender.  You'll find that if you move participating objects (e.g., move flows and effectors) or change certain settings, stale cache information will be left in place.  You might get particles sourced from the wrong place, particles exploding, particles leaking, etc.  It's best to switch from Replay to Modular (which is what's ultimately used in the tutorial) so you have explicit Bake/Free buttons.  Specifically, you can "Bake Data" in the Fluid -> Settings panel to generate the particles and then play the animation.
Finally, you can make your domain see-through while working on the animation by going into its "Object Properties" and selecting Viewport Display -> Display As -> Wire.  This doesn't affect the render, so it will still render as a solid cube until you get the mesh simulated (see later in the tutorial).  Once the mesh is baked, that mesh replaces the domain mesh in the final render.


How to create a "hollow" glass tube I am working on a cathode ray tube (CRT) based off of an original model. Is there a way to make a glass object (the tube) hollow? In reality, the tube is not filled with glass, so the glass shader default does not yield a good result. I have tried extruding the faces of the mesh a tiny bit inwards, but the result is that the mesh is distorted on the inside. I also tried duplicating the mesh, and scaling it down a tiny bit, but then I have to set the IOR of the shader to something really low, like 1.05. Is there a node setup, or just some kind of way to model your object so that you can render it like a thin glass tube? I would need to see the inner glass, though, like on here.

My render.

Perhaps something like this is closer to what you're looking for?

I think this is pretty close to what you've used, but feel free to check out what I've done here.

Transmission = 1

IOR = 1.05

Roughness = 0.167


Confused with chained Python script when creating data block I recently dived into Python Blender scripting, while reading the Blender API some Python script got me stuck, I couldn't understand it, I can make it work though, here is the code from Blender API,
# Create new object with our light datablock.
light_object = bpy.data.objects.new(name="New Light", object_data=light_data)

The line bpy.data.objects.new(), Why 'data' can be chained after bpy? I'm sure 'bpy' is the module name, is '.data' and '.object' a method returning 'self' or is it a class name?
The menu said the 'bpy.data' is type of 'bpy.types.BlendData', I can not wrap my head around for this Python syntax, can you shed some light on what type of each section of the code really is so I can use the right term to search the syntax

Although I don't understand what you're doing, I know that the approach you're doing throws an error. If you go to the default scripting widow, at the bottom left it shows all the API calls you have done so if you shift+a>light>point, it will show
bpy.ops.object.light_add(type='POINT', radius=1, align='WORLD', location=(0, 0, 0))

And sure enough, if we run it it will create a light.


How do I merge these individual components into one solid object? I used the blender osm to import a map and I find that the terrain becomes a grid of smaller rectangles when in edit mode. See picture below:

I'm very new to blender so I'm not familiar with controls, but how would I go about merging all of this so it ends up being one solid object?

These small rectangles are called faces. It's the surface of your solid object. There is nothing wrong with them and there is no need to merge them. That's normal. The objects are shown in the Outliner in top right of the screeen.
If you're new to Blender I recommend to watch video like this 3D for NOOBS - Livestream Lesson 01. It explains 3D stuff and Blender's interface and basics. It's for absolute beginners.