How to scale this object (a Tail of an Asteroid), so it is not crooked? I have a rigged animation of an Asteroid with a Tail. The Tail is a child of an Armature, and each Bone has a Track To constraint and points at an Empty. Each Empty has a Follow Path constraint. So the Tail follows the Asteroid and conforms to a curved Path.

Now, I need a trick. I need the Tail to shorten and lengthen at certain moments. It begins short (preferably 0 length), and when it is close to the Camera, it stretches to full length (say 1) - I need to animate that.

Now, I tried to scale the Tail object in X, but when it is very short it becomes crooked, due to the Armature rig, somehow it becomes crooked when very short. The same happens when I scale the Armature in X, it too is crooked and wonky.

Can someone have a look at my file. And see, how to do it properly in these given circumstances?

I'm attaching 2 screenshots to show what I mean by crooked.

I found something crucial, your models always have to be Applied on Scale and Rotation, specially if they are used in animation. This may be the source of your problem when you scale the geometry down, when you are modelling always remember to Apply Rotation & Scale to your models, it's a good guideline to keep. (CTRL+A+Apply Rotation & Scale in Object Mode)

Now, for the trick you wanted it's really a dirt trick, it's something harmful you can do, but it reproduces the effect you want, plus you can animate it. I selected your root bone of the asteroid.

And scaled it down while locking the Axis Z, (S+Shift Z)

It's a ugly solution and messing with bone's scale it's a bad way of doing things, but, it works. So for your animation, maybe you can animate the X and Y scale of your root bone.


