How to recreate a "point cloud sandbox" effect in blender? I wish to recreate this effect with particles.
Having the point cloud reforming the object after interaction with a field.
http://pointcloudsandbox.cornflex.org

Rather than use a particle system you can use the vertices of a Soft Body as the source of the point cloud. This has the advantage of each 'point' having a natural 'at rest' location which it will try and move to, to effectively re-construct the original object once the distorting force has 'moved on'.

To set this up, create your mesh and add Soft Body. Disable gravity (by sliding the Gravity property in the Soft Body Field Weights to zero) and optionally disable Soft Body Edges (if you don't want the points to act as if they're 'linked' - otherwise, consider reducing the spring strengths so as to weaken their effect). Add any number of forces to the scene and animate them to generate the required distortion - in my case I added a Wind force and a Vortex field and had them 'fall' through the soft body). Adjust the Soft Body friction and Goal settings to get the desired effect. For example :

Note the Friction and Damping settings to dampen down the motion somewhat.

Add a mesh (eg, a cube) to act as a domain for the point cloud and add a material to render the points, sourced from the vertices of the soft body mesh :

Note how the Point Density is set to Object Vertices. Adjust the other settings to get the desired effect (eg, Radius, Resolution). I used a mix between Emission and Absorption and adjusted the Multiply nodes to fine tune the effect.

This produces the following result :

Note that this is using a relatively small number of vertices for simplicity and demonstration purposes - for quality similar to your sample images you would require many more points in your mesh. To render it you would need to drastically increase the Resolution of your point cloud (requiring more memory and computation time) and significantly reduce the Step Size in the Volumetric rendering settings (which will slow down the render considerably).

Blend file included

Here's a more refined example with higher resolution, with a material that shows each 'point' as being better defined along with good edge highlighting. Also, used a Remesh modifier to get a more even vertex distribution (the default Suzanne has a much higher vertex density on the face than on the top and back of the head).


bmesh/python - list directly or indirectly connected verts For a single vertex, how can I create a list of all the vertices connected directly or indirectly to it?
Similar to Select Linked but without actually selecting anything.

Assuming the following definitions are a correct interpretation of what you are asking...

directly: connected by a single edge
indirectly: connected through a continuous path of N edges

...then the following code will find all directly or indirectly connected vertices of a given vertex. findConnectedVerts() takes the vertex of interest plus a maximum depth as arguments. It will then recursively find the connected vertices. I've tested this on a cube to verify that depth 1 yields the directly connected vertices, depth 2 yields all but a single vertex (which is 3 away) and depth 3 yields all the vertices in the cube (well, not the vertex passed in).
Note: I wasn't considering performance only functionality
import bpy

def getEdgesForVertex(v_index, mesh, marked_edges):
    all_edges = [e for e in mesh.edges if v_index in e.vertices]
    unmarked_edges = [e for e in all_edges if e.index not in marked_edges]
    return unmarked_edges

def findConnectedVerts(v_index, mesh, connected_verts, marked_edges, maxdepth=1, level=0):
    if level >= maxdepth:
        return

    edges = getEdgesForVertex(v_index, mesh, marked_edges)

    for e in edges:
        othr_v_index = [idx for idx in mesh.edges[e.index].vertices if idx != v_index][0]
        connected_verts[othr_v_index] = True
        marked_edges.append(e.index)
        findConnectedVerts(othr_v_index, mesh, connected_verts, marked_edges, maxdepth=maxdepth, level=level+1)

def main():
    mesh = bpy.context.object.data

    connected_verts = {}
    marked_edges = []

    findConnectedVerts(0, mesh, connected_verts, marked_edges, maxdepth=1)
    print(",".join([str(v) for v in connected_verts.keys()]))

    connected_verts = {}
    marked_edges = []

    findConnectedVerts(0, mesh, connected_verts, marked_edges, maxdepth=2)
    print(",".join([str(v) for v in connected_verts.keys()]))

    connected_verts = {}
    marked_edges = []

    findConnectedVerts(0, mesh, connected_verts, marked_edges, maxdepth=3)
    print(",".join([str(v) for v in connected_verts.keys()]))

main()


Contain mesh within another mesh boundaries? I'm trying to limit a mesh within certain boundaries so that I can then scale it really big and the mesh never goes out of boundaries of a box.

I've tried using boolean but I get a plethora of strange artifacts. The mask modifier (as I understand it) only accounts same-mesh vertex groups. This wouldn't cut it, since when I scale the mesh I need the box to remain the same size.
I'm trying not to resort to hiding it via compositing, but if that's the only other way, I'll see what I can work around with that.

Do any of you know how can I achieve something like this?
Thanks in advance.

Consider scaling and translating your UV coordinates for a texture producing a displacement.


UV mapping rendering wrong When I render my UV mapped object it shows fine in the design stage but the rendering looks very wrong. What is happening and how do I fix this?

Check your texture setting in the material panel.  Try being in render mode rather than texture mode.  The render mode and texture mode can show different results.

On the texture panel. Select type Image. Open the image. Select Mapping UV Map.


How can I create a wall with random bumps? I am trying to create a wall in blender that looks like the picture but I don't know how to make the wall create the random bumps. How can I do that?
The wall I am trying to create.

If you're ok with using a shader, something like this can be accomplished by a single Noise Texture, run through a ColorRamp to give a harsh cutoff to the tops which forms the flat sections.
This is just a simple example - if you want more variation in size, you can combine different noise textures of different scales until it's more to your liking.
Remember to turn on ambient occlusion in the render properties panel.


How do I export objects from Blender separately? I have a few objects in Blender (cube1, cube2, cube3, ....). The problem is that when I export them in .fbx format, Blender exports them as one object (so it is now  cube1, and there is no cube2, cube3 anymore). How do I export them separately, so I can later edit each of them ?

Yes in when you have clicked what type it will export as (FBX etc.) in the bottom left of the screen tick "selection only".


Is there a way to have my second action animation start at the last location of my first action animation? I have a scene with a character that will complete multiple action animations. The problem I keep running into is that when the character transitions from action 1(walk) to action 2(looking behind) the character slides backward to action 1's start origin. Is there a way for me to have action 2 start at the end of action 1's animation. I've tried moving the character while in object mode and recording in the timeline but it changes the origin location of action 1 animation.

For anyone with a similar problem to mine, I found the best way to resolve this issue is by adding a path for my character to follow. Using the shortcut Shift A, and selecting the Path option under Curve. I completed these steps in Object mode. I suggest searching for videos on how to create a path for walk cycles if you need further help with that step, I found many great resources on youtube.


How to downscale from 4k to 1080P I have a video in 4k that i would like to downscale to 1080p. What i want to do is having the video with the same quality and carachteristics as the original but at 1080p.

I have tried the following:

1.- changing the output resolution to 1080p.
2.- stablished the "Percentage scale for render resolution" to 100%.
3.- Output: FFmepg
4.- Encoding:
       - output quality: Losless

the problem is that I ended up with a file with a size of 8 GB when the original video file 2GB.

Any help, please?

You have to use a compression like H264. Your 4k Video has also a compression on it and that the reason why it is smaller than your 1080 video.


Pinning multiple vertex groups in cloth physics I am making a cloak for a character, and I want the cloth physics to become stronger for each loop starting from the bottom as they reach the top. So I'm trying to make the bottom loop of the cloak pinned at .9, the loop above that at .8, the loop above that at .7 and so on until the top part moves freely.
Issue is, the cloth physics only allow you to pin one vertex group.

Anyone know of a fix around this?

There are 2 ways, while both do the same for your situation i believe the direct setting of values may be faster, but painting weights can be more intuitive and should be better for detailed weighting in special situations.

Go in "Weight Paint" mode (for visual feedback, as it allows to see what happens by displaying the colors as you set the values)
Select all the vertices that you want to use in the pin-group
Create a Vertex Group and assign all the vertices to it by pressing the assign button.
Now select each line and set the value that line of vertices should have in the "Weight" Field under the "Assign" button.
In the documentation it says that "Assign" is additive, but that does not mean the weight value will be added, it just means the vertices will be added to the group if they are not already in it.
After all lines of vertices are set, you should have a gradient showing the weights going from top to bottom.
In the cloth panel, under shape, you will have to adjust the "Stiffness" to make the weighting show more or less effect (i used 0.01 in the example).

Here a simple visualisation of the steps and a final cloth sim result:

Update (thanks for pointing it out @atomicbezierslinger):

Important to note though is that if you use a tablet, and have MMB emulation on, you won't be able to use the function without either changing the keymap or deactivating the emulation.


Convert files packed in Blend file A model I downloaded has textures packed that are in TGA format. I want to convert the images into PNG format because it takes up less storage space. Is there a way I can easily convert all the files without having to unpack them, and replace the textures one by one?

This is easily done with Python scripting, but I include in that statement a non-blender Python installation on your system. To do what you want from scratch:

Backup the blend file!

Go to python.org and download the latest Python (not the embeddable version).

Install Python on your system, and check the “add Python to PATH” when it comes up.

At the Command Prompt, type: python -m pip install pillow and it will download and install the Python imaging library (an easy way to convert the files).

In blender, unpack all images to one folder using the File menu (“use local directory” probably will work, but make sure nothing else is in there except the blend file).

Open IDLE (the Python IDE you just installed. You will see a Python shell.

Run the following code in that shell:
from PIL import Image NEWLINE
import glob NEWLINE
files=glob.glob(“C:\Users\Anthony\the_blend_directory_here\*”) NEWLINE
for f in files: NEWLINE
Image.open(f).save(f.replace(“.tga”, “.png”)) ENDOFLINE

The script should convert all unpacked images to png, one at a time. Close the Python shell upon verifying success.

In blender, go to the Scripting screen, and run the following code:
for img in bpy.data.images:
img.filepath=img.filepath.replace(“.tga”, “.png”)
img.reload()

Re-pack all files.

Delete the external images.


My object looks black rather than transparent How to obtain a perfectly transparent rendering? My object is composed of black material on the rendering that I would not like. Can I work on the light path in order to get a more transparent rendering ? Thanks

EDIT 1
@susu , thank you for your respond, yes sure here it is :

EDIT 2
Thank you, I have tried and do not quite get the desired result, there is black in my material again

I would like the result to be close to that:

Thank you :)
EDIT 3
@lookin thank you :) i have done it but the result isn't quite what i wanted (the object on top is the one with your node tree)

