Python performance with Blender operators In my script, I have for loop over many cube objects (~1000) and the treatment is very slow. Looking more in details, I notice that in the same amount of loops:

if I use python operation or simple blender operation like

obj = bpy.data.objects[obj_name]

or

obj.select = True

it takes less than 0.08s (for all 1000 objects)
but as soon as I start using blender operators like:

bpy.ops.object.select_pattern() # or
bpy.ops.object.duplicate() # or
bpy.ops.object.location_clear() # or
bpy.ops.object.transform_apply() # etc.

then, the performance drops down deeply with more than 6s for the same amount of objects.

And, a last information, if I reduce the amount of objects from 1000 to 50, the same set of operations with bpy.ops is 0.03s - so extrapolating, it would be 0.6s for the 1000 objects and not 6s. It is as is with 1000 objects, we loose a factor 10 in speed in comparison than with 50 objects.

I tried reducing the complexity of my mesh changing the cubes in planes but it had no effect at whole on performance.

Is there something particular to know to improve these performance or a way to use the bpy.ops methods with better performances? Obviously, I am missing something important probably.

Most operators cause implicit scene updates. It means that every object in the scene is checked and updated if necessary. If you add e.g. mesh primitives using bpy.ops.mesh.primitive_cube_add() in a loop, every iteration creates a new cube, starts a scene update and Blender iterates over all objects in the scene and updates objects if it has to.
If you start with 0 objects, there will be 1 in the first iteration and 1 object needs to be checked in the scene update. In the second iteration, there will be 2 objects and 2 be checked. The first object was checked in the first iteration already (thus, 3 object updates in total). In the third iteration, there will be 3 objects and 3 + 2 + 1 = 6 objects checked in total. In iteration 1000, there will be 1000 objects and 500,500 checks have been carried out. Here's the formula where n is the number of objects:
$\displaystyle \sum_{n=1}^n i = 1 + 2 + ... +  n = \frac {n (n + 1)} {2} $
As you see, the runtime isn't linear and could only be if there was only one update for every object after all have been added. You need to use the "low-level" API - RNA methods and attributes - instead of operators to achieve better runtimes. A scene update needs to be called manually like bpy.context.scene.update() with this approach.
Many, but not all operator calls can be somehow replaced by "low-level" code. You can duplicate objects very efficiently like:
import bpy
from mathutils import Vector

ob = bpy.context.object
obs = []
sce = bpy.context.scene

for i in range(-48, 48, 3):
    for j in range(-48, 48, 3):
        copy = ob.copy()
        copy.location += Vector((i, j, 0))
        copy.data = copy.data.copy() # also duplicate mesh, remove for linked duplicate
        obs.append(copy)

for ob in obs:
    sce.objects.link(ob)

sce.update() # don't place this in either of the above loops!

A good comparison between 4 different ways to do the same thing:

bpy.ops.anim.keyframe_insert_menu() - don't ever use this in a script, it is solely to show a menu for the user

bpy.ops.anim.keyframe_insert() - this is supposed to be used via the UI, not in script. Use operator calls only if there is no lower-level API!

Object.keyframe_insert() - RNA method that can be called on an object, better

The low-level way - add F-Curves and keyframe_points manually, fastest but you need to do alot yourself and consider several conditions (like object not having animation_data or an animation_data.action)

Related (also examples included):

Python slowing down over time


Color distortion when saving as video file I want to create a short animation with Blender 2.78c, which should be included in PowerPoint 2010 on a windows maschine. At the end, avi videos are not an option, because either the file size is incredible huge or the quality is not satisfying. In principle I can import an mpeg-1 compressed video into PowerPoint, which would be my prefered solution.