How to place and merge meshes upon another one (and then delete them) I have copied the 3 meshes on the left (that I created using loopcuts on the "Surface" and placed them onto the right. Now they are lying on the "Surface" at the right end. I would like to simply subtract the 3 copied meshes from the "Surface" they are laying on in order to create 3 holes (doors). How can I do that?
As usual, thanks a lot in advance. You are my saviours.

You could do it with some cuttings, duplicate and snaps, but maybe the simplest ways is to use the Knife Project tool:

Separate your 3 faces with P (Separate) > Selection. Now your 3 faces are a separate object.
Select this object, then the main object, and go in Edit mode
Switch to Ortho Front View.
In the Tools panel, click on the Knife Project button. You've created 3 faces. You can delete the faces in order to create doors.
You may want to use the knife with Z (cut through) and C (cut orthogonally) options activated to create additional edge loops.


Stretching cube object Stretching out Cube object in real time until it touch's any other object in the
scene.Is this possible in real-time.This cube object need's to stop once it hit any other object.

Have you tried enabling snapping? When I am modeling, I typically enable snapping and set the snap element to "Face" and it works for me.


Height Map Using Vertex World Height (Z) as RGB Value I am able to render and save a height map from Blender using the nodes:

Render Layers (Out: Depth) > Normalize > ColorRamp (In: Fac, Linear, Out: Image) > Composite (In: Image)

However, the height map treats the lowest point on the mesh as 0 (RGB 0,0,0), and the highest point on the mesh as 1 (RGB 255,255,255). Can I generate the height map using the world coordinates of the vertices instead? My mesh origin is at (0,0,0).

Example - a vertex with a height of 50 should have a height map (RGB) value of (50,50,50).

Thanks!

Connect the depth output to a viewer node, then open an UV/Image window and select the viewer node as display.

If you click on the image (which seems generally totally white) you can read the values of every pixel.

So, you can directly save as image using a format that can handle theese "super white" values, like openEXR.

Just remember that Depth pass is not world height but distance from camera, so you will have to add a simple math node, subtracting the Depth value from the Z location of the camera (in my example 5 Blender Units)


Best way to get a list of modifiers in Python? How can I get a list of modifiers for Blender in Python? I know about bpy.types.SomeModifier(), but isn't there something to use to get a list of all of the possible modifiers?

I know the list isn't too long to make by hand, but I really don't want to hardcode it if I don't have to.

Is this possible to list out with bpy.types.Modifier()?

bpy.types.Modifier.bl_rna.properties['type'].enum_items contains a list of all modifier types.

To get a list of their Python identifiers you can do:

modifiers = []

for modifier in bpy.types.Modifier.bl_rna.properties['type'].enum_items:

    modifiers.append(modifier.identifier)

Or, more Pythonically:

modifiers = [modifier.identifier for modifier in bpy.types.Modifier.bl_rna.properties['type'].enum_items]


Which action should take newly created keyframes? I created a new action named BladeAction and keyframed the influence slider of a Shape Key I couldn't use the action in the Logic Nodes / Action Actuator. Then I examined the action in the NLA and Action Editor it looks like that:

A KeyAction strip has been created by Blender and is not accessible from the Action Editor the BladeAction has no keyframes and cannot be frozen (snowflake icon). I can use the KeyAction from Action Actuator but I'm somewhat confused why this behaves like that.

Why are no keyframes in the Action created by me? Why does Blender create an Action Strip* which cannot be edited?

[.blend] is already linked here: Can gravity be disabled for a single object in the BGE?

It seems that only Keying Sets like location, rotation accessible from the Keyframe Menu are stored in the currently active Action.

For each other property like influence slider values, colors, transparency etc. an F-curve associated to the object is created and holds the keyframes and some kind of virtual Action Strip is added to the NLA Editor.


Liquid simulation looks weird. Strange patterns I`m new to Blender and I have a issue with my liquid simulation.

I tried to make a glass of water, but the water acts more like jelly when its in the glass. It would look more natural if the water became invisible and only the surface was visible.

It seems to escape the glass as well. Any suggestions?

Video of the issue:

You should have diffusion turned on with those setting for water, if you have higher base your symulation will look more like honey or katchup, or like jelly in your case. Also material should have 0 roughness and 100% transition, and IOR set to 1.(33)

sett up: https://gyazo.com/aef5a4bec7dbd5baf17834b559ea81da


Using bump maps in with the stencil brush in cycles I am fairly new to blender. I have just finished UV unwrapping and coloring my model, and I am ready to texture it. When I load a bump map into a texture slot and start painting on the model there are no bumps, just color. What I am trying to do is at around 11 minutes 50 seconds in this video https://www.youtube.com/watch?v=uqokgANRb0M. I would like to do it in cycles.  Is this possible? I have tried many node setups with varying UV images and other things. Is there a certain node setup I need to make? I have a greyscale and normal map of the image, if this would make a difference.

I use a bump node to plug the image into, and then route it to the Normal of the shaders like the image I have here


How to use the Alt + Right click in edit mode in Linux I am trying to use the Alt+Right Click to select edge loops in Linux Mint but this shortcut doesn't work it is already used for Linux to reduce a window. I have checked the keyboard shortcut but it doesn't appear.

Keyboard shortcuts on the OS override those in Blender.

Two possible solutions:

Change the keyboard shortcuts on blender and avoid conflicting key combinations.

The main disadvantage custom shortcuts is that it's hard to follow tutorials or other help. If you work with blender on other computers your shortcuts will not match. Resetting to factory defaults will also result in the loss of your custom settings (unless you save them to a file).

Reassign the keyboard shortcuts on the OS using key-combinations that are not used in blender.

(The way I deal with it is by re-assigning the Linux keyboard shortcuts so that Alt of Ctrl keys are not used by the OS, but use the super (windows) key instead).
On Linux Mint open the system settings and navigate to "Windows".

and select the super key to move or resize windows:

You might have to restart Blender for all Alt-related keyboard shortcuts to work reliably.


Using an image as a flat backdrop? I'm using 2.79 and Cycles render.

I'm making a flat, cartoony scene, and would like to essentially use the below image as a horizon/sky texture. I want the image to display undistorted by perspective, independent of the camera/view angle.

I attempted to do this using the World tab > image texture, but I couldn't get it to do anything like what I wanted (under most settings it just shows flat colours from the image rather than the full thing, and one setting gives a kind of distorted polar coordinates-style effect, which is again different to what I'm going for)

I have tried using textured flat planes and cylinders, but these were both hard to set up within the camera view in the way I wanted, and ended up distorting the image texture.

Sorry if this is a basic question - I have tried searching for tutorials on this but nothing I found answered my question, perhaps because I don't know the proper name for this technique.

Thanks in advance!

You can set the world node tree from the "window" texture coordinates (so no distortions).
Then use an image texture (not environment texture).
The image won't move when the camera moves.


How to store and access generated data in a project? I have written some code to work in conjunction with Animation Nodes to use MIDI files to drive procedural animations. It works wonderfully, but I want to refactor and polish it before I release it. The main thing I wanted to change is to take the original MIDI data and convert it to a format that's preprocessed and more easily navigable since MIDI is a streaming file structure (it can only go forwards, if you want to go backwards you have to start from the beginning).
So to the heart of the question: How can I store and access the generated file in the .blend so my addon can use it without reading external files?

Keyframes

Suggest using your midi file reader to keyframe the animation. I have done this using the very basic pysmf reader to make an action of custom properties for each track. For example in image below "AE" for electric guitar track, and "AB" for muted trumpet track.

For each of the midi notes in the track, if there is an ON event, keyframe that to a custom property, eg middle C on electric guitar "AE" would be assigned custom property AE60.  The smf decoder gives middle C as C4, I get it's midi position 60 by finding its index in midi_notes list below. Your reader may handle this differently.

notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
octaves = range(-1, 10)

midi_notes = ["%s%d" % (n, o) for o in octaves for n in notes]
#pop off the last 4

for i in range(4):
midi_notes.pop()

Rather than using custom properties, ob["AE60"], another method would be to create collection property for the tracks and channels.

The velocity and event time in seconds, converted to frame, of each on / off note event in the track, are keyframed as a (frame, value) pair.  Constant interpolation will make the note stay on until an off event.

To find the value of AE60 in an action named "MidiAction" at frame 44

bpy.data.actions["MidiAction"].fcurves.find('["AE60"]').evaluate(44)

The very much WIP code to produce action above is here


3d printing a part from Blender PROBLEM SOLVED...THANKS PGMATH FOR THE HELP.

I'm brand new to using Blender, and I'm trying to teach myself some basics to use in conjunction with 3D printing.  To do that I'm trying to 3D print a plate with a logo on it.  However, I'm having an issue with one single letter in the logo showing up as "negative" space after slicing the model in the 3D print software (Repetier-Host).

I'm lost on why this is happening or where in the process I'm messing up?  The only thing I notice that is strange is that the shadowing for the letter in Blender looks a little different from the surrounding parts (and its more noticeable when input into the print software). In Blender and Repetier-Host that specific letter still looks extruded, even though the shadowing is strange (less shadowing, i guess), and its not until the model gets sliced does it become "negative".

And it's not like each letter in the logo was uploaded separately.  The entire logo was a single PNG file originally and converted to a SVG file through Inkscape. So why this specific letter is behaving differently is very confusing?

And FYI...when making the file Blender file I appended the logo (previously extruded) with a plate part to create the file full part.

Anybody have any thoughts or experiences with something like this?

Thanks.

The part about the shading looking slightly different sounds like the normals are flipped.  To flip a face's normal, select the face(s) in edit mode and hit CTRL F, then select flip normals.

Here is the documentation on normals, at the bottom of the page.


palette not shown in texture paint mode The palette is not shown at any brush i choose

Also i am not able to paint from any texture, and if i try for example using clone brush i would get just a black brush

If i try on another project these things it works, so, do you have any idea what may be wrong set up?

Any help is appreciated :)

Edit:
I realised that the problem is that some brushes miss, and i am still working so solve this
Some says that it s enough to open your project unchecking the load ui option, but for me it didn't work

You are using a mask brush which doesn't use colour.

Choosing a colour from the palette only makes sense with brushes that apply colour to an image such as draw. Brushes like smudge, mask and blur don't use colour information so don't see the palette. While the clone brush applies colour it takes the colour from the starting position not the current brush colour, so also doesn't get the palette visible.


Image texture won't appear correctly in Unity... Fine In Blender (And Yes It's Baked) In Blender, I made a model and baked the textures into a single image. It works great in Blender.

I imported my model as an .fbx into Unity, and then dragged in its image texture material.

For some reason, the image texture won't "line up" where it's supposed to go! I've watched a lot of YouTube tutorials and this is exactly what they tell us to do, so what could be the reason it's not working for me?

Okay, I had to outsource this to a smart person because I'm a beginner and frankly ignorant of all this stuff... but I'm going to post the answer for future newbies like me!

Okay, so the problem was in Blender. Inside the Object Data > UV Maps panel, I had several UV maps left over from my frantic attempts at baking. I had to delete those and re-import the armature+mesh.

Then, in Unity, I followed these steps (I did not need to re-bake my texture by the way):

In Unity, make sure to re-do everything like mark the rig as humanoid and force T-pose and stuff. I was frustrated for an hour because I forgot to do this and couldn't figure out why my animations wouldn't run.


Why are the settings not showing up? I have my object selected and don't know why the settings are not there. I've tried different objects and it's the same problem. Can somebody help?
Edit: I can see all the settings in the Shading tab..

This issue is likely caused by pinning the data-block's properties after an object was deleted. The property tabs can be restored by unpinning.

Description of the pin functionality in the manual:

  By toggling on the pin icon to the right, Blender can be told to
  display in that editor only the currently shown data-block’s
  properties, disregarding further selection changes. Toggle off that
  pin to switch back to default behavior, showing active data-block’s
  properties.

Alternatively you can also uncheck Load UI when opening a project through File > Open in Blender, which ignores all UI settings stored in the project file. This can be helpful for example when loading a project from older versions of Blender with a different UI layout.


Child changes position, rotation upon import in Unity I am trying to export a model from Blender (2.9) to Unity via FBX.
Location, scale and rotation are applied to all objects in the model, but still the eyes rotation and position change upon importing.
Does anybody have a hint what to look at?

Alright,
I got a hunch and it worked. Here's what I did:
Joined the eyes into the cat model and then separated them back into single objects.


Emissive Surface unknown shadow I made a lamp rig and but whether I use the bulb or a circle in front of the bulb as an emissive surface it casts a shadow in the middle of the lit area. What might be causing this?

The issue is not with the light itself, but with the Velvet material used for the backdrop.

If you make that material just a diffuse material you'll see that the light works perfectly...

(I switched the window emitter in the scene just to show the effect clearly)

Whatever effect you are after with the velvet you might need to achieve through different means.

Also if you are interested in a more realistic light bulb (no need for a different mesh as emitter) you can read: Glass render problem and Light-bulb Filaments: Brightness and Internal Reflections in Cycles


BGE: Create a single mesh Can I create a single mesh character from multiple meshes from the following file?

All off that in a single Body, obj, mesh.

Blend file

Select all the meshes: (hold SHIFT while clicking them one by one)

Press CTRL+J:

I haven't done any extensive checking on the rigging, but the character still walks:


How to deactivate User Persp (Local) view? I am accidentally going to User Persp (Local) view, and I don't know how to get back to a normal Perspective view..

When I'm in the User Persp (Local), I can see the objects on the viewport, but when I render it.. I got nothing in the render result

The point is, how to get back to normal perspective view?

To go back to Global perspective view, go to View -> "View Global/Local". The hotkey is Numpad /. You probably pressed this when you accidentally switched to local view. This also works for otho view as well, from global to local and back. (Just to add it in, here's a YouTube video explaining how it can be used to un-clutter your scene for easier editing.)


When I render my image, and select composite and combined for the render view, only one of the layers is showing I followed a tutorial on YouTube about how to make a planet in blender. Unfortunately, he didn't show you how to render it. The tutorial has a planet layer, and an atmosphere layer. Then in a compositer, I put them together but when I render with "slot 1" "composite" and "combined" in the bottom, only the planet layer shoes up. Please help soon as I am trying to do this quick. I can't seem to find any help on this same issue.

you have to use 2 renderlayer nodes and an alpha over node I guess - but unfortunately you did not show your nodetree from compositor so It s only a speculation....


Importing C++ functions created with pybind11 I am currently trying to create a C++ library with pybind11. My .cpp-file is a simple test and looks like this:
#include <pybind11/pybind11.h>

namespace py = pybind11;

std::string test()
{
    return "Test successful!";
}

PYBIND11_MODULE(TreeGenModule, m)
{
    m.def("test", &test);
}

Opening a Python interactive console I can import my compiled module and use the test-function.
However when importing the module from within a Blender-addon I'm trying to write, I can import the module itself but the interpreter cannot find any of the defined functions.
Any ideas why this error occurs?

EDIT:
Here's what happens if I navigate to the folder of my module and import the module using an interactive python session:
Python 3.7.9 (default, Nov 20 2020, 02:21:39)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import TreeGenModule
>>> TreeGenModule.test()
'Test successful!'

However, if I try the same import from within my module and invoke TreeGenModule.test():
AttributeError: module 'TBO_Tree_Gen.cpp_bin.TreeGenModule' has no attribute 'test'

So after some digging I found out, that this was caused by importlib.reload.
Blenders Reload Scripts-command only reloads the addon if the main file (in my case __init__.py) has been changed. (Also discussed here)
Since my addon consists out of several .py-files and I wanted everything to be reloaded if I hit the command, I used importlib.reload to manually force reloading.
I also used this technique on my C++-module, which you're not supposed to do!
Reloading C++-modules with importlib is not supported and may result in errors, just like in my case.
After removing this reloading instruction my C++-module works just fine in Blender. The only downside is, that I'll have to restart Blender, whenever I change my C++-module and want to see these changes in effect.


What is the Python script to set the current frame I have made a script to generate a game asset in one click ( http://blenderartists.org/forum/showthread.php?383624-Dark-Blender-(Official-Thread)-optimized-for-sculpting-and-game-asset-creation ). My script save the textures by doing a render and import them with the .0001 number meaning frame 1. If the frame is changed my script is unable to find the texture.0001 so i want to set at the beginning of my Python script the frame to 1.

you can set the current frame like this :

bpy.context.scene.frame_current = 1

bpy.context.scene.frame_set(1)


Optimize viewport for animation Hello to all of the Blender gurus. I would like to ask you a little complicated question.

What is exactly the blender philosophy for work pipeline?

Specific: I worked with 3ds max and maya and I am now trying to change to blender because i dont like autodesk. There are many tools for automating pipeline.

But in blender i challenge basics problems like >

A) Optimize viewport for animation (textures has 5000x5000px) so some kind option for preview (not render) textures optimizing without proxys?

So back to my question, is the philosophy of blender to make it so open, everybody must script their own pipeline from scratch ?

Or I can find somewhere links or answers for this kind pipeline/automation questions.

To optimize viewport performance limit resolution of textures which are assigned to meshes.

Open User Preferences > System tab > textures category (scroll down) > Limit Size. You can choose appropriate value from the dropdown list, where Off is set by default. Read more about limiting size of textures displayed in the viewport in manual.

In the example below limit is disabled first and texture isn't affected. Then limit is set to lowest value (126 px) for demostration purposes which makes textures become blurry and less visible.

To show textures on your objects in viewport follow steps from this question - How to show textures in the 3D View editor? which depend on render engine.


How to constrain two objects to face each other without a dependency cycle Logically, to me, a Track To constraint affects and objects rotation to point it to a location.  So if two objects are always trying to face each other, this shouldn't create a dependency cycle issue.  Neither object really cares which way the other is pointing, only where the other is location.  Alas, Blender warns me of a dependency cycle as I try to set this up a scenario where two objects have track to constraints to face each other.  In a simple setup, it sort of works, but there are little glitches as you move the objects around at times, and if I add some other parenting and/or constraints to the equation, you start getting weird results indeed.  Here is a link to a simple blend file showing the basic setup and the issue.

So, since this constraint loop is causing issues, my question is if there is any way to make this scenario work.  It seems like it should be an easy thing to do, but in practice, not so easy.  Thanks!

Just parent one empties to each cone, and track each others empties instead of the cone directly.


Average value in material nodes Is there a way to get an average value in material nodes? I am only aware of this option in compositor: https://docs.blender.org/manual/en/dev/compositing/types/output/levels.html

I think there is an issue with your premise. The Average Value node works in the compositor by performing operations on a bounded, finite image, with the resolution you set in the Render settings.

In material nodes, however, the vectors you use, and by extension, the colors, are in an infinite vector space. Not only that, but they aren't (by default) quantized. In compositing, there is a finite number of pixels, making it easy to average the image. In material nodes, you can keep zooming in forever, making it much trickier to get an average value1.

So, the answer to your question is that it isn't possible, because material nodes don't work the same way as compositing. If you ask a new question with a more specific problem, though, we might be able to help you find a way to do what you want to do.

1While it is (sometimes) mathematically possible to find an average value over an infinite vector space with calculus, I suspect that would be very tricky to implement in nodes (and probably impossible without OSL).


Posing a modeled hand I modeled a hand and added an armature, but when I tried to pose the hand, the armature moved faster than the mesh. In fact it moved outside the mesh. Why?

Thanks in advance.

I assume you used 'Automatic weights'. A reason could be that the piece of the hand that you want to control with this bone, this same piece is also controlled by another bone. This results in a mix of both bones. You have to find out which other unwanted bone is also controlling that piece of hand and edit its weights. But I'm not sure whether this is what you mean, I could be wrong :)


How do I save my rendered animation as a video/gif? Blender is only giving me the option to save as an image, it took a long time to render, so I hope to god I don't have to do it again, but if I do, so be it. I tried looking it up and found nothing.
This is a picture of what I see:

If a series of images has been rendered, you will find them in the folder where Blender saves its renders, which is C:\tmp by default (check the path under 'Output' in the Output Properties tab, shown below, to check what your current output folder is).
It could be you only rendered frame 120, as that's the current frame showing in your Render Result: maybe you hit 'Play' to check your animation, and started rendering using F12 (Render Image) once the animation got to frame 120.
If you go the Output Properties window in Blender, you'll find options, under 'Output', to save as file formats other than .PNG, such as .JPEG, .BMP, or video formats such as .AVI and .MPEG:

Be sure to set the 'Frame Start' and 'End' to the sequence of frames that contain your animation.
Use Ctrl+F12 to render an animation.
Just like you can convert the series of images it might have created into a video file, you can convert it to a .GIF file afterwards.


Scripted Copy of all Materials/Material slots from another Object How can i copy all Material settings from one object to another using Python ?

In the materials settings drop down menu in the user interface i can copy/paste materials:

Copy Material ( which calls bpy.ops.material.copy() )
Paste Material ( which calls bpy.ops.material.paste() )

When i try to call bpy.ops.material.copy() from the python console i get a {'CANCELLED'} and the subsequent bpy.ops.material.paste() does not work.

Copy only the active Material:

tgt.active_material = src.active_material

Clean copy of all Material Slots from src to tgt:

tgt.data.materials.clear() # ensure the target material slots are clean
for mat in src.data.materials:
    tgt.data.materials.append(mat)


Why can't I see the light source directly? I don't understand why I don't see the direct light from light sources. Is there an option to show it? I can't find.

Of course there is.
To see your lights, just enable Scene lights in the Viewport Shading menu.

Point/Area/Spot lights don't have any geometry to be displayed. You'll have to use an object with the Emission shader (Mesh light) if you want the lightsource visible.

Scene Lights vs. Mesh light visibility


Fluid going through a surface even though it is an obstacle I have a problem with fluid going through an object even though I set it to be an Obstacle. I made a video explaining my problem.

Settings:

.blend and other related files here.

For your Obstacle object, under Properties panel> Physics > Fluid > Volume Initialization:, select Shell.


When should object parts be part of the mesh and when separate? I am learning to model in Blender with emphasis on character design and animation.

I have both tried to implement models as a single mesh with Vertex groups and shapes keys as well as separate objects (parented). However, I still do not have a clear idea on which is a more correct method of attaching extra elements to a mesh, such as, eyebrows or eyes.

It seems like having them in the same mesh is easier to manage. Whereas having them as separate objects/meshes allow easier re-usability.

There are no rules about this. Whatever is more convenient for you in a specific situation and whatever works is fine.


Can I Cycles bake all diffuse lighting in one go? When doing ordinary renders with Cycles, you can get diffuse direct and diffuse indirect passes with one render by filling out the checkboxes.
When you bake with Cycles, as far as I can tell you have to bake one type of pass at a time for each pass you want, and Cycles has to do the same sampling of the scene over and over again to get each pass.

Am I missing some way to bake more than one pass at a time using the same set of samples, or is it simply a limitation of Blender?

Ideally I'd like to check the passes that I want to bake and save them in an OpenEXR multilayer file, then add them up in the compositor afterwards to get the maps I need.

We are facing a similar problem and I am currently investigating the same issue. In our automated lightmap process we use the following workaround to get the indirect and direct light information without having to bake two passes (we still bake 2 passes but one takes a split second).

Maybe this could be a solution for you:

Bake a combined map with x samples
Bake a color map with 1 sample (that is enough to get the full information)
subtract the color map from the combined map (via node setup or photoshop)
problems: if your textures/materials are too dark, you loose information due to the subtraction and overexposed black pixels

I am planning to make a feature request to combine the passes, since it takes significally longer to bake two passes rather then baking a combined pass. Maybe you would like to be a part of it?


Using a custom object to "hollow out" that same object? I'm a total Blender noob here, so I apologize in advance if I seem to have trouble understanding.

I'm trying to create a "picnic basket". I created a simple trapezoid by extruding then resizing a plane. But the result is a solid box and I need to hollow it out.

I'm assuming there's a way to simply partially "insert" a copy of the trapezoid down into the top and use it to "hollow it out", but I'm not finding any info online.

Any help is appreciated.

What you need is a 'boolean modifier' which is already present in blender.

Select your trapezoid by right clicking on it.

Create a copy of this trapezoid by pressing Shift+D.
Move it upwards by pressing 'G' and 'Z'
Scale it down a big by pressing 'S' and align is as shown below.

Now all you need to do is remove the top object from the bottom object. You can do this by adding a boolean modifier on the bottom big trapezoid.You can do this by selecting the bottom trapezoid and going to modifiers tab, click 'Add modifier' and selecting the boolean modifier as shown below.

Change the operation to 'difference' by clicking on the drop down menu.

Click the eye dropper tool and then click on the top smaller trapezoid.

Click on apply button.

Now you have your basket. You can now delete the top trapezoid by selecting and clicking delete.You will get something like this.


How to connect faces without intersection? I don't want to change the geometry of the faces I want to connect to. I'm sure more seasoned 3D modellers have a simple way for this. Please enlighten!

In the tutorials for joining cup handles to the cup they line up so it's not an issue. Another tutorial even extruded the start and end of the handle and then joined them in the middle. I don't think either would work here.

Here is the cross section:

You can use Boolean modifier to join them together. If the handle is in the same mesh of the cup body, just simply separate it as a new object by P, then boolean the two object. You will get a final shape without intersection after apply it.

NOTE: When using Boolean modifier, the intersection part has to be closed shape.


Do I need to apply a mirror modifier before exporting to Unity? I exported my character without applying mirror modifier and it seems it works well in both situation. Will it make any differences?

In exporting options, you may see that in many cases there is Apply modifiers option, and often it is ticked by default:

Example is for .ply, the same behaviour is in case of exporting to .fbx, .obj, .x3d. Note: default options of Blender itself also may be changed.
In this case your exported objects/s will be actually mirrored without your action.
With that option unticked you will notice difference because if not applied, modifiers change how the object is displayed and rendered, but not actual geometry.


Rotate object in python in BGE? Here's my code:

import bge
from bge import logic
from math import degrees

cont = logic.getCurrentController()
own = cont.owner
own_rotation = own.worldOrientation.to_euler()
mimic = own.parent
mimic_rotation = mimic.worldOrientation.to_euler()

own_rotation_x = "%.0f" % degrees(own_rotation.x)
own_rotation_y = "%.0f" % degrees(own_rotation.y)
own_rotation_z = "%.0f" % degrees(own_rotation.z)

mimic_rotation_x = "%.0f" % degrees(mimic_rotation.x)
mimic_rotation_y = "%.0f" % degrees(mimic_rotation.y)
mimic_rotation_z = "%.0f" % degrees(mimic_rotation.z)

def mimic_process():
    if own_rotation_x > mimic_rotation_x:
        then own.worldOrientation.to_euler.x -1
    elif own_rotation_x < mimic_rotation_x:
        then own.worldOrientation.to_euler.x +1

I am fairly new to python. I am trying to get an object to, every single 2 GE ticks (didn't specify that in script yet), an object add/subtract/do nothing to its rotation to try to match another object (in this case, parent). I get an error the line following the function. I am trying to fix my current code I have for the function, but I don't quite understand how to directly add/subtract/do nothing to an object's rotation based off what I have so far. How can I rotate this correctly? Thanks.

Removing the then inside of the if statements and replacing the - and + with -= and +=:

def mimic_process():
    if own_rotation_x > mimic_rotation_x:
        own.worldOrientation.to_euler.x -= 1
    elif own_rotation_x < mimic_rotation_x:
        own.worldOrientation.to_euler.x += 1


What's the range of values on a sound-baked f-curve? I'm doing a lot of sound baking at the moment, but it's kind of hard to work with since I don't know what kind of values to expect out of the f-curve.

Common sense would say that it would range from 0 to 1, with 0 being dead silence and 1 being as loud as it gets, but that doesn't seem to be the case. In normal cases, the limit seems to be somewhere below 2, or maybe it is equal to 2, But I haven't been able to find anything in the documentation. The docs on sound_bake() just say:

  Bakes a sound wave to selected F-Curves

and don't provide any information on the output, just the parameters.

Sound Drivers

Been doing a lot of sound baking lately too. You'll find different audio files have different levels, so unless you normalize them first using ffmpeg or similar you will have to find a way to deal with them.

What I have done in sound drivers is added a minmax property to each fcurve and using those values added an envelope modifier.  (Had to add the control point code to the python API.. that took a while..)

def fcurve_minmax(self):
    # return ((min, max), (min_index, max_index))
    # it thru keyframe_points
    if len(self.keyframe_points):
        col = self.keyframe_points
    elif len(self.sampled_points):
        col = self.sampled_points
    else:
        return ((0, 0), (0, 0))
        return(driver_minmax(self))
    # check for modifiers
    mods = [mod for mod in self.modifiers if not mod.mute and mod.is_valid]
    if len(mods):
        v = [self.evaluate(p.co[0]) for p in col]
    else:
        v = [p.co[1] for p in col]
    _min = min(v)
    _max = max(v)
    return ((_min, _max), (v.index(_min), v.index(_max)))

bpy.types.FCurve.minmax = property(fcurve_minmax)

After baking, cleaning, smoothing etc I can call

(_min, _max), (min_at_frame, max_at_frame) = fc.minmax

Noticed your other post re driver.  I am baking to a set of custom properties on a speaker object. I chose the speaker as it a convenient way to handle sounds and playback, and somewhere to hang the props that doesn't render.  These properties are then used to drive animations / create visualisers.

Here is what a 16 channel bake looks like on a small wav file.

You'll notice there are 2 envelope modifiers.  One maps each fcurve to its percentage of the maximum action range (Action), the other maps each fcurve across its baked range (Channel) to the mapped range..

Close up of how to set up the modifiers, channel CS8 range [0, 0.246] and the action from [0, 0.305], being mapped to [0, 1].  Top modifier will map it to [0, 0.246 / 0.305] the second to [0, 1].

The channel, freqA, freqB, min, max, and baketimes

I bake first and last in case there is no level at either end.

Ok now I have baked the animation, I can add a driver to any object(s) drive by channel 0 and create a visualizer.  Here is a very simple, and very quick, visualizer on the default cube by animating z-scale with channel0 then selecting grid visualizer.

The amplitudes of the fcurves can now be changed on the fly


Is there any way to stop Z-fighting besides remove doubles? Let's say you were to create a line 2 m long in blender, then create a 1 m long line in exactly the opposite direction so that edge z-fighting occurs. Is there any way at all to tell Blender to automatically cut the 2m line into 2 1m segments so that the line still has 3 total points, but doesn't display z-fighting? I've tried removing doubles but it doesn't really work in this scenario. I've got a lot of overlapping edges that is causing annoying z-fighting.

I'm making an aerogel collector for a Stardust SRC model but since I'm a beginner, I ended up making the aerogel grid very sloppily. I had to manually fill it myself, and I filled as many of the grid pieces as I could to try to prevent Z fighting, but there's still some going on.

And how do I fix weird shading? (picture attached)

No, I don`t think there is another method to get rid of z-fighting. If remove doubles does not work, try increasing merge distance in the input field that appears after using remove doubles:

As for weird shading just try to get your normals right. Toggle into Edit Mode, select all faces, then hit Ctrl+N in order to make the normals consistent. For those faces that did not get fixed, try flipping their direction by selecting them and clicking flip direction in Shading/UV tab of the Toolshelf (T):


store PropertyGroup in an external file i tried to use python pickle to dump a PropertyGroup to a file and try to restore it, but pickle can't dump the class and gives an error:

_pickle.PicklingError: Can't pickle <class '__main__.SI_type'>: attribute lookup
 __main__.SI_type failed

is there a way to dump a PropertyGroup to a file, or it's values then reconstruct the object on load, maybe?

example with the problem:

import bpy
from bpy.props import *

print("-"*60)

class MyPropertyGroup(bpy.types.PropertyGroup):
    name = StringProperty()
    index = IntProperty()
    value = FloatProperty()

bpy.utils.register_class(MyPropertyGroup)

class Mytype(bpy.types.PropertyGroup):
    lista = CollectionProperty(type=MyPropertyGroup)
    listaIndex = IntProperty(default=0)

bpy.utils.register_class(Mytype)
bpy.types.Scene.Mytype = PointerProperty(type = Mytype)

mytypes = bpy.context.scene.Mytype

item = mytypes.lista.add()
item.name = 'foo'
item.index = 42
item.value = 3.1416

dict_test = bpy.context.scene.Mytype["lista"].to_dict()
#AttributeError: 'list' object has no attribute 'to_dict'

import pickle

bytes_test = pickle.dumps(dict_test)

del mytypes["lista"]

dict_test = pickle.loads(bytes_test)

mytypes["lista"] = dict_test

print(
    "name: %s"%mytypes["lista"].test.name,
    "index: %d"%mytypes["lista"].test.index,
    "value: %f"%mytypes["lista"].test.value,
    sep="\n"
    )

Try to pickle the custom property which saves the data. You can retrieve the dictionary from it with the .to_dict() method.

import bpy

print("-"*79)

class MyPropertyGroup(bpy.types.PropertyGroup):
    name = bpy.props.StringProperty()
    index = bpy.props.IntProperty()
    value = bpy.props.FloatProperty()

bpy.utils.register_class(MyPropertyGroup)
bpy.types.Object.test = \
    bpy.props.PointerProperty(type=MyPropertyGroup)

obj = bpy.context.object
#assign some data to test!
obj.test.name = "foo"
obj.test.index = 42
obj.test.value = 3.1416

#if you haven't assigned any data to the attributes of obj.test
#obj["test"] may not exist
#the expression statement
obj.test
#will create obj["test"] with default values then
dict_test = obj["test"].to_dict()

import pickle

bytes_test = pickle.dumps(dict_test)

del obj["test"]
#no data - returns default values
print(
    'del obj["test"]',
    "name: %s"%obj.test.name,
    "index: %d"%obj.test.index,
    "value: %f"%obj.test.value,
    "\n",
    sep="\n"
    )

dict_test = pickle.loads(bytes_test)
obj["test"] = dict_test
print(
    'obj["test"] = dict_test',
    "name: %s"%obj.test.name,
    "index: %d"%obj.test.index,
    "value: %f"%obj.test.value,
    sep="\n"
    )


How to add transparency/alpha (material) value slider + viewport color Sofar I replicated all the needed shading tools for an object inside the tool shelve.

The transparency function however only makes sense when the UI also allows you to change the alpha value which is part of the material menu

This is the code I have sofar:

class ObjectShading(bpy.types.Panel):
bl_label = "Shading"
bl_idname = "ObjectShading"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_category = "Claas"

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

    obj = context.object
    mesh = obj.data

    row = layout.row()
    row.label(text="AutoEdgeBreak:")
    row = layout.row()
    row.prop(mesh, "use_auto_smooth", text="BreakEdge")
    row.active = mesh.use_auto_smooth and not mesh.has_custom_normals
    row.prop(mesh, "auto_smooth_angle", text="Angle")
    row = layout.row()
    row.label(text="ManualSmooth:")
    row = layout.row()
    row.operator("object.shade_smooth", text="Smooth", icon="SMOOTHCURVE")
    row.operator("object.shade_flat", text="Sharp", icon="LINCURVE")
    row = layout.row()
    row.prop(obj, "draw_type", text="Draw Type")
    row = layout.row()
    row.prop(obj, "show_wire", text="Wire")
    row.prop(obj, "show_transparent", text="Transparency")
    row.prop(obj, "show_x_ray", text="X-Ray")

Looking into UI.py I discovered this but I fail to figure out how I could extract the proper code to add to my script so it only renders the viewport color and alpha slider.

class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
bl_label = "Settings"
bl_context = "material"
bl_options = {'DEFAULT_CLOSED'}

@classmethod
def poll(cls, context):
    return context.material and CyclesButtonsPanel.poll(context)

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

    mat = context.material
    cmat = mat.cycles

    split = layout.split()
    col = split.column()
    col.label(text="Surface:")
    col.prop(cmat, "sample_as_light", text="Multiple Importance")
    col.prop(cmat, "use_transparent_shadow")

    col = split.column()
    col.label(text="Volume:")
    sub = col.column()
    sub.active = use_cpu(context)
    sub.prop(cmat, "volume_sampling", text="")
    sub.prop(cmat, "volume_interpolation", text="")
    col.prop(cmat, "homogeneous_volume", text="Homogeneous")

    layout.separator()
    split = layout.split()

    col = split.column(align=True)
    col.label("Viewport Color:")
    col.prop(mat, "diffuse_color", text="")
    col.prop(mat, "alpha")

    col.separator()
    col.label("Viewport Alpha:")
    col.prop(mat.game_settings, "alpha_blend", text="")

    col = split.column(align=True)
    col.label("Viewport Specular:")
    col.prop(mat, "specular_color", text="")
    col.prop(mat, "specular_hardness", text="Hardness")

    col.separator()
    col.prop(mat, "pass_index")

Adding the code

row.prop(mat, "alpha")

results into an error code stating that "mat" is not defined which makes sense.

So when I then add add the mat definition after the def command

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

    obj = context.object
    mesh = obj.data
    mat = context.material
    cmat = mat.cycles

I get this error and I dont understand this and what cases this. I just copied the code.

location: :-1
Traceback (most recent call last):
  File "C:\Users\info\Desktop\untitled.blend\Claas_UI_2.py", line 98, in draw
AttributeError: 'Context' object has no attribute 'material'

The context contains the current state within blender, eg bpy.context.selected_objects is a list of the selected objects while bpy.context.active_object is the active object.

While you can have an active material selected, every object can have their own active material, so it is an object property not a global context property. So in your example you want to use -

obj = context.object
mesh = obj.data
mat = obj.active_material
cmat = mat.cycles


How can I prevent my posed rigs from defaulting back to the static stance? Also undo questions I created a humanoid rig, skinned it and got all the project files open in the same instance. Started moving things around and then posing my model...

Issue number one... Using Ctrl+Z or even "Undo" in the "Edit" menu cause all objects to return to the original locations and removes all bone adjustments with the posed armature. I just want to step backward one adjustment, not revert the whole scene back to "just loaded objects in."

How is this accomplished?

Went through this several times across a multitude of hours - decided to abandon hope with undo and started using "Edit>Undo History" and selecting through, which works about 90% of the time. Began saving alternate saves for each change (save a copy) with a numeric rename.

I was finally able to get my model posed and ready for render/weld. I wanted to adjust the position of a scene object and slightly resize it. Clicked on "Edit Mode" and BAM! Everything reverted back to original position. Tried loading in from my most recent save - all objects were in original static positions at 0,0. I then completely closed everything without saving, deleted my entire scene, ran CCleaner to clear cache, relaunched Blender 2.8, and chose to load my most recent save (93)... Same issue. Loaded the save before that one (92), and before that one, all the way down to 89 -- all duplicates of one another... Exactly the same, everything back to project step 1, all undo history options were "original" in all modes (object, pose, edit, etc).

How do I keep the current status and adjustment of my scene as the point that I am working at, instead of everything reverting back to default position whenever I make one mistake or need to save and return later?

Is there any way to prevent Blender 2.8 from reverting the entire scene back to "original" positions for your rigs, meshes, objects, etc., within the scene?

Just press I to insert a keyframe or turn on auto keyframes, so that everytime you modify anything that can be keyframed, a keyframe is saved.

Auto keyframe is the red record button on the bottom right of the picture


Create Library Override of Data Block I want to access the "create library override" of a linked object in the data-block panel like shown in the image below via Python. When I do this, nothing appeared in the info panel. Is there any possible way to do this?

Got it:

obj = bpy.context.view_layer.objects.active
obj.data.override_create(remap_local_usages=True)

API link: https://docs.blender.org/api/current/bpy.types.ID.html#bpy.types.ID.override_create


How do I choose the next item after using Autocomplete in the Python Console? The list that populates below bpy. after using Autocomplete (Ctrl+Space) in the Python Console is: app, context, data, ops, path, props, types and utils.

I'm trying to select ops. The video just shows click and move on any suggestions?

The autocomplete functionality relies on uniqueness.

So bpy.ctrl+space
lists all the objects in the bpy name space.

And bpy.octrl+space
results in the single value ops as nothing else starts with o

When the match is ambiguous e.g. bpy.pctrl+space
you get two results

ath
rops

(for path and props)

There is no way to use keyboard shortcuts to select the correct entry, but if you double click on the item you want the entire item will be selected and then you can copy and paste ctrl+c, ctrl+v.

Remember Blender is open source, so in theory you could submit a patch that would add additional functionality to the Python console.


Curve modifier after applying scale looks wrong I thought I understood the curve modifier, but after walking through this simple sequence, I'm more confused than I started.
I start with two copies of the same thing. A cube and a Bezier curve. Each cube has a curve modifier with its respective Bezier curve as the curve object.

I then proceed to scale BezierCurve1 by 5x in object mode leaving it with a X, Y, and Z scale of 5. I scaled BezierCurve2 by 5x as well, but I did so in edit mode. The X, Y, Z scales for BezierCurve2 are therefore 1 (not shown).

Now comes the part where I'm confused. I applied the scale on BezierCurve1 and now I (mistakenly?) believed that the two sets of objects should be identical. All objects have their X, Y, Z scales at 1, the vertices are all the same (except for the offset along the y axis) but apparently not so. The modified Cube1 is now stretched in a strange way that I cannot explain.

What is going on here? Why are the two not the same?
I'm using a fresh install of 2.90. My final blend file:

When you scale a curve in Object mode, then apply the scale, it changes the curve's vertices radius up to the same ratio, as you can see if you go in Edit mode and open the N panel. Bring this value back to 1:


Different Materials with Linked Objects I have constructed a large model out of a few linked objects, which have been duplicated hundreds of times (using Alt+D) - imagine a wall built out of hundreds of bricks for instance.

I would now like to give these linked objects different materials so that they do not all look the same. The geometry will all be the same. Blender, though, doesn't give me a way of modifying the material of a linked object.

If this is not possible, is there a simple way of selecting a random number of these linked objects and replacing them with another linked object (which will have the correct material)?

In the materials panel, choose Object instead of Data.


How can I animate an opaque material to being fully transparent in Cycles? I'm working on an animation with Cyscles where I'd like to make a simple face animate between being opaque and completely transparent. How can I do this?

You can do something like in the image below.

Here I have added a simple glass shader to an object and mixed it with a transparent BSDF. Then I simply animate the factor of the mix shader
(0.0 - 100% Glass / 0% Transparent ; 1.0 - 0% Glass / 100% Transparent).


How to append multiple materials from different blend files I am making a material library file, how can I append multiple materials at once to the file? (each material is in a different file)

In Blender 2.76 you'll be able to set how many directory levels to show simultaneously.

You can download the last build, though it was not as stable as release:
https://builder.blender.org/download/

It works both for system folder and blender file data

Let's say your blend files are all in the same directory.

Choose One Level and filter by material:

You'll find all the materials used in all the blend files.


Working with high polycounts? I'm importing meshes to do some retopologisation on but blender just can't handle it without me having some sort of quadro card. Do I have to use mudbox or something similar to do work with such poly counts?

Update
As of this commit (will be in 2.77) VBOs are always enabled and the option has been removed from the user preferences.

Enabling VBOs (Vertex Buffer Objects) can often help performance with really high poly objects.
Enable it in User Preferences > System:


Particles started before animation does not appear in cycles animation render I have been working on a little side project where I am trying to render with cycles an animation of snow falling.

The snow is a simple particle emitter from a plane, and the catch is that I want the snow to be already filling my camera view at the start of the animation. For that I set the "frame start" of the particle settings to -200 which seems to work after running the animation for multiple loops.

The problem is that when I render the animation (with cycles), the snow is present on the first frame but then start over from the second frame. Rendering juste the second frame shows the snow though...

Do you have any idea of what the problem is here and how I could fix it ?

Here is a simple .blend file showing the problem:

Thanks !

As a disclaimer, i have seen those two posts but they are pre-2.8 :

Procedural snow with particles
Start particles before animation

So per Frederik's commment I looked into baking the particles and it seemed to do the trick...

In order to bake the particles, click "Bake All Dynamics" in the properties :

Thanks !


Why do eye poses not record in the animation? My animation works well except that the eye positions (rotations) do not record. I have rigged the eyes with IK and with Damped Track (separately of course) both methods work to animate beautifully but neither record in the timeline.
I have animated (in pose mode) in the timeline with the auto keyframe (circle icon in the player controls) and I have used the keyboard (I) command. Both seem to work. But when I scrub back to the frame where the pose was set, it has disappeared.
I have also tried setting the poses with all the eye rig bones selected, not just the control bone. Still no joy. I've run out of ideas.
Any helpful suggestions welcome.

Thank you for all your comments. Before posting the question I closed down the file deciding to 'sleep on it'. On opening it up this morning I find that the eye animations had saved and are now working as desired. Unfortunately that means that whatever was happening yesterday has not been identified and will probably return to bite my backside in the near future.
Thanks for help.


Texture Painting not working on some parts Sup. I made a Knife Model recently, and tried to texture paint on it. The Problem is, that there are Parts where it works and parts where it doesnt, and only changes the solid color if I paint somewhere. If I open it as OBJ there is a different part which is just black and cant change the color. Is there a way to "rasterize" the object as in Photoshop, so i can paint all over it? And yes, its a single mesh i guess...

Try Texturing all over it please: https://drive.google.com/file/d/1AOTmQfrKYmQ0X-Pz1rQ9HU_E_SLflNA1/view?usp=sharing

Its because your mesh is not unwrapped correctly. Check out this link to know how to unwrap a mesh -->  Painting a dog with texture paint, TOTAL NOOB

I've tried unwrapping your mesh but the sword shell mesh was not good, its mesh was overlapping. So i've just unwrapped blade and handle.

1st mark the seam using Ctrl+E and then U and Select Unwrap.

This is how a mesh is unwrapped. It should not be overlapped, unless you want same texture on it.

I'm not a teacher but here are some Remarks after seeing the mesh :
Try making different objects in this case eg., sword,shell,handle etc.,then and after its texturing is done (or) applying the materials, join the objects into single object using Ctrl+J. Don't make everything in same object from the start.
Hope your problem is solved.


How to set grease pencil palette when creating new strokes with python? Based on How to add points to a grease pencil stroke (or make new one) with python script?, I can add new strokes by:

str = fr.strokes.new()

where fr is a grease pencil frame object. But each time I do so, Blender will create a new grease pencil color palette with pink color. I want to ask how to set the color palette of the created stroke. Thanks.

PS: The document [1] of bpy.types.GPencilStrokes.new(colorname="") shows that the new method has a colorname parameter (which may be relevant), but I still do not know to set it.

PS: Blender version 2.78c

[1] https://docs.blender.org/api/current/bpy.types.GPencilStrokes.html?highlight=stroke#bpy.types.GPencilStrokes.new

A grease pencil object has a list of palettes, each palette has a list of colours. The name of each colour can be used in strokes.new() or be set after creation.

So you can use str = fr.strokes.new(colorname='red') or

str = fr.strokes.new()
str.colorname='red'

An example script that creates a palette and colours -

import bpy

scn = bpy.context.scene

if scn.grease_pencil:
    gp = scn.grease_pencil
else:
    gp = bpy.data.grease_pencil.new('mygp')
    scn.grease_pencil = gp

if gp.layers:
    gpl = gp.layers.active
else:
    gpl = gp.layers.new('gpl', set_active = True )

if gpl.frames:
    fr = gpl.active_frame
else:
    fr = gpl.frames.new(1)

if gp.palettes:
    gp_palette = gp.palettes.active
else:
    gp_palette = gp.palettes.new('mypalette')

if 'red' in gp_palette.colors:
    red_col = gp_palette.colors['red']
else:
    red_col = gp_palette.colors.new()
    red_col.name = 'red'
    red_col.color = (1.0,0.0,0.0)

if 'blue' in gp_palette.colors:
    blue_col = gp_palette.colors['blue']
else:
    blue_col = gp_palette.colors.new()
    blue_col.name = 'blue'
    blue_col.color = (0.0,0.0,1.0)

str = fr.strokes.new(colorname=red_col.name)
str.draw_mode = '3DSPACE'
str.line_width = 3
str.points.add(count=2)
str.points[0].co = (2.0,1.0,0.0)
str.points[1].co = (-2.0,1.0,0.0)

str = fr.strokes.new()
str.draw_mode = '3DSPACE'
str.colorname=blue_col.name
str.line_width = 3
str.points.add(count=2)
str.points[0].co = (2.0,2.0,0.0)
str.points[1].co = (-2.0,2.0,0.0)


Fluid simulation and animation https://www.instagram.com/p/Ba0fhHGAXxn/?taken-by=dkpatel25

As seen in above video I made the man using "control" property from Fluid simulation.
How can I make the man walk or animate in any kind with the fluid still inside him???

You can actually animate the object, and the fluid should stay with the object. You should increase the strength of the control factor while it moves to make sure the fluid doesn't slip away.


How can i change backgrounds between frames in '2D animation' workspace? I'm currently working on a 2D animation project on blender,which is the first time ever i've use grease pencil and the 2D animation workspace.

Here i just simply add the background as a plane into the scene:

But when the animation keeps playing i don't know how to change to another background:

In other animation software i just simply put the background into a layer and that's that.But blender seems blow all of that concept out of my head.Can anyone help me ?

A quick and dirty way would be to do this:

Create your second background as another plane anywhere out of camera, then create a keyframe with i > Location for both planes on the last frame before you change shot.
Go forward one frame (so to the first frame of your new shot), move the first background out of the way and put the second background in place, then create another location keyframe for both background planes.
Note that you should be in object mode to do these steps.

But, a much better way would be to use two separate scenes and cut between them using the VSE as explained in this tutorial at around 1h11m. It's worth watching the whole thing if you're just starting with grease pencil.


Make edges parallel in blender 2.8 Is it possible to select a number of edges and change their orientation with respect to one of them?

in edit mode select the loops you want to move, hit the "G" key twice will allow you to move the loop together.

Also, Propositional option while using the translation gismo


Texture Paint draws somewhere else than where I want I have a huge problem using Texture Paint.

When i try to color the character this happens:

I try to shade my characters but then it just draws somewhere else that is not even close to the damn thing. I did try to change the "bleed" settings but it still kept happening.

Turn off Symmetry in the toolbar. This option is used when you're texturing stuff like faces or anything that is symmetrical, but if you're going for ones that aren't symmetrical then just turn off symmetry.

Just scroll down to the very bottom and you'll see it there.


Export Skybox for Games I'm trying to make a Skybox in Blender with a cube and multiple UV maps. My workflow till now: Added a cube -> added 6 Uv maps under Data panel -> new Material -> new Texture. I don't understand how to get UV information on each face of the cube to the specific UV Map. I tried to add another UV Map then selected the face and Unwrapped it, but that doesn't work. How do I do this? And also, do I need 6 Materials or is 1 Material with 6 different textures also possible? <3

Edit: I want to import everything into the Unreal Engine, and I need 2048 Resolution on each face.

Each UVmap always contains the UV coordinates of all the object's faces.

If the material is the same for each face, I would suggest to make 1 material with 1 big texture that contains all 6 individual textures. Each face's UV island should cover to only a portion of the UV layout as it's done in this related answer https://blender.stackexchange.com/a/28349/15140

This is just one of the possible UV layouts. Sometimes can be useful to have a 3x2 matrix of images and using a rectangular texture... it dependes on your needs.


How to make an object automatically squish slightly at point of impact, while animating Is it possible to use soft body or rigid body dynamics to make this ball interact with surfaces and other objects?  I will not be using normal gravity, rather, I will be animating it bouncing around and controlling its shape and motion, but I was wondering if i could improve workflow and cut out some steps by having the ball automatically 'squish' when put in contact with a surface, and then 'unsquish' as it moves away from the surface.  So far, all I have been able to achieve with physics is an object that becomes totally deformed as the animation progresses.

I can achieve the desired result by using shape keys to create the 'squish', but I feel like this could be more simple.

Thank you for help!

What I did...

1 Created a UV Sphere
2 Created a 2X2X2 Lattice
3 Created an empty
4 Parent the UV Sphere and Lattice to the empty object.

Now ...

1 Create a vertex group selecting the bottom half of the sphere
2 Named the group "GroupSquish"
3 Fit the lattice and deform it's bases, leaving the top half lattices untouched.
4 Made sure the lattice only affect the "GroupSquish" vertices on the sphere.

Finally ...

Move the sphere up and down you should see the effect the lattice have on the bottom half of the sphere. Of cos I created this pretty quickly and you could
fine tune the effect further if needed.

So logically you can now animate the ball going up and down and it should just deform. And add horizontal/lateral(XY Plane) motion by animating the "empty" object! Voila!

Here is the blend file !!! How generous of me :)