In order to have a more transparent material, use a Transparent BSDF shader instead of a Glass BSDF.
I mean this kind of node tree:


How to have a force field affecting only one particle system hair how can i set a force field to affect the particle system named "alpha" and have no  effect to the one named "beta" ?

I tried to bake using separated levels and i tried also using the field weights > effector group setting into the particle system settings pannel

Fields only have an effect on objects and particles that reside on the same layer. Therefore, one solution is to have particle system 'alpha' on one layer, 'beta' on a second layer, and the force on the same layer as 'alpha'.

To achieve this you can use M to move objects to different layers - simply press M while an object is selected and the 'Move to Layer' popup should appear. Just select the layer(s) that the object should reside on (an object can be on more than one layer - hold Shift to allow you to select multiple). To 'View' multiple layers, simply hold Shift and click the layers in the button bar at the bottom of the 3d Editor window.

With one of the objects (Beta) on a different layer and both layers selected for view, you should see no difference in the scene. However, the moved object's particles will no longer be affected by the force.


Objects with transparent texture not always show transparency in 3dview For some reason objects don't show their transparency all the time.

In this image the circles in red are suposed to be transparent like the ones in green.

When I select the object in the back, all objects in front of it become opaque.

When I select the two objects that are opaque, then they become transparent as they sould be.

The display is in GLSL mode

These are the material and texture properties

I'm not worried about the final render, just the editing view. I would like to see the actual transparency at editing time only, because the scene is to be imported in a third party game engine.

Blender is v2.68

This is the blend file

Go to the object panel in the properties and check Transparency in Display tab for all object you want to see transparent. make sure that you have the correct object selected.


Where is the Node Editor in Blender 2.8? I can't seem to find the place, in Blender 2.8, where node-based addons lived in previous versions of Blender, such as Animation Nodes and Sverchok. Does anyone one know where that editor went, if it's being taken out for good or if something else is being developed?

That small drop down option next to object and choose the node editor you need such as Shader Editor.

Or by hitting Shift + F3

As @prubini87 mentioned, if there are no nodes created the area will be empty.


How do I show the video preview? I was assembling a bunch of screen recordings into a single video using Blender's "Video Editing" mode (which I've done several times before) when I accidentally clicked something and made the video preview disappear:

How do I get it back?

I figured it out thanks to this question:

First, you want to look for the 'window selector' icon, and click it, and choose the 'Video Sequence Editor' option:

Next, if you don't immediately see the video preview, you want to click a button on the bottom of that window that has a red-and-white checkerboard pattern, that will switch the window to be a video preview:

Finally, if the zoom is somehow messed up so that you don't see the entire image in the window, click the 'View' dropdown and choose the 'Fit preview in window' option:

And when all that's done, this is what the window should look like:


Is it possible to assign a keyboard shortcut for toggling a preference? I would like to be able to toggle ToolTips on and off, however being that it's a value in Blender's Preferences I don't see anything register in the Console when I enable or disable it. This makes me think it may not be possible to assign a keyboard shortcut to it. Does anyone know if there's a way? Thanks.

As sambler points out, my answer is overkill for your purposes. However the general question deserves an answer too: How to assign a toggle shortcut to a preference.

Make a new keyboard shortcut or re-appropriate a shortcut you don't use.

UserPreferences -> Input -> Window

If you add a wm.context_toggle and hit enter you'll get another field called "Context Attributes". It might appear that you can't type into that field but you can. Paste into it:

user_preferences.view.show_tooltips
# or
user_preferences.view.show_tooltips_python

depending on what you need.


Why is a text not rendering with glow effect but other objects are? I have a project I'm stuck on, it has text and a grid effect (made from a plane) for the floor. I need all objects to have a glare effect emitting light, everything is glowing correctly except one text item, the blue "Media" text. I have added emission the same as the other items and i think done everything correctly in "compositing nodes"

As you can see the pink grid is rendering a glare as is the other texts not shown but the blue "Media" text will not render any glare/emission.

I've noticed that the other texts and the grid are all showing a "Particles" tab so I've missed something somewhere. That's the only difference i can find between the ones that glare and the Media text. Still really new at this. Spent hours trying to work it out. "Media" text is supposed to be glowing like everything else.Thanks!

Update: I think i have narrowed down the problem but have no idea how to fix.
I have a long list of different materials as pictured,the material i;m trying to add to the "MEDIA" text is not giving emission, I've noticed it has a 0 in front of it. So i tried using the other materials and some seemed to work and emit light so i thought great i'll just change to the color i want. However, that doesn't work, when i change the material color at all it stops emitting on rendering.Or if i make a new material for the "MEDIA" text it wont emit i can only add an existing material but not change its color.Would like to use a color i choose, any ideas?

Update:
Blue on text will not emit light in rendering

All i did here was change color from blue to a different shade or completly different color, kept everything else the same and it would render emission.

I've solved this. Glow/glare is determined by a background (it bleeds out past the object). Text and shapes have no background like a transparent image plane would.

Solution: Add a plane behind your thing that won't glow, and make sure to add it to the object/mesh. Make this plan transparent, and it won't render but it WILL provide the background needed to show the glow. It's a coding thing that shouldn't exists.


Boolean and combining objects for 3D printing I'm testing some tolerances between Blender 2.83 and a 3D printer I'm trying to combine a nut created with the bolt factory add-on with a cube and have the center be hollow.  How can I do this see image of problem of the center of nut not being hollowed out.  (I tried using the Boolean modifier)
Bolt and cube

After the Boolean operator I can't delete the face in the center of the nut see red arrow (I'm trying to hollow the nut out to test the 3D printed nut threads with a 3D printed screw)

I used the Bolt Factory tutorial and the Bool tool tutorial ad-dons

Pick the object you want to use as a "drill bit" (bolt with threads)
Pick the item you want to drill/place the hole in (box or object) and choose Difference
Note: You could also use Ctrl+Shift+-
(this keyboard combination does bool difference)

Make tolerances for bolt to screw into object

Note: you may want to 3D print the bolt horizontal for strength
3D print the bolt horizontal for strength


Where to download older Blender versions? Namely Blender 2.80 Where to download Blender 2.80?

I downloaded Blender 2.82a but it always crashes.
So I'd like to try 2.80 but I can't find it on the official Blender site.

Here you have all Blender versions
https://download.blender.org/release/


Python API: Changing the order of shapekeys quickly Using the Python API, is there a way to change order of shapekeys quicker than using the operator bpy.ops.object.shape_key_move(type='UP')?

This operator takes a long time to execute (if you want to move a shape key up 20 times, for example).

Is there a way to perform this quicker?

Campbell said me on IRC that there is currently no other solution :

  this needs to be done at a C/RNA level AFAICS.

  RNA collections need to have a sort callback which Python can use


Problem with Intersect (knife) - making extra cuts in mesh I am trying to make a thread around a cylinder by cutting faces at the intersection. The cut tool makes extra vertices and connects vertices in random places.

I also tried using the boolean intersect and I get the same result. The tools are not creating a clean cut into the mesh.

Here the link to what I am trying to do.. Making thread

This video is what I recorded and the problem I am having. Intersect (knife) problem

This is the result that I am trying to get.

Looks like you forgot to move in the face that is used for creating the screw object; you can see that it is moved in slightly in the first GIF of your link, intersecting with the cylinder. If you don't do so, the screw object is on the same face level as the cylinder, which will cause the problem you encountered.


Rigging questions - How do I make the drum of this revolver rotate only from the center of a barrel/barrel to frame question I was wondering how I would make the drum of a revolver barrel rotate in a centered position so it can only spin and not actually change position if that makes sense.

My second question would be, as of right now if you rotate the barrel of the revolver -- it would fold into itself like so.Essentially, if you try to rotate the barrel it won't move on the right point, ie the little circular shape and fold into itself.

How could I make it so the revolver barrel rotates along the proper point in regards to the frame? ie that little circular point where the weapon root bone is.

Thank you so much for reading, and here is the blend file. https://a.pomf.cat/wkyqgw.blend

I would provide the pics but I don't have the rep.

edit: First issue resolved by lemon, still need help on the second!

As the barrel is symetric, you can find its center in edit mode by selecting all the vertices and use ShiftS (snap), then choose "Cursor to selected".

Now back to object mode. You can add a single bone armature and it will be created at the 3D cursor position (so it is centered to the barrel). Simply edit it (if you want as it is not mandatory here) in order to align the bone tail along the barrel (but keep the bone head in place along the same Y axis).

The barrel will rotate around the bone.

Edit (considering the comments) :

You can parent the bone placed above with the "barrel" (?) bone in blue below.
Go to pose mode for the "barrel" bone. Select the previous bone then select the "barrel" bone and CtrlP then choose "bone".

But as you can see, you may adjust the "barrel_joint" bone before doing all that :


How to create a circular armature? let's say I wanted to rig and animate a torus. — is it possible to have a circular armature?

from what I can tell, this is not possible. so I thought maybe it's an idea to add a driver to the tail position of the last bone, that gets the head position of the first bone. however, this also doesn't seem to be an option.

The thing, what you want to build will cast loop in parents (circular dependency), it doesn't allow. When Blender calculates bones coordinates, it moves from child through parents to root bone. And if you have loop in parents, blender can't find root bone

To avoid circular dependency you can bild rig like this:

This type of rig you can find in BlenRig, in lips rigging


How to mask animated objects so they aren't visible past a certain area? I am animating objects that will be rendered with video footage in the compositor. My difficulty is how to apply a mask so that the objects disappear when they expand past a certain point.

Objects within circle mesh should be visible

Objects outside of circle mesh should be invisible

Current nodes set-up for object materials:

What masking options are at my disposal to achieve this effect, and how can I apply them?

Thanks for any insights.

There are a good many ways of doing this, but here are a few:

Mask editor

In the UV image editor, set the mode to Mask and press New:

Press ⇧ ShiftA>Circle to add a circle mask, the position it with G:

Use the mask to control the alpha over factor in the compositor:

You could even feather or blur the mask to make the objects fade out instead of disappearing abruptly.

Object/material id mask

You could also use the circle object in the 3D view to do this, using ID masks (see my answer here).

Note that this will only work if you have the circle object visible in the render and filled with a face, or use multiple renderlayers.

Holdout material:

If you want to replace part of a scene with transparency, you can use an object with a holdout shader to make that object render as alpha transparency:

Boolean modifier

This is probably not a good option in this case, but this can be useful when you need to "mask" whole objects:

Collision object

If the object is in a particle system, you can use a sphere with collision physics, set to kill particles:

No particles will be able to escape the sphere.


On laptop when I press F3, no search bar shows up, just the brightness goes up? On my laptop I can't open any search bar because whenever I press F3 the brightness just goes up.

While i can't be sure, i would think, that the problem may be related to the  function key (Fn) for your laptop. Many keyboards come with multimedia keys that allow such functions, so i would not be to surprised if your laptop had an extra symbol on the F3 key that was triggered instead.

Since i do not own such laptop, i show a part of an article i link below:

Review Toshiba Satellite C855-2J4 Notebook
Jonas Adams, ✓ Stefanie Voigt (translated by Bernie Pechlaner)

As it shows, there are laptops that require you to press the function key (Fn) to access the F1-F12 keys. While without you always press the multimedia/functional keys, to control brightness and volume and so on.

Not exactly Blender related, but i hope you can continue with your Blending.


How to select last imported object with console? I'm writing a script for fast importing with CSV file. There's a lot of things, like location, scale and quaternion rotation. Problem with the location I've already solved, but scale and rotation are still. I'm importing FBX files. I can set rotation in while importing but there's XYZ rotation and scale is proportional.

UPD: Successfully solved scale problem by bpy.ops.transform.resize. Now I need to change rotation mode there.

You can edit the location, rotation and scale of objects without operators:

bpy.data.objects['SomeObject'].rotation_euler = (0.1, 0.5, 3.141592/180*50)
bpy.data.objects['SomeObject'].location=(0,0, 0.5)
bpy.data.objects['SomeObject'].scale=(2,2,2)

When you import objects from .FBX file the imported objects are usually selected by the importer so you can get the objects by looping through selection:

import bpy

sel = bpy.context.selected_objects

for obj in sel:
    print(obj.name)

What you mean by last imported object is up to you. I suppose you could sort the selection somehow. This might not be the most elegant way, so someone please correct me, but it could go something like this if you wanted to sort them alphabetically by name:

import bpy

sel = bpy.context.selected_objects

sortedObj = [ [obj.name, obj] for obj in sel]
sortedObj = [obj for name, obj in sorted(sortedObj)]

for obj in sortedObj:
    print(obj.name)


Wave Modifier Question I'm using a wave modifier on a cylinder, but I notice the ends of the cylinder are moving up and down. I'm wanting the ends of the cylinder to be angled as they move instead of just just translating vertically. A demonstration is linked below. Any ideas on how to do that?

As far as I'm concerned, the Wave modifier just moves vertices up and down but doesn't rotate anything because it just works on the single vertices translating them on the z axis depending on their X and Y position.

If you want to make a curved pipe in which the section rotates and not translates, I recommend you to use a curve modifier. You'll need a sinusoidal curve (look here for that) and a curve modifier to apply on the cylinder.


How to change a *VectorProperty size? Let's say I've created a scene property named a:

bpy.types.Scene.a = bpy.props.IntVectorProperty(
    name='a',
    description="Frequencies",
    size=2,
    default=[1, 2]
)

And now I would like to update it's size to something else.

How can I do that?
Do I have to override the property? What if instead of a single property I have a PropertyGroup and I want to update an IntVectorProperty that belongs to the group?

Have you seen Property Definitions? IntVectorProperty have other parameters to define, among which no "size"!

You can create a Custom property from PropertyGroup:

class CustomProperty(bpy.types.PropertyGroup):
    name: bpy.props.StringProperty(name="Name", default="Some name")
    description: bpy.props.StringProperty(name="Description", default="Frequencies")
    size: bpy.props.IntProperty(name="Size", default=2)

To update any property just assign some value:

bpy.types.Scene.a = 3


Using Character Controls For BGE I'm relatively new to blender but I am wondering if there is a way to press a button to set a rotation for an object in game logic. For example, press up to look forward, left to look left, right to look right, etc. I'm trying to achieve movement like in the Super Mario 3D games as opposed to steering the character to look in a certain direction

A simple solution with action:

You create an action with 4 rotation poses e.g. at frame 1 (North), 2 (West), 3 (South), 4 (East).

Then play the according pose dependent on the key:

Be aware:
This does align to the scene. It does not align to the camera!


How to go back to previous state from amimation player? I m new to blender. We play animation by pressing Alt+A. Now how to go back to previous state. Stopping anim player just pauses the animation.

After pressing Alt+A the animation is played back.

During the playback:

Press Escape to stop the playback and return to the original frame before playback.
Press ⎇ AltA to stop playback resting on the current frame.

If you haven't changed the user preferences, this is the shortcut setting (note the checked property Restore Frame).


How to animate only the camera? So  i have a scene with a few objects, and a water simulation in the scene. However I want to animate the camera turning around in the scene, while the water simulation is frozen in time. So something like a time freeze effect. But when ever I try to render an animation it renders the water simulation too. I just need one frame of the water simulation. Is there a way to do this?

Copy the scene to a new one (you can call it "freezed"), then choose the frame you want to freeze, select the fluid object and apply the simulator modifier.
At this point you can do every animation you need without affecting the shape of the fluid.


Change start time for each camera I struggle with this problem - I want to get one animation from two or more points of view - to render this in one cycle I want to get 100 frames from one camera, switch to another one, get time to begining, get another 100 frames... is it possible to do? With GUI or from python script?

Use Multicam Selector Effect in VSE

Add Scene strip
Make as many copies as your cameras (Shift + D + Y + move the strip to a different channel)
Assign a different camera to every Scene strip in the Properties Panel (N)

Add a Multicam Selector Effect and assign the channel of the desired strip

You can either add multiple Multicam Selector Effects, or cut one Strip by placing the cursor at the right frame and pressing a "Cut to" button (1, 2...)

Check Sequencer in the render Panel


Applied armature doesn't "stick" to mesh while not applied does and I think I need to apply According to a tutorial that shows how to export my NLA to Unity I need to apply all modifiers first. Though, I noticed that if I apply my armature to the mesh then the mesh stops following the armature. I also have a mask modifier on the mesh that maybe makes some fuss. But it doesn't seem to matter if I apply both modifiers in any other order. The mesh still does not follow the armature. I've appended the blend file in comments if someone could take a look.


How to make multiple pivot points on one object (BGE) This is a Tee shaped object to extend the pivot range of the arm on the left of the .png.

At the bottom link, where the 3D cursor is right now is the object origin and pivot point. How do the other two pivot points get...appointed?...to make the linkage work.
I've looked in the Blender manual, multiple videos on pivot points, vector groups, linkages, and more. I've considered adding separate objects and parenting them to the Tee object, but I'm sure there must be something better than that. Your help is appreciated, thanks!

For physics simulation I suggest to use rigid body joints.

You can have multiple of them at a single object.

Be aware

at least one of the objects should be a physics object (rigid body, dynamic, soft body).
the motions can exceed the joint limits (stretched chain).


Why is the Cycles render of my worn-edge material different from the viewport? I'm trying to figure out edge wear with nodes and in the viewport I think it looks good.

Once it renders it's completely different for whatever reason: the worn area appears to be wider.

I'm rendering with good quality settings so I can't chalk it up to noise or low resolution.

You probably have a Subdivision Surface modifier with the Render subdivisions settings being higher than the Viewport subdivision: the edges are rounded more deeply in render, which affects your shading.

Example: the difference a level of subdivision can make, especially when using Pointiness as a texture source

When tweaking your shader, especially if the shader is geometry-dependent, make sure to match Render and Viewport subdivisions in your modifiers to preview your rendered results more accurately.


Is it possible to achieve Buffalo Plaid Texture with Checker Node? Is it possible to achieve something like this with procedural texture nodes like Checker and/or Brick?

Regards,
Anusha

This one will allow you to change size and any of the three colors with only one node.

EDIT:

I've improved this method so it's now possible to group it and use it as just one node with all the controls:

And this is what is grouped:

What is basically doing is generating black-gray-white pattern, assign RGB values to these colors by Color Ramp than separating them and allow to change them.

Blend file:

First Answer:

I don't know if this is the simplest way, but you can make something like this using two Wave Textures.

Value node controls checker size and Color Ramp is used to change colors.


How to get a repeating, progressing forward backward sequence of a video file? My goal is to edit a video automatically, so that there are small parts reapeating in forward and backward motion with variable part lengths.
The sequence of frames for part length 1 would be: 1 2 3 2 3 4 3 4 5
Part length 2: 1 2 3 2 1 2 3 4 3 2 3 4 5
A friend provided me with an array, which can generate this and other sequences.

#!/usr/bin/python
# coding: utf8
amplitude = 5 #Min 1
end = 30
drunkenArr = []
i = 0
while i <= end - amplitude + 1:
    for j in range(amplitude):
        drunkenArr.append(i + j)
    for j in range(amplitude)[::-1][1:-2]:
        drunkenArr.append(i + j)
    i = i + 1
print drunkenArr

There could be multiple ways:
- Opening a video file on consecutive frames and setting frame start to this sequence. This one will be very slow I think.
- Opening one video file and cut and copy the frames after a pattern
- converting the video file to single images and putting them into a folder ( could be done by hand, but with a script it would be much more convenient) and importing them in the sequence of an array.

Perhaps try this:

import os

from bpy import context
scene = context.scene

path = "C:/Users/Admin/Documents/Projects/VIDEO/atabilized/timelapse"
files = os.listdir(path)
files.sort()

# create the sequencer data
scene.sequence_editor_create()

seq = scene.sequence_editor.sequences.new_image(
    name="MyStrip",
    filepath=os.path.join(path, files[0]),
    channel=1, frame_start=1)

# add the images. forward and backwards
amplitude = 25
i=0
while i <= files.len() - amplitude:
    for f in files[i : i + amplitude]: #forward
        seq.elements.append(f)
    for f in files[i + 2 : i + amplitude - 1 ][::-1] #backwards
        seq.elements.append(f)
    i += 1