But here comes the problem (which is very similar to  [Compression & Color change)

I created an animation and saved all frames as png images, which I would like to render as a combined mped file. For integrating the animation seamless into PowerPoint, I chose a white (hex-code #ffffff) background, which works very fine for a single png file. However, when importing the mpeg file, the preview image (the still file displayed before pressing play) also has a white background but when pressing play all subsequent frames have a slightly grayish background (hex-code #ebebeb).

I read that my problem could be related to a RGB to YCbCr conversion, but could anybody please tell me, how to correct this small shift? Or is it just not possible to have a background which is equivalent to #ffffff in an mpeg file? The same problem also occurs for H.264 and mpeg-2 or mpeg-4 compression.

Thanks a lot for your help!

Here is a minimalistic working example:

In an empty Blender file (version 2.78c), I switched to Video editor screen and added to track #1 a color (white, #ffffff in rgb). For the output I chose MPEG. Rendering a single frame as a png is fine, however rendering the mpeg-animation changes the white color to a grayish color (#ebebeb in rgb).

Update

I checked now also the color "black" and as Troy_s suggested, also black is shifted by the value 16 (#101010) when viewed in PowerPoint and VLC (no difference between fullscreen and window mode).

However: When viewing the mpeg-1 encoded videos with Windows Media Player there is no distortion. Is it then right to say, that the encoding part worked, but the decoding failed?

[...] I chose a white (hex-code #ffffff) background, which works very fine for a single png file. However, when importing the mpeg file [...] all subsequent frames have a slightly grayish background (hex-code #ebebeb).

Suspiciously 0xEB ends up being 235, which just happens to be the broadcast YCbCr BT.709 level. That might be a hint that your decoding is failing you. The decode should correctly scale that value back up to 255.

If you read any of the other diatribes I have written on the subject of codecs, encoding, and decoding, you will know that they are absolutely and horrifically bound to complexity. Is the encode correct? Are the proper flags set? Is the decode correct? Were the proper flags honoured? Is the GPU to fault? Is there something else somewhere that is bungled.

The long story short is that while we can't precisely answer your question, we can determine a few possible things:

Did your encoder encode the correct 255 8 bit value to 235? Check also with 0, which should be scaled up to 16.
Did your decoder decode the correct values and scale them back to their original positions?
How are you evaluating the output? Is it a screenshot from a full screen player? Windowed? Are there differences? Are there differences between players?

My best guess is that it encoded correctly but your player of choice is mis-guessing or not displaying the output correctly. Either that or it is encoded correctly but a flag that the player is looking for isn't set correctly.

Best advice is to check the encoded output with several players, at both full screen and windowed. Compare results. VLC, MPlayer, and your resident OS media player are good starting points.

Good luck...


Animating a bomb that explodes at a certain keyframe after cell fracture Okay, so I'm trying to create a bomb using cell fracture.  I've got it fractured and set as an active object in physics.  I've set the animation to have it flying through the air which is all good.  I've grouped each "cell" together but when I animate the "Dynamic" button on the active "cell," it does not insert the keyframe for each of the others in the group; not even after clicking the "Copy from selected" button in the physics tool shelf.  What am I doing wrong?

Okay, so what I've figured out is that after creating my group, I had to set up the animated "Dynamic" box for when I wanted it inactive and when I wanted it active again.  After all animation had been set up, I hit ctrl+L > Animation Data and that did the trick!  Now the explosion takes place at the frame I wanted.

The key is to set all of the animations for the active member of the group BEFORE making the link to the Animation Data!

Maybe this will help others as well!


Get width of properties panel How do I get the width of the N Properties Panel in the 3D View using the Python API of Blender 2.8?

Area.width

The screen is made up of areas, each area has an x, y, width, height attribute.

Python console test code:

>>> for a in C.screen.areas:
...     a.type, a.width
...
('PROPERTIES', 346)
('CONSOLE', 931)
('VIEW_3D', 346)
('TEXT_EDITOR', 931)

Region.width

within each area there are regions. Commonly there are 'HEADER', 'UI', 'TOOLS' and 'WINDOW' regions.  For the 'VIEW_3D' region the N panel is region type  'UI'

>>> for a in C.screen.areas:
...     if a.type == 'VIEW_3D':
...         break
...
>>> a.type
'VIEW_3D'

>>> for r in a.regions:
...     r.type, r.width
...
('HEADER', 931)
('TOOLS', 1)
('UI', 335)
('WINDOW', 931)

If you are writing UI code to go in the N panel then can get the width directly with

context.region.width

Related:

Is there a way to determine the left 3D view sidebar's current width with python?


Turn a landscape upside down I managed to create a landscape in blender using ANT Landscape and now I want to turn it upside down..How can I do that?

Thanks!

The other thing you could do is select your mesh (landscape), and press R -> X -> 180 -> Enter. I would recommend doing this in edit mode, so that the rotation will be pre-applied.


Object displacement in BGE I have an object created in Cycles. After switching to BGE some parts(bandwrist elements) are significantly changing its position, though in viewport everything is correctly displayed.
In other threads it is said that problem can be related to broken modifiers, but in this file I've found modifiers that only affect shape of bandwrist elements and after disabling them, displacement still being there anyways.

Blend file : http://www.filedropper.com/wristwatch

Actually just remove parenting of every object.


Euler list output in steps (Animation nodes) I try to create an euler list that adds a rotation every so many times. In this case adding 72 degrees every 3 times.
I would be thankful if someone could help me.

By using Float Range and Repeat List Element node you can do this.


Animate object on arc trajectory How can I animate object rotating with center of rotation offsetted?

I want to animate hammer making movements like someone is using it.

Like in this answer https://blender.stackexchange.com/a/5521/1853 Change the origin of the object where you need it and rotate the object using the new pivot point.

To animate, go the frame where you want the animation to start and press I to create a key frame for the rotation. Move then to a different frame, rotate your object and press I to create a new key frame.

To swing the hammer in an arc motion change the origin further away from the handle.


What kind of F-curve can be used for a perpetual elastic effect of clock second hand motion? I'm trying to animate my clock second hand with an elastic F-curve to make it more snappy like a real hand. The thing is I'm not good at advanced math to figure out the equation for its curve, so either that I have to duplicate the first keyframe repeatedly and changing the rotation value for every second which will result in a lot of keyframes, or go learn advanced algebra to figure out the curve.

Basically I want a curve that looks something like this.

Every second, the second hand rotates 6 degrees, and the rotation should not be on a straight line with no easing, but go like this to make it look like it's affected by a little inertial bounce. Currently the only way I can do this is to make the first keyframe elastic, then duplicate it, move it 24 frames (1 second) to the left and up 6 degrees of rotation. But then I'll have to do that 900 times for 15 minutes of animation. So I'd appreciate if anyone can tell me if this curve is possible at all, and if it is, how to generate it with the Generator Modifier.

Edit: I've asked a couple of algebra people and they give this function which is very close to what I'm look for. The question now is whether it can be used in Blender.

Edit 2: Tavi Kohn has given me a much simpler answer that I was too stupid to realize. Thanks a lot. Consider this one done.

It looks like you can do this with the "Cycles" curve modifier instead of the Generator modifier.
I did the exact same thing as you to get the elastic curve, but only added two keyframes, one on frame 0, and one on frame 30 (I tried this at 30fps). For the elastic settings, I used an amplitude of 0.1 and a period of 15 frames (1/2 framerate).
To use the Cycles curve modifier, I set it up with these settings:

Note that "Before" and "After" are set to "Repeat with Offset" instead of the  default "Repeat Motion" so they will keep ticking forward, instead of resetting back to the start position every cycle.
This is what the result looks like:

The rotation decreases so the object rotates clockwise, instead of counter-clockwise.
You don't have to use an elastic curve though if you don't want to. If you add keyframes in between the first and last, they will be included in the animation, allowing you to have a more custom ticking animation, like this:

Lastly, I would be sure to poke around with the Cycles modifier and see what you can do with stuff like the Restrict Frame Range options, so that you can stop the clock, or only use a specific region of frames. (Ex: if you want to animate it rewinding later, so that only the ticking part of the animation is repeated).


How to run physics simulation frame-by-frame using Blender's Python API? In my scene, I drag some of the objects and move them around while the physics is running (Alt+A). This means that the physical interactions could be quite different every time I do start the physics (Alt+A). Note that I am doing all of this when using Blender with GUI.

Instead of using the cursor, I want to feed new coordinates for the locations of the target objects that I want to move. I also want to do all of this when running Blender in the background and use the Python API. So I wonder, is there a way to avoid baking the simulation and do it frame-by-frame using the Python API?

I was initially thinking to run bpy.ops.screen.animation_play() but this command does not work when running Blender in the background. Even if there is a way to get it to work I don't know how how to feed in new location coordinates for the next frames. Also, I wouldn't know the frame rate and this might mess things up even further.

I also cannot bake the simulation due to the dynamic nature of my work: new location coordinates might be different on every run. Therefore, I think the only way to do what I want would be to do the simulation step-by-step. I would appreciate if someone can help me with this

P.S. I know I shouldn't change the position of the objects in the scene when the physics is working rather than applying force to them. I will figure this out later but any tip in the comments for resolving this would also be appreciated.

If I understand your question correctly then the way that I do this is using bpy.context.scene.frame_set(). I set it to 1 at the beginning of the simulation and then inside a loop to step through the frames I use bpy.context.scene.frame_set(bpy.context.scene.frame_current + 1).


What is the difference between handlers render_post and render_complete? what is the difference between bpy.app.handlers.render_post and bpy.app.handlers.render_complete?

render_post runs after each frame is rendered. If you have 10 frames, this event will fire 10 times.

render_complete runs only once, after all frames were rendered (when the entire animation's rendering process is complete).


Using Plane Mesh as LightSource/Hide in Render? I am Trying to make an Intro Sequence with Plane Meshes to Light my Text.
Is there a possibility to restrict the rendering of these lighting planes, and yet still use them as a Light Source?

You tell Blender not to render any camera rays, meaning rays that go from the camera straight to the object. To do so you have to mix an emission shader with a transparent shader. Then you need the light path node. If a ray is a camera ray you'll want to use the transparent shader. If it isn't you'll want to use the emission shader. So you have to use the "Is Camera Ray" as the mix node's factor.

Node setup:

Example render without node setup:

Example render with node setup:


What causes fire to look like dissolved spots? I don't know what setting causes my fire to look like this:

Seems random to me, since I constantly tweak different settings and when I come back to the same settings that give me this result, all of a sudden it works. I'm not sure if I'm accidentally messing something up. Here are the fire sim settings:

Guess the thing with this is that if you put Reaction Speed at >= 1, it'll behave this way. I don't know why, but it seems that way.


How to reopen the panel that shows when creating objects? When creating objects a panel shows on the left bottom side, like this.

And sometimes I click other objects or hit Tab going to edit mode then realize I need to tweak some properties on that panel. But it's already gone. Is there any way to bring it back? Thanks in advance.

you can do this with F9.
But whenever you do something else in between - e.g. move another object - it is gone. Then you cannot call it again.


How to show textures in the 3D View editor? I have added some textures to objects in blender but the textures don't show up until I render the file. it can be difficult to know what the objects look like without rendering it. is there a way to have textures show in the editor even if they are at a lower res?

In editor:

Rendered:

Switch to Material viewport shading by clicking the icon in the top right of the 3D view:

If you have an image texture, you can also display textures in solid shading mode by switching to "texture" in the shading mode options drop down:

Blender 2.5x - 2.7x:
Blender internal:
Try setting the viewport shading to Texture (AltZ):

Note that this only works when the object's UV map has the appropriate texture displayed in the UV/image editor: (see this post for more information)

To display the textures used in the material of the object regardless of the texture (or lack of texture) displayed in the UV image editor, enable GLSL in 3D view > Properties region (N) > Shading and set the viewport shading to Texture:

Cycles:
You need a material to display textures in the viewport in cycles.
Set the viewport shading to Texture or Material.
Texture displays the texture of the last selected image texture node:

Material tries to approximate the result of the shader nodes, so if you have two combined textures:


Import video for editing with multiple audio strips I'm recording with OBS.
In OBS, I have two options for audio recording, Desktop Audio and Mic Audio.
Each of these are mixed together and saved in the same MP4 with the video which is recorded.

When I open the .mp4 in Blender, both the Desktop and Mic audio have are in the same audio strip.

How do I separate audio sources and import them for individual editing?

I'd like to have game audio, microphone audio, desktop audio (game?), and other programs (Discord, in my case) all as separate audio strips when I pull it into Blender.

Any ideas as to how I can accomplish this?

EDIT: I should add that I've tried sending video to OBS via Dxtory. I've also tried simply recording with Dxtory only, but I do not seem to be able to record separate audio clips for use in Blender.

This question has been asked before and there has been a Bug report which has been closed again, but it's been added to the ToDo list.

So for now I'd suggest you'd use another tool* to extract your multiple tracks into individual files and import them all manually into the VSE.

* like Audacity with the ffmpeg plugin or VLC via its file saving mode, but that's offtopic here...


Navigation not working after upgrading to Blender 2.79 from 2.78 After recent upgrading 2.79 none of navigation controls are working properly, eg. instead of going through camera perspective with num 0 it opens a layer.

Same is with changing from perp to ortho with num 5. I tried resetting input to Blender and also tried loading factory defaults.

First, make sure that your numeric keypad is enabled (press the
Num Lock key).

Also check that you are using the default blender shortcuts: Open the System Preferences (CtrlAltU) and in the input section reset the preset to Blender

Alternatively you can set the keyboard configuration at the splash screen (where it reads "Interaction"
:

Or just use File>Load Factory Settings on the main menu.


Texture as Backfacing material in Blender Internal using Nodes I am trying to use a generated material as a texture for the backface of a complex object in Blender Internal (an object that already have a texture). The idea, using nodes, is similar to Back face cull rendering. What I want is that the material being used should look like it is projected onto the render screen of the camera.

As an example (see below), I am using a wood materials in Nodes. Even if the object has a complex shape and a texture, I would like the rays of the wood to look parallel in the render view. I thought I could use a geometry node and use one of its output, then a vector curves with the shown curves for the x, y and z coordinates to make any vector pointing towards VIEW, or use a normal node, but I could not get any result. Using a "normal" node as an input for the vector input of the texture node, I get a blank material in the texture node.

Ps : I've looked a lot in Blender reference concerning texture nodes with no clues. I would love something similar to UV unwrapping orthogonal to view, but for the backface part of the material (Noe that the object already is UV mapped since it has a texture already).

Does anyone know how I could achieve this ? The ideal would be that it could be used in Blender Internal. If you have a solution for cycles, I could also use it, but prefer the BI solution. I am aware of the Texture coordiates node in Cycles that could help me achieve what I want, but in Cycles only.

Thanks a lot for your help,

You have to use "window" method for texture projection.

Here is blender file with material both for Cycles and internal render, just press Shift+Z and select any of theese renders - result is almost same.

For Cycles it is Geometry Info node, for internal it is Coordinates parameter in texture block properties.


Node setup for transparent wire fence PBR texture So i downloaded a PBR texture for wire fence but i don't know how to properly setup the node to make it transparent like in this preview

Usually for PBR i only use diffuse, roughness, and normal, sometimes displacement, but with this wire fence texture there is "mask" and "met" image and i don't know where to put them

Any help would be appreciated!

Use the mask on the alpha socket, to determine transparency

I suspect the one called met is for metallic.


Cannot Import .SVG File I cannot import an .svg file into Blender. I have tried other files and they work. I have checked the User Preferences and the "import SVG" option is enabled.

How can I tell if this one .svg file is formatted correctly for Blender?

Any help is much appreciated.

Thanks.

To import an SVG file go to File > Import > Scalable Vector Graphics(SVG)

Make sure that the SVG file you are importing contains vectors (paths) Blender cannot import raster data or text directly form SVG files. In other words, the information on the SVG has to be traced. For a detailed explanation read this link

If the plugin is not enabled for any reason go to the User Preferences Window (press CtrlAltU and enable it there.

It is also possible that your file is importing successfully but is so small that is hard to see on the viewport. Check if the outliner shows one or more curve objects.

If so, select one of the curves and press Numpad . to move the view to selected. Then you should be able to see the object.


How do I UV unwrap a half sphere? Hello, I am a beginner in Blender and I have tried to make a ladybug for my project. I managed to model it, but now I have to add a ladybug texture to it. I heard that by using the "Smart UV Project" function, I can easily   add my Ladybug pattern to it. However, after doing this, my image started to distort. Now as you can see, the ladybug's patterns has gone really wrong and I don't know how to fix it, so is there any way I can fix this problem and make my ladybug work?

It will be hard to have perfect circles on your ladybug this way. You could do it several other ways, but here are 3 ways to do it:

1) DIRECT PAINTING

Unwrap your semi-sphere in Blender.
Prepare a red image texture in the UV/Image Editor
Plug the Image Texture node with your image in a Diffuse (and plug the Diffuse in the Output).
In the 3D View window, switch to Texture Paint mode and paint your black dots with a very steep curve brush.

2) PAINT A MASK

Unwrap your semi-sphere in Blender.
Create a 100% white texture and plug it in a Diffuse (and plug the Diffuse in the Output).
In the 3D View window, switch to Texture Paint mode and paint your black dots with a very steep curve brush.
Now change your node organization and use your texture as a factor in a mix between 2 Diffuse nodes: one black and one red.

3) TRANSFORM A PLANE INTO A SPHERE

You could also create a plane, map your pattern on it, transform it into a sphere with some Simple Deform modifiers / Bend mode, then cut the sphere in half: How to animate morphing a rectangular plane into a sphere


Blender Fluid Simulation Not Working I have been meaning to ask this question for a while
I used to do fluid simulations a lot and when they changed to flip they just don't work anymore.

In the viewport the only thing that is showing is these particles

I watched some tutorials and I set it up how they said to and the collision objects also aren't working. Even in renders the fluid doesn't show up.
Here is a link to a google drive with the .blend file so someone can tell me what I did wrong Here
Thanks

Make sure you tick the Mesh checkbox in the physics panel of your liquid simulation and then click on bake mesh


How to render a normal map from a camera+mesh? The best way to explain my question is actually this: https://youtu.be/B4j5tzAIflU?t=658

I am making grass the same way (on a plane) for a video game, but I don't know what the technique is called or how to use it in Blender (2.8).

Blender 2.8

Properties -> Render Properties -> Render Engine = Workbench
Properties -> Render Properties -> Lighting = MatCap
Properties -> Render Properties -> Studio Light = check_normal+y.xer
Properties -> Render Properties -> Color Management -> View Transform = Standard

I also recommend:

setting the scene background to #8080ff aka RGB(0.5, 0.5, 1.0) aka HSV(0.666, 0.265, 1.0), camera to orthographic, and output to a power-of-two square render.

Note: Blender shows a "Gamma Corrected" footnote on Hex numbers and gives me this strange value: #BCBCFF instead of the expected #7f7fff or ~#8080ff, I recommend using the RGB input

Properties -> Scene -> World -> Viewport Display -> Color = RGB(0.5, 0.5, 1.0)
Active Camera -> Properties -> Camera -> Lens -> Type = Orthographic
Properties -> Output Properties -> Dimensions -> Resolution X = 1024
Properties -> Output Properties -> Dimensions -> Resolution Y = 1024

Render as usual, be sure to inspect your output closely! color management is quite fickle especially since we're not representing color data

You can compare your render to a public example normal map: https://en.wikipedia.org/wiki/Normal_mapping#/media/File:Normal_map_example_with_scene_and_result.png


Why does my video editing playback slow down after a short amount of time? I'm fairly new to Blender and video editing as a whole. I understand that the playback in Blender's VSE needs to load a video once before playing at full framerate. After playing through a video once, when I return to the beginning, I'm able to play it smoothly at 60fps. However, after around 1000 frames, I get a brief freeze in the video followed by ~24fps playback for the remainder. The audio plays fine at full speed, not freezing with the video and finishing long before it. I've tried this with multiple different clips (flv files recorded with OBS) and the problem is consistent in each clip, though there doesn't seem to be anything wrong with the clips themselves if just played raw through a media player. Does anyone have a fix for this?

Seems likely you just run out of the buffer. Because the video frame is actually quite HUGE to computer system, the buffer of the video will be constraint at certain amount for sure to ensure available RAM.

The default setting amount can be find in Setting > System > Memory & Limit: Sequencer Cache Limit

You should tune this amount depend on your RAM size. Yeah, 1024 MB is quite small for general 3D modeling available computer which usually got 16 GB or higher RAM.


How to scale proportionally I'm extruding the faces selected on the screenshot.
With the selection active I press Alt+E (region vertex normal). the result that I'm getting is shown in the animaiton above. The extrude isn't done proportionally at the sides and height or z-axis.
May I know the reason what I'm doing wrong and how to make it extrude all the sides proportionally?

This happens because you haven't applied scale , so to apply scale ,press space bar search for Apply Object Transform , click the option then go at the tool-bar then under the tool-shelf and select scale.
then repeat the steps you are doing in your question.
Note: you should be in object mode to be able to search for Apply Object Transform.


Breaking down scene to modular pieces Can i build my entire model within the same scene, then export each piece individually so that they're modular in UE4?

Or do i have to build each piece within its own scene and export separately.

For example

i made 10x1x10 wall and then duplicated it and used the same dimensions with a door cutout in the second piece and then selected the first mesh to export into UE.

But when i went into UE4 both pieces were there meaning Blender exported everything in the scene.

So how do i just export the pieces i want one by one after building the entire model?.

Each object can be exported as a separate FBX file. Just select one and check the Selected Objects in the export settings.


Problem: Wireframe on object with modifiers, autosmooth problem I have Blender 2.8 and I want to ask two questions.
I am trying make simple model of "sci-fi bulldozer".

Q.1 - Is available to turn off wireframe on objects with modifiers? If i turn off wireframe (picture), the wireframe stay on objects that contain modifiers. The wireframe will disappear on objects without modifier.

Q.2 - Does anybody know why i cant use "auto smooth" on some objects? The value in auto smooth is grey (no modifiers, normals are ok, vertices merge applied…). It is OK on some objects…

Thank you for your help :)

Very thank you for the comment, that helps me solve the Q.2

Solutions for my problem:

Q.1: You can set wireframe for each object separately. You can find it for each object in:

Q.2: Go to Properties editor > Object Data panel > Geometry Data and click on Clear Custom Split Normals Data to re-enable the angle setting.


follow a straight line on an already made mesh From the bottom image how would I follow the selected vertices to make a perfect straight line. so I can make the bottom image from the top image.

thanks for the help :D

You can use the Knife tool:

To make it perfectly lined up:

Set your starting point and hover until the vertex (of the line you want to extend) turns red:

I hope this works!


Object.type - Empty / Effector Is there a way to distinguish empties from effectors ?

If I have one empty and one force field, this :

for obj in bpy.context.scene.objects:
    print(obj.type)

will return :

  Empty
  Empty

An empty

is_empty = obj.type == 'EMPTY'
#or
is_empty = obj.data is None

All objects have a field attribute, that is 'NONE' if there is no force field assigned to it.

is_effector = obj.field.type != 'NONE'


Where can I download blender 2.79b? was wondering if there was a link to blender 2.79b as I can't seem to find a download link anywhere.

You may talk about blender 2.79b which can find in blender.org. There is no 2.97. Newest blender version is 2.80 beta.


How do I copy transform of a bone to an object? I can translate an object to the position of a bone with snap menu. But I would also like to give the object the same orientation as the bone. Is there a way to do this (without using a script)?

Use constraints

How do you use constraints with Armatures?

In 2.8 can add a constraint, tweak the settings to suit, then hit the Disable and Keep Transform button to RHS of influence slider.

Remove constraint and it still has the transform.

As a script, in pose mode, Suzanne has default XYZ Euler rotation mode

>>> monkey = C.scene.objects['Suzanne']
>>> C.active_pose_bone
bpy.data.objects['Armature'].pose.bones["Bone"]

>>> M = C.object.matrix_world @ C.active_pose_bone.matrix
>>> monkey.rotation_euler = M.to_euler()


Key out background and keep "halo" around foreground Noob here! I captured video of myself writing on my ipad- pure white background with pure black text. I want to import this into Blender 2.8 and overlay it on top of another video, obviously removing the white background. BUT I would like to keep a few pixels of the white so that the text will remain legible even if the new video background becomes dark in places. What is the best way to do that?
I followed a YouTube video about chromakey and used the Keying Node, tweaked the feathering settings, but the best I can get is something like this:

The feathering seems to "miss" bits of my text, and the fluffy cloud look isn't really what I want anyway. Really I would like to just keep a few pixels of white running around the edges of all the black. Am I on the wrong track entirely? Thanks!

You don't need to key the text. Just multiply it over the background image.

For legibility you can add a fake drop shadow, by multiplying a version of the same text displaced and blured:

Or if you need white, then use the dilate/erode node in feather mode, invert the result,  and use color dodge to add a soft white border around the letters.

Or use the black writing as a mask to have color text.


Apply volume to a spherical texture? I have a quick texture applied on a UV Sphere. It is meant to be a spherical nebulae that I animate by keyframing the nodes settings (mostly color ramp, noise textures and color dodge mix shaders).
Here is a screen :

From here, I need 3 things :

Making my camera fly through this sphere to discover what is inside
Make the black areas completely transparent
Blur the limits of the sphere (it is too round now)

To do this, my though was to make this texture a volumed texture, keeping the sphere empty inside. Is it possible ?
Like if I had a spherical smoke domain with this exact texture, but Blender cannot handle it as far as I know. Plus, I'm a nood with volumetric textures.
Here is a quick reprensation:

Is there any way to achieve this ? Or, do you have any idea on how I can meet the results I need ?

You could try something like this.

The object I used for this is a simple UV sphere (I scaled mine up in edit mode to make it bigger - this might affect mapping values, I'm not sure - just be warned you may need to adjust those). Anyway, for the material, the main objective is to make 2 "spheres" using  Gradient textures. You need to make a large one and a smaller one - The large sphere will be your Volume, and the smaller one will be used as a Mix Factor to "subtract" from the larger one. In the image below where I show the smaller sphere, I inverted it just for the image example - The regular (non-inverted) output is what makes the mix factor, it just doesn't display well in a 2D image because it's a volume.

You can see from the mix with a Transparent BSDF (or Volume absorption if you want a "void" in the center), that the center sphere is "missing". It's a bit faint in the photo, but this is due to the nature of volumetrics.

The last thing I did was make a "noise volume", colored similarly to the colors in your image. You can use whatever texture you already have (as a volume).

Lastly, I multiplied those values with the large sphere's "color" to transfer the dark (absent) areas and the colors. The final result looks like this (In my image, I added the values to themselves a couple of times with an add shader to make them brighter - you may or may not want to do this).


How to map an image on a texture? I'm very new to Blender and I'm just learning textures. When I take an image like this and place it on a plane:

and render it I get a visible line in the final image like this:

I'm so new I'm not sure what words to use to search here in Blender Stack Exchange to find if someone has already asked and got the answer to this problem I'm having.

I know I must be doing something wrong.

Tab into edit mode, and in top mode, press U -> Project From View (Bounds).

This should unwrap your plane properly so that the image maps across it correctly.

If your image isn't square, you'll need to do some extra scaling (of the plane) in the UV Image Editor to get it to match correctly, or you'll get stretching on the plane.

Then just apply the texture in the material.


Freestyle Line Flickers in Animation - How to Control? The Problem:

I'm attempting to adapt one of my vector-based characters to a 3d format for animation. This character, being a vector drawing usually, has big clean lines and cell shading.

Notice though that there is line flickering around the armpits and sometimes in the head region.

https://youtu.be/e2QG7gkwFtg

Attempted solutions:

I've attempted to solve this by using Face Smoothness settings, Chaining, and Min 2d (20), but no change on this.

Other examples:

I've looked at some other examples, which are mostly anime, and it seems that the drawings are complex enough where the issue I point out is not noticed (ie, many lines, nobody cares about flickering because its lost in the complexity) but with a character like this perfection is needed.

Any advice or is this an official limitation of Freestyle? I am not against custom scripting (I do python) if someone cares to tell me what angle I might approach this from.

I had the same problem and my solution was to turn every options in the Freestyle line set panel off except the first 3(silhouette, border contour). These settings have the least flicker problem and remain consistent through the shot.


View my Textures in Real Time I want to be able to maneuver around my project. I'm trying to apply a texture over the top of some objects that I made. However, I can only view those textures when I am in rendered view, which does not allow the movement around the object that I need, particularly in the "flight mode." How can I have it appear as it will be in the end in real time? I'm using cycles.

At the bottom of your 3D view:

Just change it to "textured" or "material".

That should be it if I understood your questions correctly.


Where are the "Unified Brush" Settings? I'm watching a Blender 2.8 sculpting tutorial and don't have the unified brush settings.

Where can I find them in Blender 2.82+ ?

The Unified Brush settings have been moved from the menu to "Properties - Tool Settings".

You find them on the right side of the Radius and Strength settings, represented by a globe icon.

To access them more quickly, you can always add them to your Quick Favorites Menu (RMB - "Add to Quick Favorites Menu").


Why does my object not show up? This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?

This is the overview. I am breaking up the parts into individual answers that we can link to from other questions. This is a community wiki, so feel free to add ones that need to be addressed completely in another answer. If you decide to add another answer, please follow the pattern that I used with the first individual answer. This will make it easy to send people to this question or a particular answer while knowing that their question will be answered completely.
Invisible to the render

Camera icon is disabled in the outliner

Render layer not showing in the compositor

Render layer does not include scene layer or the objects are in a layer that is not renderable.

Scene layer not selected

Cycles camera visibility disabled in object settings

Cycles material disables visibility to the camera

Objects are not within the range set by the camera clipping

Using the wrong scene

Strips present in the VSE, and the sequencer box is enabled in the post process section

Cycles: Exposure setting in the film section set to 0

Depth of field not set properly making the whole scene blurry

Object blocking the camera view

An object has been set as the active camera.

There are no lights on the scene or they are on a different layer.

Objects have no faces

The Solidify modifier takes over the object and is disabled in Viewport

Duplication type set to 'Group' and no group is selected.

Duplication issues (under the Object tab in the properties panel), e.g., duplication type is not 'None', and object has no childen, or set to 'Group' and no group is selected.

Render layer In Node editor is muted (disabled)

Cycles materials don't have a shader node

Camera is not pointed at object

Save your data to .blend before rendering with Cycles/Eevee (Blender 2.8)

Object has a particle system with emitter visibility disabled and/or no particles

Cycles Filter is active

Invisible in the viewport

Object is hidden
3D view clipping distance set too high/low
Scene layer not selected
Using the wrong scene
Object is moved far away
Using local view
View Border is active (Alt+B)
Cycles Filter is active (same as #24 for the "render" list above)

Note: I will be adding reference images, details, and links as time allows. Hopefully this will be helpful to someone. If you think of something that I missed, feel free to suggest an edit.

Questions about problems that have not yet been addressed
Why Does My Object Not Show in Rendered Shading Mode?
Why do some objects not show up in the camera view?


How do I put an image texture on a material in Cycles? I am creating a model of a glass and I would like to put a drawing on it (a png picture).

I know how to do it using Blender Render, but not with Cycles Render. Help :)

Applying an Image Texture in Cycles

Select the object you want to put the image on
Give it a new material with an Image Texture Shader:
Object Properties window -> Materials tab -> click the New button
For the Color, click on the grey dot icon on the right side (  ) then select "Image Texture":

Select the image you want to use:

UV Unwrap your object and position the image as you'd like it:

Select your object and enter Edit mode (TAB)
Unwrap mesh (U) -> here, I use Smart UV project

NOTE: UV Unwrapping a mesh and positioning the image properly can be a very complex and involved process. So, I highly recommend you study some UV Mapping tutorials to get all the details; YouTube has quite a lot of excellent video tutorials for beginners on this subject.


how to move origin point to center of object I'm wanting to move the origin (widget) to the center of this object. The object (mesh and bones) was appended from a previous animation, and it looks the same in my animation.
  I have tried shift ctrl. alt C > origin to center of mass. Also I noticed that when I shift S cursor to selected, the cursor goes to the widget (origin).
  I have a feeling this happened because I moved the object with it's root bone rather than the x,y,z arrows. The Root bone is sticking out out the center of the objects back
  My animation seems to be working fine with the origin being offset as it is. Just out of curiosity, when I render the animation could the origin being offset like this, hurt anything?

I think your problem is this one:

Your armature has an origin, like any object. If you move and animate the whole armature in Object mode the origin will follow, because its position is linked to the object. But if you go within the object in Pose mode and begin to move the bones, it won't affect the origin position in any way, because the origin is linked to the armature position, not to the bones position within the armature, so with some animations the bones can move far away from the origin.

Generally, when you animate in Pose mode, you don't move the root bone, so this bone will stay close to the origin. But if you begin to move it, for a reason or another, it may also move far away from the origin.

If you want to see what is the real position of the bones within your armature, relatively to the origin, go in Pose mode, select all your bones and press altR, altG and altS, or in the Properties panel > Data > Skeleton, press Rest Position, or switch to Edit mode... you'll come back to the rest position and you'll see that the bones will probably come back close to the origin, so you'll probably won't find any reason to move the origin position.

Now if, in rest position, the origin position doesn't please you, which in my opinion is probably not your problem here, you can change it: Switch to Edit mode, then, like for any other object you need to put the 3D cursor where you want the origin to be, then shiftctrlaltC> Origin to 3D Cursor.


Geometry data is coming instead of geometry I want to create a pipe from converging the plane vertices, then in the object properties its showing geometry data instead of geometry so that I can put the size of the bezier circle in it to make a pipe? why?(blender 2.9)

What you have selected is not a curve, it's a mesh, you need to use a curve, or you can convert your mesh to a curve: Go in the header menu > Object > Convert to > Curve from Mesh:


BGE: altering a cube's shape in realtime (python) how is it possible to get all vertices of an object (say a cube) and then randomly change their location? What I want to do is everytime I hit space, the cube alters and generate random shapes.

What I have figured out myself so far:

import bge
import random

cont = bge.logic.getCurrentController()
own = cont.owner

# get the 1st mesh
mesh = own.meshes[0]

# get the first vertex of the first mesh
vert  = mesh.getVertex( 0, 0)

# get the position
pos = vert.getXYZ()

# set the position
vert.setXYZ([ 10, 1.0, 15])

How does

getVertex(matid, index)

exactely work? It only gets me one vertex, how can I get one after another? And then alter their position?

Thank you for any hint!

UPDATED Script:

for mesh in object.meshes:
   for m_index in range(len(mesh.materials)):
      for v_index in range(mesh.getVertexArrayLength(m_index)):

         vertex = mesh.getVertex(m_index, 0)
         vertex.setXYZ([ loc0])
         vertex = mesh.getVertex(m_index, 1)
         vertex.setXYZ([ loc1])
         vertex = mesh.getVertex(m_index, 2)
         vertex.setXYZ([ loc2])
         etc.
         etc.

Using the example shown for KX_MeshProxy

from bge import logic

cont = logic.getCurrentController()
object = cont.owner

for mesh in object.meshes:
   for m_index in range(len(mesh.materials)):
      for v_index in range(mesh.getVertexArrayLength(m_index)):
         vertex = mesh.getVertex(m_index, v_index)
         # Do something with vertex here...
         # ... eg: color the vertex red.
         vertex.color = [1.0, 0.0, 0.0, 1.0]

mesh.getVertexArrayLength(matid) tells you how many vertices are in the mesh, you then loop through each by increasing the vertex index which is the second value to getVertex(matid, index)

Applying that to your sample -

mesh = own.meshes[0]
for v_index in range(mesh.getVertexArrayLength(0)):
    vert  = mesh.getVertex( 0, v_index)
    pos = vert.getXYZ()
    #alter pos
    vert.setXYZ(pos)


Blender Game Engine Edit Object: can't use "add object" to spawn a character object I want to use "Edit Object, Add Object" to spawn a character object, but nothing happens. It seems to be that blender refuses to add character objects since anything else I do works fine. Is there a way to spawn my object and keep it as a character?

Ensure the object you want to add is at an hidden layer. This makes object an inactive object while running the game. The BGE will dynamically add inactive objects only (it makes a copy of the inactive original).

This restriction avoids to accidentally remove the original object (which disables the ability to add more copies later on).


How to curve my mesh I'd like to curve my object, but I'm considering two options.

The first one is to make the object up with lots of vertices, like a sphere can be. The second is to apply some kind of modifier curve to a straight mesh, as I've understood there is such a possibility.

Here's an awesome pen drawing of what I'd like to achieve:

and here's my current even more awesome result:

Rather non-awesomely, they don't quite match. So if someone would kindly point me to the correct method to achieving a nice-looking solution with relatively low polygons, I'd be much enlightened

There are four basic ways to bend your object.

Destructively editing it in edit mode
A Curve modifier
A Simple Deform modifier
A Lattice modifier (or Mesh Deform modifier, they work nearly the same)

All have their pros and cons, I will briefly list them here.
Modeling in edit mode
Moving the edges and vertices in edit mode to make the curve, is sometimes the least desirable. After you have bent or curved your object, there is no turning back - it is now permanently curved.  The plus side is that there is no extra work, just select some edges and hit G. For a smoother edit, press O to enable Proportional Editing and use the mouse wheel to set the radius for the tool
The curve modifier, where the mesh is bent using a bezier or nurbs curve, is over kill for such a simple curve. While it works well, you will probably spend more time setting up the curve object, then you would using other methods.
The simple deform modifier, explained in this answer, really is the best solution for your particular situation. There is no quicker or simpler way to make a shape like you want.
The lattice modifier, is extremely powerful. While it can do much more then a simple bend, I think it works quite well in this situation.

Add a Lattice object around the text (scale it in object mode to fit the text)
Add a Lattice modifier to the object and put in the name of the new lattice.
in edit mode, edit the lattice so that it bends way you want (this part is very similar to the first method).

Do note that there is a difference between the methods in the way the edges look.
Blend File
That blend shows the four methods explained above.


How to add more polygons in edit mode How to add more polygons in edit mode without using any modifier or subdivision.

There are several approaches to 'add' more polygons

Subdividing

You can open the menu 'specials' by pressing W while beeing in edit-mode, where you can find 'Subdivide' and 'Subdivide Smooth'.

https://www.blender.org/manual/modeling/meshes/editing/subdividing/subdivide.html

Note: In the Toolbar (toggle with T) options will be displayed.

You can press Ctrl + R to cut edges. This will add more polygons.
https://www.blender.org/manual/modeling/meshes/editing/subdividing/loop_subdivide.html

Mesh adding

By pressing shift + A you can open up the mesh-menu, where you can select and insert a mesh.

Extruding

By pressing E you can extrude your selected vertices, edges or faces.

https://www.blender.org/manual/modeling/meshes/editing/duplicating/extrude.html

There are multiple extrude-modes that you can find pressing space and tiping 'extrude'. That will display all actions with 'extrude' in their name.

Insetting

By pressing I Takes the currently selected faces and creates an inset of them, with adjustable thickness and depth. If several faces are selected you can choose to inset them individually.

https://www.blender.org/manual/modeling/meshes/editing/duplicating/inset.html?highlight=inset

Knife Tool

By pressing K you can open the 'Knife Tool' where you can cut faces, what will create more polygons.

https://www.blender.org/manual/modeling/meshes/editing/subdividing/knife_subdivide.html?highlight=knife

Joining

Although this can't be made in edit-mode. In Object mode select multiple meshes and join them pressing Ctrl + J


same material, one is darker I've a simple scene with two objects with the same material.
Strangely, one of them is darker and I just can't figure it out why.
No it's not their normals, I've already checked it.

Here's the scene:

Normals:

They don't have any textures. The worst is, if I export it into unity, the problem persists, so clearly something is wrong here, I just don't know what.

Any ideas?

Thanks!

From a comment by mr-zac

  Those are custom split normals.
  Either remove them, or uncheck AutoSmooth.


Mesh to Empty Object I am looking for a way to convert mesh object to an empty object. I need to keep all the game variables, assigned logic, but remove the visual mesh data. How do I do it?

If you go into edit mode and delete all vertices you will still retain the object origin.  I don't know if it will retain all the game variables, assigned logic.


How can I do a render of the 3D Viewport, in Python, so it uses the shading style I've selected? I've found that I can't change the normal rendering, from a camera, to WIREFRAME, SOLID, or anything but RENDERED. (Actually, there isn't a setting to change, it just goes to RENDERED.) In the Python Console,I've done this:

First, I set a variable to the area that is the 3D Viewport for convenience. Then I check the shading and it's WIREFRAME. From there, I render that space, the 3D Viewport. It always renders from the default camera. My first test render rendered in the SOLID mode, but now I can't get it to render the 3D Viewport view (using bpy.ops.render.opengl()) and it always renders in RENDERED mode. Here's a sample - rather crowded and from the top:

I was under the impression that if I rendered the 3D Viewport space, I could get it to render in whatever shading method that was currently set for the Viewport. Is that not the case? Other than using plugins, is there a way to control the shading for rendering the view in the Viewport?
I'm beginning to think it just won't work, but I thought I saw instructions (that worked) that would let me do this and I've been searching, but can't find a way to do it.
So, bottom line, how can I specify the shading mode in the Viewport, render that view, then save the file?

The render.opengl() operator is working fine for all modes. But notice that it takes a screenshot of the first viewport found, quoting the docs: "Take a snapshot of the active viewport". So in case you have multiple 3d viewports open at the same time it takes the first one in the area list of your screen (Screen.Areas).

Obviously the simplest option is to close all 3d viewports except one, set the shading mode, call the operator and pass write_still=True to take the screenshot as well as saving the file into the default Output directory:
>>> bpy.ops.render.opengl(write_still=True)

In case you have multiple viewports open and you'd like to specify the area for the screenshot, you can override the context when calling render.opengl() operator. See the following demo on how to find the first 3d viewport set to 'WIREFRAME' and take a screenshot:
import bpy

C = bpy.context

for area in C.screen.areas:
    if area.type=='VIEW_3D':
        # Check for WIREFRAME, SOLID, RENDERED, MATERIAL
        # area.spaces.active.shading.type
        if area.spaces.active.shading.type == 'WIREFRAME':
            override = C.copy()
            override['area'] = area
            bpy.ops.render.opengl(override)
            break

In order to set the filename, just temporary assign your path to the RenderSettings.filepath property. Demo on how to take a screenshot of the first viewport found set to 'WIREFRAME' and save the result to the directory of the current blend file:
file_path = bpy.path.abspath("//screenshot")

for area in C.screen.areas:
    if area.type=='VIEW_3D':
        if area.spaces.active.shading.type == 'WIREFRAME':
            # Store the current output path and set it
            temp = C.scene.render.filepath
            C.scene.render.filepath = file_path

            override = C.copy()
            override['area'] = area
            bpy.ops.render.opengl(override, write_still=True)

            # Restore the output path
            C.scene.render.filepath = temp
            break

print (file_path)


How to add raised text to an imported STL file for 3D printing I'm new to modeling and 3D printing and have a long way to go... but 1 of the reasons I got a 3D printer was practical/functional use at my family farm.  What really caught my eye was the ability to print cattle ear tags.  I found a design
https://www.thingiverse.com/thing:2950135
and all I have to do is edit and update the name and number on it, but struggling with that part. From the online help, I thought it was under
Mode
Edit Mode.
Menu
3D Viewport ‣ Text
but I can't find the 3D Viewport - Text part.
Can someone help give me a little nudge on this, please?
Thanks
Jim

When importing STL change Scale to 0.001 to get proper size ... right now your Cattle has a dimension 73 x 99 m.

Now add a Text object ...

... that becomes big by default so scale S it down

WIth Tab switch to edit mode type your text. Add Solidify modifier to get thickness of letters.

Search for Convert to Mesh, hide this object in Outliner Editor. Select Cattle object add Boolean modifier kind Union and as Object select your Text object.

Before export use again Convert to Mesh (or apply modifier under arrow down icon) to make manifold object. ready for 3D printer.

I would suggest to you check some tutorial for beginners to get friendly with blenders UI first.


How to keep dense particles at the center of emitter in blender 2.8? I'm trying to make my emitter space look dense with the particles while emitting the particles. I'd done a setting which gave me the desired result but it was a hidden trial, now i'm trying to search it out for 4 days but not getting the setting exactly. I have added two pictures showing differences at center
Please try to help me if anyone could.   Thanks.

High density particles at center.

Low density particles at center or no my emiter

So as stated in a comment, you can have two particle systems.

One (in green here) is the "outer" system. The other one (in red) the "inner" system.

By giving different lifetimes and initial velocities to your systems, you can probably approach your desired result.

Green is long lived with high velocity

Red/inner is short lived and with low velocity


How to get the entire list of operators? I want to create a list with everything the spacebar operator search can produce. Is that possible?

Yes,
See: Help -> Operator Cheat Sheet

This operator is written in Python, See : startup/bl_operators/wm.py for the source is you like to get this data for your own use in Python.

The result can be viewed in the text editor:


Organic yet accurate modeling with the golden spiral Foreword

First off, let me say that I am profoundly amazed at the orderliness in nature. If you haven't heard about the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, ...), you should check it out.

This mathematical concept of the Fibonacci numbers can be shaped into a set of squares, where the lengths of the sides of the squares follow the Fibonacci sequence:

This is sometimes called a golden ratio. It can be formed into a (golden) spiral. (a.k.a. logarithmic spiral):

Application

I am looking for ways on how to utilize this concept in Blender. Primarily in organic modeling. The golden spiral is found all throughout nature. From flower seed heads, sea shells, and ram horns to hurricanes and spiral galaxies. See for yourself. My question is: how can I model based off of one or multiple golden spirals? Specifically, I'm interested in modeling a sunflower head like the one in the following image. I'm mostly interested in the point of origin of the individual seeds (not worried about the shape). Does Blender have any features related to this?

How about a fully math based approach, here's an interesting paper on scipress.org called Growth in Plants: A Study in Numbers by Jay Kappraff.
from the paper:

Keywords: Phyllotaxis, Fibonacci Numbers, Golden Mean, Continued Fractions, Farey
Series, Wythoff’s Game, Zeckendorf Notation

Blender Addon(s)
There is an addon called Add 3d Function Surface which can be coerced into producing many interesting shapes. It is included in the Extra Objects addon as "Math Functions"

If the purely function based approach fails you then you still have a variety of options. Some of which are a bit more interactive.
Modifiers and Scripting
You could model one part of the object and use a script to rotate it around and scale it up/down according to whatever algorithm you can imagine. For example a 2d version of a plant  on geometry daily, it's simplicity is deceptive. I tend to use live coding tools like tributary.io to figure out the math using .js with immediate feedback. Usually if I can figure something out in 2D, the move to Blender and adding a third dimension isn't that much extra work.
An Array Modifier and an empty can give very similar results to the broccoli.

This is a cone, tilted slightly and shifted away from its origin, then added an Array modifier and used a tilted (rotated) and slightly scaled empty as an array object.
The fractal nature of the brocolli calls for daisy-chained array modifiers, each building on the complexity of the previous.

Elaboration
perhaps a short walk-through script might better convey what otherwise would become a wordy explanation. This script is merely intended to show what daisy-chained Array Modifiers can do, and shouldn't be perceived as nice python or nice code. The script should result in something like the sunflower. Run the code in an empty blend file with the 3D cursor at the centre of the scene.
import bpy
import math
import mathutils
from mathutils import Euler
# make sure 3d cursor is at the center of the scene

num_items_in_spiral = 13
num_spiral_arms = 29
z_rotation = 2.0 * math.pi / num_spiral_arms

# add cone, modify the mesh,
bpy.ops.mesh.primitive_cone_add(vertices=12, radius1=0.354406, depth=0.901211)
obj = bpy.context.active_object
obj.data.transform(mathutils.Matrix.Translation((-0.5, 0, 0)))

# add empty for spiral arm
bpy.ops.object.empty_add()
obj = bpy.context.active_object
obj.name = "Empty_spiral"
obj.location = (-0.8, 0, 0)
obj.rotation_euler = Euler((0, 0, 0.179609), 'XYZ')

# add empty for radial array
bpy.ops.object.empty_add()
obj = bpy.context.active_object
obj.name = "Empty_radial_array"
obj.rotation_euler = Euler((0, 0, z_rotation), 'XYZ')

# add modifiers to the cone
obj = bpy.data.objects["Cone"]

mod = obj.modifiers.new(name="Array_1", type='ARRAY')
mod.use_relative_offset = False
mod.use_object_offset = True
mod.offset_object = bpy.data.objects["Empty_spiral"]
mod.count = num_items_in_spiral

mod = obj.modifiers.new(name="Array_2", type='ARRAY')
mod.use_relative_offset = False
mod.use_object_offset = True
mod.offset_object = bpy.data.objects["Empty_radial_array"]
mod.count = num_spiral_arms

The red cone is the primary object, the curve/spiral coming off it is the result of one array modifier on a translated and rotated Empty. The rest of the spirals are an extra array modifier on a different Empty (rotated around the scene origin by 2*math.pi / num_spiral_arms)
Whatever object/picture you choose to replicate, you can figure a lot out by drawing on top of the pictures and counting, but mostly experimenting. I think it's more accurate to consider these nice geometric objects as 3D fractals rather than the 3D embodiment of a golden ratio.


Trying to use array with mesh going from big to small. Meshes are alternately flipping I've been following the instructions here: Changing Size from small to big in array or duplication
It's not going well, however, and being new to this method, I cannot understand what the issue is. Any help would be immensely appreciated.

In an Object-Offset array, whatever transform would take the original array element to the Object will be repeated for each subsequent element.

So if (top row) the controlling Empty is offset in Y, and scaled by -1, then subsequent elements will have the offset from the previous element scaled by 1, -1, 1, .... . The scale multiplies.
To get shrinking elements, scale the Empty to a positive fraction of 1. (0.8 in the bottom row, with no Y offset, giving 0.8, 0.64, 0.512....)


How do you make hair with different colors on the same strand? I want to make a skunk's tail but that would require the strands to be half white and the other black. How would I set up the hair particles to do this?

Using the hair-info node's 'Intercept' output and a colorRamp node, you can control the color of a particle hair strand from root to tip.


How do I copy a property from an active object to selected objects? I have been using the Copy Attributes add-on to copy some properties from active object to selected objects. This add-on is not enabled by default and must be explicitly enabled. But its a very useful workflow enhancing tool.

There is a limitation though. Not all properties can be copied and even those that can be copied are copied in groups (Its hard-coded in to the add-on).

My question is if there is a built-in feature or any another other way to copy any property from the active object to the selected objects?

It appears there are few other options for copying properties.

Built-In Features

Choose the objects to which a property has to be copied (destination)
Then choose the object from which to copy the property (source)
In the Properties panel,  RMB on the property and select Copy To Selected.
You can also Press and Hold ALT key and then change the property on active object so that the selected objects also get updated.

In the screenshot, the show_name property on an Cube object is about to be copied to the Lamp and Camera objects.

Some properties can also be copied using the Object > Make Links menu available via Ctrl + L:

Add-On: System Property Chart

There is an add-on called System Property Chart, which is bundled with Blender but is not enabled by default. After enabling, you can use it like so:

The Property Chart panel is located in the properties panel of the 3D View Editor.
By default, some properties already exist for viewing and editing. You can save presets by clicking the + icon.
If you want more properties you can find the property in the interface and the right click on it and choose Copy Data Path and then paste it in the text area below the presets menu.
The first row displayed is the active object and the rest the selected objects.
By clicking the clipboard icon next to the column text, properties from active object is copied to selected objects.

Note: This panel displays properties of selected objects only. If there is no selection in the viewport, the spreadsheet is not displayed.


Workflow question and advice [uv-mapping, modular or singular build?] Now that i have just recently been able to wrap my  head around uv-mapping i don't see it to be sensible to build a complete structure like this one [inside & out] and then try to un-wrap it. So would it be better to build in pieces un-wrapping as you go? and piece it together when complete, then import?. How would you pros go about building a enter-able structure such as this stave church i'm building. It's the church from netflix's show DARK. A must see BTW.

I think you ask mainly what is answered on this post which is relevant because it describes when you need different textures and uvs :

Texturing each object separately VS all in the same texture file

generally there is no any rule but it is a common practice to keep things separated depending again on their final usage (gaming, archviz, animation etc), it is more a combination of scale, complexity and purpose.


How to use simple deform to bend geometry in a circle? I feel like something is just going way over my head here and I'm missing something really trivial. I'm doing a Grant Abbit well tutorial. I created a set of cubes along the x axis to use as the rocks for the well. I added a simple deform modifier. If I set it to bend at the z axis at 45 degrees, it makes a weird fan shape. I did also try making the origin set to an empty and that just swings the fan around.
File download: https://pasteall.org/blend/e826991d5a5e4e3b8f94e0ec92ff333f

Your object is currently aligned with the Y axis, it needs to be aligned with X axis, so rotate it 90°, apply the rotation with CtrlA and it should work.


Is there a selection tool that will select everything towards the cursor? So the tool I'm looking for is basically something that I would expect to see in the Select Menu but I'm not sure it's there or where else to look.

Basically, something like the following-> Select a loop, then everything else towards the 3D cursor.

Here is a visual.

Maybe there is python script that someone is aware of.

I don't think there exists any selection tool that uses the 3d cursor in this manner but there are a few that work in a similar way.

There is Select > Side of Active.

  Selects all data on the mesh in a single axis

If you select at least a vertex or an edge, it will select all the faces to the positive (right) or negative (left) axis mode of that selection based on the axis you choose in the operator settings. You can also of course just invert the selection to get the other side.

There is also Select > Loop Inner-Region.

  Converts a closed selection of edges to the region of faces it encloses

I would say this is almost the opposite of select side of active. Depending on where you select, it will select all faces to the side that has the lesser amount of faces to the end of the mesh.


Add a panoramic background to scene in Cycles I have a panoramic image which I would like to set as a spherical background for my scene, which is using Cycles Render.

As the camera changes orientation, the background should stay fixed (like a skymap) and not move with the camera.

Any ideas?

If your image is an equirectangular projection, you can use the Environment texture node within the World space node editor (see red markup), with Equirectangular projection type (second setting) :

The yellowed area in this image correspond to optional nodes you can add to control the position of the background if you have already set the objects and camera's position, and don't want to move them again.


Is it possible to opitimize Cycles' refraction material? I want to create an animation where a sphere moves. This sphere is going to be textured with a PBR work flow. However, the sphere will feature a relatively complex node setup, wherein one of the main elements is refraction.

Here is the issue...

The sphere is a placeholder object for the main character of a short film (sphere like main character), and will be in almost every scene. In order to make sense in the narrative, the shader for this character has to be semi-transparent/refractive.

Since this sphere is going to be in nearly every shot in some capacity, I want to keep render times for this object to the absolute smallest amount of time possible (preferably under 1 minute per frame).

Is there a way to optimize a refractive material or the lighting in the scene, or maybe perhaps there is a way to fake refraction, in order to keep render times as low as possible?

This is the effect I am going for:

This might be a little bit of a late answer, but Cycles' caustics handles large light sources very well, but small ones with difficulty. I'd recommend using the Light Path node, and two lamps for every light source. One is a lamp that shines for everything that is NOT reflective/refractive. The other one is a large lamp for ONLY reflective/refractive caustics.

To do this, I'd use the Is Reflection Ray and the Is Transmission Ray outputs of the Light Path node.


How do I curve a brick mesh into a hexagonal shape? I'm trying to model a brick tower that looks like this:

However, the tower has a hexagonal shape. With the curve/deform modifier, I can create a circular shape, but not the intended hexagonal shape. How do I go about modelling this?

You can still use the curve modifier, you just need a hexagonal curve.

Enable the 'Extra Objects' for curves addon by going to File> User Preferences> Addons> Add Curve> Extra Objects and ticking the checkbox.

The 'Add' menu now has extra objects, choose 'Curves Galore!'

Choosing 'Nsided' from the tool panel (T) and setting 'Sides' 6 will produce a hexagonal curve

You can then add several array modifiers on the brick before the curve modifier to create the rows of bricks.

I have also placed a 'Subsurf' modifier set to 'Simple' subdivision as the first modifier so that the bricks have a little more resolution to curve around the corners.


Camera tracking; movie clip does not show up as background footage I tried to replicate what Andrew Price did by creating a large sink hole in the middle of the road using blender.

https://youtu.be/CVPcT0dJmoY

I have tried to replicate it, but I am stuck somewhere.
I am trying to import an OBJ object which I  modeled in blender, into a movie clip.
 I have done the necessary things required to track the movie clip.

I started by inserted my tracking marks on to high contrast area in the movie clip, then have tracked it and it tracked successfully.

So when I click the solve button to generate the tracking data,  it does that successfully.

I then proceeded to add an object Constraints, by clicking on the "Object constraints panel" button, then selected a camera solver.
Then I could see the tracking markers displayed in the 3D view. When I hit alt 'A',  I can see the camera moving according to the tracking data generated for my footage.

I then split the view.  Then I proceeded to create another view port.
I left the left view port to be on '3D view', then I selected the right view port to be on 'movie clip editor'.
However, when I try to Click the  "set as  background" button,  the movie footage does not show up on the left view port. I have tried all I could, but the movie does not show up as a background movie clip for the left view port.

Please is there any button or box that I need to select or tick, that I am missing to click here?

After tracking and solving press Setup tracking scene, and then "set as backgroud".

That will set the movieclip to be used as image background for camera view.

If you want to set it manually , then just enable images as background, select your video clip as source and go to camera view on the vieport (numpad zero)

Also, before you ask, the background image is used for reference only, to render the image in the backcground read> Cycles not rendering image or movie clip used as background in the viewport


Enemy AI Reacts To Player I'm making a horror game using Blender, but there's just one code I struggle with.The code is how to make an enemy follow you, but stop when looked at by the player's camera. I'm pretty sure this action is done using Python scripting.

Without Python, you can have a steering - 'path following' logic brick to target your player.
A ray/near sensor from the players eyes that detects the enemy can then toggle a (boolean) property that sets the state of the enemy to follow or not.

Like the Weeping Angels from Dr. Who, your enemy would only move when they are not looked at.


Control MixShader value by shape key value I have a Mix Shader mixing two textures and one shape key applied to an object.

I want to control the mix shader value from the shape key slider.

I think this is achievable by using drivers but i don't know how to do it.

Select the mesh, in the node editor right click hovering the mix Shader slider and choose "Add driver-manually create later".
Then open a graph editor window and set it as "drivers" instead of "F-Curves".
Select the Fac driver you created, open the "N" tab, choose "Drivers" tab, set all thoose options:
Scripted expression,
var,
Type of var: single property,
Type of single property: Key property.

Lastly hover on the shapekey slider, right click on it and choose "Copy data path", then in the driver tab click on the empty path field and press Ctrl V to paste.

Enjoy (consider that in some cases the driver is not updated in the viewport, like in "material" kind of visualisation, but it will work in rendered mode, and you can always click the "Update dependencies" button to have it work).

This is the complete driver in my setup, and an highlight of a common mistake you may be missing.


Cycles node editor - Map gray scale value map to extremes I have a value map that is black and white, but it covers a very small range of that spectrum, having the brightest value at 90% grey, and the darkest somewhere around 80% grey. What I need to do is stretch these values, using nodes, from fully black to fully white, well maintaining their relative brightness. For example, if it spans between 80-90% grey, something at 81% grey would become 10% grey and something 85% grey would be 50% grey, etc.

If possible I would like to do this entirely proceduraly, so that any entered map would work.

The only solution and a major workaround that would work is:

Create a frame change handler that grabs bpy.data.textures and for each texture determines the min and max value in it (by iterating over all pixels). This would be slow. The data should be outputted to some scene custom prop array for example.
Drive a math cycles nodes with those custom prop array items. Everytime you switch texture you would need to re-target to appropriate array item (index). With this the rest of shader is simple.

With only nodes it's impossible because they operate per-sample. You would have to use as many nodes as are pixels in the texture and compare them (you can sample any pixel from texture with mapping vectors).

It would be possible if the min/max values could be encoded into the image (for example as grey values in 2 exact corners). The shader then would crop the texture by some extend and wouldn't use the border of the image with encoded data.

With OSL it's definitely doable but the texture would have to be part of that shader, it wouldn't work with RGB input socket (reason as above). Instead a path to the texture could be an input for such shader.


Movie clip resolution changes when added to an input node in Compositor I'm using Blender as a video editor.

I want to remove the green screen background from my clip and replace it with my own image. There are plenty of tutorials on how to do that, but I'm hitting a snag almost before I start.

In the Compositor, I created an input (Movie clip) node and a viewer node, and connected them.

When I put my clip into the input node, the resolution changes. The face of the subject seems to be compressed horizontally, and the clip looks to be about 5:4 or 4:3 aspect ratio.

Resolution of my movie clip is 1920x1080, and that is the desired output resolution.

In Blender Properties tab, Dimensions are set to 1920 px x 1080 px (default).
Aspect ratio is 1:1

Any help would be much appreciated!

Thanks

Edit 1:

Yes the image I will be compositing is 1920x1080, however the error occurs before I even connect the background image.

Edit 2: This is the second video I've made with Blender and the first had no issues like this (using the same camera) so I don't think it's a camera issue.

I used a Scale Node > Render Size as suggested by 3pointedit and it worked, still not sure how the problem was caused as I used this same camera before and had no issue. Thanks for the help though everyone!


How can I create irregularly apportioned vertices in regularly distributed vertices in a loop, without changing the loop? As already mentioned above, I would like to distribute all vertices evenly in a loop. The loop or curve should not be changed; is there method that does this for me automatically.

as you can see, the vertices are distributed irregularly.
now I want to distribute the vertices evenly, without changing the curve or loop

The shipped Loop Tools add-on > Space option may do exactly what you want..

It can make a cubic interpolation from existing irregular points, resulting in a smooth curve fit. You can set it to 'Linear'..

.. which will be more faithful to the jumps in tangent directions created by gaps between vertices before the operation.


Problems with GPU rendering in Ubuntu on a Macbook Pro Intel Iris 6100 So I know that it's impossible to use GPU on a Macbook Pro, running OSX, with Intel Graphic card in Blender 2.8 (I'm using 2.82). So I tried running Ubuntu on my Macbook with a USB booteable stick, blender works, but still says that Cycles will render from the CPU. So, is it possible to work? maybe it's because I'm running Ubuntu from a USB? Should I install something else?..thanks!

Macbook Pro 13 2015
Intel Iris Graphics 6100
OS is Ubuntu 20.04 LTS
Blender 2.82

Unfortunately Intel's integrated GPUs don't fulfill the requirements for GPU rendering in Blender 2.8x. You would either need a:

Nvidia graphics card with CUDA compute capability 3.0 or higher
AMD graphics card from GCN second generation or later

  CUDA

  CUDA requires graphics cards with compute capability 3.0 and higher. To make sure your GPU is supported, see the list of Nvidia graphics cards with the compute capabilities and supported graphics cards. CUDA GPU rendering is supported on Windows, macOS, and Linux.

  AMD

  OpenCL is supported for GPU rendering with AMD graphics cards. Blender supports graphics cards with GCN generation 2 and above. To make sure your GPU is supported, see the list of GCN generations with the GCN generation and supported graphics cards.

  AMD OpenCL GPU rendering is supported on Windows and Linux, but not on macOS.


How to export a model in blender along with the node setup? I have created a mountains scene and added a lot of detail to it through displacements in node setups. Unfortunately when I try to export this whole scene, I only export the main model and not the node setups that modify the model when rendering it. Is there any way around this? Thanks in advance.

You will have to bake your displacement into an image and use it in a displacement modifier to create an actual mesh that will be exportable to something like Unity.

Unfortunately the displacement generated from nodes won't become baked geometry, you can follow this video tutorial for the workaround.

https://youtu.be/McALCOr39rY


Refections on transparent object - renderd view diffrent to render Hi I'm staggering with a problem. I made PET Bottles with a Principled BSDF Node. The Material looks nice in rendered view but not in the final render. I'm loosing a lot of the light source reflection on the transparent part.
Any idea what I'm missing here?

This is an old bug in blender. You are doing nothing wrong. The information is there, but the render window is not displaying it correctly. It cannot display pixels that are transparent and luminous at the same time. Glares, glows, reflections. and fire don't display correctly.
View your image just as color (not color and alpha)

Your information should be there. To save it use a format like OpenEXR
For more info read:
How do I get the Glare node to output transparent instead of Black background


Animate with position and orientation from txt file I want to animate a body using an external file with x, y, z coordinates and quaternion data.

In the file every entry [x,y,x,q0,q1,q2,q3] represents a frame to be rendered.

I heard about Blender and its compatibility with python and, since I am a python user, I would like to know if it is possible to do what I mentioned above and how to do it.

Thanks in advance.

It's very possible, and doesn't even sound difficult to do.

Make sure Object.rotation_mode is 'QUATERNION' (once for the object):

ob = bpy.context.object # active object, assuming there is one
ob.rotation_mode = 'QUATERNION'

Reading the file:

import bpy
from mathutils import Vector, Quaternion

file = open("input.txt", "r")
for line in file:
    x, y, z, q0, q1, q2, q3 = line.strip(" \t\r\n[]").split(",")
    loc = float(x), float(y), float(z)
    quat = float(q0), float(q1), float(q2), float(q3)

    # Or cast to Vector / Quaternion type if you need any methods of them later
    #loc = Vector(loc)
    #quat = Quaternion(quat)

I assume line 1 in the file is meant to be the first frame in Blender and so on. Let's keep track of the line number:

for i, line in enumerate(file, 1):
    ...

Assign the location and the rotation in our for-loop:

    ob.location = loc
    ob.rotation_quaternion = quat

and insert keyframes for frame i:

    ob.keyframe_insert('location', frame=i)
    ob.keyframe_insert('rotation_quaternion', frame=i)

Finally, we close the file:

file.close()

For a better performaning way to animate with python, see:

http://www.blender.org/documentation/blender_python_api_2_69_10/info_quickstart.html#animation


Add vertex without subdividing edge then vertex slide? I found that subdividing edges and vertex slide take away alot from my workflow.
Is it possible to not have to do the long process? Just create a vertex on desired part of edge directly?

I figured out it's possible to duplicate any vertex and snap it to an edge, but then the problem is how to merge this vertex with the edge. Is that even possible?

Why doesn't knife tool work for me, when I want to create a vertex on an edge it doesn't cut only the edge, no vertex is created that way. Does it work for you guys? (knife tool doesn't create vertex on edge, if only the cut is for the edge, no face involved in the cut?)
The reason for asking because I want to optimize my workflow (don't waste my time with unnecessary process if there is a easier way to add vertices on edges where I want them)

First off you can use the knife tool to add only one vertex.
All you have to do is LMB  on one side of the edge, then LMB  on the other side, and press Enter or space to confirm.

There is another, potently faster, way of creating a new vertex. That is done by selecting a vertex on the end of the edge you want to subdivided and pressing AltD then G. That will run the Rip Edge tool then edge slide to move the vertex to where you want it to be. Because that tool automatically starts the translation on the new vertex you only have to press G once to get to vertex slide mode.

However using any of these methods will create Ngons, and in most cases really mess up your topology. So you should be very careful how and when you just add a new vertex in the middle of your mesh.


Object Changes Shape when added in blender game engine this is my first time using blender game engine for a game.

Im trying to make a game where a ball flies out of a camera when space bar is pressed, but when I fire the ball it changes its shape to an oval.

I changed the object to a cube but it turns into a rectangle
The thing stuck in the ground in the background is the deformed ball

Ensure the emitting object and all of it's parents have a scaling of (1.0, 1.0, 1.0).


Stream of mist between objects? I have a set of spheres in the scene, and I need a stream of mist to connect between the center sphere and the outer spheres.

This...

Should look something like this...

Make a smoke sim. Model flowing branches, set as smoke flow. Set Density to desired opacity. Set temp diff to 0. run sim. add balls at smoke termination points.

If you want it in motion, give balls a negative (-500) force field, raise temp diff slightly to .05, set dissolve time to 1 in domain, lower temp diff and vorticity in domain to taste.

In all cases you'll want to hide the original smoke model.


Is there a way to loop in some way, the w slider on 4D nodes? I have a little procedural nodes animation that has a wavering 4d noise texture made by adding the #frame driver to the W value. I would like it to loop, but since the W value is like a random seed, there's obviously not some distant number it can go to that will be the same. I've also thought about having the w value go up, to a certain point and then back down, but I think that would be too noticeable. I know I will probably have to use something other than the W value but any ideas would help.

You can use a 3d texture and animate the movement of the coordinate space.
I have a sample scene here with a large plane that is just meant to show how the coordinate plane is moving, and a cube representing your object.  Right now they both have Object Coordinates showing.

Using a Mapping node, we can rotate the coordinate space.  If you use these coordinates to generate noise and animate the z rotation, the noise will be rotating about your object.

If you don't want rotation but instead a more linear movement, you can add a second mapping node in front to offset the origin and thus offset the point of rotation.  Doing them both in one mapping node still rotates from the center.

From here, every 360 degree rotation still puts you right back where you started, but indeed you could map out any movement you wanted.
If you find the effect is not to your liking from some angles, I bet it would be possible to combine this with a W value that climbs to a certain value and falls back down, and it may not appear such a sudden change.


Gap created after Screw modifier Just a quick question, is it normal for there to be a gap along the surface of a mesh once the screw modifier has been applied?

There can be gaps but they're not inevitable.

The Angle should be 360° so the edges line up.
The Screw value should be exactly the same value as the object's dimension in the relevant axis.
The highest and the lowest vert should have the same distance from the screw axis.
After applying the modifier, using Remove Doubles with the relevant verts selected and a large enough threshold should kill any small gaps. Without that, a Subsurf Modifier might produce a gap.


Using Spin causes rotation I am using spin on extruded faces but for some reason it twists as it rotates.

This is what i have before i press spin:

So when i press spin i get this result:

Why does this twisting happen? I am using a mirror modifier don't know if that matters but if so the settings for it are:

Axis X and Z ticked.
Options:
Merge & Vertex ticked.

I was hoping it wouldn't twist but would just do a nice curve so the faces were facing outwards.

Am i misunderstanding how Spin works with the cursor?

Yes, you are misunderstanding how Spin works. Spin takes your selection and does a spin extrusion about the 3D Cursor, from the current perspective of the 3D Viewport.

Here's a screen shot to illustrate:

If you want your spin extrusion to be in alignment with a specific axis, align your 3D Viewport accordingly and enter Orthographic View before executing the Spin.


Blender how to make save game in exact directory? I want to make a nice game, but I need a function, so player can save all his game data. I want to know, how to make it so it saves all game data to the same folder, as the executable Standalone Runtime game file is located. Of course in another folder called Saves, which is located in Game File's folder. Plus, I want to know how to make multiple saves and how to make player able to delete some save files in-game. Please, help me.

Blender treats paths beginning with "//" as relative to the blend file directory. You can use bge.logic.expandPath to get the absolute path that you can use in standard python file calls to create data files containing all the variable data you want to store.

bge.logic.expandPath(path) Converts a blender internal path into a proper file system path.
Use / as directory separator in path You can use ‘//’ at the start of the string to define a relative path; Blender replaces that string by the directory of the startup .blend or runtime file to make a full path name (doesn’t change during the game, even if you load other .blend). The function also converts the directory separator to the local file system format.
Parameters:    path (string) – The path string to be converted/expanded.
Returns:    The converted string
Return type:    string


How can lock editing to one patricular line in graph editor? I have many lines in graph editor but I sometime cannot select a right keyframe to edit because it selects a keyframe from nearby line. How can I select exact line I want to edit and lock editing to it so it wont select anything around it?

Click on the eye near the line name to hide it.


Why is the scale of the model I try to 3D print so small? I'm trying to do 3D printing with Blender. When I import the object to the printer, it appears very small, I don't understand why... I tried scaling it to the maximum allowed by the printer software, but it is still too small. How can I make sure it's the right size?

STL doesn't use metric units, if your model is 1BUx1BUx1BU (BU=Blender Unit) it will be 1mm x 1mm x 1mm in size, despite the fact that 1BU is 1m in Blender.

You can fix it in two ways, either by manually scaling your object in the scene and assuming that 1 unit is 1 mm (after exporting to STL) or you can set the scale in the Blender's STL exporter to 1000.

I prefer the first method, as you don't have to fiddle with the scaling settings and you just model in mm.

Also, always make sure you 'apply the scale' of your object before exporting via Ctrl+A > Scale.


How do I make coordinates relate to global values? I'm new to Blender, and I'm already tired of the coordinate system in the small menu at the bottom left going to 0,0,0 on translate every time I go to edit a new/different vertex. How could I make the coordinates appear as global values all of the time?

E.g. I want the vertex at coordinate 1,2,0 to appear as 1,2,0 in the transform menu at the bottom left of the screen, and if I come back to edit that vertex later, still be seen as 1,2,0 instead of resetting the coordinates to 0,0,0 as it does by default.

Note, I use the exact decimal value menu at the bottom left. I do not want to have hand drawn, or approximate meshes.

I'm not sure what you mean by "transform menu at the bottom left".

When I translate a vertex of a mesh object while in Edit Mode, the Translate Operator is invoked and its properties are editable in the lower portion of the tool panel. Because the translation moves a vertex, the translation vector displayed here is the delta (the difference between the original position and the new position; the amount the vertex was moved.)

However in the upper right is the Transform Panel which displays the location of the current vertex, and this panel can be set to display either the Global or Local coordinates of the selected vertex, which sounds like what you want.

Does that help at all?


Blender rendering repeating same frame over and over When I started rendering an animation it kept using 1 frame for every frame and sometimes it renders blank as well. I am rendering on cycles, but it is also rendering instantly and when I put it on eevee it goes on cycles quality.

Most likely this is because you have an image sequence/single image in the video editing tab of Blender. Simply delete this strip, and your animation should render correctly.
This would explain the black frames, repeated frames, instant renders, and cycles-quality renders when set on EEVEE.


How do I export my model with some light (in .gltf)? I'm working on a model and I'm trying to export it in .gltf format.
In blender, I put a light to brighten the model, but when I export it, the lighting goes away.
I'm quite new to blender and I've tried some things, such as using a tool called ssgi but with no success.
What should I do to have the lighting in the export?

The model with the light when I'm working in blender.

The same model but with no lights when I preview it.

There's an "Include: Punctual Lights" option in the exporter that will include point, spot, and directional lights in your exports. However, note that (by default) Blender also displays "Scene World" lighting, and you can't just export that. You'd typically need to enable it in whatever viewer or 3D engine you are using to view the model, and that depends on the engine. A typical term for this would be "IBL" or "environment maps" in some engines. Metallic materials, in particular, require this type of lighting to look correct.


Irregular UV unwrap from rectangular object I have made the following model by manipulating the standard cube. When I finished, I used Ctrl-A in Object Mode (like this question suggests) to normalize the overall scaling to 1. However, after marking my seams and unwrapping, I get the UV pattern as shown below. I used the plain "Unwrap" command.

All of the seams and edges appear correct, but I'd like all the edges to be orthogonal to each other and not "skewed" on the grid. What can I do to fix this?

To fix this, I used the Conformal unwrap method. Thanks @Denis.


Blender tapered stroke I would like to paint in Blender  tapered stroke on a mesh like this

I can make this in Inkscape but is there a way to make this in Blender so that I could make free hand tapered stroke ?

Toggle the pressure settings in the paint tool bar for Radius and untoggle Strength so that you get a varied width but constant strength to your stroke. Enable Smooth Stroke either by toggle or pressing Shift+S, and possibly increase the samples to the stroke. This enables you to see the stroke lag behind the cursor and helps you round the stroke.

This is for freehand strokes - if you use the Curve Stroke tool and set up the path beforehand, there isn't a way yet to vary the width along the curve - it will evenly stroke along that curve.


Loop cut doesn't make a full loop I'm trying to model a room. For this I created walls around the room by basically extruding a cube three times and then attaching the ends. I want to now make a loop cut around the wall to make holes for windows and doors, but it doesn't work as expected. Basically I would like the loop cut to go all the way around the room, but for some reason it stops at one of the edges. See the pictures attached. Why does it do this and how do I fix it?

Try removing doubles in your mesh, you can easily do this by going in Edit Mode  pressing  W > Remove Doubles.
You can also type Remove Doubles after pressing the  Space Bar.