What are the implications of a very large scene (scale-wise, relative to the default cube)? I routinely model objects for use in larger scenes based on real-world measurements. These measurements are given in millimetres. The easiest way to model therefore, is to set the scene scale to millimetres and input everything in millimetres. This avoids unnecessary button pushing (0's and .'s) and mental conversions.

The consequence of this is that the resulting scenes are very large in comparison to the default cube. What are the negative (and positive) implications of doing this?

In my experience, issues only tend to arise when you are performing any kind of simulation, such as:

The gravity of the scene does not reflect any change in in the scene
scale and therefore has to be manually adjusted to avoid objects
falling very slowly.
Similarly, the speed of sound does not reflect the change in
the scene scale when calculating the Doppler effect for exported
audio.
Mass calculations may return bizarre results (such as zero mass and
even negative mass)

On the plus side, Blender stores coordinates as floatingpoint and therefore no accuracy is lost when working with very large or very small objects. I have however read elsewhere, that there is a maximum scene size.

I am considering modelling individual objects in millimetres and then scaling them down at the end of the modelling process and then constructing scenes in a more reasonable scale. I think it would be beneficial if you could set the scene scale in Blender in one units and then set the input units in another scale. For example, you could keep the default scale of 1BU = 1m but change the input units to millimetres. In effect, typing 1234 when translating an object would be converted automatically into 1.234 m/BU.