Is there a simpler way to get the Vectors of a local axis? One of things I need quite a bit is the vector of a local axis in the Y direction. Currently I'm doing this by calculating the vector using two known points along that axis:

    # Vector1 is along the wall edge from origin to vertex 3
    loc1 = wall.matrix_world @ wall.data.vertices[3].co
    loc2 = wall.location
    v1 = Vector((loc1.x - loc2.x, loc1.y - loc2.y, 0))
    v1.normalize()

This works as long as I know which vertex to use since I created those as a mesh. With that vector I can move anything up and down that axis in the desired direction (in this example a wall), which of course is super handy. All of the walls are aligned this way so that I will always know the relative direction they are pointing.

However later I will be using objects without known vertices. Everything I've seen on how to calculate in those situations are by calculating angle differences from a known direction (such as up or forward, etc). This adds some unknowns and a bit of complexity.

The vectors along a local axis seems like something Blender would already know. Does such a thing exist so that it can be retrieved without calculating?

The two essential information that you need are the world matrix and the axis / vector in local space that you're interested in. In your case the latter is pointing in the direction of the local y-axis which is equivalent to the vector:

$$axis_{local\ y} = \begin{pmatrix}0.0 \\ 1.0 \\ 0.0 \end{pmatrix}$$

The world matrix contains the information how the object is rotated in the global coordinate system. Therefore we need to decompose the world matrix to get the rotation matrix*, which can then be multiplied with the vector to get the direction of the local y-axis in the global coordinate system.

(*) Internally this is a quaternion

For example, if the object isn't rotated at all, the rotation matrix is:

$$rot = \begin{pmatrix}1.0 & 0.0 & 0.0 \\ 0.0 & 1.0 & 0.0 \\ 0.0 & 0.0 & 1.0 \end{pmatrix}$$

$$\begin{split}axis_{global\ y} &= rot \cdot axis_{local\ y}\\ &= \begin{pmatrix}1.0 \times 0.0 + 0.0 \times 1.0 + 0.0 \times 0.0 \\ 0.0 \times 0.0 + 1.0 \times 1.0 + 0.0 \times 0.0 \\ 0.0 \times 0.0 + 0.0 \times 1.0 + 0.0 \times 0.0 \end{pmatrix}\\ &= \begin{pmatrix}0.0 \\ 1.0 \\ 0.0 \end{pmatrix}\end{split}$$

The axis doesn't change, which is what we would expect since the local coordinate system is aligned with the global coordinate system. When the object is rotated by 90° around the global x-axis, the local y-axis now points upwards in the global coordinate system:

$$rot = \begin{pmatrix}1.0 & 0.0 & 0.0 \\ 0.0 & 0.0 & -1.0 \\ 0.0 & 1.0 & 0.0 \end{pmatrix}$$

$$\begin{split}axis_{global\ y} &= rot \cdot axis_{local\ y}\\ &= \begin{pmatrix}1.0 \times 0.0 + 0.0 \times 1.0 + 0.0 \times 0.0 \\ 0.0 \times 0.0 + 0.0 \times 1.0 - 1.0 \times 0.0 \\ 0.0 \times 0.0 + 1.0 \times 1.0 + 0.0 \times 0.0 \end{pmatrix}\\ &= \begin{pmatrix}0.0 \\ 0.0 \\ 1.0 \end{pmatrix}\end{split}$$

import bpy
import mathutils

obj = bpy.data.objects["Cube"] # Replace with your own object selection

(translation, rotation, scale) = obj.matrix_world.decompose()
local_y_axis = mathutils.Vector((0.0, 1.0, 0.0))
local_y_axis_global_coords = rotation @ local_y_axis
print(local_y_axis_global_coords)

The approach works with any vector in local space, not just the axis.

If you're only interested in the $x$-, $y$- or $z$-axis, then you don't need to multiply with the rotation matrix as Robin Betts correctly noted. When the world matrix is normalized or the object scale is 1.0, then the local $x$-, $y$- and $z$-axis in global coordinates are equivalent to the first three column vectors.

import bpy
import mathutils

obj = bpy.data.objects["Cube"] # Replace with your own object selection

normalize_matrix_world = obj.matrix_world.normalized()

local_x_axis_global_coords = [row[0] for row in normalize_matrix_world[:3]]
local_y_axis_global_coords = [row[1] for row in normalize_matrix_world[:3]]
local_z_axis_global_coords = [row[2] for row in normalize_matrix_world[:3]]
print(local_x_axis_global_coords)
print(local_y_axis_global_coords)
print(local_z_axis_global_coords)

The world matrix is the result of multiplication of the scaling, rotation and translation matrices.

Scaling with matrix $S$
$$\begin{pmatrix}x'\\y'\\z'\\w'\end{pmatrix} = \begin{pmatrix}\alpha & 0 & 0 & 0 \\ 0 & \beta & 0 & 0 \\ 0 & 0 & \gamma & 0 \\ 0 & 0 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix}x\\y\\z\\w\end{pmatrix}$$

Translation with matrix $T$
$$\begin{pmatrix}x'\\y'\\z'\\w'\end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & t_x \\ 0 & 1 & 0 & t_y \\ 0 & 0 & 1 & t_z \\ 0 & 0 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix}x\\y\\z\\w\end{pmatrix}$$

Rotation around x-axis with $R_x$:
$$\begin{pmatrix}x'\\y'\\z'\\w'\end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(\theta) & -sin(\theta) & 0 \\ 0 & sin(\theta) & cos(\theta) & 0 \\ 0 & 0 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix}x\\y\\z\\w\end{pmatrix}$$

Rotation around y-axis with $R_y$:
$$\begin{pmatrix}x'\\y'\\z'\\w'\end{pmatrix} = \begin{pmatrix} cos(\theta) & 0 & sin(\theta) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(\theta) & 0 & cos(\theta) & 0 \\ 0 & 0 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix}x\\y\\z\\w\end{pmatrix}$$

Rotation around z-axis with $R_z$:
$$\begin{pmatrix}x'\\y'\\z'\\w'\end{pmatrix} = \begin{pmatrix} cos(\theta) & -sin(\theta) & 0 & 0 \\ sin(\theta) & cos(\theta) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1\end{pmatrix} \cdot \begin{pmatrix}x\\y\\z\\w\end{pmatrix}$$