One important implication that's not immediately obvious is that Blender's light objects won't scale properly with the rest of the scene.  As the objects in your scene get bigger the lights will look dimmer and sharper.

Before scaling

After scaling

One way around this is to use the unit scale feature in the scene tab instead of scaling the objects manually.

Also note that unlike the blender lights, objects with emission materials have no issues scaling.


Can blender render on multiple graphics cards? I have a PC which has 2 CPU's in the mainboard, 40 GB RAM and 3 Graphics Cards. Can Blender render for example one frame on all gpus at the same time?
And generally: is it possible to render on cpu and gpu at the same time?

Yes.
Blender's Cycles can use multiple CPUs and GPUs for rendering. You can use both CPU and GPU devices at the same time as well.


How to prevent selection of other objects while in edit mode I use ctrl+click a lot to quickly select segments of edge loops in edit mode, but sometimes this results in accidentally clicking other objects outside of the one I'm editing (which means I've selected both the object I'm editing and some other object).

This gets kind of annoying because it interferes with my view any time I switch to wireframe viewport mode, not to mention I don't want to later accidentally affect objects I didn't notice I selected.

Is there any way to prevent selecting objects while in edit mode?

Select linked (Ctrl>+L) to select vertices/edges/faces linked in the current object and then press Shift+H to hide the unselected vertices.

Hidden geometry cannot be selected or edited.

When you are done editing press Alt+H to Unhide.

Consider also creating Vertex Groups to simplify the selection/hinding process of different parts of your objects.


Render colors do not match the reference picture I have come across this problem that I am trying to make an exact model of a product by a client and their demand is to have an exact rose gold color (golden color with pinkish hue) for their product. But when I give the color using eyedropper tool from the reference image, the color turns out to be quite different from what it looks like in the  original photo. Can someone please help me? I need to deliver the product pretty soon. enter image description here

It's because the color is just in the material, the rendered image is affected by lighting/reflections. I would recommend going into the rendered preview mode and just tweaking the color/comparing the render to what you need until it matches up.


build modifier - perpetual loop I am trying have a mesh build and then unbuild in a perpetual loop. I tried to key frame the build parametre, tried animation nodes to drive the parametres, tried the nla, without success.
The looping animation will be linked to other scenes, so I am prefer a solution that works with linking. Any ideas are most welcome?
If the build modifier is not appropiate, is there a way to replicate the mesh build with animation nodes?

Thank you

Duarte's solution is the best solution I can think of. However, it will not work for more than cycle, meaning it worn't repeat more than once. To solve this, Animation Nodes can be used to automate setting the start frame and reverse options of a single build modifier.