The rotation matrix is:
$$\begin{split}R &= R_x \cdot R_y \cdot R_z \\ &= \begin{pmatrix}cos(\theta_y) \cdot cos(\theta_z) & -cos(\theta_y) \cdot sin(\theta_z) & sin(\theta_y) & 0 \\ sin(\theta_x) \cdot \sin(\theta_y) \cdot cos(\theta_z) + cos(\theta_x) \cdot sin(\theta_z) & -sin(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + cos(\theta_x) \cdot cos (\theta_z) & -sin(\theta_x) \cdot cos(\theta_y) & 0\\ -cos(\theta_x) \cdot sin(\theta_y) \cdot cos(\theta_z) + sin(\theta_x) \cdot sin(\theta_z) & cos(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + sin(\theta_x) + cos(\theta_z) & cos(\theta_x) \cdot cos(\theta_y) & 0 \\ 0 & 0 & 0 & 1\end{pmatrix}\end{split}$$

The world matrix is:

$$ world = T \cdot R \cdot S  $$

If the scale factors $\alpha$, $\beta$ and $\gamma$ are $1$ or we normalize first, then $T \cdot R = T \cdot R \cdot S$ because the $S$ is the identity matrix:

$$ T \cdot R = \begin{pmatrix}cos(\theta_y) \cdot cos(\theta_z) & -cos(\theta_y) \cdot sin(\theta_z) & sin(\theta_y) & t_x \\ sin(\theta_x) \cdot \sin(\theta_y) \cdot cos(\theta_z) + cos(\theta_x) \cdot sin(\theta_z) & -sin(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + cos(\theta_x) \cdot cos (\theta_z) & -sin(\theta_x) \cdot cos(\theta_y) & t_y\\ -cos(\theta_x) \cdot sin(\theta_y) \cdot cos(\theta_z) + sin(\theta_x) \cdot sin(\theta_z) & cos(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + sin(\theta_x) + cos(\theta_z) & cos(\theta_x) \cdot cos(\theta_y) & t_z \\ 0 & 0 & 0 & 1\end{pmatrix}$$

The first three entries in the first three columns give us the local axis in global coordinates for the $x$-, $y$- and $z$- axis respectively. This is because if we multiply the local axis vector with the matrix, the result is the same as the column in the world matrix:

$$ axis_{local x} = \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0\end{pmatrix}$$

$$ axis_{local y} = \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0\end{pmatrix}$$

$$ axis_{local z} = \begin{pmatrix} 0 \\ 0 \\ 1 \\ 0\end{pmatrix}$$

$$ world \cdot axis_{local\ x} = \begin{pmatrix}cos(\theta_y) \cdot cos(\theta_z) \\ sin(\theta_x) \cdot \sin(\theta_y) \cdot cos(\theta_z) + cos(\theta_x) \cdot sin(\theta_z) \\ -cos(\theta_x) \cdot sin(\theta_y) \cdot cos(\theta_z) + sin(\theta_x) \cdot sin(\theta_z)\\ 0\end{pmatrix}$$

$$ world \cdot axis_{local\ y} = \begin{pmatrix} -cos(\theta_y) \cdot sin(\theta_z) \\ -sin(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + cos(\theta_x) \cdot cos (\theta_z) \\ cos(\theta_x) \cdot sin(\theta_y) \cdot sin(\theta_z) + sin(\theta_x) + cos(\theta_z) \\ 0 \end{pmatrix}$$

$$ world \cdot axis_{local\ z} = \begin{pmatrix} sin(\theta_y) \\ -sin(\theta_x) \cdot cos(\theta_y) \\ cos(\theta_x) \cdot cos(\theta_y) \\ 0 \end{pmatrix}$$


Does Blender have a Wayland backend? I'm working on trying to submit a bug for an issue while running Blender 2.78c under Wayland, and need to know if Blender has a Wayland backend, or if it is still using X11 via Xwayland when running under a Wayland session?

Blender 2.90 includes an experimental Wayland backend when compiled with the corresponding flag. You can view which flags blender was compiled with when executing blender --version and you should be looking for WITH_GHOST_WAYLAND.
BTW you can easily test if an application is running under XWayland by starting xeyes and moving you mouse cursor above the window. If the eyes are still following the cursor the application uses XWayland


Keyframed camera animation I am trying to write an import/export script for a format that uses cameras animated through bezier curves. Each point on bezier curve in this file format has a timestamp (frame number) attributed to it. So, the speed of the camera when following the path is evaluated based on the timestamps attributed to bezier points.

In Blender, however, Follow Path constraint only gives me an option to offset camera on the curve using some sort of "Offset". How is that value calculated? I am wondering if there is any way to get the exact offset value for the case when the camera is located exactly at each bezier point.

Use a curve for each segment between timestamped camera points

For the follow path constraint, with fixed position, offset, 0 is start point and offset 1 is the other end point of curve.  If instead of using an n point bezier curve,  we use n - 1  "segment"  beziers, we can use this feature simply.

The curve of points [p0, p1, p2] becomes two curves [p0, p1] and [p1, p2].  At the frame specified for camera to be at p1 can either be offset 1 of first segment, 0 of next  Note segments don't have to be 2 point beziers, just require last point to match first point of next.

A follow path constraint is added for each segment.
To make the object use the particular segment we set the influence  to 1 to use this constraint 0 otherwise. (or set hide inversely). We want the influence of the constraint to be 1 when the current frame is between the end point frames (from your data), Otherwise it is set to 0 and has no effect.

The offset can be calculated using (current_frame - p0.frame) / (p1.frame - p0.frame)

A test case setup using drivers

To each bezier curve segment we add two  custom propeties, "frame_start" and "frame_end" ( curve_object["frame_start"] = 44 ) indicating the frames at which to be at end points. (I've used integers here, floats would be much better in hindsight)

via UI, adjust the min / max to suit

Now we set up a couple of drivers.  The use_self option of the driver is handy here. The constraint itself is self, the path is self.target, from which we can get the frame range for this curve.

setup in UI, make sure use_self is checked. Might have to click "Update Dependencies".

The driver expressions used are in_segment(self, frame) for influence, (could also drive is_expanded and hide)  and segment_offset(self, frame) for offset. The argument frame is known to the driver name space and is context.scene.frame_current.  Run script below to define methods and register to the driver namespace

import bpy

def in_segment(self, frame):
    segment = self.target
    if not segment:
        print("No target")
        return False
    frame_start = segment.get("frame_start", 0)
    frame_end = segment.get("frame_end", 0)
    return frame_start <= frame < frame_end

def segment_offset(self, frame):
    segment = self.target
    if not segment:
        print("No target")
        return 0
    frame_start = segment.get("frame_start", 0)
    frame_end = segment.get("frame_end", 0)
    duration = frame_end - frame_start
    if not duration:
        return 0
    return (frame - frame_start) / duration

bpy.app.driver_namespace["in_segment"] = in_segment
bpy.app.driver_namespace["segment_offset"] = segment_offset

Now with this setup can add a bezier curve, set the custom properties, then add a follow path constraint, set as curve target,  and the constrained object will follow that curve for the defined frame duration.

_Cube switching between four bezier circles. The constraints expand is also driven by the influence. Each circle has a 10 frame duration, hence on the smaller circle cube apppears slower. _


Texture space vs. poly count: Which is optimal / best practice in a game engine? The model I'm building here is for a game engine.

Is it a better practice to 'glue' mesh parts together to save UV space? Or would it be better to conserve poly count? What is best practice from a professional perspective?

I have here a model that is very large. After trying to split the materials up (accounting for 512 pixels per meter) I ended up with more materials than I wanted. I thought that I might be using up too much texture space.

Technical Investigation

Most modern 3D game engines and GPUs can technically deal with a very high polycount. The main reason why game companies cut them down is to make games playable on lower-end systems and also consoles (once they are 3 to 4 years old, they can't keep up with a modern high-end PC) and mobile platforms. Therefore it's important to plan for the game engine and also the hardware platform you are aiming for.

One problem that remains across all platforms and all 3D game engines is that too many materials put a high load on the system. Loading and processing materials produce draw calls, therefore you want to keep them as low as possible by reducing the materials to the bare minimum for each model.

If you want to go deeper into the topic, I highly recommend to read Simon Scheibt's "Render Hell".

Modeling 3D Game Assets

If it comes to the question of "good practice" or "best practice", you possibly get more than one answer, depending on who you ask.

Reducing polycount has been the subject of controversial debate for a long time. Some people say that triangles are bad in general (even for assets that aren't animated), others tell you the complete opposite.

Personally I follow the rule "If it doesn't change the visual appearance of a model (geometry and shading), it's not necessary".

My "working model" is composed entirely of quads. Then I create a copy of it and add detail for the high-poly version. A second copy will be the final low-poly version, where I eliminate all unnecessary vertices by sliding them across the edges without changing the geometry.

Another good method to keep the polycount down without loosing too much detail is to compose assets out of several submeshes, when necessary.

While it's always nice to have a "clean topology" there are certain cases where it simply doesn't make sense, for instance if you have to add many additional loopcuts and vertices for the sake of keeping your asset as "one mesh".

One Mesh (including submeshes) and one Material per Asset

Simply put, that's the second rule I try follow, whenever possible. Big models like buildings are problematic when it comes to texture space. In this case I'm a big fan of the modular approach (as known from the Elder Scrolls since Morrowind and Fallout 3, NV and 4).

Another method of adding detail to diffuse maps without creating insanely big textures is using secondary maps or detail textures. Modern 3D game engines like Unity 5 and UE4 are capable of cross-blening a second material onto a model, when the camera comes close to it.


Add scratches to a material in Cycles? Is there a way to add scratches (like on worn metal) to a shader in Cycles?

The simplest way is to use a box-mapped scratch texture to control the roughness of a glossy shader:


Liquid metal node setup I'm trying to create a node setup for a liquid metal like material similar to this, but even after hours of trying, I'm nowhere near. Can anyone give me any advice on how to do this?

This looks like fun.

Plug a Musgrave texture into another Musgrave texture :).
Conect it as a Displacement
Lighting is rather important, I used this free HDRI
(optional)(Add a Dreamstime watermark)


Material appears different after being assigned to the same object I've applied a material to my floor in this room model, but for some reason after being assigned to the object, parts of it appear stretched?
I tried moving around the origin point, but that had no effect.

Try go into Edit Mode when the floor object is selected. Select all the faces by pressing A . Then unwrap it again by selecting Cube Projection from the UV menu.


snap to edge/vertex when scaling? Is it possible to scale an object and have it's scaled self snap to another object's edge or vertex?

Attached is a screenshot of what I'm trying to do: I want to scale the object on the left, and have it grow until it butts exactly against the object on the right. (In the picture, the object has grown too much by the time snap is activated). thanks

What you may do is to enable the Snapping Tool, change the snapping type to Vertex, then scale your object along the X axis (S,X) until it snaps to the other object. Then change the Y and Z  parameters of Scale in Transform panel to the same as X has (hover the cursor over the X value window, hold LMB and drag it down to copy the X value to other windows).

Before scaling an object make sure you snapped your 3D Cursor to its origin point (select an object in Object Mode, then press Shift+S-->Cursor to Selected). Also the pivot center type has to be set to 3D Cursor.


How do i stop the normal map from offsetting light? I'm making a project in a blender and the road has a normals map. However, when I add the normal map the light is offset. This is really annoying and it ruins the scene. I am using blender 2.8, but this also occurs in blender 2.79 for me. I have the image set as no color data, and I have inserted the normal map node. Hopefully, someone can help me. I'm probably missing something obvious but take a look at the pictures.

!Photos!

I'm not sure what the normal map is doing but try turn the roughness down to see if it can combat whatever is happening. Also try applying a different normal map and see if it still offsets the light, and post pictures of the results.


I can't get the hair on my model to render, or even apply color. (Buzzcut) I'm trying to give my model a buzzcut. I went through all the proper steps that I know of. Creating a vertex group, all these things with the particle system and everything, but when I go to change the color of the model's hair (black), it turns the entire model that color and I can't figure out why. Additionally, when I render the model, the hair does not appear. I've been stuck on this for three days now. Thanks :)

Add: This picture is what I am now faced with. Changed the color of the scalp and not the hair.

A few possibilities are (assuming using cycles):

For the mesh, you should make two materials; the first material is for the mesh itself, the second material is used to select it from the 'particle systems' to use for the hair material. To change the hair material, you should only modify the second material, since the first material is used for the mesh (for example face color). In image, the first material, light colored is used for the mesh and second material, dark colored is used for the hair and is also selected in the particle systems.

When you are in particle edit mode, then you don't see the hair when you render it or use rendered shading. You should see the hair, when you are in vertex paint mode, edit mode, object mode, sculpt mode, weight paint mode or texture mode.

But I am not sure if this is what you mean :)


I need help animating multiple rigid body hinge joints I need to animate a hinge mechanism with multiple other dynamic hinge joints following in sequence to the original.

I have no problem animating the first hinge mechanism.

However, when I add more hinge constraints to the original mesh,

the animation breaks apart like so.

Things I have tried:

Altering rigid body collision settings.

Altering the angle of the empty containing the rigid body relationship.

Altering the parent relationships amongst the objects involved.

Files

MULTI_HINGE OBJECT

https://drive.google.com/open?id=10gEugUDgIC-xrCC2Y8tFyysSu2gT5tV2

SINGLE HINGE OBJECT

https://drive.google.com/open?id=12kYQTq2pDsGzSlwUroCrDcyR8KYgqJQS

Any insight would be appreciated. Thank you

You have a cube in the first layer that is bouncing off the physics of the arm. Delete that cube and you'll be fine.


python error in addon "Load Obj Sequence as Shape Keys" error in Python script?
The imports all load bbut no shape keys--on Mac -here is my error message--I really appreciate any help! G.E.

(line 59):

sknames = [sk.name for sk in target.data.shape_keys]
TypeError: 'NoneType' object is not iterable
script link follows:

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0ahUKEwi5qY2yrOTNAhVF2D4KHU86DfAQFggvMAM&url=http%3A%2F%2Fwww.blenderinmotion.com%2Fresources%2Fio_obj_as_shapekey.py&usg=AFQjCNFNzLkGqWM1QGdP3-Qgdv8251JtsA&sig2=X319gVkvLZFd7O283UVzuQ&bvm=bv.126130881,d.dmo&cad=rja

Well, the first thing to notice is that

target.data.shape_keys.key_blocks

is a null or empty object at the point of the error and thus the script cannot execute the for loop to fill the sknames object.

Upon looking into this further it seems the issue is with the file path that references the location of the obj files around line 56 (at least it did for me).

Replacing this:

for f in files:
    fp = spath[0] + "\\" + f

with this:

for f in files:
    fp = os.path.join(spath[0], f)

seemed to solve it for me.


Get current editor toolbar tab via Python? How can I detect and/or change the active tab in the current editor via Python?

Is this doable? I have been digging through bpy.context.region/screen and not yet found a way to list the active tab.

This isn't currently exposed to the API (but we can expose it if it's useful).


How to extrude objects during game play? Can objects be extruded during game play in Blender's game engine? If so, how would I do this?

Depends on what you mean with "extrude".

In terms of mesh-editing the answer is no. This is simply because you can't add faces to meshes from within the BGE.

As this does not help you with what you want, I suggest to get rid of the "extrude face" idea towards an "extrude effect". It does not add faces, but deforms the mesh in a way that it looks as it would do that.

There are several ways to achieve that:

armature deformation -> it can animate scaling too
shape key deformation
scaling animation -> would effect the complete mesh
mesh manipulating via Python (not a simple task)
adding objects
...

Without more information I can't tell what option is sufficient with your situation.


Material which is not rendered but interacts with light It's hard to explain this. The way I'm visualising it is by thinking of an invisible object which reflects light.

Let's say we this cube here with one face of it being lit up with a blue spotlight.

Now, let's treat the patch of blue light on the face of the cube as another discrete object (I understand it's physically impossible but bear with me).

I want to be able to keep that patch of blue light while making the cube disappear.

What I visualize in my head is a patch of blue light hovering.
My ultimate goal is to capture lighting information.

I hope this makes a little more sense.

In the object properties tab of the properties window, there is a section titled "Cycles Settings". If you uncheck the box "camera" under "Ray Visibility", that object will disappear from the render but still reflect light and cast shadows.


Rendered Image not showing up in compositing tab I am new to blender and I am following Blender Guru's donut (beginner) tutorial. I am having problem in compositing tab. When I do render and switch to compositing tab, the rendered image is not shown in Render Layers node. I tried searching online for solution but most of them were for blender 2.7.
Thank you in advance.
UPDATE
here is my .blend file. Hope this helps.
https://drive.google.com/file/d/1xVGiCHVZDOJdPxW_G_znPUeDL5GtpeI2/view?usp=sharing

Add a viewer node or if your Node Wranglar is enable controll + shift left click on the Render layes


Compositor setting in Blender Internal: How to properly make a split RGB effect on further objects using Z? I'm a blender amateur, I've learned it by myself, and I was trying to make a split RGB effect on the objects that are the further away from the camera.
I tested it out with this simple scene:

In the compositor, I tried to shift the R and B layers depending on the Z value. For example, Z=4 on the closest cube and Z=14 on the furthest one. I thought then that I could multiply it by 5 so the R channel could move 20 or 70 pixels to the left. But it didn't give me the result I expected.

Here a screenshot of my node setting:

And this is what I get:

This is what I'm trying to have:

Here, the focus is on the woman face and everything that is before or after is not blurry but splitted. I'd to do this but with the R and B layers.

First of all, is it even possible and if so, how can I ^^?
Thank you in advance for your help! :)

One challenging aspect of this effect is that the strength of the color shift increase with the distance from the object that is in focus. This is solved in the compositor by using the depth and a user supplied distance that is considered in focus, to calculate the intensity of the applied color shift.

Before

After

Unfortunately the color shift produces artifacts at the image border. Cropping by the number of shifted pixels may be necessary for good looking results. The proper solution would be to mirror the image along the borders before performing the shift to avoid artifacts in the border region.

Cropped

The Depth Color Shift node setup uses the normalized depth as input to the Gaussian function. This allows to have a nice spread of the intensity values instead of a sharp peak for the depth that is in focus. The output is normalized and inverted, since the effect is supposed to be the smallest at the given depth.

The Gauss Function implements the Gaussian function.

The Shift Color shifts both the individual color channels and the intensity values. The latter is used as blending factor to ensure that the effect strength is applied correctly  depending on the distance.

The parameters of the Depth Color Shift node are:

Focus Distance: Distance where the effect is the weakest (is used as $μ$ in the Gaussian function)
$σ$: Parameter of the Gaussian function, controls the variance
R Shift X: Shift of the red color channel along the x-axis
R Shift Y: Shift of the red color channel along the y-axis
G Shift X: Shift of the green color channel along the x-axis
G Shift Y: Shift of the green color channel along the y-axis
B Shift X: Shift of the blue color channel along the x-axis
B Shift Y: Shift of the blue color channel along the y-axis

The Intensity output of the Depth Color Shift node allows you to see the strength of the effect (black = no strength, white = full strength)

The example file below is for Blender 2.80, however the same node setup should work in 2.79 as well.


How do I export a simple Blender 3D model, without armature, to Three js? I have googled it and have found a little or close to no info.The existing info is for old versions of blender and three js.
I have tried this method https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender, but I am not seeing "Import-Export: Three.js Format" in the Addons in blender.
I have Blender 2.72, and three.js (r70).
UPDATE:
I have been able to export my simple cube model into .JSON file type.
Now how should I upload and use it in three.js?

I'm using Blender 2.73 and three.js (r70)

The io_three folder has to be copied to blender's scripts/addon folder for the "Import-Export: Three.js Format" to appear. But this has probably been figured out by you.

During the export to three.js (.json) format you may want to include a few essential and additional attributes like vertices,faces,colors and materials for your model. By default, the following will be checked.

Depending on the complexity of the image, you may get texture files in addition to the .json files. Use them.

Now you have to basically re-create the model using a scene, camera, renderer and animation loop.

A tutorial with three.js basics --> http://www.kadrmasconcepts.com/blog/2011/06/08/three-js-blender-part-2/


how to set key frames on color ramp? I am animating a logo.it looks that is hot as a melted iron and gets cold and a blue light turns over that and again turned to red to complete the loop.
In the first frame it should be completely red emmision.then the red get decreased by color ramp until it completely turned off.and then we have blue light and again some spots get red and again turn completely to red.
I wanted to set keyframes to the color ramp but I couldn't.how can I set keyframes for the color ramp?

If you want to keyframe the needles, keyframe the Pos (position) value, if you want to keyframe the color, keyframe the color itself. To keyframe, move your cursor over the value or color and press i:


Random edges that don't exist? The seemingly random edges that are crisscrossing everywhere do not exist and can't be clicked on. If I click on the connecting vertices, the "edge" disappears. Any fix other than just ignoring them? Applying subdivision or solidify modifiers seems to make them go away but I have to work with those off for now.

Answer: When I press "Adjust edit cage to modifier result" twice it just fixed it.

Certain problem in this case might be different but if unnecessary geometry is only composed of edges you can subtract selection based on selection modes.
Deselect all, enter Edge selection mode, select all. Then enter Face selection mode. Selection will be edited accordingly as edges can't be selected in Face selection mode. Switch to Edge selection mode, invert selection, delete edges.

There are other ways to delete loose geometry, one way is to use Select > Select All By Trait and use options there.


Changing scale of working area I want to squeeze NLA editor and Dope Sheet on Y axis to fit more objects in one screen.

For example in VSE this can be done via CTRL + MMB and dragging in prefered direction. Same thing in NLA only works for X axis or stretching timeline. In Graph Editor it works in both ways, but doesn't affect list of objects, so still lots of scrolling.

Another thing I tried, was pressing NumPad's - while hovering over the interface. In some parts of it font resizes well (like Render or Object tab), but not in NLA - it just hides all rollouts.

If you want the Y Axis to be smaller you need to make the Text/Font smaller.

You could reduce the Display Scale under the User Preferences > Interface.

However, this will affect all unsizable text in Blender.


Complex object consisting of multiple partly overlapping shapes, blend together to keep one outer shell Ok, so i've converted hair particles to a mesh and gave them a thickness (i think it was with solidify). Anyway, the object is now too complex (i want to 3D print it). So i just want the outer mesh detail, and everything inside should be blend together, with no more individual features but as one solid shape.

Basically, i'm looking to do in 3D in Blender, what is very easy to do in 2D in Illustrator with the "unite" option in the pathfinder tool. Like this:
https://www.youtube.com/watch?v=Fg95K3NAtSM

I tried with wrapping something over it and applying that modifier, but that wasn't nearly accurate enough, even after many subdivisions.

I tried with bolean, but that didn't work either. That might work if i applied each shape individually but there are thousands of shapes, so this is not an option.

It's a feature is often missed in Blender before as well. So i hope something like the Illustrator function actually does exist.

I found out, that applying a union boolean on an exact copy in the exact same location actually does what i'm looking for... but it wouldn't do it on the hair i had (i used screw and solidify). So, i went back to the original file, i removed all children particles, converted the particles to mesh, and then selected all, and extruded them for width, and selected all again, to extrude them for depth. After joining this mesh with the body and head, i COULD make a duplicate and perform the boolean union on the entire object.

For now, the solution will have to do. But i still can't understand there is no simpler way to do this. Mindboggling actually.


How to rotate collection instance with reference point I have a question concerning precision edition of a geometry.

Here I'm simply trying to align a window collection instance with a given axis.

Logically, with a pivot set to the instance's origin P0, I would like to select P1 and then P2 to match edge [P0 P1] with [P0 P2].

Actually I can snap on P2 but geometry just tries to ture 90 degrees.

Does anybody has a solution for this?

p.s. Please concern that solution has to be made without manipulating original collection itself. Just think about placing identical windows along walls that doesn't go parpendicullarly.

Happy blending!

The first job is to get the origin of the Collection Instance in the right location and orientation with respect to its component objects.

When a Collection Instance is created, all its component objects retain their World Transforms, with respect to the collection's origin (represented by an Empty). While you can move the origin of a collection using the Header > Object > Set Origin menu, it's probably least confusing to keep the Collection origin at the world origin while assembling. You can hide the source collection, and still work with its instances.

Once that's done, you can align the instance as you would any other object. (You can search for various ways besides this to do that, here on BSE)

Here, the original collection is shown at the origin, as created. In this example..

A Custom Orientation was created from the sloping target face. (The '+' in the Orientation dropdown)
The 3D Cursor was snapped to the face (ShiftS)
The (wireframe) Instance was snapped to the cursor (ShiftS)
With the instance selected, and the Custom Orientation active, Header > Object > Transform menu, 'Align to Transform Orientation'

You can align multiple instances in one move.

The Instance's local axes are shown in the gizmo.


Unable to find object scatter addon in blender 2.9 I recently upgraded to blender 2.9. Though I have enabled Object-scatter addon, I couldn't find it using the search(f3) in the viewport. Where can I find that addon?

I just found out that just enabling Developers extra works. For anyone else experiencing the same issue go to Edit > Preferences > Interface and tick the developers extra


How to create a "fluid/distortion" effect on a solid object (example inside) I've been struggling to understand how I should approach the following effect in Blender:

Watch the YouTube Video The Node (at 1:37)

I've tried to solve this one through the displacement modifier (with vertex groups, custom displacement texture, etc), several cast modifiers with multiple points and more recently using shape keys to do it manually. None of these methods result in a "natural" enough look, like a fluid, and all of them take the animating process to an inefficient workflow.

I can't seem to solve this one by myself with the current knowledge I have with Blender, would you help me out please?

Thank you very much in advance!

Edit:

Ok so I tried the wave modifier with very simple settings, a vertex group limiting the effect of the modifier and I achieved this:

It's still not optimal, but that's the closest thing I've managed so far, some input would still be very helpful to look into this in a better way.

Edit 2:

This is what I got with the Warp modifier using a clouds texture, as suggested by @atomicbezierslinger:

Consider A Warp Modifier with the high vertex density mesh.

Below a rotating empty controls the two other empty targets of the modifier.


Duplicating objects for modeling buildings I would like to model large buildings with many duplicated features, e.g. balconies, windows, etc. I would like to use the building mesh and duplicate an object onto selected faces or vertices. For example, an area of a building wall should have identical windows on part of the wall.

Is there an efficient way to build up a mesh this way?

You can use Block Modeling, first of all you need to be precise with the measurement, so I suggest you activate Snap and leave it on Increment, so that it uses the chosen unit for moving stuff in the next steps and to do all this in Orthographic View. Create blocks like the one in the picture that represent the basic elements you need to build your building, just make sure they have the same height and width (see picture below).

Now let's take a look at the Properties Panel: in the section shown in the picture below there are all the option that have to do with the actual geometric data of the selected object. If you click on the button on the right where there is the name of the geometric data (third picture) you can see the list of all geometric data you have in your scene and you can change the one regarding the selected object (in this case I renamed them for clarity so that the object's name matches its geometric data).

For example, if I select the Window Block in my viewport and change its geometric data to "Door Block" it actually transforms into a door block identical to the original one. Now they have the same geometric data so if you modify one the other gets modified too (which can be a downside depending of what you want to achieve).

So now with only just three different blocks you can create the base for any building you want by just copying one of the block (Shift+D), placing it where you want and changing its geometric data eventually. Keep in mind that doing this will results in a very long list of objects in the outliner so when you're done building and you are sure that they are placed correctly(see picture below) ,you can select every block and join them, but beware that this will result in overlapping faces where the blocks touch each other so you have to select everything in edit mode and click "Remove Doubles" (now called "Merge by Distance" in 2.8) on the Tool Shelf, and probably remove redundant geometry where is not needed anymore.

In no time you can already have something like this, and you can apply this method also when you create windows, doors, etc.


How limit rotation constraint work? Creating a door for the cabinet. I want to rotate it until it touch the base. Uptill 180 the slider (influence) works perfect 0 to 1. After increasing from 180+ value the slider (influence) does not work. I want the flap to be touch to the base. And it takes the rotation of 225. How can i rotate or make the flap touch the base.

Any suggestion how it works. Thanks

As far as I understand, a constraint defines a range of allowed values and if the value is outside of it, it snaps to the nearest boundary. Unfortunately it doesn't operate on transform properties, where you can have e.g. 1000° rotation, but on matrices using quaternions.

rotation angles differing precisely by the natural period will be encoded into identical quaternions and recovered angles will be limited to { 0 , 2 π } (in radians)

https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
This means, that for a constraint, 460° angle is the same as 100° (100°+360° = 460°). You can't therefore constrain an object to some number of rotations, after which it will no longer rotate. So if you set the constraints to -180°..180°, it is not constrained at all, because no matrix can translate to a different value in Euler rotation. If an object is at 181° rotation, it is the same as if it was at -179°. Therefore, if you want to limit your object's rotation to 150°..225° range, you have to use two constraints: 150°..180° (any higher value would also work but would really mean 180°), and then -180°..-135° - the problem is, you can't combine constraints like that, they are applied one after another. So if the rotation is 181°, after converting to quaternions and back, it is now -179°, which is below the lower limit of 150°, so it is clamped to the lower limit, unintuitively snapping from 181° to 150° instead of closer 180°:

When the next constrain is applied, it will now snap this angle to the -180°..-135° range.
The general solution is to rotate the object to exactly half its possible rotation and apply rotation to set it to 0, so that now it can move 180 degrees in either direction. In your case, knowing the constrained range is much smaller, you may feel tempted to apply the rotation at a more elegant position, e.g. -45°, since -225° + 45° is exactly -180°, but then you would run into the mentioned flipping problems when a value below -180° suddenly changes to a value below 180° and is snapped to the wrong boundary of the constrain, so remember to give yourself some safety margin.

If you don't want the flipping:

Then you just have to resign from the constraints and use a driver:


Movie editing: low FPS on preview [SOLVED] A friend suggested me the solution. The problem was the FILE CODEC. Smartphones often use H264 codec that are awful to decode on the fly, so preview will hang even with a decent hw. Ironically, a 100 Mb video file from a smartphone (LG G3 in my case) can be heavier to decode on the fly than a 1 Gb file encoded with Xvid (wich probably isn't the best option for a video edit, but at least prevents sluggishness).

I'm stuck in this problem and I don't know if it's a software problem, hardware problem, an OS problem, a codec problem or what.

I'm managing multiple 4k files made with my LG G3.

When I start playing preview, after about ten seconds, FPS value falls down and become sluggish.

Same problem with other movie editors: tested it with OpenShot, KDEnlive et al.

Av-Sync enabled.
Frame rate specified.
Tried also to re-encode with Handbrake (thought it was a codec problem) but with no luck.

Sw details:

Blender 2.76

Lubuntu 15.04 64 bit

Installed and running all media codec of this and even the parallel universe

Hw details:

Xeon E3-1241v3 quad core 3.5

16 Gb RAM 1600

SSD

VGA MSI GTX 970 oc

... so I cannot believe it's an hw problem.

RAM, GPU and CPU sensors show me that PC is almost bored (near 3% usage, temperatures around 30°C).

Maybe the same old problem with pulseaudio?

So... what can I do?

Why does it happen?

There is a very simple explanation to this: to increase performance of various things (including video playback), Blender has a fixed-size cache in your RAM. Using this Blender preloads frames into quicker memory for faster playback (this is what you see for the ten first seconds.). When the cache fills, Blender starts doing the following:

Read the frame from the hard drive
Decode the frame
Push it to the cache (overwriting whatever was in the way)
Read it from the cache and draw it on screen.

This is slower because:

You are limited by the speed of your hard drive.
Decoding the frame takes time
Pushing things to the cache is an extra overhead.
The processing time used up by the above is taken away from actually playing back the video.

This explains the overall sluggishness.

How does one solve it?

You can adjust the size of the cache: in User Preferences > System > Memory Cache Limit. I personally advise using as much as you can manage. It also reduces the amount of crashes due to memory leaks (this is especially true on Windows). A bigger cache means a faster Blender in general.

Also, you can make Blender prefetch frames in the Clip Editor and Sequencer. Do this by going to User Preferences > System > Sequencer / Clip Editor. I hope this helps.

Also have a look at:

How to make VSE render faster?
http://blenderartists.org/forum/showthread.php?349186-Does-Blender-has-a-cache-size-limit-(per-frame)

[Edit]

If the codec is slow to decode, having frames cached is even more important.


Connect Overlapping Faces/Verticles Hello!

I have problem to connect this column to the base like in the photo.
I would like to connect that parts as one connected edges.
Please help :(

We don't know a lot about your topology, but you could try this way: Select your top cube, then click Face > Intersect (Boolean), then change the Operator box setting to Union. You may need to make some adjustments like Remove Doubles (Merge by Distance in 2.8) or draw some edges with knife (or J to join vertices).


Texture Changes When Object Position Changes I'm working on a procedural wood texture, and it's become clear that I don't understand cycles vectors at all :(  I'm hoping someone will see an obvious problem or at least point me to a good resource for learning about vectors in details.
I used this post's answer to create a wood texture node, and I'm using it to generate my rings.  The issue is that the texture doesn't move with the object.  Moving an object with this material applied is like cutting the object out of a different section of the same log.
Below is a picture of two objects sitting near center followed by a picture of the same two objects moved 5 units along the X axis.
Initial Positions
New Positions
I expect this issue is caused by one of the three vectors (or a combination of them) that are involved in the wood texture node.  Below is a picture of the noodle.  Any of the Less/More or PBR nodes can be ignored for this post.  They are convinence node groups I made by following the Blender Guru PBR tutorial.
In the main noodle, we care about the blue node and the two vectors feeding into it:

Entering that node, we can see how it works.  The distance node is used to calculate the distance between the center of the texture (core of the log the wood was cut from) and the surface of the object.

The third vector I mentioned is hidden inside the distance node, and I think it is intended to represent the objects 3D center or something like that.

Try It Yourself!
Here is a link to the full blend file.

The problem you are having is that the two inputs to the Wood Rings Texture are two world-space points that the "core" of the wood passes through.

You are currently supplying a world-space point (the object location, aka center), and a normal vector. However, the normal vector is being used as a point, not a vector. As a result, you are defining a line which passes through the object-center and a point within 1 unit of the global origin.

One part of the solution is to convert the calculations into object space, making these two core endpoints object space coordinates. This can be done by going into the distance node and replacing Geometry->Position with TextureCoordinate->Object. This supplies the object-space position of the texel to the distance calculation.

Then we need to remove the object position, because the core-definition points are now in object space. We can define core-origin as an arbitrary x,y,z point in object space. Further, the normal node (aka core orientation) needs to be added to the core-origin to create the second core-endpoint.

Here is a fixed blend file.

This solution is a bit limited, in that it has only one core orientation per shader, and we'd prefer to have one per object instance.

One alternative is to use script nodes to read the object positions of empties, which can be created per object instance.

Another alternative is to randomly generate core orientations per object.


How to select concave quads how can i select all concave quads, is there such a tool?

This may be a naive answer, I'm no coder, but is there anything wrong with letting BMLoop.is_convex do this for you?
(Starting from Edit Mode):
import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)
bm.faces.active = None

for face in bm.faces:
    face.select_set(False)
    for loop in face.loops:
        if not loop.is_convex:
            face.select_set(True)
            break

bmesh.update_edit_mesh(me, False)


UV unrawpp keep getting bent >< I honestly don't know how fix this problem:
I have modeled a cola can.
I created seams in all the right places. (at list as far as i know.)

and unwrapped the UV
and while they are no distortions on the map. the islands for some reason comes out bent when they should be in a streight line.

so any ideas about what to do?

you could you use this addon:

https://github.com/Radivarig/UvSquares

it is made for this specific purpose. While the addon is free you can consider supporting the developer if you like and use it:

https://blendermarket.com/products/uv-squares/

for how to use it:
https://www.youtube.com/watch?v=VYZnGIql2UI


Render Transparency in edit mode I am doing some modeling with blue prints. I would like to see the blue prints through my mesh. However when I switch to edit mode the transparency is no longer rendered. How can I enable transparency in edit mode? Or is the another way I can see my blue prints through the mesh?

I am using blender internal.

First make sure you choose GLSL shading mode in the properties panel of the 3D view (shortcut N):

Then, you can switch the viewport shading method to Texture in the bottom menu:

Then, your object will appear transparent (if you set up the material correctly ;) even in edit mode.


Python Scale UV islands by individual origins I need to scale UV islands by their individual origins using Python. I've tried for a long time but I can't get it to work in a non-interactive environment. Any help would be greatly appreciated! Thank you so much in advance!
import bpy
bpy.context.area.ui_type = 'UV'
bpy.context.space_data.pivot_point = 'INDIVIDUAL_ORIGINS'
bpy.ops.transform.resize(value=(scale_length, scale_width, 1)

I've also tried using 'World Scale UV' from the MagicUV addon. The problem with this is that it only allows for uniform scaling. So different scale on different axis won't work.
Background info: This will be used for custom size and shapes of nameplates for a three.js configurator. There are about 10k objects of different sizes and shapes that need a 'World scaled' UV to make it look more realistic.

you must select all uv island before scale it:
import bpy
scale_length= 0.5
scale_width = 0.7

original_type = bpy.context.area.ui_type
bpy.context.area.ui_type = 'UV'
bpy.ops.uv.select_all(action='SELECT')
bpy.context.space_data.pivot_point = 'INDIVIDUAL_ORIGINS'
bpy.ops.transform.resize(value=(scale_length, scale_width, 1))

bpy.context.area.ui_type = original_type


Curve from Mesh, how to enable handles? I'm trying to enable the handles of Control Points in a Curve that I got from Mesh, selecting the Control Points and pressing V didn't get any results, I tried all types of Control Points. Anyone knows how to solve this? Thanks!

Toggle Edit Mode and set Spline Type to Bezier.

Tool Shelf T > Tools > Curve Tools > Set Spline Type:

Here is an explanation from the Blender Reference Manual:

  Mesh objects that consist of a series of connected vertices can be
  converted into curve objects. The resulting curve will be a Poly curve
  type, but can be converted to have smooth segments as described above.


Bake per vertex color to Texture So, I was trying to make the colours of a obj created by this Demo make by the talented people of the Computer Vision Laboratory of University of Nottingham and with no success and frustration I wasn't able to make the colours show up, even less bake to a normal texture map.

Screenshot https://i.imgur.com/IEN8rkm.png

Link for you to try be yourself http://cvl-demos.cs.nott.ac.uk/vrn/

Thank you and best regards.

The issue is that .OBJ format by standard does not support vertex colors, so Blender isn't importing them. The way to append vertex color after vertex position is only a third-party hack to the format, and thus the support is limited in many applications.

Please follow this post about importing an .OBJ file with vertex colors into Blender and you should be able to see, render and bake the colors no problem.

How to display and use Vertex Color from OBJ model


How can I make a mirror which reflects only chosen things? I'm making an animation and I would like to make a mirror which reflects only things which I choose. To be more specific, two characters are going to stand in front of the mirror, but there would be reflection of just one of them, like on this picture below:

Is there an option to make it in Blender?

Composite view layers
You can take advantage of view layers and compositing. It's very flexible and collection-driven.
Create a collection with the objects that you don't want to appear in the mirror (s_vampire in this case).
Create two view layer and in one Disable the collection you created before: one with everything enabled called for example ref

And one othe called for example n vis with the collection disabled.

Now, just use cryptomatte layer to pick the mirror plane as a mask in the compositor:

The scene will be rendered 2 times and the mirror will show only the scene where the collection with s_vampire object is disabled. This is the result.

You can download the file here to explore the scene:


increasing amount of side faces on object made from cylinder Is there a way to increase the amount of side faces on a cylinder-like object  after manipulating the object in edit mode other than using subsurf and creasing every single edge? The edges selected on the picture are the ones I'm refering to.

I modeled a now somewhat complex object starting with a simple cylinder, assuming that the amount of faces on the side would be sufficient though there's a need to increase it now.

Also, does the shading method (smooth/flat) affect the model in any way when exporting to other file formats?

Mesh Objects in Blender don't have an Edit History that would allow you to edit a parameter somewhere at the start of the Object's life and have that propagate through all other operations to the present. You can't in your example change the tube's vertex count after you've made edits to it.

But it is possible to reconstruct the object quickly with the desired vertex counts. For instance use the Screw Modifier to Lathe the profile around an axis. The Object's center can be used as the rotation coordinate or an Empty.


Import custom file format into Blender I have some text files that contain the (x, y, z) values of points that make up a curve. How can I import this curve into blender, add some thickness, and, if possible, color the line by a fourth variable (like time)?

As an example, here is a python script that prints x, y, z and t values for a spiral:

import numpy as np

t = np.linspace(0,10,100)

x = np.sin(t)
y = np.cos(t)
z = t

for vec in zip(x, y, z, t):
    print '%.2f %.2f %.2f %.2f'%(vec[0],vec[1],vec[2],vec[3])

And the output looks like my data files:

0.00 1.00 0.00 0.00
0.10 0.99 0.10 0.10
0.20 0.98 0.20 0.20
0.30 0.95 0.30 0.30
0.39 0.92 0.40 0.40
0.48 0.88 0.51 0.51
0.57 0.82 0.61 0.61
0.65 0.76 0.71 0.71
0.72 0.69 0.81 0.81
0.79 0.61 0.91 0.91
0.85 0.53 1.01 1.01
0.90 0.44 1.11 1.11
0.94 0.35 1.21 1.21
0.97 0.25 1.31 1.31
0.99 0.16 1.41 1.41
...

How can I import this data into Blender? (Note: I have used the 3D surface plugin to draw lines and surfaces in Blender. This is not what I am asking here. In this case, I don't want to plot an equation, but experimental data from text files.)

One easy solution, though kind of "hacky", would be to append "v " (a lowercase v and a space) to the beginning of each line, and then importing it has a Wavefront .obj format.

So just do: print "v " + '%.2f %.2f %.2f %.2f'%(vec[0],vec[1],vec[2],vec[3])

In this example three vertices are defined, then they are automatically assigned an index from top to bottom;

v 0.00 1.00 0.00 0.00 #This is the index 1
v 0.10 0.99 0.10 0.10 #This is the index 2
v 0.20 0.98 0.20 0.20 #This is the index 3

Then, to define a "face" (a connection of 2 or more vertices) use:

f 1 2 3

Using this will define a face between the vertices of index 1, 2 and 3.

If, however, you want to only connect vertices with edges, you can use:

l 1 2

To define an edge between vertices  of index 1 and 2.

If you want a brief explanation, there's a Wikipedia page. For the complete specification, refer to this page.


How to get user input for a function? I have created a function that requires a file path input, I found a way to have the user input a file location but I am not sure how to access it. I thought it was assigned to the bpy.types.Scene.conf_path but I do not get the directory when its printed.  Here is my code.

import bpy
class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        obj = context.object
        col = layout.column()
        col.prop(context.scene, 'conf_path')

def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_module(__name__)
    bpy.types.Scene.conf_path = bpy.props.StringProperty \
      (
      name = "XML Location",
      default = "",
      description = "Define the root path of the project",
      subtype = 'DIR_PATH'
      )

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.conf_path

if __name__ == "__main__":
    register()

I appreciate any help or direction. Thanks

I was not calling the information properly. It is not under bpy.types.Scene.conf_path but rather C.scene.conf_path.


Cycles shader multiplexer node? Is there some way to select one output from a number of inputs with a Fac, like a Mix shader, but instead of a 0-1 slider, use an integer index (for more than two inputs)?

Example (in Quartz Composer):

If possible, I would like to use an arbitrary number of inputs (e.g. with Python somehow), but I don't know if that is possible.

I found a way to do this that takes a fixed number of inputs (it also has the useful property of mixing its inputs given a non-integer):

This is extensible, but only by manually editing the node group.


2D flow simulation over a surface I'm very new to blender but keen to learn more. I have used a lot of 2 and 3D modelling packages as well as a number of GIS applications.

I'm just trying to work out if I can model a fluid flow over a surface, ie a DTM (digital Terrain model) which I understand needs impotent as a tiff or similar image file.

What I want to do is simulate flood water across a surface/DTM.

If so, is there somewhere that would help me get started?

Starting with a landscape.

Place a plane where your water should be.

(It doesn't have to be that big I just made it big for clarity, all you need is the plane to be as big as the water surface.)

In Edit Mode subdivide the plane.

Add a subdivision Surface modifier and a Displace modifier.

In the display modifier select Texture. (A new one will be created if there are none)

Assign the texture to be used as displacement. I used a wood Texture, but it's up to you how you want the water to flow.

Play with the Strength settings to get the right height for the displacement.

To animate the displacement.

Create an Empty and add a couple of keyframes for the motion.

On the displace modifier set the Texture coordinates as Object
and Assign the Empty as the object.