Build Modifier

Lets say we want the length of each build to be 30 frame, then for the first 30 frames, Reverse will be False and Start will be zero, for the next 30 frames, Reverse will be True and Start will be 30, for the next 30 frame, Reverse will be False and Start will be 60, and so on. This pattern can be easily achieved using floor division, if we floor division the time by 30, the output will be 0 for the first 30 frames, 1 for the next 30 frames, 2 for the next 30 frames, 3 for the next 30 frames and so on. If we multiplied this output by 30, we get the Start value, which is $0, 30, 60, 90, \dots$. If we modulo the output by 2, we get the pattern $0, 1, 0, 1, \dots$ or in other words, $\text{False}, \text{True}, \text{False}, \text{True}, \dots$ which is the required pattern for Reverse. So we can imlement this and write the values using the Object Attribute Output Node as follows:

Which results:

Animation Nodes

Let me, in addition, show you how to replicate the build modifier in Animation Nodes. All we have to do is slice the polygon indices list using the Slice List Node, where the end index starts from zero, goes to the full length of the list, goes back to zero, and so on. The Repeat Time can be used to create a ping pong pattern where the output goes from zero to 30, then back to zero, and so on. If we divided that by 30, it will be in range $[0, 1]$, if we multiply it by the length of the list, we get the required pattern, and the node tree becomes:

And the result is exactly the same as the build modifier:


How can I disable Edit Source at my UI anyone knows how to disable Edit Source function? I am developing my project using the blender, I would like to disable Edit Source option whenever user Right Click on the UI, there is an option the user can choose to see the source code. I would like to disable it, how can I do it. I want to prevent the user from Right click and choose to go to the edit source.

Thanks

Can override any operator in blender
Unless you are prepared to edit the source code of blender and build without edit souce operator, and remove from ui menu, you can override the operator.  Simply a matter of registering another operator with the same bl_idname.
import bpy

def main(context):
    print("foo")

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "ui.editsource"
    bl_label = "No Edit Source"

    @classmethod
    def poll(cls, context):
        return False

    def execute(self, context):
        main(context)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

Now we have an item in the right click menu "No Edit Source", that does nothing because it will never poll.

The next choice is where and when to run, and register this operator.  As long as it is run after the original operator was registered, it will override the behaviour.
Should you wish to take this further can use python type(...) to override operators en mass. Sample scripts take out any bpy.ops.ui operators.
Edit: Updated for 2.8 (Operator.get_rna -> Operator.get_rna_type)
import bpy

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "ui.editsource"
    bl_label = "No Edit Source"

    @classmethod
    def poll(cls, context):
        return False

classes = []
def register():
    for op in dir(bpy.ops.ui):
        rna = getattr(bpy.ops.ui, op).get_rna_type()
        name = rna.bl_rna.name
        props = {"bl_idname": "ui.%s" % op,
                 "bl_label": name,
                 "bl_description": "Disabled"} #rna.bl_rna.description
        DisOpClass = type(name, (SimpleOperator,), props)
        classes.append(DisOpClass)
        bpy.utils.register_class(DisOpClass)

def unregister():
    for c in classes:
        bpy.utils.unregister_class(c)

if __name__ == "__main__":
    register()


Use a generated texture for Grease Pencil so I've made a building in blender with the Grease Pencil, and I've filled up with colors the walls, now I'm trying to put a generated brick texture onto these fillups, but I cant find any way. So does anyone know if there is a way? I would prefer not to use an image texture to make it random. BTW I'm a beginner. I want to replace the brown fillups with the texture schown on the right, the corresponding node setup is on the bottom

Grease Pencil Materials don't support shader nodes (yet). Link to the docs .
Since you can't use nodes, you can't use procedural textures like Bricks or Noise Textures.
You can still use a texture for the stroke or the fill in the material properties.
However, the controls are limited to Blend between a plain color and the texture, and Mapping (offset, rotation and scale).
Using a raster seamless texture you can achieve this kind of result :


Issue with boolean modifier with self intersecting array I'm trying to intersect an object (let's say a cube) with an array of some other object (let's say spheres). This works well as long as the objects of the array are disjoint. But as soon as these objects intersect, the original object disappears. Why does this happen, and what can I do to prevent it?
I show the mentioned toy example below. In my actual problem I use the array modifier to shift and rotate some object that will self intersect with the other copies, and I'd like to still be able to edit the original object from which the copies are made.

To recreate this problem:

Create a shere in addition to the default cube, and make it smaller and shift it to the top surface of the cube.
Add an array-modifier to the sphere such that multiple copies woudl intersect the cube.
Add a boolean-modifier to the cube with the "difference" mode selected, and use the sphere as a target object.
Hide the sphere such that you can see the hollowed out parts on the cube.
Increase/Decrease the offset in the array modifier until the spheres intersect.

Check the "self" box in the boolean modifier. This solved it for me.


Controling compositor by python I've been looking at the python code loging of Blender.
But in there things get loged as mouse clicks.

What i like to do is combine a few images into a larger one using compositor, but i need control over compositor by python script. The problem seams to me that it is a bit hard to "spawn" a few nodes, set their values and connect them.

I need an micture of:  image, scale, source image location, mix nodes, output nodes

I have no Code samples other then the log of blender python which in this case is of no big help.

A simple code example:

# switch on nodes and get reference
bpy.context.scene.use_nodes = True
tree = bpy.context.scene.node_tree

# clear default nodes
for node in tree.nodes:
    tree.nodes.remove(node)

# create input image node
image_node = tree.nodes.new(type='CompositorNodeImage')
image_node.image = bpy.data.images['YOUR_IMAGE_NAME']
image_node.location = 0,0

# create output node
comp_node = tree.nodes.new('CompositorNodeComposite')
comp_node.location = 400,0

# link nodes
links = tree.links
link = links.new(image_node.outputs[0], comp_node.inputs[0])

Here are node types you can create:
Nodes subclasses API

If you need anything more let me know.


Make Efficient Grass For Large Areas In The BGE I have a VERY large area (about 2-4 sq. km) of a landscape that I need to have covered in 3D grass, like how modern 3D games do it:

There have been a couple of problems I've been running into though whilst making said grass.  In one method I tried using particle systems by switching to the Blender Internal renderer and then creating a particle system and converting them to objects so they can be used with the BGE, but this put an excessive strain on my computer with the 3D Viewport while editing being 1-3 frames per second and the game itself playing even slower, later crashing after about 30 seconds of being tortured with 5 million+ object instances and several tens of millions of polygons to render in real-time.

I made that particle system using 1 grass model that has 24 triangles and 2 LoD models for that first model that had 12 and 4 triangles respectively.  Making a particle system using even the lowest LoD would require at least 6 million instances of the object with a hefty 24 million triangles to render.

So I need a way to have consistent result of grass in the manner I have described that gives results like the particle system in terms of consistency and visual results whilst being the least hardware-intensive possible.

Thanks to anyone who contributes.

I believe you have to rely on intersecting textured planes for this. The grass model with 24 tris is way too much (i am assuming actual strands). Additionally you have to "grow" the grass only in the player visible area, and cull it when it gets really far away and substitute with a similar ground texture (even triple A games do this, like Skyrim). Additionally don't forget to have a fustrum size of your sun lamp that doesnt cover the entire landscape, but moves with the player. Drawing shadows is very expensive.

There are more than a few tutorials on how to create good looking grass patches for all kinds of game engines and the underlying principles stay the same for BGE unless the engine uses their own custom grass system.

Here is a tutorial for 3ds max on how to do grass for UE4: https://www.youtube.com/watch?v=B4j5tzAIflU

Here is one in blender (very similar):
https://www.youtube.com/watch?v=BKxUKzpx--s

And here is a demo of an implementation of a generative approach in BGE: https://www.youtube.com/watch?v=kN6ftu0H4bQ

You might also want to have a look at different BGE forks like Upbge (https://www.youtube.com/watch?v=fx9JfJyCY6I) and Armory Engine (for better performance in transparency mixing and low poly meshes etc)


Parent shaking when hit play in bge I have a character  with an empty object as parent with the hand bone. I use this empty to parent the guns and I have a gun inside of it, when play the animation the weapon stay static inside the empty just like I wanted, but, my problem is  when I hit P to play the game the don't stay static inside the empty object, the weapon keeps shaking inside the empty object. someone knows ho to fix it? what am I doing wrong? There's another better way to parent a gun to gun to the characters hand? thanks in advance.

I had a similar problem when tinkering with the BGE.  I had a rudimentary cannon and large sponge rubber shells so no one gets hurt.  The empty was used to move the shells out of the barrel .  It was too close to the barrel if I remember properly and would sort of tremble.  It was long time ago but I can go back into that project and even send it to you if you want.

Try removing the parentage, move the empty about a little, then re-parent it, see if the problem goes away...


Higher texture resolution no improvement I am experimenting with some image maps from Andrew Price's Poliigon site, I am comparing two colour images for the diffuse texture, a 1k and a 3k, but I can't see any difference, surely I should get better results with a higher resolution image:

The node setup:

The image texture size - this is for the 3k image:

The render settings:

Output from the 3k image texture:

Output from the 1k image texture:

Higher resolution texture would theoretically improve surface quality for closeups, in the sense that texture might look less blurry.

"Might", because if you are far enough from the mesh surface the difference will probably not be very noticeable and at lower resolutions it becomes harder to see.
JPEG compression might also wash away some of the detail.

Besides you seem to be using a mix of 1k and 3k images in your node setup, which would further dilute any subtle effect it might have.

My guess is, for your use case and current rendering resolution 1k texture would probably be enough.


Take current rotation or coordinates as zero? Let's say I have object rotated at 19 degrees and I want to keep current rotation, but I need to see 0 in rotation field.

You can use the 'Apply' function to apply the current location, rotation or scale to make that the new 'zero' by pressing Ctrl+A and selecting the element you want to apply.


Why can't I resize the Toolshelf? So my problem is that I cannot resize the toolshelf in any direction, which is really annoying since I don't see the tabs because there are so many of them. I'd like to resize it and I have no idea why I cannot. And it's just the toolshelf, other areas can be resized with no problem.

pressing Numpad + or Numpad - you can zoom in or out on any window (or control) in Blender.

To resize the panel drag it with the left mouse button.


What is gzm (gizmo) and WGT Everytime I import MXH2 to Blender, I find there are some meshes in the last layer. They are named "GZM....". What are they?

I find some WGT in a file from blendercloud. I don't understand what they are either. I fail to find some tutorials about them.

These are the shapes used for the custom bone shapes in the rig once the rig is generated. If you are in pose mode on a rig, you can go to the details of the bone in the property editor and see that you can reference a mesh object or empty as the new shape for the selected bone.


About Merging One Texture with Another Texture which has Transparent Background First of all, i want to explain what i am on.
To test, i prepared a box with a material (picture 1) and a text with transparent background(picture 2) using nodes.

Picture1, the box

Picture2 and 3, alpha/opacity map to create text with transparent background and node setting for it

Question: Is there any node option to add text texture on box's burlap texture without affecting it...like in photoshop: text layer on another layer.
Question: i was tryig it with MixRGB node but all options on it changes the textures as in picture 4. Then i wanted to render it to see what it looks like. But then text doesn't seem in rendered window as in picture 5. Why does that happen ?

Picture 4, when i try it with MixRGB node and node settings for it:

Picture 5, Text doesn't appear in rendered window:

Plug the Alpha socket in the image node into the Mix Factor of the Mix Node there instead of the Color socket.


Hard surface modeling on cylinder So, I want to add some details to cylinder and I've been struggling with this for awhile and can't find a proper way to do this.

First method on the image is with autosmooth and this is basicly what I want but I need also to use node geometry > pointiness which isn't working as needed.

Second with subsurf and some loop cuts gives me good looking pointiness but the shape of this detail isn't what I am looking for. When I'm trying to add more loop cuts to hardness the edges cylinder is breaking (horizontal bulge under this element, or vertical strip along whole cylinder).

I've tried adding small bevel on edges, high density base model and what not. This driving me crazy.

Any ideas how to make it right?

UPDATE:

Here it's a blend file:

UPDATE 2:

Method proposed by @Róbert László Páli is by far most correct, I need to check how this will behave with PBR Metallic material, because there are some geometry, I don't know, glitches?

UPDATE 3:

I've tried it with some PBR material and sadly it's visible with light reflection.

Edge Crease

Use the subsurf, but insted of loop cuts, select the sharp edges, and press CTRL + SHIFT + E then 1 which will make the crease of those edges one.

Advice

Instead of autosmooth, you could use smooth shading and an edge split modifier after the subsurf. If you select both angle based and sharp edge splitting, you can add additional sharp edges by selecting them and marking them sharp at the CTRL + E menu.

Edit One

The edge split actually messes up the pointiness. You can use the auto sharp as originally.

The Blend

Edit Two

The edge crease - besides retaining the sharpness of the inset - also makes those edges not going little deeper, where they should. This is demonstrated by this simple circle:

You can start from a higher resolution cylinder to make those glitches less apparent. The higher the resolution of the base mesh, the less that glitch is visible:

Note: The mesh density at the part where you want to use the pointyness is important, other loop cuts may be  removed. I have also updated the Blend.


Multiple extrusion on selected curve objects using the Option (alt) key In Blender 2.80 I was able to extrude multiple curve objects, including text and imported SVG files by simply clicking and dragging on the Geometry Extrude field while pressing the Option (alt) key. That feature seems to be broken or removed in version 2.81. If I press the Option (alt) key then the field for the parameter freezes. Did they changed the way to do this?

Ok I found the answer at the developer site. I had the Emulate 3 Button Mouse option checked. That changed the behavior of the Option (alt) key in combination with the left click button.


Blender is not running on Nvidia gtx 1050TI Problem
I tried to install Blender software on my computer. I tried installing it via the .msi file downloaded from the blender site.
Installation was a success, but I was unable to run the app, neither as a user or administrator.
Each time I was receiving Exception_Acces_Violation and the app was not running.
What I have tried so far
After installation, I tried to use OpenGL to run it, but there was no success. I have also tried to run via command line and even in debug mode - I was still receiving Exception as stated over.
After those problems, I've decided to download it as a zip, unzip it, and create a shortcut to it. Also - I have changed my computer to use Intel GPU rather than Nvidia GPU for Blender and somehow I was able to run Blender finally. The only thing I was mad about was performance - it was more than bad.
What I hope I would like to run it on Nvidia with better performance. For now, I have no idea what to do.
I am trying to run in on a laptop, specs below:

Processor Processor Intel Core i7 7th Gen 7700HQ Base Clock Speed 2.8 GHz Cache 6MB

Memory RAM 16GB

Graphics Graphics Processor Nvidia GeForce GTX 1050 Ti Dedicated Graphic Memory Type DDR5

OS Microsoft 10 Home Edition OEM

I don't know if this could be helpfull, but try to unistall blender, after this try to reinstall it again from Steam


How do I change fluid material in a simulation Been at it for a couple hours every youtube video they already have a material on their fluid but mine is just a bunch of particles not a liquid, I have 0 experience in liquid animations so any help would be appreciated as I could only find one other person with a similar problem, I did change the material of the cube that is the domain thinking it would change the fluid but it did not, yes the liquid still looks like that when I am not in wireframe, it doesn't even show up when I render.
I would like to share my blend file but could not figure out how.

(It's already mentioned in the comments but to give this question an answer...)
You need to check the Mesh checkbox which you can find in the Fluid settings of the domain object. Then you can assign a material to the domain object which represents the fluid.


Animation Nodes sockets stopped connecting I was playing with creating objects on a spline (following the Dominoes.blend example file) Something I did crashed blender. I reopened the file and I can no longer connect the purple spline socket to a purple spline socket. ???
I tried closing blender and starting from a new file. I opened the dominoes file and added new nodes (spline from object, get spline length) and was unable to connect the purple sockets.

What does it mean when a socket is faded (transparent)?

Thanks

The Splines from Object outputs a list of splines by default because a curve object can have multiple splines in Blender. You can see that it outputs a list by looking at the socket transparency.

You have two options:

Use a Get List Element node to get the first element from the list.
Open the advanced settings of the Splines from Object node and switch the Import Type to Single.


Blender 2.81 missing pie menu Yesterday I switched to 2.81 stable and now all Pie menus appear as usual except when I press Tab, then it only switches from edit to object mode and back, as if there is no pie menu add on installed.
If anyone has a solution to this I'd love to hear it.

Thanks!

You have to check "Tab for Pie Menu" box in Preferences>Keymap


Execute Node Tree returns different result each time it is run in static setup I created an animation-nodes setup which should take a cube, scale it and translate it by its new dimensions. This step should be repeated so I put it in a loop.
I thought when I press "Execute Node Tree" the result I obtain would always be the same; instead it changes; the same problem persists if I decrease the Instances in the Object Instancer.

I do not fully understand why this is and I don't know how to fix this. The behavior I'd like to is that when Instances is for example 4 it should not matter if it was some other number before.

Attached is a screenshot of the setup and the (expected) result of the transformed cube as well as the .blend file.

Any help is greatly appreciated.
Best regards

blackno666

By reading the transformation values of your instances in the Object Transforms Input node and later setting them on the same instance in the Object Transforms Output node you create a feedback loop. Each time you execute the node tree you modify the object based on the values of the previous iteration and not on some default state. Only when you increase the number of instances you get “fresh” objects, which is why the instances might appear at the desired location at that time.

My suggestion is to not use the instances' Object Transforms Input but rather compute the transformation values some other way. For example by using the Index of the loop. You could also add some other objects' Object Transforms Input, e.g. the location of another cube to influence the offset of your instances. You only have to be careful if you write the transformation values that you're reading.

Edit:
I modified the previous solution to use a transformation matrix instead of a mathematical expression. A combination of a list of matrices or repeated multiplication – as AN's Matrix Math node has no Power built in – allows the recreation of something similar to Structure Synth's iteration function. A more complex node setup would also allow it to pick a different matrix (or a mixture of them) for each iteration at random, resembling the assignment of multiple definitions to the same rule in Structure Synth.
If you want to avoid the matrices you could also try to read the transformation values of an object's predecessor in the object instances list.


Apply the explode modifier for usage in the game engine Is it possible to use the animation data generated by the explode modifier for an animation in the game engine? If you start with the object you want to blow up, subdivide it, add a particle system, set the settings to make the particles go boom, then add the explode modifier, You will have a nice explosion. However, particle systems are not supported in the game engine, so Even if the object you want to blow up is set to play the animation using the action actuator, nothing will happen in the game engine. I have tried applying the explode modifier, but all that does, is create a mesh based on the particle system data for the selected frame. Is there a way to use the animation data from the explode modifier as a action in the game engine?

This is not possible to do using the explode modifier through the particle system. However, you can use a rigid body simulation to simulate the debris, and animate each piece. Those animations can then by played in the game engine.


Where is "view selected" inside Blender 2.80? Do you know inside which menu "view selected" is located in Blender 2.80?

It seems the feature is now called Frame Selected

You can find it in View -> Frame Selected
The default shorcut is . on Numpad


Fitting clothes to character model with python I want to add different clothes to imported character models with python.
I read a similar question about cloth-modification to fit a character model here, but it seems this modifier can't be used with blender python. Is there any way where I can automatically add locally stored clothes-objects to imported character models and make them fitting well via python? I am using MH for the character modelling, but it seems adding clothes can't be scripted there, so I guess blender is where this step needs to be done.

Well, i don't know what modifiers you mean, but a common way is to create the Basic shape of the cloth around the Body.
After that's done you add a subsurface and a shrinkwrap mod. Now switch to edit-mode and play around with the modell untill most parts of the cloth fit to the Surface of the character. Now you add a solidify mod. Now you should have a simple cloth-part fitting onto your mesh.
For more a more detailed explanation check this out:

  https://www.youtube.com/watch?v=ljMePAmmxx4

Hope I can help you...


How do I use the snap tool without having my objects intersect? I'm a beginner blender user and I'm trying to do some of those famous shape such as donuts and I'm trying to make the shape of dripping icing, but when I use snap it intersects with the other part. How can I prevent this problem? Although most of the videos use it normally without any problems. I could make the donuts shape and I made the icing but I need to make the drip.

I find using closest edge or vertex is much easier to control than "snap to closest face". You can place your mouse cursor near the edge/vertex you want to snap to and an orange circle lets you know where it is about to snap to. If it is a complex model with lots of close together edges and vertices it helps to zoom in as much as possible to make selecting the correct snap point easier.
Also, selecting "closest", "center", "median" or "active" can yield dramatically different results depending on your geometry. Its not a bad idea to try each setting when you first use a new tool to see how each performs differently.


Another dark light problem I have the dark light problem and can't figure out what settings are wrong. I have read about different solutions for this but none work for me. I think the scale are right but i am pretty fresh in Blender so i could be wrong. I have put a link to the file.

Blender file

To increase the brightness, change the strength of the lamp to a higher value.

If you want more even light, I recommend changing your light to an area.


Cannot blur objects with Z Combine I'm making an animation where a camera orbits a number of objects. Each object is on it's own render layer and has it's own blur effect.

So here is the setup for the visual effect i want.

However the problem with this is that when the camera rotates around the objects, Alpha Over in the compositor does not render the objects depth according to their distance from the camera but just as ordered by order of the Alpha Overs in Node Editor.

When I switch to Z Combine the order of the objects as rendered is working but there is no longer a blur effect on each object.

Can anyone help me get the blur effect I want please?

I got it working. As PG Math proposed I used Alpha Overs and Mask. I didn't use Z transform.

For each object layer ( except background ) i set all other object layers as a mask. The camera can now freely move around the scene and the objects are blurred nicely and the objects render correctly.


Ocean modifier source code Is source code for the ocean modifier accessible? I looked through my Blender installation, but I can't find it.

I'm trying to create a game (not in Blender because it's for iOS/Android) and would like to use real-time generated ocean waves rather than using prebaked .obj files, but have no idea how to make waves like that on my own.

You can't find the source within the Blender installation because it's compiled code (C/C++).

An probably older implementation: Blender_Ocean.c has pointers to the original paper by Jerry Tessendorf Simulating Ocean Water.

You find the current source file in GIT version control